People counter on a Raspberry Pi

Count people from a camera on a single-board computer without sending video, sending only the count.

IntermediateComputer vision

Educational draft content that needs expert review before it is used as an academic reference. Specifications, versions and licences change; check the official source. No experimental result is shown here unless it was actually run.

You run a person detector on a Raspberry Pi and count passers-by at a virtual line, sending only the number. The project illustrates data minimisation.

Hardware

  • Raspberry Pi 5
  • Raspberry Pi camera

Software

  • ONNX Runtime
  • LiteRT (formerly TensorFlow Lite)
  • Python

Architecture

Camera → person detector → simple tracking → count crossings at a line → send the count every minute.

Suggested datasets (check their licences)

  • COCO (person class)
  • Clips you record with permission

Implementation steps

  1. Install the system and libraries
  2. Run the detector and measure FPS
  3. Implement simple centre-based tracking
  4. Count crossings in both directions
  5. Send only the count

Expected deliverables

A service that logs the numbers of people entering and leaving without saving video.

Evaluation metrics

  • Counting error compared with a manual count
  • FPS
  • Power consumption

Limits

  • Crowding and occlusion reduce accuracy
  • Surveillance laws differ between countries

Ideas to extend

  • Use an accelerator
  • Identify peak time slots

Filming in public places is subject to laws and privacy policies; do not keep the video and announce the camera.

Image and audio processing in the experiments runs inside your browser. Your images and audio are never uploaded and conversations are not stored. Privacy