EventServer doesn't show in Console

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
Rhada
Posts: 2
Joined: Fri Dec 08, 2023 12:50 pm

EventServer doesn't show in Console

Post by Rhada »

Hi everybody,

I'm absolutely new to this and no Linux expert but managed to set up a VM on my sonology with Ubuntu 22.04 and ZoneMinder 1.36.33.

In get many false positive alerts and wanted to set up ZMES. Even that seems to be working for the most part. I enabled logging and the log shows that a person has been detected. No errors messages.

BUT apart from these logs I see no effect that ZMES has on ZM.
In my understanding the evaluated images should show up in Console, but that is not the case... The events are saved onto a different storage that I mounted. Could that be part of the problem?

Any help is much appreciated
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: EventServer doesn't show in Console

Post by iconnor »

If configured to do so (it is the default) ZMES should create a jpeg in the event directory called objdetect.jpg. In the events list, this should get used as the thumbnail (1.37). Or in the Cause column, the ES finding should be listed and click on them should show the objdetect.jpg.

In 1.37 when viewing the event, the 3 thumbnanils will be shown and if objdetect is there, it will be shown as well.
Rhada
Posts: 2
Joined: Fri Dec 08, 2023 12:50 pm

Re: EventServer doesn't show in Console

Post by Rhada »

Thank you very much for your response.

I upgraded to 1.37.47 without problems using following command

Code: Select all

sudo add-apt-repository ppa:iconnor/zoneminder-master
sudo apt install zoneminder
I like the improvements being added however my problem still isn't solved.

I walked past my camera hoping to be identified as person. ZM shows following logs:
12/9/23, 10:10:51 AM GMT+1 zmeventnotification 19449 INF |----> FORK:Haustuer (3), eid:1162 Event 1162 for Monitor 3 has finished zmeventnotification.pl -
12/9/23, 10:10:50 AM GMT+1 zmc_m3 16979 INF Haustuer: 83615 - Closing event 1162, alarm end zm_monitor.cpp 2249
12/9/23, 10:10:50 AM GMT+1 zmc_m3 16979 INF Haustuer: 83615 - Left alarm state (1162) - 103(52) images zm_monitor.cpp 2241
12/9/23, 10:10:48 AM GMT+1 zmc_m3 16959 INF Haustuer: 83600 - Capturing at 9.98 fps, capturing bandwidth 26702bytes/sec Analysing at 10.08 fps zm_monitor.cpp 1774
12/9/23, 10:10:40 AM GMT+1 zmc_m3 16979 INF Haustuer: 83518 - Gone into alert state zm_monitor.cpp 2234
12/9/23, 10:10:38 AM GMT+1 zmc_m3 16979 INF Haustuer: 83500 - ExtAlm - Gone back into alarm state zm_monitor.cpp 2213
12/9/23, 10:10:38 AM GMT+1 zmc_m3 16979 INF Haustuer: 83499 - Gone into alert state zm_monitor.cpp 2234
12/9/23, 10:10:38 AM GMT+1 zmc_m3 16959 INF Haustuer: 83500 - Capturing at 9.97 fps, capturing bandwidth 27870bytes/sec Analysing at 9.87 fps zm_monitor.cpp 1774
12/9/23, 10:10:36 AM GMT+1 zmeventnotification 19449 INF |----> FORK:Haustuer (3), eid:1162 use hooks/start hook not being used, going to directly send out a notification if checks pass zmeventnotification.pl -
12/9/23, 10:10:35 AM GMT+1 zmeventnotification 17014 INF PARENT: New event 1162 reported for Monitor:3 (Name:Haustuer) Motion:Haustuer[last processed eid:1146] zmeventnotification.pl -
12/9/23, 10:10:35 AM GMT+1 zmc_m3 16979 INF Haustuer: 83465 - Opening new event 1162, alarm start
I can't see that anything was identified and if I take a look at the folders under /mnt/zoneminder/events/3/2023-12-09/1162/ there is no objdetect.jpg.

