mmcls

0.25.0last stable release 2 years ago
Complexity Score
High
Open Issues
N/A
Dependent Projects
10
Weekly Downloadsglobal
7,065

License

  • Apache-2.0
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Yespatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

  OpenMMLab website HOT      OpenMMLab platform TRY IT OUT  

📘 Documentation | 🛠️ Installation | 👀 Model Zoo | 🆕 Update News | 🤔 Reporting Issues

English | 简体中文

Introduction

MMPreTrain is an open source pre-training toolbox based on PyTorch. It is a part of the OpenMMLab project.

The main branch works with PyTorch 1.8+.

Major features

  • Various backbones and pretrained models
  • Rich training strategies (supervised learning, self-supervised learning, multi-modality learning etc.)
  • Bag of training tricks
  • Large-scale training configs
  • High efficiency and extensibility
  • Powerful toolkits for model analysis and experiments
  • Various out-of-box inference tasks.
    • Image Classification
    • Image Caption
    • Visual Question Answering
    • Visual Grounding
    • Retrieval (Image-To-Image, Text-To-Image, Image-To-Text)

https://github.com/open-mmlab/mmpretrain/assets/26739999/e4dcd3a2-f895-4d1b-a351-fbc74a04e904

What’s new

🌟 v1.1.0 was released in 12/10/2023

  • Support Mini-GPT4 training and provide a Chinese model (based on Baichuan-7B)
  • Support zero-shot classification based on CLIP.

🌟 v1.0.0 was released in 04/07/2023

  • Support inference of more multi-modal algorithms, such as LLaVA, MiniGPT-4, Otter, etc.
  • Support around 10 multi-modal datasets!
  • Add iTPN, SparK self-supervised learning algorithms.
  • Provide examples of New Config and DeepSpeed/FSDP with FlexibleRunner. Here are the documentation links of New Config and DeepSpeed/FSDP with FlexibleRunner.

🌟 Upgrade from MMClassification to MMPreTrain

  • Integrated Self-supervised learning algorithms from MMSelfSup, such as MAE, BEiT, etc.
  • Support RIFormer, a simple but effective vision backbone by removing token mixer.
  • Refactor dataset pipeline visualization.
  • Support LeViT, XCiT, ViG, ConvNeXt-V2, EVA, RevViT, EfficientnetV2, CLIP, TinyViT and MixMIM backbones.

This release introduced a brand new and flexible training & test engine, but it’s still in progress. Welcome to try according to the documentation.

And there are some BC-breaking changes. Please check the migration tutorial.

Please refer to changelog for more details and other release history.

Installation

Below are quick steps for installation:

conda create -n open-mmlab python=3.8 pytorch==1.10.1 torchvision==0.11.2 cudatoolkit=11.3 -c pytorch -y
conda activate open-mmlab
pip install openmim
git clone https://github.com/open-mmlab/mmpretrain.git
cd mmpretrain
mim install -e .

Please refer to installation documentation for more detailed installation and dataset preparation.

For multi-modality models support, please install the extra dependencies by:

mim install -e ".[multimodal]"

User Guides

We provided a series of tutorials about the basic usage of MMPreTrain for new users:

  • Learn about Configs
  • Prepare Dataset
  • Inference with existing models
  • Train
  • Test
  • Downstream tasks

For more information, please refer to our documentation.

Model zoo

Results and models are available in the model zoo.

