Reorder edits
This commit is contained in:
parent
8277768df8
commit
6fdeec0030
2 changed files with 10 additions and 9 deletions
File diff suppressed because one or more lines are too long
|
|
@ -16,10 +16,8 @@ def random_edit(img: Image, seed: int = 42) -> Image:
|
||||||
np.random.seed(seed)
|
np.random.seed(seed)
|
||||||
img = img.convert("RGB")
|
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 = 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")
|
img = img.convert("HSV")
|
||||||
saturation_lut = get_random_saturation_per_hue_lut()
|
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 = img.convert("RGB")
|
||||||
|
|
||||||
|
img = add_random_colour_spill(img, 0.2)
|
||||||
|
img = add_noise(img, random(0, 0.1))
|
||||||
|
|
||||||
return img
|
return img
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue