Y O L Ov8 Face Detection
arnabdharIntroduction
The YOLOv8-Face-Detection model is designed for detecting human faces in images. It has been fine-tuned on a dataset of over 10,000 images specifically containing human faces. The model can be used for both face detection and face recognition tasks.
Architecture
The model utilizes the YOLOv8 architecture, which is optimized for object detection tasks. It is implemented using the Ultralytics library and trained with PyTorch for efficient model fine-tuning and inference.
Training
The model was fine-tuned for 100 epochs with a batch size of 16 using a single NVIDIA V100 16GB GPU. The fine-tuning process took approximately 140 minutes. The dataset used for training was sourced from the Roboflow Universe, specifically the WIDER FACE dataset.
Guide: Running Locally
To run the YOLOv8-Face-Detection model locally, follow these steps:
-
Install Required Libraries:
pip install ultralytics supervision pillow
-
Download the Model: Use the Hugging Face Hub to download the model:
from huggingface_hub import hf_hub_download model_path = hf_hub_download(repo_id="arnabdhar/YOLOv8-Face-Detection", filename="model.pt")
-
Load the Model:
from ultralytics import YOLO model = YOLO(model_path)
-
Perform Inference:
from PIL import Image from supervision import Detections image_path = "/path/to/image" output = model(Image.open(image_path)) results = Detections.from_ultralytics(output[0])
For optimal performance, consider using a cloud GPU, such as those available from AWS or Google Cloud, particularly if large-scale inference or further training is required.
License
The YOLOv8-Face-Detection model is licensed under the AGPL-3.0 license. This means any derivative work must also be open-sourced under the same license, ensuring that improvements and modifications remain accessible to the community.