mmdetection在自己的数据集上训练检测模型

举报
qingchenwuhou 发表于 2021/03/31 19:58:12 2021/03/31
2.7k+ 0 0
【摘要】 Bug0:The size of tensor a (209) must match the size of tensor b (21824) at non-singleton dimension 0解决:Firstly, I run training on coco dataset fluently.Then, I refresh the config file according to ...

Bug0:

The size of tensor a (209) must match the size of tensor b (21824) at non-singleton dimension 0

解决:Firstly, I run training on coco dataset fluently.

Then, I refresh the config file according to config file in coco training set,the problem is solved.

Bug1:

aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda [](int)->auto::operator()(int)->auto: block: [3,0,0], thread:

解决:看log,先出现Bug2或者Bug3,再出现的Bug1。

Bug2:

loss_cls: nan, loss_bbox: nan, loss: nan

解决:https://github.com/open-mmlab/mmdetection/issues/3013

alexchungio 的回答

check  生成的自己数据集的 json文件:

box坐标在图片内,lr不要太大,在配置文件中添加grad_clip,mmdet版本问题。

Bug3:

loss_cls: 0.0000, loss_bbox: 0.0000, loss: 0.0000

解决:https://github.com/open-mmlab/mmdetection/issues/3357

sunnyisabaster 的回答

image_id   box_id 不要从相同的数字开始,改成下面形式

 93     image_id = -1
 94     box_id = 7000

和 aimhabo 的回答

生成coco json文件的代码中 class_name的标签名称与 训练代码配置文件和coco.py文件和  测试的标签类别文件(eval.py)中的classes的标签名称要一致。

Ref:

正确跑通自己数据集的博客:

https://bbs.huaweicloud.com/blogs/198417


【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

作者其他文章

评论(0

抱歉,系统识别当前为高风险访问,暂不支持该操作

    全部回复

    上滑加载中

    设置昵称

    在此一键设置昵称,即可参与社区互动!

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。