mmdetection常用命令

(注意:文中--eval bbox适用于目标检测模型,其他模型--eval 需要换参数)

1. Test

python tools/test.py configs/ballon/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_balloon.py work_dirs/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_balloon.py/latest.pth --eval bbox

2. Train

python tools/train.py configs/ballon/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_balloon.py

3. Loss Analysis

  • Plot the classification loss of some run.

    python tools/analyze_logs.py plot_curve log.json --keys loss_cls --legend loss_cls
  • Plot the classification and regression loss of some run, and save the figure to a pdf.

  • python tools/analyze_logs.py plot_curve log.json --keys loss_cls loss_bbox --out losses.pdf
  • Compare the bbox mAP of two runs in the same figure.

    python tools/analyze_logs.py plot_curve log1.json log2.json --keys bbox_mAP --legend run1 run2
  • Compute the average training speed.

    python tools/analyze_logs.py cal_train_time log.json [--include-outliers]

4. Output json result file 

python tools/test.py [configs_file] [pth] --eval-options "jsonfile_prefix=results_name" --eval bbox

This command will output "results_name.bbox.json" file.

此格式文件中含有image_id, bbox, score 和 category_id 四类信息。

mmdetection常用命令_第1张图片

5. Output pkl file

python tools/test.py [configs_file] [pth] --out results_name.pkl --eval bbox

This command will output "results_name.pkl" file.

6. Output metric

python tools/metric.py [configs_file] [pkl_file] 

7. coco_error_analysis

tools/coco_error_analysis.py analyzes COCO results per category and by different criterion. It can also make a plot to provide useful information.

python tools/coco_error_analysis.py [coco_result_json_file] [output_dir] --ann [ann_json_file] 

mmdetection常用命令_第2张图片

From: https://mmdetection.readthedocs.io/en/latest/useful_tools.html#error-analysis
Eval matrix 指标介绍: https://cocodataset.org/#detection-eval
 

mmdetection常用命令_第3张图片mmdetection常用命令_第4张图片

 

 

 

 

https://github.com/open-mmlab/mmdetection/blob/master/docs/2_new_data_model.md

https://github.com/open-mmlab/mmdetection/blob/master/docs/useful_tools.md

你可能感兴趣的:(cv)