NavinKumarMNK / Face-Recognition-From-Crowd

Face Recognition from Crowd by using yolov7 .Extracting the faces from a video/image/live source, which is then passed to the custom facenet network in order to recognize the peoples
9 stars 1 forks source link

How to train with my own images #1

Closed alfarqinuwab closed 1 year ago

alfarqinuwab commented 1 year ago

can you please guide me with a script that i can train with my own faces dataset,,and in the code you didn't compared between the captured images with the one stored in the database

NavinKumarMNK commented 1 year ago

Actually after generating, instead comparing the embedding generated, we use Contrastive loss trained classifier to recognize the face, There is two method, while data_handle being on u can add the folders containing the images to produce the embedding and train the classifier alone automatically. If you have to train and optimize the model completely for your organization use, scripts/FaceRecognition.py/ Trainer() class , by commenting the predictor.

The project is still in development, there is lot of bugs and workings need to be fixed and documentation to be done. will make it asap

alfarqinuwab commented 1 year ago

Thank you for your quick response bro, actually, I am working on a project for my thesis and I came across the need to integrate facenet with my modified yolov7 and have found your codes.... So I am trying to integrate your codes with yolov7 to make a proof of concept face recognition...can you please share a little bit more detail on how to do it

From: legacy.mnk @.> Sent: Tuesday, April 4, 2023 2:14 PM To: NavinKumarMNK/Face-Recognition-From-Crowd @.> Cc: Farooq Abdulaziz @.>; Author @.> Subject: Re: [NavinKumarMNK/Face-Recognition-From-Crowd] How to train with my own images (Issue #1)

Actually after generating, rather than comparing the embedding generated, we use Contrastive loss trained classifier to recognize the face, There is two method, while data_handle being on u can add the folders containing the images to produce the embedding and train the classifier alone automatically. If you have to train and optimize the model completely for your organization use, scripts/FaceRecognition.py/ Trainer() class , by commenting the predictor.

The project is still in development, there is lot of bugs and workings need to be fixed and documentation to be done. will make it asap

- Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNavinKumarMNK%2FFace-Recognition-From-Crowd%2Fissues%2F1%23issuecomment-1495785336&data=05%7C01%7C%7C88d40f826a3545b199ce08db34fdb15a%7C9d7e041deaa04b3fbad8f434656357d1%7C0%7C0%7C638162036438035366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BrgRxFoI1ncGAYZsJImmeLmAOmgyUS4SDEKk2Fy92fw%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXB33JQOGFDS5WV6COD4YATW7P67PANCNFSM6AAAAAAWSPC6PA&data=05%7C01%7C%7C88d40f826a3545b199ce08db34fdb15a%7C9d7e041deaa04b3fbad8f434656357d1%7C0%7C0%7C638162036438035366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=K2Z3VAlQZvi%2FMBIqW%2FAoLpPA3Q15OHywgAnQ1JZckUw%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.**@.>>


Farooq Abdulaziz Head of the Information Systems and Applications Section Information Technology Department Council of Representatives Phone: (+973) 17748779 Fax: (+973) 17748789 PO Box: E Mail: @.*** | Web: https://www.nuwab.bh [https://www.nuwab.bh/wp-content/email/nuwab.png]http://www.nuwab.bh [2030] [iso] [https://www.nuwab.bh/wp-content/email/instag.jpg]https://instagram.com/bhparliament [https://www.nuwab.bh/wp-content/email/Youtube.jpg] http://www.youtube.com/bhparliament [https://www.nuwab.bh/wp-content/email/twitter.jpg] https://twitter.com/bhparliament [https://www.nuwab.bh/wp-content/email/facebook.png] https://www.facebook.com/bhparliament

NavinKumarMNK commented 1 year ago

Thank you for your quick response bro, actually, I am working on a project for my thesis and I came across the need to integrate facenet with my modified yolov7 and have found your codes.... So I am trying to integrate your codes with yolov7 to make a proof of concept face recognition...can you please share a little bit more detail on how to do it From: legacy.mnk @.> Sent: Tuesday, April 4, 2023 2:14 PM To: NavinKumarMNK/Face-Recognition-From-Crowd @.> Cc: Farooq Abdulaziz @.>; Author @.> Subject: Re: [NavinKumarMNK/Face-Recognition-From-Crowd] How to train with my own images (Issue #1) Actually after generating, rather than comparing the embedding generated, we use Contrastive loss trained classifier to recognize the face, There is two method, while data_handle being on u can add the folders containing the images to produce the embedding and train the classifier alone automatically. If you have to train and optimize the model completely for your organization use, scripts/FaceRecognition.py/ Trainer() class , by commenting the predictor. The project is still in development, there is lot of bugs and workings need to be fixed and documentation to be done. will make it asap - Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNavinKumarMNK%2FFace-Recognition-From-Crowd%2Fissues%2F1%23issuecomment-1495785336&data=05%7C01%7C%7C88d40f826a3545b199ce08db34fdb15a%7C9d7e041deaa04b3fbad8f434656357d1%7C0%7C0%7C638162036438035366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BrgRxFoI1ncGAYZsJImmeLmAOmgyUS4SDEKk2Fy92fw%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXB33JQOGFDS5WV6COD4YATW7P67PANCNFSM6AAAAAAWSPC6PA&data=05%7C01%7C%7C88d40f826a3545b199ce08db34fdb15a%7C9d7e041deaa04b3fbad8f434656357d1%7C0%7C0%7C638162036438035366%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=K2Z3VAlQZvi%2FMBIqW%2FAoLpPA3Q15OHywgAnQ1JZckUw%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.**@.>> ____ Farooq Abdulaziz Head of the Information Systems and Applications Section Information Technology Department Council of Representatives Phone: (+973) 17748779 Fax: (+973) 17748789 PO Box: E Mail: @.*** | Web: https://www.nuwab.bh [https://www.nuwab.bh/wp-content/email/nuwab.png]<http://www.nuwab.bh> [2030] [iso] [https://www.nuwab.bh/wp-content/email/instag.jpg]<https://instagram.com/bhparliament> [https://www.nuwab.bh/wp-content/email/Youtube.jpg] http://www.youtube.com/bhparliament [https://www.nuwab.bh/wp-content/email/twitter.jpg] https://twitter.com/bhparliament [https://www.nuwab.bh/wp-content/email/facebook.png] https://www.facebook.com/bhparliament

The logic is still in dev, i need to check on the large sets of faces. Until that i cant help with the logic. Regarding the code, u start the database handle.py which starts monitoring the database/faces folder... its like an endpoint where in live u can monitor adding the faces ... u need to create a folder of u r name/label put u r images from all sides and orientation and once it automatically added.. the embedding are generated and the classifier is trained.

If u need to pretrain u can do it by using the face_recognition function Btw it already uses Yolov7 for detecting the faces

NavinKumarMNK commented 1 year ago

As the project is incomplete and need to be tested. It will take time to fix all the errors. Actually Face Recognition Model not classifying the faces. Will fix the bugs after this month. And then will add the repo and documentation.