Open omkarhp opened 6 years ago
hi @omkarhp
please add color_mode="rgb" in load_image() in inference.py file located in utils folder
def load_image(image_path, grayscale=False, color_mode='rgb', target_size=None): pil_image = image.load_img(image_path, grayscale, color_mode, target_size, ) return image.img_to_array(pil_image)
change to these lines in inference.py to work with the latest keras:
def load_image(image_path, grayscale=False, target_size=None):
color_mode = 'grayscale'
if grayscale == False:
color_mode = 'rgb'
else:
grayscale = False
pil_image = image.load_img(image_path, grayscale, color_mode, target_size)
return image.img_to_array(pil_image)
While running image_emotion_gender_demo.py i'm getting error statement as ValueError: color_mode must be "grayscale", "rbg", or "rgba"
Like this:
Can somebody please help?? Thank you