Skip to main content

No project description provided

Project description

Socialify Image

MacOS x64 MacOS arm64 Windows x64 Windows arm64 Linux x64 codecov CI-test CI-build Release pip-test Release-pypi PyPI version GitHub

Final2x-core is a cross-platform image super-resolution CLI tool for Final2x. If you have any questions, please raise an issue in this repository.

Install

Download in Release or use pip (python >= 3.8, >=3.9 for MacOS arm64)

pip install Final2x-core

Use

usage: Final2x-core [-h] [-b BASE64] [-j JSON] [-y YAML] [-o]

when para is not specified, the config.yaml file in the directory will be read automatically

optional arguments:
  -h, --help            show this help message and exit
  -b BASE64, --BASE64 BASE64
                        base64 string for config json
  -j JSON, --JSON JSON  JSON string for config
  -y YAML, --YAML YAML  yaml config file path
  -l, --LOG             save log
  -o, --OP              check install

Config

Pass the config json string to the program through the -j parameter.

PLEASE NOTE: the config is JSON, remove the // comments before use.

{
  "gpuid": 0,
  // GPU id, >= -1 (-1 for CPU, may not work for some models.)
  "inputpath": [
    // Input image paths, should be a list.
    "path/to/img1.jpg",
    "path/to/img2.png"
  ],
  "model": "RealCUGAN-pro",
  // model name
  "modelscale": 2,
  // model upscale factor
  "modelnoise": -1,
  // DENOISE level
  "outputpath": "path/to/output",
  // output path
  "targetscale": 2.0,
  // Target upscale factor, upscale multiple times to achieve the target upscale factor.
  // If not invalid, use modelscale.
  "tta": false
  // Test Time Augmentation, default false
}

SUPPORTED MODEL LIST:

- RealCUGAN-se:
    - model: "RealCUGAN-se"
    - scale: 2
               - noise: -1, 0, 1, 2, 3
    - scale: 3, 4
               - noise: -1, 0, 3

- RealCUGAN-pro:
    - model: "RealCUGAN-pro"
    - scale: 2, 3
    - noise: -1, 0, 3

- RealESRGAN-animevideov3:
    - model: "RealESRGAN-animevideov3"
    - scale: 2, 3, 4

- RealESRGAN:
    - model: "RealESRGAN"
    - scale: 4

- RealESRGAN-anime:
    - model: "RealESRGAN-anime"
    - scale: 4

- Waifu2x-cunet:
    - model: "Waifu2x-cunet"
    - scale: 1
               - noise: 0, 1, 2, 3
    - scale: 2
               - noise: -1, 0, 1, 2, 3

- Waifu2x-upconv_7_anime_style_art_rgb:
    - model: "Waifu2x-upconv_7_anime_style_art_rgb"
    - scale: 2
    - noise: -1, 0, 1, 2, 3

- Waifu2x-upconv_7_photo:
    - model: "Waifu2x-upconv_7_photo"
    - scale: 2
    - noise: -1, 0, 1, 2, 3

Build

Github Action

The project just only been tested in Ubuntu 18+ and Debian 9+ environments on Linux, so if the project does not work on your system, please try building it.

Reference

The following references were used in the development of this project:

  • ncnn - ncnn is a high-performance neural network inference framework developed by Tencent AI Lab.
  • nihui/realcugan-ncnn-vulkan - This project provided the core implementation of the Real-CUGAN algorithm using the ncnn and Vulkan libraries.
  • xinntao/Real-ESRGAN-ncnn-vulkan - This project provided the core implementation of the Real-ESRGAN algorithm using the ncnn and Vulkan libraries.
  • nihui/waifu2x-ncnn-vulkan - This project provided the core implementation of the Waifu2x algorithm using the ncnn and Vulkan libraries.
  • realcugan-ncnn-py - This project provided the Python Binding for realcugan-ncnn-vulkan with PyBind11.
  • realesrgan-ncnn-py - This project provided the Python Binding for realesrgan-ncnn-vulkan with PyBind11.
  • waifu2x-ncnn-py - This project provided the Python Binding for waifu2x-ncnn-vulkan with PyBind11.

License

This project is licensed under the BSD 3-Clause - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

final2x_core-2.0.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

final2x_core-2.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file final2x_core-2.0.0.tar.gz.

File metadata

  • Download URL: final2x_core-2.0.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for final2x_core-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d96d467bbda95593e9a5670e5e6178986a1e650abbb0f7ad927318aca251c258
MD5 b5262341596513eda906741ee2d30aa7
BLAKE2b-256 e69166fc9138402439e228070b31df50d3a050c64639c00019533ac49c3f5dc2

See more details on using hashes here.

Provenance

File details

Details for the file final2x_core-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for final2x_core-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 759c5a745a6290c40869c1cb3d47c2317f927ecae04e00f830241dfcf116b35e
MD5 696caca0621da3e0a329e18607020254
BLAKE2b-256 04a50c0d59e840d18d8c4739a1b87e492b8f5c966ccf018a74257b0214ab68dd

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page