VorlonCD / bi-aidetection

Alarm system for Blue Iris based on Artificial Intelligence.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
204 stars 45 forks source link

Cancel URL not triggered? #212

Closed balqosz closed 3 years ago

balqosz commented 3 years ago

Hi Vorlon!

I think that, at least in version 988 (recently upgraded from a previous version), the cancel url is not being sent when only irrelevant objects were detected in the image.

Cancel URL IS sent only after detecting relevant objects after "action cancel seconds"

Reverting to 943 and everything works as expected.

Thank you

Best regards

balqosz commented 3 years ago

I append logs here. First part is from version 943, second part is 988. Check lines starting with ####### which are present in 943, but absent in 988. Thanks!

Version 943

2021-03-24 09:22:43.648581|Debug|AITOOLS.EXE|LoadImage|Deepstack_Objects:127.0.0.1:19881|G|None| Image file is valid. Resolution=1280x720, LockMS=7ms (max=10000ms), retries=0, size=107 KB: G.20210324_092242963.jpg|397|2||7 2021-03-24 09:22:43.649579|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (Image resolution=1280x720 @ 96 DPI and 107 KB)|398|1||7 2021-03-24 09:22:43.649579|Debug|AITOOLS.EXE|GetDetectionsFromAIServer|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (1/6) Uploading a 107 KB image to 'DeepStack' (CAM_LowerThresholdOverride=35,Upper=100)(0,35) AI Server at http://127.0.0.1:19881/v1/vision/detection|399|2||7 2021-03-24 09:22:44.656586|Debug|AITOOLS.EXE|DSHandleServerProcMSG|Deepstack_Objects:127.0.0.1:19881|G|DEEPSTACK.EXE| DeepStack:19881>> [GIN] 2021/03/24 - 09:22:44 ; 200 ; 1.0070064s ; 127.0.0.1 ; POST /v1/vision/detection|400|2||18 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (2/6) [Primary] Posted in 1007ms, StatusCode='OK', Received a 398 byte JSON response: '{"success":true,"predictions":[{"confidence":0.51254964,"label":"car","y_min":68,"x_min":1022,"y_max":156,"x_max":1190},{"confid...'|401|1||8 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (3/6) [Primary] Processing 4 results...|402|1||8 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|IsRelevant|Deepstack_Objects:127.0.0.1:19881|G|None| RelevantObjectManager: Skipping 'Default (NEW)' because objects were not defined to trigger, or were set to ignore: Relevant='(NONE)', Irrelevant='(NONE)', Caused ignore='(NONE)', Not Enabled=Car, Not Time=(NONE), No Threshold Match=(NONE) All Triggering Objects='Person', 1 predictions(s), Enabled=1 of 43|403|3||8 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|IsRelevant|Deepstack_Objects:127.0.0.1:19881|G|None| RelevantObjectManager: Skipping 'Default (NEW)' because objects were not defined to trigger, or were set to ignore: Relevant='(NONE)', Irrelevant='(NONE)', Caused ignore='(NONE)', Not Enabled=Car, Not Time=(NONE), No Threshold Match=(NONE) All Triggering Objects='Person', 1 predictions(s), Enabled=1 of 43|404|3||8 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|IsRelevant|Deepstack_Objects:127.0.0.1:19881|G|None| RelevantObjectManager: Skipping 'Default (NEW)' because objects were not defined to trigger, or were set to ignore: Relevant='(NONE)', Irrelevant='(NONE)', Caused ignore='(NONE)', Not Enabled=Car, Not Time=(NONE), No Threshold Match=(NONE) All Triggering Objects='Person', 1 predictions(s), Enabled=1 of 43|405|3||8 2021-03-24 09:22:44.657583|Debug|AITOOLS.EXE|IsRelevant|Deepstack_Objects:127.0.0.1:19881|G|None| RelevantObjectManager: Skipping 'Default (NEW)' because objects were not defined to trigger, or were set to ignore: Relevant='(NONE)', Irrelevant='(NONE)', Caused ignore='(NONE)', Not Enabled=Car, Not Time=(NONE), No Threshold Match=(NONE) All Triggering Objects='Person', 1 predictions(s), Enabled=1 of 43|406|3||8 2021-03-24 09:22:44.658583|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Detected objects:|415|1||8 2021-03-24 09:22:44.658583|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Result='UnwantedObject', Detail='Car (91%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|416|1|Silver|8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Result='UnwantedObject', Detail='Car (90%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|417|1|Silver|8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Result='UnwantedObject', Detail='Car (89%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|418|1|Silver|8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Result='UnwantedObject', Detail='Car (51%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|419|1|Silver|8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| 4x irrelevant, so it's an irrelevant alert.|420|1||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (5/6) Performing CANCEL actions:|421|1||8 ############ 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|AddTriggerActionAsync|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Action 'All' ADDED to queue. Trigger=False, Queued=True, Queue Count=1, Image=V:\EyesAndEars\aainput\G.20210324_092242963.jpg|422|3||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| (6/6) Camera G caused an irrelevant alert.|423|4||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Total Time: 1038 ms (Count= 5, Min= 1038 ms, Max= 4315 ms, Avg= 2679 ms)|424|6||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| AI (URL) Time: 1007 ms (Count= 5, Min= 11 ms, Max= 55183 ms, Avg= 926 ms)|425|5||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| File lock Time: 7 ms (Count= 5, Min= 6 ms, Max= 9 ms, Avg= 8 ms)|426|5||8 2021-03-24 09:22:44.659580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| File load Time: 8 ms (Count= 5, Min= 7 ms, Max= 15 ms, Avg= 12 ms)|427|5||8 2021-03-24 09:22:44.660580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Image Queue Time: 10 ms (Count= 5, Min= 10 ms, Max= 2980 ms, Avg= 1701 ms)|428|5||8 2021-03-24 09:22:44.660580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Image Life Time: 1038 ms (Count= 5, Min= 1038 ms, Max= 4317 ms, Avg= 2680 ms)|429|5||8 2021-03-24 09:22:44.660580|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_092242963.jpg| Image Queue Depth: 1 (Count= 5, Min= 1, Max= 3, Avg= 2)|430|5||8 ############ 2021-03-24 09:22:44.665580|Debug|AITOOLS.EXE|CallTriggerURLs|Deepstack_Objects:127.0.0.1:19881|G|None| No conditional objects found in URL: http://127.0.0.1:9955/admin?camera=G&trigger=0&flagalert=0&user=**********&pw=**********|431|5||10 ############ 2021-03-24 09:22:44.669582|Debug|AITOOLS.EXE|CallTriggerURLs|Deepstack_Objects:127.0.0.1:19881|G|None| -> cancel URL called in 3ms: http://127.0.0.1:9955/admin?camera=G&trigger=0&flagalert=0&user=**********&pw=**, response: 'signal=green profile=1 lock=0 transport=0,0/1 clip=2607629367 camera=G '|432|5||20 ############ 2021-03-24 09:22:44.669582|Debug|AITOOLS.EXE|CallTriggerURLs|Deepstack_Objects:127.0.0.1:19881|G|None| No conditional objects found in URL: http://127.0.0.1:8099/autopatrol.html?AUTOPATROL_ON|433|5||20 2021-03-24 09:22:44.673580|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|None| Found 0 Default*.jpg files in V:\EyesAndEars\aainput|434|5||11 2021-03-24 09:22:44.673580|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|None| Found 0 images in 0 ms. Scanning images...|435|5||11 2021-03-24 09:22:44.673580|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|None| 0 of 0 image files processed, 0 new resolutions found (0 invalid) in 0 ms (Max=500 ms), 0 different image resolutions found: |436|5||11 ############ 2021-03-24 09:22:44.723586|Debug|AITOOLS.EXE|CallTriggerURLs|Deepstack_Objects:127.0.0.1:19881|G|None| -> cancel URL called in 54ms: http://127.0.0.1:8099/autopatrol.html?AUTOPATROL_ON, response: ' EventGhost Blueiris Autopatrol '|437|5||20


