zoukankan      html  css  js  c++  java
  • 在mmdetection中跑通MaskRCNN

    1、将数据集转化成COCO格式数据集

     Kaggle->COCO:

    https://github.com/pascal1129/kaggle_airbus_ship_detection/blob/master/0_rle_to_coco/1_ships_to_coco.py

    2、修改匹配的训练参数文件

    /xxx/mmdetection/configs/mask_rcnn_r50_fpn_1x.py

    40行左右的num_classes值为实际分类数+1(背景类)
    102行左右的data_root值为数据集的根路径
    train、val、test的ann_file、img_prefix、img_scale

    中继训练时修改163行的load_from和164行的resume_from为'/xxx/xxx/epoch_xxx.pth'

    3、训练脚本

    CUDA_VISIBLE_DEVICES=0,1,2,3 python /xxx/mmdetection/tools/train.py config /xxx/mmdetection/configs/mask_rcnn_r50_fpn_1x.py --work_dir ./work_dirs/mask_rcnn_r50_fpn_1x --validate --gpus 3

    #0,1,2,3是4张显卡全部可用的意思,具体调用几张,看最后面的--gpus 3

    4、测试脚本

    CUDA_VISIBLE_DEVICES=1,2,3 python /xxx/mmdetection/tools/test.py config /xxx/mmdetection/configs/mask_rcnn_r50_fpn_1x.py --checkpoint ./work_dirs/mask_rcnn_r50_fpn_1x/epoch_xxx.pth --out /xxx/workspace/out/maskrcnn.pkl --eval segm --gpus 3

    5、图像的形式显示结果

    https://github.com/open-mmlab/mmdetection/issues/92#issuecomment-438193334
  • 相关阅读:
    caffe绘制训练过程的loss和accuracy曲线
    第32题 最长匹配括号
    http://deepdish.io/2015/04/28/creating-lmdb-in-python/
    caffe神经网络模型的绘图
    数据制作
    mnist测试
    caffe环境搭建笔记
    图论之遍历所有点的最小距离
    DesignSurface简介
    给交换机端口设ip
  • 原文地址:https://www.cnblogs.com/aimhabo/p/9961854.html
Copyright © 2011-2022 走看看