Views
No views yet
yolov8s and yolov8m variantssurgical mask, cloth maskyolov8s_baseline — chosen for its superior fine-grained localization performance (highest mAP@0.5:0.95)1from ultralytics import YOLO
2from huggingface_hub import snapshot_download
3import os
4
5# Load model from Hugging Face Hub
6repo_id = "JJJHHHH/cloth_surgical_mask_detection_yolov8"
7model_dir = snapshot_download(repo_id)
8model = YOLO(os.path.join(model_dir, "best.pt"))
9
10# Run inference on an image
11results = model("your_image.jpg", conf=0.5, iou=0.6)
12results[0].show()