tensorneko 0.3.21__py3-none-any.whl → 0.3.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tensorneko/evaluation/psnr.pyi +21 -0
- tensorneko/evaluation/ssim.pyi +21 -0
- tensorneko/preprocess/crop.pyi +16 -0
- tensorneko/util/dispatched_misc.pyi +34 -0
- tensorneko/version.txt +1 -1
- {tensorneko-0.3.21.dist-info → tensorneko-0.3.22.dist-info}/METADATA +32 -21
- {tensorneko-0.3.21.dist-info → tensorneko-0.3.22.dist-info}/RECORD +10 -6
- {tensorneko-0.3.21.dist-info → tensorneko-0.3.22.dist-info}/WHEEL +1 -1
- {tensorneko-0.3.21.dist-info → tensorneko-0.3.22.dist-info/licenses}/LICENSE +0 -0
- {tensorneko-0.3.21.dist-info → tensorneko-0.3.22.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import overload
|
|
2
|
+
|
|
3
|
+
from torch import Tensor
|
|
4
|
+
|
|
5
|
+
from .enum import Reduction
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@overload
|
|
9
|
+
def psnr_image(pred: str, real: str) -> Tensor: ...
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@overload
|
|
13
|
+
def psnr_image(pred: Tensor, real: Tensor, reduction: Reduction = Reduction.MEAN) -> Tensor: ...
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@overload
|
|
17
|
+
def psnr_video(pred: str, real: str, use_ffmpeg: bool = False) -> Tensor: ...
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@overload
|
|
21
|
+
def psnr_video(pred: Tensor, real: Tensor) -> Tensor: ...
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import overload
|
|
2
|
+
|
|
3
|
+
from torch import Tensor
|
|
4
|
+
|
|
5
|
+
from .enum import Reduction
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@overload
|
|
9
|
+
def ssim_image(pred: str, real: str) -> Tensor: ...
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@overload
|
|
13
|
+
def ssim_image(pred: Tensor, real: Tensor, reduction: Reduction = Reduction.MEAN) -> Tensor: ...
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@overload
|
|
17
|
+
def ssim_video(pred: str, real: str, use_ffmpeg: bool = False) -> Tensor: ...
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@overload
|
|
21
|
+
def ssim_video(pred: Tensor, real: Tensor) -> Tensor: ...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from typing import overload, Union
|
|
2
|
+
|
|
3
|
+
from numpy import ndarray
|
|
4
|
+
from torch import Tensor
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@overload
|
|
8
|
+
def crop_with_padding(image: ndarray, x1: int, x2: int, y1: int, y2: int, pad_value: Union[int, float] = 0.,
|
|
9
|
+
batch: bool = False
|
|
10
|
+
) -> ndarray: ...
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@overload
|
|
14
|
+
def crop_with_padding(image: Tensor, x1: int, x2: int, y1: int, y2: int, pad_value: Union[int, float] = 0.,
|
|
15
|
+
batch: bool = False
|
|
16
|
+
) -> Tensor: ...
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from typing import overload, List
|
|
2
|
+
|
|
3
|
+
from numpy import ndarray
|
|
4
|
+
from torch import Tensor
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@overload
|
|
8
|
+
def sparse2binary(x: Tensor, length: int = None) -> Tensor:
|
|
9
|
+
...
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@overload
|
|
13
|
+
def sparse2binary(x: ndarray, length: int = None) -> ndarray:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@overload
|
|
18
|
+
def sparse2binary(x: List[int], length: int = None) -> ndarray:
|
|
19
|
+
...
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@overload
|
|
23
|
+
def binary2sparse(x: Tensor) -> Tensor:
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@overload
|
|
28
|
+
def binary2sparse(x: ndarray) -> ndarray:
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@overload
|
|
33
|
+
def binary2sparse(x: List[int]) -> List[int]:
|
|
34
|
+
...
|
tensorneko/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.22
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tensorneko
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.22
|
|
4
4
|
Summary: Tensor Neural Engine Kompanion. An util library based on PyTorch and PyTorch Lightning.
|
|
5
5
|
Home-page: https://github.com/ControlNet/tensorneko
|
|
6
6
|
Author: ControlNet
|
|
7
7
|
Author-email: smczx@hotmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
8
|
Project-URL: Bug Tracker, https://github.com/ControlNet/tensorneko/issues
|
|
10
9
|
Project-URL: Source Code, https://github.com/ControlNet/tensorneko
|
|
11
10
|
Keywords: deep learning,pytorch,AI,data processing
|
|
12
|
-
Platform: UNKNOWN
|
|
13
11
|
Classifier: Programming Language :: Python :: 3
|
|
14
12
|
Classifier: Programming Language :: Python :: 3.8
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: License :: OSI Approved :: MIT License
|
|
20
19
|
Classifier: Operating System :: OS Independent
|
|
21
20
|
Classifier: Intended Audience :: Developers
|
|
@@ -23,19 +22,33 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
23
22
|
Classifier: Topic :: Utilities
|
|
24
23
|
Requires-Python: >=3.8
|
|
25
24
|
Description-Content-Type: text/markdown
|
|
26
|
-
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: torch>=1.9.0
|
|
27
|
+
Requires-Dist: torchaudio>=0.9.0
|
|
28
|
+
Requires-Dist: torchvision>=0.10.0
|
|
29
|
+
Requires-Dist: torchmetrics>=0.7.3
|
|
30
|
+
Requires-Dist: pillow>=8.1
|
|
31
|
+
Requires-Dist: av>=8.0.3
|
|
32
|
+
Requires-Dist: pysoundfile>=0.9.0; platform_system == "Windows"
|
|
33
|
+
Requires-Dist: numpy>=1.20.1
|
|
34
|
+
Requires-Dist: einops>=0.3.0
|
|
35
|
+
Requires-Dist: tensorneko_util==0.3.22
|
|
36
36
|
Provides-Extra: lightning
|
|
37
|
-
Requires-Dist:
|
|
38
|
-
Requires-Dist:
|
|
37
|
+
Requires-Dist: tensorboard>=2.0.0; extra == "lightning"
|
|
38
|
+
Requires-Dist: lightning<3,>=2.0; extra == "lightning"
|
|
39
|
+
Dynamic: author
|
|
40
|
+
Dynamic: author-email
|
|
41
|
+
Dynamic: classifier
|
|
42
|
+
Dynamic: description
|
|
43
|
+
Dynamic: description-content-type
|
|
44
|
+
Dynamic: home-page
|
|
45
|
+
Dynamic: keywords
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
Dynamic: project-url
|
|
48
|
+
Dynamic: provides-extra
|
|
49
|
+
Dynamic: requires-dist
|
|
50
|
+
Dynamic: requires-python
|
|
51
|
+
Dynamic: summary
|
|
39
52
|
|
|
40
53
|
<h1 style="text-align: center">TensorNeko</h1>
|
|
41
54
|
|
|
@@ -71,7 +84,7 @@ pip install tensorneko # for PyTorch only
|
|
|
71
84
|
pip install tensorneko[lightning] # for PyTorch and Lightning
|
|
72
85
|
```
|
|
73
86
|
|
|
74
|
-
To use the library without PyTorch and PyTorch Lightning, you can install the util library (support Python 3.7 ~ 3.
|
|
87
|
+
To use the library without PyTorch and PyTorch Lightning, you can install the util library (support Python 3.7 ~ 3.13 with limited features) with following command.
|
|
75
88
|
```shell
|
|
76
89
|
pip install tensorneko_util
|
|
77
90
|
```
|
|
@@ -276,7 +289,7 @@ t0 = time.time()
|
|
|
276
289
|
with Server(view, port=8000):
|
|
277
290
|
for i, data in enumerate(data_list):
|
|
278
291
|
preprocessing(data) # do some processing here
|
|
279
|
-
|
|
292
|
+
|
|
280
293
|
x = time.time() - t0 # time since the start of the program
|
|
281
294
|
y = i # processed number of data
|
|
282
295
|
line_chart.add(x, y) # add to the line chart
|
|
@@ -525,7 +538,7 @@ def process_data(n: int):
|
|
|
525
538
|
return n
|
|
526
539
|
else:
|
|
527
540
|
return None
|
|
528
|
-
|
|
541
|
+
|
|
529
542
|
|
|
530
543
|
data = get_data()
|
|
531
544
|
data = data.map(process_data).get_or_else(-1) # if the response is None, return -1
|
|
@@ -734,5 +747,3 @@ The `gotify` can send a message to the Gotify server, with the environment varia
|
|
|
734
747
|
```shell
|
|
735
748
|
tensorneko gotify "Script finished!"
|
|
736
749
|
```
|
|
737
|
-
|
|
738
|
-
|
|
@@ -2,7 +2,7 @@ tensorneko/__init__.py,sha256=uh1HNn1sNpX1bbOqAE_kNJfrH4eMtEzus0hO-Fh9tEw,990
|
|
|
2
2
|
tensorneko/neko_model.py,sha256=hUMi7puzxW_6FOpA1jiFN1__oO5DZPlhhp3WXqhJXgg,10581
|
|
3
3
|
tensorneko/neko_module.py,sha256=qELXvguSjWo_NvcRQibiFl0Qauzd9JWLSnT4dbGNS3Y,1473
|
|
4
4
|
tensorneko/neko_trainer.py,sha256=GqdRsPkzWj36DJ_Wroe1TI6QKlk3N8Q8gK4uEnI0w9Q,10190
|
|
5
|
-
tensorneko/version.txt,sha256=
|
|
5
|
+
tensorneko/version.txt,sha256=6OtxZVjxPBSh3JDaCbhkG17yxSVMldJs7t7a1E9-Q58,7
|
|
6
6
|
tensorneko/arch/__init__.py,sha256=w4lTUeyBIZelrnSjlBFWUF0erzOmBFl9FqeWQuSOyKs,248
|
|
7
7
|
tensorneko/arch/auto_encoder.py,sha256=j6PWWyaNYaYNtw_zZ9ikzhCASqe9viXR3JGBIXSK92Y,2137
|
|
8
8
|
tensorneko/arch/binary_classifier.py,sha256=1MkEbReXKLdDksRG5Rsife40grJk08EVDcNKp54Xvb4,2316
|
|
@@ -31,8 +31,10 @@ tensorneko/evaluation/enum.py,sha256=s3P8XAobku-as4in5vh6BanvVW5Ccwnff0t124lVFFg
|
|
|
31
31
|
tensorneko/evaluation/fid.py,sha256=fNuE1CEp2rPXbaZfI0E1CspluInzFlUdKc8XZEexUME,5568
|
|
32
32
|
tensorneko/evaluation/iou.py,sha256=phEmOWQ3cnWW377WeSHCoB8mGkHLHMHCl8_LL0IX3JA,2914
|
|
33
33
|
tensorneko/evaluation/psnr.py,sha256=DeKxvY_xxawWMXHY0z3Nvbsi4dR57OUV4hjtUoCINXc,3757
|
|
34
|
+
tensorneko/evaluation/psnr.pyi,sha256=aRGK9JEyXGyK3Wc247xFiajocOP-ukvvXub6yUji2CQ,416
|
|
34
35
|
tensorneko/evaluation/secs.py,sha256=D710GgcSxQgbGyPcWlC5ffF5n1GselLrUr5aA5Vq7oE,1622
|
|
35
36
|
tensorneko/evaluation/ssim.py,sha256=6vPS4VQqoKxHOG49lChH51KxwNo07B4XHdhLub5DEPU,3758
|
|
37
|
+
tensorneko/evaluation/ssim.pyi,sha256=I5vGo2KiPajl-z_VRwAHVLF4UIrrEKBdyiY2Gq3NOJw,416
|
|
36
38
|
tensorneko/io/__init__.py,sha256=QEyA0mOC-BlKKskYYbDYttYWWRjCeh73lX-yKAUGNik,213
|
|
37
39
|
tensorneko/io/reader.py,sha256=DSeTGLh84sFYwCwJmNTr-fGWkluudCbf7je29t0Z2U8,1303
|
|
38
40
|
tensorneko/io/writer.py,sha256=BR_1h-wXekBdctXymJBU44HoWsKxPhbbh6N3AKYNkjE,1292
|
|
@@ -69,6 +71,7 @@ tensorneko/optim/__init__.py,sha256=89XjYQICij8SkrW5iryfZgmbxcTDxA3hhVZTgR4588o,
|
|
|
69
71
|
tensorneko/optim/lr_scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
72
|
tensorneko/preprocess/__init__.py,sha256=0Z0eA3_I2wphyyZlzZYRrx2muWTF0QMFq2Y-jh8oVKU,808
|
|
71
73
|
tensorneko/preprocess/crop.py,sha256=Y9eWyYdzasQK3US2uBP_sUO9bPVedik0pnrrl006zZ4,2732
|
|
74
|
+
tensorneko/preprocess/crop.pyi,sha256=Aq_ywCG4ovcopH5-sj8ZVLchLgfpnt0z9cvSPccWHn8,411
|
|
72
75
|
tensorneko/preprocess/enum.py,sha256=Wp5qFaUjea5XU4o3N0WxUd-qfzI-m5vr4ZWSqWjELb4,874
|
|
73
76
|
tensorneko/preprocess/pad.py,sha256=b4IbbhGNRotZ7weZcKA7hfDqSixPo5KjM6khnqzaeUA,3238
|
|
74
77
|
tensorneko/preprocess/resize.py,sha256=hitMlzVnN6n_8nEJwxy4C4ErZrTwpM86QGnYewsrmf8,3469
|
|
@@ -76,6 +79,7 @@ tensorneko/preprocess/face_detector/__init__.py,sha256=_ktIfUZqGTX0hk7RBgKf-zHwG
|
|
|
76
79
|
tensorneko/util/__init__.py,sha256=39G34a2k5ktVtBAh4N4RMsePEak5rzPDhbNNdXo-Ye4,2258
|
|
77
80
|
tensorneko/util/configuration.py,sha256=xXeAjDh1FCNTmSPwDdkL-uH-ULfzFF6Fg0LT7gsZ6nQ,2510
|
|
78
81
|
tensorneko/util/dispatched_misc.py,sha256=_0Go7XezdYB7bpMnCs1MDD_6mPNoWP5qt8DoKuPxynI,997
|
|
82
|
+
tensorneko/util/dispatched_misc.pyi,sha256=K8qZehCayr-nQIifK0w2Kp6pjVQ9uiJ0ZvxF7G5VxPA,520
|
|
79
83
|
tensorneko/util/gc.py,sha256=P3bOZ-2VUNyswnfVz5xfj__ecTSAHpu_kLp2wFcpb6M,185
|
|
80
84
|
tensorneko/util/misc.py,sha256=LEvACtGDOX43iK86A8-Cek0S9rbXFR0AtTP1edE3XDI,4701
|
|
81
85
|
tensorneko/util/reproducibility.py,sha256=sw1vVi7VOnmzQYUocI5x9yKeZoHHiA4A5ja136XolrI,2102
|
|
@@ -86,8 +90,8 @@ tensorneko/visualization/log_graph.py,sha256=NvOwWVc_petXWYdgaHosPFLa43sHBeacbYc
|
|
|
86
90
|
tensorneko/visualization/matplotlib.py,sha256=xs9Ssc44ojZX65QU8-fftA7Ug_pBuZ3TBtM8vETNq9w,1568
|
|
87
91
|
tensorneko/visualization/image_browser/__init__.py,sha256=AtykhAE3bXQS6SOWbeYFeeUE9ts9XOFMvrL31z0LoMg,63
|
|
88
92
|
tensorneko/visualization/watcher/__init__.py,sha256=Nq752qIYvfRUZ8VctKQRSqhxh5KmFbWcqPfZlijVx6s,379
|
|
89
|
-
tensorneko-0.3.
|
|
90
|
-
tensorneko-0.3.
|
|
91
|
-
tensorneko-0.3.
|
|
92
|
-
tensorneko-0.3.
|
|
93
|
-
tensorneko-0.3.
|
|
93
|
+
tensorneko-0.3.22.dist-info/licenses/LICENSE,sha256=Vd75kwgJpVuMnCRBWasQzceMlXt4YQL13ikBLy8G5h0,1067
|
|
94
|
+
tensorneko-0.3.22.dist-info/METADATA,sha256=B0Hzs1YnIRVHChwNAabMoYfpQ1NoyjuYmiRpsRNDHGc,21104
|
|
95
|
+
tensorneko-0.3.22.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
96
|
+
tensorneko-0.3.22.dist-info/top_level.txt,sha256=sZHwlP0iyk7_zHuhRHzSBkdY9yEgyC48f6UVuZ6CvqE,11
|
|
97
|
+
tensorneko-0.3.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|