Reorder edits

This commit is contained in:
Andras Schmelczer 2024-06-18 23:03:32 +01:00
parent 8277768df8
commit 6fdeec0030
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 10 additions and 9 deletions

File diff suppressed because one or more lines are too long

View file

@ -16,10 +16,8 @@ def random_edit(img: Image, seed: int = 42) -> Image:
np.random.seed(seed)
img = img.convert("RGB")
img = adjust_gamma(img, get_random_gamma())
img = add_noise(img, random(0, 0.1))
img = ImageEnhance.Contrast(img).enhance(random(0.5, 1.5))
img = add_random_colour_spill(img, 0.2)
img = adjust_gamma(img, get_random_gamma())
img = img.convert("HSV")
saturation_lut = get_random_saturation_per_hue_lut()
@ -29,4 +27,7 @@ def random_edit(img: Image, seed: int = 42) -> Image:
)
img = img.convert("RGB")
img = add_random_colour_spill(img, 0.2)
img = add_noise(img, random(0, 0.1))
return img