keras-team / keras-cv

Industry-strength Computer Vision workflows with Keras
Other
972 stars 318 forks source link

RandAugment implementation differences. #411

Open sebastian-sz opened 2 years ago

sebastian-sz commented 2 years ago

I'm reading keras_cv RandAugment implementation and feel like there are some differences with TF implementation referenced in the paper. I'm still reading this layer so I might not have understood everything, but here it goes:

Are those differences intentional / are the missing operations not so important or should they be added in the future?

bhack commented 2 years ago

I don't know how many points was covered in private threads ~https://github.com/keras-team/keras-cv/issues/84~ https://github.com/keras-team/keras-cv/issues/169

sebastian-sz commented 2 years ago

@bhack If those differences were discussed and accepted maybe they could be described in the docstring.

For example: the Identity operation is also missing but it's mentioned that this is substituted by the rate parameter.

bhack commented 2 years ago

I've correctly updated the wrong mentioned ticket

sebastian-sz commented 2 years ago

I see, #169 is closed but there is no mention whether it was decided to ignore or include Posterize. I still believe that a docstring mention would be good to have for such cases.

Also I can't find information/discussion regarding presence of other ops: Sharpness & Rotate.

bhack commented 2 years ago

Yes, I think also that some underground information/choices could also be linked to this kind of arguments https://github.com/keras-team/keras-cv/pull/294#discussion_r848820525

LukeWood commented 2 years ago

I actually discussed this heavily with Ekin and am confident that our implementation is correct and that the others are actually NOT correct!

I can take an action item to discuss this in a "why KerasCV doc"; I am actively working with several original authors to verify our implementations of various components.

sebastian-sz commented 2 years ago

@LukeWood thank you for the answer.

I did not know about internal work or discussions and was simply worried that there are quite few differences between keras_cv and other existing implementations in various libraries. If they were discussed and even approved by original authors then it sounds solid to me.

bhack commented 2 years ago

I can take an action item to discuss this in a "why KerasCV doc"; I am actively working with several original authors to verify our implementations of various components.

Also if more correct and documented I suppose that it could be still a risk for the community until we will cover our "flavour" with a full reproducibility of the train protocol. As you know the devil is in details (and in other hyper-parameters :smile:) so we need to claim and document our reproducibility to trust the community.