Version 988:

2021-03-24 08:58:31.822647|Debug|AITOOLS.EXE|LoadImage|Deepstack_Objects:127.0.0.1:19881|G|| Image file is valid. Resolution=1280x720, LockMS=6ms (max=10000ms), retries=0, size=107 KB: G.20210324_085831763.jpg|562|2||4 2021-03-24 08:58:31.823649|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (Image resolution=1280x720 @ 96 DPI and 107 KB)|563|1||4 2021-03-24 08:58:31.823649|Debug|AITOOLS.EXE|GetDetectionsFromAIServer|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (1/6) Uploading a 107 KB image to 'DeepStack' (CAM_LowerThresholdOverride=35,Upper=100)(0,35) AI Server at http://127.0.0.1:19881/v1/vision/detection|564|2||12 2021-03-24 08:58:32.708646|Debug|AITOOLS.EXE|DSHandleServerProcMSG|Deepstack_Objects:127.0.0.1:19881|G|DEEPSTACK.EXE| DeepStack:19881>> [GIN] 2021/03/24 - 08:58:32 ; 200 ; 884.9969ms ; 127.0.0.1 ; POST /v1/vision/detection|565|2||13 2021-03-24 08:58:32.708646|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (2/6) [Primary] Posted in 885ms, StatusCode='OK', Received a 397 byte JSON response: '{"success":true,"predictions":[{"confidence":0.5935942,"label":"car","y_min":67,"x_min":1023,"y_max":151,"x_max":1190},{"confide...'|566|1||21 2021-03-24 08:58:32.708646|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (3/6) [Primary] Processing 4 results...|567|1||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Detected objects:|580|1||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Result='UnwantedObject', Detail='Car (92%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|581|1|Silver|21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Result='UnwantedObject', Detail='Car (91%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|582|1|Silver|21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Result='UnwantedObject', Detail='Car (89%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|583|1|Silver|21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Result='UnwantedObject', Detail='Car (59%)', ObjType='Vehicle', DynMaskResult='Unknown', DynMaskType='Unknown', ImgMaskResult='Unknown', ImgMaskType='Unknown'|584|1|Silver|21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| 4x irrelevant, so it's an irrelevant alert.|585|1||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (5/6) Performing 1 CANCEL actions:|586|1||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| (6/6) Camera G caused an irrelevant alert.|587|3||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Total Time: 940 ms (Count= 314, Min= 799 ms, Max= 5680 ms, Avg= 1180 ms)|588|4||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| AI (URL) Time: 885 ms (Count= 314, Min= 11 ms, Max= 55183 ms, Avg= 885 ms)|589|4||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| File lock Time: 6 ms (Count= 314, Min= 5 ms, Max= 139 ms, Avg= 20 ms)|590|4||21 2021-03-24 08:58:32.709647|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| File load Time: 9 ms (Count= 314, Min= 2 ms, Max= 18 ms, Avg= 6 ms)|591|4||21 2021-03-24 08:58:32.710645|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Image Queue Time: 37 ms (Count= 312, Min= 1 ms, Max= 4829 ms, Avg= 249 ms)|592|4||21 2021-03-24 08:58:32.710645|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Image Life Time: 940 ms (Count= 314, Min= 800 ms, Max= 5681 ms, Avg= 1181 ms)|593|5||21 2021-03-24 08:58:32.710645|Debug|AITOOLS.EXE|DetectObjects|Deepstack_Objects:127.0.0.1:19881|G|G.20210324_085831763.jpg| Image Queue Depth: 1 (Count= 432, Min= 1, Max= 6, Avg= 1)|594|5||21 2021-03-24 08:58:32.729645|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|| Found 0 Default*.jpg files in V:\EyesAndEars\aainput|595|2||24 2021-03-24 08:58:32.729645|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|| Found 0 images in 0 ms. Scanning images...|596|2||24 2021-03-24 08:58:32.729645|Debug|AITOOLS.EXE|ScanImages|Deepstack_Objects:127.0.0.1:19881|G|| 0 of 0 image files processed, 0 new resolutions found (0 invalid) in 0 ms (Max=500 ms), 0 different image resolutions found: |597|2||24

VorlonCD commented 3 years ago

If this doesnt fix, send me updated log. Also, the same issue would have happened if you didnt have either of the two cancel actions enabled for the camera. AITool-VorlonCD-v2.0.1014.zip

balqosz commented 3 years ago

A quick test shows this seems fixed! Thank you!!!

Best regards