mirror of
https://github.com/yakhyo/uniface.git
synced 2025-12-30 09:02:25 +00:00
feat: Add model name signature and several more updates
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -30,14 +30,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import cv2\n",
|
||||
"from PIL import Image\n",
|
||||
"import IPython.display as display\n",
|
||||
"from uniface import RetinaFace, draw_detections"
|
||||
"from uniface import RetinaFace, draw_detections\n",
|
||||
"from uniface.constants import RetinaFaceWeights"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -56,27 +57,29 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2025-03-16 14:32:33,786 - INFO - Initializing RetinaFace with model=retinaface_mnet_v2, conf_thresh=0.5, nms_thresh=0.4, pre_nms_topk=5000, post_nms_topk=750, dynamic_size=False, input_size=(640, 640)\n",
|
||||
"2025-03-16 14:32:33,830 - INFO - Verified model weights located at: C:\\Users\\yakhyo/.uniface/models\\retinaface_mnet_v2.onnx\n",
|
||||
"2025-03-16 14:32:33,926 - INFO - Successfully initialized the model from C:\\Users\\yakhyo/.uniface/models\\retinaface_mnet_v2.onnx\n"
|
||||
"2025-03-26 11:43:28,753 - INFO - Initializing RetinaFace with model=RetinaFaceWeights.MNET_V2, conf_thresh=0.5, nms_thresh=0.4, pre_nms_topk=5000, post_nms_topk=750, dynamic_size=False, input_size=(640, 640)\n",
|
||||
"2025-03-26 11:43:28,753 - INFO - Downloading model 'RetinaFaceWeights.MNET_V2' from https://github.com/yakhyo/uniface/releases/download/v0.1.2/retinaface_mv2.onnx\n",
|
||||
"2025-03-26 11:43:31,322 - INFO - Successfully downloaded 'RetinaFaceWeights.MNET_V2' to C:\\Users\\yakhyo\\.uniface\\models\\RetinaFaceWeights.MNET_V2.onnx\n",
|
||||
"2025-03-26 11:43:31,334 - INFO - Verified model weights located at: C:\\Users\\yakhyo/.uniface/models\\RetinaFaceWeights.MNET_V2.onnx\n",
|
||||
"2025-03-26 11:43:31,393 - INFO - Successfully initialized the model from C:\\Users\\yakhyo/.uniface/models\\RetinaFaceWeights.MNET_V2.onnx\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Initialize the RetinaFace model\n",
|
||||
"uniface_inference = RetinaFace(\n",
|
||||
" model_name=\"retinaface_mnet_v2\", # Model name\n",
|
||||
" conf_thresh=0.5, # Confidence threshold\n",
|
||||
" pre_nms_topk=5000, # Pre-NMS Top-K detections\n",
|
||||
" nms_thresh=0.4, # NMS IoU threshold\n",
|
||||
" post_nms_topk=750 # Post-NMS Top-K detections,\n",
|
||||
" model_name=RetinaFaceWeights.MNET_V2, # Model name\n",
|
||||
" conf_thresh=0.5, # Confidence threshold\n",
|
||||
" pre_nms_topk=5000, # Pre-NMS Top-K detections\n",
|
||||
" nms_thresh=0.4, # NMS IoU threshold\n",
|
||||
" post_nms_topk=750 # Post-NMS Top-K detections,\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
@@ -90,7 +93,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -101,7 +104,7 @@
|
||||
"<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=1024x624>"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -122,7 +125,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -167,7 +170,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -209,7 +212,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -262,7 +265,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "torch",
|
||||
"display_name": "base",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
@@ -276,7 +279,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.9"
|
||||
"version": "3.12.2"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user