PIC4SeR / AcT

Official code for "Action Transformer: A Self-attention Model for Short-time Pose-based Human Action Recognition", Pattern Recognition (2022).

Home Page:https://www.sciencedirect.com/science/article/pii/S0031320321006634

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Train data augmentation random flip

JoonHoonKim opened this issue · comments

x = tf.math.multiply(x, [-1.0,1.0])

Sorry to poor english.

I'm guessing, shouldn't we be flipping and swapping the even and odd index values? If you don't change it, there seems to be a risk of overfitting on one side.

Hi @JoonHoonKim !
Maybe I misunderstood your question, but here's my answer:
We don't need to flip even and odd indexes as we reshaped the sample at L.38 and decoupled x and y. This way, we just need to multiply the x-axis by -1 to flip the sequence.
Please let me know if I got it wrong!
Simone

Hi @JoonHoonKim ! Maybe I misunderstood your question, but here's my answer: We don't need to flip even and odd indexes as we reshaped the sample at L.38 and decoupled x and y. This way, we just need to multiply the x-axis by -1 to flip the sequence. Please let me know if I got it wrong! Simone

Thank you for reply!!
It doesn't have to be flipped as you say, but for example if the left shoulder is (-1, 1) then multiply by -1 it will be (1, 1). However, since the left shoulder is in a state of going to the right, it seems that the shoulder that went to the right when training will proceed with learning with the right shoulder, not the left shoulder.
Please let me know if I got it wrong!!!
Additionally, I'm sorry for my lack of English skills. Thank you!!

Hi,
Maybe I'm still missing the point.
Yes, the shoulders will be swapped, but we swap each sequence frame, so the overall sample is consistent and valid! It's just a trick to use the same sample to obtain two sequences: the original one and the mirrored one, which will be perceived as different by the network.