Closed vinceg77 closed 4 years ago
thx @pliablepixels for your quick reply
I am gonna update to 4.3 right now.
Here is nano /var/log/zm/zmesdetect_m2.log for event #383 ;
10/03/19 14:54:39 zmesdetect_m2[1284] DBG yolo.py:50 [Initializing Yolo]
10/03/19 14:54:39 zmesdetect_m2[1284] DBG yolo.py:51 [config:/var/lib/zmeventnotification/models/yolov3/yolov3.cfg, weights:/var/lib/zmeventnotification/models/yolov3/yolov3.weights]
10/03/19 14:54:40 zmesdetect_m2[1308] INF detect.py:60 [---------| app version: 4.2.5 |------------]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:216 [allowing self-signed certs to work...]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:detect_pattern with value:(person|cat)]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:delete_after_analyze with value:yes]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:import_zm_zones with value:yes]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:resize with value:600]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:models with value:face,yolo]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:detection_mode with value:all]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:232 [[monitor-2] overrides key:face_model with value:hog]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:58 [Getting ZM zones using https://192.168.0.35/zm/api/zones/forMonitor/2.json?user=xxx&pass=yyy]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:89 [importing zoneminder polygon: Active [356,289 843,289 843,716 356,716]]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:89 [importing zoneminder polygon: Inactive 1 [0,0 1276,0 1279,719 843,716 844,288 353,289 354,716 0,719]]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:127 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=383&fid=alarm&username=Vincent&password=*****]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:141 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=383&fid=snapshot&username=Vincent&password=*****]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG detect.py:106 [resizing to 600 before analysis...]
10/03/19 14:54:40 zmesdetect_m2[1308] DBG utils.py:36 [resized polygons x=0.46875/y=0.46805555555555556: [{'name': 'Active', 'value': [(166, 135), (395, 135), (395, 335), (166, 335)]}, {'name': 'Inactive 1', 'value': [(0, 0), (598, 0), (599, 33$
10/03/19 14:54:40 zmesdetect_m2[1308] DBG detect.py:124 [User ALPR if vehicle found: False]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG detect.py:194 [|--> model:yolo detection took: 2.070344s]
10/03/19 14:54:41 zmesdetect_m2[1284] INF image_manip.py:118 [object:person at [347, 149, 453, 339] has an acceptable confidence:0.9971532225608826 (min confidence=0.5)]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG image_manip.py:133 [intersection: polygon in process=[(347, 149), (453, 149), (453, 339), (347, 339)]]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG image_manip.py:139 [Active intersects object:person[[(347, 149), (453, 149), (453, 339), (347, 339)]]]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 14:54:41 zmesdetect_m2[1284] INF detect.py:337 [labels found: ['person']]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG detect.py:338 [match found in /var/lib/zmeventnotification/images/383-alarm.jpg, breaking file loop...]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG detect.py:391 [Writing detected image to /var/cache/zoneminder/events/2/2019-10-03/383/objdetect.jpg]
10/03/19 14:54:41 zmesdetect_m2[1284] DBG detect.py:398 [Writing JSON output to /var/cache/zoneminder/events/2/2019-10-03/383/objects.json]
10/03/19 14:54:41 zmesdetect_m2[1284] INF detect.py:437 [Prediction string:[a] detected:person:100% ]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG face.py:17 [Initializing face recognition with model:hog upsample:1, jitters:1]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG face.py:27 [face encoding file found, using that. If you want to add new images, remove faces.pickle]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:160 [|--> model:face init took: 2.124065s]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:189 [Using model: face with /var/lib/zmeventnotification/images/383-alarm.jpg]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:194 [|--> model:face detection took: 0.164241s]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:202 [Appending known faces to filter list]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:344 [No match found in /var/lib/zmeventnotification/images/383-alarm.jpg using model:face]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:189 [Using model: face with /var/lib/zmeventnotification/images/383-snapshot.jpg]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:194 [|--> model:face detection took: 0.163006s]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:202 [Appending known faces to filter list]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
0/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:160 [|--> model:yolo init took: 1.1e-05s]
10/03/19 14:54:42 zmesdetect_m2[1308] DBG detect.py:189 [Using model: yolo with /var/lib/zmeventnotification/images/383-alarm.jpg]
10/03/19 14:54:43 zmesdetect_m2[1308] DBG yolo.py:50 [Initializing Yolo]
10/03/19 14:54:43 zmesdetect_m2[1308] DBG yolo.py:51 [config:/var/lib/zmeventnotification/models/yolov3/yolov3.cfg, weights:/var/lib/zmeventnotification/models/yolov3/yolov3.weights]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG detect.py:194 [|--> model:yolo detection took: 1.970097s]
10/03/19 14:54:44 zmesdetect_m2[1308] INF image_manip.py:118 [object:person at [347, 149, 453, 339] has an acceptable confidence:0.9971532225608826 (min confidence=0.5)]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG image_manip.py:133 [intersection: polygon in process=[(347, 149), (453, 149), (453, 339), (347, 339)]]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG image_manip.py:139 [Active intersects object:person[[(347, 149), (453, 149), (453, 339), (347, 339)]]]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 14:54:44 zmesdetect_m2[1308] INF detect.py:337 [labels found: ['person']]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG detect.py:338 [match found in /var/lib/zmeventnotification/images/383-alarm.jpg, breaking file loop...]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG detect.py:391 [Writing detected image to /var/cache/zoneminder/events/2/2019-10-03/383/objdetect.jpg]
10/03/19 14:54:44 zmesdetect_m2[1308] DBG detect.py:398 [Writing JSON output to /var/cache/zoneminder/events/2/2019-10-03/383/objects.json]
10/03/19 14:54:44 zmesdetect_m2[1308] INF detect.py:437 [Prediction string:[a] detected:person:100% ]
PS : I changed the screenshot in my first post as it was not the right event picture (#343 instead of #383 !)
Please post debug logs of detect after updating. I'm seeing some odd issues in the detect logs - not sure why yolo is running before face when you have face,yolo
For yolo running (or not) before face, it might be my fault : I am not sure not having changed objectconfig.ini after event #383 and then having reported here the updated version. Sorry about that. I have not changed it since
I have updated zmeventnotification.pl to 4.3 (I just replaced the old 4.2 file with the new 4.3 in /usr/bin)
then generated a new event #512 where picture is recognized. The zm web UI still not displays the name of the file recognized in /var/lib/zmeventnotification/known_faces :
Here is the zmesdetect_m2.log for event #512 ;
10/03/19 17:31:36 zmesdetect_m2[6202] INF detect.py:60 [---------| app version: 4.2.5 |------------]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:216 [allowing self-signed certs to work...]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:detect_pattern with value:(person|cat)]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:delete_after_analyze with value:yes]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:import_zm_zones with value:yes]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:resize with value:600]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:models with value:face,yolo]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:detection_mode with value:all]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:232 [[monitor-2] overrides key:face_model with value:hog]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:58 [Getting ZM zones using https://192.168.0.35/zm/api/zones/forMonitor/2.json?user=xxx&pass=yyy]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:89 [importing zoneminder polygon: Active [356,289 843,289 843,716 356,716]]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:89 [importing zoneminder polygon: Inactive 1 [0,0 1276,0 1279,719 843,716 844,288 353,289 354,716 0,719]]
10/03/19 17:31:36 zmesdetect_m2[6202] DBG utils.py:127 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=512&fid=alarm&username=Vincent&password=*****]
10/03/19 17:31:37 zmesdetect_m2[6202] DBG utils.py:141 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=512&fid=snapshot&username=Vincent&password=*****]
10/03/19 17:31:37 zmesdetect_m2[6202] DBG detect.py:106 [resizing to 600 before analysis...]
10/03/19 17:31:37 zmesdetect_m2[6202] DBG utils.py:36 [resized polygons x=0.46875/y=0.46805555555555556: [{'name': 'Active', 'value': [(166, 135), (395, 135), (395, 335), (166, 335)]}, {'name': 'Inactive 1', 'value': [(0, 0), (598, 0), (599, 336), (395, 335), (395, 134), (165, 135), (165, 335), (0, 336)]}]]
10/03/19 17:31:37 zmesdetect_m2[6202] DBG detect.py:124 [User ALPR if vehicle found: False]
10/03/19 17:31:38 zmesdetect_m2[6202] DBG face.py:17 [Initializing face recognition with model:hog upsample:1, jitters:1]
10/03/19 17:31:38 zmesdetect_m2[6202] DBG face.py:27 [face encoding file found, using that. If you want to add new images, remove faces.pickle]
10/03/19 17:31:38 zmesdetect_m2[6202] DBG detect.py:160 [|--> model:face init took: 1.671442s]
10/03/19 17:31:38 zmesdetect_m2[6202] DBG detect.py:189 [Using model: face with /var/lib/zmeventnotification/images/512-alarm.jpg]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:194 [|--> model:face detection took: 0.173117s]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:202 [Appending known faces to filter list]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:344 [No match found in /var/lib/zmeventnotification/images/512-alarm.jpg using model:face]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:189 [Using model: face with /var/lib/zmeventnotification/images/512-snapshot.jpg]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:194 [|--> model:face detection took: 0.17116s]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:202 [Appending known faces to filter list]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:344 [No match found in /var/lib/zmeventnotification/images/512-snapshot.jpg using model:face]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:160 [|--> model:yolo init took: 1.1e-05s]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG detect.py:189 [Using model: yolo with /var/lib/zmeventnotification/images/512-alarm.jpg]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG yolo.py:50 [Initializing Yolo]
10/03/19 17:31:39 zmesdetect_m2[6202] DBG yolo.py:51 [config:/var/lib/zmeventnotification/models/yolov3/yolov3.cfg, weights:/var/lib/zmeventnotification/models/yolov3/yolov3.weights]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG detect.py:194 [|--> model:yolo detection took: 1.950659s]
10/03/19 17:31:41 zmesdetect_m2[6202] INF image_manip.py:118 [object:person at [240, 146, 348, 336] has an acceptable confidence:0.9655240178108215 (min confidence=0.5)]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG image_manip.py:133 [intersection: polygon in process=[(240, 146), (348, 146), (348, 336), (240, 336)]]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG image_manip.py:139 [Active intersects object:person[[(240, 146), (348, 146), (348, 336), (240, 336)]]]
10/03/19 17:31:41 zmesdetect_m2[6202] INF image_manip.py:118 [object:car at [-4, 200, 270, 342] has an acceptable confidence:0.7490472197532654 (min confidence=0.5)]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG image_manip.py:133 [intersection: polygon in process=[(-4, 200), (270, 200), (270, 342), (-4, 342)]]
10/03/19 17:31:41 zmesdetect_m2[6202] INF image_manip.py:144 [discarding "car" as it does not match your filters]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG image_manip.py:146 [Active intersects object:car[[(-4, 200), (270, 200), (270, 342), (-4, 342)]] but does NOT match your detect_pattern filter of (person|cat)]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing]
10/03/19 17:31:41 zmesdetect_m2[6202] INF detect.py:337 [labels found: ['person']]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG detect.py:338 [match found in /var/lib/zmeventnotification/images/512-alarm.jpg, breaking file loop...]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG detect.py:391 [Writing detected image to /var/cache/zoneminder/events/2/2019-10-03/512/objdetect.jpg]
10/03/19 17:31:41 zmesdetect_m2[6202] DBG detect.py:398 [Writing JSON output to /var/cache/zoneminder/events/2/2019-10-03/512/objects.json]
10/03/19 17:31:41 zmesdetect_m2[6202] INF detect.py:437 [Prediction string:[a] detected:person:97% ]
10/03/19 17:31:56 zmesdetect_m2[6239] INF detect.py:60 [---------| app version: 4.2.5 |------------]
No, you need to update properly - please follow install instructions as the detection libraries need to be updated.
Some other thoughts:
1 & 2 :
I followed the "How do I safely upgrade zmeventnotification to new versions?" here to update... You mean I need to reinstall the whole thing ? Executing install.sh from a new downloaded zmeventnotification-master.zip would be ok to update ??
I updated the instructions. After you download the new updates, do a sudo ./install.sh
and follow along.
Ok I have git cloned zmeventnotification / executed ./install.sh / reinstalled my own ini files (maybe you should warn users to backup their objectconfig.ini & zmeventnotification.ini prior to launch install.sh in the web page, hopefully I had done it) It is dark night here now, so I will act as a weirdo in front of my own doorbell tomorrow, in order to trigger an event ! :)
Okay. When you post next:
After updating it is now working : Detected face came back on zm web UI !!! :
Here are the logs :
root@Zoneminder:/home/vincent# sudo -u www-data /usr/bin/detect_wrapper.sh 825 2
[a] detected:Vincent:100% person:100%
syslog ( (I still see some warnings and error here) : (I was holding my cell phone !!! :) )
Oct 4 11:13:03 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [---------| app version: 4.3.7 |------------]
Oct 4 11:13:03 Zoneminder web_php[9432]: INF [Login successful for user "Vincent"]
Oct 4 11:13:04 Zoneminder zmc_m5[485]: INF [zmc_m5] [Doorbird (Rue): images:514600 - Capturing at 10.00 fps, capturing bandwidth 25064bytes/sec]
Oct 4 11:13:04 Zoneminder zmc_m4[5474]: INF [zmc_m4] [Perron: images:346000 - Capturing at 20.00 fps, capturing bandwidth 70857bytes/sec]
Oct 4 11:13:05 Zoneminder zma_m2[525]: INF [zma_m2] [Doorbird (Porte): 514900 - Analysing at 10.00 fps]
Oct 4 11:13:05 Zoneminder zmfilter_2[2887]: WAR [No query in Filter!]
Oct 4 11:13:05 Zoneminder zmfilter_2[2887]: ERR [Error parsing Sql. skipping filter 'Update DiskSpace']
Oct 4 11:13:05 Zoneminder zmfilter_2[2887]: WAR [No filter found for SELECT * FROM `Filters` WHERE `Id` = ? AND( `AutoArchive` = 1#012 or `AutoVideo` = 1#012 or `AutoUpload` = 1#012 or `AutoEmail` = 1#012 or `AutoMessage` = 1#012 or `AutoExecute` = 1#012 or `AutoDelete` = 1#012 or `UpdateDiskSpace` = 1#012 or `AutoMove` = 1#012 or `AutoCopy` = 1#012 ) ORDER BY `Name` with values(2)]
Oct 4 11:13:05 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [object:Vincent at (268, 147, 319, 199) has an acceptable confidence:1 (min confidence=0.5)]
Oct 4 11:13:05 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [labels found: ['Vincent']]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [object:person at [203, 124, 391, 328] has an acceptable confidence:0.9991354942321777 (min confidence=0.5)]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [object:cell phone at [295, 296, 333, 310] has an acceptable confidence:0.8758274912834167 (min confidence=0.5)]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [discarding "cell phone" as it does not match your filters]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [object:car at [578, 158, 598, 240] has an acceptable confidence:0.6348605155944824 (min confidence=0.5)]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [discarding "car" as it does not match your filters]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [labels found: ['person']]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: ERR [zmesdetect_m2] [Could not write image to ZoneMinder as eventpath not present]
Oct 4 11:13:07 Zoneminder /detect.py[11131]: INF [zmesdetect_m2] [Prediction string:[a] detected:Vincent:100% person:100% ]
3. zmesdetect_m2 log for the same event :
0/04/19 11:13:03 zmesdetect_m2[11131] INF detect.py:60 [---------| app version: 4.3.7 |------------] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:216 [allowing self-signed certs to work...] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:detect_pattern with value:(person|cat)] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:delete_after_analyze with value:yes] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:import_zm_zones with value:yes] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:resize with value:600] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:models with value:face,yolo] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:detection_mode with value:all] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:232 [[monitor-2] overrides key:face_model with value:hog] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:58 [Getting ZM zones using https://192.168.0.35/zm/api/zones/forMonitor/2.json?user=xxx&pass=yyy] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:89 [importing zoneminder polygon: Active [356,289 843,289 843,716 356,716]] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:89 [importing zoneminder polygon: Inactive 1 [0,0 1276,0 1279,719 843,716 844,288 353,289 354,716 0,719]] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:127 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=825&fid=alarm&username=Vincent&password=] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:141 [Trying to download https://192.168.0.35/zm/index.php?view=image&eid=825&fid=snapshot&username=Vincent&password=] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG detect.py:106 [resizing to 600 before analysis...] 10/04/19 11:13:03 zmesdetect_m2[11131] DBG utils.py:36 [resized polygons x=0.46875/y=0.46805555555555556: [{'name': 'Active', 'value': [(166, 135), (395, 135), (395, 335), (166, 335)]}, {'name': 'Inactive 1', 'value': [(0, 0), (598, 0), (599, 33$ 10/04/19 11:13:03 zmesdetect_m2[11131] DBG detect.py:124 [User ALPR if vehicle found: False] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG face.py:17 [Initializing face recognition with model:hog upsample:1, jitters:1] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG face.py:27 [face encoding file found, using that. If you want to add new images, remove faces.pickle] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:160 [|--> model:face init took: 1.658418s] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:189 [Using model: face with /var/lib/zmeventnotification/images/825-alarm.jpg] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:194 [|--> model:face detection took: 0.207376s] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:202 [Appending known faces to filter list] 10/04/19 11:13:05 zmesdetect_m2[11131] INF image_manip.py:118 [object:Vincent at (268, 147, 319, 199) has an acceptable confidence:1 (min confidence=0.5)] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG image_manip.py:133 [intersection: polygon in process=[(268, 147), (319, 147), (319, 199), (268, 199)]] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG image_manip.py:139 [Active intersects object:Vincent[[(268, 147), (319, 147), (319, 199), (268, 199)]]] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing] 10/04/19 11:13:05 zmesdetect_m2[11131] INF detect.py:337 [labels found: ['Vincent']] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:338 [match found in /var/lib/zmeventnotification/images/825-alarm.jpg, breaking file loop...] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:160 [|--> model:yolo init took: 1e-05s] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG detect.py:189 [Using model: yolo with /var/lib/zmeventnotification/images/825-alarm.jpg] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG yolo.py:50 [Initializing Yolo] 10/04/19 11:13:05 zmesdetect_m2[11131] DBG yolo.py:51 [config:/var/lib/zmeventnotification/models/yolov3/yolov3.cfg, weights:/var/lib/zmeventnotification/models/yolov3/yolov3.weights]
4. It does not appear above but I can see some error messages [Could not write image to ZoneMinder as eventpath not present] in zmesdetect_m2.log (see below). How should I correct these ?
10/04/19 10:51:29 zmesdetect_m2[9728] DBG yolo.py:50 [Initializing Yolo] 10/04/19 10:51:29 zmesdetect_m2[9728] DBG yolo.py:51 [config:/var/lib/zmeventnotification/models/yolov3/yolov3.cfg, weights:/var/lib/zmeventnotification/models/yolov3/yolov3.weights] 10/04/19 10:51:30 zmesdetect_m2[9728] DBG detect.py:194 [|--> model:yolo detection took: 1.495406s] 10/04/19 10:51:30 zmesdetect_m2[9728] INF image_manip.py:118 [object:person at [212, 225, 320, 333] has an acceptable confidence:0.9776769280433655 (min confidence=0.5)] 10/04/19 10:51:30 zmesdetect_m2[9728] DBG image_manip.py:133 [intersection: polygon in process=[(212, 225), (320, 225), (320, 333), (212, 333)]] 10/04/19 10:51:30 zmesdetect_m2[9728] DBG image_manip.py:139 [Active intersects object:person[[(212, 225), (320, 225), (320, 333), (212, 333)]]] 10/04/19 10:51:30 zmesdetect_m2[9728] DBG detect.py:321 [ALPR not in use, no need for look aheads in processing] 10/04/19 10:51:30 zmesdetect_m2[9728] INF detect.py:337 [labels found: ['person']] 10/04/19 10:51:30 zmesdetect_m2[9728] DBG detect.py:338 [match found in /var/lib/zmeventnotification/images/761-alarm.jpg, breaking file loop...] 10/04/19 10:51:30 zmesdetect_m2[9728] ERR detect.py:404 [Could not write image to ZoneMinder as eventpath not present] 10/04/19 10:51:30 zmesdetect_m2[9728] INF detect.py:437 [Prediction string:[a] detected:person:98% ] 10/04/19 10:52:09 zmesdetect_m2[9778] INF detect.py:60 [---------| app version: 4.3.7 |------------] 10/04/19 10:52:09 zmesdetect_m2[9778] DBG utils.py:216 [allowing self-signed certs to work...]
Looks good.
When you run it manually like sudo -u www-data /usr/bin/detect_wrapper.sh 825 2
you can ignore that "Could not write image" error. That simply means that it does not know where to save the detected image. That is because you are not providing the image path. When the ES invokes this script, it invokes it using sudo -u www-data /usr/bin/detect_wrapper.sh 825 2 </path/to/where/this/event/is/located>
Ok great ! Last thing is cnn face detection method is not working. I conclude that is normal, as there is no cnn.py in my /etc/zm/zmeventnotification/hook/zmes_hook_helpers/ Has it been deprecated ?
CNN is a model, not a file. Please create a new issue with specific logs on what you mean by not working. I use CNN all the time.
For sure I did get that CNN was a model not a file. But from my understanding the model needs a helper file to run ... (please don't blame my poor knowledge if I wrote another imprecision in this last sentence !)
Anyway as you mentioned it is another story, another issue. So I am closing this one.
I thank you really much for your responsive and relevant help !
No it doesn't need a helper file. face.py handles both model types.
Ok I understand.
I am going to do some more tests before opening another issue and will collect all relevant logs/info if I really need to open one.
Thanks again
Event Server version 4.2
Hooks version 4.2.5
The version of ZoneMinder you are using: 1.33.14
What is the nature of your issue zmeventnotification is working fine, it detects objects and known faces Yolo detected objets are displayed well in ZM event web console under 'Motion' in 'Cause' column as well as within the pictures but recognized faces are not !
I tried hard but cannot figure out what is wrong and where or what I might have not understood... (moreover it used to work prior that I changed my zm config)
ZM webUI displays :
whereas manual detection for the same event shows :
(Vincent seems to be well recognized !!!)
Debug Logs (if applicable) My objectconfig.ini :
tail -f /var/log/syslog | grep zmeventnotification :
sudo -u www-data ./zmeventnotification.pl --config ./../zmeventnotification.ini :
I have noticed here the :
.. but do not really knows why (my /var/lib/zmeventnotification/images is not empty)