Overview Supported Backbones Self-supervised Learning Multi-Modality Algorithms Others
  • VGG
  • ResNet
  • ResNeXt
  • SE-ResNet
  • SE-ResNeXt
  • RegNet
  • ShuffleNet V1
  • ShuffleNet V2
  • MobileNet V2
  • MobileNet V3
  • Swin-Transformer
  • Swin-Transformer V2
  • RepVGG
  • Vision-Transformer
  • Transformer-in-Transformer
  • Res2Net
  • MLP-Mixer
  • DeiT
  • DeiT-3
  • Conformer
  • T2T-ViT
  • Twins
  • EfficientNet
  • EdgeNeXt
  • ConvNeXt
  • HRNet
  • VAN
  • ConvMixer
  • CSPNet
  • PoolFormer
  • Inception V3
  • MobileOne
  • EfficientFormer
  • MViT
  • HorNet
  • MobileViT
  • DaViT
  • RepLKNet
  • BEiT
  • MixMIM
  • EfficientNet V2
  • RevViT
  • ConvNeXt V2
  • ViG
  • XCiT
  • LeViT
  • RIFormer
  • GLIP
  • ViT SAM
  • EVA02
  • DINO V2
  • HiViT
  • MoCo V1 (CVPR'2020)
  • SimCLR (ICML'2020)
  • MoCo V2 (arXiv'2020)
  • BYOL (NeurIPS'2020)
  • SwAV (NeurIPS'2020)
  • DenseCL (CVPR'2021)
  • SimSiam (CVPR'2021)
  • Barlow Twins (ICML'2021)
  • MoCo V3 (ICCV'2021)
  • BEiT (ICLR'2022)
  • MAE (CVPR'2022)
  • SimMIM (CVPR'2022)
  • MaskFeat (CVPR'2022)
  • CAE (arXiv'2022)
  • MILAN (arXiv'2022)
  • BEiT V2 (arXiv'2022)
  • EVA (CVPR'2023)
  • MixMIM (arXiv'2022)
  • iTPN (CVPR'2023)
  • SparK (ICLR'2023)
  • MFF (ICCV'2023)
  • BLIP (arxiv'2022)
  • BLIP-2 (arxiv'2023)
  • OFA (CoRR'2022)
  • Flamingo (NeurIPS'2022)
  • Chinese CLIP (arxiv'2022)
  • MiniGPT-4 (arxiv'2023)
  • LLaVA (arxiv'2023)
  • Otter (arxiv'2023)
Image Retrieval Task:
  • ArcFace (CVPR'2019)
Training&Test Tips:
  • RandAug
  • AutoAug
  • RepeatAugSampler
  • TTA
  • ...

Contributing

We appreciate all contributions to improve MMPreTrain. Please refer to CONTRUBUTING for the contributing guideline.

Acknowledgement

MMPreTrain is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and supporting their own academic research.

Citation

If you find this project useful in your research, please consider cite:

@misc{2023mmpretrain,
    title={OpenMMLab's Pre-training Toolbox and Benchmark},
    author={MMPreTrain Contributors},
    howpublished = {\url{https://github.com/open-mmlab/mmpretrain}},
    year={2023}
}

License

This project is released under the Apache 2.0 license.

Projects in OpenMMLab

  • MMEngine: OpenMMLab foundational library for training deep learning models.
  • MMCV: OpenMMLab foundational library for computer vision.
  • MIM: MIM installs OpenMMLab packages.
  • MMEval: A unified evaluation library for multiple machine learning libraries.
  • MMPreTrain: OpenMMLab pre-training toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab’s next-generation platform for general 3D object detection.
  • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
  • MMYOLO: OpenMMLab YOLO series toolbox and benchmark.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMOCR: OpenMMLab text detection, recognition, and understanding toolbox.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
  • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
  • MMRazor: OpenMMLab model compression toolbox and benchmark.
  • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
  • MMAction2: OpenMMLab’s next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.
  • MMagic: OpenMMLab Advanced, Generative and Intelligent Creation toolbox.
  • MMGeneration: OpenMMLab image and video generative models toolbox.
  • MMDeploy: OpenMMLab model deployment framework.
  • Playground: A central hub for gathering and showcasing amazing projects built upon OpenMMLab.

Dependencies

CVE IssuesActive
0
Scorecards Score
3.40
Test Coverage
No Data
Follows Semver
No
Github Stars
3,506
Dependenciestotal
33
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute mmcls in your own private PyPI registry

pip install mmcls
Processing...
Done

33 Releases

PyPI on Cloudsmith

Getting started with PyPI on Cloudsmith is fast and easy.