EdgeVision: User Defined Object-Counting using Raspberry Pi

Single Object Detection and Tracking

Image 1: Single Object Detection and Tracking

Description: The image highlights a single individual detected by the system, with bounding boxes indicating precise detection and tracking. The individual is interacting with defined lines for object counting.

Multiple Object Detection and Tracking

Image 2: Multiple Object Detection and Tracking

Description: This image demonstrates the detection of multiple individuals using bounding boxes. The system tracks interactions with multiple lines for real-time counting as the objects approach the lines.

Crossing Lines and Incremental Counting

Image 3: Crossing Lines and Incremental Counting

Description: Captures multiple detected objects crossing predefined lines. The system accurately tracks and increments counts, demonstrating the effectiveness of the object counting mechanism.

Video 1: EdgeVision Demonstration Video

Description: This video demonstrates the power of EdgeVision, highlighting its ability to detect objects in real-time with labeled annotations, even in different lighting conditions. You'll see how dynamic line drawing is used to count people as they cross virtual tripwires, showcasing its impressive tracking capabilities.

EdgeVision is a real-time object detection and counting system developed on a Raspberry Pi 4 with a Camera Module V2. The system uses a Faster R-CNN detector with a ResNet-50 backbone to detect objects in live video and perform inference at the edge rather than sending the video to a remote server.

The system uses a CentroidTracker to maintain object IDs across video frames. Each detected object is represented by the center of its bounding box, and the tracker matches new detections to existing objects based on Euclidean distance between their centroids. This allows the system to maintain object identities as they move through the video.

A key feature of EdgeVision is its user-defined object counting. Users can draw a line directly on the live video feed using the mouse. The system then uses geometric line-crossing logic to determine when a tracked object's centroid crosses the selected line and updates the count accordingly. This allows different counting lines to be defined without changing the underlying code.

The project demonstrates the integration of deep learning-based object detection, real-time video streaming, object tracking, and geometric counting on a resource-constrained embedded platform. It also evaluates detection performance under different lighting conditions, with higher accuracy in bright outdoor scenes than in low-light indoor scenes.