niobures's picture
mmaction2
d3dbf03 verified

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 MMAction2.

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 Kinetics400 dataset according to the instruction.

Training commands

To train with single GPU:

mim train mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py

To train with multiple GPUs:

mim train mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py --launcher pytorch --gpus 8

To train with multiple GPUs by slurm:

mim train mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py --launcher slurm \
    --gpus 8 --gpus-per-node 8 --partition $PARTITION

Testing commands

To test with single GPU:

mim test mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py --checkpoint $CHECKPOINT

To test with multiple GPUs:

mim test mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py --checkpoint $CHECKPOINT --launcher pytorch --gpus 8

To test with multiple GPUs by slurm:

mim test mmaction configs/examplenet_r50-in1k-pre_8xb32-1x1x3-100e_kinetics400-rgb.py --checkpoint $CHECKPOINT --launcher slurm \
    --gpus 8 --gpus-per-node 8 --partition $PARTITION

Results

frame sampling strategy resolution gpus backbone pretrain top1 acc top5 acc testing protocol config ckpt log
1x1x3 224x224 8 ResNet50 ImageNet 72.83 90.65 25 clips x 10 crop config ckpt log

Citation

@misc{2020mmaction2,
  title={OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark},
  author={MMAction2 Contributors},
  howpublished = {\url{https://github.com/open-mmlab/mmaction2}},
  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 MMAction2 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 and README.md