Open tknapen opened 5 years ago
just leaving some notes here with regards to our potential solution:
from the cropbox we can get to x or y translation factors
from the original picture dimensions we can get the x and y scaling factors
then, the rest is just a vector matrix dot product of the xy coordinates of the annotation segmentation points with an affine transform matrix
[cx 0 tx 0 cy ty 0 0 1]
cx being scaling in x, cy scaling in y, tx translation in x and ty translation in y
then we check for out of bound annotation points and filter these classes out (for the class labels)
For the experiment, COCO images were cropped to be square. This means that the spatial parameters returned by the COCO interface are off, and need to be re-mapped to correct for the cropping.