mmdetection可视化工具-DetVisGUI

保存数据

执行程序,需要保存输出结果的pkl文件或者json文件

下面以测试faster_rcnn示例:

在执行测试时可以使用下面这条命令,就会将结果保存到一个pkl文件中。

python tools/test.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth --out result/file_name.pkl

 保存下来的文件就是下面这样的。

 

下载DetVisGUI

https://github.com/Chien-Hung/DetVisGUI/tree/mmdetection

在mmdetection目录下

git clone -b mmdetection https://github.com/Chien-Hung/DetVisGUI.git

运行DetDetVisGUI的命令格式是

python DetVisGUI/DetVisGUI.py ${CONFIG_FILE} [--det_file ${RESULT_FILE}] [--stage ${STAGE}] [--output ${SAVE_DIRECTORY}]

Arguments:

  • CONFIG_FILE: Config file of mmdetction.

Optional Arguments:

  • RESULT_FILE: Filename of the output results in pickle / json format.
  • STAGE: The stage [train / val / test] of the result file, default is 'val'.
  • SAVE_DIRECTORY: The directory for saving display images, default is 'output'.

示例:

输入的命令是:

python DetVisGUI/DetVisGUI.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py --det_file result/12-26-4-24.pkl

下面是详细的执行情况。

(ld) smile2021@smile:data/share/XXM/mmdetection$ python DetVisGUI/DetVisGUI.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py --det_file result/12-26-4-24.pkl

==============[ COCO json info ]==============
Total Annotations: 36781
Total Image      : 5000
Annotated Image  : 4952
Total Category   : 80
----------------------------
       class        | count
----------------------------
       person       | 11004
      bicycle       | 316
        car         | 1932
     motorcycle     | 371
      airplane      | 143
        bus         | 285
       train        | 190
       truck        | 415
        boat        | 430
   traffic light    | 637
    fire hydrant    | 101
     stop sign      | 75
   parking meter    | 60
       bench        | 413
        bird        | 440
        cat         | 202
        dog         | 218
       horse        | 273
       sheep        | 361
        cow         | 380
      elephant      | 255
        bear        | 71
       zebra        | 268
      giraffe       | 232
      backpack      | 371
      umbrella      | 413
      handbag       | 540
        tie         | 254
      suitcase      | 303
      frisbee       | 115
        skis        | 241
     snowboard      | 69
    sports ball     | 263
        kite        | 336
    baseball bat    | 146
   baseball glove   | 148
     skateboard     | 179
     surfboard      | 269
   tennis racket    | 225
       bottle       | 1025
     wine glass     | 343
        cup         | 899
        fork        | 215
       knife        | 326
       spoon        | 253
        bowl        | 626
       banana       | 379
       apple        | 239
      sandwich      | 177
       orange       | 287
      broccoli      | 316
       carrot       | 371
      hot dog       | 127
       pizza        | 285
       donut        | 338
        cake        | 316
       chair        | 1791
       couch        | 261
    potted plant    | 343
        bed         | 163
    dining table    | 697
       toilet       | 179
         tv         | 288
       laptop       | 231
       mouse        | 106
       remote       | 283
      keyboard      | 153
     cell phone     | 262
     microwave      | 55
        oven        | 143
      toaster       | 9
        sink        | 225
    refrigerator    | 126
        book        | 1161
       clock        | 267
        vase        | 277
      scissors      | 36
     teddy bear     | 191
     hair drier     | 11
     toothbrush     | 57

可视化结果

 

 

posted @ 2022-01-18 14:02  奋斗的小仔  阅读(1565)  评论(2编辑  收藏  举报