Skip to content

A Facial Recognition API built with Google's Facenet model.

License

Notifications You must be signed in to change notification settings

omkarudawant/Face-Verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facial Verification

A facial verification API using FastAPI, with Google's Facenet model for embeddings.

After cloning the project,

  • In case you want to test the API in docker,

    docker build -t YourFavouriteNameForImage . and then to run the image in a container,

    docker run -d --name YourFavouriteNameForContainer -p 80:80 YourFavouriteNameForImage

    After which you can try the API at localhost/docs or 127.0.0.1/docs

  • In case you want try the API without docker,

    • Model is available at Here

    • Install the dependencies with, pip install -r requirements.txt

    • Then switch to app/ directory by cd app/

      • To use the REST API, run the main.py und with uvicorn main:app and goto localhost:8000/docs or 127.0.0.1:8000/docs to try the API.

      • To verify two images from the standalone script,

        python facial_recognition.py --model_path=PATH_TO_MODEL --image_1=PATH_of_first_image --image_2=PATH_of_second_image

      • In case you want to verify with other distance metrics (cosine or euclidean with L2 norm),

        python facial_recognition.py --model_path=PATH_TO_MODEL --image_1=PATH_of_first_image --image_2=PATH_of_second_image --distance_metric="cosine" OR "euclidean_l2"

Learn more about Facenet Here

Learn more about FastAPI Here

Learn more about Docker Here

About

A Facial Recognition API built with Google's Facenet model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published