Abstract image processor arg checks. (#28843)
* abstract image processor arg checks.
* fix signatures and quality
* add validate_ method to rescale-prone processors
* add more validations
* quality
* quality
* fix formatting
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* fix formatting
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* fix formatting
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Fix formatting mishap
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* fix crop_size compatibility
* fix default mutable arg
* fix segmentation map + image arg validity
* remove segmentation check from arg validation
* fix quality
* fix missing segmap
* protect PILImageResampling type
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* add back segmentation maps check
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>