mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-04 11:24:41 +08:00
Compare commits
413 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2afbeab2aa | ||
|
|
5c4d23bc97 | ||
|
|
20e43a9724 | ||
|
|
486c23d9f4 | ||
|
|
127d9e0019 | ||
|
|
e1e8d64056 | ||
|
|
7b8e186207 | ||
|
|
f3999a431c | ||
|
|
6676cd2439 | ||
|
|
b8eb6de59b | ||
|
|
ae2d5d32e4 | ||
|
|
5884dd1ba4 | ||
|
|
33ee43a088 | ||
|
|
7ee9d60fcf | ||
|
|
a6dfdc7343 | ||
|
|
ca5044f09c | ||
|
|
0e00aca401 | ||
|
|
0400cf51b0 | ||
|
|
adf3baf4be | ||
|
|
d4d1e58f8d | ||
|
|
a379c7481e | ||
|
|
f27d8556c0 | ||
|
|
f8dcad3aef | ||
|
|
24d43a8478 | ||
|
|
627f3d84a4 | ||
|
|
2fc89e3883 | ||
|
|
073f706980 | ||
|
|
a388a12d7d | ||
|
|
937939710a | ||
|
|
ed318f61ad | ||
|
|
862b7f4ae8 | ||
|
|
b20f065fe0 | ||
|
|
149cf1ca4a | ||
|
|
a77cf9e14f | ||
|
|
d3de1ded96 | ||
|
|
3215c89870 | ||
|
|
169509b7d4 | ||
|
|
b520d51c6c | ||
|
|
980b44bc05 | ||
|
|
561671c4cb | ||
|
|
0869d153c0 | ||
|
|
4c919de6ba | ||
|
|
e393910f21 | ||
|
|
e477123e88 | ||
|
|
c8f2acdea6 | ||
|
|
aa8ed60e52 | ||
|
|
e07beb67a4 | ||
|
|
bc8ae34dde | ||
|
|
6a218ebd9c | ||
|
|
0d6a6abce2 | ||
|
|
943b446d26 | ||
|
|
1b81f7d1e2 | ||
|
|
64697a9385 | ||
|
|
e8b0b0ec21 | ||
|
|
05b275dd82 | ||
|
|
33b7c53e16 | ||
|
|
3b7921a774 | ||
|
|
dfb29e05b7 | ||
|
|
3bae03f403 | ||
|
|
9ff320721f | ||
|
|
7a7558e1a8 | ||
|
|
ec4b51064a | ||
|
|
77a06e7d92 | ||
|
|
8eda3fa2d2 | ||
|
|
bcbe33d5dc | ||
|
|
850e0fde9c | ||
|
|
a63b8d85b0 | ||
|
|
1d1792d10f | ||
|
|
851f13bd4d | ||
|
|
fbe3b44139 | ||
|
|
d6f27b3f22 | ||
|
|
fb0e3a040d | ||
|
|
bb74144070 | ||
|
|
406a97f360 | ||
|
|
9c491d4277 | ||
|
|
27c76189d9 | ||
|
|
77b3df22c1 | ||
|
|
b333f88c2f | ||
|
|
8cafb29f70 | ||
|
|
afd7c8050f | ||
|
|
66c623ff49 | ||
|
|
0633b3fd62 | ||
|
|
0588908dd6 | ||
|
|
b309bec1cb | ||
|
|
94e69f9f62 | ||
|
|
a8b952c3ad | ||
|
|
c912bfaffc | ||
|
|
f5eb195d79 | ||
|
|
5156d4a825 | ||
|
|
cbffef2b23 | ||
|
|
31e606bd4c | ||
|
|
d50cf54f2a | ||
|
|
613b75ffec | ||
|
|
9d342c51a2 | ||
|
|
48119a30eb | ||
|
|
9d09d8570f | ||
|
|
ebef5f54cb | ||
|
|
747d85cf9b | ||
|
|
f89b263487 | ||
|
|
ebd5e8eb3d | ||
|
|
50d5cb16d1 | ||
|
|
8eac1a7393 | ||
|
|
f0f3166d92 | ||
|
|
482e82f9c4 | ||
|
|
58ea9e4b35 | ||
|
|
e077849a2c | ||
|
|
0fb547589d | ||
|
|
1f18b8507d | ||
|
|
eb7d411f49 | ||
|
|
640d9cd52b | ||
|
|
bc168d11ab | ||
|
|
e09f348890 | ||
|
|
f3caf22765 | ||
|
|
cd2006b4d9 | ||
|
|
ecbc512711 | ||
|
|
3fe1f6d544 | ||
|
|
ee4d6f360e | ||
|
|
7ae1943754 | ||
|
|
c2a4b25290 | ||
|
|
f79d4893db | ||
|
|
37c2c4c647 | ||
|
|
c7fa9c10e6 | ||
|
|
fa1dca8708 | ||
|
|
a7952fc493 | ||
|
|
721de8cbce | ||
|
|
7de040bbb7 | ||
|
|
b382f3973f | ||
|
|
37bdfddf55 | ||
|
|
21967209b8 | ||
|
|
b4b7cadf0d | ||
|
|
7c70032fe7 | ||
|
|
71821dbb56 | ||
|
|
22993028b4 | ||
|
|
6d934e6a98 | ||
|
|
78a2aafa0e | ||
|
|
e535cf7333 | ||
|
|
e725712be9 | ||
|
|
d66b7fa144 | ||
|
|
155a144a93 | ||
|
|
275f329f7f | ||
|
|
60ae71f3c5 | ||
|
|
cc01f2d8e2 | ||
|
|
5255e20283 | ||
|
|
c746773980 | ||
|
|
afc0df30cd | ||
|
|
bb759197d8 | ||
|
|
b4570cc106 | ||
|
|
66f4c17294 | ||
|
|
30048ae304 | ||
|
|
84b730497b | ||
|
|
db0b87597d | ||
|
|
102340e2be | ||
|
|
85437a8481 | ||
|
|
176ae90bbb | ||
|
|
44238aed35 | ||
|
|
045e643867 | ||
|
|
c92805e7bc | ||
|
|
899fe3ae2d | ||
|
|
a75c2a50ca | ||
|
|
508d6ea4d0 | ||
|
|
8976dd8199 | ||
|
|
29a55e633c | ||
|
|
f7d6dc41b3 | ||
|
|
d236131134 | ||
|
|
d669654142 | ||
|
|
4b0ab5382c | ||
|
|
737646a248 | ||
|
|
9fc0aa787e | ||
|
|
a041a60d87 | ||
|
|
020fb2dc80 | ||
|
|
9a27960bf7 | ||
|
|
862b811517 | ||
|
|
e01d24c164 | ||
|
|
0a052a3a72 | ||
|
|
f3eaa47ec6 | ||
|
|
3f457907b6 | ||
|
|
a1d750e7ca | ||
|
|
22f656b800 | ||
|
|
8eeba71ece | ||
|
|
afca10a17b | ||
|
|
f976bdc1c9 | ||
|
|
51c0c38b34 | ||
|
|
f2b2e11c41 | ||
|
|
865e3bd193 | ||
|
|
e0dc8237f5 | ||
|
|
bbc1b57445 | ||
|
|
ebbe4570d5 | ||
|
|
bcb2e97f89 | ||
|
|
ba29349e65 | ||
|
|
1b67f373d1 | ||
|
|
7215ee1921 | ||
|
|
65c0d32a51 | ||
|
|
268460fd17 | ||
|
|
d72ecb332a | ||
|
|
8ba56e58c2 | ||
|
|
fa485b6cdd | ||
|
|
625b340f3d | ||
|
|
fa3bd38217 | ||
|
|
0fca5c8e9a | ||
|
|
237f6336ec | ||
|
|
083af60c6f | ||
|
|
f7756886e7 | ||
|
|
6e72df66fc | ||
|
|
2bfcb13976 | ||
|
|
49e0375eee | ||
|
|
4459f4d3be | ||
|
|
c0fe81bd2e | ||
|
|
8cb64d3b70 | ||
|
|
0b154a715c | ||
|
|
05031b2b5a | ||
|
|
2510c8fa28 | ||
|
|
f17d75539c | ||
|
|
82512ef10c | ||
|
|
ad479e53b8 | ||
|
|
a356bfeaff | ||
|
|
dee8e23485 | ||
|
|
1fa0821057 | ||
|
|
b5ecffba81 | ||
|
|
672c9b8652 | ||
|
|
9f73e75f17 | ||
|
|
ef1a8f3e41 | ||
|
|
04f409ef80 | ||
|
|
51c8693dce | ||
|
|
bb572e2468 | ||
|
|
c07fafc0e9 | ||
|
|
595b179d3c | ||
|
|
c865d494a1 | ||
|
|
f4acb2188d | ||
|
|
01d4006c75 | ||
|
|
a7f0f34751 | ||
|
|
b6b1bf9f0e | ||
|
|
5d7a53a2fc | ||
|
|
b32e0ec132 | ||
|
|
6378a36d91 | ||
|
|
0d0fd70a24 | ||
|
|
7c0e9c45d8 | ||
|
|
7b60041529 | ||
|
|
6ffd6282e0 | ||
|
|
c37e7f0d72 | ||
|
|
ca1e593874 | ||
|
|
bfb0f339e2 | ||
|
|
3690337092 | ||
|
|
6c129a1c7a | ||
|
|
2b539c15f7 | ||
|
|
53456cd442 | ||
|
|
e1f4cdd71d | ||
|
|
ab6d2e3c9e | ||
|
|
f69c95a608 | ||
|
|
c103e45076 | ||
|
|
240d722fda | ||
|
|
14f3cd1e16 | ||
|
|
f4cc178dcd | ||
|
|
ad825bd2ba | ||
|
|
151733c8f8 | ||
|
|
544a7081ed | ||
|
|
4b3bde1615 | ||
|
|
b38cef2de2 | ||
|
|
b27da8a61a | ||
|
|
5e4170b0b7 | ||
|
|
b3539d4aa8 | ||
|
|
d09efc4748 | ||
|
|
dc532ff184 | ||
|
|
1fbb2f22f3 | ||
|
|
339815f74c | ||
|
|
fa6dc88faa | ||
|
|
ce344caa72 | ||
|
|
d8aed8065b | ||
|
|
6b83734382 | ||
|
|
2b52d4aa45 | ||
|
|
a515886ad8 | ||
|
|
a7629db518 | ||
|
|
ba336e9c75 | ||
|
|
736771b1c8 | ||
|
|
f9f736bec1 | ||
|
|
535681f3cd | ||
|
|
f283a12a0b | ||
|
|
ac80de9399 | ||
|
|
7eabac2175 | ||
|
|
e870399af1 | ||
|
|
37d567f208 | ||
|
|
7b9e811c99 | ||
|
|
0d97a11015 | ||
|
|
079a2aa64b | ||
|
|
9cdddd2e41 | ||
|
|
26d82e1582 | ||
|
|
c4e73cfbc7 | ||
|
|
2fffeeadf1 | ||
|
|
25155b3029 | ||
|
|
26795c5561 | ||
|
|
5543382d03 | ||
|
|
dc51b8b04c | ||
|
|
cde02be32b | ||
|
|
9213e3e13a | ||
|
|
b41f1f7e6c | ||
|
|
7201c036d5 | ||
|
|
da532d8e13 | ||
|
|
f97ed080e1 | ||
|
|
d67f55c824 | ||
|
|
095d40b688 | ||
|
|
bd6690fed1 | ||
|
|
bfda833bcf | ||
|
|
09345703e6 | ||
|
|
64e4a41710 | ||
|
|
f7b8b2520a | ||
|
|
fad793b18e | ||
|
|
d09d05ae9b | ||
|
|
89ca3b09d9 | ||
|
|
4694c557ec | ||
|
|
33d96bcd4e | ||
|
|
eee43def3b | ||
|
|
f4be9cc596 | ||
|
|
cc89b0aac5 | ||
|
|
9e8e95803f | ||
|
|
df0861ff5c | ||
|
|
706aeab03f | ||
|
|
f850ca80f1 | ||
|
|
608bf1a2ec | ||
|
|
b1f7290c20 | ||
|
|
65d445c293 | ||
|
|
43dbb134b6 | ||
|
|
84b0684d64 | ||
|
|
29b4153b63 | ||
|
|
3f1821f1ac | ||
|
|
4f8bb1be1c | ||
|
|
c2f1e43656 | ||
|
|
914d5cdf87 | ||
|
|
de77c90dd1 | ||
|
|
458ce82644 | ||
|
|
1d145a8690 | ||
|
|
b37acfa31d | ||
|
|
a0522311e2 | ||
|
|
7de9cc699a | ||
|
|
685648957f | ||
|
|
c2260ca709 | ||
|
|
776475265e | ||
|
|
21928f9eb4 | ||
|
|
211f024e49 | ||
|
|
bfdb051705 | ||
|
|
d824cd6516 | ||
|
|
b4f46ad31e | ||
|
|
a8d7f7ecf2 | ||
|
|
2b84e497b5 | ||
|
|
9b408a6e62 | ||
|
|
ecf94490a7 | ||
|
|
881183ed0a | ||
|
|
9389511d2d | ||
|
|
16389fc8a6 | ||
|
|
c7013b2576 | ||
|
|
a82fcc778e | ||
|
|
6dbdf93ca4 | ||
|
|
64eb03ac08 | ||
|
|
227cf54a47 | ||
|
|
107d31e5dc | ||
|
|
04562dcaa1 | ||
|
|
7059852586 | ||
|
|
8b7e9f959b | ||
|
|
19bd05149d | ||
|
|
a3706a1a17 | ||
|
|
5a7c464dea | ||
|
|
6c1b49b5ed | ||
|
|
59860dcfc3 | ||
|
|
b38ce2c56d | ||
|
|
68e6331672 | ||
|
|
188a44ce38 | ||
|
|
5621eb306a | ||
|
|
07a6356836 | ||
|
|
ef4269bbcd | ||
|
|
898d45e4b5 | ||
|
|
01493068e1 | ||
|
|
e44264bb6b | ||
|
|
06355441ea | ||
|
|
9b9da1ba5a | ||
|
|
78fa5e8c07 | ||
|
|
b2d7415a2c | ||
|
|
75d342f145 | ||
|
|
fae08dfb11 | ||
|
|
a0745e2196 | ||
|
|
986619165f | ||
|
|
78b0420e07 | ||
|
|
1eba4f2187 | ||
|
|
6e1315f2ed | ||
|
|
29a776d049 | ||
|
|
da4bfe9827 | ||
|
|
00c391b46c | ||
|
|
f5eb6514e1 | ||
|
|
3f6a3addaa | ||
|
|
8f2113ab0a | ||
|
|
60cf792c23 | ||
|
|
7e87dac15e | ||
|
|
0b15fb7bd2 | ||
|
|
765db2512b | ||
|
|
e14fbea67b | ||
|
|
491f80d2d2 | ||
|
|
2f4953e6c7 | ||
|
|
3f36cb8b43 | ||
|
|
3e57e206c6 | ||
|
|
da0e47528c | ||
|
|
f6aac30f96 | ||
|
|
7d00189f2f | ||
|
|
751150fe64 | ||
|
|
eb2b62b056 | ||
|
|
cc1b0b5464 | ||
|
|
fe7ded7e53 | ||
|
|
5f2ad35d41 | ||
|
|
d688ca490e | ||
|
|
708c983c1e | ||
|
|
9b91016d98 | ||
|
|
b024581906 | ||
|
|
8fd3292cd6 | ||
|
|
e646825c57 | ||
|
|
fdf326108f | ||
|
|
e26561c56a | ||
|
|
9d7c3963c3 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
models/** linguist-vendored
|
||||
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@@ -1,12 +1,2 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
github: k4yt3x
|
||||
patreon: k4yt3x
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
||||
32
.github/ISSUE_TEMPLATE/bug-report.md
vendored
32
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Use this template if you believe you've encountered a bug.
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: K4YT3X
|
||||
|
||||
---
|
||||
|
||||
## Environment Information
|
||||
|
||||
|Module|Version|
|
||||
|-|-|
|
||||
|`Video2X`||
|
||||
|`FFmpeg`||
|
||||
|`waifu2x-caffe`||
|
||||
|`waifu2x-converter-cpp`||
|
||||
|`waifu2x-ncnn-vulkan`||
|
||||
|
||||
## Symptom
|
||||
|
||||
Briefly describe what's going on.
|
||||
|
||||
## Screenshots or Error Messages
|
||||
|
||||
Please paste screenshots or error messages here.
|
||||
Include as much details as you can, as this greatly helps debugging the problem.
|
||||
|
||||
Please paste your error message in the code block down below:
|
||||
|
||||
```
|
||||
```
|
||||
16
.github/ISSUE_TEMPLATE/feature_request.md
vendored
16
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,16 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Request a new feature to be added
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: K4YT3X
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Briefly describe the feature you want to be added into `video2x`.
|
||||
|
||||
## Sources
|
||||
|
||||
Paste links to descriptions of related documentations, websites and etc. here.
|
||||
123
.github/workflows/build.yml
vendored
Normal file
123
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/build.yml"
|
||||
- "include/**"
|
||||
- "src/**"
|
||||
- "tools/**"
|
||||
- "third_party/**"
|
||||
- "CMakeLists.txt"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/build.yml"
|
||||
- "include/**"
|
||||
- "src/**"
|
||||
- "tools/**"
|
||||
- "third_party/**"
|
||||
- "CMakeLists.txt"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswscale-dev \
|
||||
libvulkan-dev \
|
||||
glslang-tools \
|
||||
libomp-dev \
|
||||
libboost-program-options-dev
|
||||
|
||||
- name: Build Video2X
|
||||
run: |
|
||||
mkdir -p /tmp/build /tmp/install
|
||||
cmake -B /tmp/build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF \
|
||||
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/tmp/install \
|
||||
-DINSTALL_BIN_DESTINATION=. -DINSTALL_INCLUDE_DESTINATION=include \
|
||||
-DINSTALL_LIB_DESTINATION=. -DINSTALL_MODEL_DESTINATION=.
|
||||
cmake --build /tmp/build --config Debug --target install
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: video2x-nightly-linux-amd64
|
||||
path: /tmp/install
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
||||
with:
|
||||
vulkan-query-version: 1.3.204.0
|
||||
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools, SPIRV-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ffmpegVersion = "7.1"
|
||||
$ncnnVersion = "20240820"
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
|
||||
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
|
||||
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
|
||||
|
||||
- name: Build Video2X
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake -S . -B build `
|
||||
-DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
|
||||
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=build/video2x_install
|
||||
cmake --build build --config Debug --parallel --target install
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: video2x-nightly-windows-amd64
|
||||
path: build/video2x_install
|
||||
|
||||
container:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: mr-smithers-excellent/docker-build-push@v5
|
||||
name: Build the Docker image
|
||||
with:
|
||||
registry: ghcr.io
|
||||
dockerfile: packaging/docker/Dockerfile
|
||||
image: video2x
|
||||
tags: latest
|
||||
pushImage: false
|
||||
49
.github/workflows/docs.yml
vendored
Normal file
49
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docs/book/**"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install mdBook
|
||||
run: |
|
||||
version="$(curl https://api.github.com/repos/rust-lang/mdBook/releases/latest | jq -r '.tag_name')"
|
||||
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/$version/mdbook-$version-x86_64-unknown-linux-musl.tar.gz" | tar -xz
|
||||
sudo mv mdbook /usr/local/bin/
|
||||
|
||||
- name: Build Docs with mdBook
|
||||
run: mdbook build -d "$PWD/build/docs/book" docs/book
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: "build/docs/book"
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
52
.github/workflows/issues.yml
vendored
Normal file
52
.github/workflows/issues.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
label_issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Remove all 'state:' labels
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
ISSUE_NUMBER=${{ github.event.issue.number }}
|
||||
REPO=${{ github.repository }}
|
||||
EXISTING_LABELS=$(gh issue view $ISSUE_NUMBER --repo $REPO --json labels --jq '.labels[].name')
|
||||
|
||||
for label in $EXISTING_LABELS; do
|
||||
if [[ $label == state:* ]]; then
|
||||
gh issue edit $ISSUE_NUMBER --remove-label "$label" --repo $REPO
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Add 'state:Backlog' label on issue opened or reopened
|
||||
if: ${{ github.event.action == 'opened' || github.event.action == 'reopened' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
LABEL_NAME="state:Backlog"
|
||||
REPO=${{ github.repository }}
|
||||
ISSUE_NUMBER=${{ github.event.issue.number }}
|
||||
|
||||
if gh label list --repo $REPO | grep -q "$LABEL_NAME"; then
|
||||
gh issue edit $ISSUE_NUMBER --add-label "$LABEL_NAME" --repo $REPO
|
||||
fi
|
||||
|
||||
- name: Add 'state:Done' label on issue closed
|
||||
if: ${{ github.event.action == 'closed' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
LABEL_NAME="state:Done"
|
||||
REPO=${{ github.repository }}
|
||||
ISSUE_NUMBER=${{ github.event.issue.number }}
|
||||
|
||||
if gh label list --repo $REPO | grep -q "$LABEL_NAME"; then
|
||||
gh issue edit $ISSUE_NUMBER --add-label "$LABEL_NAME" --repo $REPO
|
||||
fi
|
||||
69
.github/workflows/nightly.yml
vendored
69
.github/workflows/nightly.yml
vendored
@@ -1,69 +0,0 @@
|
||||
# Name: Video2X Nightly Build
|
||||
# Creator: K4YT3X
|
||||
# Date Created: May 12, 2020
|
||||
# Last Modified: May 28, 2020
|
||||
|
||||
name: Video2X Nightly Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
pip install -U pyinstaller pywin32
|
||||
pip install -U -r requirements-windows.txt
|
||||
- name: Build Video2X CLI
|
||||
run: |
|
||||
pyinstaller --noconfirm --log-level=WARN `
|
||||
--onefile `
|
||||
--add-data="locale;locale" `
|
||||
--add-data="wrappers;wrappers" `
|
||||
--icon="images\video2x.ico" `
|
||||
video2x.py
|
||||
- name: Build Video2X GUI
|
||||
run: |
|
||||
pyinstaller --noconfirm --log-level=WARN `
|
||||
--onefile `
|
||||
--add-data="images;images" `
|
||||
--add-data="locale;locale" `
|
||||
--add-data="video2x_gui.ui;." `
|
||||
--add-data="wrappers;wrappers" `
|
||||
--icon="images\video2x.ico" `
|
||||
video2x_gui.py
|
||||
- name: Build Video2X setup script
|
||||
run: |
|
||||
pyinstaller --noconfirm --log-level=WARN `
|
||||
--onefile `
|
||||
--additional-hooks-dir "pyinstaller\hooks" `
|
||||
--add-data="locale;locale" `
|
||||
--add-data="pyinstaller\7z1900-extra;7z" `
|
||||
--icon="images\video2x.ico" `
|
||||
video2x_setup.py
|
||||
- name: Collect artifacts into folder
|
||||
run: |
|
||||
New-Item "video2x-nightly-win32-light\" -ItemType Directory
|
||||
Copy-Item "dist\video2x.exe" -Destination "video2x-nightly-win32-light\"
|
||||
Copy-Item "dist\video2x_gui.exe" -Destination "video2x-nightly-win32-light\"
|
||||
Copy-Item "dist\video2x_setup.exe" -Destination "video2x-nightly-win32-light\"
|
||||
Copy-Item "video2x.yaml" -Destination "video2x-nightly-win32-light\"
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: video2x-nightly-win32-light
|
||||
path: src/video2x-nightly-win32-light/
|
||||
165
.github/workflows/release.yml
vendored
Normal file
165
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: Setup
|
||||
if: github.event.base_ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
steps:
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo version=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
|
||||
|
||||
ubuntu-2404:
|
||||
# GitHub Actions' ubuntu-24.04 runner does not have enough RAM
|
||||
if: false
|
||||
name: Build Ubuntu 24.04 release
|
||||
needs:
|
||||
- setup
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswscale-dev \
|
||||
libvulkan-dev \
|
||||
glslang-tools \
|
||||
libomp-dev \
|
||||
libboost-program-options-dev
|
||||
|
||||
- name: Build Video2X
|
||||
run: |
|
||||
cmake -B build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DSPDLOG_NO_EXCEPTIONS=ON \
|
||||
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/video2x-linux-ubuntu-2404-amd64/usr
|
||||
cmake --build build --config Release --target install --parallel
|
||||
mkdir -p build/video2x-linux-ubuntu-2404-amd64/DEBIAN
|
||||
cp packaging/debian/control build/video2x-linux-ubuntu-2404-amd64/DEBIAN/control
|
||||
dpkg-deb --build build/video2x-linux-ubuntu-2404-amd64
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: video2x-linux-ubuntu-2404-amd64
|
||||
path: build/video2x-linux-ubuntu-2404-amd64.deb
|
||||
|
||||
windows:
|
||||
# Disabled because it takes too long to build
|
||||
if: false
|
||||
name: Build Windows release
|
||||
needs:
|
||||
- setup
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
||||
with:
|
||||
vulkan-query-version: 1.3.204.0
|
||||
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools, SPIRV-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ffmpegVersion = "7.1"
|
||||
$ncnnVersion = "20240820"
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
|
||||
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
|
||||
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
|
||||
|
||||
- name: Build Video2X
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake -S . -B build `
|
||||
-DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/video2x_install
|
||||
cmake --build build --config Release --parallel --target install
|
||||
|
||||
- name: Compress artifacts
|
||||
run: |
|
||||
Compress-Archive -Path build/video2x_install/* -DestinationPath build/video2x-windows-amd64.zip
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: video2x-windows-amd64
|
||||
path: build/video2x-windows-amd64.zip
|
||||
|
||||
container:
|
||||
name: Build and upload container
|
||||
needs:
|
||||
- setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: mr-smithers-excellent/docker-build-push@v5
|
||||
name: Build & push the Docker image
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USER }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
dockerfile: packaging/docker/Dockerfile
|
||||
image: video2x
|
||||
tags: latest, ${{ needs.setup.outputs.version }}
|
||||
|
||||
create-release:
|
||||
name: Create release
|
||||
needs:
|
||||
- setup
|
||||
# - ubuntu-2404
|
||||
# - windows
|
||||
- container
|
||||
runs-on: ubuntu-latest
|
||||
# outputs:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
steps:
|
||||
# - name: Download artifacts
|
||||
# uses: actions/download-artifact@v4
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: ${{ needs.setup.outputs.version }}
|
||||
name: ${{ needs.setup.outputs.version }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
158
.gitignore
vendored
158
.gitignore
vendored
@@ -1,107 +1,77 @@
|
||||
# PyCharm
|
||||
.idea/
|
||||
# Data files
|
||||
data/
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
# Built-binaries
|
||||
bin/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
# Object files
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
# Linker output
|
||||
*.ilk
|
||||
*.map
|
||||
*.exp
|
||||
|
||||
# Translations
|
||||
#*.mo
|
||||
#*.pot
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
#*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
*.su
|
||||
*.idb
|
||||
*.pdb
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
# Kernel Module Compile Results
|
||||
#*.mod*
|
||||
*.cmd
|
||||
.tmp_versions/
|
||||
modules.order
|
||||
Module.symvers
|
||||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
# clang tooling compilation databases
|
||||
.cache/
|
||||
*.plist
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
# CMake
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
CMakeUserPresets.json
|
||||
|
||||
18
.gitmodules
vendored
Normal file
18
.gitmodules
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
[submodule "third_party/ncnn"]
|
||||
path = third_party/ncnn
|
||||
url = https://github.com/Tencent/ncnn.git
|
||||
[submodule "third_party/spdlog"]
|
||||
path = third_party/spdlog
|
||||
url = https://github.com/gabime/spdlog.git
|
||||
[submodule "third_party/boost"]
|
||||
path = third_party/boost
|
||||
url = https://github.com/boostorg/boost.git
|
||||
[submodule "third_party/librealesrgan_ncnn_vulkan"]
|
||||
path = third_party/librealesrgan_ncnn_vulkan
|
||||
url = https://github.com/k4yt3x/librealesrgan-ncnn-vulkan.git
|
||||
[submodule "third_party/librealcugan_ncnn_vulkan"]
|
||||
path = third_party/librealcugan_ncnn_vulkan
|
||||
url = https://github.com/k4yt3x/librealcugan-ncnn-vulkan.git
|
||||
[submodule "third_party/librife_ncnn_vulkan"]
|
||||
path = third_party/librife_ncnn_vulkan
|
||||
url = https://github.com/k4yt3x/librife-ncnn-vulkan.git
|
||||
94
CHANGELOG.md
Normal file
94
CHANGELOG.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [6.3.0] - 2024-12-20
|
||||
|
||||
### Added
|
||||
|
||||
- A logger manager to provide unified logging across the application.
|
||||
- Support for Real-CUGAN ncnn Vulkan (#1198).
|
||||
- (Video2X Qt6) A check to ensure the required VC++ Redistributable version is installed.
|
||||
- (Video2X Qt6) A configuration manager to save user preferences like the last selected language.
|
||||
- (Video2X Qt6) A new logging widget to display logs in the UI.
|
||||
- (Video2X Qt6) Custom options `crf=20` and `preset=slow` to the default encoder options.
|
||||
- (Video2X Qt6) French translation.
|
||||
- (Video2X Qt6) The ability to check for available updates and prompt the user to update.
|
||||
- (Video2X Qt6) Tooltips for processor and encoder options.
|
||||
|
||||
### Changed
|
||||
|
||||
- Improve optimization flags and add namespaces for better code organization.
|
||||
- (Video2X Qt6) Add processor names to processed videos instead of `.processed`.
|
||||
- (Video2X Qt6) The output video suffix from auto-generated to `.mkv`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make the encoder always use the calculated PTS with corrected math.
|
||||
- (Video2X Qt6) The issue where task configs are being restored incorrectly in the UI.
|
||||
|
||||
## [6.2.0] - 2024-12-11
|
||||
|
||||
### Added
|
||||
|
||||
- Automatic selection of the most suitable pixel format for the output video.
|
||||
- Frame interpolation processing mode.
|
||||
- More `AVCodecContext` options.
|
||||
- Support for RIFE ncnn Vulkan.
|
||||
- Support for specifying arbitrary `AVOptions` for the encoder (#1232).
|
||||
- (Video2X Qt6) Visual C++ Redistributable version check to the installer.
|
||||
|
||||
### Changed
|
||||
|
||||
- Improve CLI argument validation.
|
||||
- Improve error handling and error messages.
|
||||
- Improve the CLI help message structure and clarity.
|
||||
- (Video2X Qt6) Improve the UI with a complete redesign.
|
||||
|
||||
### Removed
|
||||
|
||||
- The C API for easier maintenance and development.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Timestamp errors processing frames with PTS equal to 0 (#1222).
|
||||
|
||||
## [6.1.1] - 2024-11-07
|
||||
|
||||
### Added
|
||||
|
||||
- Time remaining, and processing speed to the status bar.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Stream mapping for cases where the video stream is not the first stream in the input file (#1217).
|
||||
- The encoder using the wrong color space for the output video.
|
||||
|
||||
## [6.1.0] - 2024-11-04
|
||||
|
||||
### Added
|
||||
|
||||
- A better timer that gets paused when the processing is paused.
|
||||
- Detection for the validity of the provided GPU ID.
|
||||
- The `--listgpus` option to list available Vulkan GPU devices.
|
||||
- Vulkan device selection for libplacebo.
|
||||
- (Video2X Qt6) Status bar and processing statistics.
|
||||
|
||||
### Changed
|
||||
|
||||
- Automatically detect if options `colorspace` and `range` are supported by the buffer filter.
|
||||
- Resource file missing error messages.
|
||||
- Rewritten the CLI with C++.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wide character string paths support on Windows systems without UTF-8 support enabled (#1201).
|
||||
|
||||
## [6.0.0] - 2024-10-29
|
||||
|
||||
### Added
|
||||
|
||||
- The initial release of the 6.0.0 version of Video2X.
|
||||
16
CITATION.cff
Normal file
16
CITATION.cff
Normal file
@@ -0,0 +1,16 @@
|
||||
cff-version: 1.2.0
|
||||
title: Video2X
|
||||
abstract: >-
|
||||
Video2X is a A machine learning-based video super resolution and frame interpolation framework.
|
||||
message: Please cite this software using these metadata.
|
||||
type: software
|
||||
authors:
|
||||
- name: K4YT3X
|
||||
date-released: 2018-02-24
|
||||
url: https://video2x.org
|
||||
repository-code: https://github.com/k4yt3x/video2x
|
||||
license: AGPL-3.0
|
||||
keywords:
|
||||
- machine learning
|
||||
- super resolution
|
||||
- frame interpolation
|
||||
439
CMakeLists.txt
Normal file
439
CMakeLists.txt
Normal file
@@ -0,0 +1,439 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(video2x VERSION 6.3.0 LANGUAGES CXX)
|
||||
|
||||
# The FindBoost module is removed in CMake 3.30
|
||||
if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
|
||||
# Set the C++ standard
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Set the default build type to Release if not specified
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
# Set global compile options for all targets
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /permissive-)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic -Wconversion -Wshadow)
|
||||
endif()
|
||||
|
||||
# Set the default optimization flags for Release builds
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/Ox /Ot /GL /DNDEBUG)
|
||||
add_link_options(/LTCG /OPT:REF /OPT:ICF)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
add_compile_options(-O3 -march=native -ffunction-sections -fdata-sections)
|
||||
add_link_options(-Wl,-s -flto -Wl,--gc-sections)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Build options
|
||||
option(BUILD_SHARED_LIBS "Build libvideo2x as a shared library" ON)
|
||||
option(BUILD_VIDEO2X_CLI "Build the video2x executable" ON)
|
||||
option(USE_SYSTEM_NCNN "Use system ncnn library" ON)
|
||||
option(USE_SYSTEM_SPDLOG "Use system spdlog library" ON)
|
||||
option(USE_SYSTEM_BOOST "Use system Boost library" ON)
|
||||
|
||||
# Generate the version header file
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/libvideo2x/version.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libvideo2x/version.h"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Find the required packages
|
||||
set(LIBVIDEO2X_INCLUDE_DIRS)
|
||||
set(LIBVIDEO2X_LIBS)
|
||||
set(VIDEO2X_INCLUDE_DIRS)
|
||||
set(VIDEO2X_LIBS)
|
||||
|
||||
# Platform-specific dependencies
|
||||
if(WIN32)
|
||||
# Define base paths for FFmpeg and ncnn
|
||||
set(FFMPEG_BASE_PATH ${PROJECT_SOURCE_DIR}/third_party/ffmpeg-shared)
|
||||
set(NCNN_BASE_PATH ${PROJECT_SOURCE_DIR}/third_party/ncnn-shared/x64)
|
||||
|
||||
# FFmpeg
|
||||
set(FFMPEG_LIB
|
||||
${FFMPEG_BASE_PATH}/lib/avcodec.lib
|
||||
${FFMPEG_BASE_PATH}/lib/avdevice.lib
|
||||
${FFMPEG_BASE_PATH}/lib/avfilter.lib
|
||||
${FFMPEG_BASE_PATH}/lib/avformat.lib
|
||||
${FFMPEG_BASE_PATH}/lib/avutil.lib
|
||||
${FFMPEG_BASE_PATH}/lib/swscale.lib
|
||||
)
|
||||
list(APPEND LIBVIDEO2X_LIBS ${FFMPEG_LIB})
|
||||
list(APPEND LIBVIDEO2X_INCLUDE_DIRS ${FFMPEG_BASE_PATH}/include)
|
||||
list(APPEND VIDEO2X_LIBS ${FFMPEG_LIB})
|
||||
list(APPEND VIDEO2X_INCLUDE_DIRS ${FFMPEG_BASE_PATH}/include)
|
||||
|
||||
# ncnn
|
||||
set(SPIRV_BUILD_PATH
|
||||
${CMAKE_BINARY_DIR}/realesrgan-prefix/src/realesrgan-build/ncnn/glslang/SPIRV
|
||||
)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(SPIRV_LIB ${SPIRV_BUILD_PATH}/Release/SPIRV.lib)
|
||||
else()
|
||||
set(SPIRV_LIB ${SPIRV_BUILD_PATH}/Debug/SPIRVd.lib)
|
||||
endif()
|
||||
|
||||
list(APPEND LIBVIDEO2X_LIBS ${NCNN_BASE_PATH}/lib/ncnn.lib ${SPIRV_LIB})
|
||||
list(APPEND LIBVIDEO2X_INCLUDE_DIRS ${NCNN_BASE_PATH}/include/ncnn)
|
||||
else()
|
||||
# FFmpeg
|
||||
find_package(PkgConfig REQUIRED)
|
||||
set(FFMPEG_REQUIRED_PKGS
|
||||
libavcodec
|
||||
libavdevice
|
||||
libavfilter
|
||||
libavformat
|
||||
libavutil
|
||||
libswscale
|
||||
)
|
||||
|
||||
# Loop through each package to find and collect include dirs and libraries
|
||||
foreach(PKG ${FFMPEG_REQUIRED_PKGS})
|
||||
pkg_check_modules(${PKG} REQUIRED ${PKG})
|
||||
list(APPEND LIBVIDEO2X_INCLUDE_DIRS ${${PKG}_INCLUDE_DIRS})
|
||||
list(APPEND LIBVIDEO2X_LIBS ${${PKG}_LIBRARIES})
|
||||
list(APPEND VIDEO2X_INCLUDE_DIRS ${${PKG}_INCLUDE_DIRS})
|
||||
list(APPEND VIDEO2X_LIBS ${${PKG}_LIBRARIES})
|
||||
endforeach()
|
||||
endif() # WIN32
|
||||
|
||||
# Find ncnn package
|
||||
if(USE_SYSTEM_NCNN)
|
||||
find_package(ncnn REQUIRED)
|
||||
else()
|
||||
option(NCNN_INSTALL_SDK "" OFF)
|
||||
option(NCNN_PIXEL_ROTATE "" OFF)
|
||||
option(NCNN_VULKAN "" ON)
|
||||
option(NCNN_VULKAN_ONLINE_SPIRV "" ON)
|
||||
option(NCNN_BUILD_BENCHMARK "" OFF)
|
||||
option(NCNN_BUILD_TESTS "" OFF)
|
||||
option(NCNN_BUILD_TOOLS "" OFF)
|
||||
option(NCNN_BUILD_EXAMPLES "" OFF)
|
||||
option(NCNN_DISABLE_RTTI "" ON)
|
||||
option(NCNN_DISABLE_EXCEPTION "" ON)
|
||||
option(NCNN_BUILD_SHARED_LIBS "" OFF)
|
||||
option(SKIP_GLSLANG_INSTALL "" ON)
|
||||
|
||||
option(WITH_LAYER_absval "" OFF)
|
||||
option(WITH_LAYER_argmax "" OFF)
|
||||
option(WITH_LAYER_batchnorm "" OFF)
|
||||
option(WITH_LAYER_bias "" OFF)
|
||||
option(WITH_LAYER_bnll "" OFF)
|
||||
option(WITH_LAYER_concat "" ON)
|
||||
option(WITH_LAYER_convolution "" ON)
|
||||
option(WITH_LAYER_crop "" ON)
|
||||
option(WITH_LAYER_deconvolution "" OFF)
|
||||
option(WITH_LAYER_dropout "" OFF)
|
||||
option(WITH_LAYER_eltwise "" ON)
|
||||
option(WITH_LAYER_elu "" OFF)
|
||||
option(WITH_LAYER_embed "" OFF)
|
||||
option(WITH_LAYER_exp "" OFF)
|
||||
option(WITH_LAYER_flatten "" ON)
|
||||
option(WITH_LAYER_innerproduct "" ON)
|
||||
option(WITH_LAYER_input "" ON)
|
||||
option(WITH_LAYER_log "" OFF)
|
||||
option(WITH_LAYER_lrn "" OFF)
|
||||
option(WITH_LAYER_memorydata "" OFF)
|
||||
option(WITH_LAYER_mvn "" OFF)
|
||||
option(WITH_LAYER_pooling "" OFF)
|
||||
option(WITH_LAYER_power "" OFF)
|
||||
option(WITH_LAYER_prelu "" ON)
|
||||
option(WITH_LAYER_proposal "" OFF)
|
||||
option(WITH_LAYER_reduction "" OFF)
|
||||
option(WITH_LAYER_relu "" ON)
|
||||
option(WITH_LAYER_reshape "" OFF)
|
||||
option(WITH_LAYER_roipooling "" OFF)
|
||||
option(WITH_LAYER_scale "" OFF)
|
||||
option(WITH_LAYER_sigmoid "" OFF)
|
||||
option(WITH_LAYER_slice "" OFF)
|
||||
option(WITH_LAYER_softmax "" OFF)
|
||||
option(WITH_LAYER_split "" ON)
|
||||
option(WITH_LAYER_spp "" OFF)
|
||||
option(WITH_LAYER_tanh "" OFF)
|
||||
option(WITH_LAYER_threshold "" OFF)
|
||||
option(WITH_LAYER_tile "" OFF)
|
||||
option(WITH_LAYER_rnn "" OFF)
|
||||
option(WITH_LAYER_lstm "" OFF)
|
||||
option(WITH_LAYER_binaryop "" ON)
|
||||
option(WITH_LAYER_unaryop "" OFF)
|
||||
option(WITH_LAYER_convolutiondepthwise "" OFF)
|
||||
option(WITH_LAYER_padding "" ON)
|
||||
option(WITH_LAYER_squeeze "" OFF)
|
||||
option(WITH_LAYER_expanddims "" OFF)
|
||||
option(WITH_LAYER_normalize "" OFF)
|
||||
option(WITH_LAYER_permute "" OFF)
|
||||
option(WITH_LAYER_priorbox "" OFF)
|
||||
option(WITH_LAYER_detectionoutput "" OFF)
|
||||
option(WITH_LAYER_interp "" ON)
|
||||
option(WITH_LAYER_deconvolutiondepthwise "" OFF)
|
||||
option(WITH_LAYER_shufflechannel "" OFF)
|
||||
option(WITH_LAYER_instancenorm "" OFF)
|
||||
option(WITH_LAYER_clip "" OFF)
|
||||
option(WITH_LAYER_reorg "" OFF)
|
||||
option(WITH_LAYER_yolodetectionoutput "" OFF)
|
||||
option(WITH_LAYER_quantize "" OFF)
|
||||
option(WITH_LAYER_dequantize "" OFF)
|
||||
option(WITH_LAYER_yolov3detectionoutput "" OFF)
|
||||
option(WITH_LAYER_psroipooling "" OFF)
|
||||
option(WITH_LAYER_roialign "" OFF)
|
||||
option(WITH_LAYER_packing "" ON)
|
||||
option(WITH_LAYER_requantize "" OFF)
|
||||
option(WITH_LAYER_cast "" ON)
|
||||
option(WITH_LAYER_hardsigmoid "" OFF)
|
||||
option(WITH_LAYER_selu "" OFF)
|
||||
option(WITH_LAYER_hardswish "" OFF)
|
||||
option(WITH_LAYER_noop "" OFF)
|
||||
option(WITH_LAYER_pixelshuffle "" ON)
|
||||
option(WITH_LAYER_deepcopy "" OFF)
|
||||
option(WITH_LAYER_mish "" OFF)
|
||||
option(WITH_LAYER_statisticspooling "" OFF)
|
||||
option(WITH_LAYER_swish "" OFF)
|
||||
option(WITH_LAYER_gemm "" OFF)
|
||||
option(WITH_LAYER_groupnorm "" OFF)
|
||||
option(WITH_LAYER_layernorm "" OFF)
|
||||
option(WITH_LAYER_softplus "" OFF)
|
||||
|
||||
add_subdirectory(third_party/ncnn)
|
||||
endif()
|
||||
|
||||
# spdlog
|
||||
if(USE_SYSTEM_SPDLOG)
|
||||
find_package(spdlog REQUIRED)
|
||||
list(APPEND LIBVIDEO2X_INCLUDE_DIRS ${spdlog_INCLUDE_DIRS})
|
||||
list(APPEND VIDEO2X_INCLUDE_DIRS ${spdlog_INCLUDE_DIRS})
|
||||
set(SPDLOG_LIB spdlog::spdlog)
|
||||
else()
|
||||
add_subdirectory(third_party/spdlog)
|
||||
set(SPDLOG_LIB spdlog::spdlog_header_only)
|
||||
endif()
|
||||
list(APPEND LIBVIDEO2X_LIBS ${SPDLOG_LIB})
|
||||
list(APPEND VIDEO2X_LIBS ${SPDLOG_LIB})
|
||||
|
||||
# Find dependencies required for the CLI
|
||||
if(BUILD_VIDEO2X_CLI)
|
||||
# Vulkan
|
||||
find_package(Vulkan REQUIRED)
|
||||
list(APPEND VIDEO2X_LIBS Vulkan::Vulkan)
|
||||
|
||||
# Boost
|
||||
if(USE_SYSTEM_BOOST)
|
||||
find_package(Boost REQUIRED COMPONENTS program_options)
|
||||
list(APPEND LIBVIDEO2X_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
|
||||
else()
|
||||
option(Boost_USE_STATIC_LIBS "" ON)
|
||||
option(Boost_USE_STATIC_RUNTIME "" ON)
|
||||
option(Boost_COMPONENTS "program_options")
|
||||
|
||||
add_subdirectory(third_party/boost)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/third_party/boost/libs/program_options/include)
|
||||
set(BOOST_BASE_PATH
|
||||
${CMAKE_BINARY_DIR}/third_party/boost/libs/program_options/${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
endif()
|
||||
list(APPEND VIDEO2X_LIBS Boost::program_options)
|
||||
endif()
|
||||
|
||||
# Include ExternalProject module
|
||||
include(ExternalProject)
|
||||
|
||||
# Add librealesrgan-ncnn-vulkan as an external project
|
||||
ExternalProject_Add(
|
||||
realesrgan
|
||||
SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/librealesrgan_ncnn_vulkan/src
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/realesrgan_install
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DUSE_SYSTEM_NCNN=${USE_SYSTEM_NCNN}
|
||||
BUILD_ALWAYS ON
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
# Add librealcugan-ncnn-vulkan as an external project
|
||||
ExternalProject_Add(
|
||||
realcugan
|
||||
SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/librealcugan_ncnn_vulkan/src
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/realcugan_install
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DUSE_SYSTEM_NCNN=${USE_SYSTEM_NCNN}
|
||||
BUILD_ALWAYS ON
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
# Add librife-ncnn-vulkan as an external project
|
||||
ExternalProject_Add(
|
||||
rife
|
||||
SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/librife_ncnn_vulkan/src
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/rife_install
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DUSE_SYSTEM_NCNN=${USE_SYSTEM_NCNN}
|
||||
BUILD_ALWAYS ON
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
# Remove duplicate entries
|
||||
list(REMOVE_DUPLICATES LIBVIDEO2X_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES LIBVIDEO2X_LIBS)
|
||||
list(REMOVE_DUPLICATES VIDEO2X_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES VIDEO2X_LIBS)
|
||||
|
||||
# Create the shared library 'libvideo2x'
|
||||
file(GLOB LIBVIDEO2X_SOURCES src/*.cpp)
|
||||
add_library(libvideo2x ${LIBVIDEO2X_SOURCES})
|
||||
target_compile_definitions(libvideo2x PRIVATE LIBVIDEO2X_EXPORTS)
|
||||
if(WIN32)
|
||||
set_target_properties(libvideo2x PROPERTIES OUTPUT_NAME libvideo2x)
|
||||
else()
|
||||
set_target_properties(libvideo2x PROPERTIES OUTPUT_NAME video2x)
|
||||
endif()
|
||||
|
||||
# Ensure that the shared library is built after the external projects
|
||||
add_dependencies(libvideo2x realesrgan realcugan rife)
|
||||
|
||||
# Include directories for the shared library
|
||||
target_include_directories(libvideo2x PRIVATE
|
||||
${LIBVIDEO2X_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/include/libvideo2x
|
||||
${PROJECT_SOURCE_DIR}/third_party/librealesrgan_ncnn_vulkan/src
|
||||
${PROJECT_SOURCE_DIR}/third_party/librealcugan_ncnn_vulkan/src
|
||||
${PROJECT_SOURCE_DIR}/third_party/librife_ncnn_vulkan/src
|
||||
)
|
||||
|
||||
# Compile options for the shared library
|
||||
target_compile_options(libvideo2x PRIVATE -fPIC $<$<CONFIG:Debug>:-g -DDEBUG>)
|
||||
|
||||
# Define the paths to the shared libraries
|
||||
if(WIN32)
|
||||
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.lib)
|
||||
set(REALCUGAN_LIB ${CMAKE_BINARY_DIR}/realcugan_install/lib/librealcugan-ncnn-vulkan.lib)
|
||||
set(RIFE_LIB ${CMAKE_BINARY_DIR}/rife_install/lib/librife-ncnn-vulkan.lib)
|
||||
else()
|
||||
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.so)
|
||||
set(REALCUGAN_LIB ${CMAKE_BINARY_DIR}/realcugan_install/lib/librealcugan-ncnn-vulkan.so)
|
||||
set(RIFE_LIB ${CMAKE_BINARY_DIR}/rife_install/lib/librife-ncnn-vulkan.so)
|
||||
endif()
|
||||
list(APPEND LIBVIDEO2X_LIBS ${REALESRGAN_LIB} ${REALCUGAN_LIB} ${RIFE_LIB})
|
||||
|
||||
# Link the shared library with the dependencies
|
||||
target_link_libraries(libvideo2x PRIVATE ${LIBVIDEO2X_LIBS})
|
||||
|
||||
if(NOT WIN32)
|
||||
if(USE_SYSTEM_NCNN)
|
||||
target_link_libraries(libvideo2x PUBLIC ncnn)
|
||||
else()
|
||||
target_link_libraries(libvideo2x PRIVATE ncnn)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create the executable 'video2x'
|
||||
if(BUILD_VIDEO2X_CLI)
|
||||
file(GLOB VIDEO2X_SOURCES tools/video2x/src/*.cpp)
|
||||
add_executable(video2x ${VIDEO2X_SOURCES})
|
||||
set_target_properties(video2x PROPERTIES OUTPUT_NAME video2x)
|
||||
|
||||
# Include directories for the executable
|
||||
target_include_directories(video2x PRIVATE
|
||||
${VIDEO2X_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/tools/video2x/include
|
||||
)
|
||||
|
||||
# Compile options for the executable
|
||||
target_compile_options(video2x PRIVATE $<$<CONFIG:Debug>:-g -DDEBUG>)
|
||||
|
||||
# Link the executable with the shared library
|
||||
target_link_libraries(video2x PRIVATE libvideo2x ${VIDEO2X_LIBS})
|
||||
endif()
|
||||
|
||||
# Define the default installation directories
|
||||
if(WIN32)
|
||||
set(BIN_DESTINATION_DEFAULT ".")
|
||||
set(INCLUDE_DESTINATION_DEFAULT "include/libvideo2x")
|
||||
set(LIB_DESTINATION_DEFAULT ".")
|
||||
set(MODEL_DESTINATION_DEFAULT ".")
|
||||
else()
|
||||
set(BIN_DESTINATION_DEFAULT "bin")
|
||||
set(INCLUDE_DESTINATION_DEFAULT "include/libvideo2x")
|
||||
set(LIB_DESTINATION_DEFAULT "lib")
|
||||
set(MODEL_DESTINATION_DEFAULT "share/video2x")
|
||||
endif()
|
||||
|
||||
# Set the installation directories
|
||||
set(INSTALL_BIN_DESTINATION ${BIN_DESTINATION_DEFAULT} CACHE STRING "")
|
||||
set(INSTALL_INCLUDE_DESTINATION ${INCLUDE_DESTINATION_DEFAULT} CACHE STRING "")
|
||||
set(INSTALL_LIB_DESTINATION ${LIB_DESTINATION_DEFAULT} CACHE STRING "")
|
||||
set(INSTALL_MODEL_DESTINATION ${MODEL_DESTINATION_DEFAULT} CACHE STRING "")
|
||||
|
||||
# Common installation rules for libvideo2x and models
|
||||
install(TARGETS libvideo2x
|
||||
LIBRARY DESTINATION ${INSTALL_LIB_DESTINATION}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
ARCHIVE DESTINATION ${INSTALL_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${INSTALL_BIN_DESTINATION}
|
||||
)
|
||||
|
||||
# Install model files
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/models DESTINATION ${INSTALL_MODEL_DESTINATION})
|
||||
|
||||
# Install the executable if BUILD_VIDEO2X_CLI is enabled
|
||||
if(BUILD_VIDEO2X_CLI)
|
||||
install(TARGETS video2x RUNTIME DESTINATION ${INSTALL_BIN_DESTINATION})
|
||||
endif()
|
||||
|
||||
# Install the header files
|
||||
file(GLOB HEADER_FILES ${PROJECT_SOURCE_DIR}/include/libvideo2x/*.h)
|
||||
install(FILES
|
||||
${HEADER_FILES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libvideo2x/version.h
|
||||
DESTINATION ${INSTALL_INCLUDE_DESTINATION}
|
||||
)
|
||||
|
||||
# Platform-specific installation rules
|
||||
if(WIN32)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(BOOST_DLL_PATH ${BOOST_BASE_PATH}/boost_program_options-vc143-mt-x64-1_86.dll)
|
||||
else()
|
||||
set(BOOST_DLL_PATH ${BOOST_BASE_PATH}/boost_program_options-vc143-mt-gd-x64-1_86.dll)
|
||||
endif()
|
||||
|
||||
file(GLOB FFMPEG_DLLS "${FFMPEG_BASE_PATH}/bin/*.dll")
|
||||
install(FILES
|
||||
${CMAKE_BINARY_DIR}/realesrgan_install/bin/librealesrgan-ncnn-vulkan.dll
|
||||
${CMAKE_BINARY_DIR}/realcugan_install/bin/librealcugan-ncnn-vulkan.dll
|
||||
${CMAKE_BINARY_DIR}/rife_install/bin/librife-ncnn-vulkan.dll
|
||||
${FFMPEG_DLLS}
|
||||
${NCNN_BASE_PATH}/bin/ncnn.dll
|
||||
${BOOST_DLL_PATH}
|
||||
DESTINATION ${INSTALL_BIN_DESTINATION}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
else()
|
||||
install(FILES ${REALESRGAN_LIB} ${REALCUGAN_LIB} ${RIFE_LIB}
|
||||
DESTINATION ${INSTALL_LIB_DESTINATION}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
endif()
|
||||
20
CODE_OF_CONDUCT.md
Normal file
20
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Our Goal
|
||||
|
||||
Our goal is to create a respectful and inclusive environment for everyone involved in our project.
|
||||
|
||||
## Our Standards
|
||||
|
||||
- **Respect Others**: Treat everyone with respect, regardless of their background or beliefs.
|
||||
- **Resolve Peacefully**: Address disagreements constructively and aim for peaceful resolutions.
|
||||
- **Report Problems**: If you witness or experience any issues, report them to [github@k4yt3x.com](mailto:github@k4yt3x.com).
|
||||
|
||||
## Enforcement
|
||||
|
||||
- **Confidentiality**: Reports will be handled confidentially.
|
||||
- **Action**: The project team will review and address reported issues promptly and appropriately.
|
||||
|
||||
## Contact
|
||||
|
||||
For any questions or concerns, please contact us at [github@k4yt3x.com](mailto:github@k4yt3x.com).
|
||||
193
Dockerfile
193
Dockerfile
@@ -1,193 +0,0 @@
|
||||
# Name: Video2X Dockerfile
|
||||
# Creator: Danielle Douglas
|
||||
# Date Created: Unknown
|
||||
# Last Modified: January 14, 2020
|
||||
|
||||
# Editor: Lhanjian
|
||||
# Last Modified: May 24, 2020
|
||||
|
||||
# Editor: K4YT3X
|
||||
# Last Modified: May 29, 2020
|
||||
|
||||
FROM ubuntu:19.10
|
||||
#FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
||||
|
||||
LABEL maintainer="Danielle Douglas <ddouglas87@gmail.com>"
|
||||
LABEL maintainer="Lhanjian <lhjay1@foxmail.com>"
|
||||
LABEL maintainer="K4YT3X <k4yt3x@k4yt3x.com>"
|
||||
|
||||
# Don't ask questions during image setup.
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV NASM_VERSION 2.14
|
||||
ENV NVCODEC_VERSION 8.2.15.6
|
||||
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
|
||||
ENV FFMPEG_VERSION 4.1.2
|
||||
|
||||
# Install apt-fast, because we got gigs to download.
|
||||
RUN apt-get update && apt-get install -y apt-utils &&\
|
||||
apt-get install -y --no-install-recommends software-properties-common &&\
|
||||
add-apt-repository ppa:apt-fast/stable &&\
|
||||
add-apt-repository -y ppa:graphics-drivers/ppa &&\
|
||||
apt-get install -y --no-install-recommends apt-fast && apt-fast update
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-fast install -y --no-install-recommends git-core python3-pip python3-setuptools python3-wheel python3-psutil ffmpeg gcc g++ \
|
||||
libc6-dev python3-dev libmagic-dev libmagic1 python3.8 nvidia-driver-440 nvidia-cuda-toolkit gnupg2 curl ca-certificates pkg-config \
|
||||
autoconf libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev libass-dev libfreetype6-dev libgnutls28-dev \
|
||||
libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev texinfo wget yasm zlib1g-dev \
|
||||
libass-dev libfreetype6-dev libsdl2-dev p11-kit libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev \
|
||||
pkg-config texinfo wget zlib1g-dev libchromaprint-dev frei0r-plugins-dev gnutls-dev ladspa-sdk libcaca-dev libcdio-paranoia-dev libcodec2-dev \
|
||||
libfontconfig1-dev libfreetype6-dev libfribidi-dev libgme-dev libgsm1-dev libjack-dev libmodplug-dev libmp3lame-dev libopencore-amrnb-dev \
|
||||
libopencore-amrwb-dev libopenjp2-7-dev libopenmpt-dev libopus-dev libpulse-dev librsvg2-dev librubberband-dev librtmp-dev libshine-dev \
|
||||
libsmbclient-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-dev libtesseract-dev libtheora-dev libtwolame-dev libv4l-dev libvo-amrwbenc-dev \
|
||||
libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev libxvidcore-dev libxml2-dev libzmq3-dev libzvbi-dev liblilv-dev \
|
||||
libopenal-dev opencl-dev libjack-dev libbluray-dev libfdk-aac-dev libmysofa-dev
|
||||
|
||||
# Install MASM
|
||||
RUN curl -vfsSLO https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/nasm-$NASM_VERSION.tar.bz2 \
|
||||
&& tar -xjf nasm-$NASM_VERSION.tar.bz2 \
|
||||
&& cd nasm-$NASM_VERSION \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& make install
|
||||
|
||||
# Compile FFmpeg with CUDA support
|
||||
|
||||
RUN git clone --recurse-submodules -b n$NVCODEC_VERSION --depth 1 https://git.videolan.org/git/ffmpeg/nv-codec-headers \
|
||||
&& cd nv-codec-headers \
|
||||
&& make install
|
||||
|
||||
RUN curl -vfsSLO https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 \
|
||||
&& tar -xjf ffmpeg-$FFMPEG_VERSION.tar.bz2 \
|
||||
&& cd ffmpeg-$FFMPEG_VERSION \
|
||||
&& ./configure --enable-cuda-sdk --enable-cuvid --enable-nonfree --enable-libnpp --enable-nvenc \
|
||||
--enable-gpl --enable-version3 \
|
||||
--enable-small --enable-avisynth --enable-chromaprint \
|
||||
--enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa \
|
||||
--enable-libass --enable-libcaca --enable-libcdio \
|
||||
--enable-libcodec2 --enable-libfontconfig --enable-libfreetype \
|
||||
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack \
|
||||
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb \
|
||||
--enable-libopencore-amrwb --enable-libopencore-amrwb \
|
||||
--enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse \
|
||||
--enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine \
|
||||
--enable-libsnappy --enable-libsoxr --enable-libspeex \
|
||||
--enable-libssh --enable-libtesseract --enable-libtheora \
|
||||
--enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc \
|
||||
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp \
|
||||
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 \
|
||||
--enable-libzmq --enable-libzvbi --enable-lv2 \
|
||||
--enable-libmysofa \
|
||||
--enable-openal --enable-opencl --enable-opengl --enable-libdrm \
|
||||
--enable-libfdk-aac --enable-libbluray \
|
||||
&& make -j$(nproc) \
|
||||
&& make install
|
||||
|
||||
# Install Video2X
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
|
||||
RUN cd / && python3.8 -m pip install --upgrade pip &&\
|
||||
git clone --recurse-submodules --progress https://github.com/k4yt3x/video2x.git --depth=1 &&\
|
||||
python3.8 -m pip install -U -r video2x/src/requirements-linux.txt
|
||||
|
||||
# Compile drivers
|
||||
|
||||
# example: docker build -t video2x . --build-arg driver=waifu2x_ncnn_vulkan
|
||||
ARG driver=all
|
||||
|
||||
# Check if driver exists.
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN drivers=(all waifu2x_caffe waifu2x_converter waifu2x_ncnn_vulkan) &&\
|
||||
case ${drivers[@]} in (*${driver,,}*) true ;; (*)\
|
||||
echo "ERROR: Unrecognized driver." >&2 &&\
|
||||
printf "%s " "Choices are: ${drivers[@]}" >&2 | printf "\n" >&2 &&\
|
||||
exit 1 ;;\
|
||||
esac
|
||||
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_caffe" ] ; then \
|
||||
# nagadomi/caffe prerequisites
|
||||
apt-fast update &&\
|
||||
apt-fast install -y --no-install-recommends build-essential cmake libboost-system-dev libboost-thread-dev libboost-filesystem-dev libboost-chrono-dev libboost-date-time-dev libboost-atomic-dev libboost-python-dev libprotobuf-dev protobuf-compiler libhdf5-dev liblmdb-dev libleveldb-dev libsnappy-dev libopencv-dev libatlas-base-dev python-numpy libgflags-dev libgoogle-glog-dev &&\
|
||||
# nagadomi/waifu2x-caffee-ubuntu prerequisites
|
||||
apt-fast install -y --no-install-recommends libboost-iostreams-dev;\
|
||||
fi
|
||||
# build waifu2x-caffe && install caffe
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_caffe" ] ; then \
|
||||
git clone --recurse-submodules --depth=1 --progress --recurse-submodules https://github.com/nagadomi/waifu2x-caffe-ubuntu.git &&\
|
||||
cd waifu2x-caffe-ubuntu &&\
|
||||
git clone --recurse-submodules --progress --depth=1 https://github.com/nagadomi/caffe.git;\
|
||||
fi
|
||||
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_caffe" ] ; then \
|
||||
apt-fast install --no-install-recommends -y gcc-8 libcudnn7 libcudnn7-dev &&\
|
||||
apt-get remove -y gcc g++ &&\
|
||||
ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ &&\
|
||||
cd /waifu2x-caffe-ubuntu &&\
|
||||
mkdir build &&\
|
||||
cd build &&\
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr &&\
|
||||
make -j$(nproc) install;\
|
||||
fi
|
||||
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_caffe" ] ; then \
|
||||
# install waifu2x-caffe
|
||||
cd /waifu2x-caffe-ubuntu/build &&\
|
||||
cp waifu2x-caffe ../bin/ &&\
|
||||
mv ../bin tempname &&\
|
||||
mv tempname /video2x/ &&\
|
||||
mv /video2x/tempname /video2x/waifu2x-caffe &&\
|
||||
rm -rf ../waifu2x-caffe-ubuntu ;\
|
||||
fi
|
||||
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_ncnn_vulkan" ] ; then \
|
||||
apt-fast install -y --no-install-recommends software-properties-common build-essential cmake libvulkan-dev glslang-tools libprotobuf-dev protobuf-compiler &&\
|
||||
git clone --recurse-submodules --depth=1 --progress https://github.com/Tencent/ncnn.git &&\
|
||||
cd ncnn &&\
|
||||
mkdir -p build &&\
|
||||
cd build &&\
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DNCNN_VULKAN=ON .. &&\
|
||||
make -j$(nproc) install &&\
|
||||
rm -rf ../../ncnn &&\
|
||||
cd / &&\
|
||||
# Compile waifu2x-ncnn-vulkan
|
||||
git clone --recurse-submodules --depth=1 --progress https://github.com/nihui/waifu2x-ncnn-vulkan.git &&\
|
||||
cd waifu2x-ncnn-vulkan &&\
|
||||
mkdir -p build &&\
|
||||
cd build &&\
|
||||
cmake ../src &&\
|
||||
make -j$(nproc) &&\
|
||||
# Incall waifu2x-ncnn-vulkan
|
||||
cd /waifu2x-ncnn-vulkan &&\
|
||||
mkdir waifu2x-ncnn-vulkan &&\
|
||||
mv models/models-cunet waifu2x-ncnn-vulkan/ &&\
|
||||
mv build/waifu2x-ncnn-vulkan waifu2x-ncnn-vulkan/ &&\
|
||||
mv waifu2x-ncnn-vulkan /video2x/ &&\
|
||||
rm -rf ../waifu2x-ncnn-vulkan ;\
|
||||
fi
|
||||
|
||||
RUN if [ "$driver" = "all" ] || [ "$driver" = "waifu2x_converter" ] ;\
|
||||
then \
|
||||
# Prerequisits for waifu2x-converter-cpp
|
||||
apt-fast install -y --no-install-recommends build-essential cmake libopencv-dev ocl-icd-opencl-dev &&\
|
||||
# Compile & Install
|
||||
git clone --recurse-submodules --depth=1 --progress https://github.com/DeadSix27/waifu2x-converter-cpp &&\
|
||||
cd waifu2x-converter-cpp &&\
|
||||
mkdir build &&\
|
||||
cd build &&\
|
||||
cmake .. &&\
|
||||
make -j$(nproc) &&\
|
||||
#ldconfig &&\
|
||||
cp -r ../models_rgb ./&&\
|
||||
cd / ;\
|
||||
fi
|
||||
|
||||
# Go!
|
||||
#COPY entrypoint.sh /
|
||||
#ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
WORKDIR /host
|
||||
ENTRYPOINT ["python3", "/video2x/src/video2x.py"]
|
||||
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES all
|
||||
# Docker image can ask questions now, if needed.
|
||||
ENV DEBIAN_FRONTEND teletype
|
||||
147
LICENSE
147
LICENSE
@@ -1,23 +1,21 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
@@ -72,7 +60,7 @@ modification follow.
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
223
Makefile
Normal file
223
Makefile
Normal file
@@ -0,0 +1,223 @@
|
||||
.PHONY: build static debug windows windows-debug debian ubuntu clean \
|
||||
test-realesrgan test-realcugan test-libplacebo test-rife \
|
||||
memcheck-realesrgan memcheck-realcugan memcheck-libplacebo memcheck-rife \
|
||||
heaptrack-realesrgan heaptrack-realcugan heaptrack-libplacebo heaptrack-rife
|
||||
|
||||
BINDIR=build
|
||||
CXX=clang++
|
||||
|
||||
TEST_VIDEO=data/standard-test.mp4
|
||||
TEST_OUTPUT=data/output.mp4
|
||||
|
||||
build:
|
||||
cmake -S . -B $(BINDIR) \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DCMAKE_CXX_COMPILER=$(CXX) \
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build $(BINDIR) --config Release --parallel
|
||||
cp $(BINDIR)/compile_commands.json .
|
||||
|
||||
static:
|
||||
cmake -S . -B $(BINDIR) \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DCMAKE_CXX_COMPILER=$(CXX) \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DUSE_SYSTEM_NCNN=OFF \
|
||||
-DUSE_SYSTEM_SPDLOG=OFF \
|
||||
-DUSE_SYSTEM_BOOST=OFF
|
||||
cmake --build $(BINDIR) --config Release --parallel
|
||||
cp $(BINDIR)/compile_commands.json .
|
||||
|
||||
debug:
|
||||
cmake -S . -B $(BINDIR) \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DCMAKE_CXX_COMPILER=$(CXX) \
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build $(BINDIR) --config Debug --parallel
|
||||
cp $(BINDIR)/compile_commands.json .
|
||||
|
||||
windows:
|
||||
cmake -S . -B $(BINDIR) \
|
||||
-DUSE_SYSTEM_NCNN=OFF \
|
||||
-DUSE_SYSTEM_SPDLOG=OFF \
|
||||
-DUSE_SYSTEM_BOOST=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=build/libvideo2x-shared
|
||||
cmake --build $(BINDIR) --config Release --parallel --target install
|
||||
|
||||
windows-debug:
|
||||
cmake -S . -B $(BINDIR) \
|
||||
-DUSE_SYSTEM_NCNN=OFF \
|
||||
-DUSE_SYSTEM_SPDLOG=OFF \
|
||||
-DUSE_SYSTEM_BOOST=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_INSTALL_PREFIX=build/libvideo2x-shared
|
||||
cmake --build $(BINDIR) --config Debug --parallel --target install
|
||||
|
||||
debian:
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential cmake clang pkg-config \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswscale-dev \
|
||||
libvulkan-dev \
|
||||
glslang-tools \
|
||||
libomp-dev \
|
||||
libspdlog-dev \
|
||||
libboost-program-options-dev
|
||||
cmake -B /tmp/build -S . -DUSE_SYSTEM_NCNN=OFF -DCMAKE_CXX_COMPILER=$(CXX) \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/install \
|
||||
-DINSTALL_BIN_DESTINATION=. -DINSTALL_INCLUDE_DESTINATION=include \
|
||||
-DINSTALL_LIB_DESTINATION=. -DINSTALL_MODEL_DESTINATION=.
|
||||
cmake --build /tmp/build --config Release --target install --parallel
|
||||
|
||||
ubuntu2404:
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential cmake pkg-config \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswscale-dev \
|
||||
libvulkan-dev \
|
||||
glslang-tools \
|
||||
libomp-dev \
|
||||
libboost-program-options-dev
|
||||
cmake -B build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DSPDLOG_NO_EXCEPTIONS=ON \
|
||||
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=video2x-linux-ubuntu-amd64/usr
|
||||
cmake --build build --config Release --target install --parallel
|
||||
mkdir -p video2x-linux-ubuntu-amd64/DEBIAN
|
||||
cp packaging/debian/control.ubuntu2404 video2x-linux-ubuntu-amd64/DEBIAN/control
|
||||
dpkg-deb --build video2x-linux-ubuntu-amd64
|
||||
|
||||
ubuntu2204:
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common
|
||||
add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg7
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential cmake \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswscale-dev \
|
||||
libvulkan-dev \
|
||||
glslang-tools \
|
||||
libomp-dev \
|
||||
libboost-program-options-dev
|
||||
cmake -B build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DSPDLOG_NO_EXCEPTIONS=ON \
|
||||
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=video2x-linux-ubuntu-amd64/usr
|
||||
cmake --build build --config Release --target install --parallel
|
||||
mkdir -p video2x-linux-ubuntu-amd64/DEBIAN
|
||||
cp packaging/debian/control.ubuntu2204 video2x-linux-ubuntu-amd64/DEBIAN/control
|
||||
dpkg-deb --build video2x-linux-ubuntu-amd64
|
||||
|
||||
clean:
|
||||
rm -vrf $(BINDIR) data/output*.* heaptrack*.zst valgrind.log
|
||||
|
||||
test-realesrgan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realesrgan -s 4 --realesrgan-model realesr-animevideov3
|
||||
|
||||
test-realcugan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realcugan -s 4 -n 0 --realcugan-model models-se
|
||||
|
||||
test-libplacebo:
|
||||
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a
|
||||
|
||||
test-rife:
|
||||
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p rife -m 4 --rife-model rife-v4.6
|
||||
|
||||
memcheck-realesrgan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) valgrind \
|
||||
--tool=memcheck \
|
||||
--leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--track-origins=yes \
|
||||
--show-reachable=yes \
|
||||
--verbose --log-file="valgrind.log" \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realesrgan -s 2 --realesrgan-model realesr-animevideov3 \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
memcheck-realcugan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) valgrind \
|
||||
--tool=memcheck \
|
||||
--leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--track-origins=yes \
|
||||
--show-reachable=yes \
|
||||
--verbose --log-file="valgrind.log" \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realcugan -s 2 -n 0 --realcugan-model models-se \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
memcheck-libplacebo:
|
||||
LD_LIBRARY_PATH=$(BINDIR) valgrind \
|
||||
--tool=memcheck \
|
||||
--leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--track-origins=yes \
|
||||
--show-reachable=yes \
|
||||
--verbose --log-file="valgrind.log" \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
memcheck-rife:
|
||||
LD_LIBRARY_PATH=$(BINDIR) valgrind \
|
||||
--tool=memcheck \
|
||||
--leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--track-origins=yes \
|
||||
--show-reachable=yes \
|
||||
--verbose --log-file="valgrind.log" \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p rife -m 4 --rife-model rife-v4.6 \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
heaptrack-realesrgan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realesrgan -s 4 --realesrgan-model realesr-animevideov3 \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
heaptrack-realcugan:
|
||||
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p realcugan -s 4 -n 0 --realcugan-model models-se \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
heaptrack-libplacebo:
|
||||
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p libplacebo -w 1920 -h 1080 --libplacebo-shader anime4k-v4-a \
|
||||
-e preset=veryfast -e crf=30
|
||||
|
||||
heaptrack-rife:
|
||||
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
|
||||
$(BINDIR)/video2x \
|
||||
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
|
||||
-p rife -m 4 --rife-model rife-v4.6 \
|
||||
-e preset=veryfast -e crf=30
|
||||
20
NOTICE
Normal file
20
NOTICE
Normal file
@@ -0,0 +1,20 @@
|
||||
Video2X
|
||||
Copyright (C) 2018-2024 K4YT3X and contributors.
|
||||
|
||||
This product depends on FFmpeg, which is available under the GNU Lesser General Public License 2.1.
|
||||
The source code can be found at https://github.com/FFmpeg/FFmpeg.
|
||||
|
||||
This product depends on Anime4K, which is available under the MIT License.
|
||||
The source code can be found at https://github.com/bloc97/Anime4K.
|
||||
|
||||
This product depends on Real-ESRGAN ncnn Vulkan, which is available under the MIT License.
|
||||
The source code can be found at https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan.
|
||||
|
||||
This product depends on Real-CUGAN ncnn Vulkan, which is available under the MIT License.
|
||||
The source code can be found at https://github.com/nihui/realcugan-ncnn-vulkan.
|
||||
|
||||
This product depends on RIFE ncnn Vulkan, which is available under the MIT License.
|
||||
The source code can be found at https://github.com/nihui/rife-ncnn-vulkan.
|
||||
|
||||
This product depends on ncnn, which is available under the BSD 3-Clause License.
|
||||
The source code can be found at https://github.com/Tencent/ncnn.
|
||||
352
README.md
352
README.md
@@ -1,300 +1,126 @@
|
||||
<p align="center">
|
||||
<img src="https://user-images.githubusercontent.com/21986859/81626588-ae5ab800-93eb-11ea-918f-ebe98c2de40a.png"/>
|
||||
<img src="https://github.com/user-attachments/assets/5cd63373-e806-474f-94ec-6e04963bf90f"
|
||||
alt="Video2X: A machine learning-based video super resolution and frame interpolation framework."/>
|
||||
</br>
|
||||
<img src="https://img.shields.io/github/v/release/k4yt3x/video2x?style=flat-square"/>
|
||||
<img src="https://img.shields.io/github/downloads/k4yt3x/video2x/total?style=flat-square"/>
|
||||
<img src="https://img.shields.io/github/license/k4yt3x/video2x?style=flat-square"/>
|
||||
<img src="https://img.shields.io/github/sponsors/k4yt3x?style=flat-square&link=https%3A%2F%2Fgithub.com%2Fsponsors%2Fk4yt3x"/>
|
||||
<img src="https://img.shields.io/badge/dynamic/json?color=%23e85b46&label=Patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F4507807&style=flat-square"/>
|
||||
</p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
## 🌟 Version 6.0.0
|
||||
|
||||
<!--# Video2X Lossless Video Enlarger-->
|
||||
Video2X 6.0.0 highlights:
|
||||
|
||||
### Official Discussion Group (Telegram): https://t.me/video2x
|
||||
- Complete rewrite of the Video2X project in C/C++.
|
||||
- Faster and more efficient architecture.
|
||||
- Cross-platform support for Windows and Linux.
|
||||
- Vastly improved output quality.
|
||||
- New GUI and installer for easy setup on Windows.
|
||||
|
||||
## [Download Stable/Beta Builds](https://github.com/k4yt3x/video2x/releases) (Windows)
|
||||
<details>
|
||||
<summary>Click to see more details</summary>
|
||||
|
||||
- **`Full`**: full package comes pre-configured with **all** dependencies like `FFmpeg` and `waifu2x-caffe`.
|
||||
- **`Light`**: ligt package comes with only Video2X binaries and a template configuration file. The user will either have to run the setup script or install and configure dependencies themselves.
|
||||
Version 6.0.0 is a complete rewrite of this project in C/C++. It:
|
||||
|
||||
Go to the **[Quick Start](#quick-start)** section for usages.
|
||||
- genuinely works this time, with much less hassle compared to the 5.0.0 beta;
|
||||
- is blazing fast, thanks to the new optimized pipeline and the efficiency of C/C++;
|
||||
- is cross-platform, available now for both Windows and Linux;
|
||||
- offers significantly better output quality with Anime4K v4, RealESRGAN, RealCUGAN, and RIFE;
|
||||
- supports two modes: filtering (upscaling) and frame interpolation;
|
||||
- supports Anime4K v4 and all custom MPV-compatible GLSL shaders;
|
||||
- supports RealESRGAN, RealCUGAN, and RIFE (all models) via ncnn and Vulkan;
|
||||
- requires zero additional disk space during processing, just space for the final output.
|
||||
|
||||
### [Download From Mirror](https://files.k4yt3x.com/Projects/Video2X/)
|
||||
</details>
|
||||
|
||||
In case you're unable to download the releases directly from GitHub, you can try downloading from the mirror site hosted by the author. Only releases will be updated in this directory, not nightly builds.
|
||||

|
||||
|
||||
## [Download Nightly Builds](https://github.com/k4yt3x/video2x/actions) (Windows)
|
||||
## [🪟 Install on Windows](https://docs.video2x.org/installing/windows-qt6.html)
|
||||
|
||||
Nightly builds are built automatically every time a new commit is pushed to the master branch. The lates nightly build is always up-to-date with the latest version of the code, but is less stable and may contain bugs. Nightly builds are handled by GitHub's integrated CI/CD tool, GitHub Actions.
|
||||
**[Download the Latest Windows Installer Executable (6.3.0)](https://github.com/k4yt3x/video2x/releases/download/6.3.0/video2x-qt6-windows-amd64-installer.exe)**
|
||||
|
||||
To download the latest nightly build, go to the [GitHub Actions](https://github.com/k4yt3x/video2x/actions) tab, enter the last run of workflow "Video2X Nightly Build, and download the artifacts generated from the run.
|
||||
You can download the latest Windows release on the [releases page](https://github.com/k4yt3x/video2x/releases/latest). For basic GUI usage, refer to the [documentation](https://docs.video2x.org/running/desktop.html). If you're unable to download directly from GitHub, try the [mirror site](https://files.k4yt3x.com/Projects/Video2X). The GUI currently supports the following languages:
|
||||
|
||||
## Introduction
|
||||
- English (United States)
|
||||
- 简体中文(中国)
|
||||
- 日本語(日本)
|
||||
- Português (Portugal)
|
||||
|
||||
Video2X is a video/GIF/image upscaling software based on Waifu2X, Anime4K, SRMD and RealSR written in Python 3. It upscales videos, GIFs and images, restoring details from low-resolution inputs. Video2X also accepts GIF input to video output and video input to GIF output.
|
||||
## [🐧 Install on Linux](https://docs.video2x.org/installing/linux.html)
|
||||
|
||||
Currently, Video2X supports the following drivers (implementations of algorithms).
|
||||
You can install Video2X on Arch Linux using the [video2x-git](https://aur.archlinux.org/packages/video2x-git) AUR package or on Ubuntu/Debian using the `.deb` package from the [releases page](https://github.com/k4yt3x/video2x/releases/latest). If you'd like to build from source, refer to the [PKGBUILD](packaging/arch/PKGBUILD) file for a general overview of the required packages and commands. If you'd prefer not to compile the program from source, consider using the container image below.
|
||||
|
||||
- **Waifu2X Caffe**: Caffe implementation of waifu2x
|
||||
- **Waifu2X Converter CPP**: CPP implementation of waifu2x based on OpenCL and OpenCV
|
||||
- **Waifu2X NCNN Vulkan**: NCNN implementation of waifu2x based on Vulkan API
|
||||
- **SRMD NCNN Vulkan**: NCNN implementation of SRMD based on Vulkan API
|
||||
- **RealSR NCNN Vulkan**: NCNN implementation of RealSR based on Vulkan API
|
||||
- **Anime4KCPP**: CPP implementation of Anime4K
|
||||
## [📦 Container Image](https://docs.video2x.org/running/container.html)
|
||||
|
||||
### Video Upscaling
|
||||
Video2X [container images](https://github.com/k4yt3x/video2x/pkgs/container/video2x) are available on the GitHub Container Registry for easy deployment on Linux and macOS. If you already have Docker/Podman installed, only one command is needed to start upscaling a video. For more information on how to use Video2X's Docker image, please refer to the [documentation](https://docs.video2x.org/running/container.html).
|
||||
|
||||
## [📔 Google Colab](https://colab.research.google.com/drive/1gWEwcA9y57EsxwOjmLNmNMXPsafw0kGo)
|
||||
|
||||
You can use Video2X on [Google Colab](https://colab.research.google.com/) **for free** if you don't have a powerful GPU of your own. You can borrow a powerful GPU (NVIDIA T4, L4, or A100) on Google's server for free for a maximum of 12 hours per session. **Please use the free resource fairly** and do not create sessions back-to-back and run upscaling 24/7. This might result in you getting banned. You can get [Colab Pro/Pro+](https://colab.research.google.com/signup/pricing) if you'd like to use better GPUs and get longer runtimes. Usage instructions are embedded in the [Colab Notebook](https://colab.research.google.com/drive/1gWEwcA9y57EsxwOjmLNmNMXPsafw0kGo).
|
||||
|
||||
## [💬 Telegram Discussion Group](https://t.me/video2x)
|
||||
|
||||
Join our Telegram discussion group to ask any questions you have about Video2X, chat directly with the developers, or discuss super resolution, frame interpolation technologies, or the future of Video2X in general.
|
||||
|
||||
## [📖 Documentation](https://docs.video2x.org/)
|
||||
|
||||
Comprehensive documentation for Video2X is available at [https://docs.video2x.org/](https://docs.video2x.org/). It offers detailed instructions on how to [build](https://docs.video2x.org/building/index.html), [install](https://docs.video2x.org/installing/index.html), [use](https://docs.video2x.org/running/index.html), and [develop](https://docs.video2x.org/developing/index.html) with this program.
|
||||
|
||||
## 📽️ Video Demos (Outdated)
|
||||
|
||||
\
|
||||
*Upscale Comparison Demonstration*
|
||||
_Upscale demo: Spirited Away's movie trailer_
|
||||
|
||||
**You can watch the whole demo video on YouTube: https://youtu.be/mGEfasQl2Zo**
|
||||
- **Spirited Away**: [YouTube](https://youtu.be/mGEfasQl2Zo) | [Bilibili](https://www.bilibili.com/video/BV1V5411471i/)
|
||||
- 360P to 4K
|
||||
- The [original video](https://www.youtube.com/watch?v=ByXuk9QqQkk)'s copyright belongs to 株式会社スタジオジブリ
|
||||
- **Bad Apple!!**: [YouTube](https://youtu.be/A81rW_FI3cw) | [Bilibili](https://www.bilibili.com/video/BV16K411K7ue)
|
||||
- 384P 30 FPS to 4K 120 FPS with waifu2x and DAIN
|
||||
- The [original video](https://www.nicovideo.jp/watch/sm8628149)'s copyright belongs to あにら
|
||||
- **The Pet Girl of Sakurasou**: [YouTube](https://youtu.be/M0vDI1HH2_Y) | [Bilibili](https://www.bilibili.com/video/BV14k4y167KP/)
|
||||
- 240P 29.97 to 1080P 60 FPS with waifu2x and DAIN
|
||||
- The original video's copyright belongs to ASCII Media Works
|
||||
|
||||
Clip is from trailer of animated movie "千と千尋の神隠し". Copyright belongs to "株式会社スタジオジブリ (STUDIO GHIBLI INC.)". Will delete immediately if use of clip is in violation of copyright.
|
||||
### Standard Test Clip
|
||||
|
||||
### GIF Upscaling
|
||||
The following clip can be used to test if your setup works properly. This is also the standard clip used for running performance benchmarks.
|
||||
|
||||
This original input GIF is 160x120 in size. This image is downsized and accelerated to 20 FPS from its [original image](https://gfycat.com/craftyeasygoingankole-capoo-bug-cat).
|
||||
- [Standard Test Clip (240P)](https://files.k4yt3x.com/Resources/Videos/standard-test.mp4) 4.54 MiB
|
||||
- [waifu2x Upscaled Sample (1080P)](https://files.k4yt3x.com/Resources/Videos/standard-waifu2x.mp4) 4.54 MiB
|
||||
- [Ground Truth (1080P)](https://files.k4yt3x.com/Resources/Videos/standard-original.mp4) 22.2 MiB
|
||||
|
||||
\
|
||||
*Catfru original 160x120 GIF image*
|
||||
The original clip came from the anime "さくら荘のペットな彼女."\
|
||||
Copyright of this clip belongs to 株式会社アニプレックス.
|
||||
|
||||
Below is what it looks like after getting upscaled to 640x480 (4x) using Video2X.
|
||||
## ⚖️ License
|
||||
|
||||
\
|
||||
*Catfru 4x upscaled GIF*
|
||||
This project is licensed under [GNU AGPL version 3](https://www.gnu.org/licenses/agpl-3.0.txt).\
|
||||
Copyright (C) 2018-2024 K4YT3X and [contributors](https://github.com/k4yt3x/video2x/graphs/contributors).
|
||||
|
||||
### Image Upscaling
|
||||

|
||||
|
||||
\
|
||||
*Image upscaling example*
|
||||
This project includes or depends on these following projects:
|
||||
|
||||
[Original image](https://72915.tumblr.com/post/173793265673) from [nananicu@twitter](https://twitter.com/nananicu/status/994546266968281088), edited by K4YT3X.
|
||||
| Project | License |
|
||||
| ------------------------------------------------------------------------------------- | --------------- |
|
||||
| [FFmpeg/FFmpeg](https://www.ffmpeg.org/) | LGPLv2.1, GPLv2 |
|
||||
| [Tencent/ncnn](https://github.com/Tencent/ncnn) | BSD 3-Clause |
|
||||
| [bloc97/Anime4K](https://github.com/bloc97/Anime4K) | MIT License |
|
||||
| [nihui/realcugan-ncnn-vulkan](https://github.com/nihui/realcugan-ncnn-vulkan) | MIT License |
|
||||
| [nihui/rife-ncnn-vulkan](https://github.com/nihui/rife-ncnn-vulkan) | MIT License |
|
||||
| [xinntao/Real-ESRGAN-ncnn-vulkan](https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan) | MIT License |
|
||||
|
||||
## All Demo Videos
|
||||
More licensing information can be found in the [NOTICE](NOTICE) file.
|
||||
|
||||
Below is a list of all the demo videos available.
|
||||
The list is sorted from new to old.
|
||||
## 🌺 Special Thanks
|
||||
|
||||
- **Bad Apple!!**
|
||||
- YouTube: https://youtu.be/-RKLdCELgkQ
|
||||
- Bilibili: https://www.bilibili.com/video/BV1s5411s7xV/
|
||||
- **The Pet Girl of Sakurasou 240P to 1080P 60FPS**
|
||||
- Original name: さくら荘のペットな彼女
|
||||
- YouTube: https://youtu.be/M0vDI1HH2_Y
|
||||
- Bilibili: https://www.bilibili.com/video/BV14k4y167KP/
|
||||
- **Spirited Away (360P to 4K)**
|
||||
- Original name: 千と千尋の神隠し
|
||||
- YouTube: https://youtu.be/mGEfasQl2Zo
|
||||
- Bilibili: https://www.bilibili.com/video/BV1V5411471i/
|
||||
|
||||
---
|
||||
|
||||
## Screenshots
|
||||
|
||||
### Video2X GUI
|
||||
|
||||
\
|
||||
*Video2X GUI Screenshot*
|
||||
|
||||
### Video2X CLI
|
||||
|
||||
\
|
||||
*Video2X CLI Screenshot*
|
||||
|
||||
---
|
||||
|
||||
### Sample Videos
|
||||
|
||||
If you can't find a video clip to begin with, or if you want to see a before-after comparison, we have prepared some sample clips for you. The quick start guide down below will also be based on the name of the sample clips.
|
||||
|
||||
\
|
||||
*Sample Upscale Videos*
|
||||
|
||||
- [Sample Video (240P) 4.54MB](https://files.k4yt3x.com/Resources/Videos/sample_input.mp4)
|
||||
- [Sample Video Upscaled (1080P) 4.54MB](https://files.k4yt3x.com/Resources/Videos/sample_output.mp4)
|
||||
- [Sample Video Original (1080P) 22.2MB](https://files.k4yt3x.com/Resources/Videos/sample_original.mp4)
|
||||
|
||||
Clip is from anime "さくら荘のペットな彼女". Copyright belongs to "株式会社アニプレックス (Aniplex Inc.)". Will delete immediately if use of clip is in violation of copyright.
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before running Video2X, you'll need to ensure you have installed the drivers' external dependencies such as GPU drivers.
|
||||
|
||||
- waifu2x-caffe
|
||||
- GPU mode: Nvidia graphics card driver
|
||||
- cuDNN mode: Nvidia CUDA and [cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#install-windows)
|
||||
- Other Drivers
|
||||
- GPU driver if you want to use GPU for processing
|
||||
|
||||
### Running Video2X (GUI)
|
||||
|
||||
The easiest way to run Video2X is to use the full build. Extract the full release zip file and you'll get these files.
|
||||
|
||||
\
|
||||
*Video2X release files*
|
||||
|
||||
Simply double click on video2x_gui.exe to launch the GUI.
|
||||
|
||||
\
|
||||
*Video2X GUI main tab*
|
||||
|
||||
Then, drag the videos you wish to upscale into the window and select the appropriate output path.
|
||||
|
||||
\
|
||||
*Drag and drop file into Video2X GUI*
|
||||
|
||||
Tweak the settings if you want to, then hit the start button at the bottom and the upscale will start. Now you'll just have to wait for it to complete.
|
||||
|
||||
\
|
||||
*Video2X started processing input files*
|
||||
|
||||
### Running Video2X (CLI)
|
||||
|
||||
#### Basic Upscale Example
|
||||
|
||||
This example command below uses `waifu2x-caffe` to enlarge the video `sample-input.mp4` two double its original size.
|
||||
|
||||
```shell
|
||||
python video2x.py -i sample-input.mp4 -o sample-output.mp4 -r 2 -d waifu2x_caffe
|
||||
```
|
||||
|
||||
#### Advanced Upscale Example
|
||||
|
||||
If you would like to tweak engine-specific settings, either specify the corresponding argument after `--`, or edit the corresponding field in the configuration file `video2x.yaml`. **Command line arguments will overwrite default values in the config file.**
|
||||
|
||||
This example below adds enables TTA for `waifu2x-caffe`.
|
||||
|
||||
```shell
|
||||
python video2x.py -i sample-input.mp4 -o sample-output.mp4 -r 2 -d waifu2x_caffe -- --tta 1
|
||||
```
|
||||
|
||||
To see a help page for driver-specific settings, use `-d` to select the driver and append `-- --help` as demonstrated below. This will print all driver-specific settings and descriptions.
|
||||
|
||||
```shell
|
||||
python video2x.py -d waifu2x_caffe -- --help
|
||||
```
|
||||
|
||||
### Running Video2X (Docker)
|
||||
|
||||
Video2X can be deployed via Docker.
|
||||
|
||||
```shell
|
||||
docker pull k4yt3x/video2x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Documentations
|
||||
|
||||
### [Video2X Wiki](https://github.com/k4yt3x/video2x/wiki)
|
||||
|
||||
You can find all detailed user-facing and developer-facing documentations in the [Video2X Wiki](https://github.com/k4yt3x/video2x/wiki). It covers everything from step-by-step instructions for beginners, to the code structure of this program for advanced users and developers. If this README page doesn't answer all your questions, the wiki page is where you should head to.
|
||||
|
||||
### [Step-By-Step Tutorial](https://github.com/k4yt3x/video2x/wiki/Step-By-Step-Tutorial)
|
||||
|
||||
For those who want a detailed walk-through of how to use Video2X, you can head to the [Step-By-Step Tutorial](https://github.com/k4yt3x/video2x/wiki/Step-By-Step-Tutorial) wiki page. It includes almost every step you need to perform in order to enlarge your first video.
|
||||
|
||||
### [Run From Source Code](https://github.com/k4yt3x/video2x/wiki/Run-From-Source-Code)
|
||||
|
||||
This wiki page contains all instructions for how you can run Video2X directly from Python source code.
|
||||
|
||||
### [Drivers](https://github.com/k4yt3x/video2x/wiki/Drivers)
|
||||
|
||||
Go to the [Drivers](https://github.com/k4yt3x/video2x/wiki/Drivers) wiki page if you want to see a detailed description on the different types of drivers implemented by Video2X. This wiki page contains detailed difference between different drivers, and how to download and set each of them up for Video2X.
|
||||
|
||||
### [Q&A](https://github.com/k4yt3x/video2x/wiki/Q&A)
|
||||
|
||||
If you have any questions, first try visiting our [Q&A](https://github.com/k4yt3x/video2x/wiki/Q&A) page to see if your question is answered there. If not, open an issue and we will respond to your questions ASAP. Alternatively, you can also join our [Telegram discussion group](https://t.me/video2x) and ask your questions there.
|
||||
|
||||
### [History](https://github.com/k4yt3x/video2x/wiki/History)
|
||||
|
||||
Are you interested in how the idea of Video2X was born? Do you want to know the stories and histories behind Video2X's development? Come into this page.
|
||||
|
||||
---
|
||||
|
||||
# Full Usage
|
||||
|
||||
## Video2X Options
|
||||
|
||||
### -h, --help
|
||||
show this help message and exit
|
||||
|
||||
### -i INPUT, --input INPUT
|
||||
source video file/directory
|
||||
|
||||
### -o OUTPUT, --output OUTPUT
|
||||
output video file/directory
|
||||
|
||||
### -c CONFIG, --config CONFIG
|
||||
video2x config file path
|
||||
|
||||
### -v, --version
|
||||
display version, lawful information and exit
|
||||
|
||||
## Upscaling Options
|
||||
|
||||
### -d DRIVER, --driver DRIVER
|
||||
upscaling driver (default: waifu2x_caffe)
|
||||
|
||||
Available options are:
|
||||
|
||||
- waifu2x_caffe
|
||||
- waifu2x_converter_cpp
|
||||
- waifu2x_ncnn_vulkan
|
||||
- srmd_ncnn_vulkan
|
||||
- realsr_ncnn_vulkan
|
||||
- anime4kcpp
|
||||
|
||||
### -r RATIO, --ratio RATIO
|
||||
scaling ratio
|
||||
|
||||
### -p PROCESSES, --processes PROCESSES
|
||||
number of processes to use for upscaling (default: 1)
|
||||
|
||||
### --preserve_frames
|
||||
preserve extracted and upscaled frames (default: False)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the GNU General Public License Version 3 (GNU GPL v3)
|
||||
https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||

|
||||
|
||||
(C) 2018-2020 K4YT3X
|
||||
|
||||
## Credits
|
||||
|
||||
This project relies on the following software and projects.
|
||||
|
||||
- [FFmpeg](https://www.ffmpeg.org/)
|
||||
- [waifu2x-caffe](https://github.com/lltcggie/waifu2x-caffe)
|
||||
- [waifu2x-converter-cpp](https://github.com/DeadSix27/waifu2x-converter-cpp)
|
||||
- [waifu2x-ncnn-vulkan](https://github.com/nihui/waifu2x-ncnn-vulkan)
|
||||
- [srmd-ncnn-vulkan](https://github.com/nihui/srmd-ncnn-vulkan)
|
||||
- [realsr-ncnn-vulkan](https://github.com/nihui/realsr-ncnn-vulkan)
|
||||
- [Anime4K](https://github.com/bloc97/Anime4K)
|
||||
- [Anime4KCPP](https://github.com/TianZerL/Anime4KCPP)
|
||||
- [Gifski](https://github.com/ImageOptim/gifski)
|
||||
|
||||
## Special Thanks
|
||||
|
||||
Appreciations given to the following personnel who have contributed significantly to the project (specifically the technical perspective).
|
||||
Special thanks to the following individuals for their significant contributions to the project, listed in alphabetical order.
|
||||
|
||||
- [@ArchieMeng](https://github.com/archiemeng)
|
||||
- [@BrianPetkovsek](https://github.com/BrianPetkovsek)
|
||||
- [@sat3ll](https://github.com/sat3ll)
|
||||
- [@ddouglas87](https://github.com/ddouglas87)
|
||||
- [@lhanjian](https://github.com/lhanjian)
|
||||
|
||||
## Related Projects
|
||||
|
||||
- [Dandere2x](https://github.com/CardinalPanda/dandere2x): A lossy video upscaler also built around `waifu2x`, but with video compression techniques to shorten the time needed to process a video.
|
||||
- [Waifu2x-Extension-GUI](https://github.com/AaronFeng753/Waifu2x-Extension-GUI): A similar project that focuses more and only on building a better graphical user interface. It is built using C++ and Qt5, and currently only supports the Windows platform.
|
||||
- [@nihui](https://github.com/nihui)
|
||||
- [@sat3ll](https://github.com/sat3ll)
|
||||
|
||||
14
SECURITY.md
Normal file
14
SECURITY.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
- **Email**: Send vulnerability reports via email to [github@k4yt3x.com](mailto:github@k4yt3x.com).
|
||||
- **Details**: Include description, impact, reproduction steps, and proof-of-concept if applicable.
|
||||
- **Confidentiality**: Do not disclose vulnerabilities publicly until a fix is released.
|
||||
|
||||
## Response Process
|
||||
|
||||
1. **Acknowledge**: We will acknowledge receipt within 48 hours.
|
||||
2. **Assess**: Initial assessment and response within 7 days.
|
||||
3. **Fix**: Develop and release a patch promptly.
|
||||
4. **Credit**: Acknowledge contributors unless anonymity is requested.
|
||||
20
_config.yml
20
_config.yml
@@ -1,20 +0,0 @@
|
||||
# site settings
|
||||
locale: "en-US"
|
||||
title: "Video2X"
|
||||
title_separator: "-"
|
||||
subtitle: "Machine learning video/GIF/image upscaling"
|
||||
name: "K4YT3X"
|
||||
description: "An amazing website."
|
||||
url: "https://video2x.org"
|
||||
repository: "k4yt3x/video2x"
|
||||
|
||||
# set rendering style to be GitHub flavor
|
||||
kramdown:
|
||||
input: GFM
|
||||
|
||||
# use Minimal Mistakes theme
|
||||
remote_theme: mmistakes/minimal-mistakes
|
||||
|
||||
# plugin required for the Minimal Mistakes theme
|
||||
plugins:
|
||||
- jekyll-include-cache
|
||||
1
docs/book/.gitignore
vendored
Normal file
1
docs/book/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
book
|
||||
11
docs/book/book.toml
Normal file
11
docs/book/book.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[book]
|
||||
authors = ["k4yt3x"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
title = "Video2X Documentation"
|
||||
|
||||
[output.html]
|
||||
default-theme = "ayu"
|
||||
preferred-dark-theme = "ayu"
|
||||
git-repository-url = "https://github.com/k4yt3x/video2x"
|
||||
edit-url-template = "https://github.com/k4yt3x/video2x/edit/master/docs/book/{path}"
|
||||
13
docs/book/src/README.md
Normal file
13
docs/book/src/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Introduction
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/user-attachments/assets/5cd63373-e806-474f-94ec-6e04963bf90f"/>
|
||||
</p>
|
||||
|
||||
This site hosts the documentation for the Video2X project, a machine learning-based lossless video super-resolution and frame interpolation framework.
|
||||
|
||||
The project's homepage is located on GitHub at: [https://github.com/k4yt3x/video2x](https://github.com/k4yt3x/video2x).
|
||||
|
||||
If you have any questions, suggestions, or found any issues in the documentation, please [open an issue](https://github.com/k4yt3x/video2x/issues/new/choose) on GitHub.
|
||||
|
||||
> 🚧 Some pages are still under construction.
|
||||
35
docs/book/src/SUMMARY.md
Normal file
35
docs/book/src/SUMMARY.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](README.md)
|
||||
|
||||
# Building
|
||||
|
||||
- [Building](building/README.md)
|
||||
- [Windows](building/windows.md)
|
||||
- [Windows (Qt6)](building/windows-qt6.md)
|
||||
- [Linux](building/linux.md)
|
||||
|
||||
# Installing
|
||||
|
||||
- [Installing](installing/README.md)
|
||||
- [Windows (Command Line)](installing/windows.md)
|
||||
- [Windows (Qt6 GUI)](installing/windows-qt6.md)
|
||||
- [Linux](installing/linux.md)
|
||||
|
||||
# Running
|
||||
|
||||
- [Running](running/README.md)
|
||||
- [Desktop](running/desktop.md)]
|
||||
- [Command Line](running/command-line.md)
|
||||
- [Container](running/container.md)
|
||||
|
||||
# Developing
|
||||
|
||||
- [Developing](developing/README.md)
|
||||
- [Architecture](developing/architecture.md)
|
||||
- [libvideo2x](developing/libvideo2x.md)
|
||||
|
||||
# Other
|
||||
|
||||
- [Other](other/README.md)
|
||||
- [History](other/history.md)
|
||||
3
docs/book/src/building/README.md
Normal file
3
docs/book/src/building/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Building
|
||||
|
||||
Instructions for building the project.
|
||||
50
docs/book/src/building/linux.md
Normal file
50
docs/book/src/building/linux.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Linux
|
||||
|
||||
Instructions for building this project on Linux.
|
||||
|
||||
## Arch Linux
|
||||
|
||||
Arch users can build the latest version of the project from the AUR package `video2x-git`. The project's repository also contains another PKGBUILD example at `packaging/arch/PKGBUILD`.
|
||||
|
||||
```bash
|
||||
# Build only
|
||||
git clone https://aur.archlinux.org/video2x-git.git
|
||||
cd video2x-git
|
||||
makepkg -s
|
||||
```
|
||||
|
||||
To build manually from the source, follow the instructions below.
|
||||
|
||||
```bash
|
||||
# Install build and runtime dependencies
|
||||
# See the PKGBUILD file for the list of up-to-date dependencies
|
||||
pacman -Sy ffmpeg ncnn vulkan-driver opencv spdlog boost-libs
|
||||
pacman -Sy git cmake make clang pkgconf vulkan-headers openmp boost
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
|
||||
# Build the project
|
||||
make build
|
||||
```
|
||||
|
||||
The built binaries will be located in the `build` directory.
|
||||
|
||||
## Ubuntu
|
||||
|
||||
Ubuntu users can use the `Makefile` to build the project automatically. The `ubuntu2404` and `ubuntu2204` targets are available for Ubuntu 24.04 and 22.04, respectively. `make` will automatically install the required dependencies, build the project, and package it into a `.deb` package file. It is recommended to perform the build in a container to ensure the environment's consistency and to avoid leaving extra build packages on your system.
|
||||
|
||||
```bash
|
||||
# make needs to be installed manually
|
||||
sudo apt-get update && sudo apt-get install make
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
|
||||
# Build the project
|
||||
make ubuntu2404
|
||||
```
|
||||
|
||||
The built `.deb` package will be located under the current directory.
|
||||
55
docs/book/src/building/windows-qt6.md
Normal file
55
docs/book/src/building/windows-qt6.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Windows (Qt6)
|
||||
|
||||
Instructions for building the Qt6 GUI of this project on Windows.
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
These dependencies must be installed before building the project. This tutorial assumes that Qt6 has been installed to the default location (`C:\Qt`).
|
||||
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
- Workload: Desktop development with C++
|
||||
- [winget-cli](https://github.com/microsoft/winget-cli)
|
||||
- [Qt6](https://www.qt.io/download)
|
||||
- Component: Qt6 with MSVC 2022 64-bit
|
||||
- Component: Qt Creator
|
||||
|
||||
## 1. Clone the Repository
|
||||
|
||||
```bash
|
||||
# Install Git if not already installed
|
||||
winget install -e --id=Git.Git
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x-qt6.git
|
||||
cd video2x-qt6
|
||||
```
|
||||
|
||||
## 2. Install Dependencies
|
||||
|
||||
You need to have the `libvideo2x` shared library built before building the Qt6 GUI. Put the built binaries in `third_party/libvideo2x-shared`.
|
||||
|
||||
```bash
|
||||
# Versions of manually installed dependencies
|
||||
$ffmpegVersion = "7.1"
|
||||
|
||||
# Download and extract FFmpeg
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
```
|
||||
|
||||
## 3. Build the Project
|
||||
|
||||
1. Open the `CMakeLists.txt` file in Qt Creator as the project file.
|
||||
2. Click on the hammer icon at the bottom left of the window to build the project.
|
||||
3. Built binaries will be located in the `build` directory.
|
||||
|
||||
After the build finishes, you will need to copy the Qt6 DLLs and other dependencies to the build directory to run the application. Before you run the following commands, remove everything in the release directory except for `video2x-qt6.exe` and the `.qm` files as they are not required for running the application. Then, run the following command to copy the Qt6 runtime DLLs:
|
||||
|
||||
```bash
|
||||
C:\Qt\6.8.0\msvc2022_64\bin\windeployqt.exe --release --compiler-runtime .\build\Desktop_Qt_6_8_0_MSVC2022_64bit-Release\video2x-qt6.exe
|
||||
```
|
||||
|
||||
You will also need to copy the `libvideo2x` shared library to the build directory. Copy all files under `third_party/libvideo2x-shared` to the release directory except for `include`, `libvideo2x.lib`, and `video2x.exe`.
|
||||
|
||||
Now you should be able to run the application by double-clicking on `video2x-qt6.exe`.
|
||||
56
docs/book/src/building/windows.md
Normal file
56
docs/book/src/building/windows.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Windows
|
||||
|
||||
Instructions for building this project on Windows.
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
The following tools must be installed manually:
|
||||
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
- Workload: Desktop development with C++
|
||||
- [winget-cli](https://github.com/microsoft/winget-cli)
|
||||
|
||||
## 2. Clone the Repository
|
||||
|
||||
```bash
|
||||
# Install Git if not already installed
|
||||
winget install -e --id=Git.Git
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
```
|
||||
|
||||
## 3. Install Dependencies
|
||||
|
||||
```bash
|
||||
# Install CMake
|
||||
winget install -e --id=Kitware.CMake
|
||||
|
||||
# Install Vulkan SDK
|
||||
winget install -e --id=KhronosGroup.VulkanSDK
|
||||
|
||||
# Versions of manually installed dependencies
|
||||
$ffmpegVersion = "7.1"
|
||||
$ncnnVersion = "20240820"
|
||||
|
||||
# Download and extract FFmpeg
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
|
||||
# Download and extract ncnn
|
||||
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
|
||||
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
|
||||
```
|
||||
|
||||
## 4. Build the Project
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/libvideo2x-shared
|
||||
cmake --build build --config Release --parallel --target install
|
||||
```
|
||||
|
||||
The built binaries will be located in `build/libvideo2x-shared`.
|
||||
3
docs/book/src/developing/README.md
Normal file
3
docs/book/src/developing/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Developing
|
||||
|
||||
Development-related instructions and guidelines for this project.
|
||||
38
docs/book/src/developing/architecture.md
Normal file
38
docs/book/src/developing/architecture.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Architecture
|
||||
|
||||
The basic working principals of Video2X and its historical architectures.
|
||||
|
||||
## Video2X <=4.0.0 (Legacy)
|
||||
|
||||
Below is the earliest architecture of Video2X. It extracts all of the frames from the video using FFmpeg, processes all frames, and stores them into a folder before running FFmpeg again to convert all of the frames back into a video. The drawbacks of this approach are apparent:
|
||||
|
||||
- Storing all frames of the video on disk twice requires a huge amount of storage, often hundreds of gigabytes.
|
||||
- A lot of disk I/O (reading from/writing to disks) operations occur, which is inefficient. Each step stores its processing results to disk, and the next step has to read them from disk again.
|
||||
|
||||
\
|
||||
_Video2X architecture before version 5.0.0_
|
||||
|
||||
## Video2X 5.0.0 (Legacy)
|
||||
|
||||
Video2X 5.0.0's architecture was designed to address the inefficient disk I/O issues. This version uses frame serving and streamlines the process. All stages are started simultaneously, and frames are passed between stages through stdin/stdout pipes. However, this architecture also has several issues:
|
||||
|
||||
- At least two instances of FFmpeg will be started, three in the case of Anime4K.
|
||||
- Passing frames through stdin/stdout is unstable. If frame sizes are incorrect, FFmpeg will hang waiting for the next frame.
|
||||
- The frames entering and leaving each stage must be RGB24, even if they don't need to be. For instance, if the upscaler used is Anime4K, yuv420p is acceptable, but the frame is first converted by the decoder to RGB24, then converted back into YUV colorspace for libplacebo.
|
||||
|
||||
\
|
||||
_Video2X 5.x.x architecture_
|
||||
|
||||
## Video2X 6.0.0 (Current)
|
||||
|
||||
Video2X 6.0.0 (Current)
|
||||
|
||||
The newest version of Video2X's architecture addresses the issues of the previous architecture while improving efficiency.
|
||||
|
||||
- Frames are only decoded once and encoded once with FFmpeg's libavformat.
|
||||
- Frames are passed as `AVFrame` structs. Their pixel formats are only converted when needed.
|
||||
- Frames always stay in RAM, avoiding bottlenecks from disk I/O and pipes.
|
||||
- Frames always stay in the hardware (GPU) unless they need to be downloaded to be processed by software (partially implemented).
|
||||
|
||||
\
|
||||
_Video2X 6.0.0 architecture_
|
||||
5
docs/book/src/developing/libvideo2x.md
Normal file
5
docs/book/src/developing/libvideo2x.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# libvideo2x
|
||||
|
||||
Instructions for using libvideo2x's C API in your own projects.
|
||||
|
||||
libvideo2x's API is still highly volatile. This document will be updated as the API stabilizes.
|
||||
3
docs/book/src/installing/README.md
Normal file
3
docs/book/src/installing/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Installing
|
||||
|
||||
Instructions for installing this project.
|
||||
19
docs/book/src/installing/linux.md
Normal file
19
docs/book/src/installing/linux.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Linux
|
||||
|
||||
Instructions for installing this project on Linux systems.
|
||||
|
||||
## Arch Linux
|
||||
|
||||
Arch users can install the project from the AUR.
|
||||
|
||||
```bash
|
||||
yay -S video2x-git
|
||||
```
|
||||
|
||||
## Ubuntu
|
||||
|
||||
Ubuntu users can download the `.deb` packages from the [releases page](https://github.com/k4yt3x/video2x/releases/latest). Install the package with the APT package manager:
|
||||
|
||||
```bash
|
||||
apt-get install ./video2x-linux-ubuntu2404-amd64.deb
|
||||
```
|
||||
7
docs/book/src/installing/windows-qt6.md
Normal file
7
docs/book/src/installing/windows-qt6.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Windows (Qt6)
|
||||
|
||||
You can download the installer for Video2X Qt6 from the [releases page](https://github.com/k4yt3x/video2x/releases/latest). The installer file's name is `video2x-qt6-windows-amd64-installer.exe`.
|
||||
|
||||
Download then double-click the installer to start the installation process. The installer will guide you through the installation process. You can choose the installation directory and whether to create a desktop shortcut during the installation.
|
||||
|
||||
After the installation is complete, you can start Video2X Qt6 by double-clicking the desktop shortcut.
|
||||
12
docs/book/src/installing/windows.md
Normal file
12
docs/book/src/installing/windows.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Windows
|
||||
|
||||
You can download the latest version of the Windows build from the [releases page](https://github.com/k4yt3x/video2x/releases/latest). Here are the steps to download and install the pre-built binaries to `%LOCALAPPDATA%\Programs`.
|
||||
|
||||
```bash
|
||||
$latestTag = (Invoke-RestMethod -Uri https://api.github.com/repos/k4yt3x/video2x/releases/latest).tag_name
|
||||
curl -LO "https://github.com/k4yt3x/video2x/releases/download/$latestTag/video2x-windows-amd64.zip"
|
||||
New-Item -Path "$env:LOCALAPPDATA\Programs\video2x" -ItemType Directory -Force
|
||||
Expand-Archive -Path .\video2x-windows-amd64.zip -DestinationPath "$env:LOCALAPPDATA\Programs\video2x"
|
||||
```
|
||||
|
||||
You can then add `%LOCALAPPDATA%\Programs\video2x` to your `PATH` environment variable to run `video2x` from the command line.
|
||||
1
docs/book/src/other/README.md
Normal file
1
docs/book/src/other/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Other
|
||||
47
docs/book/src/other/history.md
Normal file
47
docs/book/src/other/history.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# History
|
||||
|
||||
Video2X came a long way from its original concepts to what it has become today. It started as a simple concept of "waifu2x can upscale images, and a video is just a sequence of images". Then, a PoC was made which can barely upscale a single video with waifu2x-caffe and with fixed settings. Now, Video2X has become a comprehensive and customizable video upscaling tool with a nice GUI and a community around it. This article documents in detail how Video2X's concept was born, and what happened during its development.
|
||||
|
||||
## Origin
|
||||
|
||||
The story started with me watching Bad Apple!!'s PV in early 2017. The original PV has a size of `512x384`, which is quite small and thus, quite blurry.
|
||||
|
||||
\
|
||||
_A screenshot of the original Bad Apple!! PV_
|
||||
|
||||
Around the same time, I was introduced to this amazing project named waifu2x, which upscales (mostly anime) images using machine learning. This created a spark in my head: **if images can be upscaled, aren't videos just a sequence of images?** Then, I started making a proof-of-concept by manually extracting all frames from the original PV using FFmpeg, putting them through waifu2x-caffe, and assembling the frames back into a video again using FFmpeg. This was how the ["4K BadApple!! waifu2x Lossless Upscaled"](https://www.youtube.com/watch?v=FiX7ygnbAHw) video was created.
|
||||
|
||||
\
|
||||
_Thumbnail of the "4K BadApple!! waifu2x Lossless Upscaled" video_
|
||||
|
||||
After this experiment completed successfully, I started thinking about making an automation pipeline, where this manual process will be streamlined, and each of the steps will be handled automatically.
|
||||
|
||||
## Proof-of-Concept
|
||||
|
||||
When I signed up for Hack the Valley II in late 2017, I didn't know what I was going to make during that hackathon. Our team sat down and thought about what to make for around an hour, but no one came up with anything interesting. All of a sudden, I remembered, "Hey, isn't there a PoC I wanted to make? How about making that our hackathon project?" I then temporarily name the project Video2X, following waifu2x's scheme. Video2X was then born.
|
||||
|
||||
I originally wanted to write Video2X for Linux, but it's too complicated to get the original [nagadomi/waifu2x](https://github.com/nagadomi/waifu2x)'s version of waifu2x running, so waifu2x-caffe written for Windows was used to save time. This is why the first version of Video2X only supports Windows, and can only use waifu2x-caffe as its upscaling driver.
|
||||
|
||||
\
|
||||
_video2x.py file in the first version of Video2X_
|
||||
|
||||
At the end of the hackathon, we managed to make a [sample comparison video](https://www.youtube.com/watch?v=mGEfasQl2Zo) based on [Spirited Away's official trailer](https://www.youtube.com/watch?v=ByXuk9QqQkk). This video was then published on YouTube and is the same demo video showcased in Video2X's repository. The original link was at [https://www.youtube.com/watch?v=PG94iPoeoZk](https://www.youtube.com/watch?v=PG94iPoeoZk), but it has been moved lately to another account under K4YT3X's name.
|
||||
|
||||
\
|
||||
_Upscale Comparison Demonstration_
|
||||
|
||||
When we demoed this project, there wasn't so much interest expressed by the judges. We were, however, suggested to pitch our project to Adobe. That didn't end up going anywhere, either. Like most of the other projects in a hackathon, this project didn't win any awards, and just almost vanished after the hackathon was over.
|
||||
|
||||
<!--\-->
|
||||
|
||||
_[Image Removed]_\
|
||||
_Our team in Hack the Valley II. You can see Video2X's demo video on the computer screens. Image blurred for privacy._
|
||||
|
||||
## Video2X 2.0
|
||||
|
||||
Roughly three months after the hackathon, I came back to this project and decided it was worth continuing. Although not many people in the hackathon found this project interesting or useful, I saw value in this project. This was further reinforced by the stars I've received in the project's repository.
|
||||
|
||||
I continued working on enhancing Video2X and fixing bugs, and Video2X 2.0 was released. The original version of Video2X was only made as a proof-of-concept for the hackathon. A lot of the usability and convenience aspects are ignored in exchange for development speed. The 2.0 version addressed a lot of these issues and made Video2X usable for regular users. Video2X has then also been converted from a hackathon project to a personal open-source project.
|
||||
|
||||
\
|
||||
_Screenshot of Video2X 2.0_
|
||||
3
docs/book/src/running/README.md
Normal file
3
docs/book/src/running/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Running
|
||||
|
||||
Instructions for running and using this project.
|
||||
49
docs/book/src/running/command-line.md
Normal file
49
docs/book/src/running/command-line.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Command Line
|
||||
|
||||
Instructions for running Video2X from the command line.
|
||||
|
||||
This page does not cover all the options available. For help with more options available, run Video2X with the `--help` argument.
|
||||
|
||||
## Basics
|
||||
|
||||
Use the following command to upscale a video by 4x with RealESRGAN:
|
||||
|
||||
```bash
|
||||
video2x -i input.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
|
||||
Use the following command to upscale a video to with libplacebo + Anime4Kv4 Mode A+A:
|
||||
|
||||
```bash
|
||||
video2x -i input.mp4 -o output.mp4 -f libplacebo -s anime4k-v4-a+a -w 3840 -h 2160
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
It is possible to specify custom MPV-compatible GLSL shader files with the `--shader, -s` argument:
|
||||
|
||||
```bash
|
||||
video2x -i input.mp4 -o output.mp4 -f libplacebo -s path/to/custom/shader.glsl -w 3840 -h 2160
|
||||
```
|
||||
|
||||
List the available GPUs with `--list-gpus, -l`:
|
||||
|
||||
```bash
|
||||
$video2x --list-gpus
|
||||
0. NVIDIA RTX A6000
|
||||
Type: Discrete GPU
|
||||
Vulkan API Version: 1.3.289
|
||||
Driver Version: 565.228.64
|
||||
```
|
||||
|
||||
Select which GPU to use with the `--gpu, -g` argument:
|
||||
|
||||
```bash
|
||||
video2x -i input.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3 -g 1
|
||||
```
|
||||
|
||||
Specify arbitrary extra FFmepg encoder options with the `--extra-encoder-options, -e` argument:
|
||||
|
||||
```bash
|
||||
video2x -i input.mkv -o output.mkv -f realesrgan -m realesrgan-plus -r 4 -c libx264rgb -e crf=17 -e preset=veryslow -e tune=film
|
||||
```
|
||||
57
docs/book/src/running/container.md
Normal file
57
docs/book/src/running/container.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Container
|
||||
|
||||
Instructions for running the Video2X container.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker, Podman, or another OCI-compatible runtime
|
||||
- A GPU that supports the Vulkan API
|
||||
- Check the [Vulkan Hardware Database](https://vulkan.gpuinfo.org/) to see if your GPU supports Vulkan
|
||||
|
||||
## Upscaling a Video
|
||||
|
||||
This section documents how to upscale a video. Replace `$TAG` with an appropriate container tag. A list of available tags can be found [here](https://github.com/k4yt3x/video2x/pkgs/container/video2x) (e.g., `6.1.1`).
|
||||
|
||||
### AMD GPUs
|
||||
|
||||
Make sure your host has the proper GPU and Vulkan libraries and drivers, then use the following command to launch the container:
|
||||
|
||||
```shell
|
||||
docker run --gpus all -it --rm -v $PWD/data:/host ghcr.io/k4yt3x/video2x:$TAG -i standard-test.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
|
||||
### NVIDIA GPUs
|
||||
|
||||
In addition to installing the proper drivers on your host, `nvidia-docker2` (NVIDIA Container Toolkit) must also be installed on the host to use NVIDIA GPUs in containers. Below are instructions for how to install it on some popular Linux distributions:
|
||||
|
||||
- Debian/Ubuntu
|
||||
- Follow the [official guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit) to install `nvidia-docker2`
|
||||
- Arch/Manjaro
|
||||
- Install `nvidia-container-toolkit` from the AUR
|
||||
- E.g., `yay -S nvidia-container-toolkit`
|
||||
|
||||
Once all the prerequisites are installed, you can launch the container:
|
||||
|
||||
```shell
|
||||
docker run --gpus all -it --rm -v $PWD:/host ghcr.io/k4yt3x/video2x:$TAG -i standard-test.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
|
||||
Depending on the version of your nvidia-docker and some other mysterious factors, you can also try setting `no-cgroups = true` in `/etc/nvidia-container-runtime/config.toml` and adding the NVIDIA devices into the container if the command above doesn't work:
|
||||
|
||||
```shell
|
||||
docker run --gpus all --device=/dev/nvidia0 --device=/dev/nvidiactl --runtime nvidia -it --rm -v $PWD:/host ghcr.io/k4yt3x/video2x:$TAG -i standard-test.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
|
||||
If you are still getting a `vkEnumeratePhysicalDevices failed -3` error at this point, try adding the `--privileged` flag to give the container the same level of permissions as the host:
|
||||
|
||||
```shell
|
||||
docker run --gpus all --privileged -it --rm -v $PWD:/host ghcr.io/k4yt3x/video2x:$TAG -i standard-test.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
|
||||
### Intel GPUs
|
||||
|
||||
Similar to NVIDIA GPUs, you can add `--gpus all` or `--device /dev/dri` to pass the GPU into the container. Adding `--privileged` might help with the performance (thanks @NukeninDark).
|
||||
|
||||
```shell
|
||||
docker run --gpus all --privileged -it --rm -v $PWD:/host ghcr.io/k4yt3x/video2x:$TAG -i standard-test.mp4 -o output.mp4 -f realesrgan -r 4 -m realesr-animevideov3
|
||||
```
|
||||
3
docs/book/src/running/desktop.md
Normal file
3
docs/book/src/running/desktop.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Desktop
|
||||
|
||||
TODO.
|
||||
25
include/libvideo2x/avutils.h
Normal file
25
include/libvideo2x/avutils.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
namespace video2x {
|
||||
namespace avutils {
|
||||
|
||||
AVRational get_video_frame_rate(AVFormatContext *ifmt_ctx, int in_vstream_idx);
|
||||
|
||||
int64_t get_video_frame_count(AVFormatContext *ifmt_ctx, int in_vstream_idx);
|
||||
|
||||
AVPixelFormat get_encoder_default_pix_fmt(const AVCodec *encoder, AVPixelFormat target_pix_fmt);
|
||||
|
||||
float get_frame_diff(AVFrame *frame1, AVFrame *frame2);
|
||||
|
||||
void av_bufferref_deleter(AVBufferRef *bufferref);
|
||||
|
||||
void av_frame_deleter(AVFrame *frame);
|
||||
|
||||
void av_packet_deleter(AVPacket *packet);
|
||||
|
||||
} // namespace avutils
|
||||
} // namespace video2x
|
||||
23
include/libvideo2x/conversions.h
Normal file
23
include/libvideo2x/conversions.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <libavutil/frame.h>
|
||||
#include <libswscale/swscale.h>
|
||||
}
|
||||
|
||||
#include <mat.h>
|
||||
|
||||
namespace video2x {
|
||||
namespace conversions {
|
||||
|
||||
// Convert AVFrame to another pixel format
|
||||
AVFrame *convert_avframe_pix_fmt(AVFrame *src_frame, AVPixelFormat pix_fmt);
|
||||
|
||||
// Convert AVFrame to ncnn::Mat
|
||||
ncnn::Mat avframe_to_ncnn_mat(AVFrame *frame);
|
||||
|
||||
// Convert ncnn::Mat to AVFrame
|
||||
AVFrame *ncnn_mat_to_avframe(const ncnn::Mat &mat, AVPixelFormat pix_fmt);
|
||||
|
||||
} // namespace conversions
|
||||
} // namespace video2x
|
||||
34
include/libvideo2x/decoder.h
Normal file
34
include/libvideo2x/decoder.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
namespace video2x {
|
||||
namespace decoder {
|
||||
|
||||
class Decoder {
|
||||
public:
|
||||
Decoder();
|
||||
~Decoder();
|
||||
|
||||
int init(AVHWDeviceType hw_type, AVBufferRef *hw_ctx, const std::filesystem::path &in_fpath);
|
||||
|
||||
AVFormatContext *get_format_context() const;
|
||||
AVCodecContext *get_codec_context() const;
|
||||
int get_video_stream_index() const;
|
||||
|
||||
private:
|
||||
static AVPixelFormat hw_pix_fmt_;
|
||||
static AVPixelFormat get_hw_format(AVCodecContext *ctx, const AVPixelFormat *pix_fmts);
|
||||
|
||||
AVFormatContext *fmt_ctx_;
|
||||
AVCodecContext *dec_ctx_;
|
||||
int in_vstream_idx_;
|
||||
};
|
||||
|
||||
} // namespace decoder
|
||||
} // namespace video2x
|
||||
84
include/libvideo2x/encoder.h
Normal file
84
include/libvideo2x/encoder.h
Normal file
@@ -0,0 +1,84 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/pixdesc.h>
|
||||
}
|
||||
|
||||
#include "fsutils.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace encoder {
|
||||
|
||||
// Encoder configurations
|
||||
struct EncoderConfig {
|
||||
// Non-AVCodecContext options
|
||||
AVCodecID codec = AV_CODEC_ID_NONE;
|
||||
bool copy_streams = true;
|
||||
|
||||
// Basic video options
|
||||
AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
|
||||
|
||||
// Rate control and compression
|
||||
int64_t bit_rate = 0;
|
||||
int rc_buffer_size = 0;
|
||||
int rc_min_rate = 0;
|
||||
int rc_max_rate = 0;
|
||||
int qmin = -1;
|
||||
int qmax = -1;
|
||||
|
||||
// GOP and frame structure
|
||||
int gop_size = -1;
|
||||
int max_b_frames = -1;
|
||||
int keyint_min = -1;
|
||||
int refs = -1;
|
||||
|
||||
// Performance and threading
|
||||
int thread_count = 0;
|
||||
|
||||
// Latency and buffering
|
||||
int delay = -1;
|
||||
|
||||
// Extra AVOptions
|
||||
std::vector<std::pair<fsutils::StringType, fsutils::StringType>> extra_opts;
|
||||
};
|
||||
|
||||
class Encoder {
|
||||
public:
|
||||
Encoder();
|
||||
~Encoder();
|
||||
|
||||
int init(
|
||||
AVBufferRef *hw_ctx,
|
||||
const std::filesystem::path &out_fpath,
|
||||
AVFormatContext *ifmt_ctx,
|
||||
AVCodecContext *dec_ctx,
|
||||
EncoderConfig &enc_cfg,
|
||||
int width,
|
||||
int height,
|
||||
int frm_rate_mul,
|
||||
int in_vstream_idx
|
||||
);
|
||||
|
||||
int write_frame(AVFrame *frame, int64_t frame_idx);
|
||||
int flush();
|
||||
|
||||
AVCodecContext *get_encoder_context() const;
|
||||
AVFormatContext *get_format_context() const;
|
||||
int *get_stream_map() const;
|
||||
int get_output_video_stream_index() const;
|
||||
|
||||
private:
|
||||
AVFormatContext *ofmt_ctx_;
|
||||
AVCodecContext *enc_ctx_;
|
||||
int out_vstream_idx_;
|
||||
int *stream_map_;
|
||||
};
|
||||
|
||||
} // namespace encoder
|
||||
} // namespace video2x
|
||||
64
include/libvideo2x/filter_libplacebo.h
Normal file
64
include/libvideo2x/filter_libplacebo.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavfilter/buffersink.h>
|
||||
#include <libavfilter/buffersrc.h>
|
||||
}
|
||||
|
||||
#include "processor.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
// FilterLibplacebo class definition
|
||||
class FilterLibplacebo : public Filter {
|
||||
public:
|
||||
// Constructor
|
||||
FilterLibplacebo(
|
||||
uint32_t vk_device_index,
|
||||
const std::filesystem::path &shader_path,
|
||||
int width,
|
||||
int height
|
||||
);
|
||||
|
||||
// Destructor
|
||||
virtual ~FilterLibplacebo() override;
|
||||
|
||||
// Initializes the filter with decoder and encoder contexts
|
||||
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
|
||||
|
||||
// Processes an input frame and returns the processed frame
|
||||
int filter(AVFrame *in_frame, AVFrame **out_frame) override;
|
||||
|
||||
// Flushes any remaining frames
|
||||
int flush(std::vector<AVFrame *> &flushed_frames) override;
|
||||
|
||||
// Returns the filter's type
|
||||
ProcessorType get_processor_type() const override { return ProcessorType::Libplacebo; }
|
||||
|
||||
// Returns the filter's output dimensions
|
||||
void get_output_dimensions(
|
||||
const ProcessorConfig &proc_cfg,
|
||||
int in_width,
|
||||
int in_height,
|
||||
int &out_width,
|
||||
int &out_height
|
||||
) const override;
|
||||
|
||||
private:
|
||||
AVFilterGraph *filter_graph_;
|
||||
AVFilterContext *buffersrc_ctx_;
|
||||
AVFilterContext *buffersink_ctx_;
|
||||
uint32_t vk_device_index_;
|
||||
const std::filesystem::path shader_path_;
|
||||
int width_;
|
||||
int height_;
|
||||
AVRational in_time_base_;
|
||||
AVRational out_time_base_;
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
63
include/libvideo2x/filter_realcugan.h
Normal file
63
include/libvideo2x/filter_realcugan.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
}
|
||||
|
||||
#include "processor.h"
|
||||
#include "realcugan.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
// FilterRealcugan class definition
|
||||
class FilterRealcugan : public Filter {
|
||||
public:
|
||||
// Constructor
|
||||
FilterRealcugan(
|
||||
int gpuid = 0,
|
||||
bool tta_mode = false,
|
||||
int scaling_factor = 4,
|
||||
int noise_level = -1,
|
||||
int num_threads = 1,
|
||||
int syncgap = 3,
|
||||
const fsutils::StringType model_name = STR("models-pro")
|
||||
);
|
||||
|
||||
// Destructor
|
||||
virtual ~FilterRealcugan() override;
|
||||
|
||||
// Initializes the filter with decoder and encoder contexts
|
||||
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
|
||||
|
||||
// Processes an input frame and returns the processed frame
|
||||
int filter(AVFrame *in_frame, AVFrame **out_frame) override;
|
||||
|
||||
// Returns the filter's type
|
||||
ProcessorType get_processor_type() const override { return ProcessorType::RealCUGAN; }
|
||||
|
||||
// Returns the filter's output dimensions
|
||||
void get_output_dimensions(
|
||||
const ProcessorConfig &proc_cfg,
|
||||
int in_width,
|
||||
int in_height,
|
||||
int &out_width,
|
||||
int &out_height
|
||||
) const override;
|
||||
|
||||
private:
|
||||
RealCUGAN *realcugan_;
|
||||
int gpuid_;
|
||||
bool tta_mode_;
|
||||
int scaling_factor_;
|
||||
int noise_level_;
|
||||
int num_threads_;
|
||||
int syncgap_;
|
||||
const fsutils::StringType model_name_;
|
||||
AVRational in_time_base_;
|
||||
AVRational out_time_base_;
|
||||
AVPixelFormat out_pix_fmt_;
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
57
include/libvideo2x/filter_realesrgan.h
Normal file
57
include/libvideo2x/filter_realesrgan.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
}
|
||||
|
||||
#include "processor.h"
|
||||
#include "realesrgan.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
// FilterRealesrgan class definition
|
||||
class FilterRealesrgan : public Filter {
|
||||
public:
|
||||
// Constructor
|
||||
FilterRealesrgan(
|
||||
int gpuid = 0,
|
||||
bool tta_mode = false,
|
||||
int scaling_factor = 4,
|
||||
const fsutils::StringType model_name = STR("realesr-animevideov3")
|
||||
);
|
||||
|
||||
// Destructor
|
||||
virtual ~FilterRealesrgan() override;
|
||||
|
||||
// Initializes the filter with decoder and encoder contexts
|
||||
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
|
||||
|
||||
// Processes an input frame and returns the processed frame
|
||||
int filter(AVFrame *in_frame, AVFrame **out_frame) override;
|
||||
|
||||
// Returns the filter's type
|
||||
ProcessorType get_processor_type() const override { return ProcessorType::RealESRGAN; }
|
||||
|
||||
// Returns the filter's output dimensions
|
||||
void get_output_dimensions(
|
||||
const ProcessorConfig &proc_cfg,
|
||||
int in_width,
|
||||
int in_height,
|
||||
int &out_width,
|
||||
int &out_height
|
||||
) const override;
|
||||
|
||||
private:
|
||||
RealESRGAN *realesrgan_;
|
||||
int gpuid_;
|
||||
bool tta_mode_;
|
||||
int scaling_factor_;
|
||||
const fsutils::StringType model_name_;
|
||||
AVRational in_time_base_;
|
||||
AVRational out_time_base_;
|
||||
AVPixelFormat out_pix_fmt_;
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
36
include/libvideo2x/fsutils.h
Normal file
36
include/libvideo2x/fsutils.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
namespace video2x {
|
||||
namespace fsutils {
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef wchar_t CharType;
|
||||
#define STR(x) L##x
|
||||
#else
|
||||
typedef char CharType;
|
||||
#define STR(x) x
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef std::wstring StringType;
|
||||
#else
|
||||
typedef std::string StringType;
|
||||
#endif
|
||||
|
||||
bool filepath_is_readable(const std::filesystem::path &path);
|
||||
|
||||
std::filesystem::path find_resource_file(const std::filesystem::path &path);
|
||||
|
||||
std::string path_to_u8string(const std::filesystem::path &path);
|
||||
|
||||
std::string wstring_to_u8string(const fsutils::StringType &wstr);
|
||||
|
||||
fsutils::StringType path_to_string_type(const std::filesystem::path &path);
|
||||
|
||||
fsutils::StringType to_string_type(int value);
|
||||
|
||||
} // namespace fsutils
|
||||
} // namespace video2x
|
||||
62
include/libvideo2x/interpolator_rife.h
Normal file
62
include/libvideo2x/interpolator_rife.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
}
|
||||
|
||||
#include "processor.h"
|
||||
#include "rife.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
// InterpolatorRIFE class definition
|
||||
class InterpolatorRIFE : public Interpolator {
|
||||
public:
|
||||
// Constructor
|
||||
InterpolatorRIFE(
|
||||
int gpuid = 0,
|
||||
bool tta_mode = false,
|
||||
bool tta_temporal_mode = false,
|
||||
bool uhd_mode = false,
|
||||
int num_threads = 1,
|
||||
const fsutils::StringType model_name = STR("rife-v4.6")
|
||||
);
|
||||
|
||||
// Destructor
|
||||
virtual ~InterpolatorRIFE() override;
|
||||
|
||||
// Initializes the interpolator with decoder and encoder contexts
|
||||
int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) override;
|
||||
|
||||
// Processes an input frame and returns the processed frame
|
||||
int interpolate(AVFrame *prev_frame, AVFrame *in_frame, AVFrame **out_frame, float time_step)
|
||||
override;
|
||||
|
||||
// Returns the interpolator's type
|
||||
ProcessorType get_processor_type() const override { return ProcessorType::RIFE; }
|
||||
|
||||
// Returns the interpolator's output dimensions
|
||||
void get_output_dimensions(
|
||||
const ProcessorConfig &proc_cfg,
|
||||
int in_width,
|
||||
int in_height,
|
||||
int &out_width,
|
||||
int &out_height
|
||||
) const override;
|
||||
|
||||
private:
|
||||
RIFE *rife_;
|
||||
int gpuid_;
|
||||
bool tta_mode_;
|
||||
bool tta_temporal_mode_;
|
||||
bool uhd_mode_;
|
||||
int num_threads_;
|
||||
const fsutils::StringType model_name_;
|
||||
AVRational in_time_base_;
|
||||
AVRational out_time_base_;
|
||||
AVPixelFormat out_pix_fmt_;
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
25
include/libvideo2x/libplacebo.h
Normal file
25
include/libvideo2x/libplacebo.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavfilter/avfilter.h>
|
||||
}
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
int init_libplacebo(
|
||||
AVFilterGraph **filter_graph,
|
||||
AVFilterContext **buffersrc_ctx,
|
||||
AVFilterContext **buffersink_ctx,
|
||||
AVCodecContext *dec_ctx,
|
||||
int out_width,
|
||||
int out_height,
|
||||
uint32_t vk_device_index,
|
||||
const std::filesystem::path &shader_path
|
||||
);
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
94
include/libvideo2x/libvideo2x.h
Normal file
94
include/libvideo2x/libvideo2x.h
Normal file
@@ -0,0 +1,94 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
#include "avutils.h"
|
||||
#include "decoder.h"
|
||||
#include "encoder.h"
|
||||
#include "libvideo2x_export.h"
|
||||
#include "processor.h"
|
||||
|
||||
namespace video2x {
|
||||
|
||||
enum class VideoProcessorState {
|
||||
Idle,
|
||||
Running,
|
||||
Paused,
|
||||
Failed,
|
||||
Aborted,
|
||||
Completed
|
||||
};
|
||||
|
||||
class LIBVIDEO2X_API VideoProcessor {
|
||||
public:
|
||||
VideoProcessor(
|
||||
const processors::ProcessorConfig proc_cfg,
|
||||
const encoder::EncoderConfig enc_cfg,
|
||||
const uint32_t vk_device_idx = 0,
|
||||
const AVHWDeviceType hw_device_type = AV_HWDEVICE_TYPE_NONE,
|
||||
const bool benchmark = false
|
||||
);
|
||||
|
||||
virtual ~VideoProcessor() = default;
|
||||
|
||||
[[nodiscard]] int
|
||||
process(const std::filesystem::path in_fname, const std::filesystem::path out_fname);
|
||||
|
||||
void pause() { state_.store(VideoProcessorState::Paused); }
|
||||
void resume() { state_.store(VideoProcessorState::Running); }
|
||||
void abort() { state_.store(VideoProcessorState::Aborted); }
|
||||
|
||||
VideoProcessorState get_state() const { return state_.load(); }
|
||||
int64_t get_processed_frames() const { return frame_idx_.load(); }
|
||||
int64_t get_total_frames() const { return total_frames_.load(); }
|
||||
|
||||
private:
|
||||
[[nodiscard]] int process_frames(
|
||||
decoder::Decoder &decoder,
|
||||
encoder::Encoder &encoder,
|
||||
std::unique_ptr<processors::Processor> &processor
|
||||
);
|
||||
|
||||
[[nodiscard]] int write_frame(AVFrame *frame, encoder::Encoder &encoder);
|
||||
|
||||
[[nodiscard]] inline int write_raw_packet(
|
||||
AVPacket *packet,
|
||||
AVFormatContext *ifmt_ctx,
|
||||
AVFormatContext *ofmt_ctx,
|
||||
int *stream_map
|
||||
);
|
||||
|
||||
[[nodiscard]] inline int process_filtering(
|
||||
std::unique_ptr<processors::Processor> &processor,
|
||||
encoder::Encoder &encoder,
|
||||
AVFrame *frame,
|
||||
AVFrame *proc_frame
|
||||
);
|
||||
|
||||
[[nodiscard]] inline int process_interpolation(
|
||||
std::unique_ptr<processors::Processor> &processor,
|
||||
encoder::Encoder &encoder,
|
||||
std::unique_ptr<AVFrame, decltype(&avutils::av_frame_deleter)> &prev_frame,
|
||||
AVFrame *frame,
|
||||
AVFrame *proc_frame
|
||||
);
|
||||
|
||||
processors::ProcessorConfig proc_cfg_;
|
||||
encoder::EncoderConfig enc_cfg_;
|
||||
uint32_t vk_device_idx_ = 0;
|
||||
AVHWDeviceType hw_device_type_ = AV_HWDEVICE_TYPE_NONE;
|
||||
bool benchmark_ = false;
|
||||
|
||||
std::atomic<VideoProcessorState> state_ = VideoProcessorState::Idle;
|
||||
std::atomic<int64_t> frame_idx_ = 0;
|
||||
std::atomic<int64_t> total_frames_ = 0;
|
||||
};
|
||||
|
||||
} // namespace video2x
|
||||
11
include/libvideo2x/libvideo2x_export.h
Normal file
11
include/libvideo2x/libvideo2x_export.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef LIBVIDEO2X_EXPORTS
|
||||
#define LIBVIDEO2X_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBVIDEO2X_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define LIBVIDEO2X_API
|
||||
#endif
|
||||
48
include/libvideo2x/logger_manager.h
Normal file
48
include/libvideo2x/logger_manager.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <spdlog/logger.h>
|
||||
#include <spdlog/sinks/sink.h>
|
||||
|
||||
#include "libvideo2x_export.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace logger_manager {
|
||||
|
||||
class LIBVIDEO2X_API LoggerManager {
|
||||
public:
|
||||
LoggerManager(const LoggerManager &) = delete;
|
||||
LoggerManager &operator=(const LoggerManager &) = delete;
|
||||
|
||||
static LoggerManager &instance();
|
||||
|
||||
std::shared_ptr<spdlog::logger> logger();
|
||||
|
||||
bool reconfigure_logger(
|
||||
const std::string &logger_name,
|
||||
const std::vector<spdlog::sink_ptr> &sinks,
|
||||
const std::string &pattern = "%+"
|
||||
);
|
||||
|
||||
bool set_log_level(const std::string &level_str);
|
||||
|
||||
void hook_ffmpeg_logging();
|
||||
void unhook_ffmpeg_logging();
|
||||
|
||||
private:
|
||||
LoggerManager();
|
||||
|
||||
std::shared_ptr<spdlog::logger> logger_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace logger_manager
|
||||
|
||||
// Convenience function to get the logger instance
|
||||
inline std::shared_ptr<spdlog::logger> logger() {
|
||||
return logger_manager::LoggerManager::instance().logger();
|
||||
}
|
||||
|
||||
} // namespace video2x
|
||||
98
include/libvideo2x/processor.h
Normal file
98
include/libvideo2x/processor.h
Normal file
@@ -0,0 +1,98 @@
|
||||
#pragma once
|
||||
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavfilter/avfilter.h>
|
||||
#include <libavutil/buffer.h>
|
||||
}
|
||||
|
||||
#include "fsutils.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
enum class ProcessingMode {
|
||||
Filter,
|
||||
Interpolate,
|
||||
};
|
||||
|
||||
enum class ProcessorType {
|
||||
None,
|
||||
Libplacebo,
|
||||
RealESRGAN,
|
||||
RealCUGAN,
|
||||
RIFE,
|
||||
};
|
||||
|
||||
struct LibplaceboConfig {
|
||||
fsutils::StringType shader_path;
|
||||
};
|
||||
|
||||
struct RealESRGANConfig {
|
||||
bool tta_mode = false;
|
||||
fsutils::StringType model_name;
|
||||
};
|
||||
|
||||
struct RealCUGANConfig {
|
||||
bool tta_mode = false;
|
||||
int num_threads = 1;
|
||||
int syncgap = 3;
|
||||
fsutils::StringType model_name;
|
||||
};
|
||||
|
||||
struct RIFEConfig {
|
||||
bool tta_mode = false;
|
||||
bool tta_temporal_mode = false;
|
||||
bool uhd_mode = false;
|
||||
int num_threads = 0;
|
||||
fsutils::StringType model_name;
|
||||
};
|
||||
|
||||
// Unified filter configuration
|
||||
struct ProcessorConfig {
|
||||
ProcessorType processor_type = ProcessorType::None;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int scaling_factor = 0;
|
||||
int noise_level = -1;
|
||||
int frm_rate_mul = 0;
|
||||
float scn_det_thresh = 0.0f;
|
||||
std::variant<LibplaceboConfig, RealESRGANConfig, RealCUGANConfig, RIFEConfig> config;
|
||||
};
|
||||
|
||||
class Processor {
|
||||
public:
|
||||
virtual ~Processor() = default;
|
||||
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) = 0;
|
||||
virtual int flush(std::vector<AVFrame *> &) { return 0; }
|
||||
virtual ProcessingMode get_processing_mode() const = 0;
|
||||
virtual ProcessorType get_processor_type() const = 0;
|
||||
virtual void get_output_dimensions(
|
||||
const ProcessorConfig &proc_cfg,
|
||||
int in_width,
|
||||
int in_height,
|
||||
int &width,
|
||||
int &height
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
// Abstract base class for filters
|
||||
class Filter : public Processor {
|
||||
public:
|
||||
ProcessingMode get_processing_mode() const override { return ProcessingMode::Filter; }
|
||||
virtual int filter(AVFrame *in_frame, AVFrame **out_frame) = 0;
|
||||
};
|
||||
|
||||
// Abstract base class for interpolators
|
||||
class Interpolator : public Processor {
|
||||
public:
|
||||
ProcessingMode get_processing_mode() const override { return ProcessingMode::Interpolate; }
|
||||
virtual int
|
||||
interpolate(AVFrame *prev_frame, AVFrame *in_frame, AVFrame **out_frame, float time_step) = 0;
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
39
include/libvideo2x/processor_factory.h
Normal file
39
include/libvideo2x/processor_factory.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "processor.h"
|
||||
|
||||
namespace video2x {
|
||||
namespace processors {
|
||||
|
||||
// Processor Factory Class
|
||||
class ProcessorFactory {
|
||||
public:
|
||||
using Creator = std::function<std::unique_ptr<Processor>(const ProcessorConfig &, uint32_t)>;
|
||||
|
||||
// Singleton instance accessor
|
||||
static ProcessorFactory &instance();
|
||||
|
||||
// Register a processor type with its creation function
|
||||
void register_processor(ProcessorType type, Creator creator);
|
||||
|
||||
// Create a processor instance based on configuration
|
||||
std::unique_ptr<Processor>
|
||||
create_processor(const ProcessorConfig &proc_cfg, uint32_t vk_device_index) const;
|
||||
|
||||
private:
|
||||
// Private constructor for Singleton
|
||||
ProcessorFactory() = default;
|
||||
|
||||
// Map of processor types to their creation functions
|
||||
std::unordered_map<ProcessorType, Creator> creators;
|
||||
|
||||
// Static initializer for default processors
|
||||
static void init_default_processors(ProcessorFactory &factory);
|
||||
};
|
||||
|
||||
} // namespace processors
|
||||
} // namespace video2x
|
||||
7
include/libvideo2x/version.h.in
Normal file
7
include/libvideo2x/version.h.in
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace video2x {
|
||||
|
||||
#define LIBVIDEO2X_VERSION_STRING "@PROJECT_VERSION@"
|
||||
|
||||
} // namespace video2x
|
||||
2585
models/libplacebo/anime4k-v4-a+a.glsl
vendored
Normal file
2585
models/libplacebo/anime4k-v4-a+a.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2309
models/libplacebo/anime4k-v4-a.glsl
vendored
Normal file
2309
models/libplacebo/anime4k-v4-a.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2585
models/libplacebo/anime4k-v4-b+b.glsl
vendored
Normal file
2585
models/libplacebo/anime4k-v4-b+b.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2309
models/libplacebo/anime4k-v4-b.glsl
vendored
Normal file
2309
models/libplacebo/anime4k-v4-b.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1711
models/libplacebo/anime4k-v4-c+a.glsl
vendored
Normal file
1711
models/libplacebo/anime4k-v4-c+a.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1435
models/libplacebo/anime4k-v4-c.glsl
vendored
Normal file
1435
models/libplacebo/anime4k-v4-c.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9173
models/libplacebo/anime4k-v4.1-gan.glsl
vendored
Normal file
9173
models/libplacebo/anime4k-v4.1-gan.glsl
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
models/realcugan/models-nose/up2x-no-denoise.bin
vendored
Normal file
BIN
models/realcugan/models-nose/up2x-no-denoise.bin
vendored
Normal file
Binary file not shown.
37
models/realcugan/models-nose/up2x-no-denoise.param
vendored
Normal file
37
models/realcugan/models-nose/up2x-no-denoise.param
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
7767517
|
||||
35 39
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 4 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Crop slice_43 1 1 5 9 -23309=2,4,4 -23310=2,-4,-4 -23311=2,1,2
|
||||
Deconvolution deconvrelu_0 1 1 8 10 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_0 2 1 10 9 11
|
||||
Convolution convrelu_5 1 1 11 12 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_20 1 1 12 13 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_1 1 2 13 14 15
|
||||
Convolution convrelu_6 1 1 14 16 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_7 1 1 16 17 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_2 1 2 17 18 19
|
||||
Convolution convrelu_8 1 1 18 20 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_9 1 1 20 21 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 21 22 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 22 23 24
|
||||
Convolution convrelu_11 1 1 23 25 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_12 1 1 25 26 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_13 1 1 26 27 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Crop slice_44 1 1 24 28 -23309=2,4,4 -23310=2,-4,-4 -23311=2,1,2
|
||||
Deconvolution deconvrelu_1 1 1 27 29 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 29 28 30
|
||||
Convolution convrelu_14 1 1 30 31 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 31 32 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Crop slice_45 1 1 19 33 -23309=2,16,16 -23310=2,-16,-16 -23311=2,1,2
|
||||
Deconvolution deconvrelu_2 1 1 32 34 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_2 2 1 34 33 35
|
||||
Convolution convrelu_16 1 1 35 36 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_18 1 1 36 37 0=3 1=3 5=1 6=1728
|
||||
Crop slice_46 1 1 15 38 -23309=2,20,20 -23310=2,-20,-20 -23311=2,1,2
|
||||
BinaryOp add_3 2 1 37 38 out0
|
||||
BIN
models/realcugan/models-pro/up2x-conservative.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up2x-conservative.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up2x-conservative.param
vendored
Normal file
57
models/realcugan/models-pro/up2x-conservative.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-pro/up2x-denoise3x.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up2x-denoise3x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up2x-denoise3x.param
vendored
Normal file
57
models/realcugan/models-pro/up2x-denoise3x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-pro/up2x-no-denoise.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up2x-no-denoise.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up2x-no-denoise.param
vendored
Normal file
57
models/realcugan/models-pro/up2x-no-denoise.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-pro/up3x-conservative.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up3x-conservative.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up3x-conservative.param
vendored
Normal file
57
models/realcugan/models-pro/up3x-conservative.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-pro/up3x-denoise3x.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up3x-denoise3x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up3x-denoise3x.param
vendored
Normal file
57
models/realcugan/models-pro/up3x-denoise3x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-pro/up3x-no-denoise.bin
vendored
Normal file
BIN
models/realcugan/models-pro/up3x-no-denoise.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-pro/up3x-no-denoise.param
vendored
Normal file
57
models/realcugan/models-pro/up3x-no-denoise.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 10 11 12
|
||||
Pooling mean_64 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_2 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_3 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 20 21 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 30 31 32
|
||||
Pooling mean_65 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_4 2 1 31 35 36 0=2
|
||||
Split splitncnn_5 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 41 42 43
|
||||
Pooling mean_66 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_5 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 52 53 54
|
||||
Pooling mean_67 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_7 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_8 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 63 64 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_9 2 1 64 62 out0
|
||||
BIN
models/realcugan/models-se/up2x-conservative.bin
vendored
Normal file
BIN
models/realcugan/models-se/up2x-conservative.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up2x-conservative.param
vendored
Normal file
57
models/realcugan/models-se/up2x-conservative.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up2x-denoise1x.bin
vendored
Normal file
BIN
models/realcugan/models-se/up2x-denoise1x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up2x-denoise1x.param
vendored
Normal file
57
models/realcugan/models-se/up2x-denoise1x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up2x-denoise2x.bin
vendored
Normal file
BIN
models/realcugan/models-se/up2x-denoise2x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up2x-denoise2x.param
vendored
Normal file
57
models/realcugan/models-se/up2x-denoise2x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up2x-denoise3x.bin
vendored
Normal file
BIN
models/realcugan/models-se/up2x-denoise3x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up2x-denoise3x.param
vendored
Normal file
57
models/realcugan/models-se/up2x-denoise3x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up2x-no-denoise.bin
vendored
Normal file
BIN
models/realcugan/models-se/up2x-no-denoise.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up2x-no-denoise.param
vendored
Normal file
57
models/realcugan/models-se/up2x-no-denoise.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=4 3=2 4=3 5=1 6=3072
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up3x-conservative.bin
vendored
Normal file
BIN
models/realcugan/models-se/up3x-conservative.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up3x-conservative.param
vendored
Normal file
57
models/realcugan/models-se/up3x-conservative.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up3x-denoise3x.bin
vendored
Normal file
BIN
models/realcugan/models-se/up3x-denoise3x.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up3x-denoise3x.param
vendored
Normal file
57
models/realcugan/models-se/up3x-denoise3x.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up3x-no-denoise.bin
vendored
Normal file
BIN
models/realcugan/models-se/up3x-no-denoise.bin
vendored
Normal file
Binary file not shown.
57
models/realcugan/models-se/up3x-no-denoise.param
vendored
Normal file
57
models/realcugan/models-se/up3x-no-denoise.param
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
7767517
|
||||
55 63
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 2 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 2 3 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_0 1 2 3 4 5
|
||||
Convolution convrelu_2 1 1 5 6 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 6 7 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 7 8 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 8 9 10
|
||||
Pooling mean_64 1 1 10 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 12 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 12 13 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 9 13 14 0=2
|
||||
Crop pad_9 1 1 4 15 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 14 16 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 15 16 17
|
||||
Convolution convrelu_6 1 1 17 18 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_48 1 1 18 19 0=3 1=5 3=3 4=2 5=1 6=4800
|
||||
Split splitncnn_2 1 2 19 20 21
|
||||
Convolution convrelu_7 1 1 21 22 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 22 23 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_3 1 2 23 24 25
|
||||
Convolution convrelu_9 1 1 25 26 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 26 27 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 27 28 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 28 29 30
|
||||
Pooling mean_65 1 1 30 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 32 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 32 33 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 29 33 34 0=2
|
||||
Split splitncnn_5 1 2 34 35 36
|
||||
Convolution convrelu_13 1 1 36 37 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 37 38 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 38 39 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_6 1 2 39 40 41
|
||||
Pooling mean_66 1 1 41 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 43 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 43 44 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 40 44 45 0=2
|
||||
Crop pad_10 1 1 35 46 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 45 47 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 46 47 48
|
||||
Convolution convrelu_17 1 1 48 49 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 49 50 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 50 51 52
|
||||
Pooling mean_67 1 1 52 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 54 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 54 55 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 51 55 56 0=2
|
||||
Crop pad_11 1 1 24 57 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 56 58 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 57 58 59
|
||||
Crop pad_12 1 1 20 60 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 59 61 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_46 1 1 61 62 0=3 1=3 5=1 6=1728
|
||||
BinaryOp add_7 2 1 62 60 out0
|
||||
BIN
models/realcugan/models-se/up4x-conservative.bin
vendored
Normal file
BIN
models/realcugan/models-se/up4x-conservative.bin
vendored
Normal file
Binary file not shown.
60
models/realcugan/models-se/up4x-conservative.param
vendored
Normal file
60
models/realcugan/models-se/up4x-conservative.param
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
7767517
|
||||
58 66
|
||||
Input in0 0 1 in0
|
||||
Convolution convrelu_0 1 1 in0 4 0=32 1=3 5=1 6=864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_1 1 1 4 5 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_1 1 2 5 6 7
|
||||
Convolution convrelu_2 1 1 7 8 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_3 1 1 8 9 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_4 1 1 9 10 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_2 1 2 10 11 12
|
||||
Pooling mean_68 1 1 12 gap0 0=1 4=1
|
||||
InnerProduct convrelu_5 1 1 gap0 14 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_21 1 1 14 15 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_0 2 1 11 15 16 0=2
|
||||
Crop pad_9 1 1 6 17 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_0 1 1 16 18 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_1 2 1 17 18 19
|
||||
Convolution convrelu_6 1 1 19 20 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Deconvolution deconv_51 1 1 20 21 0=64 1=4 3=2 4=3 5=1 6=65536
|
||||
Split splitncnn_3 1 2 21 22 23
|
||||
Convolution convrelu_7 1 1 23 24 0=32 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_8 1 1 24 25 0=64 1=3 5=1 6=18432 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_4 1 2 25 26 27
|
||||
Convolution convrelu_9 1 1 27 28 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_10 1 1 28 29 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_11 1 1 29 30 0=128 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_5 1 2 30 31 32
|
||||
Pooling mean_69 1 1 32 gap1 0=1 4=1
|
||||
InnerProduct convrelu_12 1 1 gap1 34 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_22 1 1 34 35 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_2 2 1 31 35 36 0=2
|
||||
Split splitncnn_6 1 2 36 37 38
|
||||
Convolution convrelu_13 1 1 38 39 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_14 1 1 39 40 0=256 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_15 1 1 40 41 0=128 1=3 5=1 6=294912 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_7 1 2 41 42 43
|
||||
Pooling mean_70 1 1 43 gap2 0=1 4=1
|
||||
InnerProduct convrelu_16 1 1 gap2 45 0=16 1=1 2=2048 9=1
|
||||
InnerProduct convsigmoid_23 1 1 45 46 0=128 1=1 2=2048 9=4
|
||||
BinaryOp mul_3 2 1 42 46 47 0=2
|
||||
Crop pad_10 1 1 37 48 -23309=2,4,4 -23310=2,-4,-4 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_1 1 1 47 49 0=128 1=2 3=2 5=1 6=65536 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_4 2 1 48 49 50
|
||||
Convolution convrelu_17 1 1 50 51 0=64 1=3 5=1 6=73728 9=2 -23310=1,1.000000e-01
|
||||
Convolution convrelu_18 1 1 51 52 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Split splitncnn_8 1 2 52 53 54
|
||||
Pooling mean_71 1 1 54 gap3 0=1 4=1
|
||||
InnerProduct convrelu_19 1 1 gap3 56 0=8 1=1 2=512 9=1
|
||||
InnerProduct convsigmoid_24 1 1 56 57 0=64 1=1 2=512 9=4
|
||||
BinaryOp mul_5 2 1 53 57 58 0=2
|
||||
Crop pad_11 1 1 26 59 -23309=2,16,16 -23310=2,-16,-16 -23311=2,-2,-1
|
||||
Deconvolution deconvrelu_2 1 1 58 60 0=64 1=2 3=2 5=1 6=16384 9=2 -23310=1,1.000000e-01
|
||||
BinaryOp add_6 2 1 59 60 61
|
||||
Crop pad_12 1 1 22 62 -23309=2,20,20 -23310=2,-20,-20 -23311=2,-2,-1
|
||||
Convolution convrelu_20 1 1 61 63 0=64 1=3 5=1 6=36864 9=2 -23310=1,1.000000e-01
|
||||
Convolution conv_48 1 1 63 64 0=64 1=3 5=1 6=36864
|
||||
BinaryOp add_7 2 1 64 62 65
|
||||
Convolution conv_49 1 1 65 66 0=12 1=3 5=1 6=6912
|
||||
Crop pad_13 1 1 66 67 -23309=2,1,1 -23310=2,-1,-1 -23311=2,-2,-1
|
||||
PixelShuffle pixelshuffle_66 1 1 67 out0 0=2
|
||||
BIN
models/realcugan/models-se/up4x-denoise3x.bin
vendored
Normal file
BIN
models/realcugan/models-se/up4x-denoise3x.bin
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user