159 Commits

Author SHA1 Message Date
Salman Chishti
5909f627fb ci(*): upgrade GitHub Actions for Node 24 compatibility (#1454)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-27 08:04:06 +00:00
Salman Chishti
ce07604217 ci(*): upgrade GitHub Actions to latest versions (#1455)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-01-27 08:01:58 +00:00
k4yt3x
8a9e571114 feat(encoder): add separate audio/subtitle copy and recalculate PTS option
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-11-23 00:00:00 +00:00
k4yt3x
f3df895890 ci(build): update setup-vulkan-sdk to v1.2.1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-10-15 00:00:00 +00:00
k4yt3x
d848db037a deps(rife): update librife-ncnn-vulkan to fix ncnn compatibility issues
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-10-15 00:00:00 +00:00
Michael
feb84c3cae deps(ncnn): bump ncnn to 20250503 to fix black output frames on RADV (#1410)
Signed-off-by: Michael <mwp.foss@gmail.com>
2025-08-03 08:10:57 +00:00
k4yt3x
6bf0ee527d docs(readme): add hardware requirements
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-03-26 00:00:00 +00:00
k4yt3x
4668556417 docs(book): correct the renamed CLI arguments
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-03-23 00:00:00 +00:00
k4yt3x
d6403dc1a4 docs(readme): update file server URLs
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-03-09 00:00:00 +00:00
k4yt3x
66778b7feb docs(book): add docs for setting the encoder options
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-24 00:00:00 +00:00
k4yt3x
445d13b73b fix(libvideo2x): fix atomic int64_t frame_idx_ self add
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-08 00:00:00 +00:00
k4yt3x
8803cf10a4 fix(video2x): allow Real-ESRGAN noise to be -1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-08 00:00:00 +00:00
k4yt3x
3e987b9693 docs(book): update command arguments in the container usages (#1323)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-04 00:00:00 +00:00
k4yt3x
afa37f9e58 chore(models): add the Real-ESRGAN general models (#1319)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-02 00:00:00 +00:00
k4yt3x
2c5a059d39 build(arch): move PKGBUILD openmp from makedepends to depends
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-02-02 00:00:00 +00:00
lbrunkho
0585130f09 ci(dockerfile): add the missing openmp dependency (#1317) 2025-02-02 00:30:06 +00:00
k4yt3x
5d043cab3b docs(book): update Linux AppImage and Ubuntu build instructions
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-27 00:00:00 +00:00
Integral
73113feb38 docs: add archlinuxcn/video2x-qt6 to readme & linux installation guide (#1307) 2025-01-25 05:48:06 +00:00
k4yt3x
a0b8611ea2 docs(readme): update readme for 6.4.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-24 00:00:00 +00:00
k4yt3x
a96bda9b4d docs(changelog): update changelogs for 6.4.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-24 00:00:00 +00:00
k4yt3x
aecb16b467 feat(video2x): use boost::po to validate the required options
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-24 00:00:00 +00:00
k4yt3x
7d10fa2814 fix(encoder): re-add PTS calculation after processing for interpolators
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-21 00:00:00 +00:00
Dawei Feng
9d4b21b4c1 feat(rife): add support for rife v4.25 & v4.26 (#1304)
* chore(deps): update rife submodule
* update: add support for rife v4.25 & v4.26
* style(*): format code with clang-format

---------

Signed-off-by: k4yt3x <i@k4yt3x.com>
Co-authored-by: k4yt3x <i@k4yt3x.com>
2025-01-21 17:37:35 +00:00
k4yt3x
947788225e fix(encoder): fix a bug that causes the wrong encoder to be selected
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-20 00:00:00 +00:00
k4yt3x
eae89cea4b feat(libvideo2x): allow processing videos without PTS information
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-18 00:00:00 +00:00
k4yt3x
43ecf9e825 build(just): make CMake generator a variable
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-18 00:00:00 +00:00
k4yt3x
0bbee7c66b chore(models): remove the Real-ESRGAN x2 Plus model as it is broken
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-17 00:00:00 +00:00
k4yt3x
54b39643a9 style(*): format source code under tools with clang-format
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-14 00:00:00 +00:00
K4YT3X
031c0a72fb docs(issue): add issue templates (#1298) 2025-01-13 23:44:47 +00:00
k4yt3x
774fd4f8c2 fix(fsutils): fix resource finding in AppImage
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-11 00:00:00 +00:00
k4yt3x
55556e60a1 build(cmake): adjust installation paths on Windows 2025-01-10 16:19:34 -05:00
k4yt3x
49ce40b05f build(cmake): always use CMake install directory variables
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
b40beef9ab build(cmake): fix ncnn layer Reshape not found
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
b4b666af3e chore(models): add the Real-ESRGAN x2 Plus model
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
8b630cf0c7 build(appimage): add AppImage build script
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
68796e630e fix(*): fix missing ncnn features
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
ae9b69ac2e docs(book): update build instructions for Linux with just
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-10 00:00:00 +00:00
k4yt3x
6ab1759e1a docs(contributing): add contributing guidelines
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-09 00:00:00 +00:00
k4yt3x
9e27aed644 style(*): set deleted object pointers to nullptr
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-09 00:00:00 +00:00
k4yt3x
1edec941c7 build(cmake): fix libvideo2x output file name
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-08 00:00:00 +00:00
k4yt3x
e7096887ed style(*): remove redundant nullptr checks on object deletion (#1288)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-08 00:00:00 +00:00
Henje
8ffe1b84bd feat(encoder): copy input streams' metadata to output streams (#1284)
* feat(encoder): copy language tag for audio and subtitle streams

Containers with audio streams for different languages use a tag
to signal which track contains which language. This information is
saved in the metadata object of a stream and needs to be copied
in addition to the codec properties.

* feat(encoder): copy input streams' metadata to output streams

---------

Signed-off-by: k4yt3x <i@k4yt3x.com>
Co-authored-by: k4yt3x <i@k4yt3x.com>
2025-01-08 20:39:43 +00:00
k4yt3x
b1190d7591 build(just): add attributes and rename variables
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-08 00:00:00 +00:00
k4yt3x
6b0ad2df03 build(cmake): fix build errors on Windows
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-08 00:00:00 +00:00
k4yt3x
8687d7d175 build(cmake): reorganize CMakeLists.txt and make it compatible with Ninja
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-08 00:00:00 +00:00
k4yt3x
953147ede7 style(*): convert all uses of NULL to nullptr
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-04 00:00:00 +00:00
k4yt3x
f38452ff94 fix(logging): fix logging statements not using the logger singleton
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-04 00:00:00 +00:00
k4yt3x
7c867b1b97 build(cmake): use GNU install directories
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-04 00:00:00 +00:00
k4yt3x
1668c8a050 docs(readme): update copyright year to 2025
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-01-04 00:00:00 +00:00
k4yt3x
a9b9a71e9b style(*): add .clang-format and format all files
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-31 00:00:00 +00:00
k4yt3x
c95a6a46cd feat(encoder): improve av_opt_set error message
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-30 00:00:00 +00:00
k4yt3x
a72c094588 perf(*): change multiversioning target clones to x86-64-v3 and x86-64-v4
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-30 00:00:00 +00:00
k4yt3x
7665cd217c build(cmake): remove the AVX2 and AVX-512F optimization options
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-26 00:00:00 +00:00
k4yt3x
2cfdb698c9 build(container): optimize container build speed
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
39a1828a3b build(cmake): disable spdlog exceptions
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
13a480c6cf docs(readme): add the video2x AUR package information
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
b6bd26c173 build(debian): update package version to 6.3.1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
Integral
517003a0ba docs(book): update Linux installation instructions (#1272)
* docs(book): update linux installation instructions
* docs(book): replace apt with apt-get

---------

Co-authored-by: K4YT3X <github@k4yt3x.com>
2024-12-23 05:00:23 +00:00
k4yt3x
588c0fbe21 docs(readme): add @Integral-Tech to the special thanks list
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
a0b2330e74 build(arch): update PKGBUILD pkgname and pkgver
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
3c342f5cd5 docs(readme): update Arch Linux package information
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
31c616d8df build(cmake): add the CMake package config and target files
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-23 00:00:00 +00:00
k4yt3x
a27c795614 docs(readme): fix broken links for the Ubuntu package
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-22 00:00:00 +00:00
K4YT3X
e1e8ed864d perf: improve vectorization optimizations and add function multi-versioning (#1271)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-22 10:53:09 +00:00
Integral
f68939c478 docs(readme): add archlinuxcn link (#1270)
* docs(readme): add archlinuxcn link
* docs(readme): display the available Linux packages in a list

---------

Co-authored-by: K4YT3X <github@k4yt3x.com>
2024-12-22 10:41:20 +00:00
k4yt3x
996b0bfa78 docs(readme): update readme for 6.3.1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
709cf08760 fix(encoder): decreasing PTS precision with increasing video duration (#1269)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
bf5917b084 docs(readme): add French to the list of GUI languages
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
96ebd860e3 docs(readme): add sample clips for Real-CUGAN and Real-ESRGAN
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
2afbeab2aa fix(video2x): remove redundant newline statements
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
5c4d23bc97 docs(readme): update readme for 6.3.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
20e43a9724 chore: update changelogs for version 6.3.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
k4yt3x
486c23d9f4 fix(video2x): add missing Real-CUGAN help messages
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 00:00:00 +00:00
K4YT3X
127d9e0019 feat(realcugan): add support for Real-CUGAN ncnn Vulkan (#1268)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-21 02:58:19 +00:00
k4yt3x
e1e8d64056 chore(deps): update spdlog to v1.15.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-20 00:00:00 +00:00
k4yt3x
7b8e186207 feat(logger): improve logger initialization
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-20 00:00:00 +00:00
k4yt3x
f3999a431c feat(logger): improve FFmpeg logging format
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-20 00:00:00 +00:00
K4YT3X
6676cd2439 feat(logger): add logger manager to provide unified logging (#1267)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-20 04:46:10 +00:00
k4yt3x
b8eb6de59b docs(readme): add licensing information for RIFE ncnn Vulkan
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-19 00:00:00 +00:00
K4YT3X
ae2d5d32e4 feat(ns): improve optimization flags and add namespaces (#1261)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-17 16:24:51 +00:00
k4yt3x
5884dd1ba4 fix(encoder): always use the calculated PTS with corrected math
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-16 00:00:00 +00:00
k4yt3x
33ee43a088 docs(citation): add citation information
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-15 00:00:00 +00:00
k4yt3x
7ee9d60fcf docs(readme): update readme for 6.2.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-12 00:00:00 +00:00
k4yt3x
a6dfdc7343 docs(*): update changelog and readme for 6.2.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-12 00:00:00 +00:00
k4yt3x
ca5044f09c feat(libvideo2x): add optimization for scene detection
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-12 00:00:00 +00:00
k4yt3x
0e00aca401 feat(libvideo2x): change the video processor state to an enum
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-08 00:00:00 +00:00
K4YT3X
0400cf51b0 refactor(video2x): split the CLI into multiple files; improve CLI args validation (#1247)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-04 08:06:35 +00:00
k4yt3x
adf3baf4be style(video2x): fix incorrect variable name
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-03 00:00:00 +00:00
K4YT3X
d4d1e58f8d refactor(libvideo2x): convert the video processor into a class (#1246)
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-03 05:22:07 +00:00
k4yt3x
a379c7481e fix(cmake): install missing headers
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-02 00:00:00 +00:00
k4yt3x
f27d8556c0 style(libvideo2x): remove C headers
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-02 00:00:00 +00:00
K4YT3X
f8dcad3aef chore(libvideo2x)!: replace the C API with C++ API (#1245)
* chore(libvideo2x)!: replace the C API with C++ API
* fix: convert wide string to u8 for av_opt_set
* style: removed unnecessary enum and struct specifiers

Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-02 07:24:30 +00:00
k4yt3x
24d43a8478 feat(video2x): update CLI help message examples
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-01 00:00:00 +00:00
K4YT3X
627f3d84a4 feat(rife): add support for frame interpolation and RIFE (#1244)
* feat: add RIFE files and processor/interpolator abstractions
* feat: add `rife` as processor option
* feat: add frame interpolation math except first frame
* feat: complete motion interpolation and add scene detection
* feat: improve Vulkan device validation
* fix: fix casting issues and variable names
* refactor: improve error-checking; add abstractions and factories
* refactor: improve readability of the frames processor
* docs: update changelog

Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-12-01 09:55:56 +00:00
k4yt3x
2fc89e3883 feat(video2x): print help when no args are specified
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-26 00:00:00 +00:00
k4yt3x
073f706980 docs(readme): adjust header links in README
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-23 00:00:00 +00:00
k4yt3x
a388a12d7d docs(conduct): add code of conduct
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-23 00:00:00 +00:00
k4yt3x
937939710a docs(security): add a security policy
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-23 00:00:00 +00:00
k4yt3x
ed318f61ad docs(readme): update documentation links in the README file
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-23 00:00:00 +00:00
k4yt3x
862b7f4ae8 docs(book): fixed incorrect edit URL template
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-23 00:00:00 +00:00
k4yt3x
b20f065fe0 ci(*): formatted CI pipeline files
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-22 00:00:00 +00:00
k4yt3x
149cf1ca4a docs(book): added the docs.video2x.org mdBook source files and pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-22 00:00:00 +00:00
k4yt3x
a77cf9e14f ci(build): include more paths in the pipeline's triggering conditions
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-22 00:00:00 +00:00
k4yt3x
d3de1ded96 feat(video2x): improve the CLI help message structure and clarity
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-22 00:00:00 +00:00
k4yt3x
3215c89870 feat(encoder): add support for more encoder options
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-22 00:00:00 +00:00
k4yt3x
169509b7d4 refactor(*): refactored the encoder and decoder into classes
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-17 00:00:00 +00:00
k4yt3x
b520d51c6c chore: removed OpenCV dependency
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-13 00:00:00 +00:00
k4yt3x
980b44bc05 fix(libvideo2x): added missing checks around freeing memory
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-13 00:00:00 +00:00
k4yt3x
561671c4cb fix(cmake): removed the redundant REQUIRED word
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-12 00:00:00 +00:00
k4yt3x
0869d153c0 docs(readme): removed the outdated label for Colab
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-10 00:00:00 +00:00
k4yt3x
4c919de6ba fix(encoder): read pix_fmts from AVCodec->pix_fmts for old libavformat
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-10 00:00:00 +00:00
k4yt3x
e393910f21 feat(encoder): added auto selection of the most suitable output pix_fmt
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-10 00:00:00 +00:00
k4yt3x
e477123e88 fix(encoder): timestamp errors processing frames with PTS equal to 0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-10 00:00:00 +00:00
k4yt3x
c8f2acdea6 feat(libplacebo): made hardware context creation failure non-critical
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-09 00:00:00 +00:00
k4yt3x
aa8ed60e52 build(debian): added a build target for Ubuntu 22.04
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-09 00:00:00 +00:00
k4yt3x
e07beb67a4 chore(video2x): moved the CLI application to a separate directory
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-08 00:00:00 +00:00
k4yt3x
bc8ae34dde refactor(libvideo2x): extracted video frame count estimation into a function
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-08 00:00:00 +00:00
k4yt3x
6a218ebd9c docs(readme): updated README for 6.1.1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-07 00:00:00 +00:00
k4yt3x
0d6a6abce2 chore(release): bump version to 6.1.1
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-07 00:00:00 +00:00
k4yt3x
943b446d26 fix(encoder): make the encoder use the right color space
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-07 00:00:00 +00:00
k4yt3x
1b81f7d1e2 ci(build): make the build pipeline only run on code changes
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-07 00:00:00 +00:00
k4yt3x
64697a9385 ci(issues): added the issues auto-labeling pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-07 00:00:00 +00:00
k4yt3x
e8b0b0ec21 docs(readme): updated installation instructions for Linux
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-06 00:00:00 +00:00
k4yt3x
05b275dd82 feat(video2x): added time remaining and processing speed to the progress bar
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-06 00:00:00 +00:00
k4yt3x
33b7c53e16 fix(encoder): fixed incorrect stream mapping for multi-stream files
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-06 00:00:00 +00:00
k4yt3x
3b7921a774 docs(readme): added a badge for GitHub sponsors
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-05 00:00:00 +00:00
k4yt3x
dfb29e05b7 docs(readme): updated README for 6.1.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-05 00:00:00 +00:00
k4yt3x
3bae03f403 docs(changelog): updated the changelog for 6.1.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-05 00:00:00 +00:00
k4yt3x
9ff320721f ci(build): updated the name of the build pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-05 00:00:00 +00:00
k4yt3x
7a7558e1a8 ci(release): disabled Ubuntu 24.04 build in the release pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-05 00:00:00 +00:00
k4yt3x
ec4b51064a feat(libplacebo): added Vulkan device selection for libplacebo
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-04 00:00:00 +00:00
k4yt3x
77a06e7d92 ci(release): added Ubuntu and Windows builds to the release pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-04 00:00:00 +00:00
k4yt3x
8eda3fa2d2 build(cmake): fixed the broken RealESRGAN installation rules
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-04 00:00:00 +00:00
k4yt3x
bcbe33d5dc feat(video2x): added the --listgpus option and GPU ID validation
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-04 00:00:00 +00:00
k4yt3x
850e0fde9c build(cmake): install the char_defs.h header file 2024-11-04 03:50:41 -05:00
k4yt3x
a63b8d85b0 build(makefile): added make targets for Windows 2024-11-04 03:49:20 -05:00
k4yt3x
1d1792d10f style: added platform-dependent type aliases for char and string
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-04 00:00:00 +00:00
k4yt3x
851f13bd4d fix(libvideo2x): fixed errors in estimating the total number of frames
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-03 00:00:00 +00:00
k4yt3x
fbe3b44139 feat(video2x): improved the timer
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-03 00:00:00 +00:00
k4yt3x
d6f27b3f22 fix(libplacebo): fixed wide char string path support for GLSL shader path 2024-11-02 23:13:03 -04:00
k4yt3x
fb0e3a040d fix(video2x): fixed RealESRGAN model name parsing
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
bb74144070 fix(realesrgan): fixed RealESRGAN model name variable
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
406a97f360 fix(video2x): fixed return code fetching
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
9c491d4277 feat: improved file not found messages
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
K4YT3X
27c76189d9 Merge pull request #1208 from k4yt3x/dev
feat(*): fixed wide character string paths and rewritten the CLI
2024-11-02 01:35:27 -04:00
k4yt3x
77b3df22c1 ci(build): enabled caching for Vulkan SDK installation
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
b333f88c2f build(cmake): fixed boost build path and removed redundant librife DLL
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
8cafb29f70 build(cmake): cleaned up install directives
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
afd7c8050f chore: added missing boost lib into Makefile, Debian, PKGBUILD
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
66c623ff49 chore: fixed missing boost submodule
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
0633b3fd62 ci(build): fixed build pipeline boost dependency
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
0588908dd6 fix(video2x): fixed string conversions on Linux
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-11-02 00:00:00 +00:00
k4yt3x
b309bec1cb feat(video2x): rewritten the CLI with C++ 2024-11-01 22:20:32 -04:00
k4yt3x
94e69f9f62 fix(libvideo2x): fixed wide character string paths on Windows 2024-11-01 22:19:01 -04:00
k4yt3x
a8b952c3ad feat(libplacebo): auto-detect the buffer filter's supported options
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-10-31 00:00:00 +00:00
k4yt3x
c912bfaffc build(makefile): added make target for ubuntu deb package
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-10-31 00:00:00 +00:00
k4yt3x
f5eb195d79 chore: reorganized packaging related files
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-10-30 00:00:00 +00:00
k4yt3x
5156d4a825 fix(video2x): fixed Anime4K shader name in the help message
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-10-30 00:00:00 +00:00
k4yt3x
cbffef2b23 docs(readme): updated README for 6.0.0
Signed-off-by: k4yt3x <i@k4yt3x.com>
2024-10-29 00:00:00 +00:00
207 changed files with 12027 additions and 2811 deletions

8
.clang-format Normal file
View File

@@ -0,0 +1,8 @@
BasedOnStyle: Chromium
AlignAfterOpenBracket: BlockIndent
AllowShortEnumsOnASingleLine: false
BinPackArguments: false
BreakStringLiterals: false
ColumnLimit: 100
IndentWidth: 4
InsertBraces: true

39
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,39 @@
---
name: Bug report
about: Report a bug in the program
title: "<Bug summary>"
labels: type:Bug
assignees: ''
---
**Describe the bug**
A clear and concise description of the bug.
**To Reproduce**
Steps to reproduce the behavior:
1. Do this...
2. Do that...
3. See error here...
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
A clear and concise description of what actually happened.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment:**
- OS: `e.g., Windows 11 24H2 or Arch Linux`
- GPU: `e.g., NVIDIA GeForce RTX 4090`
- Video2X Version: `e.g., 6.3.1`
**Full command**
If applicable, add the full command you used to run the program.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Request a feature to be added or suggest an idea
title: "<Feature summary>"
labels: type:Enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,11 +1,23 @@
name: build
name: Build
on:
push:
branches:
- master
- dev
pull_request: {}
workflow_dispatch: {}
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:
@@ -14,9 +26,10 @@ jobs:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
git submodule update --init --recursive
@@ -31,18 +44,21 @@ jobs:
libvulkan-dev \
glslang-tools \
libomp-dev \
libopencv-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 \
cmake -B /tmp/build -S . -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/tmp/install \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF -DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-DINSTALL_BIN_DESTINATION=. -DINSTALL_INCLUDE_DESTINATION=include \
-DINSTALL_LIB_DESTINATION=. -DINSTALL_MODEL_DESTINATION=.
cmake --build /tmp/build --config Debug --target install --parallel
-DINSTALL_LIB_DESTINATION=. -DINSTALL_MODEL_DESTINATION=. \
-DCMAKE_INSTALL_PREFIX=/tmp/install
cmake --build /tmp/build --config Debug --target install
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: video2x-nightly-linux-amd64
path: /tmp/install
@@ -51,20 +67,22 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.3.204.0
vulkan-query-version: 1.4.304.1
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"
$opencvVersion = "4.10.0"
$ncnnVersion = "20241226"
git submodule update --init --recursive
@@ -76,18 +94,86 @@ jobs:
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
curl -Lo opencv-shared.exe "https://github.com/opencv/opencv/releases/download/$opencvVersion/opencv-$opencvVersion-windows.exe"
7z x opencv-shared.exe -y
Move-Item -Path opencv -Destination third_party\opencv-shared
- name: Build Video2X
shell: pwsh
run: |
cmake -S . -B build `
-DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_OPENCV=OFF `
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF -DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF -DVIDEO2X_USE_EXTERNAL_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
uses: actions/upload-artifact@v6
with:
name: video2x-nightly-windows-amd64
path: build/video2x_install
container:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build the Docker image
with:
registry: ghcr.io
dockerfile: packaging/docker/Dockerfile
image: video2x
tags: latest
pushImage: false
appimage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: |
git submodule update --init --recursive
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake clang pkg-config ninja-build curl file fuse \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options1.83-dev \
libboost-program-options1.83.0 \
libspdlog-dev
- name: Build Video2X
run: |
cmake -G Ninja -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DNCNN_BUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_AVX512=OFF \
-DCMAKE_INSTALL_PREFIX=AppDir/usr
cmake --build build --config Release --target install --parallel
- name: Build AppImage
run: |
sudo curl -Lo /usr/local/bin/linuxdeploy \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
sudo chmod +x /usr/local/bin/linuxdeploy
LD_LIBRARY_PATH=AppDir/usr/lib linuxdeploy \
--appdir AppDir \
--executable AppDir/usr/bin/video2x \
--exclude-library "libvulkan.so.1" \
--desktop-file packaging/appimage/video2x.desktop \
--icon-file packaging/appimage/video2x.png \
--output appimage
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: Video2X-x86_64.AppImage
path: Video2X-x86_64.AppImage

49
.github/workflows/docs.yml vendored Normal file
View 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@v6
- 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@v4
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
View 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

View File

@@ -1,4 +1,5 @@
name: Release
on:
push:
tags:
@@ -9,8 +10,8 @@ permissions:
jobs:
setup:
if: github.event.base_ref == 'refs/heads/master'
name: Setup
if: github.event.base_ref == 'refs/heads/master'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
@@ -19,6 +20,108 @@ jobs:
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@v6
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 . -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF -DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-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@v6
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@v6
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.4.304.1
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 `
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF -DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF -DVIDEO2X_USE_EXTERNAL_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@v6
with:
name: video2x-windows-amd64
path: build/video2x-windows-amd64.zip
container:
name: Build and upload container
needs:
@@ -26,14 +129,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mr-smithers-excellent/docker-build-push@v5
uses: actions/checkout@v6
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push the Docker image
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: Dockerfile
dockerfile: packaging/docker/Dockerfile
image: video2x
tags: latest, ${{ needs.setup.outputs.version }}
@@ -41,11 +145,16 @@ jobs:
name: Create release
needs:
- setup
# - ubuntu-2404
# - windows
- container
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# outputs:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
# - name: Download artifacts
# uses: actions/download-artifact@v7
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2

18
.gitmodules vendored
View File

@@ -1,12 +1,18 @@
[submodule "third_party/librealesrgan_ncnn_vulkan"]
path = third_party/librealesrgan_ncnn_vulkan
url = https://github.com/k4yt3x/librealesrgan-ncnn-vulkan.git
[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/opencv"]
path = third_party/opencv
url = https://github.com/opencv/opencv.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

338
.justfile Normal file
View File

@@ -0,0 +1,338 @@
# Use PowerShell to run recipes on Windows
set windows-shell := ['pwsh', '-Command']
# Default build directory, generator, and C++ compiler
bindir := "build"
generator := "Ninja"
cxx := "clang++"
# Test video and output paths
test_video := "data/standard-test.mp4"
test_output := "data/output.mp4"
[unix]
[group('build')]
build:
cmake -G '{{generator}}' -S . -B {{bindir}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_COMPILER={{cxx}} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
-DVIDEO2X_ENABLE_NATIVE=ON
cmake --build {{bindir}} --config Release --parallel --target install
[windows]
[group('build')]
build:
cmake -S . -B {{bindir}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
-DCMAKE_INSTALL_BINDIR="." \
-DCMAKE_INSTALL_LIBDIR="." \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_DATADIR="." \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
cmake --build {{bindir}} --config Release --parallel --target install
[unix]
[group('build')]
static:
cmake -G '{{generator}}' -S . -B {{bindir}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_COMPILER={{cxx}} \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
cmake --build {{bindir}} --config Release --parallel --target install
[unix]
[group('build')]
debug:
cmake -G '{{generator}}' -S . -B {{bindir}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_COMPILER={{cxx}} \
-DCMAKE_BUILD_TYPE=Debug
cmake --build {{bindir}} --config Debug --parallel
[windows]
[group('build')]
debug:
cmake -S . -B {{bindir}} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX={{bindir}}/video2x-install \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-DVIDEO2X_USE_EXTERNAL_BOOST=OFF
cmake --build {{bindir}} --config Debug --parallel
[unix]
[group('build')]
debian:
apt-get update
apt-get install -y --no-install-recommends \
build-essential cmake clang pkg-config ninja-build \
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 -G '{{generator}}' -B /tmp/build -S . \
-DVIDEO2X_USE_EXTERNAL_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
[unix]
[group('build')]
ubuntu2404:
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential cmake pkg-config ninja-build \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options-dev
cmake -G '{{generator}}' -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-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
[unix]
[group('build')]
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 ninja-build \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options-dev
cmake -G '{{generator}}' -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DVIDEO2X_USE_EXTERNAL_SPDLOG=OFF \
-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
[unix]
[group('build')]
appimage:
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential cmake clang pkg-config ninja-build curl file fuse \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libvulkan-dev \
glslang-tools \
libomp-dev \
libboost-program-options1.83-dev \
libboost-program-options1.83.0 \
libspdlog-dev
cmake -G '{{generator}}' -B build -S . \
-DVIDEO2X_USE_EXTERNAL_NCNN=OFF \
-DNCNN_BUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_AVX512=OFF \
-DCMAKE_INSTALL_PREFIX=AppDir/usr
cmake --build build --config Release --target install --parallel
rm -rf AppDir/usr/share/video2x/models/rife/rife \
AppDir/usr/share/video2x/models/rife/rife-HD \
AppDir/usr/share/video2x/models/rife/rife-UHD \
AppDir/usr/share/video2x/models/rife/rife-anime \
AppDir/usr/share/video2x/models/rife/rife-v2 \
AppDir/usr/share/video2x/models/rife/rife-v2.3 \
AppDir/usr/share/video2x/models/rife/rife-v2.4 \
AppDir/usr/share/video2x/models/rife/rife-v3.0 \
AppDir/usr/share/video2x/models/rife/rife-v3.1
curl -Lo /usr/local/bin/linuxdeploy \
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x /usr/local/bin/linuxdeploy
LD_LIBRARY_PATH=AppDir/usr/lib linuxdeploy \
--appdir AppDir \
--executable AppDir/usr/bin/video2x \
--exclude-library "libvulkan.so.1" \
--desktop-file packaging/appimage/video2x.desktop \
--icon-file packaging/appimage/video2x.png \
--output appimage
[unix]
[group('misc')]
clean:
rm -vrf {{bindir}} data/output*.* heaptrack*.zst valgrind.log
[windows]
[group('misc')]
clean:
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path build,data/output*.*
[unix]
[group('test')]
test-realesrgan:
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
-i {{test_video}} -o {{test_output}} \
-p realesrgan -s 4 --realesrgan-model realesr-animevideov3
[unix]
[group('test')]
test-realcugan:
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
-i {{test_video}} -o {{test_output}} \
-p realcugan -s 4 -n 0 --realcugan-model models-se
[unix]
[group('test')]
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
[unix]
[group('test')]
test-rife:
LD_LIBRARY_PATH={{bindir}} {{bindir}}/video2x \
-i {{test_video}} -o {{test_output}} \
-p rife -m 4 --rife-model rife-v4.6
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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
[unix]
[group('test')]
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

View File

@@ -6,3 +6,135 @@ 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).
## [Unreleased]
### Added
- Option to recalculate the PTS.
- Real-ESRGAN models `realesr-general-x4v3` and `realesr-general-wdn-x4v3` (#1319).
- (Video2X Qt6) Korean translation.
### Changed
- Separate audio and subtitle stream copying options.
## [6.4.0] - 2025-01-24
### Added
- Multi-versioning to critical functions to enhance performance in generic architecture builds.
- RIFE models `v4.25` and `v4.26` (#1304).
- Support for processing videos without PTS information (#1278).
- The feature to copy input streams' metadata to the output streams (#1282).
- (Video2X Qt6) German translation (#1279).
- (Video2X Qt6) Option to remove finished tasks from the queue.
- (Video2X Qt6) Option to specify actions after processing is complete.
- (Video2X Qt6) Support for adding and removing tasks during processing (#1281).
- (Video2X Qt6) The feature to automatically set codec to PNG for images (#1204).
- (Video2X Qt6) The preferences dialog.
### Changed
- Improve the CMake optimization flags and option names.
- (Video2X Qt6) Embed translation files in the executable to avoid missing resources (#1250).
- (Video2X Qt6) Redesign the main window UI to improve usability.
### Fixed
- A bug that causes the wrong encoder to be selected.
- (Video2X Qt6) Incorrect font used for the Japanese translation (#1276).
## [6.3.1] - 2024-12-21
### Fixed
- The issue of decreasing PTS precision with increasing video duration (#1269).
- (Video2X Qt6) Errors restoring Real-CUGAN configs in the Edit Task dialog.
- (Video2X Qt6) The incorrect comparison of version numbers.
## [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
View 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

View File

@@ -1,451 +1,495 @@
cmake_minimum_required(VERSION 3.10)
project(video2x VERSION 6.0.0 LANGUAGES C CXX)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(video2x VERSION 6.4.0 LANGUAGES CXX)
# Set the C standard
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
include(CMakePackageConfigHelpers)
include(ExternalProject)
include(GNUInstallDirs)
# Set the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# The FindBoost module is removed in CMake 3.30
if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
# Set the default build type to Release if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# Set the default optimization flags for Release builds
if(CMAKE_BUILD_TYPE STREQUAL "Release")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ox /GL /LTCG /MD /DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox /GL /LTCG /MD /DNDEBUG")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -march=native -flto")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native -flto")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -s")
endif()
endif()
# Build options
option(BUILD_SHARED_LIBS "Build libvideo2x as a shared library" ON)
option(VIDEO2X_BUILD_CLI "Build the video2x command line interface executable" ON)
# Set global compile options for all targets
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
option(VIDEO2X_USE_EXTERNAL_NCNN "Use the system-provided ncnn library" ON)
option(VIDEO2X_USE_EXTERNAL_SPDLOG "Use the system-provided spdlog library" ON)
option(VIDEO2X_USE_EXTERNAL_BOOST "Use the system-provided Boost library" ON)
option(VIDEO2X_ENABLE_NATIVE "Enable optimizations for the native architecture" OFF)
option(VIDEO2X_ENABLE_X86_64_V4 "Enable x86-64-v4 (AVX-512) optimizations" OFF)
option(VIDEO2X_ENABLE_X86_64_V3 "Enable x86-64-v3 (AVX2) optimizations" OFF)
# Enable extra compiler warnings
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/W4 /permissive-)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Wconversion -Wshadow)
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_SPDLOG "Use system spdlog library" ON)
option(USE_SYSTEM_OPENCV "Use system OpenCV library" ON)
option(USE_SYSTEM_NCNN "Use system ncnn library" ON)
# 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 -ffunction-sections -fdata-sections)
add_link_options(-Wl,-s -flto -Wl,--gc-sections)
endif()
endif()
# Enable the requested architecture-specific optimizations
if(VIDEO2X_ENABLE_NATIVE)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/arch:NATIVE)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-march=native)
endif()
elseif(VIDEO2X_ENABLE_X86_64_V4)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/arch:AVX512)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-march=x86-64-v4)
endif()
elseif(VIDEO2X_ENABLE_X86_64_V3)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/arch:AVX2)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-march=x86-64-v3)
endif()
endif()
# Generate the version header file
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/libvideo2x/version.h.in"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/libvideo2x/version.h"
@ONLY
)
# Find the required packages
set(ALL_INCLUDE_DIRS)
set(ALL_LIBRARIES)
# spdlog
if (USE_SYSTEM_SPDLOG)
find_package(spdlog REQUIRED)
list(APPEND ALL_INCLUDE_DIRS ${spdlog_INCLUDE_DIRS})
list(APPEND ALL_LIBRARIES spdlog::spdlog)
else()
add_subdirectory(third_party/spdlog)
list(APPEND ALL_LIBRARIES spdlog::spdlog_header_only)
endif()
# 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)
set(OPENCV_BASE_PATH ${PROJECT_SOURCE_DIR}/third_party/opencv-shared)
# FFmpeg
list(APPEND ALL_LIBRARIES
${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 ALL_INCLUDE_DIRS ${FFMPEG_BASE_PATH}/include)
# ncnn
# TODO: Figure out why this file is not being copied to the install directory
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 ALL_LIBRARIES
${NCNN_BASE_PATH}/lib/ncnn.lib
${SPIRV_LIB}
)
list(APPEND ALL_INCLUDE_DIRS ${NCNN_BASE_PATH}/include/ncnn)
# OpenCV
list(APPEND ALL_LIBRARIES ${OPENCV_BASE_PATH}/build/x64/vc16/lib/opencv_world4100.lib)
list(APPEND ALL_INCLUDE_DIRS ${OPENCV_BASE_PATH}/build/include)
else()
# FFmpeg
find_package(PkgConfig REQUIRED)
set(REQUIRED_PKGS
libavcodec
libavdevice
libavfilter
libavformat
libavutil
libswscale
)
# Loop through each package to find and collect include dirs and libraries
foreach(PKG ${REQUIRED_PKGS})
pkg_check_modules(${PKG} REQUIRED ${PKG})
list(APPEND ALL_INCLUDE_DIRS ${${PKG}_INCLUDE_DIRS})
list(APPEND ALL_LIBRARIES ${${PKG}_LIBRARIES})
endforeach()
# OpenCV
if (USE_SYSTEM_OPENCV)
find_package(OpenCV REQUIRED)
list(APPEND ALL_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS}/opencv2)
list(APPEND ALL_LIBRARIES opencv_core opencv_videoio)
else()
option(BUILD_opencv_calib3d "" OFF)
option(BUILD_opencv_core "" ON)
option(BUILD_opencv_dnn "" OFF)
option(BUILD_opencv_features2d "" OFF)
option(BUILD_opencv_flann "" OFF)
option(BUILD_opencv_gapi "" OFF)
option(BUILD_opencv_highgui "" OFF)
option(BUILD_opencv_imgcodecs "" OFF)
option(BUILD_opencv_imgproc "" OFF)
option(BUILD_opencv_java "" OFF)
option(BUILD_opencv_js "" OFF)
option(BUILD_opencv_ml "" OFF)
option(BUILD_opencv_objc "" OFF)
option(BUILD_opencv_objdetect "" OFF)
option(BUILD_opencv_photo "" OFF)
option(BUILD_opencv_python "" OFF)
option(BUILD_opencv_python2 "" OFF)
option(BUILD_opencv_python3 "" OFF)
option(BUILD_opencv_stitching "" OFF)
option(BUILD_opencv_ts "" OFF)
option(BUILD_opencv_video "" OFF)
option(BUILD_opencv_videoio "" ON)
option(BUILD_opencv_world "" OFF)
option(WITH_PNG "" OFF)
option(WITH_JPEG "" OFF)
option(WITH_TIFF "" OFF)
option(WITH_WEBP "" OFF)
option(WITH_OPENJPEG "" OFF)
option(WITH_JASPER "" OFF)
option(WITH_OPENEXR "" OFF)
option(WITH_IMGCODEC "" OFF)
add_subdirectory(third_party/opencv)
list(APPEND ALL_INCLUDE_DIRS
${PROJECT_SOURCE_DIR}/third_party/opencv/include
${PROJECT_SOURCE_DIR}/third_party/opencv/modules/core/include
${PROJECT_SOURCE_DIR}/third_party/opencv/modules/videoio/include
)
list(APPEND ALL_LIBRARIES opencv_core opencv_videoio)
endif() # USE_SYSTEM_OPENCV
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()
# 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 the libvideo2x shared library
add_library(libvideo2x
src/avutils.cpp
src/conversions.cpp
src/decoder.cpp
src/encoder.cpp
src/filter_libplacebo.cpp
src/filter_realcugan.cpp
src/filter_realesrgan.cpp
src/fsutils.cpp
src/interpolator_rife.cpp
src/libplacebo.cpp
src/libvideo2x.cpp
src/logger_manager.cpp
src/processor_factory.cpp
)
# Remove duplicate entries
list(REMOVE_DUPLICATES ALL_INCLUDE_DIRS)
list(REMOVE_DUPLICATES ALL_LIBRARIES)
# Set the C++ standard to C++17
target_compile_features(libvideo2x PRIVATE cxx_std_17)
# Add all source files for libvideo2x
file(GLOB LIBVIDEO2X_SOURCES src/*.cpp)
# Create the shared library 'libvideo2x'
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 libvideo2x depends on realesrgan being built and installed
add_dependencies(libvideo2x realesrgan)
# Set the shared library output name and disable C++ extensions
set_target_properties(libvideo2x PROPERTIES
PREFIX ""
OUTPUT_NAME libvideo2x
CXX_EXTENSIONS OFF
)
# Include directories for the shared library
target_include_directories(libvideo2x PRIVATE
${ALL_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include/libvideo2x
${PROJECT_SOURCE_DIR}/third_party/librealesrgan_ncnn_vulkan/src
"${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:Release>:-Ofast>
$<$<CONFIG:Debug>:-g -DDEBUG>
)
# Add the export definition for the exported symbols
target_compile_definitions(libvideo2x PRIVATE LIBVIDEO2X_EXPORTS)
# Define the path to the built libresrgan-ncnn-vulkan library
if(WIN32)
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.lib)
else()
set(REALESRGAN_LIB ${CMAKE_BINARY_DIR}/realesrgan_install/lib/librealesrgan-ncnn-vulkan.so)
# Set debug compile options
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(libvideo2x PRIVATE $<$<CONFIG:Debug>:/Zi /Od /MDd>)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(libvideo2x PRIVATE
$<$<NOT:$<PLATFORM_ID:Windows>>:-fPIC>
$<$<CONFIG:Debug>:-g -O0>
)
endif()
# Link the shared library with the dependencies
target_link_libraries(libvideo2x PRIVATE ${ALL_LIBRARIES} ${REALESRGAN_LIB})
# FFmpeg
if(WIN32)
set(ffmpeg_base_path "${PROJECT_SOURCE_DIR}/third_party/ffmpeg-shared")
target_include_directories(libvideo2x SYSTEM PRIVATE "${ffmpeg_base_path}/include")
target_link_libraries(libvideo2x PRIVATE
"${ffmpeg_base_path}/lib/avcodec.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"
)
else()
# Use pkg-config to find FFmpeg libraries
find_package(PkgConfig REQUIRED)
if(NOT WIN32)
if (USE_SYSTEM_NCNN)
target_link_libraries(libvideo2x PUBLIC ncnn)
# Find and configure FFmpeg libraries
pkg_check_modules(libavcodec REQUIRED libavcodec)
pkg_check_modules(libavfilter REQUIRED libavfilter)
pkg_check_modules(libavformat REQUIRED libavformat)
pkg_check_modules(libavutil REQUIRED libavutil)
pkg_check_modules(libswscale REQUIRED libswscale)
# Apply include directories and libraries directly to the target
target_include_directories(libvideo2x SYSTEM PRIVATE
${libavcodec_INCLUDE_DIRS}
${libavfilter_LIBRARIES}
${libavformat_INCLUDE_DIRS}
${libavutil_INCLUDE_DIRS}
${libswscale_INCLUDE_DIRS}
)
target_link_libraries(libvideo2x PRIVATE
${libavcodec_LIBRARIES}
${libavfilter_LIBRARIES}
${libavformat_LIBRARIES}
${libavutil_LIBRARIES}
${libswscale_LIBRARIES}
)
endif()
# ncnn
if(VIDEO2X_USE_EXTERNAL_NCNN)
find_package(ncnn REQUIRED)
else()
if(WIN32)
# Use the pre-built shared ncnn library on Windows
set(ncnn_base_path "${PROJECT_SOURCE_DIR}/third_party/ncnn-shared/x64")
add_library(ncnn SHARED IMPORTED)
set_target_properties(ncnn PROPERTIES
IMPORTED_LOCATION "${ncnn_base_path}/bin/ncnn.dll"
IMPORTED_IMPLIB "${ncnn_base_path}/lib/ncnn.lib"
INTERFACE_INCLUDE_DIRECTORIES "${ncnn_base_path}/include/ncnn"
)
else()
target_link_libraries(libvideo2x PRIVATE ncnn)
option(NCNN_INSTALL_SDK "" ON)
option(SKIP_GLSLANG_INSTALL "" OFF)
option(NCNN_PIXEL_ROTATE "" OFF)
option(NCNN_PIXEL_AFFINE "" OFF)
option(NCNN_PIXEL_DRAWING "" 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_INT8 "" OFF)
option(NCNN_BUILD_SHARED_LIBS "" OFF)
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 "" ON)
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 "" ON)
option(WITH_LAYER_mvn "" OFF)
option(WITH_LAYER_pooling "" ON)
option(WITH_LAYER_power "" OFF)
option(WITH_LAYER_prelu "" ON)
option(WITH_LAYER_proposal "" OFF)
option(WITH_LAYER_reduction "" ON)
option(WITH_LAYER_relu "" ON)
option(WITH_LAYER_reshape "" ON)
option(WITH_LAYER_roipooling "" OFF)
option(WITH_LAYER_scale "" ON)
option(WITH_LAYER_sigmoid "" ON)
option(WITH_LAYER_slice "" ON)
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 "" ON)
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 "" ON)
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)
option(WITH_LAYER_gru "" OFF)
option(WITH_LAYER_multiheadattention "" OFF)
option(WITH_LAYER_gelu "" OFF)
option(WITH_LAYER_convolution1d "" OFF)
option(WITH_LAYER_pooling1d "" OFF)
option(WITH_LAYER_convolutiondepthwise1d "" OFF)
option(WITH_LAYER_convolution3d "" OFF)
option(WITH_LAYER_convolutiondepthwise3d "" OFF)
option(WITH_LAYER_pooling3d "" OFF)
option(WITH_LAYER_matmul "" OFF)
option(WITH_LAYER_deconvolution1d "" OFF)
option(WITH_LAYER_deconvolutiondepthwise1d "" OFF)
option(WITH_LAYER_deconvolution3d "" OFF)
option(WITH_LAYER_deconvolutiondepthwise3d "" OFF)
option(WITH_LAYER_einsum "" OFF)
option(WITH_LAYER_deformableconv2d "" OFF)
option(WITH_LAYER_gridsample "" ON)
add_subdirectory(third_party/ncnn)
endif()
endif()
target_link_libraries(libvideo2x PRIVATE ncnn)
# Create the executable 'video2x'
if (BUILD_VIDEO2X_CLI)
add_executable(video2x src/video2x.c src/getopt.c)
set_target_properties(video2x PROPERTIES OUTPUT_NAME video2x)
# Include directories for the executable
target_include_directories(video2x PRIVATE
${ALL_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/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 ${ALL_LIBRARIES} libvideo2x)
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 ".")
# spdlog
if(VIDEO2X_USE_EXTERNAL_SPDLOG)
find_package(spdlog REQUIRED)
target_include_directories(libvideo2x SYSTEM PRIVATE ${spdlog_INCLUDE_DIRS})
target_link_libraries(libvideo2x PRIVATE spdlog::spdlog)
else()
set(BIN_DESTINATION_DEFAULT "bin")
set(INCLUDE_DESTINATION_DEFAULT "include/libvideo2x")
set(LIB_DESTINATION_DEFAULT "lib")
set(MODEL_DESTINATION_DEFAULT "share/video2x")
# spdlog exceptions are incompatible with ncnn
option(SPDLOG_NO_EXCEPTIONS "" ON)
option(SPDLOG_INSTALL "" ON)
add_subdirectory(third_party/spdlog)
target_link_libraries(libvideo2x PRIVATE spdlog::spdlog_header_only)
endif()
# Explicitly set the output paths since OpenCV changes these variables
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
# Add Real-ESRGAN, Real-CUGAN, and RIFE
option(USE_SYSTEM_NCNN "" ${VIDEO2X_USE_EXTERNAL_NCNN})
add_subdirectory(third_party/librealesrgan_ncnn_vulkan/src)
add_subdirectory(third_party/librealcugan_ncnn_vulkan/src)
add_subdirectory(third_party/librife_ncnn_vulkan/src)
# 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 "")
# Prevent the min and max macros from causing error C2589 on Windows
if(WIN32)
target_compile_definitions(librealesrgan-ncnn-vulkan PRIVATE -DNOMINMAX)
target_compile_definitions(librealcugan-ncnn-vulkan PRIVATE -DNOMINMAX)
target_compile_definitions(librife-ncnn-vulkan PRIVATE -DNOMINMAX)
endif()
# Link the shared library to the ncnn-Vulkan libraries
target_link_libraries(libvideo2x PRIVATE
librealesrgan-ncnn-vulkan
librealcugan-ncnn-vulkan
librife-ncnn-vulkan
)
# 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}
EXPORT Video2XTargets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libvideo2x"
)
# 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 file
install(FILES ${PROJECT_SOURCE_DIR}/include/libvideo2x/libvideo2x.h
DESTINATION ${INSTALL_INCLUDE_DESTINATION}
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libvideo2x/version.h
DESTINATION ${INSTALL_INCLUDE_DESTINATION}
# Install the header files from the include directory
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/libvideo2x/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libvideo2x"
FILES_MATCHING PATTERN "*.h"
)
# Platform-specific installation rules
# Install the generated version.h file
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/libvideo2x/version.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libvideo2x"
)
# Export targets and create CMake package config
install(EXPORT Video2XTargets
FILE Video2XTargets.cmake
NAMESPACE Video2X::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Video2X"
)
# Generate the CMake package config file
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Video2XConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Video2XConfig.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Video2X"
)
# Install the CMake package config file
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/Video2XConfig.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Video2X"
)
# Install the model files
if(WIN32)
# Install Windows-specific dependencies
install(FILES ${CMAKE_BINARY_DIR}/realesrgan_install/bin/librealesrgan-ncnn-vulkan.dll
DESTINATION ${INSTALL_BIN_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(FILES ${FFMPEG_BASE_PATH}/bin/swscale-8.dll
${FFMPEG_BASE_PATH}/bin/avcodec-61.dll
${FFMPEG_BASE_PATH}/bin/avdevice-61.dll
${FFMPEG_BASE_PATH}/bin/avfilter-10.dll
${FFMPEG_BASE_PATH}/bin/avformat-61.dll
${FFMPEG_BASE_PATH}/bin/avutil-59.dll
${FFMPEG_BASE_PATH}/bin/postproc-58.dll
${FFMPEG_BASE_PATH}/bin/swresample-5.dll
DESTINATION ${INSTALL_BIN_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(FILES ${OPENCV_BASE_PATH}/build/x64/vc16/bin/opencv_world4100.dll
${OPENCV_BASE_PATH}/build/x64/vc16/bin/opencv_videoio_msmf4100_64.dll
DESTINATION ${INSTALL_BIN_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(FILES ${NCNN_BASE_PATH}/bin/ncnn.dll
DESTINATION ${INSTALL_BIN_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/models" DESTINATION "${CMAKE_INSTALL_DATADIR}")
else()
# Install Unix-specific dependencies
install(FILES ${REALESRGAN_LIB}
DESTINATION ${INSTALL_LIB_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/models" DESTINATION "${CMAKE_INSTALL_DATADIR}/video2x")
endif()
# Install the FFmpeg and ncnn shared libraries
if(WIN32)
file(GLOB ffmpeg_dlls "${ffmpeg_base_path}/bin/*.dll")
install(FILES ${ffmpeg_dlls} DESTINATION "${CMAKE_INSTALL_BINDIR}")
if(NOT VIDEO2X_USE_EXTERNAL_BOOST)
install(FILES "${ncnn_base_path}/bin/ncnn.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}")
endif()
endif()
# Build the video2x CLI executable
if(VIDEO2X_BUILD_CLI)
add_executable(video2x
tools/video2x/src/argparse.cpp
tools/video2x/src/newline_safe_sink.cpp
tools/video2x/src/timer.cpp
tools/video2x/src/validators.cpp
tools/video2x/src/video2x.cpp
tools/video2x/src/vulkan_utils.cpp
)
# Set the C++ standard to C++17
target_compile_features(video2x PRIVATE cxx_std_17)
# Set the shared library output name and disable C++ extensions
set_target_properties(video2x PROPERTIES
OUTPUT_NAME video2x
CXX_EXTENSIONS OFF
)
# Include directories for the executable
target_include_directories(video2x PRIVATE
"${CMAKE_CURRENT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/tools/video2x/include"
)
# Link the executable with the shared library
target_link_libraries(video2x PRIVATE libvideo2x)
# Set debug compile options
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(video2x PRIVATE $<$<CONFIG:Debug>:/Zi /Od /MDd>)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(video2x PRIVATE $<$<CONFIG:Debug>:-g -O0>)
endif()
# FFmpeg
if(WIN32)
target_include_directories(video2x SYSTEM PRIVATE
"${PROJECT_SOURCE_DIR}/third_party/ffmpeg-shared/include"
)
target_link_libraries(video2x PRIVATE
"${ffmpeg_base_path}/lib/avcodec.lib"
"${ffmpeg_base_path}/lib/avutil.lib"
)
else()
# FFmpeg libraries have already been found
# Apply include directories and libraries directly to the target
target_include_directories(video2x SYSTEM PRIVATE
${libavcodec_INCLUDE_DIRS}
${libavutil_INCLUDE_DIRS}
)
target_link_libraries(video2x PRIVATE ${libavcodec_LIBRARIES} ${libavutil_LIBRARIES})
endif()
# spdlog
# spdlog targets has already been added
if(VIDEO2X_USE_EXTERNAL_SPDLOG)
target_include_directories(video2x SYSTEM PRIVATE ${spdlog_INCLUDE_DIRS})
target_link_libraries(video2x PRIVATE spdlog::spdlog)
else()
target_link_libraries(video2x PRIVATE spdlog::spdlog_header_only)
endif()
# Vulkan
find_package(Vulkan REQUIRED)
target_link_libraries(video2x PRIVATE Vulkan::Vulkan)
# Boost
if(VIDEO2X_USE_EXTERNAL_BOOST)
find_package(Boost REQUIRED COMPONENTS program_options)
else()
option(Boost_USE_STATIC_LIBS "" ON)
option(Boost_USE_STATIC_RUNTIME "" ON)
option(Boost_COMPONENTS program_options)
add_subdirectory(third_party/boost)
target_include_directories(video2x SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/third_party/boost/libs/program_options/include
)
# Suppress the -Wsign-conversion warnings for Boost.Nowide
if (TARGET boost_nowide AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(boost_nowide PRIVATE -Wno-error=sign-conversion)
endif()
endif()
target_link_libraries(video2x PRIVATE Boost::program_options)
# Install the video2x executable
install(TARGETS video2x RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
# Install the Boost DLL
if(WIN32 AND NOT VIDEO2X_USE_EXTERNAL_BOOST)
set(boost_base_path
"${CMAKE_BINARY_DIR}/third_party/boost/libs/program_options/${CMAKE_BUILD_TYPE}"
)
# Different build types have different DLL names
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()
install(FILES "${boost_dll_path}" DESTINATION "${CMAKE_INSTALL_BINDIR}")
endif()
endif()

20
CODE_OF_CONDUCT.md Normal file
View 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).

114
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,114 @@
# Contributing to Video2X
Thank you for considering contributing to Video2X. This document outlines the guidelines for contributing to ensure a smooth and effective development process. Should you have any questions or require assistance, please do not hesitate to reach out to the project maintainers.
## Commit Messages
Commit messages must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. This helps maintain a consistent and informative project history.
### Commit Message Format
```text
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
```
#### Common Types
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation updates
- **perf**: Performance improvements that do not affect the code's behavior
- **style**: Changes that do not affect the code's functionality (e.g., formatting)
- **refactor**: Code changes that neither fix a bug nor add a feature
- **test**: Adding or modifying tests
- **chore**: Maintenance or other non-functional updates
#### Common Scopes
Including a scope is optional but is strongly encouraged. One commit should only address changes to a single module or component. If a change must affect multiple modules, use `*` as the scope.
- **avutils**: The audio/video utilities
- **conversions**: The video format conversion utilities
- **decoder**: The video decoder module
- **encoder**: The video encoder module
- **fsutils**: The file system utilities
- **logging**: Any logging-related changes
- **libplacebo**: The libplacebo filter
- **realesrgan**: The Real-ESRGAN filter
- **realcugan**: The Real-CUGAN filter
- **rife**: The RIFE frame interpolator
- **video2x**: The Video2X command-line interface
#### Example
```
feat(encoder): add support for specifying video pixel format
Add the `pix_fmt` field to the `EncoderConfig` struct to allow users to specify the pixel format for encoding.
Closes #12345
```
## Documentation of Changes
All changes must be documented in the `CHANGELOG.md` file. The changelog must adhere to the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
### Example Changelog Entry
```markdown
## [Unreleased]
### Added
- Support for specifying video pixel format in the encoder module (#12345).
### Fixed
- A memory leak in the video encoder module (#23456).
```
## Coding Standards
All code contributions must strictly follow the coding standards outlined in this section. These standards help maintain code quality, readability, and consistency throughout the project. Before submitting any code changes, ensure your code adheres to these guidelines.
### C++ Code Style
C++ code must follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). This ensures consistency and readability across the codebase. Additionally:
- Use smart pointers (`std::unique_ptr`, `std::shared_ptr`) instead of raw pointers wherever possible.
- Use `#pragma once` for header guards.
- Use `#include` directives in the following order:
1. Related header files
2. C++ standard library headers
3. Third-party library headers
4. Project-specific headers
- Never check pointers with implicit conversion to `bool`; always perform an explicit comparison with `nullptr`.
- Always set pointers to `nullptr` after freeing the associated memory.
### Code Formatting
All C++ code must be formatted using `clang-format` with the project's `.clang-format` configuration file before submitting a pull request. This helps maintain a uniform code style.
## Submitting a Pull Request
1. **Fork the repository**: Create a personal fork of the project.
2. **Create a branch**: Create a new branch for your changes:
```bash
git checkout -b <type>/<scope>
```
3. **Write code**: Make your changes, ensuring they adhere to the coding standards and are properly documented.
4. **Document changes**: Update `CHANGELOG.md` with your changes.
5. **Commit changes**: Write clear and descriptive commit messages using the Conventional Commits format.
6. **Push changes**: Push your branch to your fork:
```bash
git push origin <type>/<scope>
```
7. **Open a pull request**: Submit your pull request to the `master` branch of the original repository. Include a clear description of the changes made and reference any relevant issues.
## Code Reviews
All pull requests will undergo a code review. Please expect feedback from the maintainers after you submit the pull request. We may need further information or changes before merging your pull request.

112
Makefile
View File

@@ -1,112 +0,0 @@
.PHONY: build static debug clean \
test-realesrgan test-libplacebo \
memcheck-realesrgan memcheck-libplacebo \
heaptrack-realesrgan heaptrack-libplacebo
BINDIR=build
CC=clang
CXX=clang++
TEST_VIDEO=data/standard-test.mp4
TEST_OUTPUT=data/output.mp4
build:
cmake -S . -B $(BINDIR) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_C_COMPILER=$(CC) \
-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_C_COMPILER=$(CC) \
-DCMAKE_CXX_COMPILER=$(CXX) \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF
cmake --build $(BINDIR) --config Release --parallel
cp $(BINDIR)/compile_commands.json .
debug:
cmake -S . -B $(BINDIR) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_C_COMPILER=$(CC) \
-DCMAKE_CXX_COMPILER=$(CXX) \
-DCMAKE_BUILD_TYPE=Debug
cmake --build $(BINDIR) --config Debug --parallel
cp $(BINDIR)/compile_commands.json .
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 \
libopencv-dev
cmake -B /tmp/build -S . -DUSE_SYSTEM_NCNN=OFF \
-DCMAKE_C_COMPILER=$(CC) -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
clean:
rm -vrf $(BINDIR) data/output*.* heaptrack*.zst valgrind.log
test-realesrgan:
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f realesrgan -r 4 -m realesr-animevideov3
test-libplacebo:
LD_LIBRARY_PATH=$(BINDIR) $(BINDIR)/video2x -i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a
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) \
-f realesrgan -r 2 -m realesr-animevideov3 \
-p veryfast -b 1000000 -q 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) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a \
-p veryfast -b 1000000 -q 30
heaptrack-realesrgan:
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
$(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f realesrgan -r 4 -m realesr-animevideov3 \
-p veryfast -b 1000000 -q 30
heaptrack-libplacebo:
LD_LIBRARY_PATH=$(BINDIR) HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack \
$(BINDIR)/video2x \
-i $(TEST_VIDEO) -o $(TEST_OUTPUT) \
-f libplacebo -w 1920 -h 1080 -s anime4k-v4-a \
-p veryfast -b 1000000 -q 30

9
NOTICE
View File

@@ -4,8 +4,17 @@ 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.

View File

@@ -1,27 +0,0 @@
pkgname=video2x
pkgver=r843.e09f348
pkgrel=1
pkgdesc="A machine learning-based lossless video super resolution framework"
arch=('x86_64')
url="https://github.com/k4yt3x/video2x"
license=('AGPL3')
depends=('ffmpeg' 'ncnn' 'vulkan-driver' 'opencv' 'spdlog')
makedepends=('git' 'cmake' 'make' 'clang' 'pkgconf' 'vulkan-headers' 'openmp')
pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
git submodule update --init --recursive
}
build() {
cmake -B build -S .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build --config Release --parallel
}
package() {
DESTDIR="$pkgdir" cmake --install build
}

155
README.md
View File

@@ -1,75 +1,102 @@
<p align="center">
<img src="https://github.com/user-attachments/assets/5cd63373-e806-474f-94ec-6e04963bf90f"/>
<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/actions/workflow/status/k4yt3x/video2x/build.yml?label=Build&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>
> [!IMPORTANT]
> Versions 4 and 5 have reached end-of-life (EOL) status. Due to limited development resources, issues related to any version earlier than 6 will no longer be addressed.
## 🌟 Version 6.0.0
## 🌟 Version 6.0.0 Preview
Video2X 6.0.0 highlights:
**[Direct download link for Windows (Installer)](https://github.com/k4yt3x/video2x/releases/download/6.0.0-beta.5/video2x-qt6-windows-amd64-installer.exe)**
- 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.
![6.0.0-beta-screenshot](https://github.com/user-attachments/assets/e4318eaf-f726-4193-885f-030593a5078a)
<details>
<summary>Click to see more details</summary>
Version 6.0.0 is a complete rewrite of this project in C/C++. It:
- actually works this time, with less pain (in comparison to 5.0.0 beta);
- is blazing fast, thanks to the redesigned efficient pipeline and the speed of C/C++;
- is cross-platform, available right now for both Windows and Linux;
- provides much better output quality with Anime4K v4 and RealESRGAN;
- supports Anime4K v4 and all other custom MPV-compatible GLSL shaders;
- supports RealESRGAN (all three models) via ncnn and Vulkan;
- requires 0 disk space for processing the video, just space for storing the final output; and
- exports a standard C function that can be easily integrated in your own projects!
- 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, Real-ESRGAN, Real-CUGAN, and RIFE;
- supports two modes: filtering (upscaling) and frame interpolation;
- supports Anime4K v4 and all custom MPV-compatible GLSL shaders;
- supports Real-ESRGAN, Real-CUGAN, and RIFE (all models) via ncnn and Vulkan;
- requires zero additional disk space during processing, just space for the final output.
These are available for download now:
</details>
- **6.0.0 beta Qt6-based GUI for Windows** is on the [releases page](https://github.com/k4yt3x/video2x/releases).
- **6.0.0 beta CLI preview builds for Windows and Linux** are on the [releases page](https://github.com/k4yt3x/video2x/releases).
- You will need to install the dependencies and set `LD_LIBRARY_PATH` for the Linux build to work. Refer to the [PKGBUILD](PKGBUILD) file to see what needs to be installed.
- Alternatively, you can build it from source. Take a look at the [Makefile](Makefile).
- 6.0.0 beta AUR package for Arch Linux (`video2x-git`).
- 6.0.0 beta [container image](https://github.com/k4yt3x/video2x/pkgs/container/video2x).
- A new Colab will be made for 6.0.0 at a later time.
![6.4.0-screenshot](https://github.com/user-attachments/assets/9b1cc8a7-2903-4d2c-80a2-8d81f007e45b)
There is still much to be done and optimize. Stay tuned for more updates. As for why the 5.0.0 branch was abandoned, here are some of the reasons:
## 🖥️ Hardware Requirements
- Wrapped C++ libraries for Python are too painful to build for cross-platform distribution.
- Some wrapped C++ libraires exhibited unexpected behaviors.
- Running FFmpeg via commands and piping data through stdin/stdout are inefficient.
- C/C++ native binaries are much smaller and much more efficient.
Your system must meet the minimum hardware requirements below to run Video2X.
## [💬 Telegram Discussion Group](https://t.me/video2x)
- **CPU**
- The precompiled binaries require CPUs with AVX2 support.
- **Intel**: Haswell (Q2 2013) or newer
- **AMD**: Excavator (Q2 2015) or newer
- **GPU**
- The GPU must support Vulkan.
- **NVIDIA**: Kepler (GTX 600 series, Q2 2012) or newer
- **AMD**: GCN 1.0 (Radeon HD 7000 series, Q1 2012) or newer
- **Intel**: HD Graphics 4000 (Q2 2012) or newer
Join our Telegram discussion group to ask any questions you have about Video2X, chat directly with the developers, or discuss about super resolution technologies and the future of Video2X in general.
## [🪟 Install on Windows](https://docs.video2x.org/installing/windows-qt6.html)
## [🪟 Download Windows Releases](https://github.com/k4yt3x/video2x/releases/tag/4.8.1)
**[Download the Latest Windows Installer Executable (6.4.0)](https://github.com/k4yt3x/video2x/releases/download/6.4.0/video2x-qt6-windows-amd64-installer.exe)**
The latest Windows release build based on version 4.8.1. Go to the [GUI](https://github.com/k4yt3x/video2x/wiki/GUI) page to see the basic usages of the GUI. Try the [mirror](https://files.k4yt3x.com/Projects/Video2X/latest) if you can't download releases directly from GitHub.
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). The GUI currently supports the following languages:
- English (United States)
- 简体中文(中国)
- 日本語(日本)
- Português (Portugal)
- Français (France)
- Deutsch (Deutschland)
## [🐧 Install on Linux](https://docs.video2x.org/installing/linux.html)
Video2X packages are available for the Linux distros listed below. A universal AppImage is also available for other distros. If you'd like to build it from source code, refer to the [PKGBUILD](packaging/arch/PKGBUILD) file for a general overview of the required dependencies and commands.
- Arch Linux: AUR packages, maintained by [@K4YT3X](https://github.com/k4yt3x).
- [aur/video2x](https://aur.archlinux.org/packages/video2x)
- [aur/video2x-git](https://aur.archlinux.org/packages/video2x-git)
- [aur/video2x-qt6](https://aur.archlinux.org/packages/video2x-qt6)
- [aur/video2x-qt6-git](https://aur.archlinux.org/packages/video2x-qt6-git)
- Arch Linux (Chinese Mainland): archlinuxcn packages, maintained by [@Integral-Tech](https://github.com/Integral-Tech).
- [archlinuxcn/video2x](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x)
- [archlinuxcn/video2x-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-git)
- [archlinuxcn/video2x-qt6](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6)
- [archlinuxcn/video2x-qt6-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6-git)
- Other distros: `Video2X-x86_64.AppImage` on the [releases page](https://github.com/k4yt3x/video2x/releases/latest).
## [📦 Container Image](https://docs.video2x.org/running/container.html)
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 (Tesla K80, T4, P4, or P100) 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).
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).
## [📦 Container Image](https://github.com/k4yt3x/video2x/pkgs/container/video2x)
## [💬 Telegram Discussion Group](https://t.me/video2x)
Video2X container images 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 [documentations](https://github.com/K4YT3X/video2x/wiki/Container).
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.
## [📖 Documentations](https://github.com/k4yt3x/video2x/wiki)
## [📖 Documentation](https://docs.video2x.org/)
Video2X's documentations are hosted on this repository's [Wiki page](https://github.com/k4yt3x/video2x/wiki). It includes comprehensive explanations for how to use the [GUI](https://github.com/k4yt3x/video2x/wiki/GUI), the [CLI](https://github.com/k4yt3x/video2x/wiki/CLI), the [container image](https://github.com/K4YT3X/video2x/wiki/Container), the [library](https://github.com/k4yt3x/video2x/wiki/Library), and more. The Wiki is open to edits by the community, so you, yes you, can also correct errors or add new contents to the documentations.
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.
## Introduction
Video2X is a video/GIF/image upscaling and frame interpolation software written in Python. It can use these following state-of-the-art algorithms to increase the resolution and frame rate of your video/GIF/image. More information about the algorithms that it supports can be found in [the documentations](https://github.com/k4yt3x/video2x/wiki/Algorithms).
### Video Upscaling
## 📽️ Video Demos (Outdated)
![Spirited Away Demo](https://user-images.githubusercontent.com/21986859/49412428-65083280-f73a-11e8-8237-bb34158a545e.png)\
_Upscale demo: Spirited Away's movie trailer_
@@ -78,53 +105,53 @@ _Upscale demo: Spirited Away's movie trailer_
- 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 to 4K 120FPS
- 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 to 1080P 60FPS
- 240P 29.97 to 1080P 60 FPS with waifu2x and DAIN
- The original video's copyright belongs to ASCII Media Works
### Standard Test Clip
The following clip can be used to test if your setup works properly. This is also the standard clip used for running performance benchmarks.
- [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
- [Standard Test Clip (240P)](https://files.k4yt3x.com/resources/videos/standard-test.mp4) 4.54 MiB
- [Real-CUGAN Upscaled Sample (1704P)](https://files.k4yt3x.com/resources/videos/standard-realcugan.mp4) 3.5 MiB
- [Real-ESRGAN Upscaled Sample (1704P)](https://files.k4yt3x.com/resources/videos/standard-realesrgan.mp4) 3.1 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
The original clip came from the anime "さくら荘のペットな彼女."\
Copyright of this clip belongs to 株式会社アニプレックス.
## License
## ⚖️ License
This project is licensed under the [GNU Affero General Public License Version 3 (GNU AGPL v3)](https://www.gnu.org/licenses/agpl-3.0.txt)\
Copyright (C) 2018-2024 K4YT3X and [contributors](https://github.com/k4yt3x/video2x/graphs/contributors).
This project is licensed under [GNU AGPL version 3](https://www.gnu.org/licenses/agpl-3.0.txt).\
Copyright (C) 2018-2025 K4YT3X and [contributors](https://github.com/k4yt3x/video2x/graphs/contributors).
![AGPLv3](https://www.gnu.org/graphics/agplv3-155x51.png)
This project (`libvideo2x`) includes or depends on these following projects:
This project includes or depends on these following projects:
| Project | License |
| ----------------------------------------------------------------------------- | --------------- |
| [Anime4K](https://github.com/bloc97/Anime4K) | MIT License |
| [FFmpeg](https://www.ffmpeg.org/) | LGPLv2.1, GPLv2 |
| [Real-ESRGAN ncnn Vulkan](https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan) | MIT License |
| [ncnn](https://github.com/Tencent/ncnn) | BSD 3-Clause |
| 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 |
More licensing information can be found in the [NOTICE](NOTICE) file.
## Special Thanks
## 🌺 Special Thanks
Appreciations are given to the following personnel who have contributed significantly to the project.
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)
- [@Integral-Tech](https://github.com/Integral-Tech)
- [@ddouglas87](https://github.com/ddouglas87)
- [@lhanjian](https://github.com/lhanjian)
- [@nihui](https://github.com/nihui)
- [@sat3ll](https://github.com/sat3ll)
## Similar 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.

14
SECURITY.md Normal file
View 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.

View File

@@ -0,0 +1,2 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/Video2XTargets.cmake")

7
cmake/version.h.in Normal file
View File

@@ -0,0 +1,7 @@
#pragma once
namespace video2x {
#define LIBVIDEO2X_VERSION_STRING "@PROJECT_VERSION@"
} // namespace video2x

1
docs/book/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
book

11
docs/book/book.toml Normal file
View 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
View 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
View 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)

View File

@@ -0,0 +1,3 @@
# Building
Instructions for building the project.

View File

@@ -0,0 +1,57 @@
# Linux
Instructions for building this project on Linux.
## Arch Linux
Arch users can build the latest version of the project from the AUR packages [`video2x`](https://aur.archlinux.org/packages/video2x) and [`video2x-git`](https://aur.archlinux.org/packages/video2x-git). The project's repository also contains another PKGBUILD example at `packaging/arch/PKGBUILD`.
```bash
git clone https://aur.archlinux.org/video2x.git
cd video2x-git
# Build the package without installing it
makepkg -s
# Build and install the package
makepkg -si
```
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 spdlog boost-libs
pacman -Sy git cmake clang pkgconf just vulkan-headers openmp boost
# Clone the repository
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
cd video2x
# Build the project
just build
```
The built binaries will be located in the `build` directory.
## Ubuntu
Ubuntu users can use the `.justfile` to build the project automatically. The `ubuntu2404` and `ubuntu2204` targets are available for Ubuntu 24.04 and 22.04, respectively. `just` 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
# The version of `just` in the Ubuntu repository is outdated
# We need to compile and install `just` manually
sudo apt-get update && sudo apt-get install cargo
cargo install just
# Clone the repository
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
cd video2x
# Build the project
# Before running the command, ensure ~/.cargo/bin is in your PATH
just ubuntu2404
```
The built `.deb` package will be located under the current directory.

View 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`.

View 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`.

View File

@@ -0,0 +1,3 @@
# Developing
Development-related instructions and guidelines for this project.

View 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.
![Video2Xv4](https://github.com/user-attachments/assets/976a93ff-efad-418f-a3e2-272e84db2d74)\
_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.
![Video2Xv5](https://github.com/user-attachments/assets/d1f38034-a5d3-4c7e-92bf-a5b30fa9ac72)\
_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).
![Video2Xv6 drawio](https://github.com/user-attachments/assets/c5d5fc3b-8688-4d50-b7c0-3b5d825a8c69)\
_Video2X 6.0.0 architecture_

View 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.

View File

@@ -0,0 +1,3 @@
# Installing
Instructions for installing this project.

View File

@@ -0,0 +1,20 @@
# Linux
Video2X packages are available for the Linux distros listed below. If you'd like to build it from source code, refer to the [PKGBUILD](https://github.com/k4yt3x/video2x/tree/master/packaging/arch/PKGBUILD) file for a general overview of the required dependencies and commands. If a package is not available for your distro and you prefer not to compile the program from source code, consider using the [container image](running/container.md).
## Arch Linux
- AUR packages, maintained by [@K4YT3X](https://github.com/k4yt3x).
- [aur/video2x](https://aur.archlinux.org/packages/video2x)
- [aur/video2x-git](https://aur.archlinux.org/packages/video2x-git)
- [aur/video2x-qt6](https://aur.archlinux.org/packages/video2x-qt6)
- [aur/video2x-qt6-git](https://aur.archlinux.org/packages/video2x-qt6-git)
- Chinese Mainland: archlinuxcn packages, maintained by [@Integral-Tech](https://github.com/Integral-Tech).
- [archlinuxcn/video2x](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x)
- [archlinuxcn/video2x-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-git)
- [archlinuxcn/video2x-qt6](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6)
- [archlinuxcn/video2x-qt6-git](https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/video2x-qt6-git)
## Other Distros
Users of other distros can download and use the AppImage from the [releases page](https://github.com/k4yt3x/video2x/releases/latest).

View 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.

View 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.

View File

@@ -0,0 +1 @@
# Other

View 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.
![vlcsnap-2020-05-15-20h41m36s060](https://user-images.githubusercontent.com/21986859/82106016-08ba8800-970e-11ea-85b5-d1b57d34e283.png)\
_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.
![4K BadApple waifu2x](https://img.youtube.com/vi/FiX7ygnbAHw/maxresdefault.jpg)\
_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.
![the first commit of Video2X](https://user-images.githubusercontent.com/21986859/82105271-fcccc700-9709-11ea-8861-b22b807f885f.png)\
_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.
![Spirited Away Demo](https://user-images.githubusercontent.com/21986859/49412428-65083280-f73a-11e8-8237-bb34158a545e.png)\
_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.
<!--![Hack the Valley II](https://files.k4yt3x.com/Resources/Images/htv2_team_photo.png)\-->
_[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](https://user-images.githubusercontent.com/21986859/40265170-39c0caae-5b01-11e8-8371-8b6c24769639.png)\
_Screenshot of Video2X 2.0_

View File

@@ -0,0 +1,3 @@
# Running
Instructions for running and using this project.

View File

@@ -0,0 +1,104 @@
# 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 -p realesrgan -s 4 --realesrgan-model 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 -w 3840 -h 2160 -p libplacebo --libplacebo-shader anime4k-v4-a+a
```
## Advanced
It is possible to specify custom MPV-compatible GLSL shader files with the `--libplacebo-shader` argument:
```bash
video2x -i input.mp4 -o output.mp4 -p libplacebo -w 3840 -h 2160 --libplacebo-shader path/to/custom/shader.glsl
```
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 -p realesrgan -s 4 --realesrgan-model realesr-animevideov3 -g 1
```
Specify arbitrary extra FFmpeg encoder options with the `--extra-encoder-options, -e` argument:
```bash
video2x -i input.mkv -o output.mkv -p realesrgan --realesrgan-model realesrgan-plus -s 4 -c libx264rgb -e crf=17 -e preset=veryslow -e tune=film
```
## Encoder Options
Video2X uses FFmpeg's C libraries to encode videos. Encoder options are specified in two ways:
- **Common options** shared by all encoders are stored in a [`AVCodecContext`](https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html) struct. Below are some options set through `AVCodecContext`:
- Codec
- Pixel format
- Bitrate
- Keyframe interval
- Minimum and maximum quantizer
- GOP size
- **Encoder-specific** options are stored in [`AVOption`](https://ffmpeg.org/doxygen/trunk/structAVOption.html) structs and set with the [`av_opt_set`](https://ffmpeg.org/doxygen/trunk/group__opt__set__funcs.html#ga5fd4b92bdf4f392a2847f711676a7537) function. Below are some encoder-specific options for `libx264`:
- CRF
- Preset
- Tune
- Profile
Common options can only be set through Video2X's command line arguments. You can run `video2x --help` and see the `Encoder options` section to see the supported options.
You can specify encoder-specific options in Video2X using the `--extra-encoder-option` (`-e`) argument. To view the available options for a particular codec, run:
```bash
ffmpeg -h encoder=$ENCODER
```
For example, to view the available options for `libx264`, run:
```console
$ ffmpeg -h encoder=libx264
Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
General capabilities: dr1 delay threads
Threading capabilities: other
Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le
libx264 AVOptions:
-preset <string> E..V....... Set the encoding preset (cf. x264 --fullhelp) (default "medium")
-tune <string> E..V....... Tune the encoding params (cf. x264 --fullhelp)
-profile <string> E..V....... Set profile restrictions (cf. x264 --fullhelp)
-fastfirstpass <boolean> E..V....... Use fast settings when encoding first pass (default true)
-level <string> E..V....... Specify level (as defined by Annex A)
-passlogfile <string> E..V....... Filename for 2 pass stats
-wpredp <string> E..V....... Weighted prediction for P-frames
-a53cc <boolean> E..V....... Use A53 Closed Captions (if available) (default true)
-x264opts <string> E..V....... x264 options
-crf <float> E..V....... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)
-crf_max <float> E..V....... In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)
-qp <int> E..V....... Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)
...
```
You can then set the encoder-specific options with the `-e` argument. The `-e` argument can be used multiple times to set multiple options. For example, the following arguments set the CRF to 17, the preset to `veryslow`, and the tune to `film` for `libx264`:
```console
-e crf=17 -e preset=veryslow -e tune=film
```

View 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 -p realesrgan -s 4 --realesrgan-model 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 -p realesrgan -s 4 --realesrgan-model 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 -p realesrgan -s 4 --realesrgan-model 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 -p realesrgan -s 4 --realesrgan-model 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 -p realesrgan -s 4 --realesrgan-model realesr-animevideov3
```

View File

@@ -0,0 +1,3 @@
# Desktop
TODO.

View File

@@ -1,32 +0,0 @@
#ifndef __GETOPT_H__
#define __GETOPT_H__
#ifdef __cplusplus
extern "C" {
#endif
extern int opterr; /* if error message should be printed */
extern int optind; /* index into parent argv vector */
extern int optopt; /* character checked for validity */
extern int optreset; /* reset getopt */
extern char *optarg; /* argument associated with option */
struct option {
const char *name;
int has_arg;
int *flag;
int val;
};
#define no_argument 0
#define required_argument 1
#define optional_argument 2
// int getopt(int, char **, const char *);
int getopt_long(int, char **, const char *, const struct option *, int *);
#ifdef __cplusplus
}
#endif
#endif /* __GETOPT_H__ */

View 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

View File

@@ -1,5 +1,4 @@
#ifndef CONVERSIONS_H
#define CONVERSIONS_H
#pragma once
extern "C" {
#include <libavutil/frame.h>
@@ -8,13 +7,17 @@ extern "C" {
#include <mat.h>
namespace video2x {
namespace conversions {
// Convert AVFrame to another pixel format
AVFrame *convert_avframe_pix_fmt(AVFrame *src_frame, AVPixelFormat pix_fmt);
AVFrame* convert_avframe_pix_fmt(AVFrame* src_frame, AVPixelFormat pix_fmt);
// Convert AVFrame to ncnn::Mat
ncnn::Mat avframe_to_ncnn_mat(AVFrame *frame);
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);
AVFrame* ncnn_mat_to_avframe(const ncnn::Mat& mat, AVPixelFormat pix_fmt);
#endif // CONVERSIONS_H
} // namespace conversions
} // namespace video2x

View File

@@ -1,18 +1,34 @@
#ifndef DECODER_H
#define DECODER_H
#pragma once
#include <filesystem>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
int init_decoder(
AVHWDeviceType hw_type,
AVBufferRef *hw_ctx,
const char *in_fname,
AVFormatContext **fmt_ctx,
AVCodecContext **dec_ctx,
int *vstream_idx
);
namespace video2x {
namespace decoder {
#endif // DECODER_H
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

View File

@@ -1,33 +1,85 @@
#ifndef ENCODER_H
#define ENCODER_H
#pragma once
#include <cstdint>
#include <filesystem>
#include <vector>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.h>
}
#include "libvideo2x.h"
namespace video2x {
namespace encoder {
int init_encoder(
AVBufferRef *hw_ctx,
const char *out_fname,
AVFormatContext *ifmt_ctx,
AVFormatContext **ofmt_ctx,
AVCodecContext **enc_ctx,
AVCodecContext *dec_ctx,
EncoderConfig *encoder_config,
int vstream_idx,
int **stream_map
);
// Encoder configurations
struct EncoderConfig {
// Non-AVCodecContext options
std::string codec = "libx264";
bool recalculate_pts = true;
bool copy_audio_streams = true;
bool copy_subtitle_streams = true;
int write_frame(
AVFrame *frame,
AVCodecContext *enc_ctx,
AVFormatContext *ofmt_ctx,
int vstream_idx
);
// Basic video options
AVPixelFormat pix_fmt = AV_PIX_FMT_NONE;
int flush_encoder(AVCodecContext *enc_ctx, AVFormatContext *ofmt_ctx);
// 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;
#endif // ENCODER_H
// 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<std::string, std::string>> 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:
EncoderConfig enc_cfg_;
AVFormatContext* ofmt_ctx_;
AVCodecContext* enc_ctx_;
int out_vstream_idx_;
int* stream_map_;
};
} // namespace encoder
} // namespace video2x

View File

@@ -1,21 +0,0 @@
#ifndef FILTER_H
#define FILTER_H
#include <vector>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/avfilter.h>
#include <libavutil/buffer.h>
}
// Abstract base class for filters
class Filter {
public:
virtual ~Filter() = default;
virtual int init(AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, AVBufferRef *hw_ctx) = 0;
virtual int process_frame(AVFrame *in_frame, AVFrame **out_frame) = 0;
virtual int flush(std::vector<AVFrame *> &_) { return 0; }
};
#endif // FILTER_H

View 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

View 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

View File

@@ -0,0 +1,59 @@
#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,
int noise_level = 0,
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_;
int noise_level_;
const fsutils::StringType model_name_;
AVRational in_time_base_;
AVRational out_time_base_;
AVPixelFormat out_pix_fmt_;
};
} // namespace processors
} // namespace video2x

View File

@@ -1,12 +1,37 @@
#ifndef FSUTILS_H
#define FSUTILS_H
#pragma once
#include <filesystem>
#include <optional>
#include <string>
bool filepath_is_readable(const std::filesystem::path &path);
namespace video2x {
namespace fsutils {
std::filesystem::path find_resource_file(const std::filesystem::path &path);
#ifdef _WIN32
typedef wchar_t CharType;
#define STR(x) L##x
#else
typedef char CharType;
#define STR(x) x
#endif
std::string path_to_string(const std::filesystem::path& path);
#ifdef _WIN32
typedef std::wstring StringType;
#else
typedef std::string StringType;
#endif
#endif // FSUTILS_H
bool file_is_readable(const std::filesystem::path& path);
std::optional<std::filesystem::path> find_resource(const std::filesystem::path& resource);
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

View 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

View File

@@ -1,5 +1,4 @@
#ifndef PLACEBO_H
#define PLACEBO_H
#pragma once
#include <filesystem>
@@ -8,15 +7,19 @@ extern "C" {
#include <libavfilter/avfilter.h>
}
namespace video2x {
namespace processors {
int init_libplacebo(
AVBufferRef *hw_ctx,
AVFilterGraph **filter_graph,
AVFilterContext **buffersrc_ctx,
AVFilterContext **buffersink_ctx,
AVCodecContext *dec_ctx,
AVFilterGraph** filter_graph,
AVFilterContext** buffersrc_ctx,
AVFilterContext** buffersink_ctx,
AVCodecContext* dec_ctx,
int out_width,
int out_height,
const std::filesystem::path &shader_path
uint32_t vk_device_index,
const std::filesystem::path& shader_path
);
#endif // PLACEBO_H
} // namespace processors
} // namespace video2x

View File

@@ -1,43 +0,0 @@
#ifndef LIBPLACEBO_FILTER_H
#define LIBPLACEBO_FILTER_H
#include <filesystem>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
}
#include "filter.h"
// LibplaceboFilter class definition
class LibplaceboFilter : public Filter {
private:
AVFilterGraph *filter_graph;
AVFilterContext *buffersrc_ctx;
AVFilterContext *buffersink_ctx;
int out_width;
int out_height;
const std::filesystem::path shader_path;
AVRational in_time_base;
AVRational out_time_base;
public:
// Constructor
LibplaceboFilter(int width, int height, const std::filesystem::path &shader_path);
// Destructor
virtual ~LibplaceboFilter() 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 process_frame(AVFrame *in_frame, AVFrame **out_frame) override;
// Flushes any remaining frames
int flush(std::vector<AVFrame *> &flushed_frames) override;
};
#endif // LIBPLACEBO_FILTER_H

View File

@@ -1,104 +1,94 @@
#ifndef LIBVIDEO2X_H
#define LIBVIDEO2X_H
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <atomic>
#include <cstdint>
#include <memory>
#ifdef _WIN32
#ifdef LIBVIDEO2X_EXPORTS
#define LIBVIDEO2X_API __declspec(dllexport)
#else
#define LIBVIDEO2X_API __declspec(dllimport)
#endif
#else
#define LIBVIDEO2X_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
// Enum to specify filter type
enum FilterType {
FILTER_LIBPLACEBO,
FILTER_REALESRGAN
};
// Enum to specify log level
enum Libvideo2xLogLevel {
LIBVIDEO2X_LOG_LEVEL_TRACE,
LIBVIDEO2X_LOG_LEVEL_DEBUG,
LIBVIDEO2X_LOG_LEVEL_INFO,
LIBVIDEO2X_LOG_LEVEL_WARNING,
LIBVIDEO2X_LOG_LEVEL_ERROR,
LIBVIDEO2X_LOG_LEVEL_CRITICAL,
LIBVIDEO2X_LOG_LEVEL_OFF
};
// Configuration for Libplacebo filter
struct LibplaceboConfig {
int out_width;
int out_height;
const char *shader_path;
};
// Configuration for RealESRGAN filter
struct RealESRGANConfig {
int gpuid;
bool tta_mode;
int scaling_factor;
const char *model;
};
// Unified filter configuration
struct FilterConfig {
enum FilterType filter_type;
union {
struct LibplaceboConfig libplacebo;
struct RealESRGANConfig realesrgan;
} config;
};
// Encoder configuration
struct EncoderConfig {
int out_width;
int out_height;
bool copy_streams;
enum AVCodecID codec;
enum AVPixelFormat pix_fmt;
const char *preset;
int64_t bit_rate;
float crf;
};
// Video processing context
struct VideoProcessingContext {
int64_t processed_frames;
int64_t total_frames;
time_t start_time;
bool pause;
bool abort;
bool completed;
};
// C-compatible process_video function
LIBVIDEO2X_API int process_video(
const char *in_fname,
const char *out_fname,
enum Libvideo2xLogLevel log_level,
bool benchmark,
enum AVHWDeviceType hw_device_type,
const struct FilterConfig *filter_config,
struct EncoderConfig *encoder_config,
struct VideoProcessingContext *proc_ctx
);
#ifdef __cplusplus
}
#endif
#endif // LIBVIDEO2X_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

View 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

View 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

View 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

View 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

View File

@@ -1,48 +0,0 @@
#ifndef REALSRGAN_FILTER_H
#define REALSRGAN_FILTER_H
#include <filesystem>
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "filter.h"
#include "realesrgan.h"
// RealesrganFilter class definition
class RealesrganFilter : public Filter {
private:
RealESRGAN *realesrgan;
int gpuid;
bool tta_mode;
int scaling_factor;
const char *model;
const std::filesystem::path custom_model_param_path;
const std::filesystem::path custom_model_bin_path;
AVRational in_time_base;
AVRational out_time_base;
AVPixelFormat out_pix_fmt;
public:
// Constructor
RealesrganFilter(
int gpuid = 0,
bool tta_mode = false,
int scaling_factor = 4,
const char *model = "realesr-animevideov3",
const std::filesystem::path custom_model_param_path = std::filesystem::path(),
const std::filesystem::path custom_model_bin_path = std::filesystem::path()
);
// Destructor
virtual ~RealesrganFilter() 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 process_frame(AVFrame *in_frame, AVFrame **out_frame) override;
};
#endif

View File

@@ -1,6 +0,0 @@
#ifndef VERSION_H
#define VERSION_H
#define LIBVIDEO2X_VERSION_STRING "@PROJECT_VERSION@"
#endif // VERSION_H

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View File

@@ -0,0 +1,75 @@
7767517
73 74
Input data 0 1 data
Split splitncnn_input0 1 2 data data_splitncnn_0 data_splitncnn_1
Convolution /Conv 1 1 data_splitncnn_1 /Conv_output_0 0=64 1=3 4=1 5=1 6=1728
PReLU /PRelu 1 1 /Conv_output_0 /PRelu_output_0 0=64
Convolution /Conv_1 1 1 /PRelu_output_0 /Conv_1_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_1 1 1 /Conv_1_output_0 /PRelu_1_output_0 0=64
Convolution /Conv_2 1 1 /PRelu_1_output_0 /Conv_2_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_2 1 1 /Conv_2_output_0 /PRelu_2_output_0 0=64
Convolution /Conv_3 1 1 /PRelu_2_output_0 /Conv_3_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_3 1 1 /Conv_3_output_0 /PRelu_3_output_0 0=64
Convolution /Conv_4 1 1 /PRelu_3_output_0 /Conv_4_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_4 1 1 /Conv_4_output_0 /PRelu_4_output_0 0=64
Convolution /Conv_5 1 1 /PRelu_4_output_0 /Conv_5_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_5 1 1 /Conv_5_output_0 /PRelu_5_output_0 0=64
Convolution /Conv_6 1 1 /PRelu_5_output_0 /Conv_6_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_6 1 1 /Conv_6_output_0 /PRelu_6_output_0 0=64
Convolution /Conv_7 1 1 /PRelu_6_output_0 /Conv_7_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_7 1 1 /Conv_7_output_0 /PRelu_7_output_0 0=64
Convolution /Conv_8 1 1 /PRelu_7_output_0 /Conv_8_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_8 1 1 /Conv_8_output_0 /PRelu_8_output_0 0=64
Convolution /Conv_9 1 1 /PRelu_8_output_0 /Conv_9_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_9 1 1 /Conv_9_output_0 /PRelu_9_output_0 0=64
Convolution /Conv_10 1 1 /PRelu_9_output_0 /Conv_10_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_10 1 1 /Conv_10_output_0 /PRelu_10_output_0 0=64
Convolution /Conv_11 1 1 /PRelu_10_output_0 /Conv_11_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_11 1 1 /Conv_11_output_0 /PRelu_11_output_0 0=64
Convolution /Conv_12 1 1 /PRelu_11_output_0 /Conv_12_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_12 1 1 /Conv_12_output_0 /PRelu_12_output_0 0=64
Convolution /Conv_13 1 1 /PRelu_12_output_0 /Conv_13_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_13 1 1 /Conv_13_output_0 /PRelu_13_output_0 0=64
Convolution /Conv_14 1 1 /PRelu_13_output_0 /Conv_14_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_14 1 1 /Conv_14_output_0 /PRelu_14_output_0 0=64
Convolution /Conv_15 1 1 /PRelu_14_output_0 /Conv_15_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_15 1 1 /Conv_15_output_0 /PRelu_15_output_0 0=64
Convolution /Conv_16 1 1 /PRelu_15_output_0 /Conv_16_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_16 1 1 /Conv_16_output_0 /PRelu_16_output_0 0=64
Convolution /Conv_17 1 1 /PRelu_16_output_0 /Conv_17_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_17 1 1 /Conv_17_output_0 /PRelu_17_output_0 0=64
Convolution /Conv_18 1 1 /PRelu_17_output_0 /Conv_18_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_18 1 1 /Conv_18_output_0 /PRelu_18_output_0 0=64
Convolution /Conv_19 1 1 /PRelu_18_output_0 /Conv_19_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_19 1 1 /Conv_19_output_0 /PRelu_19_output_0 0=64
Convolution /Conv_20 1 1 /PRelu_19_output_0 /Conv_20_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_20 1 1 /Conv_20_output_0 /PRelu_20_output_0 0=64
Convolution /Conv_21 1 1 /PRelu_20_output_0 /Conv_21_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_21 1 1 /Conv_21_output_0 /PRelu_21_output_0 0=64
Convolution /Conv_22 1 1 /PRelu_21_output_0 /Conv_22_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_22 1 1 /Conv_22_output_0 /PRelu_22_output_0 0=64
Convolution /Conv_23 1 1 /PRelu_22_output_0 /Conv_23_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_23 1 1 /Conv_23_output_0 /PRelu_23_output_0 0=64
Convolution /Conv_24 1 1 /PRelu_23_output_0 /Conv_24_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_24 1 1 /Conv_24_output_0 /PRelu_24_output_0 0=64
Convolution /Conv_25 1 1 /PRelu_24_output_0 /Conv_25_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_25 1 1 /Conv_25_output_0 /PRelu_25_output_0 0=64
Convolution /Conv_26 1 1 /PRelu_25_output_0 /Conv_26_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_26 1 1 /Conv_26_output_0 /PRelu_26_output_0 0=64
Convolution /Conv_27 1 1 /PRelu_26_output_0 /Conv_27_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_27 1 1 /Conv_27_output_0 /PRelu_27_output_0 0=64
Convolution /Conv_28 1 1 /PRelu_27_output_0 /Conv_28_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_28 1 1 /Conv_28_output_0 /PRelu_28_output_0 0=64
Convolution /Conv_29 1 1 /PRelu_28_output_0 /Conv_29_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_29 1 1 /Conv_29_output_0 /PRelu_29_output_0 0=64
Convolution /Conv_30 1 1 /PRelu_29_output_0 /Conv_30_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_30 1 1 /Conv_30_output_0 /PRelu_30_output_0 0=64
Convolution /Conv_31 1 1 /PRelu_30_output_0 /Conv_31_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_31 1 1 /Conv_31_output_0 /PRelu_31_output_0 0=64
Convolution /Conv_32 1 1 /PRelu_31_output_0 /Conv_32_output_0 0=64 1=3 4=1 5=1 6=36864
PReLU /PRelu_32 1 1 /Conv_32_output_0 /PRelu_32_output_0 0=64
Convolution /Conv_33 1 1 /PRelu_32_output_0 /Conv_33_output_0 0=48 1=3 4=1 5=1 6=27648
PixelShuffle /DepthToSpace 1 1 /Conv_33_output_0 /DepthToSpace_output_0 0=4
Interp /Resize 1 1 data_splitncnn_0 /Resize_output_0 0=1 1=4.000000e+00 2=4.000000e+00
BinaryOp /Add 2 1 /DepthToSpace_output_0 /Resize_output_0 /Add_output_0
Clip /Clip 1 1 /Add_output_0 output 0=0.000000e+00 1=1.000000e+00

Some files were not shown because too many files have changed in this diff Show More