/CoMatch

Code for CoMatch: Semi-supervised Learning with Contrastive Graph Regularization

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

CoMatch: Semi-supervised Learning with Contrastive Graph Regularization, ICCV 2021 (Salesforce Research).

This is a PyTorch implementation of the CoMatch paper [Blog]:

@inproceedings{CoMatch,
	title={Semi-supervised Learning with Contrastive Graph Regularization},
	author={Junnan Li and Caiming Xiong and Steven C.H. Hoi},
	booktitle={ICCV},
	year={2021}
}

Requirements:

  • PyTorch ≥ 1.4
  • pip install tensorboard_logger
  • download and extract cifar-10 dataset into ./data/

To perform semi-supervised learning on CIFAR-10 with 4 labels per class, run:

python Train_CoMatch.py --n-labeled 40 --seed 1 

The results using different random seeds are:

seed 1 2 3 4 5 avg
accuracy 93.71 94.10 92.93 90.73 93.97 93.09

ImageNet

For ImageNet experiments, see ./imagenet/