Skip to content

Implementation of “Dynamic Context Correspondence Network for Semantic Alignment” (ICCV 2019)

Notifications You must be signed in to change notification settings

ShuaiyiHuang/DCCNet

Repository files navigation

DCCNet-Pytorch

This is the implementation of the paper:

S. Huang, Q. Wang, S. Zhang, S. Yan, and X. He. Dynamic Context Correspondence Network for Semantic Alignment. ICCV 2019 [arXiv]

using PyTorch.

Getting started

Environment

Python 3.5.2
Pytorch 0.3.1
torchvision 0.2.1

Getting the datasets

The PF-Pascal dataset (used for training and evaluation) can be downloaded and unzipped by browsing to the datasets/pf-pascal/ folder and running download.sh.

The PF-Willow and TSS dataset (used for evaluation) can be downloaded by browsing to the datasets/ folder and run download_datasets.py. The datasets will be under datasets/proposal-flow-willow and datasets/tss

Getting the trained models

The trained models trained on PF-Pascal (best_dccnet.pth.tar) can be dowloaded [here] (passwd:y42d). Put pretrained model under trained_models/ folder for further evaluation.

Training

To train a model, run train_dccnet.sh under scripts folder to reproduce our results.

Evaluation

Evaluation for PF-Pascal and PF-Willow is implemented in the eval_pf_pascal.py and eval_pf_willow.py file respectively. You can run the evaluation in the following way:

python eval_pf_pascal.py --checkpoint trained_models/best_dccnet.pth.tar

Evaluation for TSS is implemented in the eval_tss.py file. You can run the evaluation in the following way:

python eval_tss.py --checkpoint trained_models/best_dccnet.pth.tar

This will generate a series of flow files in the datasets/dccnet_results folder that then need to be fed to the TSS evaluation Matlab code. In order to run the Matlab evaluation, you need to clone the TSS repo and follow the corresponding instructions.

Acknwoledgement

We borrow tons of code from NC-Net and WeakAlign.

BibTeX

If you use this code in your project, please cite our paper:

@inproceedings{huang2019dynamic,
  title={Dynamic Context Correspondence Network for Semantic Alignment},
  author={Huang, Shuaiyi and Wang, Qiuyue and Zhang, Songyang and Yan, Shipeng and He, Xuming},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  pages={2010--2019},
  year={2019}
}

About

Implementation of “Dynamic Context Correspondence Network for Semantic Alignment” (ICCV 2019)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published