hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.83k stars 427 forks source link

ignoring corrupt image/label #581

Open oceanechy opened 1 year ago

oceanechy commented 1 year ago

train: WARNING: dataset/dataset_demo_rate1.0_split1024_gap200/images/P00321824_665.png: ignoring corrupt image/label: The DType <class 'numpy._IntegerAbstractDType'> could not be promoted by <class 'numpy.dtypes.StrDType'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy._IntegerAbstractDType'>, <class 'numpy.dtypes.StrDType'>) train: New cache created: dataset/dataset_demo_rate1.0_split1024_gap200/labelTxt.cache Traceback (most recent call last): File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 633, in main(opt) File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 530, in main train(opt.hyp, opt, device, callbacks) File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 213, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/home/chy/code_chy/DeepLearning/yolov5_obb/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/home/chy/code_chy/DeepLearning/yolov5_obb/utils/datasets.py", line 444, in init__ labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

有出现这样问题的吗,好像说txt文件有问题,我用的getstart切割图和自己的图都出现这种情况

sakfzr129600 commented 1 year ago

numpy 降级到 1.21.6就好了,具体原因不太清楚

Freeman-Cai commented 1 year ago

不要用yolo格式的数据进行训练吧

llwcool commented 1 year ago

您好,解决了吗?

goodfishboy commented 1 year ago

train: WARNING: dataset/dataset_demo_rate1.0_split1024_gap200/images/P00321824___665.png: ignoring corrupt image/label: The DType <class 'numpy._IntegerAbstractDType'> could not be promoted by <class 'numpy.dtypes.StrDType'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy._IntegerAbstractDType'>, <class 'numpy.dtypes.StrDType'>) train: New cache created: dataset/dataset_demo_rate1.0_split1024_gap200/labelTxt.cache Traceback (most recent call last): File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 633, in main(opt) File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 530, in main train(opt.hyp, opt, device, callbacks) File "/home/chy/code_chy/DeepLearning/yolov5_obb/train.py", line 213, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/home/chy/code_chy/DeepLearning/yolov5_obb/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/home/chy/code_chy/DeepLearning/yolov5_obb/utils/datasets.py", line 444, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

有出现这样问题的吗,好像说txt文件有问题,我用的getstart切割图和自己的图都出现这种情况

您好,这个问题解决了吗,能加个q:508152494,请教一下吗

duyanfang123 commented 1 year ago

我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 image

duyanfang123 commented 1 year ago

我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 image

anyone help?

llwcool commented 1 year ago

look at the WARNING, the model can’t find any data because all data loaded failed.

YanfangDu @.***>于2023年9月13日 周三13:48写道:

我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 [image: image] https://user-images.githubusercontent.com/39179481/267548186-2a406eec-2ee3-4481-afa2-13c95f87ba7b.png

anyone help?

— Reply to this email directly, view it on GitHub https://github.com/hukaixuan19970627/yolov5_obb/issues/581#issuecomment-1716986774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6G2TOSL2KPY4QAOQ6XHDTX2FCKPANCNFSM6AAAAAAZTSVA6I . You are receiving this because you are subscribed to this thread.Message ID: @.***>

duyanfang123 commented 1 year ago

look at the WARNING, the model can’t find any data because all data loaded failed. YanfangDu @.>于2023年9月13日 周三13:48写道: 我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 [image: image] https://user-images.githubusercontent.com/39179481/267548186-2a406eec-2ee3-4481-afa2-13c95f87ba7b.png anyone help? — Reply to this email directly, view it on GitHub <#581 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6G2TOSL2KPY4QAOQ6XHDTX2FCKPANCNFSM6AAAAAAZTSVA6I . You are receiving this because you are subscribed to this thread.Message ID: @.>

image 感谢回复,我注意到是读取数据的问题,图片是我的自己转的数据格式,旋转框是float,class是str, difficult是int,报错提示str和int不能合并,这该如何修改呢

