Giter Site home page Giter Site logo

youhuang67 / cfr-icl-interactive-segmentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from senlin-ali/cfr-icl-interactive-segmentation

0.0 0.0 0.0 10.51 MB

Cascade-Forward Refinement with Iterative Click Loss for Interactive Image Segmentation

Shell 0.46% Python 99.21% Cython 0.33%

cfr-icl-interactive-segmentation's Introduction

drawing

PWC PWC PWC PWC PWC

Environment

Training and evaluation environment: Python 3.9, PyTorch 1.13.1, CUDA 11.0. Run the following command to install required packages.

pip3 install -r requirements.txt

You need to configue the paths to the datasets in config.yml before training or testing. A script download_datasets.sh is prepared to download and organize required datasets.

Demo

drawing

An example script to run the demo.

python demo.py --checkpoint=weights/cocolvis_icl_vit_huge.pth --gpu 0

Evaluation

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

Download our model, please download below 3 zipped files and extract before use:

Use the following code to evaluate the huge model.

python scripts/evaluate_model.py NoBRS \
    --gpu=0 \
    --checkpoint=cocolvis_icl_vit_huge.pth \
    --datasets=GrabCut,Berkeley,DAVIS,PascalVOC,SBD \\
    --cf-n=4 \\
    --acf

# cf-n: CFR steps
# acf: adaptive CFR

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

Please also download the pretrained SimpleClick models from here.

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

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

Citation

@article{sun2023cfricl,
      title={CFR-ICL: Cascade-Forward Refinement with Iterative Click Loss for Interactive Image Segmentation}, 
      author={Shoukun Sun and Min Xian and Fei Xu and Tiankai Yao and Luca Capriotti},
      year={2023},
      eprint={2303.05620},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Acknowledgement

Our project is developed based on RITM and SimpleClick

cfr-icl-interactive-segmentation's People

Contributors

titorx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.