for bbox in bboxes:
bbox = np.array(bbox) * ratio
x1, y1, w, h = int(bbox[0]), int(bbox[1]), int(bbox[2]), int(bbox[3])
x1 = np.maximum(x1, 0)
y1 = np.maximum(y1, 0)
x2 = np.minimum(x1+w, nw)
y2 = np.minimum(y1+h, nh)
l_score[y1:y2, x1:x2] = 1.
for yy in range(y1, y2):
l_bbox[yy, x1:x2, 0] = yy - y1
l_bbox[yy, x1:x2, 1] = y2 - yy
for xx in range(x1, x2):
l_bbox[y1:y2, xx, 2] = xx - x1
l_bbox[y1:y2, xx, 3] = x2 - xx
im = np.expand_dims(im, axis=0)
l_score = np.expand_dims(l_score, axis=0)
l_score = np.expand_dims(l_score, axis=3)
l_bbox = np.expand_dims(l_bbox, axis=0)
l_bbox /= 64.
After getting the offsets between the (xx,yy) position and every side of the ground truth,why should you divide the value of l_bbox by 64? Must the value of the divisor be 64?
the code is as follows:
After getting the offsets between the (xx,yy) position and every side of the ground truth,why should you divide the value of l_bbox by 64? Must the value of the divisor be 64?