Skip to content

Latest commit

 

History

History
81 lines (68 loc) · 3.03 KB

README.md

File metadata and controls

81 lines (68 loc) · 3.03 KB

ClassHyPer: ClassMix-Based Hybrid Perturbations for Deep Semi-Supervised Semantic Segmentation of Remote Sensing Imagery

The PyTorch implementation of semi-supervised learning method—ClassHyPer. The manuscript can be visited via https://www.mdpi.com/2072-4292/14/4/879

1. Datasets

(1) Links

(2) Directory Structure

After obtain the datasets, you need to process first and generate lists of image/label files and place as the structure shown below. Every txt file contains the full absolute path of the files, each image/label per line. Example files can be found in ./examples.

/root
    /save/{model.name}/{datetime}/log/{model.name}.txt
                                     /history.txt
                                 /checkpoint-ep{epoch}-{val_iou}.pth
                                 /checkpoint-best.pth
         /test/log/{model.name}/{datetime}/test-result.txt
    /train_image.txt
    /train_label.txt
    /test_image.txt
    /test_label.txt
    /val_image.txt
    /val_label.txt
    /train_unsup_image.txt

2. Usage

2.1 Installation

The code is developed using Python 3.8 with PyTorch 1.9.0 and tested based on single RTX 2080 Ti GPU.

(1) Clone this repo.

git clone https://github.com/YJ-He/ClassHyPer.git

(2) Create a conda environment.

conda env create -f environment.yaml
conda activate class_hyper

2.2 Training

  1. set root_dir and hyper-parameters configuration in ./configs/config.cfg.
  2. run python train.py.

2.3 Evaludation

  1. set root_dir and hyper-parameters configuration in ./configs/config.cfg.
  2. set pathCkpt in test.py to indicate the model checkpoint file.
  3. run python test.py.

3. Structure of ClassHyPer


4. Citation

If this repo is useful in your research, please kindly consider citing our paper as follow.

@article{he2022classhyper,
  title={ClassHyPer: ClassMix-Based Hybrid Perturbations for Deep Semi-Supervised Semantic Segmentation of Remote Sensing Imagery},
  author={He, Yongjun and Wang, Jinfei and Liao, Chunhua and Shan, Bo and Zhou, Xin},
  journal={Remote Sensing},
  volume={14},
  number={4},
  pages={879},
  year={2022},
  publisher={MDPI}
}

5. References

[1] Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision
[2] Semi-supervised semantic segmentation needs strong, varied perturbations
[3] ClassMix: Segmentation-Based Data Augmentation for Semi-Supervised Learning
...

If our work give you some insights and hints, star me please! Thank you~