![]() Prepare the datasetĬreate 2 directories, train and test. Pick an image for each of the cast from the internet and download it onto our “train” directory. Make sure that the images you’ve selected show the features of the face well enough for the classifier.įor testing the model, let’s take a picture containing all of the cast and place it onto our “test” directory.įor your comfort, we have added training and testing data with the project code. Train the modelįirst import the necessary modules. The face_recognition library contains the implementation of the various utilities that help in the process of face recognition. Now, create 2 lists that store the names of the images (persons) and their respective face encodings. path = "./train/"įace encoding is a vector of values representing the important measurements between distinguishing features of a face like the distance between the eyes, the width of the forehead, etc. We loop through each of the images in our train directory, extract the name of the person in the image, calculate its face encoding vector and store the information in the respective lists. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |