How to count humans in room

Hi,

I’m looking for “something” which allows me to count humans inside a room. Sounds simple but I can’t find anything. I was thinking about using a PIR Motion Detector but once they triggered, it takes a while before they come back. I need something with knows that Person A moves from Room A into the next room and back…
I own a PI4 with OpenHABian with ZigBee and Homematic.

Any idea?
Thanks in advanced
-J

HIKvision have stereoscopic cameras that can calculate number and flow, but I guess that’s a little over budget.

BlueIris with a couple of cameras might be able to get what you’re looking for?

Can it tell the difference between a crawling human and a dog? They specified humans. :wink:

Much, much harder than you think.

To refine your requirements -
Is there more than one route/exit?
Do you really care if it is person A that moves, or any person? e.g. individual identification.
Does this have to deal with dogs, children, vacuum cleaners, prams etc.?
What sort of response times do you need - know if “occupancy count” has changed within seconds, or minutes, or?

3 Likes

If it doesn’t need to identify a person then how about a pressure matt or break beam type sensor at the entrances and exit points.

For this to work, you need a beam that can determine which direction the person is moving in, or two beams spaced horizontally. Or if there are multiple entry points, you could make them one-way only. So you can come in through the door, but you have to leave through a window. :wink:

1 Like

Many people here have window sensors :wink:

1 Like

I know. As I don’t know the full details of the application I left the OP to do some thinking and research. The break beam type sensors are readily available and could be used in some kind of DIY implementation eg an array.

Here is an interesting article. The authors review various options and decide to use an array of IR detectors and a Pi0 These days that could have the added bonus of detecting someone with a fever :mask:

https://www.researchgate.net/publication/322783353_Measuring_People-Flow_through_Doorways_Using_Easy-to-Install_IR_Array_Sensors

Here is a “something”:

1 Like

The grid-eye Panasonic ir sensor looks very interesting. There is even software to count people in a room. The sensors can be bought cheaply and there are raspberry pi examples of using them. The evaluation kit comes with bluetooth so you could avoid cables to connect to a pi or buy the sensor hat.

https://www.element14.com/community/roadTestReviews/2279/l/panasonic-grid-eye-roadtest-review


Hi,
actually, i only need to count. I need to know the number of people inside of a room. The calculation I do with my OpenHAB, but the HW I’m looking for need to be able to send an event if a Person/Dog/Cat/Baby whatsoever crosses the “HW-Point” which than will send an event which my OpenHAB receives.

The HW should be quite responsive, 2 Hue PIR Motion Sensors are too slow due to the 10 sec sleep in between of each trigger.

If you know a PIR sensor which does NOT sleep after a trigger, that might already do the trick for me.

cheers
-J

Nice but a bit too expensive I would say…
The HW itself looks promissing but I have about 12 rooms which results in up to 16 of those…

1 Like

Hi,

You could try a Nvidia Jetson Nano to count people (and dogs).
It is a nice little and affordable platform for image recognition and object detection. It comes with a nice sdk that is quite usable (python, c++). All you need to do is feed it a videostream from the area you want to count people in. I started from here: https://www.linkedin.com/pulse/realtime-object-detection-10-lines-python-code-jetson-dustin-franklin

Best regards,
Jesse

with all your ideas and suggestions, i found a rather cheap solution on the marked, called " Homematic IP Passage Sensor with Direction Recognition" which seems very promissing to what I need but still about 100$ each and I need up to 16 of those.

Is there any cheaper solution avialable? The idea from @m4rk (break beam type sensor) seems nice but can’t imagen putting it together.

@Max_G the “someting” is nice but not what I’m looking for.


At the end of the day, all I need is to know, if there is “someone in the room, yes or no”. That’s all. Nothing else, and the ability to connect that info with my OpenHAB

That’s occupancy detection. Quite different, nothing about counting. Lots of existing advice - make your mind up what you want.

3 Likes

I agree with Rossko57

For example, all the Velbus PIRs can be set to trigger on every single bit of movement, or can be set to trigger once then wait.

They also have multiple trigger channels, with light level options.

Here is a setup with 2 zwave motion detectors.

As stated it’s not accurate if 2 people at once enter the room

Timing is everything