AXERA-TECH / ax-samples

Samples code for world class Artificial Intelligence SoCs for computer vision applications.
BSD 3-Clause "New" or "Revised" License
207 stars 45 forks source link

Facial Recognition with Arcface #58

Closed ltdat1201 closed 1 year ago

ltdat1201 commented 1 year ago

Hello, I'm very interested in your project, I'm also working on implementing facial recognition on some camera chipsets. So, do you have plans to support facial recognition on your chipset? Could you support example to run arcface on AX620A?

ZHEQIUSHUI commented 1 year ago

now face detection model is get ready 👍 ax_scrfd_steps.cc ax_yolov7s_face_steps.cc ax_yolov5s_face_steps.cc

and the arcface model is similar to classification,you can reference the code just like ax_classification_steps.cc to get the face feature

ltdat1201 commented 1 year ago

Hello @ZHEQIUSHUI , Thanks for your support, I am trying to convert the origin onnx arcface models (https://github.com/onnx/models/tree/main/vision/body_analysis/arcface) by Pulsar tool but still not successful yet. Could you help me with the instruction to convert this model to .joint format? My target hardware is AX620A. Thank you so much.

ZHEQIUSHUI commented 1 year ago

you can read the pulsar web docs in here

ltdat1201 commented 1 year ago

Hello @ZHEQIUSHUI , we are following the pulsar document and trying to convert the arcface model. However, we occur this error so could you help me? p/s: we are just newbies in this field. The error picture: image_2022_12_15T09_18_41_441Z this is our configure file: test.prototxt.txt

shitouren1994 commented 1 year ago
  1. you need use onnxsimplfy to simple this model
  2. after simplfy ,if bn layer has a attribute called "spatial"; you need delete it
  3. dropout layer should be deleted

the fixed model is tool big, i cannot upload here.

ltdat1201 commented 1 year ago

Hello @shitouren1994 , I will try following your suggestion. If you can, please give me the fixed model and more email information: ltdat1201@gmail.com Thanks for your support.