diff --git a/README.md b/README.md index 24354c7a91..82fc792379 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,21 @@ The master branch works with **PyTorch 1.3+**. ## Installation -Please refer to [install.md](docs/install.md) for installation. +MMAction2 depends on [PyTorch](https://pytorch.org/)], [MMCV](https://github.com/open-mmlab/mmcv), [MMDetection](https://github.com/open-mmlab/mmdetection) (optional), and [MMPose](https://github.com/open-mmlab/mmdetection)(optional). +Below are quick steps for installation. +Please refer to [install.md](docs/install.md) for more detailed instruction. + +```shell +conda create -n open-mmlab python=3.8 pytorch=1.10 cudatoolkit=11.3 torchvision -c pytorch -y +conda activate open-mmlab +pip3 install openmim +mim install mmcv-full +mim install mmdet # optional +mim install mmpose # optional +git clone https://github.com/open-mmlab/mmaction2.git +cd mmaction2 +pip3 install -e . +``` ## Get Started diff --git a/README_zh-CN.md b/README_zh-CN.md index 83b4bfdce2..243eddc52f 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -82,7 +82,20 @@ v0.22.0 版本已于 2022 年 3 月 5 日发布,可通过查阅 [更新日志] ## 安装 -请参考 [安装指南](/docs_zh_CN/install.md) 进行安装 +MMAction2 依赖 [PyTorch](https://pytorch.org/)], [MMCV](https://github.com/open-mmlab/mmcv), [MMDetection](https://github.com/open-mmlab/mmdetection)(可选), [MMPose](https://github.com/open-mmlab/mmpose)(可选),以下是安装的简要步骤。 +更详细的安装指南请参考 [install.md](docs_zh_CN/install.md)。 + +```shell +conda create -n open-mmlab python=3.8 pytorch=1.10 cudatoolkit=11.3 torchvision -c pytorch -y +conda activate open-mmlab +pip3 install openmim +mim install mmcv-full +mim install mmdet # 可选 +mim install mmpose # 可选 +git clone https://github.com/open-mmlab/mmaction2.git +cd mmaction2 +pip3 install -e . +``` ## 教程 diff --git a/docs/getting_started.md b/docs/getting_started.md index 66a7e46663..fef4b05e4a 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -72,12 +72,12 @@ You can use the following commands to test a dataset. # single-gpu testing python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \ [--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \ - [--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] [--onnx] [--tensorrt] + [--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] [--onnx] [--tensorrt] # multi-gpu testing ./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \ [--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \ - [--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] + [--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] ``` Optional arguments: diff --git a/docs_zh_CN/getting_started.md b/docs_zh_CN/getting_started.md index 577e0cad88..9da0aa8065 100644 --- a/docs_zh_CN/getting_started.md +++ b/docs_zh_CN/getting_started.md @@ -71,12 +71,12 @@ MMAction2 支持仅使用 CPU 进行测试。然而,这样做的速度**非常 # 单 GPU 测试 python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \ [--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \ - [--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] [--onnx] [--tensorrt] + [--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] [--onnx] [--tensorrt] # 多 GPU 测试 ./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \ [--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \ - [--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] + [--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] ``` 可选参数: diff --git a/tools/misc/clip_feature_extraction.py b/tools/misc/clip_feature_extraction.py index a6e37b3c3a..1829bf9b5c 100644 --- a/tools/misc/clip_feature_extraction.py +++ b/tools/misc/clip_feature_extraction.py @@ -59,7 +59,7 @@ def parse_args(): choices=['none', 'pytorch', 'slurm', 'mpi'], default='none', help='job launcher') - parser.add_argument('--local-rank', type=int, default=0) + parser.add_argument('--local_rank', type=int, default=0) args = parser.parse_args() if 'LOCAL_RANK' not in os.environ: os.environ['LOCAL_RANK'] = str(args.local_rank) diff --git a/tools/test.py b/tools/test.py index 9152c90917..31514498cf 100644 --- a/tools/test.py +++ b/tools/test.py @@ -89,7 +89,7 @@ def parse_args(): choices=['none', 'pytorch', 'slurm', 'mpi'], default='none', help='job launcher') - parser.add_argument('--local-rank', type=int, default=0) + parser.add_argument('--local_rank', type=int, default=0) parser.add_argument( '--onnx', action='store_true', diff --git a/tools/train.py b/tools/train.py index 6461e7030a..d404980464 100644 --- a/tools/train.py +++ b/tools/train.py @@ -74,7 +74,7 @@ def parse_args(): choices=['none', 'pytorch', 'slurm', 'mpi'], default='none', help='job launcher') - parser.add_argument('--local-rank', type=int, default=0) + parser.add_argument('--local_rank', type=int, default=0) args = parser.parse_args() if 'LOCAL_RANK' not in os.environ: os.environ['LOCAL_RANK'] = str(args.local_rank)