Does your python file named "openface-real-time" uses single image for each person?
HananAhmadHunain opened this issue · 4 comments
I am not an expert but from the following code what i have concluded is that you can only use 1 image per employee.
As you cannot put multiple images of same person under same name.
I am trying to built a facial recognition system and i can train the person before hand with 50 images.
Kindly tell me about this so i can change code according to my need.
`
#put your employee pictures in this path as name_of_employee.jpg
employee_pictures = "database/"
employees = dict()
for file in listdir(employee_pictures):
employee, extension = file.split(".")
img = preprocess_image('database/%s.jpg' % (employee))
representation = model.predict(img)[0,:]
employees[employee] = representation
print("employee representations retrieved successfully")
`
This is one shot learning example and this is not an issue. All face recognition applications handles this a one shot learning. Otherwise, adding a new person requires to change your model.
hi , thanks alot for your effort ..
i put one picture for all person in database path as name_of_employee.jpg
but every time i run it recognize as unkown
i don't know why .. can you help me ,please ?
Could your share your data set? BTW, are face photos cropped?
thank you very much .. it worked well .. but i want replace webcam into image .. can you help me ,please ?