Some time ago I had log files like the following but that didn't happen again and there is also no objdetect.jpg in the folder although it seems to have identified as person with 74%.
12/8/23, 12:53:06 PM GMT+1 zmesdetect_m3 3806 INF Setting up signal handler for logs ZMLog.py 292
12/8/23, 12:53:06 PM GMT+1 zmesdetect_m3 3806 INF Switching global logger to ZMLog ZMLog.py 301
12/8/23, 12:53:07 PM GMT+1 zmesdetect_m3 3806 INF ---------| app:6.1.28, pyzm:0.3.63, ES:6.1.28 , OpenCV:4.8.1|------------ zm_detect.py 284
12/8/23, 12:53:08 PM GMT+1 zmesdetect_m3 3806 INF Reading config from: /etc/zm/objectconfig.ini utils.py 405
12/8/23, 12:53:09 PM GMT+1 zmesdetect_m3 3806 INF Reading secrets from: /etc/zm/secrets.ini utils.py 410
12/8/23, 12:53:09 PM GMT+1 zmesdetect_m3 3806 INF Importing local classes for Object/Face zm_detect.py 309
12/8/23, 12:53:11 PM GMT+1 zmesdetect_m3 3806 INF Connecting with ZM APIs zm_detect.py 334
12/8/23, 12:53:32 PM GMT+1 zmesdetect_m3 3806 INF Prediction string:[a] detected:person:74% zm_detect.py 479
12/8/23, 12:52:53 PM GMT+1 zmeventnotification 3803 INF |----> FORK:Terrasse (1), eid:620 use hooks/start hook not being used, going to directly send out a notification if checks pass zmeventnotification.pl -
12/8/23, 12:52:56 PM GMT+1 zmeventnotification 3803 INF |----> FORK:Terrasse (1), eid:620 Event 620 for Monitor 1 has finished zmeventnotification.pl -
12/8/23, 12:52:59 PM GMT+1 zmeventnotification 3803 INF |----> FORK:Terrasse (1), eid:620 end hooks/use hooks not being used, going to directly send out a notification if checks pass zmeventnotification.pl
I can start a manual detection with this code:

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --eventid 1162 --monitorid 3 --debug
And that gives me:
12/09/23 10:13:25 zmesdetect_m3[19672] INF ZMLog.py:292 [Setting up signal handler for logs]

12/09/23 10:13:26 zmesdetect_m3[19672] INF ZMLog.py:301 [Switching global logger to ZMLog]

12/09/23 10:13:27 zmesdetect_m3[19672] INF zm_detect.py:284 [---------| app:6.1.28, pyzm:0.3.63, ES:6.1.28
, OpenCV:4.8.1|------------]

12/09/23 10:13:29 zmesdetect_m3[19672] INF utils.py:405 [Reading config from: /etc/zm/objectconfig.ini]

12/09/23 10:13:29 zmesdetect_m3[19672] INF utils.py:410 [Reading secrets from: /etc/zm/secrets.ini]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ZM_PORTAL]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ZM_USER]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ZM_PASSWORD]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ZM_API_PORTAL]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ML_USER]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !ML_PASSWORD]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:382 [Secret token found in config: !PLATEREC_ALPR_KEY]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG1 utils.py:445 [allowing self-signed certs to work...]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG2 utils.py:455 [Now checking for monitor overrides]

12/09/23 10:13:29 zmesdetect_m3[19672] DBG3 utils.py:522 [Finally, doing parameter substitution]

12/09/23 10:13:30 zmesdetect_m3[19672] INF zm_detect.py:309 [Importing local classes for Object/Face]

12/09/23 10:13:36 zmesdetect_m3[19672] INF zm_detect.py:334 [Connecting with ZM APIs]

12/09/23 10:13:36 zmesdetect_m3[19672] DBG2 api.py:69 [API SSL certificate check has been disbled]

