ogulcanaydogan's picture
Upload folder using huggingface_hub
cf0a3ef verified

A newer version of the Gradio SDK is available: 6.13.0

Upgrade
metadata
title: CCTV Customer Analytics
emoji: πŸ“Š
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 5.12.0
app_file: app.py
pinned: true
license: mit
tags:
  - object-detection
  - tracking
  - yolov8
  - rt-detr
  - computer-vision
  - analytics
  - bytetrack
  - supervision
  - retail-analytics
  - people-counting
short_description: Object detection, tracking & counting for CCTV

CCTV Customer Analytics

YOLOv8 RT-DETR ByteTrack Supervision

Real-time object detection, multi-object tracking, and line crossing counting for CCTV analytics applications. Upload a video to detect, track, and count objects (people, vehicles, etc.) crossing a configurable line.

Features

Detection Models

Model Speed Accuracy Best For
YOLOv8n Very Fast Good Real-time, edge devices
YOLOv8s Fast Better Balanced performance
YOLOv8m Medium High Higher accuracy needs
RT-DETR-l Medium High Dense/crowded scenes

Tracking

  • ByteTrack: State-of-the-art multi-object tracking with high accuracy
  • BoT-SORT: Alternative tracker for comparison

Analytics

  • Line Crossing Detection: Count objects entering/exiting across a configurable line
  • Per-Class Statistics: Separate counts for each object type (person, car, truck, etc.)
  • Movement Traces: Visualize object trajectories over time

Use Cases

Retail Analytics

  • Customer foot traffic counting
  • Store entrance/exit monitoring
  • Peak hours analysis
  • Conversion rate calculation

Traffic Monitoring

  • Vehicle counting at intersections
  • Pedestrian flow analysis
  • Traffic pattern recognition

Security & Surveillance

  • Entrance monitoring
  • Occupancy tracking
  • Perimeter breach detection

Technical Details

Architecture

Video Input β†’ YOLOv8/RT-DETR Detection β†’ ByteTrack MOT β†’ Line Crossing Counter β†’ Annotated Output

Supported Object Classes

The system can detect and track 80 COCO classes including:

  • People: person
  • Vehicles: car, motorcycle, bus, truck, bicycle
  • Animals: dog, cat, horse, sheep, cow
  • And many more...

Configuration Options

  • Detection Confidence: Adjust sensitivity (0.1 - 0.9)
  • IOU Threshold: Non-max suppression threshold
  • Track Buffer: Frames to keep lost tracks alive
  • Class Filter: Focus on specific object types
  • Line Position: Adjustable counting line

Example Results

Scenario Objects Tracked Accuracy
Retail Entrance People ~95%
Street Traffic Vehicles + Pedestrians ~92%
Parking Lot Vehicles ~94%

References

  • YOLOv8 - Ultralytics Object Detection
  • RT-DETR - Real-Time Detection Transformer
  • ByteTrack - Simple and Effective Multi-Object Tracking
  • Supervision - Computer Vision Tools by Roboflow

Author

Ogulcan Aydogan

License

MIT License - Feel free to use for commercial and non-commercial purposes.