Spaces:
Sleeping
Sleeping
hoda.fakhar commited on
Commit ·
bb776bc
1
Parent(s): 779b029
feat: enable retinaface detector, download retinaface.h5 from HF Hub during build
Browse files- app/utils/ml_engine.py +1 -1
- scripts/build_models.py +1 -0
app/utils/ml_engine.py
CHANGED
|
@@ -8,7 +8,7 @@ import time
|
|
| 8 |
logger = logging.getLogger(__name__)
|
| 9 |
|
| 10 |
class FaceAnalyzer:
|
| 11 |
-
def __init__(self, detector_backend='
|
| 12 |
"""
|
| 13 |
Face recognition and analysis engine using DeepFace.
|
| 14 |
'opencv' is used for lightweight deployment (avoids OOM on HF Spaces).
|
|
|
|
| 8 |
logger = logging.getLogger(__name__)
|
| 9 |
|
| 10 |
class FaceAnalyzer:
|
| 11 |
+
def __init__(self, detector_backend='retinaface'):
|
| 12 |
"""
|
| 13 |
Face recognition and analysis engine using DeepFace.
|
| 14 |
'opencv' is used for lightweight deployment (avoids OOM on HF Spaces).
|
scripts/build_models.py
CHANGED
|
@@ -17,6 +17,7 @@ MODEL_FILES = [
|
|
| 17 |
"gender_model_weights.h5",
|
| 18 |
"facial_expression_model_weights.h5",
|
| 19 |
"race_model_single_batch.h5",
|
|
|
|
| 20 |
]
|
| 21 |
|
| 22 |
|
|
|
|
| 17 |
"gender_model_weights.h5",
|
| 18 |
"facial_expression_model_weights.h5",
|
| 19 |
"race_model_single_batch.h5",
|
| 20 |
+
"retinaface.h5",
|
| 21 |
]
|
| 22 |
|
| 23 |
|