Yolo5实现,运行问题 AttributeError: ‘DetectMultiBackend‘ object has no attribute ‘input_details‘

运行detect.py文件报错 AttributeError: ‘DetectMultiBackend’ object has no attribute ‘input_details’
问题如图:
在这里插入图片描述
问题原因,缺少输入,权值文件weights丢失,修改如下:

    parser.add_argument('--weights', nargs='+', type=str, default='/home/tzh/Downloads/learning_work/yolo5_learn/yolo_face/runs/best.pt', help='model path(s)')

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
根据引用、[2]和所提供的信息,出现错误信息"AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'"是由于在yolo5中的Upsample对象中找不到'recompute_scale_factor'属性所导致的。这个错误可以通过以下方法来解决: 1. 确保你正在使用的是最新版本的yolo5代码。有时这个错误是由于旧版本代码中的bug引起的,更新到最新版本可能会修复这个问题。 2. 检查你的代码中是否正确地定义了Upsample对象。确保你使用的是正确的类名和参数,并正确导入了所需的模块。 3. 检查你的代码中是否正确地使用了'recompute_scale_factor'属性。确认你在代码中正确地使用了这个属性,并避免任何拼写错误或语法错误。 4. 如果以上方法都无法解决问题,你可以在yolo5的官方论坛或社区上寻求帮助。其他用户或开发者可能会遇到相同的问题并提供解决方案。 总之,要解决"AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'"错误,你可以尝试更新代码、检查对象定义和属性使用,并在需要时寻求帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor](https://blog.csdn.net/m0_62988777/article/details/131858230)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [YOLOV5 | AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 问题解决 亲...](https://blog.csdn.net/weixin_43401024/article/details/124428432)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值