5.2 KiB
Example Project
This is an example README for community projects/
. You can write your README in your own project. Here are
some recommended parts of a README for others to understand and use your project, you can copy or modify them
according to your project.
Usage
Setup Environment
Please refer to Get Started to install MMClassification.
At first, add the current folder to PYTHONPATH
, so that Python can find your code. Run command in the current directory to add it.
Please run it every time after you opened a new shell.
export PYTHONPATH=`pwd`:$PYTHONPATH
Data Preparation
Prepare the ImageNet-2012 dataset according to the instruction.
Training commands
To train with single GPU:
mim train mmcls configs/examplenet_8xb32_in1k.py
To train with multiple GPUs:
mim train mmcls configs/examplenet_8xb32_in1k.py --launcher pytorch --gpus 8
To train with multiple GPUs by slurm:
mim train mmcls configs/examplenet_8xb32_in1k.py --launcher slurm \
--gpus 16 --gpus-per-node 8 --partition $PARTITION
Testing commands
To test with single GPU:
mim test mmcls configs/examplenet_8xb32_in1k.py $CHECKPOINT
To test with multiple GPUs:
mim test mmcls configs/examplenet_8xb32_in1k.py $CHECKPOINT --launcher pytorch --gpus 8
To test with multiple GPUs by slurm:
mim test mmcls configs/examplenet_8xb32_in1k.py $CHECKPOINT --launcher slurm \
--gpus 16 --gpus-per-node 8 --partition $PARTITION
Results
Model | Pretrain | Top-1 (%) | Top-5 (%) | Config | Download |
---|---|---|---|---|---|
ExampleNet-tiny | From scratch | 82.33 | 96.15 | config | model | log |
ExampleNet-small* | From scratch | 83.63 | 96.51 | config | model |
ExampleNet-base* | From scratch | 84.34 | 96.86 | config | model |
Models with * are converted from the official repo. The config files of these models are only for inference. We don't ensure these config files' training accuracy and welcome you to contribute your reproduction results.
Citation
@misc{2020mmclassification,
title={OpenMMLab's Image Classification Toolbox and Benchmark},
author={MMClassification Contributors},
howpublished = {\url{https://github.com/open-mmlab/mmclassification}},
year={2020}
}
Checklist
Here is a checklist of this project's progress. And you can ignore this part if you don't plan to contribute to MMClassification projects.
-
Milestone 1: PR-ready, and acceptable to be one of the
projects/
.-
Finish the code
-
Basic docstrings & proper citation
-
Converted checkpoint and results (Only for reproduction)
-
-
Milestone 2: Indicates a successful model implementation.
-
Training results
-
-
Milestone 3: Good to be a part of our core package!
-
Unit tests
-
Code style
-
metafile.yml
andREADME.md
-