Biowulf High Performance Computing at the NIH
DEXTR-PyTorch: automated image segmentation using extreme points

DEXTR-PyTorch implements a new approach ("Deep Extreme Cut") to image labeling where extreme points in an object (left-most, right-most, top, bottom pixels) are used as input to obtain precise object segmentation for images and videos. This is done 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.


Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

ssh -Y
[user@biowulf]$  sinteractive  --gres=gpu:k80:1 --mem=12g
[user@@cn3316 ~]$  module load DEXTR-PyTorch
Download the source code to your current folder:
[user@@cn3316 ~]$  git clone 
[user@@cn3316 ~]$  git clone
Edit DEXTR-PyTorch/ by replacing '/path/to/PASCAL/VOC2012' with './':
[user@@cn3316 ~]$ sed -i 's#/path/to/PASCAL/VOC2012/#./#g' DEXTR-PyTorch/
Download models:
[user@@cn3316 ~]$ wget
[user@@cn3316 ~]$ wget
[user@@cn3316 ~]$ mv *.pth DEXTR-PyTorch/models
Run a demo (follow instructions on the screen):
[user@@cn3316 ~]$ dpt
Using CPU implementation
Singularity: Invoking an interactive shell within container...

Singularity DEXTR-PyTorch_gpu.sqsh:~> cd DEXTR-PyTorch
Singularity DEXTR-PyTorch_gpu.sqsh:~> python
Exit the session.
Singularity DEXTR-PyTorch_gpu.sqsh:~> exit
[user@cn3316 ~]$  exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$