YOLOV5中添加Task-Specific Context Decoupling

文章详细介绍了如何将TSCODE集成到Yolov5中,包括代码修改步骤,如插入类、修改函数,解决torch.concat报错问题,调整配置文件以及处理训练时的wandb错误。此外,建议使用最新版本的代码以减少兼容性问题。
摘要由CSDN通过智能技术生成

注明:以下代码以及修改思路均来源于b站博主魔傀面具,特此感谢!魔导的主页奉上:

魔傀面具的个人空间_哔哩哔哩_bilibili

        撰写此文章的目的是记录改进代码的过程以及碰到的一些问题及解决方式,如有侵权,可联系我,我会将文章进行隐藏。

        更加细节的东西建议去b站听魔导讲解一下,此文章主要是对代码进行复现,不涉及任何理论知识。

Task-Specific Context Decoupling文章链接:2303.01047.pdf (arxiv.org)

完整代码链接:objectdetection_script/yolov5-TSCODE.py at master · z1069614715/objectdetection_script (github.com)

一、代码修改

 

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
根据引用\[1\]的信息,你遇到的错误可能是因为pytorch版本改动导致的。在新版本,torch.concat被改为了torch.cat。你可以尝试将代码的torch.concat替换为torch.cat来解决这个问题。 另外,根据引用\[2\]的信息,如果你在导入torchvision时遇到了"module 'torch' has no attribute '_utils_internal'"的错误,你可以尝试安装低版本的torchvision,使用命令"pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torchvision==0.4.1"来安装。 希望这些信息对你有帮助! #### 引用[.reference_title] - *1* [AttributeError: module ‘torch‘ has no attribute ‘concat](https://blog.csdn.net/Job_class/article/details/129972693)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [import torchvision报错module ‘torch‘ has no attribute ‘_utils_internal](https://blog.csdn.net/m0_52552810/article/details/127078224)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [YOLOV5添加Task-Specific Context Decoupling](https://blog.csdn.net/weixin_45459097/article/details/130028804)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

凤酱

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

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

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

打赏作者

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

抵扣说明:

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

余额充值