Arcface Model Conversion
BasharMahasen opened this issue · 0 comments
BasharMahasen commented
Hello @ltdat1201, @shitouren1994 ,
we are trying to convert Arcface ONNX to joint format to use it on AX620 chip. The conversion for both w600k_R50 & w600k_mbf were successful, however, the cosine on test (pulsar run ...onnx ... joint) is always ZERO. I attached the configurations, and the logs for one trials to narrow it down and solve the issue. I appreicate if you could:
- Advise if prototxt file is correct for Arcface mbf.?
- As output_config shows, joint model applies permutation on the input (NHWC -> NCHW). does this mean that "pulsar run" of "onnx and joint" can't be done for the same input (to test similarity). For this I manually tried to feed each model a separate npy which matches the input, then manually compute cosine, but still the result is close to zero.
- Any suggestions / hints that may help solving this issue?
Attached configs for your reference:
-
The calibration dataset is float32 arranged in NHWC / RGB as per the onnx model format.
-
Arcface models:
pip install insightface
from insightface.app import FaceAnalysis
app = FaceAnalysis('buffalo_sc') # downloads w600_mbf.onnx
app = FaceAnalysis('buffalo_l') # downloads w600k_r50.onnx