How can I create a filter based on object detection (person, car, bike, etc)

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
JCAK
Posts: 9
Joined: Mon Dec 20, 2021 2:56 am

How can I create a filter based on object detection (person, car, bike, etc)

Post by JCAK »

Hi,

I want execute a script file when the event match with a object detection, for example: person >= 60%

I don't know how achieve this, because ZM filter don't have an option to create a filter based on objects detections (person, car, bike, etc)

I'm reading on event server documentation, have "event_start_hook_notify_userscript" , "event_end_hook_notify_userscript" and "event_end_hook" but I don't know how to use, I can't understand the examples and not found nothing more on web.

Could someone help me please.

Thanks.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by Magic919 »

I wouldn't, I use Pushover for that.

If you want a filter, use the Notes field. That can look for the term 'Person'. Set the thresholds in ZMES.
-
User avatar
iconnor
Posts: 2880
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by iconnor »

add a rule for Notes contains....
JCAK
Posts: 9
Joined: Mon Dec 20, 2021 2:56 am

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by JCAK »

iconnor wrote: Tue Jan 25, 2022 2:55 pm add a rule for Notes contains....
Notes was my first try, I could search for the text "Persons" inside Notes, but doesn't have or I can't found a way to create a condition which trigger the filter in background only if Person >=60%
How can I read "percent" and create a condition ?
shane_pcs
Posts: 2
Joined: Thu Jan 23, 2020 9:43 pm

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by shane_pcs »

You need to limit your confidence in ZMES the objectconfig i think. 'object_min_confidence' if you set to 60 it will only label the notes if its above 60% confident. Then your filter based on notes with person will trigger any time there is a person detected.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by Magic919 »

Agreed and 60% might not be enough, IME.
-
JCAK
Posts: 9
Joined: Mon Dec 20, 2021 2:56 am

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by JCAK »

shane_pcs wrote: Thu Jan 27, 2022 3:25 pm You need to limit your confidence in ZMES the objectconfig i think. 'object_min_confidence' if you set to 60 it will only label the notes if its above 60% confident. Then your filter based on notes with person will trigger any time there is a person detected.
Thank you, is a good idea, I will try.

It is a pity that the percent value is not stored in a numeric field in the database, because there is no way to create custom SQL queries and then manually insert it into the database filter table.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: How can I create a filter based on object detection (person, car, bike, etc)

Post by Magic919 »

It's to be expected as they are two separate projects. They could be more tightly integrated I suppose. Putting some money up would help.
-
Post Reply