shaoshengsong / MobileNetV3-SSD

MobileNetV3-SSD for object detection and implementation in PyTorch
269 stars 87 forks source link

在VOC数据集上训练遇见报错 #19

Open FelixCaae opened 4 years ago

FelixCaae commented 4 years ago
raise self.exc_type(msg)

ValueError: Caught ValueError in DataLoader worker process 7. Original Traceback (most recent call last): File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 207, in getitem return self.datasets[dataset_idx][sample_idx] File "/home/yww/MobileNetV3-SSD/vision/datasets/voc_dataset.py", line 65, in getitem image, boxes, labels = self.transform(image, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/ssd/data_preprocessing.py", line 34, in call return self.augment(img, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/transforms/transforms.py", line 55, in call img, boxes, labels = t(img, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/transforms/transforms.py", line 278, in call if overlap.min() < min_iou and max_iou < overlap.max(): File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/numpy/core/_methods.py", line 29, in _amin return umr_minimum(a, axis, None, out, keepdims) ValueError: zero-size array to reduction operation minimum which has no identity

怀疑是数据集的处理过程中出现0-size 的batch

weidongmei123 commented 4 years ago

请问这部分您已经复现了吗?我也想用voc数据集训练,可是不知道怎么改配置代码

shaoshengsong commented 4 years ago

请问这部分您已经复现了吗?我也想用voc数据集训练,可是不知道怎么改配置代码

这里有个现成的使用VOC的,https://github.com/shaoshengsong/MobileNetV3-SSD-Compact-Version

weidongmei123 commented 4 years ago

非常感谢作者!我看到您新发的代码啦,请问这个代码也是ubuntu系统的吗?或者说windows系统上可以兼容吗?您前面那个代码我这边运行报错EOFError:Ran out of input 和在您的GitHub上提问的人遇到的报错一样,请问这种报错原因是什么呢?

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: shaoshengsong <notifications@github.com> 发送时间: 2020年4月22日 11:12 收件人: shaoshengsong/MobileNetV3-SSD <MobileNetV3-SSD@noreply.github.com> 抄送: weidongmei123 <303462500@qq.com>, Comment <comment@noreply.github.com> 主题: 回复:[shaoshengsong/MobileNetV3-SSD] 在VOC数据集上训练遇见报错 (#19)

请问这部分您已经复现了吗?我也想用voc数据集训练,可是不知道怎么改配置代码

这里有个现成的使用VOC的,https://github.com/shaoshengsong/MobileNetV3-SSD-Compact-Version

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

shaoshengsong commented 4 years ago

MobileNetV3-SSD-Compact-Version/create_data_lists.py ,打开 ,换成您自己的数据集路径

shaoshengsong commented 4 years ago

Ubuntu18.04测过,windows没测

tianyuluan commented 4 years ago
raise self.exc_type(msg)

ValueError: Caught ValueError in DataLoader worker process 7. Original Traceback (most recent call last): File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 207, in getitem return self.datasets[dataset_idx][sample_idx] File "/home/yww/MobileNetV3-SSD/vision/datasets/voc_dataset.py", line 65, in getitem image, boxes, labels = self.transform(image, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/ssd/data_preprocessing.py", line 34, in call return self.augment(img, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/transforms/transforms.py", line 55, in call img, boxes, labels = t(img, boxes, labels) File "/home/yww/MobileNetV3-SSD/vision/transforms/transforms.py", line 278, in call if overlap.min() < min_iou and max_iou < overlap.max(): File "/home/yww/anaconda3/envs/pytorch1.3/lib/python3.6/site-packages/numpy/core/_methods.py", line 29, in _amin return umr_minimum(a, axis, None, out, keepdims) ValueError: zero-size array to reduction operation minimum which has no identity

怀疑是数据集的处理过程中出现0-size 的batch

我也遇到了同样的问题,请问您解决了吗