Unfied Semi-Supervised Learning Benchmark
Project description
USB
A Unified Semi-supervised Learning Benchmark for CV, NLP, Audio
Paper
·
Benchmark
·
Demo
·
Docs
·
Issue
Table of Contents
News and Updates
- [08/21/2022] USB has been released!
Introduction
USB is a Pytorch-based Python package for Semi-Supervised Learning (SSL). It is easy-to-use/extend, affordable, and comprehensive for developing and evaluating SSL algorithms. USB provides the implementation of 14 SSL algorithms based on Consistency Regularization, and 15 tasks for evaluation from CV, NLP, and Audio domain.
Getting Started
This is an example of how to set up USB locally. To get a local copy up, running follow these simple example steps.
Prerequisites
USB is built on pytorch, with torchvision, torchaudio, and transformers.
To install the required packages, you can create a conda environment:
conda create --name usb python=3.8
then use pip to install required packages:
pip install -r requirements.txt
Installation
We provide a Python package of USB for users who want to start training/testing the supported SSL algorithms on their data quickly:
pip install usb
Development
You can also develop your own SSL algorithm and evaluate it by cloning USB:
git clone https://github.com/microsoft/Semi-supervised-learning.git
Usage
USB is easy to use and extend. Going through the belowing examples will help you faimiliar with USB for quick use, evaluate an exsiting SSL algorithm on your own dataset, or developing new SSL algorithms.
Quick Start with USB package
Please see Installation to install USB first. We provide colab tutorials for:
Training
Here is an example to train FixMatch on CIFAR-100 with 200 labels. Trianing other supported algorithms (on other datasets with different label settings) can be specified by a config file:
python train.py --c config/usb_cv/fixmatch/fixmatch_cifar100_200_0.yaml
Evaluation
After trianing, you can check the evaluation performance on training logs, or running evaluation script:
python eval.py --dataset cifar100 --num_classes 100 --load_path /PATH/TO/CHECKPOINT
Develop
Check the developing documentation for creating your own SSL algorithm!
For more examples, please refer to the Documentation
Benchmark Results
Please refer to Results for benchmark results on different tasks.
Model Zoo
TODO: add pre-trained models.
TODO
- Add docker
- Finish Readme
- Compile docs and add usage example in docs
- Check Notebooks Create Colab Notebooks
- Updating SUPPORT.MD with content about this project's support experience
- Multi-language Support
- Chinese
See the open issues for a full list of proposed features (and known issues).
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
If you have a suggestion that would make USB better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the project
- Create your branch (
git checkout -b your_name/your_branch
) - Commit your changes (
git commit -m 'Add some features'
) - Push to the branch (
git push origin your_name/your_branch
) - Open a Pull Request
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Community and Contact
The USB comunity is maintained by:
- Yidong Wang (),
- Hao Chen (haoc3@andrew.cmu.edu), Carnegie Mellon University
- Yue Fan (),
- Wenxin Hou (),
- Ran Tao (),
- Jindong Wang (),
Citing USB
Please cite us if you fine USB helpful for your project/paper:
@misc{usb2022,
doi = {10.48550/ARXIV.2208.07204},
url = {https://arxiv.org/abs/2208.07204},
author = {Wang, Yidong and Chen, Hao and Fan, Yue and Sun, Wang and Tao, Ran and Hou, Wenxin and Wang, Renjie and Yang, Linyi and Zhou, Zhi and Guo, Lan-Zhe and Qi, Heli and Wu, Zhen and Li, Yu-Feng and Nakamura, Satoshi and Ye, Wei and Savvides, Marios and Raj, Bhiksha and Shinozaki, Takahiro and Schiele, Bernt and Wang, Jindong and Xie, Xing and Zhang, Yue},
keywords = {Machine Learning (cs.LG), Artificial Intelligence (cs.AI), Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {USB: A Unified Semi-supervised Learning Benchmark},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
Acknowledgments
We thanks the following projects for reference of creating USB:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file semilearn-0.1.2b2.tar.gz
.
File metadata
- Download URL: semilearn-0.1.2b2.tar.gz
- Upload date:
- Size: 72.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7851cabce8c52fe7fd8a6cfbf3f7ce40518dafa5b64ad6b5a3428917aaa3a792 |
|
MD5 | 646cd5170cd9fac1f4a7df2581d5efbb |
|
BLAKE2b-256 | 6095a1ecb4e42b184bda318e3c159205d3a7e8f09b6dd16cf8717dc92e59ccde |
File details
Details for the file semilearn-0.1.2b2-py3-none-any.whl
.
File metadata
- Download URL: semilearn-0.1.2b2-py3-none-any.whl
- Upload date:
- Size: 214.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09910fdc40b436281433c4ebde0073d7933c675fda8cbeaa18b568e38f429e09 |
|
MD5 | b0e5de6dee6948e9e758f71ce48bb232 |
|
BLAKE2b-256 | ab607eaec71586369716e82957b6d28ba98286919f4c154c56a767bc1c043319 |