• Stars
    star
    206
  • Rank 189,437 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SimpleClick: Interactive Image Segmentation with Simple Vision Transformers (ICCV 2023)

SimpleClick: Interactive Image Segmentation with Simple Vision Transformers

drawing

Environment

Training and evaluation environment: Python3.8.8, PyTorch 1.11.0, Ubuntu 20.4, CUDA 11.0. Run the following command to install required packages.

pip3 install -r requirements.txt

You can build a container with the configured environment using our Dockerfiles. Our Dockerfiles only support CUDA 11.0/11.4/11.6. If you use different CUDA drivers, you need to modify the base image in the Dockerfile (This is annoying that you need a matched image in Dockerfile for your CUDA driver, otherwise the gpu doesn't work in the container. Any better solutions?). You also need to configue the paths to the datasets in config.yml before training or testing.

Demo

drawing

An example script to run the demo.

python3 demo.py --checkpoint=./weights/simpleclick_models/cocolvis_vit_huge.pth --gpu 0

Some test images can be found here.

Evaluation

Before evaluation, please download the datasets and models, and then configure the path in config.yml.

Use the following code to evaluate the huge model.

python scripts/evaluate_model.py NoBRS \
--gpu=0 \
--checkpoint=./weights/simpleclick_models/cocolvis_vit_huge.pth \
--eval-mode=cvpr \
--datasets=GrabCut,Berkeley,DAVIS,PascalVOC,SBD,COCO_MVal,ssTEM,BraTS,OAIZIB

Training

Before training, please download the MAE pretrained weights (click to download: ViT-Base, ViT-Large, ViT-Huge) and configure the dowloaded path in config.yml.

Use the following code to train a huge model on C+L:

python train.py models/iter_mask/plainvit_huge448_cocolvis_itermask.py \
--batch-size=32 \
--ngpus=4

Download

SimpleClick models: Google Drive

BraTS dataset (369 cases): Google Drive

OAI-ZIB dataset (150 cases): Google Drive

Other datasets: RITM Github

Notes

[03/11/2023] Add an xTiny model.

[10/25/2022] Add docker files.

[10/02/2022] Release the main models. This repository is still under active development.

License

The code is released under the MIT License. It is a short, permissive software license. Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.

Citation

@article{liu2022simpleclick,
  title={SimpleClick: Interactive Image Segmentation with Simple Vision Transformers},
  author={Liu, Qin and Xu, Zhenlin and Bertasius, Gedas and Niethammer, Marc},
  journal={arXiv preprint arXiv:2210.11006},
  year={2022}
}

Acknowledgement

Our project is developed based on RITM. Thanks for the nice demo GUI :)

More Repositories

1

Awesome-Foundation-Models

A curated list of foundation models for vision and language tasks
753
star
2

registration

Image Registration
TeX
275
star
3

mermaid

Image registration using pytorch
Python
177
star
4

easyreg

an image registration/augmentation/segmentation package
Python
164
star
5

shapmagn

shape registration
Python
107
star
6

robot

code for Fast Point Cloud Registration with Optimal Transport
Python
84
star
7

uniGradICON

The official website for uniGradICON: A Foundation Model for Medical Image Registration
Python
63
star
8

SegNext

Rethinking Interactive Image Segmentation with Low Latency, High Quality, and Diverse Prompts (CVPR 2024)
Python
59
star
9

DeepAtlas

Joint Semi-supervised Learning of Image Registration and Segmentation
Python
49
star
10

iSegFormer

iSegFormer: Interactive Image/Volume Segmentation using Vision Transformers (MICCAI 2022)
Python
26
star
11

LTS

Local Temperature Scaling for Probability Calibration
Python
20
star
12

OAI_analysis_2

Image analysis approaches to analyze the OAI magnetic resonance images
Jupyter Notebook
18
star
13

PStrip

PCA Model for Brain Extraction
Python
17
star
14

LiftReg

Official repository for LiftReg: Limited Angle 2D/3D Deformable Registration.
Python
16
star
15

NAISR

NAISR: A 3D Neural Additive Model for Interpretable Shape Representation
Python
15
star
16

Aladdin

Joint Atlas Building and Diffeomorphic Registration Learning with Pairwise Alignment
Python
12
star
17

neuro_shooting

Shooting approaches for deep neural networks
Python
6
star
18

OAI_analysis

OAI image analysis pipeline
Python
5
star
19

ByConstructionICON

Jupyter Notebook
4
star
20

diffusion-3D-discovery

Python
4
star
21

2D3DFluidReg

This is the repository for paper "Fluid Registration Between Lung CT and Stationary Chest Tomosynthesis Images"
Python
3
star
22

pregis

Image registration in the presence of pathology
Python
2
star
23

NePhi

Official repository for NePhi: Neural Deformation Fields for Approximately Diffeomorphic Medical Image Registration (ECCV 2024)
JavaScript
2
star
24

D2-SONATA

Python
2
star
25

MRIS

Python
2
star
26

comp777_code

Code for comp777
Python
1
star
27

UniLMMV

Python
1
star
28

SegGuidedMMReg

Repository for 'Multimodal Image Registration Guided by Few Segmentations from One Modality'
Python
1
star
29

PIANO

Python
1
star
30

GHMM_Long

Python
1
star
31

DSREM

Dynamic Spatial Random Effects Model
Python
1
star
32

mouse_brain_translucence

Jupyter Notebook
1
star