botocore.errorfactory.InvalidImageFormatException: An error occurred (InvalidImageFormatException) when calling the DetectCustomLabels operation: Request has invalid image format

0

I want to use python to connect with the AWS Rekognition to get the detect label results, but I have been trying this for a long time, and whenever I want to use python to connect to my project which I chose the "bounding box" one in Rekognition, and it shows "botocore.errorfactory.InvalidImageFormatException: An error occurred (InvalidImageFormatException) when calling the DetectCustomLabels operation: Request has invalid image format".

I have read the developer guide and I know I use the right format which is "PNG".
I would wonder if there are something that I miss? Thank you very much.

asked 2 years ago214 views
1 Answer
0

Hi,

Thanks for using Rekognition Custom Labels.

This could be a case the image has certain metadata that's corrupted thus preventing it from being properly processed. Sometimes even when an image viewer is able to display the image, the metadata can still be in a corrupted state.
A quick way to check is using Python Pillow library to open the image and inspect. Here is a reference to the examples.
If it does pass the Pillow library image opening test, feel free to create a support ticket which we can help you better.

Thanks!

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions