Fix random noise corruptor
It was functioning as a color shift
This commit is contained in:
parent
c85da79697
commit
d8c3fc9327
|
@ -78,7 +78,7 @@ class ImageCorruptor:
|
|||
elif 'noise' in aug:
|
||||
# Block noise
|
||||
noise_intensity = (rand_int % 4 + 2) / 255.0 # Between 1-4
|
||||
img += np.random.randn() * noise_intensity
|
||||
img += np.random.randn(*img.shape) * noise_intensity
|
||||
elif 'jpeg' in aug:
|
||||
# JPEG compression
|
||||
qf = (rand_int % 20 + 5) # Between 5-25
|
||||
|
|
Loading…
Reference in New Issue
Block a user