This repository was archived by the owner on May 1, 2025. It is now read-only.

Repository files navigation

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:

seed12345avg
accuracy93.7194.1092.9390.7393.9793.09

ImageNet

For ImageNet experiments, see ./imagenet/

About

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

Topics

Resources

Code of conduct

Security policy

Stars

133 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); })();
Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Repository files navigation

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:

seed12345avg
accuracy93.7194.1092.9390.7393.9793.09

ImageNet

For ImageNet experiments, see ./imagenet/

About

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

Topics

Resources

Code of conduct

Security policy

Stars

133 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages