cvlab-stonybrook / LearningToCountEverything

MIT License
357 stars 72 forks source link

Questions about the difference between the real image size and annotated image size #30

Closed stdKonjac closed 1 year ago

stdKonjac commented 1 year ago

Sorry for the bother, but I found the real image size is inconsistent with that of annotation_FSC147_384.json. For example, the size of download image 1050.jpg is 469 x 384 (W x H), but the size in annotation_FSC147_384.json is 1300 x 1065. I wonder why these two shapes are different and how can I use the bbox in annotation_FSC147_384.json? @Viresh-R @v-hoainm

Viresh-R commented 1 year ago

Hey, we resized the images for the experiment. For 1050.jpg, 1300 1065 is the original size of the image, while 469384 is the resized image size. The exemplars in the annotation file correspond to the resized image, so you can directly use them. Note that we have shared the resized images.

stdKonjac commented 1 year ago

Thank you for your nice explanation!

jaideep11061982 commented 1 year ago

@stdKonjac were you able to map the bbx to image I dont get right boxes on to the image ,how y1/y2 here are same ,143/143.

for b in [[143, 266, 143, 317]]:
    #@break 
    print(b)
    y,x,y1,x1=b
    #print(b)
    cv2.rectangle(img ,(x,y),(x1,y1),(255,0,0),5)

plt.imshow(img)
stdKonjac commented 1 year ago

@stdKonjac were you able to map the bbx to image I dont get right boxes on to the image ,how y1/y2 here are same ,143/143.

for b in [[143, 266, 143, 317]]:
    #@break 
    print(b)
    y,x,y1,x1=b
    #print(b)
    cv2.rectangle(img ,(x,y),(x1,y1),(255,0,0),5)

plt.imshow(img)

Perhaps the bbox is [left_top_x, left_top_y, h, w] instead of [x1, y1, x2, y2]?