narugo1992 commited on
Commit ·
459f3e7
1
Parent(s): 7e6465f
dev(narugo): use new models for face
Browse files
face.py
CHANGED
|
@@ -9,10 +9,15 @@ from plot import detection_visualize
|
|
| 9 |
from yolo_ import _image_preprocess, _data_postprocess
|
| 10 |
|
| 11 |
_FACE_MODELS = [
|
| 12 |
-
'
|
| 13 |
-
'
|
| 14 |
-
'
|
| 15 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
]
|
| 17 |
_DEFAULT_FACE_MODEL = _FACE_MODELS[0]
|
| 18 |
|
|
@@ -20,8 +25,8 @@ _DEFAULT_FACE_MODEL = _FACE_MODELS[0]
|
|
| 20 |
@lru_cache()
|
| 21 |
def _open_face_detect_model(model_name):
|
| 22 |
return _open_onnx_model(hf_hub_download(
|
| 23 |
-
'deepghs/imgutils-models',
|
| 24 |
-
f'
|
| 25 |
))
|
| 26 |
|
| 27 |
|
|
|
|
| 9 |
from yolo_ import _image_preprocess, _data_postprocess
|
| 10 |
|
| 11 |
_FACE_MODELS = [
|
| 12 |
+
'face_detect_v1.3_s',
|
| 13 |
+
'face_detect_v1.3_n',
|
| 14 |
+
'face_detect_v1.2_s',
|
| 15 |
+
'face_detect_v1.1_s',
|
| 16 |
+
'face_detect_v1.1_n',
|
| 17 |
+
'face_detect_v1_s',
|
| 18 |
+
'face_detect_v1_n',
|
| 19 |
+
'face_detect_v0_s',
|
| 20 |
+
'face_detect_v0_n',
|
| 21 |
]
|
| 22 |
_DEFAULT_FACE_MODEL = _FACE_MODELS[0]
|
| 23 |
|
|
|
|
| 25 |
@lru_cache()
|
| 26 |
def _open_face_detect_model(model_name):
|
| 27 |
return _open_onnx_model(hf_hub_download(
|
| 28 |
+
f'deepghs/imgutils-models',
|
| 29 |
+
f'{model_name}/model.onnx'
|
| 30 |
))
|
| 31 |
|
| 32 |
|