facebookresearch / mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
https://mmf.sh/
Other
5.49k stars 935 forks source link

Is there an issue in coordinates assignment in build_bbox_tensors function? #1230

Closed shwetkm closed 1 year ago

shwetkm commented 2 years ago

Here's how the coordinates are getting assigned in build_bbox_tensors of utils/dataset.py:

bbox = info["bounding_box"]
x = bbox.get("top_left_x", bbox["topLeftX"])
y = bbox.get("top_left_y", bbox["topLeftY"])
width = bbox["width"]
height = bbox["height"]

coord_tensor[idx][0] = x
coord_tensor[idx][1] = y
coord_tensor[idx][2] = x + width
coord_tensor[idx][3] = y + height

Shouldn't this becoord_tensor[idx][3] = y - heightrather than coord_tensor[idx][3] = y + height. Assuming the xyxy format is for top left and bottom right. Also, y + height will give y coordinates that are out of the bbox. Am I missing something here?