RepVGG-openMMLab
This repository is the code that needs to be submitted for OpenMMLab Algorithm Ecological Challenge,the paper is RepVGG: Making VGG-style ConvNets Great Again
Result :)
- RepVGG-b2g4 top1 is 79.78
- RepVGG-b3g4 top1 is 80.31
- RepVGG-B3 top1 is 80.59
How TO Use?
What is MMCV?
MMCV is a foundational library for computer vision research and supports many research projects as below:
- MMClassification:OpenMMLab image classification toolbox and benchmark.
- MMDetection:OpenMMLab detection toolbox and benchmark.
- MMDetection3D:OpenMMLab’s next-generation platform for general 3D object detection.
- MMSegmentation:OpenMMLab semantic segmentation toolbox and benchmark.
- MMAction2:OpenMMLab’s next-generation action understanding toolbox and benchmark.
- MMTracking:OpenMMLab video perception toolbox and benchmark.
- ...
Using MMCV for the first time??
- Install MMCV using MIM
pip install git+https://github.com/open-mmlab/mim.git
mim install mmcv-full
- clone MMClassification and install
git clone https://github.com/open-mmlab/mmclassification.git
cd mmclassification
pip install -e .
- Register RepVGG in MMclassification
cp RepVGG-openMMLab/backbones/RepVGG.py \
mmclassification/mmcls/models/backbones/
in mmclassification/mmcls/models/backbones/__init__.py
...
from .RepVGG import RepVGG
__all__ = [
..., 'RepVGG'
]
- copy config file to mmclassification/config
cp RepVGG-openMMLab/config/repvggb2g4_b32x8.py \
mmclassification/config/
- Train Model(If you downloaded Imagenet)
cd mmclassification
python tools/train.py config/repvggb2g4_b32x8.py
Download && Unzip ImageNet
data/download_imagenet.sh ,This script can automatically build the file structure that Imagenet needs for mmcls
mkdir -p mmclassification/data
cp RepVGG-openMMLab/data/download_imagenet.sh mmclassification/data
cd mmclassification/data
bash download_imagenet.sh
Use the pre-trained model on Google Drive
-
RepVGGB2g4.pth
-
RepVGGB3g4.pth
-
RepVGGB3.pth
Test Model
in mmclassification
python tools/test.py config/repvggb2g4_b32x8.py ${repvggb2g4 model file} --meterics accuracy
someting like this..