12/09/23 10:13:36 zmesdetect_m3[19672] DBG1 api.py:173 [using username/password for login]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 api.py:202 [Using new token API]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 zm_detect.py:342 [using ml_sequence]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 zm_detect.py:354 [using stream_sequence]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG1 detect_sequence.py:160 [Resetting models, will be loaded on next run]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG3 detect_sequence.py:637 [Using manual locking as we are only using one model]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 Media.py:51 [Media get SSL certificate check has been disbled]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 Media.py:99 [Using URL 1162 for stream]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 Media.py:114 [We will only process frames: ['snapshot', 'alarm']]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG2 Media.py:137 [No need to start streams, we are picking images from http://192.168.2.179/zm/index.php?view=image&eid=1162]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG3 Media.py:271 [Reading http://192.168.2.179/zm/index.php?view= ... d=snapshot]

12/09/23 10:13:38 zmesdetect_m3[19672] DBG3 api.py:263 [make_request called with url=http://192.168.2.179/zm/index.php?view= ... d=snapshot payload={} type=get query={'token': None}]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG1 detect_sequence.py:654 [perf: Starting for frame:snapshot]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG1 detect_sequence.py:669 [============ Frame: snapshot Running object detection type in sequence ==================]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 detect_sequence.py:174 [Skipping TPU object detection as it is disabled]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 detect_sequence.py:178 [Loading sequence: YoloV4 GPU/CPU]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 detect_sequence.py:179 [Initializing model type:object with options:{'name': 'YoloV4 GPU/CPU', 'enabled': 'yes', 'object_config': '/var/lib/zmeventno tification/models/yolov4/yolov4.cfg', 'object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'ob ject_min_confidence': 0.3, 'object_framework': 'opencv', 'object_processor': 'gpu', 'gpu_max_processes': 1, 'gpu_max_lock_wait': 100, 'cpu_max_processes': 3, 'cpu_max_lock_wait': 100, 'max_detec tion_size': '90%', 'disable_locks': 'no'}]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 yolo.py:54 [portalock: max:1, name:pyzm_uid33_gpu_lock, timeout:100]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 yolo.py:68 [Waiting for pyzm_uid33_gpu_lock portalock...]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 yolo.py:70 [Got pyzm_uid33_gpu_lock portalock]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG3 detect_sequence.py:689 [object has a same_model_sequence strategy of first]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG1 detect_sequence.py:701 [--------- Frame:snapshot Running variation: #1 -------------]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 yolo.py:152 [detect extracted image dimensions as: 800wx450h]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG2 yolo.py:65 [pyzm_uid33_gpu_lock portalock already acquired]

12/09/23 10:13:40 zmesdetect_m3[19672] DBG1 yolo.py:102 [|--------- Loading "YoloV4 GPU/CPU" model from disk -------------|]

12/09/23 10:13:47 zmesdetect_m3[19672] DBG1 yolo.py:113 [You are using OpenCV >= 4.5.4, making sure we fix getUnconnectedOutLayers() API]

12/09/23 10:13:47 zmesdetect_m3[19672] DBG1 yolo.py:115 [perf: processor:gpu Yolo initialization (loading /var/lib/zmeventnotification/models/yolov4/yolov4.weights model from disk) took: 7213.01 ms]

12/09/23 10:13:47 zmesdetect_m3[19672] DBG2 yolo.py:130 [Setting CUDA backend for OpenCV]

12/09/23 10:13:47 zmesdetect_m3[19672] DBG3 yolo.py:131 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device /make_policy]

12/09/23 10:13:47 zmesdetect_m3[19672] DBG1 yolo.py:175 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]

[ WARN:0@35.401] global net_impl.cpp:178 setUpNet DNN module was not built with CUDA backend; switching to CPU
12/09/23 10:14:00 zmesdetect_m3[19672] DBG2 yolo.py:86 [Released pyzm_uid33_gpu_lock portalock]

12/09/23 10:14:00 zmesdetect_m3[19672] DBG1 yolo.py:199 [perf: processor:gpu Yolo detection took: 12491.65 ms]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 yolo.py:233 [perf: processor:gpu Yolo NMS filtering took: 248.90 ms]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 object.py:79 [core model detection over, got 2 objects. Now filtering]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 object.py:83 [Max object size found to be: 90%]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 object.py:91 [Converted 90% to 324000.0]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 object.py:116 [Returning filtered list of 2 objects.]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['person', 'car'],conf:[0.9803454279899597, 0.5038945078849792]]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]

