Spaces:
Runtime error
A newer version of the Gradio SDK is available:
5.23.3
Development for evaluation and training
Datasets
First, please prepare standard datasets for evaluation and training.
We present most of prevailing datasets in video frame interpolation, though some are not used in our project. Hope this collection could help your research.
Dataset | :link: Source | Train/Eval | Arbitrary/Fixed |
---|---|---|---|
Vimeo90k | ToFlow (IJCV 2019) | Both | Fixed |
ATD-12K | AnimeInterp (CVPR 2021) | Both | Fixed |
SNU-FILM | CAIN (AAAI 2021) | Eval | Fixed |
UCF101 | Google Driver | Eval | Fixed |
HD | MEMC-Net (TPAMI 2018)/Google Driver | Eval | Fixed |
Xiph-2k/-4k | SoftSplat (CVPR 2020) | Eval | Fixed |
MiddleBury | MiddleBury | Eval | Fixed |
GoPro | GoPro | Both | Arbitrary |
Adobe240fps | DBN (CVPR 2017) | Both | Arbitrary |
X4K1000FPS | XVFI (ICCV 2021) | Both | Arbitrary |
Pretrained Models
Dataset | :link: Download Links | Config file | Trained on | Arbitrary/Fixed |
---|---|---|---|---|
AMT-S | [Google Driver][Baidu Cloud] | [cfgs/AMT-S] | Vimeo90k | Fixed |
AMT-L | [Google Driver][Baidu Cloud] | [cfgs/AMT-L] | Vimeo90k | Fixed |
AMT-G | [Google Driver][Baidu Cloud] | [cfgs/AMT-G] | Vimeo90k | Fixed |
AMT-S | [Google Driver][Baidu Cloud] | [cfgs/AMT-S_gopro] | GoPro | Arbitrary |
Evaluation
Before evaluation, you should:
- Check the dataroot is organized as follows:
./data
βββ Adobe240
β βββ original_high_fps_videos
β βββ test_frames # using ffmpeg to extract 240 fps frames from `original_high_fps_videos`
βββ GOPRO
β βββ test
β βββ train
βββ SNU_FILM
β βββ GOPRO_test
β βββ test-easy.txt
β βββ test-extreme.txt
β βββ test-hard.txt
β βββ test-medium.txt
β βββ YouTube_test
βββ ucf101_interp_ours
β βββ 1
β βββ 1001
β βββ ...
βββ vimeo_triplet
βββ readme.txt
βββ sequences
βββ tri_testlist.txt
βββ tri_trainlist.txt
- Download the provided pretrained models.
Then, you can perform evaluation as follows:
Run all benchmarks for fixed-time models.
sh ./scripts/benchmark_fixed.sh [CFG] [CKPT_PATH] ## e.g. sh ./scripts/benchmark_fixed.sh cfgs/AMT-S.yaml pretrained/amt-s.pth
Run all benchmarks for arbitrary-time models.
sh ./scripts/benchmark_arbitrary.sh [CFG] [CKPT_PATH] ## e.g. sh ./scripts/benchmark_arbitrary.sh cfgs/AMT-S.yaml pretrained/gopro_amt-s.pth
Run a single benchmark for fixed-time models. You can custom data paths in this case.
python [BENCHMARK] -c [CFG] -p [CKPT_PATH] -r [DATAROOT] ## e.g. python benchmarks/vimeo90k.py -c cfgs/AMT-S.yaml -p pretrained/amt-s.pth -r data/vimeo_triplet
Run the inference speed & model size comparisons using:
python speed_parameters.py -c [CFG] ## e.g. python speed_parameters.py -c cfgs/AMT-S.yaml
Training
Before training, please first prepare the optical flows (which are used for supervision).
We need to install cupy
first before flow generation:
conda activate amt # satisfying `requirement.txt`
conda install -c conda-forge cupy
After installing cupy
, we can generate optical flows by the following command:
python flow_generation/gen_flow.py -r [DATA_ROOT]
## e.g.
python flow_generation/gen_flow.py -r data/vimeo_triplet
After obtaining the optical flow of the training data, run the following commands for training (DDP mode):
sh ./scripts/train.sh [NUM_GPU] [CFG] [MASTER_PORT]
## e.g.
sh ./scripts/train.sh 2 cfgs/AMT-S.yaml 14514
Our training configuration files are provided in cfgs
. Please carefully check the dataset_dir
is suitable for you.
Note:
If you intend to turn off DDP training, you can switch the key
distributed
fromtrue
tofalse
in the config file.If you do not use wandb, you can switch the key
logger.use_wandb
fromtrue
tofalse
in the config file.