Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



3 Commits

Repository files navigation

This is the code for the following paper:

Cai, Lile, Xun Xu, Jun Hao Liew, and Chuan Sheng Foo. "Revisiting Superpixels for Active Learning in Semantic Segmentation With Realistic Annotation Costs." In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10988-10997. 2021.

The code is tested with Tensorflow-1.13.2 with Python 3.6.8 using docker image tensorflow/tensorflow:1.13.2-gpu-py3.

  1. Prepare Cityscapes dataset. The Cityscapes dataset should be put in ./deeplab/datasets/cityscapes. You may refer to the deeplab repo ( for the details.

  2. Prepare the xception-65 model pretrained on ImageNet. The pretrained model should be put in ./deeplab/models. You can download the weights from the deeplab model zoo.

  3. Run python ./scripts/ to extract superpixels.

  4. Run python ./scripts/ to extract rectangles.

  5. Run python ./scripts/ to compute the annotation cost for each rectangle using polygon-based annotation.

  6. Run ./scripts/ to generate the bash files. Then run: bash ./bash_files/ to run the experiment.

'Sp+Do+Random': region_type = 'sp', v0

'Sp+Do+Uncertainty': region_type = 'sp', v1, is_bal = False

'Sp+Do+ClassBal': region_type = 'sp', v1, is_bal = True

'Rec+Pr+Random': region_type = 'rec', v0

'Rec+Pr+Uncertainty': region_type = 'rec', v1, is_bal = False

Here is the output for 1 run:

Alt text


No description, website, or topics provided.






No releases published


No packages published