Inaccurate person detection

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
jfqbsm
Posts: 11
Joined: Tue Dec 14, 2021 6:36 pm

Inaccurate person detection

Post by jfqbsm »

Hi,
I'm trying to configure ES with hook to trigger alarm when a person crosses an area defined in configuration monitor.
The monitor section in objectconfig.ini is defined like this:

Code: Select all

## Monitor specific settings
[monitor-3]
# Route
model_sequence=object
object_detection_pattern=(person)
import_zm_zones=yes
only_triggered_zm_zones=yes

# end monitor 3
In object section the object_min_confidence=0.5

In general it works fine, but when the light suddenly changes (for example with the light car) an event is triggered and analysed by hook. Then i get a person detection of 54.09% in the enclosed objdetect.jpg picture. As you can see it's not a person but a little tree which moreover is not in the defined areas.
Is it possible to avoid such false alarm ? Thanks for your help
Attachments
objdetect.jpg
objdetect.jpg (118.39 KiB) Viewed 8855 times
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Inaccurate person detection

Post by asker »

There are multiple ways
1. Increase your confidence level (say 0.6)
2. Make sure you are using the right detection model (don’t use tiny yolo). Experiment with others if yolov4 isn’t working for you.

FYI OD Checks if the object is in your defined polygons by matching the rectangle around the object with your zones. As you see the rectangle around the “person” intersects with one of your polygons.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
jfqbsm
Posts: 11
Joined: Tue Dec 14, 2021 6:36 pm

Re: Inaccurate person detection

Post by jfqbsm »

Thanks for your answer.
As I have levels above 70% I am afraid of missing real alarms. Reducing my zones could have the same result. So i try a workaround. As i use API script notification, i created a python script to compare the false alarm picture kept as reference with the current event picture. If the pictures are similar then i don't send notification.
I use the histogram comparison from opencv to compare the pictures.
I'll let you know if it works after some days of testing.
Farm_Server
Posts: 11
Joined: Wed Sep 02, 2020 1:37 pm

Re: Inaccurate person detection

Post by Farm_Server »

I have a similar problem with a ceiling fan being declared a person any time motion is detected elsewhere in the field of view.

in objectconfig.ini there is a line for

Code: Select all

match_past_detection=yes
This helped, it would only declare the ceiling fan as a person once and then not again. But it seems to reset at some point, I don't know what causes it to reset but false detections went down almost 90% with this setting.

Another thing is you can try messing with overload frame count in the zone configuration. A setting of 2 or 3 stopped events being triggered by headlights sweeping over my driveway from cars driving by at night. It doesn't appear like doing this has hindered finding a person or animal in my driveway, I am recording at 25fps so 3 frames isn't much.
Post Reply