RandAugment.get_standard_policy should propagate value range to RandomBrightness and RandomContrasts
When using RandomBrightness and RandomContrasts from RandAugment.get_standard_policy() with value_range=(0,1), two issues arise:
- RandomContrast computes output values correctly but does not clip them to the (0,1) range
- RandomBrightness computes incorrect output values that a massively out of range, and does not clip them either
This issue canot be fixed until TF 2.10
Please note that this issues does not affect RandAugment(value_range=(0,1)) which rescales internally to range (0,255) before applying all augmentations. RandAugment(value_range=(0,1)) works correctly.
Repro Colab: https://colab.research.google.com/drive/1dig1GRPRW_7MwKV-Z0z_2tAVqnFjJ6PH?usp=sharing
This issue canot be fixed until TF 2.10
I think that for RandomBrightness the value_range arg is already available with TF 2.9rc2 right?
For RandomContrasts instead it is still not available also in master.
This issue canot be fixed until TF 2.10
I think that for
RandomBrightnessthevalue_rangearg is already available with TF 2.9rc2 right?For
RandomContrastsinstead it is still not available also in master.
I think it came after the branch cut. Tested it today in a local runtime.
I think it came after the branch cut. Tested it today in a local runtime.
If you click you can see that I'am on the rc2 tag.
I think it came after the branch cut. Tested it today in a local runtime.
If you click you can see that I'am on the rc2 tag.
Weird, I just have installed the wrong version. Good to know, with 2.9 we can fix 1/2 the issue. We will do so before KerasCV 0.2.0
Great! This will fix the problem with RandomBrightness which outputs the wrong values. The lack of clipping is slightly less important because it is smaller in magnitude.
https://github.com/keras-team/keras-cv/pull/429
Thanks for reporting the issue! We have consolidated the development of KerasCV into the new KerasHub package, which supports image, text, and multi-modal models. Please read the announcement. KerasHub will support all the core functionality of KerasCV.
KerasHub can be installed with !pip install -U keras-hub. Documentation and guides are available at keras.io/keras_hub.
With our focus shifted to KerasHub, we are not planning any further development or releases in KerasCV. If you encounter a KerasCV feature that is missing from KerasHub, or would like to propose an addition to the library, please file an issue with KerasHub.
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.