Page 1 of 1

CodeProject AI Person Counting

Posted: Mon Apr 14, 2025 7:13 pm
by TobyEpp
Hello there everyone. We have a small retail store and I was wondering if there is an easy way to count how many customers come in and out using AI detection. We have 2 cameras set up in the store and are currently using CodeProject AI for object detection and facial recognition. Does CodeProject AI have a solution for person counting or is there another way this can be accomplished? Thanks.

Re: CodeProject AI Person Counting

Posted: Thu Apr 17, 2025 5:53 am
by TimG
I don't think it could do that. At best it will show groups of people as a singular "person". I think UK trains do it with a detector above a doorway, but I don't know what type of detector, and a camera in that position couldn't recognise a person.
I guess if it is a single doorway you could use the old ding dong door bell contact.

Re: CodeProject AI Person Counting

Posted: Wed Apr 23, 2025 1:56 pm
by louyo
If you don't mind getting your hands a little dirty, it is easy with the Linux app for Windows.
1. Install the ubuntu LTS from the Microsoft store. You will have to enable it from Windows programs features. I think it is WSL.
2. Clone the camera.dn
3. In the clone: Set record to do a jpeg on either trigger or alert (and only that), set the storage location for the jpegs. I also keep the alerts in Aux1 to make it easy to show in BI.
4. My jpegs, for that camera are on my F drive, the folder is jpegs (F:\jpegs). You will need to substitute your names.
5. To do a count by any given day:
open the Ubuntu program (WSL), you will be at the command prompt.
to get to my F:\jpeg folder, I: cd /mnt/f/jpeg (note that there is no : after the f)
My command prompt now shows:root@BlueIris:/mnt/f/jpegs#
I type: ls -l | grep -c "Apr 22" (get count of files with date April 22
answer: 524
count.PNG
count.PNG (46.76 KiB) Viewed 1541 times

Re: CodeProject AI Person Counting

Posted: Wed Apr 23, 2025 6:32 pm
by Waternut1313
If you’re already using CodeProject AI, you might be able to repurpose its object detection features to track customer movement. That said, for more precise person counting, you could also look into specialized solutions like OpenCV or TensorFlow.