Skip to content

Commit

Permalink
refactor: Minor refactor for probability
Browse files Browse the repository at this point in the history
  • Loading branch information
yakhyo committed Oct 18, 2024
1 parent a166d34 commit 6105133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def apply_adjustments(image, alpha=1.0, beta=0.0):
apply_adjustments(image[:, :, 1], alpha=random.uniform(0.5, 1.5))

# Hue distortion
if random.choice([True, False]):
if random.random() >= 0.5:
hue_shift = image[:, :, 0].astype(int) + random.randint(-18, 18)
image[:, :, 0] = np.mod(hue_shift, 180)

Expand Down

0 comments on commit 6105133

Please sign in to comment.