Facenet: what the steps to run the code?

Created on 26 Apr 2017  ·  15Comments  ·  Source: davidsandberg/facenet

don't know how to run the program,without "readme" l can't understand which to run first and which later.hope somebody can show me!!!

Most helpful comment

I think you have to understand the goal of the facenet. If you have own face database and you want to search a given face in that, you should make a classifier. But there is a distinction between training a facenet model for feature representation and training a model for classifying people with the facenet pre-trained model.
So, for a classifier, first you load the pre-trained model, put your own database as input of this model, the output are the representations, 128-dimensions, corresponding each images in database. After that, you can use some classifier algorithms: SVM, k-NN, small neural network,...
and save it for prediction later.
You should read the paper and source code for more details before apply it.

All 15 comments

pls check wiki page

???Excuse me,can u pls give me a hint or a website link? Still have no clue what to check @ShownX Thank u!

@anhhoangta Thank you so much .I still dont know how to run it by this "readme".Can anyone give me an in-detail explanation or a demo pls???Thank you!!!

So, what do you want to do? Compare two or more images? Search a face in many faces?

Hi ,you should read wiki (https://github.com/davidsandberg/facenet/wiki )and need to read the code what you want to do.

Search a face in many faces!First,pre-train,then choose a photo for test, so l can get a photo as same as the input and recognize who it is. How should l do ???

I think you have to understand the goal of the facenet. If you have own face database and you want to search a given face in that, you should make a classifier. But there is a distinction between training a facenet model for feature representation and training a model for classifying people with the facenet pre-trained model.
So, for a classifier, first you load the pre-trained model, put your own database as input of this model, the output are the representations, 128-dimensions, corresponding each images in database. After that, you can use some classifier algorithms: SVM, k-NN, small neural network,...
and save it for prediction later.
You should read the paper and source code for more details before apply it.

@anhhoangta Sorry,I cant undertstand it very well so far,but l really need to run it successfully right now.There are so many folders that I really dont know the specific steps.Can you pls tell me the detailed steps to run it successfully or give me a demo video?thx!!!

@XhedvaH if you need it right now, I think you should use openface: http://cmusatyalab.github.io/openface/
You can make your own classifier easily rely on their demo, very clearly!

Gone through whole read me and wiki still not able to run the code. Please give me steps how to run your code...
Thank you in advance.

I am having isue in download_and_extract

please guide me

Hey Musawar71. I get really frustrated with some of this stuff. This is the second thing I've looked it for AI on github and it's never obious what to do. A simple explanation would be useful but for some reason these very intelligent people like to make us mere mortals work hard for the information. Anyway, after a while I worked out you can do stuff like:

python src/compare.py data/20180402-114759/ ./data/images/Anthony_Hopkins_0001.jpg ./data/lfw/Aaron_Peirsol/Aaron_Peirsol_0002.jpg

this gives an output like:

Distance matrix
0 1
0 0.0000 1.4831
1 1.4831 0.0000

but if you compare:

python src/compare.py data/20180402-114759/ ./data/images/Anthony_Hopkins_0001.jpg ./data/images/Anthony_Hopkins_0002.jpg

you get:
Distance matrix
0 1
0 0.0000 0.8396
1 0.8396 0.0000

and

python src/compare.py data/20180402-114759/ ./data/images/Anthony_Hopkins_0001.jpg ./data/images/Anthony_Hopkins_0001.jpg

you get

Distance matrix
0 1
0 0.0000 0.0000
1 0.0000 0.0000

So I'd conclude the the lower the numbers the more chance of a match.

If people want others to take up their work and try and integrate it into apps/products more comprehensive usage information is required.

We can't all magically guess what to do.

P.S I should have said, 1st thing I did was to run:

python test/train_test.py

in the facenet directory.

Also, when I set up the environment I had to use bazel 10.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kuaikuaikim picture kuaikuaikim  ·  3Comments

haochange picture haochange  ·  3Comments

allahbaksh picture allahbaksh  ·  3Comments

billtiger picture billtiger  ·  3Comments

ouyangbei picture ouyangbei  ·  4Comments