12/09/23 10:14:01 zmesdetect_m3[19672] DBG2 detect_sequence.py:448 [No polygons, adding full image polygon: {'name': 'full_image', 'value': [(0, 0), (1920, 0), (1920, 1080), (0, 1080)], 'pattern': None}]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG3 detect_sequence.py:228 [resized polygons x=0.4166666666666667/y=0.4166666666666667: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:502 [intersection: object:person,POLYGON ((520 -4, 802 -4, 802 450, 520 450, 520 -4)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:526 [full_image intersects object:person[[(520, -4), (802, -4), (802, 450), (520, 450)]]]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((512 210, 538 210, 538 220, 512 220, 512 210)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(512, 210), (538, 210), (538, 220), (512, 220)]]]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG2 detect_sequence.py:751 [breaking out of same model loop, as matches found and strategy is "first"]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG3 Media.py:271 [Reading http://192.168.2.179/zm/index.php?view= ... &fid=alarm]

12/09/23 10:14:02 zmesdetect_m3[19672] DBG3 api.py:263 [make_request called with url=http://192.168.2.179/zm/index.php?view= ... &fid=alarm payload={} type=get query={'token': None}]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG1 detect_sequence.py:654 [perf: Starting for frame:alarm]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG1 detect_sequence.py:669 [============ Frame: alarm Running object detection type in sequence ==================]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG3 detect_sequence.py:689 [object has a same_model_sequence strategy of first]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG1 detect_sequence.py:701 [--------- Frame:alarm Running variation: #1 -------------]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG2 yolo.py:152 [detect extracted image dimensions as: 800wx450h]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG2 yolo.py:68 [Waiting for pyzm_uid33_gpu_lock portalock...]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG2 yolo.py:70 [Got pyzm_uid33_gpu_lock portalock]

12/09/23 10:14:03 zmesdetect_m3[19672] DBG1 yolo.py:175 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]

12/09/23 10:14:09 zmesdetect_m3[19672] DBG2 yolo.py:86 [Released pyzm_uid33_gpu_lock portalock]

12/09/23 10:14:09 zmesdetect_m3[19672] DBG1 yolo.py:199 [perf: processor:gpu Yolo detection took: 6493.01 ms]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 yolo.py:233 [perf: processor:gpu Yolo NMS filtering took: 3.74 ms]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 object.py:79 [core model detection over, got 2 objects. Now filtering]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 object.py:83 [Max object size found to be: 90%]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 object.py:91 [Converted 90% to 324000.0]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 object.py:116 [Returning filtered list of 2 objects.]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['person', 'car'],conf:[0.8979910016059875, 0.6686802506446838]]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:502 [intersection: object:person,POLYGON ((633 29, 801 29, 801 451, 633 451, 633 29)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:526 [full_image intersects object:person[[(633, 29), (801, 29), (801, 451), (633, 451)]]]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((512 210, 536 210, 536 220, 512 220, 512 210)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(512, 210), (536, 210), (536, 220), (512, 220)]]]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 detect_sequence.py:751 [breaking out of same model loop, as matches found and strategy is "first"]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG2 yolo.py:82 [pyzm_uid33_gpu_lock portalock already released]

12/09/23 10:14:11 zmesdetect_m3[19672] DBG1 detect_sequence.py:828 [perf: TOTAL detection sequence (with image loads) took: 33184.35 ms to process 1162]

12/09/23 10:14:12 zmesdetect_m3[19672] INF zm_detect.py:479 [Prediction string:[s] detected:person:98% car:50% ]

12/09/23 10:14:12 zmesdetect_m3[19672] DBG1 zm_detect.py:481 [Prediction string JSON:{"labels": ["person", "car"], "boxes": [[520, -4, 802, 450], [512, 210, 538, 220]], "frame_id": "snapshot", "confidences": [0.9803454279899597, 0.5038945078849792], " image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}]

[s] detected:person:98% car:50% --SPLIT--{"labels": ["person", "car"], "boxes": [[520, -4, 802, 450], [512, 210, 538, 220]], "frame_id": "snapshot", "confidences": [0.9803454279899597, 0.5038945078849792], "image_dimensions": {"original": [1080, 1920] , "resized": [450, 800]}}
12/09/23 10:14:12 zmesdetect_m3[19672] DBG1 zm_detect.py:557 [Closing logs]
That shows me that detection should work as it says detected:person:98%

My objectconfig.ini under /etc/zm/ ist set to write_image_to_zm=yes

What else could be the problem here? Do I need to have hooks enabled in the zmeventnotification.ini? At first I had them to yes, but changed that to no afterwards.. now I enabled them again but I can't see anything changing...
Post Reply