Code for the VIDNet (BMVC 2021)
The base code is from RVOS.
- Install requirements
pip install -r requirements.txt
Download the DAVIS 2016 dataset from their website at 480p resolution. Create a folder named databases
in the parent folder of the root directory of this project and put there the database in a folder named DAVIS2016
. The root directory (VIDNet
folder) and the databases
folder should be in the same directory.
Follow the instruction on VINet to inpaint DAVIS and obtain VI inpainting result: https://github.com/mcahny/Deep-Video-Inpainting
Follow the instruction on OPNet to inpaint DAVIS and obtain OP inpainting result: https://github.com/seoungwugoh/opn-demo
Follow the instruction on CPNet to inpaint DAVIS and obtain CP inpainting result: https://github.com/shleecs/Copy-and-Paste-Networks-for-Deep-Video-Inpainting
Run ela.py
and change the path of davis_train
and davis_test
to corresponding inpainting DAVIS folder.
-
Train the model for video inpainting detection with
python train_vi.py -model_name model_name
. Checkpoints and logs will be saved under../models/model_name
. -
Other arguments can be passed as well. For convenience, scripts to train with typical parameters are provided under
scripts/
. Simply run the the following:
cd src/misc
- change
__C.PATH.SEQUENCES
and__C.PATH.SEQUENCES2
inconfig.py
to be the training data path (e.g., VI, OP, CP inpainting path) cd ../../script
- update
model_name
for model storage - run
train_davis.sh
We provide bash scripts to evaluate models for the DAVIS 2016 and FVI datasets. You can find them under the scripts
folder.
For DAVIS evaluation:
cd src/misc
- change
__C.PATH.SEQUENCES
inconfig.py
to be the testing data path (e.g., VI, OP, CP) cd ../../scripts
- update model_name in
eval_davis.sh
- run
eval_davis.sh
For FVI evaluation: cd scripts
- update model_name in
eval_fvi.sh
- run
eval_fvi.sh
If this code or dataset helps your research, please cite our paper:
@inproceedings{zhou2021vid,
title={Deep Video Inpainting Detection},
author={Zhou, Peng and Yu, Ning and Wu, Zuxuan and Davis, Larry S and Shrivastava, Abhinav and Lim, Ser Nam},
booktitle = {BMVC},
year={2021}
}