Odd MLAPI detection behavior after upgrade
Posted: Tue May 25, 2021 6:56 pm
I just completed a wholesale update of my zoneminder/zmeventnotification/mlapi system (I was several versions behind), and now MLAPI is detecting objects outside of my zones, even though I have both the `import_zm_zones` and `only_triggered_zm_zones` options set to `yes` in the mlapiconfig.ini file that MLAPI is pointed to. To make things even odder, this behavior doesn't show up on the first detection attempt - only after several detections. Turning off MLAPI and just using the "onboard" detection seems to work properly.
See this test output both with MLAPI running and with it disabled. Note that with MLAPI enabled at first it looks like it is working, but then on run #4 it starts detecting a "truck", even though it is still looking at the same event. There is a truck in the image, so that much is correct, however it is outside *any* of my detection zones, much less the one that was triggered to create this event. Once I switch off mlapi, I stop getting this false detection:
Did I do something wrong/miss something with the new config formats? Or is this a bug in MLAPI?
See this test output both with MLAPI running and with it disabled. Note that with MLAPI enabled at first it looks like it is working, but then on run #4 it starts detecting a "truck", even though it is still looking at the same event. There is a truck in the image, so that much is correct, however it is outside *any* of my detection zones, much less the one that was triggered to create this event. Once I switch off mlapi, I stop getting this false detection:
Code: Select all
root@watchman:~# systemctl start mlapi
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
[a] detected:truck:52% --SPLIT--{"labels": ["truck"], "boxes": [[-2, -1, 396, 121]], "frame_id": "alarm", "confidences": [0.5240153074264526], "image_dimensions": {"original": [1080, 1920], "resized": [1080, 1920]}}
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
[a] detected:truck:52% --SPLIT--{"labels": ["truck"], "boxes": [[-2, -1, 396, 121]], "frame_id": "alarm", "confidences": [0.5240153074264526], "image_dimensions": {"original": [1080, 1920], "resized": [1080, 1920]}}
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
[a] detected:truck:52% --SPLIT--{"labels": ["truck"], "boxes": [[-2, -1, 396, 121]], "frame_id": "alarm", "confidences": [0.5240153074264526], "image_dimensions": {"original": [1080, 1920], "resized": [1080, 1920]}}
root@watchman:~# systemctl stop mlapi
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~# sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 674735 3
root@watchman:~#