-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 #8
Comments
是yolov5内容更新的问题,替换部分代码为yolov5最新的代码就可以解决了 |
我也遇到了这个错误,我的改动是将yolo.py文件重新替换为yolov5官方的yolo.py文件 |
请问是把文件整体替换还是替换一部分 |
请问是替换的哪一部分呢 |
我是将整个yolo.py文件都替换了 |
这是我的python编译器环境,参考博客--https://blog.csdn.net/qq_45724346/article/details/119759828
…----------------------------------------------------
labelgo标注完成截图:
------------------ 原始邮件 ------------------
发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" ***@***.***>;
发送时间: 2022年6月28日(星期二) 晚上6:43
***@***.***>;
***@***.******@***.***>;
主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8)
我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' obj
我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' object has no attribute 'info'的错误 此时将yolo.py中277行的fuse函数中的 LOGGER.info('Fusing layers... ') 这一句注释掉重新运行即可
请问是把文件整体替换还是替换一部分
我是将整个yolo.py文件都替换了
***@***.***。非常感谢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
再打扰一下,往被标注的数据集里面放的class.txt文件是空白文件还是有需要被标注的类,非常感谢 |
classes.txt需要自己创建,然后把模型对应的类写进去,运行程序不会改动你的classes.txt
…------------------ 原始邮件 ------------------
发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" ***@***.***>;
发送时间: 2022年6月28日(星期二) 晚上7:29
***@***.***>;
***@***.******@***.***>;
主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8)
这是我的python编译器环境,参考博客--https://blog.csdn.net/qq_45724346/article/details/119759828
…
---------------------------------------------------- labelgo标注完成截图:
------------------ 原始邮件 ------------------ 发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" @.>; 发送时间: 2022年6月28日(星期二) 晚上6:43 @.>; @.@.>; 主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8) 我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' obj 我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' object has no attribute 'info'的错误 此时将yolo.py中277行的fuse函数中的 LOGGER.info('Fusing layers... ') 这一句注释掉重新运行即可 请问是把文件整体替换还是替换一部分 我是将整个yolo.py文件都替换了 @.。非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
再打扰一下,往被标注的数据集里面放的class.txt文件是空白文件还是有需要被标注的类,非常感谢
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
问题已解决,非常感谢!!! |
我运行程序没有修改,但是我要修改标签的时候,他默认改了classes.txt文件,然后报错 |
我将文件替换后在次进行自动标注时,出现了 ImportError: cannot import name 'LOGGER' from 'libs.detect_utils.general' 这个问题,跟您出现的问题不太一样,请问怎样解决。(我进行文件替换时还需要改一下导入包的名字,因为官方包的路径名字和这个项目里的包的路径名字不同) |
我的改动是在general.py里面加入这几个函数(这几个函数我也没有用过,不清楚作用),但我认为不影响自动标注。
…------------------ 原始邮件 ------------------
发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" ***@***.***>;
发送时间: 2022年7月8日(星期五) 下午5:18
***@***.***>;
***@***.******@***.***>;
主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8)
我也遇到了这个错误,我的改动是将yolo.py文件重新替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' object has no attribute 'info'的错误 此时将yolo.py中228行的fuse函数中的 LOGGER.info('Fusing layers... ') 这一句注释掉重新运行即可
我将文件替换后在次进行自动标注时,出现了 ImportError: cannot import name 'LOGGER' from 'libs.detect_utils.general' 这个问题,跟您出现的问题不太一样,请问怎样解决。(我进行文件替换时还需要改一下导入包的名字,因为官方包的路径名字和这个项目里的包的路径名字不同)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
非常感谢,之前出现问题是直接闪退的,现在在general.py里面加入那些报错的函数后可以自动标注了,不过标注效果比较差,不知道是工具的问题还是我这边训练的权重文件的问题。 |
你可以用你的权重检测一遍文件,对比一下检测的结果跟标注的结果,我认为应该是你的权重文件有问题。
…------------------ 原始邮件 ------------------
发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" ***@***.***>;
发送时间: 2022年7月8日(星期五) 下午5:53
***@***.***>;
***@***.******@***.***>;
主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8)
我的改动是在general.py里面加入这几个函数(这几个函数我也没有用过,不清楚作用),但我认为不影响自动标注。
…
------------------ 原始邮件 ------------------ 发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" @.>; 发送时间: 2022年7月8日(星期五) 下午5:18 @.>; @.@.>; 主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8) 我也遇到了这个错误,我的改动是将yolo.py文件重新替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' object has no attribute 'info'的错误 此时将yolo.py中228行的fuse函数中的 LOGGER.info('Fusing layers... ') 这一句注释掉重新运行即可 我将文件替换后在次进行自动标注时,出现了 ImportError: cannot import name 'LOGGER' from 'libs.detect_utils.general' 这个问题,跟您出现的问题不太一样,请问怎样解决。(我进行文件替换时还需要改一下导入包的名字,因为官方包的路径名字和这个项目里的包的路径名字不同) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
非常感谢,之前出现问题是直接闪退的,现在在general.py里面加入那些报错的函数后可以自动标注了,不过标注效果比较差,不知道是工具的问题还是我这边训练的权重文件的问题。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
你修改了data文件夹下的predefined_classes.txt中的类别跟你的classes.txt一致吗?
…------------------ 原始邮件 ------------------
发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" ***@***.***>;
发送时间: 2022年7月6日(星期三) 下午4:34
***@***.***>;
***@***.******@***.***>;
主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8)
classes.txt需要自己创建,然后把模型对应的类写进去,运行程序不会改动你的classes.txt
…
------------------ 原始邮件 ------------------ 发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" @.>; 发送时间: 2022年6月28日(星期二) 晚上7:29 @.>; @.@.>; 主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8) 这是我的python编译器环境,参考博客--https://blog.csdn.net/qq_45724346/article/details/119759828 … ---------------------------------------------------- labelgo标注完成截图: ------------------ 原始邮件 ------------------ 发件人: "cnyvfang/labelGo-Yolov5AutoLabelImg" @.>; 发送时间: 2022年6月28日(星期二) 晚上6:43 @.>; @.@.>; 主题: Re: [cnyvfang/labelGo-Yolov5AutoLabelImg] RuntimeError: shape '[1, 3, 1, 1, 2]' is invalid for input of size 32256 (Issue #8) 我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' obj 我也遇到了这个错误,我的改动是将yolo.py替换为yolov5官方的yolo.py文件 然后运行labelgo.py选择.pt权重文件进行自动标注时,遇到了AttributeError: 'function' object has no attribute 'info'的错误 此时将yolo.py中277行的fuse函数中的 LOGGER.info('Fusing layers... ') 这一句注释掉重新运行即可 请问是把文件整体替换还是替换一部分 我是将整个yolo.py文件都替换了 @.。非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 再打扰一下,往被标注的数据集里面放的class.txt文件是空白文件还是有需要被标注的类,非常感谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
我运行程序没有修改,但是我要修改标签的时候,他默认改了classes.txt文件,然后报错
label = self.classes[int(class_index)]
IndexError: list index out of range
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 80, 80, 2] 有遇到这个问题的吗,换了一个权重文件就报这个错误 |
我也遇到一樣的換個銓重就報錯,是否跟pt的架構有差? |
您好,在使用自动标注功能时,我使用了自己的yolo模型后然后出现了这个问题。
网上也查找了各种原因,但是目前还是无法解决,我也修改了nc为自己的class数,不知道我是否应该修改您代码某些地方的参数,特此请教。
The text was updated successfully, but these errors were encountered: