Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the difference between scrfd_10g_bnkps and scrfd_10g_gnkps #130

Open
kurso06 opened this issue Apr 19, 2024 · 7 comments
Open

What is the difference between scrfd_10g_bnkps and scrfd_10g_gnkps #130

kurso06 opened this issue Apr 19, 2024 · 7 comments

Comments

@kurso06
Copy link

kurso06 commented Apr 19, 2024

Hey.
I have analyzed .onnx files of both gnkps and bnkps models for scrfd_10g, and I saw that there are so many differences in architecture of these models.
So what is the DIFFERENCES between gnkps and bnkps. I mean, If I want to create gnkps on my own, how would I do?
For example, I know that one of them is trained with GN(group normalization) and the other one is BN(batch normalization) BUT is that all?

I wonder of why GNKPS is more successful, and the bnkps is not, especially for big faces but small faces too.
Thanks in advance.

@SthPhoenix
Copy link
Owner

SthPhoenix commented Apr 20, 2024

Hi! Yes, all the difference is in GN vs BN, nothing else was changed during training. I've commited GN config to main insightface repo, if I recall correctly, so all the training can be reproduced with original repo.

You can read the discussion on this issue here: deepinsight/insightface#1518

BTW: for now yolov5-face models performs much better in edge cases.

@kurso06
Copy link
Author

kurso06 commented Apr 23, 2024

Thanks for your quick response.
I see your point. Can you just please share --config file of scrfd_10g_gnkps which is .py extended and .pth extended version of scrfd_10g_gnps.onnx file with me please?

I want to run test.py in scrfd/tools/ but as you know it needs --config and --checkpoint file OR perhaps you could suggest another way to run test.py with scrfd_10g_gnkps.

image

@SthPhoenix
Copy link
Owner

Hi! Unfortunately I have lost original pth files with faulty ssd, only ONNX on google drive have left.
Also I recommend using yolov5 models for now, they produce better landmarks, which increase face recognition quality.

@kuanyshbakytuly
Copy link

Hi! Unfortunately I have lost original pth files with faulty ssd, only ONNX on google drive have left. Also I recommend using yolov5 models for now, they produce better landmarks, which increase face recognition quality.

Could you share link to google drive's folder with scrfd models on onnx?

@SthPhoenix
Copy link
Owner

Hi! Unfortunately I have lost original pth files with faulty ssd, only ONNX on google drive have left. Also I recommend using yolov5 models for now, they produce better landmarks, which increase face recognition quality.

Could you share link to google drive's folder with scrfd models on onnx?

https://drive.google.com/drive/folders/109D__GLXHPmiW9tIgsCadTdjcXB0u0vK?usp=drive_link

@kuanyshbakytuly
Copy link

Hi! Unfortunately I have lost original pth files with faulty ssd, only ONNX on google drive have left. Also I recommend using yolov5 models for now, they produce better landmarks, which increase face recognition quality.

Could you share link to google drive's folder with scrfd models on onnx?

https://drive.google.com/drive/folders/109D__GLXHPmiW9tIgsCadTdjcXB0u0vK?usp=drive_link

I have installed scrfd_2.5g_gnkps.onnx from this folder.
I get md5sum a711d520006b358240836689b26ab4b4
But you said that here #100 (comment)
md5sum of scrfd_2.5g_gnkps.onnx is 50febd32caa699ef7a47cf7422c56bbd

And I get error
InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Output Name:score_8

@SthPhoenix
Copy link
Owner

Proper model for scrfd_2.5g_gnkps is scrfd_2.5g_gnkps_v2.onnx it has matching hash.

InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Output Name:score_8

It seems library have tried building TRT engine, but it failed. Try cleaning models/trt-engines/scrfd_2.5g_gnkps/ directory, and than run container again, after downloading proper model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants