This is the Pytorch implementation of our paper Deep Object Co-Segmentation published at ACCV18. For more information, you can visit the project page. You can also find our caffe version here.
- Python 3
- Pytorch >= 1.0
- gcc (tested with gcc 8)
Tested on Ubuntu 20.04 with pytorch 1.5, CUDA 10.2 and gcc 8.0 .
NOTE: for using it with older version of pytorch (0.4.1) please check v1.0 .
git clone https://github.com/ohosseini/DOCS-pytorch.git
cd DOCS-pytorch
bash install.sh
First download the model from here and put it in DOCS-pytorch
directory.
Then you can run the demo with
bash demo.sh
For more information on how to apply the demo on other images you can check
python demo.py --help
The numbers are compareable to the original ones in the paper which are generated using our main code (DOCS-caffe).
DOCS-caffe | DOCS-pytorch | ||
---|---|---|---|
MSRC | P | 95.4 | 92.0 |
J | 82.9 | 82.3 | |
Internet | P | 93.5 | 92.9 |
J | 72.6 | 72.0 | |
iCoseg | P | 95.1 | 94.1 |
J | 84.2 | 84.0 |
If you use this code, please cite our publication:
Deep Object Co-Segmentation, Weihao Li*, Omid Hosseini Jafari*, Carsten Rother, ACCV 2018.
@InProceedings{DOCS_ACCV18,
title={Deep Object Co-Segmentation},
author={Li, Weihao and Hosseini Jafari, Omid and Rother, Carsten},
booktitle={ACCV},
year={2018}
}
We used the Pytorch implementation of correlation layer from "Pytorch implementation of FlowNet 2.0" https://github.com/NVIDIA/flownet2-pytorch.