[PYTORCH] Face Recognition using Convnext Model + Flask
πββοΈ πββοΈ π§ π¨βπ¦³
This repository contains Python source code designed for inference tasks related to person identification. During the training process, we utilize a feature extractor to obtain vectors, which are then compared with our database using a webcam.
To provide context, the Triplet loss serves as a significant aspect of Machine Learning. Its objective is to facilitate the learning of an embedding space where similar instances are positioned closer to each other, while dissimilar instances are placed farther apart. This loss function involves triplets of examples: an anchor, a positive example, and a negative example.
The database structure is a list containing many dictionaries, the format is like this:
[
{
"name": person1 name,
"face_feature": face feature person1 embedding
}
]
Currently, I'm storing data using the .pickle file format, but there are concerns about its safety. In the future, I intend to transition to a different file format for storing the database, such as .npz or safetensors. This change aims to enhance the overall trustworthiness of the storage mechanism.
Since the configuration is currently set to run with the defaults specified in both main.yaml and process1.yaml, you have the option to modify the configuration details in order to achieve the optimal experimental outcome.
python src/manipulate_data.py
python src/main.py
I would like to express my gratitude to @ahmedbadr97 for creating the incredible repository conv-facenet, from which most of this code is derived. Thank you very much!