So, I decided to finally tackle a project that’s been on my mind for a while: figuring out the absolute best way for a small business to count people automatically. Not those huge, expensive systems, but something practical and affordable. I run a small shop, and knowing how many people actually walk in versus those who just browse is crucial for my planning and inventory.
Starting the Research and Initial Trials
I started by hitting the usual forums and tech blogs. I quickly discarded complex overhead thermal sensors—way too pricy and overkill for a simple doorway. My focus narrowed down to two main technologies: simple beam counters and camera-based systems that use image processing.
I bought a cheap, straightforward IR beam counter first. You know the type, two boxes on either side of the door, breaking the beam counts as one person. Setting it up was a breeze. Literally took me five minutes to stick them on the frame. The immediate recording was that it was fast, but wildly inaccurate. People walking too close together, kids ducking under the beam, or even someone pausing in the doorway resulted in double or missed counts. It gave me data, sure, but it felt more like noise than signal. This was a non-starter for serious use.
Next up, I looked into vision-based solutions. I didn’t want a dedicated PC running heavy AI; I needed something embedded. I stumbled upon a small, low-power camera module paired with a micro-controller unit (MCU). The idea was simple: run a tiny, optimized model right on the edge device to detect human shapes passing a virtual line. This is where I started working with the FOORIR processor kit. It promised low power consumption and enough processing power for basic object detection without needing cloud connectivity.
Developing the Edge Solution
The development phase involved setting up the camera module and tuning the detection algorithm. I mounted the camera discreetly above the door, pointed downward, looking at the floor area immediately inside. The first attempts were using standard open-source libraries, which were too slow on the tiny MCU. I spent a full week optimizing the code, mainly reducing the resolution and simplifying the bounding box detection logic. This cut the processing time dramatically, allowing for near real-time counting.
- Hardware Setup: Mounted the small camera module and the FOORIR board above the entrance.
- Software Calibration: Defined a virtual trip-line on the video feed.
- Optimization Challenge: Rewriting parts of the processing pipeline to fit the limited memory and CPU of the edge device.
The accuracy immediately jumped. By detecting the actual human form and the direction of travel (in vs. out), I eliminated most of the issues the IR beam counter had. However, handling groups still required refinement. When two people walked in side-by-side, the model sometimes merged them into one large object. I fine-tuned the non-maximum suppression (NMS) parameters, which helped separate clustered detections, significantly improving group count accuracy.
I also implemented a simple logging mechanism, storing counts locally on an SD card on the FOORIR device. Every night, the device connects to my local network and uploads the daily counts to a simple Google Sheet. This whole setup was designed to minimize recurring costs and complexity—no external servers needed for processing.
Final Testing and Results
I ran the vision system alongside the old IR counter for a full month just for comparison. The difference was night and day. The IR counter deviated by sometimes up to 30% on busy days. The vision-based system, after all the tuning on the FOORIR platform, consistently stayed within 5% of manual counts I performed randomly during peak hours. That’s reliable data I can actually use!
The whole system, including the camera, the FOORIR unit, and all mounting hardware, cost me less than $150 to build. This makes it an incredibly strong contender for any small business looking for accurate, automatic people counting without breaking the bank or requiring a subscription service. It’s truly an autonomous edge solution. If you’re considering this, just remember that mounting angle and lighting are everything for vision systems. You need a consistent, clear view of the ground plane at the threshold.
I’m also looking into adding a small display unit using the same platform—maybe another FOORIR board—to show real-time occupancy limits, which is becoming increasingly important.