Facenet: Please help me

Created on 5 Jun 2017  路  9Comments  路  Source: davidsandberg/facenet

my dataset structure is just like this:
0000045 %folder name
001.jpg
002.jpg
0000056 %folder name
001.jpg
002.jpg
003.jpg
..............

is my dataset structure right?

if my dataset structure is right,then
the dataset do not contains lables, what i mean is dataset do not contain the picture is which person,or the person's name

then how did the code to face recognition?
on my dataset,the accuracy is 0.98 after 80 epoch

i try to understand the code what 'lables' mean in tran_softmax.py but failed
i am a new beginer about python and tensorflow
i hope to get some help,pls

Most helpful comment

I guess the labels are just the person name or class name, in your case for example "0000045" would be a label.
About your dataset structure as far as I have noticed (I also use Casia to train) the structure as is doesn't form a problem ( @davidsandberg did you change the naming of the casia dataset before training?), if you want "real" names for the classes you could always write a script that generates random names and rename the directories. But as you get an accuracy of 98% I wouldn't worry as that is the same as the pre trained model on Casia gives.
The naming will be important if you want a classifier like on the wiki here, than the names will matter, cause that is how the classifier will put a name on a given face.

All 9 comments

You should check out the wiki here you can find nearly all the info you need

@MaartenBloemen
thanks for your reply,
i have check out the wiki before,
about the dataset structure,wiki says"It is assumed that the training dataset is arranged as below, i.e. where each class is a sub-directory containing the training examples belonging to that class."
the casia dataset i downloaded is just like what i say,each folder name is just a string of numbers and each picture name is a string of numbers,too.
i am puzzled about if my dataset structure is right ,beacuse i don't know person's name in each folder

besides,as a new beginner,i think face recognition is using deep nerword to compare the person'name in test data with the name get by deep network,but i didn't see the lables in train data,but in train_softmax.py i see variable labels,but i cann't understand what the labels mean
i am puzzled about how did the code do face recognition with don't konw the person name in train data

although your answer dose not solve my problem ,thank you all the same

I guess the labels are just the person name or class name, in your case for example "0000045" would be a label.
About your dataset structure as far as I have noticed (I also use Casia to train) the structure as is doesn't form a problem ( @davidsandberg did you change the naming of the casia dataset before training?), if you want "real" names for the classes you could always write a script that generates random names and rename the directories. But as you get an accuracy of 98% I wouldn't worry as that is the same as the pre trained model on Casia gives.
The naming will be important if you want a classifier like on the wiki here, than the names will matter, cause that is how the classifier will put a name on a given face.

@MaartenBloemen
Thanks couldn't have wished for a better answer!
your answer really help me!!
now i have a new question,
in https://bloemenmaarten.be/ the logo should be
Maarten Bloemen
Student software development right?
it seems like the 'developent' should be a mistake
thanks for your reply!!!

@thisfineday So a small edit on what the labels are, in facenet.py the labels are returned so I did a print on labels_flat and this is an example output "[0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]" and all this is is a list representation of the the number of images in a directory. So dir "0" has 3 images, dir "1" has 13 images and so on. But how this further translates in how the code handles this I don't that either but I wouldn't worry to much about it.
Your accuracy after training shows the training went well! :)

@thisfineday Thanks for pointing that out! Thats a typo indeed and I never even noticed that LOL.

@MaartenBloemen
thanks!!!!!!!!

image
For future eyeballs: Something like the set shown here (names obscured to protect our clients) for people who work visually

@twobob
thanks for your reply!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mayank26saxena picture mayank26saxena  路  4Comments

scotthong picture scotthong  路  3Comments

Leedonggeon picture Leedonggeon  路  3Comments

arunxz98 picture arunxz98  路  3Comments

MaartenBloemen picture MaartenBloemen  路  3Comments