Augmentor icon indicating copy to clipboard operation
Augmentor copied to clipboard

ValueError: image has wrong mode

Open ak9250 opened this issue 5 years ago • 5 comments

I am getting this error ValueError: image has wrong mode

ak9250 avatar Mar 29 '19 00:03 ak9250

@mdbloice Could you please help on this? I am facing the same issue.

Roosh27 avatar Feb 19 '20 06:02 Roosh27

I had the same error @mdbloice how can we solve?

Thanks

joys8998 avatar Apr 02 '20 20:04 joys8998

Actually I also had the same error. At first, I added so many methods to the pipeline p. like this

import Augmentor p = Augmentor.Pipeline('/kaggle/working/final1_resized_0','/kaggle/working/final1_augment') p.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10) p.zoom(probability=0.5, min_factor=1.1, max_factor=1.5) p.flip_left_right(probabilty=0.2) p.rotate_random_90(probability=0.6) p.flip_top_bottom(probability=0.5) p.sample(2500)

after that i'll just check it by using some basic augmentation methods (code given below) like zoom and rotate only.

import Augmentor p = Augmentor.Pipeline('/kaggle/working/final1_resized_0','/kaggle/working/final1_augment') p.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10) p.zoom(probability=0.5, min_factor=1.1, max_factor=1.5) p.sample(2500)

It works for me. Till I don't know how it works for me. I hope this will helpful for u in some way. May be due to some inconsistency in methods that we added in our pipeline

sri-dhurkesh avatar Jul 13 '20 15:07 sri-dhurkesh

I hope you found the issue. For posterity, for me it was because I was trying to import .tif files. I converted them to .png and worked!

NBCS1 avatar Jan 20 '21 11:01 NBCS1

Hi,I found that when I used methods like: p.random_color or p.random_brightness the error will occured but other methods worked very well,I don't know how to solve this issue

xuanzhiliu avatar Jul 29 '22 06:07 xuanzhiliu