{
  "id": 6255027,
  "title": "Building an Edge AI People Counter: The Parts After Detection",
  "url": "https://urgent.news/2026/09/08/building-an-edge-ai-people-counter-the-parts-after-detection",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-08T08:08:30.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dongpei_liao_8092a14d7c50/building-an-edge-ai-people-counter-the-parts-after-detection-56c5"
  },
  "original_language": "en",
  "account": "An edge AI people counter requires more than just detection. Capturing frames on time, linking detections to the same individual, and determining if a person truly crossed an entrance are crucial. Building the complete pipeline with five stages helps: capturing frames, resizing and normalizing, running detection, tracking between frames, and finally converting movement into entry and exit events. Each stage can lose or add information, so errors accumulate in the final counter. Start by testing frame capture independently of the AI model, measuring frame rate and stalls. A detector provides coordinates, class, and confidence, but lacks knowledge of a person's prior location. A tracker with temporary IDs and memory is needed to link detections to the same person. Simple centroid matching may work in simple settings, but busier areas need motion prediction and appearance cues. Tracking involves keeping the previous and current sides of a virtual line and emitting an event when the side changes, marking crossings to avoid counting the same person multiple times. The core logic should be small and include hysteresis, valid crossing zones, minimum track age, and clearing the flag after the person leaves. Counting and occupancy are distinct; occupancy accumulates entries and subtracts exits, making error correction crucial. A wide entrance with groups and carts benefits from richer vision and tracking, while a narrow doorway might suffice with simpler sensors. The RK3588-class device can handle capture, preprocessing, inference, and event logic in a small box, with the CPU handling tracking and networking. However, careful pipeline design is required to avoid unnecessary data copying. Reporting more than just counts is essential; include last frame timestamp, capture FPS, inference time, active tracks, event queue depth, device temperature, and model version. Health checks should flag stale counts when cameras are covered or processes stop. Test the entire event stream, not just detector accuracy, including various traffic scenarios. Privacy can be maintained by keeping raw frames on the device, but local processing still risks exposing images. Disable debug features by default, restrict access during testing, and publish anonymous events instead of track histories. Ultimately, a reliable edge AI people counter depends on meticulous state management around the neural network, ensuring that movement becomes a real visit, the result is trusted, and failures are handled gracefully.",
  "summary": "A working people counter produces an entry or exit event, not a box drawn around a person. The detector is only one part of the job. A camera frame still has to arrive on time, detections have to remain attached to the same person, and the application has to decide whether that person actually crossed an entrance. That distinction gets lost in a lot of demos. They show a model finding five people…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}