cvlab-stonybrook / Scanpath_Prediction

Predicting Goal-directed Human Attention Using Inverse Reinforcement Learning (CVPR2020)
MIT License
103 stars 22 forks source link

The format of bounding box in bbox_annos.npy file #8

Closed ManooshSamiei closed 4 years ago

ManooshSamiei commented 4 years ago

Hello,

I am wondering how the bounding box coordinates in bbox_annos.npy file are generated? What operations are done on the original coco dataset bounding boxes? For example in the get_num_step2target function in the code it is written:

on_target_X = np.logical_and(X > bbox[0], X < bbox[0] + bbox[2])
on_target_Y = np.logical_and(Y > bbox[1], Y < bbox[1] + bbox[3])

If I am right, the bouding box coordinates are normally written as : [x1 x2 y1 y2] . I am wondering why the above code is not written this way:

on_target_X = np.logical_and(X > bbox[0], X < bbox[1] )
on_target_Y = np.logical_and(Y > bbox[2], Y < bbox[3])

Thank you for your help.

ManooshSamiei commented 4 years ago

I just realized that the COCO bounding box format is [top left x position, top left y position, width, height].