facebookresearch / pytorchvideo

A deep learning library for video understanding research.
https://pytorchvideo.org/
Apache License 2.0
3.34k stars 412 forks source link

RandAugment discrepancies #168

Open datumbox opened 2 years ago

datumbox commented 2 years ago

While going through the code of transformation I noticed that RandAugment has a few differences from the canonical implementation described on the original paper:

  1. The maximum number of bins used is 10 for all auto augmentation methods. Not 31 (M between [0, 30]) as in the paper (section 4.1, page 4).
  2. The magnitude hyper-param is not used for fixed magnitude schedule (section 2, page 3) but instead is used as the maximum sampled value if uniform sampling is selected or as the mean under gaussian.
  3. It appears that posterize and solarize can only take magnitude values 4 and 1 respectively, instead of having ranges as the original implementation.

These are likely deliberate choices than a bug but still the behaviour is unexpected. I was hoping that you will confirm that above is correct and that you will provide some additional information about the choice. Also it might be worth highlighting this behaviour to the documentation so that users are aware. My understanding is that the latter might affect also AugMix. Thanks!

haooooooqi commented 2 years ago

Maybe @bxiong1202 is the best person to answer this.