'CompareFace Python SDK
Project description
compreface-sdk-python
https://github.com/exadel-inc/CompreFace Python SDK
according to https://github.com/exadel-inc/CompreFace/blob/master/docs/Rest-API-description.md
Installation
It can be installed through pip:
pip install compreface-sdk-python
Initialization
you need the Compreface application. For more details, please refer to https://github.com/exadel-inc/CompreFace. Then you need to create some service API key from your application
from compare.core.compare_face import CompareFace
from compare.services.recognition_service import AsyncRecognitionService,RecognitionService
from compare.services.detection_service import DetectionService,AsyncDetectionService
from compare.services.verification_service import VerificationService,AsyncVerificationService
DOMAIN: str = 'http://127.0.0.1'
PORT: int = 8000
API_KEY: str = 'your_face_recognition_key'
compare: CompareFace = CompareFace("DOMAIN", PORT)
rec_service: RecognitionService = compare.init_recognition_service('your_face_recognition_service_key')
detect_service: DetectionService = compare.init_detect_service('your_detection_service_key')
verify_service: VerificationService = compare.init_verify_service('your_verification_service_key')
# async service
rec_service: AsyncRecognitionService = compare.init_async_recognition_service('your_face_recognition_service_key')
detect_service: AsyncDetectionService = compare.init_async_detect_service('your_detection_service_key')
verify_service: AsyncVerificationService = compare.init_async_verify_service('your_verification_service_key')
# some example
# Add a Subject
rec_service.add_a_subject("subject_name")
# Rename a Subject
rec_service.rename_a_subject('subject_name', 'new_subject_name')
# Delete a Subject
rec_service.delete_a_subject('subject_name')
# Delete All Subjects
rec_service.delete_all_subjects()
# List Subjects
rv = rec_service.list_all_subjects()
# Add an Example of a Subject
rec_service.add_a_img('subject_name', 'img_path')
# Recognize Faces from a Given Image
rec_service.recognize('img_path')
# List of All Saved Examples of the Subject
rec_service.list_saved_img_subject()
# or
rec_service.list_saved_img_subject(subject='subject_name')
# Delete All Examples of the Subject by Name
rec_service.delete_saved_img_by_subject('subject_name')
# Delete an Example of the Subject by ID
rec_service.delete_a_img('img_id')
# Delete Multiple Examples
rec_service.delete_multiple_img(['img_id1','img_id2'])
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
Built Distribution
File details
Details for the file compreface_sdk_python-1.0.6.tar.gz
.
File metadata
- Download URL: compreface_sdk_python-1.0.6.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 425a8574b6173729e000c84420e9d7ba271afbf22a80cafacb1209b08028d91b |
|
MD5 | 7364021064b97d59494aa2c174d6aa6f |
|
BLAKE2b-256 | 82e8533faf20b276627abc12ab3e86f34fd90b3cb7d2b203608de58ca6d25046 |
File details
Details for the file compreface_sdk_python-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: compreface_sdk_python-1.0.6-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f18e23f9fcd708a4d00723cdade011a264c445382ec3c94496b543d32695fabe |
|
MD5 | 689615b243554a88a1bc417847a217e5 |
|
BLAKE2b-256 | fd565f8fc172b969a9e68f2b0afab3d0240fc1646246af49daf56726dbba9c98 |