如何解决无法在Colab上运行对象检测代码
我想使用预先训练的模型(mask_rcnn_R_50_FPN_3x.yaml)运行demo.py,该模型已在Colab中完成并保存为.pth
所以当我在带演示的colab中运行以下内容
!python demo.py --config-file /content/detectron2/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input [DIR INPUT] --output [DIR OUTPUT] --confidence-threshold 0.7 --opts MODEL.WEIGHTS [DIR PATH].pth
我将图像输出到DIR OUTPUT,但是,它没有检测到我在Colab中训练过的模型,并且得到了以下警告
WARNING [08/23 15:10:22 fvcore.common.checkpoint]: Skip loading parameter 'backbone.bottom_up.res2.0.conv1.weight' to the model due to incompatible shapes: (256,64,1,1) in the checkpoint but (64,1) in the model! You might want to double check if this is expected.
WARNING [08/23 15:10:22 fvcore.common.checkpoint]: Skip loading parameter 'backbone.bottom_up.res2.0.conv1.norm.weight' to the model due to incompatible shapes: (256,) in the checkpoint but (64,) in the model! You might want to double check if this is expected.
WARNING [08/23 15:10:22 fvcore.common.checkpoint]: Skip loading parameter 'backbone.bottom_up.res2.0.conv1.norm.bias' to the model due to incompatible shapes: (256,) in the model! You might want to double check if this is expected.
WARNING [08/23 15:10:22 fvcore.common.checkpoint]: Skip loading parameter 'backbone.bottom_up.res2.0.conv1.norm.running_mean' to the model due to incompatible shapes: (256,) in the model! You might want to double check if this is expected.
似乎需要用于训练模型的配置,但是我不确定还需要在命令行中添加什么。抱歉,我是detectron2的新手,正在边做边学。
请支持
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。