yolov2
yolov2 copied to clipboard
Question about function 'flow_from_list' in data_generator.py
Hi Dat,
I just wonder why when create y_batch,
you don't consider about prior-anchor(created by k-mean clustering)
xc, yc, w, h = bbox.to_relative_size((float(width), float(height)))
object_mask = np.concatenate([[xc, yc, w, h], [1.0], one_hot])
center_x = xc * grid_w
center_y = yc * grid_h
r = int(np.floor(center_x))
c = int(np.floor(center_y))
if r < grid_w and c < grid_h:
y_batch[i, c, r, :, :] = N_ANCHORS * [object_mask] # Construct Feature map ground truth
According to upper codes, Don't consider prior-anchors, and do not find best anchor to fit with ground-truth.
just assign same object mask to all ANCHORS , even ground truth is not fit to other ANCHORS
Can you explain why you do not use prior-anchors for create y_batch, please?
Thank you