Home

Awesome

This is the project page for the paper:

ISTR: End-to-End Instance Segmentation via Transformers.

<!-- :star:**Highlights:** - **GPU Friendly**: Four 1080Ti/2080Ti GPUs can handle the training for R50, R101 backbones with ISTR. - **High Performance**: On COCO test-dev, ISTR-R50-3x gets 46.8/38.6 box/mask AP, and ISTR-R101-3x gets 48.1/39.9 box/mask AP. -->

Updates

Methodbackbonefpsbox APmask APlink
ISTR-PCAR50-FPN13.046.739.87p58 (google drive)
ISTR-DCTR50-FPN12.546.940.2ibi3
ISTR-SMTR50-FPN10.447.441.773bs (google drive)
ISTR-PCAR101-FPN10.748.041.15rcj
ISTR-DCTR101-FPN10.348.341.60mdl (google drive)
ISTR-SMTR101-FPN8.948.842.9qbr8 (google drive)
ISTR-SMTSwin-L3.555.849.2nuj8 (google drive)
ISTR-SMT@1088Swin-L2.956.449.79uj8

PWC

Installation

The codes are built on top of Detectron2, SparseR-CNN, and AdelaiDet.

Requirements

Steps

  1. Install the repository (we recommend to use Anaconda for installation.)
conda create -n ISTR python=3.8 -y
conda activate ISTR
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch
or (conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch)
pip install opencv-python
pip install scipy
pip install shapely
git clone https://github.com/hujiecpp/ISTR.git
cd ISTR
python setup.py build develop
  1. Link coco dataset path
ln -s /coco_dataset_path/coco ./datasets
  1. Train ISTR (e.g., with ResNet50 backbone)
python projects/ISTR/train_net.py --num-gpus 4 --config-file projects/ISTR/configs/ISTR-R50-3x.yaml
  1. Evaluate ISTR (e.g., with ResNet50 backbone)
python projects/ISTR/train_net.py --num-gpus 4 --config-file projects/ISTR/configs/ISTR-R50-3x.yaml --eval-only MODEL.WEIGHTS ./output/model_final.pth
  1. Visualize the detection and segmentation results (e.g., with ResNet50 backbone)
python demo/demo.py --config-file projects/ISTR/configs/ISTR-R50-3x.yaml --input input1.jpg --output ./output --confidence-threshold 0.4 --opts MODEL.WEIGHTS ./output/model_final.pth

Citation

If our paper helps your research, please cite it in your publications:

@article{hu2021istr,
  title={Istr: End-to-end instance segmentation with transformers},
  author={Hu, Jie and Cao, Liujuan and Lu, Yao and Zhang, ShengChuan and Wang, Yan and Li, Ke and Huang, Feiyue and Shao, Ling and Ji, Rongrong},
  journal={arXiv preprint arXiv:2105.00637},
  year={2021}
}
@article{hu2024istr,
  author={Hu, Jie and Lu, Yao and Zhang, Shengchuan and Cao, Liujuan},
  title={ISTR: Mask-Embedding-Based Instance Segmentation Transformer},
  journal={IEEE Transactions on Image Processing},  
  year={2024},
  volume={33},
  pages={2895-2907},
  doi={10.1109/TIP.2024.3385980}
}