之前写过一个版本,现在不怎么适用了。所以重新写下。

步骤一:首先根据规范的VOC数据集导入到项目目录下,如下图所示:

mmdetection
├── mmdet
├── tools
├── configs
├── data
│   ├── VOCdevkit
│   │   ├── VOC2007
│   │   │   ├── Annotations
│   │   │   ├── JPEGImages
│   │   │   ├── ImageSets
│   │   │   │   ├── Main
│   │   │   │   │   ├── test.txt
│   │   │   │   │   ├── trainval.txt
然后复制configs/fast_rcnn_r50_fpn_1x.py ,更名为my.py

步骤二:修改my.py, 

mmdetection[v1.1.0]训练自己的VOC数据集

上图中num_classes=自己的类数+1

再修改下图中4个地方

mmdetection[v1.1.0]训练自己的VOC数据集

步骤三:修改mmdetection/mmdet/datasets目录下voc.py

mmdetection[v1.1.0]训练自己的VOC数据集

步骤:修改mmdetection/mmdet/core/evaluation目录下class_names.py

mmdetection[v1.1.0]训练自己的VOC数据集

运行python setup.py install,重新编译

运行代码 python ./tools/train.py configs/my.py --work_dir model --validate

周一再补

 

 

相关文章:

  • 2021-09-21
  • 2021-12-05
  • 2021-04-13
  • 2021-07-19
  • 2021-11-22
  • 2021-07-25
  • 2021-06-06
  • 2022-01-14
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2022-01-10
  • 2022-01-19
  • 2022-12-23
  • 2021-07-30
相关资源
相似解决方案