datumaro
datumaro copied to clipboard
error in 'find_mask_bbox' @ util.mask_tools
I've tried to get_bbox of Mask with an image below.
Mask(image = [
[ 0, 0, 0, 0, 0 ],
[ 0, 0, 1, 1, 1 ],
[ 0, 0, 1, 1, 1 ],
[ 0, 0, 1, 1, 1 ],
[ 0, 0, 1, 1, 1 ]
])
I expected (2, 1, 3, 4), but I got (2, 1, 2, 3)
I think the find_mask_bbox function in the util.mask_tools should be corrected in calculating the width and height.