Spaces:
Sleeping
Sleeping
update readme
Browse files- README.md +11 -4
- face_analysis.py +32 -0
- playground.py +2 -1
README.md
CHANGED
|
@@ -11,15 +11,22 @@ license: mit
|
|
| 11 |
short_description: extracts face features, gender, age, landmarks, ...
|
| 12 |
---
|
| 13 |
|
| 14 |
-
## Unofficial FaceAnalysis Implementation
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Acknowledgments
|
| 20 |
|
| 21 |
This work preserves key functionality from the original authors:
|
| 22 |
-
- [
|
| 23 |
|
| 24 |
## Contact
|
| 25 |
|
|
|
|
| 11 |
short_description: extracts face features, gender, age, landmarks, ...
|
| 12 |
---
|
| 13 |
|
| 14 |
+
## Unofficial [FaceAnalysis](https://huggingface.co/spaces/leonelhs/FaceAnalysis) Implementation
|
| 15 |
|
| 16 |
+
FaceAnalysis is the core library used for facial region detection and extraction.
|
| 17 |
+
Future contributors and maintainers should review the official or reference
|
| 18 |
+
implementations for details and updates:
|
| 19 |
+
-[Surce face_analysis.py](https://github.com/deepinsight/insightface/blob/master/python-package/insightface/app/face_analysis.py)
|
| 20 |
+
|
| 21 |
+
The goal of this project is to enable quick integration into other systems
|
| 22 |
+
while minimizing external library dependencies.
|
| 23 |
+
For users who prefer a ready-to-use solution, consider installing the full package:
|
| 24 |
+
pip install insightface
|
| 25 |
|
| 26 |
## Acknowledgments
|
| 27 |
|
| 28 |
This work preserves key functionality from the original authors:
|
| 29 |
+
- [Deepinsight Insightface](https://github.com/deepinsight/insightface)
|
| 30 |
|
| 31 |
## Contact
|
| 32 |
|
face_analysis.py
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# FaceAnalysis is the core library used for facial region detection and extraction.
|
| 2 |
# Future contributors and maintainers should review the official or reference
|
| 3 |
# implementations for details and updates:
|
| 4 |
# https://github.com/deepinsight/insightface/blob/master/python-package/insightface/app/face_analysis.py
|
| 5 |
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Demo: https://huggingface.co/spaces/leonelhs/FaceAnalysis
|
| 7 |
|
| 8 |
|
|
|
|
| 1 |
+
#######################################################################################
|
| 2 |
+
#
|
| 3 |
+
# MIT License
|
| 4 |
+
#
|
| 5 |
+
# Copyright (c) [2025] [leonelhs@gmail.com]
|
| 6 |
+
#
|
| 7 |
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 8 |
+
# of this software and associated documentation files (the "Software"), to deal
|
| 9 |
+
# in the Software without restriction, including without limitation the rights
|
| 10 |
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 11 |
+
# copies of the Software, and to permit persons to whom the Software is
|
| 12 |
+
# furnished to do so, subject to the following conditions:
|
| 13 |
+
#
|
| 14 |
+
# The above copyright notice and this permission notice shall be included in all
|
| 15 |
+
# copies or substantial portions of the Software.
|
| 16 |
+
#
|
| 17 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 18 |
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 19 |
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 20 |
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 21 |
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 22 |
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 23 |
+
# SOFTWARE.
|
| 24 |
+
#
|
| 25 |
+
#
|
| 26 |
+
#######################################################################################
|
| 27 |
+
#
|
| 28 |
# FaceAnalysis is the core library used for facial region detection and extraction.
|
| 29 |
# Future contributors and maintainers should review the official or reference
|
| 30 |
# implementations for details and updates:
|
| 31 |
# https://github.com/deepinsight/insightface/blob/master/python-package/insightface/app/face_analysis.py
|
| 32 |
#
|
| 33 |
+
# The goal of this project is to enable quick integration into other systems
|
| 34 |
+
# while minimizing external library dependencies.
|
| 35 |
+
# For users who prefer a ready-to-use solution, consider installing the full package:
|
| 36 |
+
# pip install insightface
|
| 37 |
+
#
|
| 38 |
# Demo: https://huggingface.co/spaces/leonelhs/FaceAnalysis
|
| 39 |
|
| 40 |
|
playground.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import cv2
|
| 2 |
-
|
|
|
|
| 3 |
from face_analysis import FaceAnalysis
|
| 4 |
|
| 5 |
face_analyser = FaceAnalysis()
|
|
|
|
| 1 |
import cv2
|
| 2 |
+
# install by "pip install insightface"
|
| 3 |
+
#from insightface.app import FaceAnalysis
|
| 4 |
from face_analysis import FaceAnalysis
|
| 5 |
|
| 6 |
face_analyser = FaceAnalysis()
|