Skip to main content
YOLOv8 Person Detection System
Computer Vision

YOLOv8 Person Detection System — Case Study

PythonYOLOv8OpenCVUltralyticsMatplotlib

The Challenge

Most object detection requires expensive GPUs. Goal was a person detection system working on standard laptop CPU hardware — no GPU needed — while still being fast enough for practical use.

💡 The Approach

Used YOLOv8n (nano variant) — the smallest, fastest YOLOv8 model. Sacrifices some accuracy for significant speed gains. Optimized confidence threshold through analysis to minimize false positives.

🔄 Step-by-Step Process

01

Selected YOLOv8n pre-trained on COCO dataset — person class already included

02

Ran confidence threshold analysis from 0.1 to 0.9 — found 0.5 as optimal balance

03

Built image detection pipeline with bounding boxes, confidence scores, person count overlay

04

Built video file detection pipeline with per-frame processing and statistics

05

Integrated real-time webcam detection with FPS counter and person count display

06

Built Streamlit dashboard combining all three modes in a clean interface

Final Result

Approximately 6ms per image on CPU. mAP@0.5 of 0.525 on COCO person class benchmark. Works on any standard laptop without a GPU.

📚 Key Lesson

YOLOv8n is underrated. For single-class detection on CPU hardware, the nano model provides excellent practical performance at a fraction of the computational cost of larger variants.