Overview of MMPretrain
mainMMClassification and MMSelfSup and is designed to streamline research and engineering for vision recognition tasks by providing rich pre-trained models for downstream tasks.repository·main·Indexed 26 days ago
https://github.com/open-mmlab/mmpretrainAn open-source pre-training toolbox based on PyTorch and part of the OpenMMLab project. MMPreTrain provides a comprehensive suite of backbones, training strategies (supervised, self-supervised, multi-modal), and inference tasks for computer vision, including support for models such as ArcFace, Barlow Twins, BEiT, BEiTv2, BLIP, and BLIP-2.
MMClassification and MMSelfSup and is designed to streamline research and engineering for vision recognition tasks by providing rich pre-trained models for downstream tasks.MMPreTrain is an open-source pre-training toolbox based on PyTorch, part of the OpenMMLab project. It supports PyTorch 1.8+ and provides:
In MMPretrain, a data pipeline is a sequence of data transforms used to process a sample dictionary when indexing a sample from a dataset. Each transform takes a dictionary as input, processes it, and outputs a dictionary for the next transform in the sequence.
Commonly, datasets only load image paths and labels initially to save memory, and the data pipeline handles the actual loading of image content and subsequent augmentations during training or testing.
mmpretrain.evaluation package provides metrics and evaluators designed for various classification tasks, including single-label, multi-label, and retrieval-based evaluation.MMPreTrain provides a wide range of pre-trained models and algorithms categorized into several domains:
You can find detailed statistics and specific model configurations in the official Model Zoo.
mmpretrain.engine package provides specialized runtime components for classification tasks, including hooks, runners, optimizers, and loops. Note that some of these components are specific to mmpretrain and may not be supported by MMEngine currently, though they may be migrated in the future.MMPretrain models are composed of several functional modules. A complete model is a top-level module that orchestrates these components:
ImageClassifier, MAE, ImageToImageRetriever).ResNet, MobileNet).GlobalAveragePooling).ClsHead, ContrastiveHead).CrossEntropyLoss, LabelSmoothLoss).VQKD, HOGGenerator).MMPretrain provides several resources for model selection and analysis:
The MMPretrain Gradio demo supports the following inference tasks:
[multimodal] installation):MMPretrain is an open-source pre-training algorithm framework providing powerful pre-trained backbones and various pre-training strategies. It is evolved from MMClassification and MMSelfSup.
To get started, follow these recommended paths:
get_started.md guide to set up your environment.user_guides/config.md)user_guides/dataset_prepare.md)user_guides/inference.md)user_guides/train.md)user_guides/test.md)user_guides/downstream.md)After inference, a CSV file named cue-conflict_model-name_session-1.csv will be generated in your csv_dir.
Important: You must also download the original cue-conflict CSV files and place them in the same csv_dir before plotting.
Use tools/analysis_tools/shape_bias.py to generate the final plot.
python tools/analysis_tools/shape_bias.py --csv-dir $CSV_DIR --result-dir $RESULT_DIR --colors $RGB --markers o --plotting-names $YOUR_MODEL_NAME --model-names $YOUR_MODEL_NAME