Skip to content
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

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

Open
FelixCaae opened this issue Mar 1, 2020 · 6 comments
Open

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

FelixCaae opened this issue Mar 1, 2020 · 6 comments

Comments

@FelixCaae
Copy link

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
Copy link

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

@shaoshengsong
Copy link
Owner

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

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

@weidongmei123
Copy link

weidongmei123 commented Apr 22, 2020 via email

@shaoshengsong
Copy link
Owner

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

@shaoshengsong
Copy link
Owner

Ubuntu18.04测过,windows没测

@tianyuluan
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants