https://github.com/salesforce/CoMatch
Code for CoMatch: Semi-supervised Learning with Contrastive Graph Regularization
https://github.com/salesforce/CoMatch
contrastive-learning representation-learning self-supervised-learning semi-supervised-learning
Last synced: about 1 year ago
JSON representation
Code for CoMatch: Semi-supervised Learning with Contrastive Graph Regularization
- Host: GitHub
- URL: https://github.com/salesforce/CoMatch
- Owner: salesforce
- License: bsd-3-clause
- Created: 2021-02-25T06:24:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-12T19:06:44.000Z (over 4 years ago)
- Last Synced: 2025-04-15T14:53:36.746Z (about 1 year ago)
- Topics: contrastive-learning, representation-learning, self-supervised-learning, semi-supervised-learning
- Language: Python
- Homepage:
- Size: 496 KB
- Stars: 127
- Watchers: 4
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
## 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/