Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods for model training #7

Closed
timesler opened this issue Jun 13, 2019 · 5 comments
Closed

Add methods for model training #7

timesler opened this issue Jun 13, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@timesler
Copy link
Owner

The repo currently only includes models (MTCNN and InceptionResnetV1). It would be good to add code for updating pretrained models given new data or different training hyperparameters.

@timesler timesler added the enhancement New feature or request label Jun 13, 2019
@timesler timesler self-assigned this Jun 13, 2019
@shaikhaman786vector
Copy link

How to train on my own custom dataset

@timesler
Copy link
Owner Author

timesler commented Sep 10, 2019

@shaikhaman786vector thank you for the prompt, I've been dragging my feet on getting this in the repo. I've just updated the repo and python package to include some utilities for finetuning the models. If you want to train on your own dataset, first update the package to the latest version on PyPI (0.2.2):

pip install --upgrade facenet-pytorch

After running the above command, follow this notebook to finetune a model on your own dataset. Depending on your dataset you may need to alter training parameters (e.g., learning rate, optimizer, weight decay) or data augmentation (e.g., random resizing, random horizontal flip, etc.).

If you get a chance, please let me know if you get the model training well. The finetuning notebook works well for me, but hasn't been tested much.

@shaikhaman786vector
Copy link

it will be good if you upload for triplet loss

@shaikhaman786vector
Copy link

Also if there will be code for recognizing new image, this will be complete flow for face recognition

@timesler
Copy link
Owner Author

@shaikhaman786vector I'm not sure what you mean by "recognizing new image". Do you mean an image for a person that was in the training set (in which case you can just pass the image tensor to the model), or an image of a new person?

There is an example showing how to infer using a trained model in the repo (examples/infer.ipynb).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants