JJJHHHH's picture
Update README.md
f976786 verified
metadata
license: apache-2.0
language:
  - en
base_model:
  - Ultralytics/YOLOv8
pipeline_tag: object-detection
tags:
  - medical
  - detection
  - mask
  - surgical
  - cloth
  - cv
  - computerVision

Mask Type Detection – Surgical vs Cloth Mask

This YOLOv8-based object detection model is fine-tuned to detect and classify surgical and cloth masks from images. It is designed for real-time or batch processing in medical and public settings where distinguishing between mask types is relevant for safety monitoring, compliance checks, or health-related research.

Model Overview

  • Base Model: yolov8s and yolov8m variants
  • Classes: surgical mask, cloth mask
  • Final Selected Model: yolov8s_baseline — chosen for its superior fine-grained localization performance (highest [email protected]:0.95)
  • Dataset: 200 manually annotated images (100 per class)
  • Training Environment: Trained on Kaggle using Ultralytics YOLOv8 + Weights & Biases for experiment tracking

Use Cases

  • Mask type monitoring in hospitals, clinics, or public transport
  • Analyzing mask trends in crowds or media footage
  • Assisting AI-driven health surveillance systems

Inference Example

from ultralytics import YOLO
from huggingface_hub import snapshot_download
import os

# Load model from Hugging Face Hub
repo_id = "JJJHHHH/cloth_surgical_mask_detection_yolov8"
model_dir = snapshot_download(repo_id)
model = YOLO(os.path.join(model_dir, "best.pt"))

# Run inference on an image
results = model("your_image.jpg", conf=0.5, iou=0.6)
results[0].show()