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 四类信息。

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] 

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

 

 

 

 

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

版权声明:本文为CSDN博主「zxrzhang」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xin_rong/article/details/112055616

zxrzhang

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐

目标检测简介和滑动窗口

一、目标检测简介 目标检测是计算机视觉中一个重要的研究方向。人眼可以轻松、准确地识别出图片中的物体是什么、这个物体在图片中的哪个位置。 对于计算机来说,在以数字形式表示的图片中寻找目标物体,并判断这个物体是什么&#

yolov4项目记录4-测试过程

目录 一、概述 二、测试过程 1.参数准备 2.定义模型 3.获取必要数据 4.输入模型 5.锚框筛选 ①利用物体置信度筛选 ②获取种类 ③按照物体置信度排序 ④非极大抑制 6.画出外接框 三、代码汇总 一、概述 训练