dlib icon indicating copy to clipboard operation
dlib copied to clipboard

Improve dlib (dlib_face_recognition_resnet_model_v1) with Asian faces

Open gustavomr opened this issue 8 years ago • 38 comments

Hi,

We saw that dlib has some acurracy problems with asian faces. Could you retrain dlib in order to get better results including this dataset (http://afad-dataset.github.io) ?

Thanks.

gustavomr avatar Jul 11 '18 12:07 gustavomr

Does that dataset include identity information? It looks like it's just age and gender.

davisking avatar Jul 11 '18 13:07 davisking

@davisking what you mean about identity information? I don't understand.

Thanks.

gustavomr avatar Jul 11 '18 13:07 gustavomr

To train a face recognition model you need lots of images of the same person. Like you need "here are 100 images of Davis", then "here are 100 images of John". Not "here are a bunch of images of different people and none of them are the same person".

davisking avatar Jul 11 '18 13:07 davisking

I got it! I think this dataset has a bunch of images of different people. Do you have any plans to get dlib more accurate on asian people?

gustavomr avatar Jul 11 '18 13:07 gustavomr

Only if someone is able to provide me with appropriate training data.

davisking avatar Jul 11 '18 13:07 davisking

How many data do you need (per person and how many person) ? ex: 1000 person and 100 images per person?

gustavomr avatar Jul 11 '18 14:07 gustavomr

It's hard to say, but for sure at least something like 1000 persons and 100 images per person. That would be a minimum. The more the better.

davisking avatar Jul 11 '18 14:07 davisking

I am willing to provide the data because i have around 10k+ unique identities but 10 faces each. Can we just do some kind of image transformation to generate n number of required images using this 10 images. is it sufficient or you need more precise dataset. Thanks.

PawanWagh avatar Jul 11 '18 15:07 PawanWagh

I have already trained model for asian faces with 98.18% accuracy. this is the output after training

saving network
Testing network on imagenet validation dataset...
val top5 accuracy:  1
val top1 accuracy:  0.981811

but not able to use this model. If it succeeds then i am willing the train the dataset with more and more dataset and make it available here. plz see this issue #1368 . if you can help me.

PawanWagh avatar Jul 11 '18 15:07 PawanWagh

Warning: this issue has been inactive for 55 days and will be automatically closed on 2018-09-07 if there is no further activity.

If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.

dlib-issue-bot avatar Sep 04 '18 20:09 dlib-issue-bot

Notice: this issue has been closed because it has been inactive for 58 days. You may reopen this issue if it has been closed in error.

dlib-issue-bot avatar Sep 08 '18 08:09 dlib-issue-bot

@davisking Will this help? https://github.com/deepinsight/insightface/issues/256

helloall1900 avatar Sep 25 '18 08:09 helloall1900

@davisking can you use this dataset do train? deepinsight/insightface#256

http://trillionpairs.deepglint.com/overview

gustavomr avatar Sep 26 '18 13:09 gustavomr

That sounds useful, although the website appears to be down.

davisking avatar Sep 27 '18 23:09 davisking

@davisking the website is slow but it's working. I tested now.

gustavomr avatar Sep 28 '18 13:09 gustavomr

@davisking Hi, could you consider training and evaluate dlib with this dataset? Anyone has tried to do this?

gustavomr avatar Oct 23 '18 23:10 gustavomr

It looks like the same dataset is available here (as "Glint") amongst others:

https://github.com/deepinsight/insightface/wiki/Dataset-Zoo

JamieKitson avatar Oct 29 '18 16:10 JamieKitson

Once you register and login to the trillionpairs website you are directed to download the data from:

https://drive.google.com/drive/folders/1ADcZugpo8Z6o5q1p2tIAibwhsL8DcVwH

JamieKitson avatar Oct 29 '18 16:10 JamieKitson

I downloaded this dataset and it seems pretty nice. Altogether I've got a dataset of 10 million faces now. I'm pretty busy with other things at the moment, but at some point I'll retrain the model and post the results.

davisking avatar Oct 30 '18 02:10 davisking

@davisking Which step(s) (and/or specific models) in the following process will the retraining help with?

face detection -> encoding -> clustering

I realised that I had been using sklearn's DBSCAN and that once I switched to dlib's Chinese whispers algorithm the results were much better, at least for male Asian faces. Results for female Asian faces were still pretty bad.

JamieKitson avatar Nov 03 '18 22:11 JamieKitson