MMDetection实验记录踩坑记录

AP值始终为0

在实验MMDetection的DAB-DETR模型进行实验时,AP值始终上不去。
可以看到,在第22个epoch时的AP值仅为0.002

在这里插入图片描述

因为在此之前已经运行过YOLOX,Faster-RCNN等模型,所以数据集的设置肯定是没有问题的,而博主也只是修改了DAB-DETR的类别参数而已,一想到这,才猛然想起,DETR类模型的类别数还需要加上一类,即背景类,先前在修改参数时,看到原始参数为80,还以为不用加1了呢。
讲num_class参数数值加一,OK。再次运行:

就是可惜博主白白运行了一个晚上。

断点训练问题

MMDetection针对模型在训练过程中意外中断,避免重头训练,设计了断点训练参数 resume,只需要将该参数设置为最后一次训练的权重即可。

parser.add_argument(
        '--resume',
        nargs='?',
        default="/home/ubuntu/programs/mmdetection/output/deformable-detr/epoch_2.pth",
        type=str,
        const='auto',
        help='If specify checkpoint path, resume from it, while if not '
        'specify, try to auto resume from the latest checkpoint '
        'in the work directory.')

SSD模型类别信息报错

报错信息:

AssertionError: `classes` in RepeatDatasetshould be a tuple of str.Add comma if number of classes is 1 as classes = (pedestrains,)

类别必须是元组类型,由于博主的这个数据集中只有一个类别,因此就只写了(‘pedestrains’),在后面加个逗号即可。

解决方法:

 METAINFO = {
        'classes':
        ('pedestrains',),
        # palette is a list of color tuples, which is used for visualization.
        'palette':
        [(220, 20, 60)]
    }
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

彭祥.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值