DEXTR-PyTorch
Visit our project page for accessing the paper, and the pre-computed results.
This is the implementation of our work Deep Extreme Cut (DEXTR)
, for object segmentation from extreme points.
This paper explores the use of extreme points in an object (left-most, right-most, top, bottom pixels) as input to obtain precise object segmentation for images and videos. We do so by adding an extra channel to the image in the input of a convolutional neural network (CNN), which contains a Gaussian centered in each of the extreme points. The CNN learns to transform this information into a segmentation of an object that matches those extreme points. We demonstrate the usefulness of this approach for guided segmentation (grabcut-style), interactive segmentation, video object segmentation, and dense segmentation annotation. We show that we obtain the most precise results to date, also with less user input, in an extensive and varied selection of benchmarks and datasets.
The code was tested with Miniconda and Python 3.6. After installing the Miniconda environment:
Clone the repo:
git clone https://github.com/scaelles/DEXTR-PyTorchcd DEXTR-PyTorch
Install dependencies:
conda install pytorch torchvision -c pytorch conda install matplotlib opencv pillow scikit-learn scikit-image
Download the model by running the script inside models/
:
cd models/ chmod +x download_dextr_model.sh ./download_dextr_model.shcd ..
The default model is trained on PASCAL VOC Segmentation train + SBD (10582 images). To download models trained on PASCAL VOC Segmentation train or COCO, please visit our project page, or keep scrolling till the end of this README.
To try the demo version of DEXTR, please run:
python demo.py
If installed correctly, the result should look like this:
To train and evaluate DEXTR on PASCAL (or PASCAL + SBD), please follow these additional steps:
Install tensorboard (integrated with PyTorch).
pip install tensorboard tensorboardx
Download the pre-trained PSPNet model for semantic segmentation, taken from this repository.
cd models/ chmod +x download_pretrained_psp_model.sh ./download_pretrained_psp_model.shcd ..
Set the paths in mypath.py
, so that they point to the location of PASCAL/SBD dataset.
Run python train_pascal.py
, after changing the default parameters, if necessary (eg. gpu_id).
Enjoy!!
We provide the following DEXTR models, pre-trained on: * PASCAL + SBD, trained on PASCAL VOC Segmentation train + SBD (10582 images). Achieves mIoU of 91.5% on PASCAL VOC Segmentation val. * PASCAL, trained on PASCAL VOC Segmentation train (1464 images). Achieves mIoU of 90.5% on PASCAL VOC Segmentation val. * COCO, trained on COCO train 2014 (82783 images). Achieves mIoU of 87.8% on PASCAL VOC Segmentation val.
If you use this code, please consider citing the following papers:
@Inproceedings{Man+18, Title = {Deep Extreme Cut: From Extreme Points to Object Segmentation}, Author = {K.K. Maninis and S. Caelles and J. Pont-Tuset and L. {Van Gool}}, Booktitle = {Computer Vision and Pattern Recognition (CVPR)}, Year = {2018} } @InProceedings{Pap+17, Title = {Extreme clicking for efficient object annotation}, Author = {D.P. Papadopoulos and J. Uijlings and F. Keller and V. Ferrari}, Booktitle = {ICCV}, Year = {2017} }
We thank the authors of pytorch-deeplab-resnet for making their PyTorch re-implementation of DeepLab-v2 available!
If you encounter any problems please contact us at {kmaninis, scaelles}@vision.ee.ethz.ch.
还没有评论,说两句吧!
热门资源
Keras-ResNeXt
Keras ResNeXt Implementation of ResNeXt models...
seetafaceJNI
项目介绍 基于中科院seetaface2进行封装的JAVA...
spark-corenlp
This package wraps Stanford CoreNLP annotators ...
capsnet-with-caps...
CapsNet with capsule-wise convolution Project ...
inferno-boilerplate
This is a very basic boilerplate example for pe...
智能在线
400-630-6780
聆听.建议反馈
E-mail: support@tusaishared.com