Post

Privacy-First Visitor Counter using Sony IMX500 & Raspberry Pi AI Camera

Designing a GDPR-compliant footfall counter for Center Rog using on-sensor neural network inference on the Sony IMX500 vision sensor.

Tracking footfall and occupancy in public cultural spaces like Center Rog in Ljubljana is essential for operational insights, but traditional video monitoring introduces severe privacy concerns and complex GDPR compliance hurdles.

To solve this, I designed and built an edge-AI visitor counter using the Raspberry Pi AI Camera, powered by the Sony IMX500 intelligent vision sensor connected to a Raspberry Pi SBC.

Why the Sony IMX500?

Traditional vision systems capture video streams, compress them, and transmit frames to a central GPU server for object detection. This architecture creates privacy risks, bandwidth bottlenecks, and single points of failure.

The Sony IMX500 flips this model on its head by integrating a dedicated DSP neural network accelerator directly onto the CMOS image sensor die.

[Lens] --> [CMOS Sensor + On-Chip Tensor Processor (IMX500)] --> [Metadata Only (Counts/Bounding Boxes)] --> [Raspberry Pi SBC]

Key Technical Advantages:

  • Privacy-by-Design (GDPR Compliant): No raw images or video streams ever leave the sensor die. Only lightweight telemetry metadata (bounding boxes, object classifications, and cross-line directional counts) is output over the CSI bus.
  • Zero Video Storage: Neither the Raspberry Pi nor any downstream database ever handles identifiable facial features or video streams.
  • Low Latency & Low Bandwidth: Running object detection models directly on the sensor frees up the host Raspberry Pi SBC CPU completely, reducing power consumption and thermal load.

System Architecture

  1. Hardware:
    • Sony IMX500 (Raspberry Pi AI Camera module) mounted at strategic entry/exit thresholds.
    • Raspberry Pi SBC handling local telemetry parsing and logging.
  2. Software Stack:
    • Custom lightweight daemon reading IMX500 tensor metadata via MobileNet / Person Detection model outputs.
    • Virtual line-crossing algorithm tracking entering vs. exiting visitors.
    • Local database and API endpoint serving real-time occupancy metrics for lab management and public dashboards.

This approach provides Center Rog with accurate, real-time footfall metrics while guaranteeing zero privacy intrusion for visitors.

This post is licensed under CC BY 4.0 by the author.