tensorneko-util 0.3.21__tar.gz → 0.3.23__tar.gz
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_util-0.3.23/LICENSE +21 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/PKG-INFO +22 -7
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/README.md +1 -1
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/setup.py +1 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/setup_util.py +2 -0
- tensorneko_util-0.3.23/src/tensorneko_util/io/audio/audio_writer.pyi +29 -0
- tensorneko_util-0.3.23/src/tensorneko_util/io/video/video_reader.pyi +38 -0
- tensorneko_util-0.3.23/src/tensorneko_util/io/video/video_writer.pyi +33 -0
- tensorneko_util-0.3.23/src/tensorneko_util/preprocess/crop.pyi +15 -0
- tensorneko_util-0.3.23/src/tensorneko_util/util/dispatched_misc.pyi +23 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/dispatcher.py +17 -2
- tensorneko_util-0.3.23/src/tensorneko_util/util/ref.pyi +38 -0
- tensorneko_util-0.3.23/src/tensorneko_util/version.txt +1 -0
- tensorneko_util-0.3.23/src/tensorneko_util/visualization/watcher/web/dist/assets/index.9d369ef8.css +5 -0
- tensorneko_util-0.3.23/src/tensorneko_util/visualization/watcher/web/dist/assets/index.f19b5d1c.js +188 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/watcher/web/dist/index.html +2 -2
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util.egg-info/PKG-INFO +23 -8
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util.egg-info/SOURCES.txt +9 -2
- tensorneko_util-0.3.21/src/tensorneko_util/version.txt +0 -1
- tensorneko_util-0.3.21/src/tensorneko_util/visualization/watcher/web/dist/assets/index.6e281472.js +0 -188
- tensorneko_util-0.3.21/src/tensorneko_util/visualization/watcher/web/dist/assets/index.cf95019d.css +0 -5
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/setup.cfg +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/_rich.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/audio_lib.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/blocking.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/parallel.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/tqdm.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/backend/visual_lib.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/debug/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/debug/logger.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/debug/parser.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/_default_backends.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/_path_conversion.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/audio/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/audio/audio_data.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/audio/audio_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/audio/audio_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/hdf5/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/hdf5/hdf5_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/hdf5/hdf5_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/image/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/image/image_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/image/image_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/json/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/json/json_data.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/json/json_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/json/json_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/matlab/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/matlab/mat_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/matlab/mat_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/npy/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/npy/npy_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/npy/npy_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/pickle/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/pickle/pickle_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/pickle/pickle_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/text/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/text/text_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/text/text_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/toml/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/toml/toml_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/toml/toml_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/video/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/video/video_data.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/video/video_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/video/video_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/yaml/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/yaml/yaml_reader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/io/yaml/yaml_writer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/msg/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/msg/gotify.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/msg/postgres.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/notebook/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/notebook/animation.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/notebook/display.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/crop.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/_utils.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/abstract_face_detector.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/anime_face_detector.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/facexzoo_face_detector.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/face_detector/opencv_face_detector.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/ffmpeg.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/image.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/preprocess/video.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/average_meter.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/bimap.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/dispatched_misc.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/downloader.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/eventbus/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/eventbus/bus.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/eventbus/decorator.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/eventbus/event.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/args.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/array/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/array/abstract_seq.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/array/seq.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/array/stream.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/func.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/monad/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/monad/eval.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/monad/monad.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/monad/option.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/fp/underscore.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/misc.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/multi_layer_indexer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/ref.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/registry.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/server.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/singleton.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/timer.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/type.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/util/window_merger.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/color.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/image_browser/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/image_browser/server.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/image_browser/web/index.html +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/matplotlib.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/multi_plots.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/seaborn.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/tensorboard.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/watcher/__init__.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/watcher/component.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/watcher/server.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util/visualization/watcher/view.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util.egg-info/dependency_links.txt +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util.egg-info/requires.txt +1 -1
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/src/tensorneko_util.egg-info/top_level.txt +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/test/test_library_info.py +0 -0
- {tensorneko_util-0.3.21 → tensorneko_util-0.3.23}/test/test_version.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 ControlNet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tensorneko_util
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.23
|
|
4
4
|
Summary: The Utils for Library TensorNeko.
|
|
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
|
-
Description:
|
|
12
|
-
The independent util library for TensorNeko. This library doesn't require PyTorch as a dependency.
|
|
13
|
-
|
|
14
10
|
Keywords: deep learning,pytorch,AI,data processing
|
|
15
|
-
Platform: UNKNOWN
|
|
16
11
|
Classifier: Programming Language :: Python :: 3
|
|
17
12
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -20,6 +15,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
24
21
|
Classifier: Operating System :: OS Independent
|
|
25
22
|
Classifier: Intended Audience :: Developers
|
|
@@ -27,3 +24,21 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
27
24
|
Classifier: Topic :: Utilities
|
|
28
25
|
Requires-Python: >=3.7
|
|
29
26
|
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: numpy>=1.20.1
|
|
29
|
+
Requires-Dist: einops>=0.3.0
|
|
30
|
+
Dynamic: author
|
|
31
|
+
Dynamic: author-email
|
|
32
|
+
Dynamic: classifier
|
|
33
|
+
Dynamic: description
|
|
34
|
+
Dynamic: description-content-type
|
|
35
|
+
Dynamic: home-page
|
|
36
|
+
Dynamic: keywords
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
Dynamic: project-url
|
|
39
|
+
Dynamic: requires-dist
|
|
40
|
+
Dynamic: requires-python
|
|
41
|
+
Dynamic: summary
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
The independent util library for TensorNeko. This library doesn't require PyTorch as a dependency.
|
|
@@ -32,7 +32,7 @@ pip install tensorneko # for PyTorch only
|
|
|
32
32
|
pip install tensorneko[lightning] # for PyTorch and Lightning
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
To use the library without PyTorch and PyTorch Lightning, you can install the util library (support Python 3.7 ~ 3.
|
|
35
|
+
To use the library without PyTorch and PyTorch Lightning, you can install the util library (support Python 3.7 ~ 3.14 with limited features) with following command.
|
|
36
36
|
```shell
|
|
37
37
|
pip install tensorneko_util
|
|
38
38
|
```
|
|
@@ -51,6 +51,7 @@ setuptools.setup(
|
|
|
51
51
|
"Programming Language :: Python :: 3.10",
|
|
52
52
|
"Programming Language :: Python :: 3.11",
|
|
53
53
|
"Programming Language :: Python :: 3.12",
|
|
54
|
+
"Programming Language :: Python :: 3.13",
|
|
54
55
|
"License :: OSI Approved :: MIT License",
|
|
55
56
|
"Operating System :: OS Independent",
|
|
56
57
|
"Intended Audience :: Developers",
|
|
@@ -47,6 +47,8 @@ setuptools.setup(
|
|
|
47
47
|
"Programming Language :: Python :: 3.10",
|
|
48
48
|
"Programming Language :: Python :: 3.11",
|
|
49
49
|
"Programming Language :: Python :: 3.12",
|
|
50
|
+
"Programming Language :: Python :: 3.13",
|
|
51
|
+
"Programming Language :: Python :: 3.14",
|
|
50
52
|
"License :: OSI Approved :: MIT License",
|
|
51
53
|
"Operating System :: OS Independent",
|
|
52
54
|
"Intended Audience :: Developers",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from typing import overload, Union
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from .audio_data import AudioData
|
|
5
|
+
from ...backend.audio_lib import AudioLib
|
|
6
|
+
from ...util.type import T_ARRAY
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AudioWriter:
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
@overload
|
|
13
|
+
def to(cls, path: Union[str, Path], audio: AudioData, channel_first: bool = True, backend: AudioLib = None
|
|
14
|
+
) -> None: ...
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
@overload
|
|
18
|
+
def to(cls, path: Union[str, Path], audio: T_ARRAY, sample_rate: int = 16000, channel_first: bool = True,
|
|
19
|
+
backend: AudioLib = None
|
|
20
|
+
): ...
|
|
21
|
+
|
|
22
|
+
@overload
|
|
23
|
+
def __new__(cls, path: Union[str, Path], audio: AudioData, channel_first: bool = True, backend: AudioLib = None
|
|
24
|
+
) -> None: ...
|
|
25
|
+
|
|
26
|
+
@overload
|
|
27
|
+
def __new__(cls, path: Union[str, Path], audio: T_ARRAY, sample_rate: int = 16000, channel_first: bool = True,
|
|
28
|
+
backend: AudioLib = None
|
|
29
|
+
): ...
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from typing import Optional, overload, Union
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from numpy import ndarray
|
|
5
|
+
|
|
6
|
+
from .video_data import VideoData
|
|
7
|
+
from ...backend.visual_lib import VisualLib
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VideoReader:
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def of(cls, path: Union[str, Path], channel_first: bool = True, backend: Optional[VisualLib] = None) -> VideoData:
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def with_indexes(cls, path: Union[str, Path], indexes: ndarray,
|
|
18
|
+
channel_first: bool = True, backend: Optional[VisualLib] = None
|
|
19
|
+
) -> VideoData:
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
@overload
|
|
24
|
+
def with_range(cls, path: Union[str, Path], start: int, end: int, step: int, channel_first: bool = True,
|
|
25
|
+
backend: Optional[VisualLib] = None
|
|
26
|
+
) -> VideoData:
|
|
27
|
+
...
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
@overload
|
|
31
|
+
def with_range(cls, path: Union[str, Path], end: int, channel_first: bool = True,
|
|
32
|
+
backend: Optional[VisualLib] = None
|
|
33
|
+
) -> VideoData:
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
def __new__(cls, path: Union[str, Path], channel_first: bool = True, backend: Optional[VisualLib] = None
|
|
37
|
+
) -> VideoData:
|
|
38
|
+
...
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from typing import overload, Optional, Union
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from .video_data import VideoData
|
|
5
|
+
from ...backend.visual_lib import VisualLib
|
|
6
|
+
from ...util.type import T_ARRAY
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class VideoWriter:
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
@overload
|
|
13
|
+
def to(cls, path: Union[str, Path], video: VideoData, audio_codec: str = None, channel_first: bool = False,
|
|
14
|
+
backend: VisualLib = None
|
|
15
|
+
) -> None: ...
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
@overload
|
|
19
|
+
def to(cls, path: Union[str, Path], video: T_ARRAY, video_fps: float, audio: T_ARRAY = None,
|
|
20
|
+
audio_fps: Optional[int] = None, audio_codec: str = None, channel_first: bool = False,
|
|
21
|
+
backend: VisualLib = None
|
|
22
|
+
) -> None: ...
|
|
23
|
+
|
|
24
|
+
@overload
|
|
25
|
+
def __new__(cls, path: Union[str, Path], video: VideoData, audio_codec: str = None, channel_first: bool = False,
|
|
26
|
+
backend: VisualLib = None
|
|
27
|
+
) -> None: ...
|
|
28
|
+
|
|
29
|
+
@overload
|
|
30
|
+
def __new__(cls, path: Union[str, Path], video: T_ARRAY, video_fps: float, audio: T_ARRAY = None,
|
|
31
|
+
audio_fps: Optional[int] = None, audio_codec: str = None, channel_first: bool = False,
|
|
32
|
+
backend: VisualLib = None
|
|
33
|
+
) -> None: ...
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from typing import overload, Union
|
|
2
|
+
|
|
3
|
+
from numpy import ndarray
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@overload
|
|
7
|
+
def crop_with_padding(image: ndarray, x1: int, x2: int, y1: int, y2: int, pad_value: Union[int, float] = 0.,
|
|
8
|
+
batch: bool = False
|
|
9
|
+
) -> ndarray: ...
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@overload
|
|
13
|
+
def crop_with_padding(image: ndarray, x1: ndarray, x2: ndarray, y1: ndarray, y2: ndarray,
|
|
14
|
+
pad_value: Union[int, float] = 0., batch: bool = False
|
|
15
|
+
) -> ndarray: ...
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import overload, List
|
|
2
|
+
|
|
3
|
+
from numpy import ndarray
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@overload
|
|
7
|
+
def sparse2binary(x: ndarray, length: int = None) -> ndarray:
|
|
8
|
+
...
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@overload
|
|
12
|
+
def sparse2binary(x: List[int], length: int = None) -> List[int]:
|
|
13
|
+
...
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@overload
|
|
17
|
+
def binary2sparse(x: ndarray) -> ndarray:
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@overload
|
|
22
|
+
def binary2sparse(x: List[int]) -> List[int]:
|
|
23
|
+
...
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import inspect
|
|
4
|
+
import sys
|
|
4
5
|
import warnings
|
|
5
6
|
from typing import Callable, Dict, List, Generic, Sequence, Optional, TYPE_CHECKING, overload
|
|
6
7
|
|
|
7
8
|
from .type import T
|
|
8
9
|
|
|
9
10
|
|
|
11
|
+
def _is_union_type(annotation) -> bool:
|
|
12
|
+
"""
|
|
13
|
+
Check if the annotation is a Union type.
|
|
14
|
+
Compatible with Python 3.8 ~ 3.14+
|
|
15
|
+
"""
|
|
16
|
+
if sys.version_info >= (3, 14):
|
|
17
|
+
# Python 3.14+: str(Union[int, str]) returns "int | str"
|
|
18
|
+
# Use typing.get_origin() for reliable detection
|
|
19
|
+
from typing import Union, get_origin
|
|
20
|
+
return get_origin(annotation) is Union
|
|
21
|
+
else:
|
|
22
|
+
# Python < 3.14: str(Union[int, str]) returns "typing.Union[int, str]"
|
|
23
|
+
return str(annotation)[:13] == "typing.Union["
|
|
24
|
+
|
|
25
|
+
|
|
10
26
|
class DispatcherTypeWarning(Warning):
|
|
11
27
|
pass
|
|
12
28
|
|
|
@@ -38,8 +54,7 @@ class Dispatcher:
|
|
|
38
54
|
possible_types = [[]]
|
|
39
55
|
|
|
40
56
|
for param in parameters:
|
|
41
|
-
|
|
42
|
-
is_union = str(param.annotation)[:13] == "typing.Union["
|
|
57
|
+
is_union = _is_union_type(param.annotation)
|
|
43
58
|
|
|
44
59
|
# if no default value and not union, just append to each possible types
|
|
45
60
|
if param.default is inspect.Signature.empty and not is_union:
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Generic, overload
|
|
4
|
+
|
|
5
|
+
from .type import P
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Ref(Generic[P]):
|
|
9
|
+
value: P
|
|
10
|
+
@overload
|
|
11
|
+
def __new__(cls, value: str) -> StringRef: ...
|
|
12
|
+
@overload
|
|
13
|
+
def __new__(cls, value: int) -> IntRef: ...
|
|
14
|
+
@overload
|
|
15
|
+
def __new__(cls, value: float) -> FloatRef: ...
|
|
16
|
+
@overload
|
|
17
|
+
def __new__(cls, value: bool) -> BoolRef: ...
|
|
18
|
+
|
|
19
|
+
class StringRef(Ref[str]):
|
|
20
|
+
def __str__(self) -> str: ...
|
|
21
|
+
|
|
22
|
+
class IntRef(Ref[int]):
|
|
23
|
+
def __int__(self) -> int: ...
|
|
24
|
+
|
|
25
|
+
class FloatRef(Ref[float]):
|
|
26
|
+
def __float__(self) -> float: ...
|
|
27
|
+
|
|
28
|
+
class BoolRef(Ref[bool]):
|
|
29
|
+
def __bool__(self) -> bool: ...
|
|
30
|
+
|
|
31
|
+
@overload
|
|
32
|
+
def ref(value: str) -> StringRef: ...
|
|
33
|
+
@overload
|
|
34
|
+
def ref(value: int) -> IntRef: ...
|
|
35
|
+
@overload
|
|
36
|
+
def ref(value: float) -> FloatRef: ...
|
|
37
|
+
@overload
|
|
38
|
+
def ref(value: bool) -> BoolRef: ...
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.23
|