pyanime4k 1.0.4__tar.gz → 3.0.0__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.
Files changed (152) hide show
  1. pyanime4k-3.0.0/.github/workflows/wheels.yml +91 -0
  2. pyanime4k-3.0.0/.gitignore +190 -0
  3. pyanime4k-3.0.0/.gitmodules +3 -0
  4. pyanime4k-3.0.0/LICENSE +21 -0
  5. pyanime4k-3.0.0/PKG-INFO +116 -0
  6. pyanime4k-3.0.0/README.md +106 -0
  7. pyanime4k-3.0.0/pyanime4k.egg-info/PKG-INFO +116 -0
  8. pyanime4k-3.0.0/pyanime4k.egg-info/SOURCES.txt +126 -0
  9. pyanime4k-3.0.0/pyproject.toml +17 -0
  10. {pyanime4k-1.0.4 → pyanime4k-3.0.0}/setup.cfg +4 -4
  11. pyanime4k-3.0.0/setup.py +51 -0
  12. pyanime4k-3.0.0/src/Anime4kCPP/.gitattributes +2 -0
  13. pyanime4k-3.0.0/src/Anime4kCPP/.gitignore +46 -0
  14. pyanime4k-3.0.0/src/Anime4kCPP/CMakeLists.txt +165 -0
  15. pyanime4k-3.0.0/src/Anime4kCPP/LICENSE-GPLv3 +674 -0
  16. pyanime4k-3.0.0/src/Anime4kCPP/LICENSE-MIT +21 -0
  17. pyanime4k-3.0.0/src/Anime4kCPP/binding/CMakeLists.txt +6 -0
  18. pyanime4k-3.0.0/src/Anime4kCPP/binding/c/CMakeLists.txt +43 -0
  19. pyanime4k-3.0.0/src/Anime4kCPP/binding/c/include/AC/Core.h +81 -0
  20. pyanime4k-3.0.0/src/Anime4kCPP/binding/c/src/Binding.cpp +182 -0
  21. pyanime4k-3.0.0/src/Anime4kCPP/binding/python/CMakeLists.txt +21 -0
  22. pyanime4k-3.0.0/src/Anime4kCPP/binding/python/src/Binding.cpp +96 -0
  23. pyanime4k-3.0.0/src/Anime4kCPP/cli/CMakeLists.txt +34 -0
  24. pyanime4k-3.0.0/src/Anime4kCPP/cli/include/Options.hpp +41 -0
  25. pyanime4k-3.0.0/src/Anime4kCPP/cli/include/ProgressBar.hpp +18 -0
  26. pyanime4k-3.0.0/src/Anime4kCPP/cli/src/Main.cpp +244 -0
  27. pyanime4k-3.0.0/src/Anime4kCPP/cli/src/Options.cpp +44 -0
  28. pyanime4k-3.0.0/src/Anime4kCPP/cli/src/ProgressBar.cpp +30 -0
  29. pyanime4k-3.0.0/src/Anime4kCPP/cmake/CheckCompiler.cmake +48 -0
  30. pyanime4k-3.0.0/src/Anime4kCPP/cmake/CheckOpenCLHPP.cmake +14 -0
  31. pyanime4k-3.0.0/src/Anime4kCPP/cmake/GenDSFilterRC.cmake +107 -0
  32. pyanime4k-3.0.0/src/Anime4kCPP/cmake/MinifierOpenCLKernel.cmake +18 -0
  33. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/avisynth.cmake +24 -0
  34. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/cli11.cmake +16 -0
  35. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/cuda.cmake +17 -0
  36. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/directshow.cmake +18 -0
  37. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/eigen3.cmake +16 -0
  38. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/ffmpeg.cmake +48 -0
  39. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/opencl.cmake +54 -0
  40. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/pybind11.cmake +14 -0
  41. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/qt.cmake +31 -0
  42. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/ruapu.cmake +13 -0
  43. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/stb.cmake +13 -0
  44. pyanime4k-3.0.0/src/Anime4kCPP/cmake/dependency/vapoursynth.cmake +22 -0
  45. pyanime4k-3.0.0/src/Anime4kCPP/core/CMakeLists.txt +172 -0
  46. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Dispatch.hpp +14 -0
  47. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Image.hpp +159 -0
  48. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/ACNet.hpp +70 -0
  49. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/ARNet.hpp +67 -0
  50. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/Base.hpp +13 -0
  51. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/Param/ACNet.p +3014 -0
  52. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/Param/ARNet.p +602 -0
  53. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model/Param.hpp +10 -0
  54. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Model.hpp +7 -0
  55. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Parallel.hpp +40 -0
  56. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Processor.hpp +50 -0
  57. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core/Util.hpp +119 -0
  58. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Core.hpp +8 -0
  59. pyanime4k-3.0.0/src/Anime4kCPP/core/include/AC/Specs.hpp +45 -0
  60. pyanime4k-3.0.0/src/Anime4kCPP/core/src/Image.cpp +78 -0
  61. pyanime4k-3.0.0/src/Anime4kCPP/core/src/ImageIO.cpp +83 -0
  62. pyanime4k-3.0.0/src/Anime4kCPP/core/src/ImageProcess.cpp +583 -0
  63. pyanime4k-3.0.0/src/Anime4kCPP/core/src/Model.cpp +40 -0
  64. pyanime4k-3.0.0/src/Anime4kCPP/core/src/Processor.cpp +180 -0
  65. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/CPUProcessor.cpp +290 -0
  66. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/Dispatch.cpp +50 -0
  67. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/Eigen3.cpp +121 -0
  68. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/Generic.cpp +114 -0
  69. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/arm/NEON.cpp +285 -0
  70. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/wasm/SIMD128.cpp +248 -0
  71. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/x86/AVX.cpp +309 -0
  72. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cpu/x86/SSE.cpp +256 -0
  73. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cuda/CUDAProcessor.cpp +377 -0
  74. pyanime4k-3.0.0/src/Anime4kCPP/core/src/cuda/Kernel.cu +324 -0
  75. pyanime4k-3.0.0/src/Anime4kCPP/core/src/opencl/Kernel.cl +180 -0
  76. pyanime4k-3.0.0/src/Anime4kCPP/core/src/opencl/OpenCLProcessor.cpp +390 -0
  77. pyanime4k-3.0.0/src/Anime4kCPP/filter/CMakeLists.txt +35 -0
  78. pyanime4k-3.0.0/src/Anime4kCPP/filter/avisynth/CMakeLists.txt +21 -0
  79. pyanime4k-3.0.0/src/Anime4kCPP/filter/avisynth/src/Filter.cpp +112 -0
  80. pyanime4k-3.0.0/src/Anime4kCPP/filter/directshow/CMakeLists.txt +26 -0
  81. pyanime4k-3.0.0/src/Anime4kCPP/filter/directshow/src/Filter.cpp +590 -0
  82. pyanime4k-3.0.0/src/Anime4kCPP/filter/vapoursynth/CMakeLists.txt +21 -0
  83. pyanime4k-3.0.0/src/Anime4kCPP/filter/vapoursynth/src/Filter.cpp +127 -0
  84. pyanime4k-3.0.0/src/Anime4kCPP/gui/CMakeLists.txt +114 -0
  85. pyanime4k-3.0.0/src/Anime4kCPP/gui/include/Config.hpp +57 -0
  86. pyanime4k-3.0.0/src/Anime4kCPP/gui/include/Logger.hpp +34 -0
  87. pyanime4k-3.0.0/src/Anime4kCPP/gui/include/MainWindow.hpp +55 -0
  88. pyanime4k-3.0.0/src/Anime4kCPP/gui/include/Upscaler.hpp +58 -0
  89. pyanime4k-3.0.0/src/Anime4kCPP/gui/languages/ac_gui_zh_CN.ts +354 -0
  90. pyanime4k-3.0.0/src/Anime4kCPP/gui/src/Config.cpp +108 -0
  91. pyanime4k-3.0.0/src/Anime4kCPP/gui/src/Logger.cpp +63 -0
  92. pyanime4k-3.0.0/src/Anime4kCPP/gui/src/MainWindow.cpp +383 -0
  93. pyanime4k-3.0.0/src/Anime4kCPP/gui/src/QtMain.cpp +18 -0
  94. pyanime4k-3.0.0/src/Anime4kCPP/gui/src/Upscaler.cpp +225 -0
  95. pyanime4k-3.0.0/src/Anime4kCPP/gui/ui/MainWindow.ui +406 -0
  96. pyanime4k-3.0.0/src/Anime4kCPP/images/Logo.ico +0 -0
  97. pyanime4k-3.0.0/src/Anime4kCPP/images/Logo.png +0 -0
  98. pyanime4k-3.0.0/src/Anime4kCPP/readme.md +141 -0
  99. pyanime4k-3.0.0/src/Anime4kCPP/test/CMakeLists.txt +12 -0
  100. pyanime4k-3.0.0/src/Anime4kCPP/test/util/CMakeLists.txt +10 -0
  101. pyanime4k-3.0.0/src/Anime4kCPP/test/util/src/Channel.cpp +34 -0
  102. pyanime4k-3.0.0/src/Anime4kCPP/test/video/CMakeLists.txt +10 -0
  103. pyanime4k-3.0.0/src/Anime4kCPP/test/video/src/Resize.cpp +58 -0
  104. pyanime4k-3.0.0/src/Anime4kCPP/test/wasm/CMakeLists.txt +9 -0
  105. pyanime4k-3.0.0/src/Anime4kCPP/test/wasm/src/Web.cpp +26 -0
  106. pyanime4k-3.0.0/src/Anime4kCPP/tools/CMakeLists.txt +3 -0
  107. pyanime4k-3.0.0/src/Anime4kCPP/tools/benchmark/CMakeLists.txt +10 -0
  108. pyanime4k-3.0.0/src/Anime4kCPP/tools/benchmark/src/Benchmark.cpp +97 -0
  109. pyanime4k-3.0.0/src/Anime4kCPP/util/CMakeLists.txt +17 -0
  110. pyanime4k-3.0.0/src/Anime4kCPP/util/include/AC/Util/Channel.hpp +113 -0
  111. pyanime4k-3.0.0/src/Anime4kCPP/util/include/AC/Util/Defer.hpp +31 -0
  112. pyanime4k-3.0.0/src/Anime4kCPP/util/include/AC/Util/Stopwatch.hpp +80 -0
  113. pyanime4k-3.0.0/src/Anime4kCPP/util/include/AC/Util/ThreadLocal.hpp +39 -0
  114. pyanime4k-3.0.0/src/Anime4kCPP/util/include/AC/Util/ThreadPool.hpp +102 -0
  115. pyanime4k-3.0.0/src/Anime4kCPP/video/CMakeLists.txt +50 -0
  116. pyanime4k-3.0.0/src/Anime4kCPP/video/include/AC/Video/Filter.hpp +18 -0
  117. pyanime4k-3.0.0/src/Anime4kCPP/video/include/AC/Video/Pipeline.hpp +94 -0
  118. pyanime4k-3.0.0/src/Anime4kCPP/video/include/AC/Video.hpp +7 -0
  119. pyanime4k-3.0.0/src/Anime4kCPP/video/src/Filter.cpp +111 -0
  120. pyanime4k-3.0.0/src/Anime4kCPP/video/src/Pipeline.cpp +467 -0
  121. pyanime4k-3.0.0/src/pyanime4k/__init__.py +4 -0
  122. pyanime4k-3.0.0/src/pyanime4k/image_io.py +9 -0
  123. pyanime4k-3.0.0/src/pyanime4k/info.py +13 -0
  124. pyanime4k-3.0.0/src/pyanime4k/processor.py +27 -0
  125. pyanime4k-3.0.0/src/pyanime4k/pyac/__init__.py +1 -0
  126. pyanime4k-3.0.0/src/pyanime4k/upscale.py +29 -0
  127. pyanime4k-1.0.4/MANIFEST.in +0 -1
  128. pyanime4k-1.0.4/PKG-INFO +0 -55
  129. pyanime4k-1.0.4/README.md +0 -40
  130. pyanime4k-1.0.4/pyanime4k/__init__.py +0 -2
  131. pyanime4k-1.0.4/pyanime4k/anime4k/__init__.py +0 -0
  132. pyanime4k-1.0.4/pyanime4k/anime4k/_anime4kcpp.pyd +0 -0
  133. pyanime4k-1.0.4/pyanime4k/anime4k/_anime4kcpp.so +0 -0
  134. pyanime4k-1.0.4/pyanime4k/anime4k/anime4kcpp.py +0 -111
  135. pyanime4k-1.0.4/pyanime4k/anime4k/libgcc_s_seh-1.dll +0 -0
  136. pyanime4k-1.0.4/pyanime4k/anime4k/libopencv_core411.dll +0 -0
  137. pyanime4k-1.0.4/pyanime4k/anime4k/libopencv_highgui411.dll +0 -0
  138. pyanime4k-1.0.4/pyanime4k/anime4k/libopencv_imgcodecs411.dll +0 -0
  139. pyanime4k-1.0.4/pyanime4k/anime4k/libopencv_imgproc411.dll +0 -0
  140. pyanime4k-1.0.4/pyanime4k/anime4k/libopencv_videoio411.dll +0 -0
  141. pyanime4k-1.0.4/pyanime4k/anime4k/libstdc++-6.dll +0 -0
  142. pyanime4k-1.0.4/pyanime4k/anime4k/libwinpthread-1.dll +0 -0
  143. pyanime4k-1.0.4/pyanime4k/anime4k/opencv_videoio_ffmpeg411_64.dll +0 -0
  144. pyanime4k-1.0.4/pyanime4k/anime4k/openh264-1.8.0-win64.dll +0 -0
  145. pyanime4k-1.0.4/pyanime4k/ffmpeg.py +0 -11
  146. pyanime4k-1.0.4/pyanime4k/upscale.py +0 -86
  147. pyanime4k-1.0.4/pyanime4k.egg-info/PKG-INFO +0 -55
  148. pyanime4k-1.0.4/pyanime4k.egg-info/SOURCES.txt +0 -25
  149. pyanime4k-1.0.4/pyanime4k.egg-info/requires.txt +0 -1
  150. pyanime4k-1.0.4/setup.py +0 -33
  151. {pyanime4k-1.0.4 → pyanime4k-3.0.0}/pyanime4k.egg-info/dependency_links.txt +0 -0
  152. {pyanime4k-1.0.4 → pyanime4k-3.0.0}/pyanime4k.egg-info/top_level.txt +0 -0
