Giter VIP home page Giter VIP logo

apisr's Introduction

APISR (CVPR 2024)

๐Ÿ“– APISR: Anime Production Inspired Real-World Anime Super-Resolution
APISR aims at restoring and enhancing low-quality anime images and video sources with various degradations from real-world scenarios.
๐Ÿ‘€Visualization | ๐Ÿ”ฅ Update | ๐Ÿ”ง Installation | โšกInference | ๐Ÿงฉ Dataset Curation | ๐Ÿ’ป Train

Arxiv
โญ If you like APISR, please help star this repo. Thanks! ๐Ÿค—

Visualization (Zoom in for the best view!) ๐Ÿ‘€

Update ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

  • Release Paper version implementation of APISR
  • Release a version of weight (for 2x, 4x and more) that is more emphasized on user visual preference instead of metrics
  • Gradio demo (maybe online)

Installation ๐Ÿ”ง

git clone [email protected]:Kiteretsu77/APISR.git
cd APISR

# Create conda env
conda create -n APISR python=3.10
conda activate APISR

# Install Pytorch we use torch.compile in our repository by default
pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt

# Install FFMPEG (the following is for linux system, the rest can see https://ffmpeg.org/download.html)
sudo apt install ffmpeg

Inference โšกโšกโšก

  1. Download the weight from https://drive.google.com/file/d/1Ubj-1f7gmi-dWlK_aUVcScZAlzKtuBJ8/view?usp=sharing and put it to "pretrained" folder
  2. Then, Execute
    python test_code/inference.py --input_dir XXX  --weight_path XXX  --store_dir XXX
    The default argument of test_code/inference.py is capable to execute sample images from "assets" folder

Dataset Curation ๐Ÿงฉ

  1. All the dataset curation pipeline is under "dataset_curation_pipeline" folder. You can collect your own dataset by sending videos into the pipeline and get least compressed and the most informative images from the video sources. With a folder with video sources, you can execute the following to get a basic dataset:

    python dataset_curation_pipeline/collect.py --video_folder_dir XXXX --save_dir XXX

Train (TBD) ๐Ÿ’ป

  1. Prepare a dataset (AVC/API)

  2. Train: Please check opt.py to setup parameters you want (We use opt.py to control everything we want)
    Step1 (Net L1 loss training): Run

    python train_code/train.py 

    The model weights will be inside the folder 'saved_models'

    Step2 (GAN Adversarial Training):

    1. Change opt['architecture'] in opt.py as "GRLGAN".
    2. Rename weights in 'saved_models' (either closest or the best, we use closest weight) to grlgan_pretrained.pth
    3. Run
    python train_code/train.py --use_pretrained

Related Projects

  1. Fast Anime SR acceleration: https://github.com/Kiteretsu77/FAST_Anime_VSR
  2. My previous paper (VCISR - WACV2024) as the baseline method: https://github.com/Kiteretsu77/VCISR-official

Citation

Please cite us if our work is useful for your research.

Disclaimer

This project is released for academic use only. We disclaim responsibility for the distribution of the dataset. Users are solely liable for their actions. The project contributors are not legally affiliated with, nor accountable for, users' behaviors.

License

This project is released under the GPL 3.0 license.

Contact

If you have any questions, please feel free to contact me at [email protected] or [email protected].

apisr's People

Contributors

kiteretsu77 avatar hikaridawn777 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.