yzqxy / Yolov8_obb_Prune_Track

GNU General Public License v3.0
185 stars 15 forks source link

训练自己的数据集时发生报错 #19

Open ZWXCV opened 1 year ago

ZWXCV commented 1 year ago

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

yzqxy commented 1 year ago

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

你还是得再看看数据的标签处理以及存储的格式是否正确。

hecheng000 commented 1 year ago

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

同问有没有解决问题

ZWXCV commented 1 year ago

将numpy降低版本即可

hecheng000 commented 1 year ago

你好 可以请问一下你的numpy版本吗

在 2023-10-25 16:19:36,"ZWXCV" @.***> 写道:

将numpy降低版本即可

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

mawei521-coder commented 1 year ago

请问你们都解决了嘛 File "/home/mawei/Yolov8_obb_Track/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/home/mawei/Yolov8_obb_Track/utils/datasets.py", line 453, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0)

mawei521-coder commented 1 year ago

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0) 报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

同问有没有解决问题

同问有没有解决问题

ZWXCV commented 1 year ago

numpy版本过高,需要将numpy版本降一些

---原始邮件--- 发件人: @.> 发送时间: 2023年11月11日(周六) 晚上7:21 收件人: @.>; 抄送: @.**@.>; 主题: Re: [yzqxy/Yolov8_obb_Prune_Track] 训练自己的数据集时发生报错 (Issue #19)

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0) 报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

同问有没有解决问题

同问有没有解决问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hecheng000 commented 1 year ago

需要降到什么版本呢 我试过降的一个版本还是不行

在 2023-11-11 19:24:53,"ZWXCV" @.***> 写道:

numpy版本过高,需要将numpy版本降一些

---原始邮件--- 发件人: @.> 发送时间: 2023年11月11日(周六) 晚上7:21 收件人: @.>; 抄送: @.**@.>; 主题: Re: [yzqxy/Yolov8_obb_Prune_Track] 训练自己的数据集时发生报错 (Issue #19)

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: 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: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0) 报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

同问有没有解决问题

同问有没有解决问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ZWXCV commented 1 year ago

你试一下1.22.4

---原始邮件--- 发件人: @.> 发送时间: 2023年11月11日(周六) 晚上7:27 收件人: @.>; 抄送: @.**@.>; 主题: Re: [yzqxy/Yolov8_obb_Prune_Track] 训练自己的数据集时发生报错 (Issue #19)

需要降到什么版本呢 我试过降的一个版本还是不行

在 2023-11-11 19:24:53,"ZWXCV" @.***> 写道:

numpy版本过高,需要将numpy版本降一些

---原始邮件--- 发件人: @.&gt; 发送时间: 2023年11月11日(周六) 晚上7:21 收件人: @.&gt;; 抄送: @.**@.&gt;; 主题: Re: [yzqxy/Yolov8_obb_Prune_Track] 训练自己的数据集时发生报错 (Issue #19)

train: WARNING: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/RSDD-SAR/images/train/9_78_4.jpg: ignoring corrupt image/label: The DType <class 'numpy._IntegerAbstractDType'&gt; could not be promoted by <class 'numpy.dtypes.StrDType'&gt;. 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'&gt;, <class 'numpy.dtypes.StrDType'&gt;) train: New cache created: /root/autodl-tmp/Yolov8_obb_Prune_Track-main/datasets/train.cache 3333333333 (5000, 0, 0, 5000, 5000) 22222222 5000 0 0 5000 5000 Traceback (most recent call last): File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 648, in main(opt) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 545, in main train(opt.hyp, opt, device, callbacks) File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/train.py", line 222, in train train_loader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, names, single_cls, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 101, in create_dataloader dataset = LoadImagesAndLabels(path, names, imgsz, batch_size, File "/root/autodl-tmp/Yolov8_obb_Prune_Track-main/utils/datasets.py", line 451, in init labels, shapes, self.segments = zip(*cache.values()) ValueError: not enough values to unpack (expected 3, got 0) 报错显示我的train.cache文件生成失败,一共出现了5000条warning, 中间那个打印信息是我自己加的,它显示我的读取文件为5000,损坏文件为5000,但是我在本地查看自己的标签文件格式和您给的格式示例相同,图片也是jpg图片,可以打开,没有损坏,数据集结构也和您说的一样,所以能问一下这个错误要怎么解决,谢谢

同问有没有解决问题

同问有没有解决问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***&gt;

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

CaptainXuHaitao commented 10 months ago

标签的格式可能有问题,检查一下格式是不是这样的: 1686.0 1517.0 1695.0 1511.0 1711.0 1535.0 1700.0 1541.0 large-vehicle 1 ……

Jie-Huangi commented 10 months ago

感谢感谢,万幸有issue,不然我怎么知道是numpy的问题。