ZoneMinder / zmeventnotification

Machine Learning powered Secure Websocket & MQTT based ZoneMinder event notification server
412 stars 128 forks source link

Possible to have more than 2 frames analysis for objects detection #348

Closed mikevador02 closed 3 years ago

mikevador02 commented 3 years ago

Event Server version V: 6.0.6r

Hooks version (if you are using Object Detection) hooks:6.0.6 pyzm:0.2.8

The version of ZoneMinder you are using: 1.34.22

nature of your issue I read that object recongition is only on two frames (1st alarm and most high sensitive alert frame) also for avoid to use much anaylsys cpu ressources. And advised to optimise region of motion detection to optimise it.

But i would like to know if possible to adapt the script to take more than 2 frames to identifying objects on event. For exemple take a total of 5 or more (or percentage of frame on an event) divided on all alarmed frames of an event to optimise objects detection ? For exemple with http://dvr2/zm/api/events/13890.json we can get total of frame and make percentage or total frame divided by 5 to have our 5 frames to analysis. And get frames after by https://dvr2/zm/index.php?view=image&eid=13890&fid=10,...20...30....40...50

Or cause event can be running long time, take analysis every 5/10.... seconds during motdet to be sur to have all object detection during a long event.

DBG1 [zmesdetect_m2] [Trying to download https://dvr2/zm/index.php?view=image&eid=13890&fid=alarm&username=userrecord&password=*************]

DBG1 [zmesdetect_m2] [Trying to download https://dvr2/zm/index.php?view=image&eid=13890&fid=snapshot&username=userrecord&password=*************]
....
[Using model: object with /var/lib/zmeventnotification/images/13890-alarm.jpg]
.....
[Using model: object with /var/lib/zmeventnotification/images/13890-snapshot.jpg]
.....

Best regards and thanks for this verry good project.

pliablepixels commented 3 years ago

Please track progress in https://github.com/pliablepixels/zmeventnotification/issues/313