Skip to main content

OpenMMLab Model Pretraining Toolbox and Benchmark

Project description

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.2.0 was released in 04/01/2023

  • Support LLaVA 1.5.
  • Implement of RAM with a gradio interface.

🌟 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

🌟 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:

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
Image Retrieval Task: Training&Test Tips:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmpretrain-1.2.0.tar.gz (763.2 kB view details)

Uploaded Source

Built Distribution

mmpretrain-1.2.0-py2.py3-none-any.whl (1.6 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file mmpretrain-1.2.0.tar.gz.

File metadata

  • Download URL: mmpretrain-1.2.0.tar.gz
  • Upload date:
  • Size: 763.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for mmpretrain-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bb3e975c62db8ca7d2d4a02ac63587c45ec067eeb0c4803e4a87aab8883ff19c
MD5 6852c042999e803f6c9e054b02dcd80c
BLAKE2b-256 d87850d77662d5aaa9c4636a646f6102c9f40e7eb074a2e2072c8e8e42662fcc

See more details on using hashes here.

File details

Details for the file mmpretrain-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mmpretrain-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for mmpretrain-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 96156327c509cbf17fdc5867f7bc89142df6f63be38ecd67e91b41dc5e538933
MD5 100961494dc3ba43bc3b34d694553958
BLAKE2b-256 09a5aa4f10a2757edadd0a55d88444f7dcccf122c2e053599b69a09d841f2b78

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page