首页 > 其他分享 >yolov8 face 错误修改

yolov8 face 错误修改

时间:2024-08-07 12:05:48浏览次数:8  
标签:Tensor tuple int self yolov8 修改 c2 face

derronqi/yolov8-face: yolov8 face detection with landmark (github.com)

 

问题:训练yolov8-lite-s,yolov8-lite-t的时候会出错,Cannot use yolov8-lite-s · Issue #3 · derronqi/yolov8-face (github.com)

TypeError: conv2d() received an invalid combination of arguments - got (Tensor, Parameter, Parameter, tuple, tuple, tuple, int), but expected one of:
 * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)
      didn't match because some of the arguments have invalid types: (Tensor, Parameter, Parameter, tuple of (int, int), tuple of (int, int), tuple of (bool, bool), int)
 * (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups)
      didn't match because some of the arguments have invalid types: (Tensor, Parameter, Parameter, tuple of (int, int), tuple of (int, int), tuple of (bool, bool), int)

原因:conv参数没有匹配上,如下:

 

改源码"ultralytics\nn\modules\block.py",line 42

class StemBlock(nn.Module):
    def __init__(self, c1, c2, k=3, s=2, p=None, g=1,d=1, act=True):
        super(StemBlock, self).__init__()
        self.stem_1 = Conv(c1, c2, k, s, p, g, d, act)
        self.stem_2a = Conv(c2, c2 // 2, 1, 1, 0)
        self.stem_2b = Conv(c2 // 2, c2, 3, 2, 1)
        self.stem_2p = nn.MaxPool2d(kernel_size=2,stride=2,ceil_mode=True)
        self.stem_3 = Conv(c2 * 2, c2, 1, 1, 0)

解决。

标签:Tensor,tuple,int,self,yolov8,修改,c2,face
From: https://www.cnblogs.com/WenJXUST/p/18346793

相关文章

  • Linux 修改 默认 shell
    连接到目标计算机后,默认情况下会进入目标计算机的默认shell。要切换到bashshell,只需在终端窗口中输入以bash,以非登录交互方式启动bashshell。但是每次都输入bash很麻烦,就需要修改默认shell,使其登录就进入bash(或者其他shell)。查看系统已安装的shell如果要查看当前系统的she......
  • Windows7修改TTL值 (设备进行icmp请求或者回应时会所自己的ttl值带上)
    https://mp.weixin.qq.com/s/HcTD3PUHkx_i-ejx5vGuZA复现记录:【win10+】默认就有DefaultTTL,修改之后,重启没有变化:win7pingwin10:win7pingwww.baidu.com:......
  • 修改微信(3.9.10.19版本)系统托盘图标(傻瓜教程)
    微信版本:进行以下操作先退出微信1.iconfontLogo下载一个图标png,大小为256像素,前面颜色自己看着弄2.png转ico,转化链接(转化的网站很多不一定非要是这个)3.下载后续所需程序(ResHacker和IconWorkshopPortable)备用下载链接4.找到右击微信快捷键点击属性,打开所在位置,在文......
  • 如何使用 Databricks 扩展 YOLOv8 推理
    我已经使用UltralyticsPython包成功训练了YOLOv8模型,现在的目标是对存储在S3存储桶中的1亿张图像进行推理。目前,我有一个具有GPU加速功能的Databricks笔记本,可以执行推理,但我不知道如何扩展它。从Databricks文档中,我了解到使用DatabricksAutoloader从S3......
  • YOLOv8改进 | Neck | 有效提升小目标检测效果,附完整代码结构图【小白必备】
     秋招面试专栏推荐 :深度学习算法工程师面试问题总结【百面算法工程师】——点击即可跳转......
  • 笠鬼bug的用法及注意事项是什么?小白也能懂!笠鬼风灵月影修改器快速启动三步秘籍
    在《笠鬼》这款游戏中,通常提到的“bug”是指游戏程序中的错误或漏洞,它们可能允许玩家以非预期的方式获得优势或绕过游戏的正常机制。然而,玩家通常不会主动“使用”bug,因为这样做可能违反游戏的服务条款,并可能导致账号被封禁。不过,从另一个角度来看,玩家可能会寻找或使用游戏修......
  • 织梦dede怎么修改关键字长度?
    dede文件修改默认关键字长度第1步:找到并打开dede后台目录下的article_edit.php和article_add.php文件。电脑维修技术网注:如果是修改专题认关键字的话,需要修改spec_add.php和spec_edit.php文件。第2步:在文件中搜索"keywords",找到“$keywords=trim(cn_substrR($keywords,60));......
  • Android逆向:修改APK并重打包签名
    在Android逆向中,经常需要对APK修改,然后重新打包并签名。这篇文章中,介绍了如何使用各个工具来完成这个过程。各个步骤以及所需工具:解压APK文件; 工具:apktool进行修改;     工具:看修改需求重新打包APK; 工具:apktool将APK对齐;   工具:zipalign生成密钥文件,并对AP......
  • kotlin 与java 接口不兼容@FunctionalInterface
    需求:获取当前方法名为了获取当前方法名已知的有1.堆栈获取2.通过classs的enclosingMethod.name比较准确的是enclosingMethod,但是为了获取这个还需要一个内部类,于是用到了Runable,但是run方法没有返回值于是出现了神奇问题1.照Runnable抄一份:源码如下:@FunctionalInterfacepu......
  • Deepface - 仅以超过阈值的置信度显示面部的情绪
    我有这段代码可以检测面部表情,但它会在没有面部表情的地方找到面部表情。所以我想知道是否可以放心地做到这一点。我尝试在谷歌上搜索如何做到这一点,但没有找到任何有用的东西。importcv2fromdeepfaceimportDeepFace#Loadfacecascadeclassifierface_cascade=......