Skip to content

The official code for “Recurrent Generic Contour-based Instance Segmentation with Progressive Learning”, TCSVT, 2024.

License

Notifications You must be signed in to change notification settings

fh2019ustc/PolySnake

Repository files navigation

PolySnake

🔥 Good news! Our work has been accepted by IEEE Transactions on Circuits and Systems for Video Technology (TCSVT), 2024.

This is a PyTorch/GPU re-implementation of the paper Recurrent Generic Contour-based Instance Segmentation with Progressive Learning city

Results on Instance Segmentation

image

Results on Scene Text Detection

image

Results on Lane Detection

image

Any questions or discussions are welcomed!

Installation

Please see INSTALL.md.

Testing

Testing on Cityscapes

  1. Download the pretrained model from Google Drive or Baidu Cloud, and put it to $ROOT/data/model/rcnn_snake/cityscapes/.
  2. Test:
    # use coco evaluator
    python run.py --type evaluate --cfg_file configs/city_snake.yaml
    # use the cityscapes official evaluator
    python run.py --type evaluate --cfg_file configs/city_snake.yaml test.dataset CityscapesVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/city_snake.yaml
    

Testing on Kins

  1. Download the pretrained model from Google Drive or Baidu Cloud, and put it to $ROOT/data/model/snake/kins/.
  2. Test:
    python run.py --type evaluate --cfg_file configs/kins_snake.yaml test.dataset KinsVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/kins_snake.yaml test.dataset KinsVal
    

Testing on Sbd

  1. Download the pretrained model from Google Drive or Baidu Cloud, and put it to $ROOT/data/model/snake/sbd/.
  2. Test:
    python run.py --type evaluate --cfg_file configs/sbd_snake.yaml test.dataset SbdVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/sbd_snake.yaml test.dataset SbdVal
    

Testing on COCO

  1. Download the pretrained model from Google Drive or Baidu Cloud, and put it to $ROOT/data/model/snake/coco/.
  2. Test:
    python run.py --type evaluate --cfg_file configs/coco_snake.yaml test.dataset CocoVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/coco_snake.yaml test.dataset CocoVal
    

Testing on ADE20K

  1. Download the pretrained model from Google Drive, and put it to $ROOT/data/model/snake/ade20k/.
  2. Test:
    python run.py --type evaluate --cfg_file configs/ade20k.yaml test.dataset ade20kVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/ade20k.yaml test.dataset ade20kVal
    

Demo

We support demo for image and image folder using python run.py --type demo --cfg_file /path/to/yaml_file demo_path /path/to/image ct_score 0.3.

For example:

python run.py --type demo --cfg_file configs/sbd_snake.yaml demo_path demo_images ct_score 0.3
# or
python run.py --type demo --cfg_file configs/city_snake.yaml demo_path demo_images/munster_000048_000019_leftImg8bit.png ct_score 0.3

If setup correctly, the output will be saved at $ROOT/demo_out/ and look like

demo

Training

The training parameters can be found in project_structure.md.

Training on Cityscapes

python train_net.py --cfg_file configs/city_snake.yaml model rcnn_snake det_model rcnn_det

Training on Kins

python train_net.py --cfg_file configs/kins_snake.yaml model kins_snake

Training on Sbd

python train_net.py --cfg_file configs/sbd_snake.yaml model sbd_snake

Training on COCO

python train_net.py --cfg_file configs/coco_snake.yaml model coco_snake

Training on ADE20K

python train_net.py --cfg_file configs/ade20k.yaml model ade20k_snake

Citation

If you find this code useful for your research, please use the following BibTeX entry.

@inproceedings{PolySnake2023,
  title={Recurrent Generic Contour-based Instance Segmentation with Progressive Learning},
  author={Feng, Hao and Zhou Keyi and Zhou, Wengang and Yin, Yufei and Deng, Jiajun and Sun, Qi and Li, Houqiang},
  booktitle={IEEE Transactions on Circuits and Systems for Video Technology},
  year={2024}
}

Acknowledgement

Our work benefits a lot from DeepSnake and E2EC. Thanks for their wonderful works.

About

The official code for “Recurrent Generic Contour-based Instance Segmentation with Progressive Learning”, TCSVT, 2024.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published