Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augmentor error on rotate #21

Open
smdabdoub opened this issue Jun 4, 2022 · 3 comments
Open

Augmentor error on rotate #21

smdabdoub opened this issue Jun 4, 2022 · 3 comments

Comments

@smdabdoub
Copy link

smdabdoub commented Jun 4, 2022

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)

@ahxmeds
Copy link

ahxmeds commented Nov 24, 2023

How did you fix this error?
@smdabdoub

@smdabdoub
Copy link
Author

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)

@FisherCats
Copy link

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)

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)

Thanks a lot! It's finally works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants