deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
22.61k stars 5.32k forks source link

face detection and face verification inputs #1382

Open marziehoghbaie opened 3 years ago

marziehoghbaie commented 3 years ago

Hi there, I just have a simple question, I like to know that the models inputs are in RGB or BGR??

nttstar commented 3 years ago

RGB in all of our models.

HuichuanLiu commented 3 years ago

https://github.com/deepinsight/insightface/search?q=ins_get_image Does it mean all these callings of ins_get_image(image) are incorrect? As to_rgb is False by default.

offchan42 commented 1 year ago

RGB in all of our models.

Does it mean that we have to convert image from BGR to RGB and feed to FaceAnalysis.get function? https://github.com/deepinsight/insightface/blob/30295de48907e04077d6d22a9a8f580b525822ce/python-package/insightface/app/face_analysis.py#L58-L77

I want to know the input channel order for this specific function.

offchan42 commented 1 year ago

image From experimentation, it seems to me that FaceAnalysis.get() function probably accepts BGR format because I can see the sex and age prediction on this image correctly when I feed BGR format to the function. If I feed RGB format to the function, it predicts female for every face in this specific image. Please confirm that the get() function does indeed accept BGR format as input. Thanks.