goodfishboy commented 1 year ago

look at the WARNING, the model can’t find any data because all data loaded failed. YanfangDu @._>于2023年9月13日 周三13:48写道: 我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 [image: image] https://user-images.githubusercontent.com/39179481/267548186-2a406eec-2ee3-4481-afa2-13c95f87ba7b.png anyone help? — Reply to this email directly, view it on GitHub <#581 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6G2TOSL2KPY4QAOQ6XHDTX2FCKPANCNFSM6AAAAAAZTSVA6I . You are receiving this because you are subscribed to this thread.Message ID: _@_._>

image 感谢回复,我注意到是读取数据的问题,图片是我的自己转的数据格式,旋转框是float,class是str, difficult是int,报错提示str和int不能合并,这该如何修改呢

你用他项目里的标签格式转换代码试试看下

duyanfang123 commented 1 year ago

look at the WARNING, the model can’t find any data because all data loaded failed. YanfangDu @._>于2023年9月13日 周三13:48写道: 我也遇到了相同的问题,生成dota格式的数据后,在训练时报错 [image: image] https://user-images.githubusercontent.com/39179481/267548186-2a406eec-2ee3-4481-afa2-13c95f87ba7b.png anyone help? — Reply to this email directly, view it on GitHub <#581 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6G2TOSL2KPY4QAOQ6XHDTX2FCKPANCNFSM6AAAAAAZTSVA6I . You are receiving this because you are subscribed to this thread.Message ID: _@_._>

image 感谢回复,我注意到是读取数据的问题,图片是我的自己转的数据格式,旋转框是float,class是str, difficult是int,报错提示str和int不能合并,这该如何修改呢

你用他项目里的标签格式转换代码试试看下

同样的问题,不知道是什么原因了。。。去看源码了 @

numpy 降级到 1.21.6就好了,具体原因不太清楚

问题已解决,项目环境的问题,我将numpy从1.25.2降级到1.22.0,便没有这个问题了

wangchuangg commented 11 months ago

查看警告,模型找不到任何数据,因为所有数据加载失败。杜艳芳@ . _>于2023年9月13日周三13:48写道: 我也遇到了相同的问题,生成dota格式的数据后,在训练中出现错误时报[image: image] https://user-images.githubusercontent。 com/39179481/267548186-2a406eec-2ee3-4481-afa2-13c95f87ba7b.png有人帮忙吗?— 直接回复此电子邮件,在 GitHub < #581(评论) > 上查看,或取消订阅https://github.com/notifications/unsubscribe-auth/AL6G2TOSL2KPY4QAOQ6XHDTX2FCKPANCNFSM6AAAAAAZTSVA6I。您收到此消息是因为您订阅了该主题。消息 ID:_ @_ ._>

图像感谢回复,我注意到是读取数据的问题,图片是我自己转的数据格式,旋转框是float,class是str,困难是int,报错提示str和int不能合并,这个要修改呢

你用他项目里的标签转换代码试试看下

同样的问题,不知道是什么原因了。。。去源码了@

numpy 降级到 1.21.6 就好了,具体原因不太清楚

问题已解决,项目环境的问题,我将numpy从1.25.2降级到1.22.0,然后就没有这个问题了

您好,我想问一下,项目更新之后使用的是DOTA数据集格式进行训练。那么现在旋转物体标注方式是不是就是八参数法了,后续的旋转检测优化是不是就是基于八参数法进行的了。还是说使用DOTA格式进行训练和使用YOLO格式训练,都是基于五参数法进行旋转检测优化的呀

Jinops commented 10 months ago

In my case, I changed cls_id = cls_name_list.index(label[8]) to cls_id = np.array([cls_name_list.index(label[8])]). https://github.com/Jinops/yolov5_obb/commit/290042db808c591f704c0ca11f63d6fb25788038#diff-9963193f39b43b9cfb35ddf270b57ea89d7f4e464d38cb2dec5b22174d0c79f2R982