CorrMatch-Jittor (CVPR 2024)

January 22, 2025 ยท View on GitHub

This repository contains the Jittor version implementation of the following paper:

CorrMatch: Label Propagation via Correlation Matching for Semi-Supervised Semantic Segmentation
Boyuan Sun, Yuqi Yang, Le Zhang, Ming-Ming Cheng, Qibin Hou

๐Ÿ”ฅ Our paper is accepted by IEEE Computer Vision and Pattern Recognition (CVPR) 2024 !!!

The PyTorch version implementation is available at CorrMatch

Overview

CorrMatch provides a solution for mining more high-quality regions from the unlabeled images to leverage the unlabeled data more efficiently for consistency regularization. avatar

Previous approaches mostly employ complicated training strategies to leverage unlabeled data but overlook the role of correlation maps in modeling the relationships between pairs of locations. Thus, we introduce two label propagation strategies (Pixel Propagation and Region Propagation) with the help of correlation maps.

For technical details, please refer to our full paper on arXiv.

Getting Started

Installation

git clone git@github.com:BBBBchan/CorrMatch-Jittor.git
cd CorrMatch
conda create -n corrmatch python=3.11
conda activate corrmatch
sudo apt install openmpi-bin openmpi-common libopenmpi-dev
pip install jittor
pip install opencv-python tqdm einops pyyaml matplotlib

Pretrained Backbone:

ResNet-101

mkdir pretrained

Please put the pretrained model under pretrained dictionary.

Dataset:

Please modify the dataset path in configuration files.The groundtruth mask ids have already been pre-processed. You may use them directly.

Your dataset path may look like:

โ”œโ”€โ”€ [Your Pascal Path]
    โ”œโ”€โ”€ JPEGImages
    โ””โ”€โ”€ SegmentationClass
    
โ”œโ”€โ”€ [Your Cityscapes Path]
    โ”œโ”€โ”€ leftImg8bit
    โ””โ”€โ”€ gtFine

Usage

Training CorrMatch

sh tools/train.sh 

To run on different labeled data partitions or different datasets, please modify:

config, labeled_id_path, unlabeled_id_path, and save_path in train.sh.

Citation

If you find our repo useful for your research, please consider citing our paper:

@article{sun2023corrmatch,
  title={CorrMatch: Label Propagation via Correlation Matching for Semi-Supervised Semantic Segmentation},
  author={Sun, Boyuan and Yang, Yuqi and Zhang, Le and Cheng, Ming-Ming and Hou, Qibin},
  journal={IEEE Computer Vision and Pattern Recognition (CVPR)},
  year={2024}
}

License

This code is licensed under the Creative Commons Attribution-NonCommercial 4.0 International for non-commercial use only. Please note that any commercial use of this code requires formal permission prior to use.

Contact

For technical questions, please contact sbysbysby123[AT]gmail.com.

For commercial licensing, please contact cmm[AT]nankai.edu.cn or andrewhoux@gmail.com.

Acknowledgement

We thank UniMatch, CPS, CutMix-Seg, DeepLabv3Plus, U2PL and other excellent works (see this project) for their amazing projects!