diff --git a/configs/mot/README.md b/configs/mot/README.md index 48823430fa4a2fdc8cc0802af7e4848d923583ab..75787b4d93f0a59038636b7b0d2ecccde610eee9 100644 --- a/configs/mot/README.md +++ b/configs/mot/README.md @@ -42,6 +42,7 @@ pip install -r requirements.txt **Notes:** - Install `cython_bbox` for Windows: `pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox`. You can refer to this [tutorial](https://stackoverflow.com/questions/60349980/is-there-a-way-to-install-cython-bbox-for-windows). - Evaluation on Windows CUDA 11 environment may not be normally. It will be repaired as soon as possible. You can change to CUDA 10.2 or CUDA 10.1 environment for normal evaluation. +- Please make sure that [ffmpeg](https://ffmpeg.org/ffmpeg.html) is installed first, on Linux(Ubuntu) platform you can directly install it by the following command:`apt-get update && apt-get install -y ffmpeg`. ## Model Zoo @@ -129,7 +130,7 @@ If you use a stronger detection model, you can get better results. Each txt is t | DLA-34 | 1088x608 | 74.8 | 74.4 | 930 | 7038 | 37994 | - | [model](https://paddledet.bj.bcebos.com/models/mot/fairmot_dla34_30e_1088x608.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.2/configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml) | **Notes:** - FairMOT used 8 GPUs for training and mini-batch size as 6 on each GPU, and trained for 30 epoches. + FairMOT used 2 GPUs for training and mini-batch size as 6 on each GPU, and trained for 30 epoches. ## Feature Tracking Model @@ -229,10 +230,10 @@ dataset/mot ### 1. Training -Training FairMOT on 8 GPUs with following command +Training FairMOT on 2 GPUs with following command ```bash -python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608/ --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml +python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608/ --gpus 0,1 tools/train.py -c configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml ``` ### 2. Evaluation diff --git a/configs/mot/README_cn.md b/configs/mot/README_cn.md index 6ff95e3f55033d152b995919b69faacda6ec6966..f5632572175d22a19a43e7fe962c159577edbf7c 100644 --- a/configs/mot/README_cn.md +++ b/configs/mot/README_cn.md @@ -42,6 +42,7 @@ pip install -r requirements.txt **注意:** - `cython_bbox`在windows上安装:`pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox`。可参考这个[教程](https://stackoverflow.com/questions/60349980/is-there-a-way-to-install-cython-bbox-for-windows)。 - Windows cuda 11环境下可能无法正常评估,会尽快修复,可换到cuda 10.2或cuda 10.1环境下进行正常评估。 +- 预测需确保已安装[ffmpeg](https://ffmpeg.org/ffmpeg.html), Linux(Ubuntu)平台可以直接用以下命令安装:`apt-get update && apt-get install -y ffmpeg`。 ## 模型库 @@ -129,7 +130,7 @@ wget https://dataset.bj.bcebos.com/mot/det_results_dir.zip | DLA-34 | 1088x608 | 74.8 | 74.4 | 930 | 7038 | 37994 | - |[下载链接](https://paddledet.bj.bcebos.com/models/mot/fairmot_dla34_30e_1088x608.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.2/configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml) | **注意:** - FairMOT使用8个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 + FairMOT使用2个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 ## 特色垂类跟踪模型 @@ -227,10 +228,10 @@ dataset/mot ### 1. 训练 -FairMOT使用8GPU通过如下命令一键式启动训练 +FairMOT使用2个GPU通过如下命令一键式启动训练 ```bash -python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608/ --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml +python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608/ --gpus 0,1 tools/train.py -c configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml ``` ### 2. 评估 diff --git a/configs/mot/headtracking21/README_cn.md b/configs/mot/headtracking21/README_cn.md index 281c5ab57143b4b4019985d6dd69a8d0238ac29b..ea497b2f5bd59f2968b4674cbc936c5305d1c013 100644 --- a/configs/mot/headtracking21/README_cn.md +++ b/configs/mot/headtracking21/README_cn.md @@ -21,14 +21,14 @@ | DLA-34 | 1088x608 | 58.2 | 61.3 | 13166 | 141872 | 197074 | - | [下载链接](https://paddledet.bj.bcebos.com/models/mot/fairmot_dla34_30e_1088x608_headtracking21.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.2/configs/mot/headtracking21/fairmot_dla34_30e_1088x608_headtracking21.yml) | **注意:** - FairMOT使用8个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 + FairMOT使用2个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 ## 快速开始 ### 1. 训练 -使用8GPU通过如下命令一键式启动训练 +使用2个GPU通过如下命令一键式启动训练 ```bash -python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608_headtracking21/ --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/mot/headtracking21/fairmot_dla34_30e_1088x608_headtracking21.yml +python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608_headtracking21/ --gpus 0,1 tools/train.py -c configs/mot/headtracking21/fairmot_dla34_30e_1088x608_headtracking21.yml ``` ### 2. 评估 diff --git a/configs/mot/kitticars/README_cn.md b/configs/mot/kitticars/README_cn.md index bd9f0bade6ba83f5efe788238fc6b961c12e2704..f35ebd94534788f813eb3dcb4e1bc8b29e02c2cc 100644 --- a/configs/mot/kitticars/README_cn.md +++ b/configs/mot/kitticars/README_cn.md @@ -18,14 +18,14 @@ | DLA-34 | 1088x608 | 67.9 | - |[下载链接](https://paddledet.bj.bcebos.com/models/mot/fairmot_dla34_30e_1088x608_kitticars.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.2/configs/mot/kitticars/fairmot_dla34_30e_1088x608_kitticars.yml) | **注意:** - FairMOT使用8个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 + FairMOT使用2个GPU进行训练,每个GPU上batch size为6,训练30个epoch。 ## 快速开始 ### 1. 训练 -使用8GPU通过如下命令一键式启动训练 +使用2个GPU通过如下命令一键式启动训练 ```bash -python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608_kitticars/ --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/mot/kitticars/fairmot_dla34_30e_1088x608_kitticars.yml +python -m paddle.distributed.launch --log_dir=./fairmot_dla34_30e_1088x608_kitticars/ --gpus 0,1 tools/train.py -c configs/mot/kitticars/fairmot_dla34_30e_1088x608_kitticars.yml ``` ### 2. 评估 diff --git a/ppdet/data/source/mot.py b/ppdet/data/source/mot.py index d163d4ea0ea875fc2f1528e74b6086c6c8543520..2322165d82cd44fdb1bc99cea02ea6437b06dbd4 100644 --- a/ppdet/data/source/mot.py +++ b/ppdet/data/source/mot.py @@ -376,11 +376,8 @@ def video2frames(video_path, outpath, frame_rate, **kargs): ] cmd = ''.join(cmd) + _dict2str(kargs) - try: - os.system(cmd) - except: - raise RuntimeError('ffmpeg process video: {} error'.format(vid_name)) - sys.stdout.flush() + if os.system(cmd) != 0: + raise RuntimeError('ffmpeg process video: {} error'.format(video_path)) sys.exit(-1) sys.stdout.flush()