Augmentor error on rotate
smdabdoub opened this issue · comments
The rotate step of the pipeline throws an error on the image "Ring_Billed_Gull_0100_52779.jpg"
File "lib/python3.9/site-packages/Augmentor/Operations.py", line 843, in do
image = image.crop((int(round(E)), int(round(A)), int(round(X - E)), int(round(Y - A))))
File "lib/python3.9/site-packages/PIL/Image.py", line 1206, in crop
raise ValueError("Coordinate 'lower' is less than 'upper'")
ValueError: Coordinate 'lower' is less than 'upper'
Replacing the call to rotate on line 23 with rotate_without_crop
fixes the problem:
p.rotate_without_crop(probability=1, max_left_rotation=15, max_right_rotation=15)
How did you fix this error?
@smdabdoub
In image_aug.py, line 23, change:
p.rotate(probability=1, max_left_rotation=15, max_right_rotation=15)
to
p.rotate_without_crop(probability=1, max_left_rotation=15, max_right_rotation=15)