facenet-opencv
FaceNet face features using OpenCV
Credits
facenet_opencv_dnn by TanFluent
Why this exists
- The original project need tensorflow installed.
- The method/model need tensorflow 1.x, which is unavailable on python 3.8.
- A package with model in it, without depending tensorflow, is convenient.
How is this done
Download original models
Or
Install Tensorflow environment
python3.6 on linux
pip3 install protobuf==3.19.4 grpcio==1.8.6 tensorflow==1.7
Run the scripts
with some model path fix
python3 convert_variable_to_constant.pypython3 convert_tf_pb_to_cv_pb.py
Be noticed: the package contains the result of model 20180408-102900.
How to use
Install
pip3 install opencv-python
pip3 install mtcnn_opencv
pip3 install facenet_opencv
Code
from facenet_cv2 import FaceNet
model = FaceNet()
vectors = model.face_features(open("x.jpg", "rb").read())
for v in vectors:
print(v)
Metadata
Release files for facenet-opencv 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| facenet_opencv-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for facenet_opencv-0.1.0-py3-none-any.whl |
Release files / facenet_opencv-0.1.0-py3-none-any.whl
| Download URL | facenet_opencv-0.1.0-py3-none-any.whl |
|---|---|
| Size | 87.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17b2f659dddd9ffae20a5c3b15dab2df70e4eafd45d3f46b17bf5ec6682c9849
|
|
BLAKE2b-256 checksum How to use checksums |
0438ebbe08c00acd34632a81ade6f4675220f38446dd04e51f80dc0dd4386e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for facenet-opencv 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.