/cainapp

Primary LanguagePythonMIT LicenseMIT

CAINAPP 2 BETA🚧

Welcome to CAINAPP 2.0!

What is CAIN?

CAIN - Channel Attention Is All You Need for Video Frame Interpolation

CAIN is a very fast interpolation network that doesn't use much vram (Ex: 5GB with fp16 for 8k)!

What is cainapp?

Cainapp is a gui for cain with some new things like fp16, saving frames on other threads and more! Look at the code!

What are the requirements?

Unlike previously, Cainapp now runs on CUDA. Fortunately, it runs on the driver-based version, so the only requirements are

  1. A nvidia GPU
  2. Driver version >396.26

So in theory, it could even run on a GTX 650

How to install 💾

(Skip first 2 steps on ubuntu)

  1. Download python 3.9 📥 (https://www.python.org/ftp/python/3.9.2/python-3.9.2-amd64.exe)

  2. Install python 3.9, and remember to select "Add to PATH"

  3. In cmd run

    pip3 install pyqt5

    pip3 install qdarkstyle

    pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html this can need much time ⌚

    pip3 install tqdm

    for windows:

    pip3 install opencv-python

    for linux:

    pip3 install opencv-python-headless

  4. Download ffmpeg 📥 (https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z)

  5. Extract 📦 ffmpeg.exe in cainapp folder📁

  6. Download the model and put it into the cain folder📁

  7. In cmd, run cd path/to/cainapp/ then python3 main.py

How to run the discord bot🤖

Basically the same as in How to install but you need to install 2 more things and do some arranging

pip3 install discord.py

pip3 install requests

Put your token in a file called token.txt in the main cain directory

Take your model file from before, copy it to a folder named models, and rename it to stable.pth.

And run python3 1.py

Sadly, Discord limits the file size to 8MB, so bitrate isn't high and video length is limited. Audio bitrate is also only 69kbps

As a note to windows users, python 3.9 only supports Windows 8+, so don't expect it to work with 7, if you were even planning on using that in the first place.

How to train 🚆

Open In Colab Simple train colab try it! Its simple!

Models

https://drive.google.com/drive/folders/1Pljrfv9xjXPU2fiwvSx-D3nvh7XvOx0I

Donate💰

If you wish to support the project, you can donate to Hubert's patreon here! Hubert's dogecoin and dgb wallets are also listed in the code.

CAIN Citation

@inproceedings{choi2020cain,
    author = {Choi, Myungsub and Kim, Heewon and Han, Bohyung and Xu, Ning and Lee, Kyoung Mu},
    title = {Channel Attention Is All You Need for Video Frame Interpolation},
    booktitle = {AAAI},
    year = {2020}
}