{"id":18000222,"url":"https://github.com/akinduid/face-detection-model-benchmark","last_synced_at":"2026-04-18T01:02:07.251Z","repository":{"id":258589280,"uuid":"872581628","full_name":"AkinduID/Face-Detection-Model-Benchmark","owner":"AkinduID","description":"This repository contains the codebase and documentation for a comparative analysis of various lightweight face detection models optimized for real-time detection on edge devices. The study evaluates the models based on their accuracy, speed, and performance across different poses and environments, using the WIDER FACE dataset.","archived":false,"fork":false,"pushed_at":"2025-05-18T17:31:08.000Z","size":29931,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T11:05:49.560Z","etag":null,"topics":["benchmark","computer-vision","face-detection","mediapipe","mobilenet-ssd","opencv","python","tensorflow","yolov8n"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AkinduID.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-14T17:30:05.000Z","updated_at":"2025-05-18T17:31:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b7b159d-4a9a-40a9-bbb6-652a39a13210","html_url":"https://github.com/AkinduID/Face-Detection-Model-Benchmark","commit_stats":null,"previous_names":["akinduid/face-detection-model-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AkinduID/Face-Detection-Model-Benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FFace-Detection-Model-Benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FFace-Detection-Model-Benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FFace-Detection-Model-Benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FFace-Detection-Model-Benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AkinduID","download_url":"https://codeload.github.com/AkinduID/Face-Detection-Model-Benchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkinduID%2FFace-Detection-Model-Benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","computer-vision","face-detection","mediapipe","mobilenet-ssd","opencv","python","tensorflow","yolov8n"],"created_at":"2024-10-29T23:10:34.844Z","updated_at":"2026-04-18T01:02:02.232Z","avatar_url":"https://github.com/AkinduID.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comparative Analysis of Lightweight Face Detection Models for Edge Devices\n\u003ca href=\"https://www.python.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-3776AB?style=flat\u0026logo=python\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opencv.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/OpenCV-5C3EE8?style=flat\u0026logo=opencv\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://mediapipe.dev/\"\u003e\u003cimg src=\"https://img.shields.io/badge/MediaPipe-2196F3?style=flat\u0026logo=google\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://matplotlib.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Matplotlib-11557C?style=flat\u0026logo=python\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\nThis repository contains the codebase and documentation for a comparative analysis of various lightweight face detection models optimized for real-time detection on edge devices. The study evaluates the models based on their accuracy, speed, and performance across different poses and environments, using the WIDER FACE dataset.\n\n## Overview\nFace detection is a fundamental task in computer vision, with applications in security, robotics, and human-computer interaction. Deploying these solutions on edge devices requires models that are both efficient and accurate. This project investigates and benchmarks several lightweight face detection models to determine the best options for such constrained environments.\n\n### Models Evaluated\nThe following models are included in this benchmark:\n\n* __Haar Cascade__ - A classic machine learning-based approach using handcrafted features. Although lightweight, it struggles with pose variations and complex lighting.\n\n* __MediaPipe BlazeFace__ - An SSD-based model optimized for mobile and edge devices, trained specifically on selfie images for fast and accurate detection.\n\n* __MediaPipe Holistic__ - A comprehensive solution integrating facial landmarks, pose estimation, and hand tracking, offering more context but at a higher computational cost.\n\n* __MobileNet SSD__ - A deep learning model leveraging depthwise separable convolutions for efficient detection on mobile platforms.\n\n* __YOLOv8 Nano__ - A compact version of the YOLO framework designed for real-time, high-accuracy detection on resource-constrained devices.\n\n### Dataset\nThe evaluation uses the WIDER FACE validation subset, consisting of 3,226 images with faces in varied poses, lighting, and environments. This dataset provides a diverse range of conditions for testing model robustness and performance.\nhttp://shuoyang1213.me/WIDERFACE/\n\n### Metrics\nThe models are evaluated based on the following metrics:\n\n* __Average IoU (Intersection over Union)__: Measures the accuracy of the detected bounding box compared to the ground truth.\n\n* __Mean Average Precision (mAP)__: Assesses detection accuracy across different IoU thresholds (0.5, 0.75, etc.).\n\n* __Average Inference Time__: The time taken for each model to process an image and output results, crucial for determining suitability for real-time applications.\n\n## Installation\nTo set up the environment and run the code, follow these steps:\nClone the repository\n```bash\ngit clone https://github.com/AkinduID/Face-Detection-Model-Benchmark.git\n```\nNavigate to the project directory\n```bash\ncd Face-Detection-Model-Benchmark\n```\nInstall the required dependencies\n```bash\npip install -r requirements.txt\n```\nDownload the validation data set from the website mentioned under the Dataset section and place it in the *dataset* folder\n```\n+-- dataset\n|   +-- WIDER_val\n|   +-- wider_face_split\n```\n\nTo evaluate the models, run the following command\n```bash\npython main.py\n```\n## Results\nThe results of the face detection model comparison are stored in the *results* folder. The key findings are summarized in the following comparison graphs generated using Matplotlib\n* Average IoU vs Model\n* Average Inference Time vs Model\n* Average Mean Precision vs Model\n\u003cdiv class=\"image-container\"\u003e\n  \u003cimg src=\"https://github.com/AkinduID/Face-Detection-Model-Benchmark/blob/main/results/Average%20IOU_comparison_plot.png\" width=\"300\" alt=\"Avg IoU\" /\u003e\n  \u003cimg src=\"https://github.com/AkinduID/Face-Detection-Model-Benchmark/blob/main/results/Average%20inference%20time_comparison_plot.png\" width=\"300\" alt=\"Avg Inference Time\" /\u003e\n  \u003cimg src=\"https://github.com/AkinduID/Face-Detection-Model-Benchmark/blob/main/results/Mean%20Average%20Precision_comparison_plot.png\" width=\"300\" alt=\"Mean Avg Precision\" /\u003e\n\u003c/div\u003e\n\nCurrent result are achieved on a laptop with the follwing specifications:\n* Processor - Intel i5-1135G7\n* RAM - 8GB\n* GPU - Intel Iris Xe 4GB\n* Operating System - Windows 11\n\nTotal execution for the main script took 45 Minutes.\n\n## Contributing\nContributions are welcome! If you would like to add new models or improve the existing evaluation metrics, feel free to fork this repository and submit a pull request.\n\n## Future Work\n* __Model Expansion__: Incorporate additional face detection models to broaden the comparative analysis.\n* __Metric Enrichment__: Introduce further evaluation metrics, such as F1 score and confusion matrix, for a more comprehensive assessment.\n* __Dataset Optimization__: Explore techniques to reduce the dataset size while preserving its diversity, thereby improving computational efficiency.\n* __User Experience Enhancement__: Enhance the user-friendliness of the main program for easier operation and accessibility.\n* __Platform Testing__: Extend testing to include more platforms, such as high-end PCs and resource-constrained devices like Raspberry Pi, to understand the models' performance in various environments.\n* __Hardware Resource Monitoring__: Evaluate the usage of hardware resources (RAM, GPU, processor) for each model to provide insights into their computational efficiency and suitability for different devices\n\n## References\nThis codebase is built upon the initial work from the following repository:\nModifications were made to adapt the code for the specific needs of this project,including the selection of evaluated models, evaluation metrics, and output formatting.\nhttps://github.com/nodefluxio/face-detector-benchmark\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakinduid%2Fface-detection-model-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakinduid%2Fface-detection-model-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakinduid%2Fface-detection-model-benchmark/lists"}