My dataset consist of only 1 class. I encounter following error,
File "/home/fftai/working/pytorch/pytorch-YOLOv4/dataset.py", line 78, in fill_truth_detection min_w_h = np.array([bboxes[:, 2] - bboxes[:, 0], bboxes[:, 3] - bboxes[:, 1]]).min() File "/home/fftai/anaconda3/lib/python3.8/site-packages/numpy/core/_methods.py", line 43, in _amin return umr_minimum(a, axis, None, out, keepdims, initial, where) ValueError: zero-size array to reduction operation minimum which has no identity
This comes by dataset class at this point,
min_w_h = np.array([bboxes[:, 2] - bboxes[:, 0], bboxes[:, 3] - bboxes[:, 1]]).min()
I further debugged the code and found this line which is not clear to me,
bboxes = bboxes[np.where((bboxes[:, 4] < classes) & (bboxes[:, 4] >= 0))[0]]
My dataset consist of only 1 class. I encounter following error,
File "/home/fftai/working/pytorch/pytorch-YOLOv4/dataset.py", line 78, in fill_truth_detection min_w_h = np.array([bboxes[:, 2] - bboxes[:, 0], bboxes[:, 3] - bboxes[:, 1]]).min() File "/home/fftai/anaconda3/lib/python3.8/site-packages/numpy/core/_methods.py", line 43, in _amin return umr_minimum(a, axis, None, out, keepdims, initial, where) ValueError: zero-size array to reduction operation minimum which has no identity
This comes by dataset class at this point,
min_w_h = np.array([bboxes[:, 2] - bboxes[:, 0], bboxes[:, 3] - bboxes[:, 1]]).min()
I further debugged the code and found this line which is not clear to me,
bboxes = bboxes[np.where((bboxes[:, 4] < classes) & (bboxes[:, 4] >= 0))[0]]
this lines makes bboxes = []