aleflabo/MoCoDAD

Why perform affine transformation on original coordinates?

Closed this issue · 2 comments

Hi,thank you for your open source of your great work!
Recently I was reading your open source code and found that affine transformation was performed on the original coordinates during the processing of the dataset. What impact does this have on the results? Which paper did you use the affine transformation based on the results of?I want to study the impact of this transformation on the results.thank you!

Hi, we appreciate your interest in our work!

We apply these affine transformations as data augmentation transformations to make the model robust. Specifically, they are applied on the scaled poses inside the function __getitem__(..) of the dataset (here).

The list of transformations is defined here:

ae_trans_list = [
    PoseTransform(sx=1, sy=1, tx=0.0, ty=0, rot=0, flip=False),  # just the identity
    PoseTransform(sx=1, sy=1, tx=0.0, ty=0, rot=0, flip=True),  # axial simmetry
    PoseTransform(sx=1, sy=1, tx=0.0, ty=0, rot=90, flip=False),  # rotation by 90 degrees 
    PoseTransform(sx=1, sy=1, tx=0.0, ty=0, rot=90, flip=True),  # axial simmetry and rotation by 90 degrees
    PoseTransform(sx=1, sy=1, tx=0.0, ty=0, rot=45, flip=False),  # rotation by 45 degrees
]

The usage of such transformations is triggered and controlled by the parameter num_transform in the configuration files; our experiments have been run with num_transform=5, hence applying the whole list.

For each sample, we pick a transformation from the list according to the index passed as an argument to __getitem__(..).

You may want to look at Graph Embedded Pose Clustering for Anomaly Detection [Markovitz et al., CVPR 2020] [Code], from which we took part of the code for the data processing phase. You may also look at Learning Regularity in Skeleton Trajectories for Anomaly Detection in Videos [Morais et al., CVPR 2019] [Code] for more details about the scaling of the data.

I hope this helps answer your questions, I'm available for any further clarification!

Stefano

thank you for the quick reply and clarification!