@@ -0,0 +1,91 @@
1
+ name: Build wheels
2
+ on:
3
+ push:
4
+ branches: [master]
5
+ paths:
6
+ - 'src/**'
7
+ pull_request:
8
+ branches: [master]
9
+ paths:
10
+ - 'src/**'
11
+ release:
12
+ types: [published]
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build_wheels:
18
+ name: Build wheels on ${{ matrix.os }}
19
+ runs-on: ${{ matrix.os }}
20
+ strategy:
21
+ matrix:
22
+ os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ submodules: true
28
+
29
+ - uses: actions/setup-python@v5
30
+ with:
31
+ python-version: '3.x'
32
+
33
+ - name: Install CUDA
34
+ if: matrix.os == 'windows-latest'
35
+ uses: Jimver/cuda-toolkit@v0.2.23
36
+ id: cuda-toolkit
37
+ with:
38
+ method: 'network'
39
+ sub-packages: '["nvcc", "cudart", "opencl"]'
40
+
41
+ - name: Build wheels
42
+ uses: pypa/cibuildwheel@v2.23.3
43
+ env:
44
+ CIBW_PROJECT_REQUIRES_PYTHON: '>=3.8'
45
+ if: matrix.os == 'macos-13'
46
+ MACOSX_DEPLOYMENT_TARGET: '10.12'
47
+ with:
48
+ output-dir: wheelhouse
49
+
50
+ - name: Upload artifacts
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: pyanime4k-wheels-${{ matrix.os }}
54
+ path: wheelhouse/*.whl
55
+
56
+ build_sdist:
57
+ name: Build source distribution
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ with:
62
+ submodules: true
63
+
64
+ - name: clone Anime4KCPP
65
+ run: mkdir -p src/Anime4KCPP && git clone https://github.com/TianZerL/Anime4KCPP.git src/Anime4KCPP
66
+
67
+ - name: Build sdist
68
+ run: pipx run build --sdist
69
+
70
+ - uses: actions/upload-artifact@v4
71
+ with:
72
+ name: pyanime4k-sdist
73
+ path: dist/*.tar.gz
74
+
75
+ upload_all:
76
+ name: Upload to pypi
77
+ needs: [build_wheels, build_sdist]
78
+ environment: pypi
79
+ permissions:
80
+ id-token: write
81
+ runs-on: ubuntu-latest
82
+
83
+ if: github.event_name == 'release' && github.event.action == 'published'
84
+ steps:
85
+ - uses: actions/download-artifact@v4
86
+ with:
87
+ pattern: pyanime4k-*
88
+ path: dist
89
+ merge-multiple: true
90
+
91
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,190 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Visual Studio Code
171
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
172
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
173
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
174
+ # you could uncomment the following to ignore the enitre vscode folder
175
+ # .vscode/
176
+
177
+ # Ruff stuff:
178
+ .ruff_cache/
179
+
180
+ # PyPI configuration file
181
+ .pypirc
182
+
183
+ # Cursor
184
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
185
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
186
+ # refer to https://docs.cursor.com/context/ignore-files
187
+ .cursorignore
188
+ .cursorindexingignore
189
+
190
+ _skbuild
@@ -0,0 +1,3 @@
1
+ [submodule "src/Anime4kCPP"]
2
+ path = src/Anime4kCPP
3
+ url = https://github.com/TianZerL/Anime4KCPP.git
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TianZer
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.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyanime4k
3
+ Version: 3.0.0
4
+ License: MIT
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Dynamic: license-file
9
+ Dynamic: requires-python
10
+
11
+ # PyAnime4K
12
+
13
+ PyAnime4K is a high performance anime image upscaler based on [Anime4KCPP](https://github.com/TianZerL/Anime4KCPP).
14
+
15
+ # Install
16
+ PyAnime4K can be installed easily through pip.
17
+ ```shell
18
+ pip install pyanime4k
19
+ ```
20
+
21
+ You can also build the wheel by yourself.
22
+ ```shell
23
+ # sudo apt install ocl-icd-opencl-dev cmake build-essential
24
+ get clone https://github.com/TianZerL/pyanime4k.git
25
+ cd pyanime4k
26
+ python setup.py bdist_wheel
27
+ ```
28
+
29
+ # Usages
30
+ ## Printing Info
31
+ ```python
32
+ import pyanime4k
33
+
34
+ # Print supported model
35
+ pyanime4k.print_model_list()
36
+
37
+ # Print supported processor
38
+ pyanime4k.print_processor_list()
39
+
40
+ # Print supported devices for image processing
41
+ pyanime4k.print_device_list()
42
+ ```
43
+ ## Upscaling Images
44
+ ```python
45
+ import pyanime4k
46
+
47
+ # with OpenCL acceleration, if possible
48
+ processor_name = "opencl"
49
+
50
+ # upscale a single image
51
+ pyanime4k.upscale_images("image1.png", processor_name = processor_name)
52
+
53
+ # upscale a list of images
54
+ pyanime4k.upscale_images(["image1.png", "image2.png"], processor_name = processor_name)
55
+ ```
56
+ ## Manual Upscaling
57
+ ```python
58
+ import pyanime4k
59
+
60
+ # Create a processor
61
+ processor = pyanime4k.Processor(
62
+ processor_name="cpu",
63
+ device_id=0,
64
+ model_name="acnet-hdn0"
65
+ )
66
+ # Print processor info
67
+ print(processor)
68
+ # Read an image
69
+ src = pyanime4k.imread("image1.png")
70
+ # Process it
71
+ dst = processor(src=src, factor=2.0)
72
+ # Write to disk
73
+ pyanime4k.imwrite("image1_outout.png", dst)
74
+ ```
75
+ ## OpenCV
76
+ ``` Python
77
+ import cv2, pyanime4k
78
+
79
+ img = cv2.imread("image.png")
80
+
81
+ processor = pyanime4k.Processor(
82
+ processor_name="cpu",
83
+ device_id=0,
84
+ model_name="acnet-hdn0"
85
+ )
86
+
87
+ # opencv load image as BGR, but we need an RGB image
88
+ src = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
89
+
90
+ dst = processor(src)
91
+
92
+ img = cv2.cvtColor(dst, cv2.COLOR_RGB2BGR)
93
+
94
+ cv2.imshow("pyanime4k", img)
95
+ cv2.waitKey()
96
+ ```
97
+ ## Pillow
98
+ ```python
99
+ from PIL import Image
100
+ import numpy, pyanime4k
101
+
102
+ img = Image.open("D:/temp/p1.png")
103
+
104
+ processor = pyanime4k.Processor(
105
+ processor_name="cpu",
106
+ device_id=0,
107
+ model_name="acnet-hdn0"
108
+ )
109
+
110
+ # We need a numpy array
111
+ src = numpy.asarray(img)
112
+ dst = processor(src)
113
+ img = Image.fromarray(dst)
114
+
115
+ img.show()
116
+ ```
@@ -0,0 +1,106 @@
1
+ # PyAnime4K
2
+
3
+ PyAnime4K is a high performance anime image upscaler based on [Anime4KCPP](https://github.com/TianZerL/Anime4KCPP).
4
+
5
+ # Install
6
+ PyAnime4K can be installed easily through pip.
7
+ ```shell
8
+ pip install pyanime4k
9
+ ```
10
+
11
+ You can also build the wheel by yourself.
12
+ ```shell
13
+ # sudo apt install ocl-icd-opencl-dev cmake build-essential
14
+ get clone https://github.com/TianZerL/pyanime4k.git
15
+ cd pyanime4k
16
+ python setup.py bdist_wheel
17
+ ```
18
+
19
+ # Usages
20
+ ## Printing Info
21
+ ```python
22
+ import pyanime4k
23
+
24
+ # Print supported model
25
+ pyanime4k.print_model_list()
26
+
27
+ # Print supported processor
28
+ pyanime4k.print_processor_list()
29
+
30
+ # Print supported devices for image processing
31
+ pyanime4k.print_device_list()
32
+ ```
33
+ ## Upscaling Images
34
+ ```python
35
+ import pyanime4k
36
+
37
+ # with OpenCL acceleration, if possible
38
+ processor_name = "opencl"
39
+
40
+ # upscale a single image
41
+ pyanime4k.upscale_images("image1.png", processor_name = processor_name)
42
+
43
+ # upscale a list of images
44
+ pyanime4k.upscale_images(["image1.png", "image2.png"], processor_name = processor_name)
45
+ ```
46
+ ## Manual Upscaling
47
+ ```python
48
+ import pyanime4k
49
+
50
+ # Create a processor
51
+ processor = pyanime4k.Processor(
52
+ processor_name="cpu",
53
+ device_id=0,
54
+ model_name="acnet-hdn0"
55
+ )
56
+ # Print processor info
57
+ print(processor)
58
+ # Read an image
59
+ src = pyanime4k.imread("image1.png")
60
+ # Process it
61
+ dst = processor(src=src, factor=2.0)
62
+ # Write to disk
63
+ pyanime4k.imwrite("image1_outout.png", dst)
64
+ ```
65
+ ## OpenCV
66
+ ``` Python
67
+ import cv2, pyanime4k
68
+
69
+ img = cv2.imread("image.png")
70
+
71
+ processor = pyanime4k.Processor(
72
+ processor_name="cpu",
73
+ device_id=0,
74
+ model_name="acnet-hdn0"
75
+ )
76
+
77
+ # opencv load image as BGR, but we need an RGB image
78
+ src = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
79
+
80
+ dst = processor(src)
81
+
82
+ img = cv2.cvtColor(dst, cv2.COLOR_RGB2BGR)
83
+
84
+ cv2.imshow("pyanime4k", img)
85
+ cv2.waitKey()
86
+ ```
87
+ ## Pillow
88
+ ```python
89
+ from PIL import Image
90
+ import numpy, pyanime4k
91
+
92
+ img = Image.open("D:/temp/p1.png")
93
+
94
+ processor = pyanime4k.Processor(
95
+ processor_name="cpu",
96
+ device_id=0,
97
+ model_name="acnet-hdn0"
98
+ )
99
+
100
+ # We need a numpy array
101
+ src = numpy.asarray(img)
102
+ dst = processor(src)
103
+ img = Image.fromarray(dst)
104
+
105
+ img.show()
106
+ ```
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyanime4k
3
+ Version: 3.0.0
4
+ License: MIT
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Dynamic: license-file
9
+ Dynamic: requires-python
10
+
11
+ # PyAnime4K
12
+
13
+ PyAnime4K is a high performance anime image upscaler based on [Anime4KCPP](https://github.com/TianZerL/Anime4KCPP).
14
+
15
+ # Install
16
+ PyAnime4K can be installed easily through pip.
17
+ ```shell
18
+ pip install pyanime4k
19
+ ```
20
+
21
+ You can also build the wheel by yourself.
22
+ ```shell
23
+ # sudo apt install ocl-icd-opencl-dev cmake build-essential
24
+ get clone https://github.com/TianZerL/pyanime4k.git
25
+ cd pyanime4k
26
+ python setup.py bdist_wheel
27
+ ```
28
+
29
+ # Usages
30
+ ## Printing Info
31
+ ```python
32
+ import pyanime4k
33
+
34
+ # Print supported model
35
+ pyanime4k.print_model_list()
36
+
37
+ # Print supported processor
38
+ pyanime4k.print_processor_list()
39
+
40
+ # Print supported devices for image processing
41
+ pyanime4k.print_device_list()
42
+ ```
43
+ ## Upscaling Images
44
+ ```python
45
+ import pyanime4k
46
+
47
+ # with OpenCL acceleration, if possible
48
+ processor_name = "opencl"
49
+
50
+ # upscale a single image
51
+ pyanime4k.upscale_images("image1.png", processor_name = processor_name)
52
+
53
+ # upscale a list of images
54
+ pyanime4k.upscale_images(["image1.png", "image2.png"], processor_name = processor_name)
55
+ ```
56
+ ## Manual Upscaling
57
+ ```python
58
+ import pyanime4k
59
+
60
+ # Create a processor
61
+ processor = pyanime4k.Processor(
62
+ processor_name="cpu",
63
+ device_id=0,
64
+ model_name="acnet-hdn0"
65
+ )
66
+ # Print processor info
67
+ print(processor)
68
+ # Read an image
69
+ src = pyanime4k.imread("image1.png")
70
+ # Process it
71
+ dst = processor(src=src, factor=2.0)
72
+ # Write to disk
73
+ pyanime4k.imwrite("image1_outout.png", dst)
74
+ ```
75
+ ## OpenCV
76
+ ``` Python
77
+ import cv2, pyanime4k
78
+
79
+ img = cv2.imread("image.png")
80
+
81
+ processor = pyanime4k.Processor(
82
+ processor_name="cpu",
83
+ device_id=0,
84
+ model_name="acnet-hdn0"
85
+ )
86
+
87
+ # opencv load image as BGR, but we need an RGB image
88
+ src = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
89
+
90
+ dst = processor(src)
91
+
92
+ img = cv2.cvtColor(dst, cv2.COLOR_RGB2BGR)
93
+
94
+ cv2.imshow("pyanime4k", img)
95
+ cv2.waitKey()
96
+ ```
97
+ ## Pillow
98
+ ```python
99
+ from PIL import Image
100
+ import numpy, pyanime4k
101
+
102
+ img = Image.open("D:/temp/p1.png")
103
+
104
+ processor = pyanime4k.Processor(
105
+ processor_name="cpu",
106
+ device_id=0,
107
+ model_name="acnet-hdn0"
108
+ )
109
+
110
+ # We need a numpy array
111
+ src = numpy.asarray(img)
112
+ dst = processor(src)
113
+ img = Image.fromarray(dst)
114
+
115
+ img.show()
116
+ ```