A Machine Learning Python library for face recognition.
Project description
pyfacerecall
Installation
pip install pyfacerecall
Generate own face dataset using camera
You can use cli built-in cli tool to generate dataset of your own face using your camera.
python -m pyfacerecall --output person --source 0
How to use?
from pyfacerecall import FaceRecognition
if __name__ == '__main__':
model_path = "model"
image_path = 'test.jpeg'
# if you already have model trained then no need to provide dataset path while initializing class like below
# face_recognition = FaceRecognition(number_of_classes=2)
face_recognition = FaceRecognition("./dataset/training", "./dataset/testing")
face_recognition.training()
face_recognition.save_model(model_path)
# get the model and do something with that
model = face_recognition.load_saved_model(model_path)
# get the model prediction
k, result = face_recognition.model_prediction(image_path, model_path, need_cropping=False)
print(f"detected class is {k} and prediction percentage is {result}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfacerecall-1.0.0.tar.gz
(6.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfacerecall-1.0.0.tar.gz.
File metadata
- Download URL: pyfacerecall-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258fef033b2804f5b5b15f9f2e297935323f35cffe527c90195b0024babbc2ed
|
|
| MD5 |
bb562d37691768a9f1964977d9a12138
|
|
| BLAKE2b-256 |
5ac4be188d10edf0d52447c1546bb5f1cc718e29ad8f560675c468d5f39a8576
|
File details
Details for the file pyfacerecall-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyfacerecall-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffb5ae8aa0140c1529f4a8ebf8c8d687b70517fdfab8750910a9d21d0cde5b6d
|
|
| MD5 |
49de824d541afd631bf41d75ad9d3222
|
|
| BLAKE2b-256 |
02841bc53a59381aec1e2f0cbfccda193cec82643ad172b0106fe43057d6b25b
|