Anchor diffusion VOS
This repository contains code for the paper
Anchor Diffusion for Unsupervised Video Object Segmentation
Zhao Yang*, Qiang Wang*, Luca Bertinetto, Weiming Hu, Song Bai, Philip H.S. Torr
ICCV 2019 | PDF | BibTex
Setup
Code tested for Ubuntu 16.04, Python 3.7, PyTorch 0.4.1, and CUDA 9.2.
- Clone the repository and change to the new directory.
git clone https://github.com/yz93/anchor-diff-VOS-internal.git && cd anchor-diff-VOS
- Save the working directory to an environment variable for reference.
export AnchorDiff=$PWD
- Set up a new conda environment.
- For installing PyTorch 0.4.1 with different versions of CUDA, see here.
conda create -n anchordiff python=3.7 pytorch=0.4.1 cuda92 -c pytorch
source activate anchordiff
pip install -r requirements.txt
Data preparation
- Download the data set
cd $AnchorDiff
wget https://data.vision.ee.ethz.ch/csergi/share/davis/DAVIS-2017-trainval-480p.zip
unzip DAVIS-2017-trainval-480p.zip -d data
- Download pre-trained weights (1.5G) to $AnchorDiff.
cd $AnchorDiff
unzip snapshots.zip -d snapshots
- (If you do not intend to apply instance pruning described in the paper, feel free to skip this.) Download the detection results that we have computed using ExtremeNet, and generate the pruning masks.
cd $AnchorDiff
wget www.robots.ox.ac.uk/~yz/detection.zip
unzip detection.zip
python detection_filter.py
DAVIS 2016
Evaluation on- Examples for evaluating mean IoU on the validation set with options,
- save-mask (default 'True') for saving the predicted masks,
- ms-mirror (default 'False') for multiple-scale and mirrored input (slow),
- inst-prune (default 'False') for instance pruning,
- model (default 'ad') specifying models in Table 1 of the paper,
- eval-sal (default 'False') for computing saliency measures, MAE and F-score.
cd $AnchorDiff
python eval.py
python eval.py --ms-mirror True --inst-prune True --eval-sal True
- Use the benchmark tool to evaluate the saved masks under more metrics.
- Pre-computed results
License
The MIT License.