deepinsight / deepinsight/insightface

different implementations of face_align.py (mode=arcface) results in different results

Open
#2,400 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

In this repo, there are two implementations of face_align.py

https://github.com/deepinsight/insightface/blob/master/python-package/insightface/utils/face_align.py

https://github.com/deepinsight/insightface/blob/master/web-demos/src_recognition/face_align.py

By modifying this example,
https://github.com/deepinsight/insightface/blob/master/examples/demo_analysis.py
I got the following results using buffalo_l model pack.

det_size was set to 320 in both cases.
and image_size (used in estimate_norm of face_align.py) was set to 112, 224 and 256 respectively.
(after alignment, the results were resized to 256x256 for comparison)

Upper row : the results of python-package face_align.py
Lower row : that of web-demos face_align.py

![arc](https://github.com/deepinsight/insightface/assets/10891291/8f75d5ca-ce6d-4499-b085-ab614e696566)

In mode='arcface'
When image_size was 112 and 224, there were no differences.
However, if 256 is used, face_align.py of python-package yields a different result.

It seems that whether "diff_x" is used or not affects the result.
In 256 case, face_align.py of web-demos has the correct result... right?

In mode='None'
All of the results are same.
![None](https://github.com/deepinsight/insightface/assets/10891291/94a9f2de-6c4a-4d61-a6e1-2f641d1d48a7)

One more question,
In which configuration, recognition Model of antelopev2 and buffalo_l were trained?
I mean the hyperparameters to get the aligned training set (image_size of estimate_norm, det_size .. etc)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.