# DEXTR-PyTorch **Repository Path**: chunzhenjinxiang/DEXTR-PyTorch ## Basic Information - **Project Name**: DEXTR-PyTorch - **Description**: 深度学习 图像抠图 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 2 - **Created**: 2021-01-27 - **Last Updated**: 2025-04-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Deep Extreme Cut (DEXTR) Visit our [project page](http://www.vision.ee.ethz.ch/~cvlsegmentation/dextr) 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 code was ported to PyTorch 0.4.0! For the previous version of the code with Pytorch 0.3.1, please checkout [this branch](https://github.com/scaelles/DEXTR-PyTorch/tree/PyTorch-0.3.1). #### NEW: Keras with Tensorflow backend implementation also available: [DEXTR-KerasTensorflow](https://github.com/scaelles/DEXTR-KerasTensorflow )! ### Abstract 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. ### Installation The code was tested with [Miniconda](https://conda.io/miniconda.html) and Python 3.6. After installing the Miniconda environment: 0. Clone the repo: ```Shell git clone https://github.com/scaelles/DEXTR-PyTorch cd DEXTR-PyTorch ``` 1. Install dependencies: ```Shell conda install pytorch torchvision -c pytorch conda install matplotlib opencv pillow scikit-learn scikit-image ``` 2. Download the model by running the script inside ```models/```: ```Shell cd models/ chmod +x download_dextr_model.sh ./download_dextr_model.sh cd .. ``` 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](http://www.vision.ee.ethz.ch/~cvlsegmentation/dextr/#downloads), or keep scrolling till the end of this README. 3. To try the demo version of DEXTR, please run: ```Shell python demo.py ``` If installed correctly, the result should look like this:
