There are some photos in which we can see the faces clearly but even the api doesn't recognise the faces and give me error like: {"error":{"code":"InvalidImageSize","message":"Image size is too big."}}, even if my images are not too big. 3-4MB

sachin panday 0 Reputation points
2023-09-08T10:04:05.6266667+00:00

e.g: post id -> 24615(this is S3 uploaded pic with this post id in my DB)
when trying to generate facedetection on this photo it says the below error even my photo is not so much heavy. It's almost 2-4MB of photo. This issue persist for so many pictures including the pics where user's faces are clearly visible.

Exception -> org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: [{"error":{"code":"InvalidImageSize","message":"Image size is too big."}}]

I am unable to reach to support team direct mail or live support for technical problems. I also have a paid account Pay as you go. I don't know why the paid services are so much painful with microsoft.

If someone could answer this will be a great help.

Thanks in advance

Azure Face
Azure Face
An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.
163 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 17,121 Reputation points
    2023-09-11T22:08:13.1466667+00:00

    Hello @sachin panday , Thanks for using Microsoft Q&A Platform.

    Sorry for the inconveniences. Could you please check these requirements: https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236

    The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.

    I would suggest you try these workarounds and see if that helps:

    1. You can try resizing the image to be smaller than 1920x1080 pixels. This will reduce the size of the image and make it easier to process.
    2. Sometimes you may also need to remove any metadata that is embedded in the image. Open the image in Paint/other tools, and then save it as a new file. This will remove any metadata that was embedded in the original file.

    Please try these and let us know. We can also help to raise a support request if needed.

    I hope this helps.

    Regards,
    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.