working with a facial keypoint dataset, i wan’t to augment the data by rotating and random flipping. for that i need to also infer the new location of the keypoints.
i’m trying to build a transform by myself but got confused since most transforms that i know and use do not expect to also modify the labels.
what is right way to approach this issue? and is there any easy implementation running around somewhere?
update
there is a lot of confusion online about this subject and i think it;s useful if someone could post one tutorial on the subject.
anyway, i saw some people just pass a mask and convert it. i tried to implement it myself by first taking the coordinates vector and turning it into a sparse matrix (same size as image, where all is zero except location of keypoints), then making it go through same transformations, then another tranformation to update the targets with the ones aquired by the mask.
the question remains, how do i know what is the input and output of each transform?
let’s say i modified my dataset class getitem function to return a dictionary with image, labels and mask. (labels being the coordinates of the original picture and mask being a sparse matrix with those coordinates as ones and rest are zeros) how do i now pass this dataset together with a compose object and make sure that transforms are handling this dictionary correctly?