Hey! thanks for sharing your work. In the above lines pointed out, I see that you transformed imagenet bbox (1-based [xmin, ymin, xmax, ymax]?) to center-based width height form ([cx, cy, w, h]). I think that the center-based bbox which you'll get will be 1-based:
bbox = np.array(
[(bbox[2] + bbox[0]) / 2, # <--- cx will be 1-based since xmin and xmax are 1-based?
(bbox[3] + bbox[1]) / 2,
bbox[2] - bbox[0] + 1,
bbox[3] - bbox[1] + 1])
I guess bbox above should be 0-based box before passing to get_instance_image method which expects a 0-based centered box:
https://github.com/HelloRicky123/Siamese-RPN/blob/8f0ec5459d11f5b8d0ee9cbbfbfc1a9bf8cd3505/bin/create_dataset_ytbid.py#L105-L112
Hey! thanks for sharing your work. In the above lines pointed out, I see that you transformed imagenet bbox (1-based
[xmin, ymin, xmax, ymax]
?) to center-based width height form ([cx, cy, w, h]
). I think that the center-based bbox which you'll get will be 1-based:I guess
bbox
above should be 0-based box before passing toget_instance_image
method which expects a 0-based centered box:Otherwise the generated crops will not have object exactly at the center, it would be off by 1. What do you think?