Home

Awesome

iMAS

"Instance-specific and Model-adaptive Supervision for Semi-supervised Semantic Segmentation".

Introduction

Diagram

In a teacher-student framework, labeled data $(x,y)$ is used to train the student model, parameterized by $\theta_s$, by minimizing the supervised loss $\mathcal{L}_x$. Unlabeled data $u$, weakly augmented by $\mathcal{A}_w(\cdot)$, is first fed into both the student and teacher models to obtain predictions $p^s$ and $p^t$, respectively. Then we perform quantitative hardness evaluation on each unlabeled instance by strategy $\phi(p^t, p^s)$. Such hardness information can be subsequently utilized: 1) to apply an adaptive augmentation, denoted by $\mathcal{A}_s(\cdot)$, on unlabeled data to obtain the student model's prediction $\hat{p}$; 2) to weigh the unsupervised loss $\mathcal{L}_u$ in a instance-specific manner. The teacher model's weight, $\theta_t$, is updated by the exponential moving average (EMA) of $\theta_s$ across the training course.

Performance

Comparison with SOTA methods on PASCAL VOC 2012 val set under different partition protocols

ResNet-501/161/81/4ResNet-1011/161/81/4
SupOnly63.869.072.5SupOnly67.472.174.7
CPS72.073.774.9CPS74.576.477.7
ST++72.674.475.4ST++74.576.376.6
U<sup>2</sup>PL(os=8)72.075.276.2U<sup>2</sup>PL(os=8)74.477.678.7
iMAS(os=8)75.976.777.1iMAS (os=8)77.278.479.3

Comparison with SOTAs on Cityscapes val set under different partition protocols. Using R-50 as encoder.

R501/161/81/41/2
SupOnly64.069.273.076.4
CPS74.476.677.878.8
CPS (by U<sup>2</sup>PL)69.874.374.676.8
ST++-72.773.8-
PS-MT-75.876.977.6
U<sup>2</sup>PL(os=8)69.073.076.378.6
iMAS (os=8)75.278.078.280.2

All the training logs of iMAS and our reproduced SupOnly baselines are included under the directory of training-imas-logs

Running AugSeg

Prepare datasets

Please download the Pascal and Cityscapes, and set up the path to them properly in the configuration files.

Here is our adopted way,

├── ./data
    ├── splits
      ├── cityscapes
      └── pascal
    ├── VOC2012
      ├── JPEGImages
      ├── SegmentationClass
      └── SegmentationClassAug
    └── cityscapes
      ├── gtFine
      └── leftImg8bit

Prepare pre-trained encoder

Please download the pretrained models, and set up the path to these models properly in the file of config_xxx.yaml .

ResNet-50 | ResNet-101

Here is our adopted way,

├── ./pretrained
    ├── resnet50.pth
    └── resnet101.pth

Prepare running Envs

Nothing special

Ready to Run

Basically, you are recommanded to config the experimental runnings in a ".yaml" file firstly. We include various configuration files under the directory of "exps".

# 1) configure your yaml file in a running script
vim ./single_run.sh

# 2) run directly
sh ./single_run.sh

Citation

If you find these projects useful, please consider citing:

@inproceedings{zhao2023instance,
  title={Instance-specific and Model-adaptive Supervision for Semi-supervised Semantic Segmentation},
  author={Zhao, Zhen and Long, Sifan and Pi, Jimin and Wang, Jingdong and Zhou, Luping},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={23705--23714},
  year={2023}
}

We have other relevant semi-supervised semantic segmentation projects:

Acknowledgement

We thank ST++, CPS, and U<sup>2</sup>PL, for part of their codes, processed datasets, data partitions, and pretrained models.