Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
/ facenet Public archive

A packaged version of David Sandberg's Facenet implementation

Notifications You must be signed in to change notification settings

YaleDHLab/facenet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository has been archived

This project was developed under a previous phase of the Yale Digital Humanities Lab. Now a part of Yale Library’s Computational Methods and Data department, the Lab no longer includes this project in its scope of work. As such, it will receive no further updates.

Facenet

visualization of faces

Crop and vectorize faces from input images. Packaged from David Sandberg's facenet, based on the paper FaceNet (2015).

Installation

pip install yale-dhlab-facenet

Crop Faces

To crop all faces in data/*.jpg, one can run:

from facenet.crop import crop_faces

crop_faces({'input_glob': 'data/*.png'})

Extracted faces will be written to ./cropped

Extract Face Embeddings

To obtain FaceNet embeddings for each face image in a directory, one can run:

from facenet.model import get_embeddings

get_embeddings({'input_glob': 'cropped/data/*.png'})

This process will write create a directory facenet_vectors, and will write one numpy array to that directory for each image in input_glob.

About

A packaged version of David Sandberg's Facenet implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages