SthPhoenix / InsightFace-REST

InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Activating extract/gender-age returns Internal Server Error

benizar opened this issue · comments

I would like to use this project to identify gender in a list of jpg photos. The API interface is really helpful with the default example:

imagen

However, when I set gender-age to true it returns an Internal Server Error (even with the Stallone sample photo):
imagen

The same error occurs when I upload my own images or using the alternative structure with base64 encoded images. I would appreciate any help for understanding what is going on.

Thank you in advance for this interesting project.

Hi! Unfortunately gender age is not fully supported right now, as it need different face crop preprocessing than recognition step.
Though if you only need gender detection you can set rec_model=arcface_r100_v1 and ga_ignore=False in deploy_trt.sh.
With this settings container will use older recognition model with compatible preprocessing.

Hm... that's strange but it's working with new models too right now. So you only need to set ga_ignore=False

Wow! Thank you for answering so quickly!! :)

You are right, I only had to change this in the deploy_cpu.sh script. At least is working with the Stallone image, I will try with my own images but I think we can close this issue.

Thanks again.

I'm glad I helped you )

Though must admit that insightface gender/age estimation model is not the most accurate.

I have seen presumably better models around GitHub, though they mostly require input image of shape larger than 112x112.
So they'll require either upscaling either cropping larger face crops and downscaling it later for recognition, which will noticably hit performance.

Thank you for the advice. I finished my test with the help of InsightFace-REST. I need to check it but at first sight it seems that the results were pretty good.

I will compare these results with other 4 models before deciding which one works better or if I need to train a model for my project. If you are interested in the results I could e-mail them to you once I finish...