Closed leo-XUKANG closed 4 years ago
@YunYang1994 hello, i found some bug in utils.py https://github.com/YunYang1994/tensorflow-yolov3/blob/eb02b0731dfb1c2614e216c619ac7b22db57d994/core/utils.py#L38
which will cause the xind or yind is bigger than the image input size, so i change it,
if ((iw - nw) // 2) > 0: dw = np.random.randint(0, ((iw - nw) // 2)) else: dw = (iw - nw) // 2 if (ih - nh) // 2 > 0: dh = np.random.randint(0, (ih - nh) // 2) else: dh = (ih - nh) // 2 image_paded[dh:nh+dh, dw:nw+dw, :] = image_resized image_paded = image_paded / 255. if gt_boxes is None: return image_paded else: gt_boxes[:, [0, 2]] = gt_boxes[:, [0, 2]] * nw / w + dw gt_boxes[:, [1, 3]] = gt_boxes[:, [1, 3]] * nh / h + dh return image_paded, gt_boxes
@YunYang1994 hello, i found some bug in utils.py
https://github.com/YunYang1994/tensorflow-yolov3/blob/eb02b0731dfb1c2614e216c619ac7b22db57d994/core/utils.py#L38
which will cause the xind or yind is bigger than the image input size, so i change it,