Wednesday, July 14, 2021

Blue Iris with DeepStack Notes

Been keeping notes of what I've see since DeepStack has been integrated with Blue Iris. Moving here for others to see. Hopefully to help them when encountering similar issues.

Iris6: Updates so far: timestamp is when the version was backed up / replaced, not installed. 

C:\Program Files\Blue Iris 5\BlueIris_*.exe

-rwxr-x---+ 1 Administrators avata 17048024 Apr 23  2020 BlueIris_52601.exe

-rwxr-x---+ 1 Administrators avata 17048536 Apr 26  2020 BlueIris_52603.exe

-rwxr-x---+ 1 Administrators avata 17049048 May 16  2020 BlueIris_52712.exe

-rwxr-x---+ 1 Administrators avata 17873880 Apr  5 18:47 BlueIris_54102.exe

-rwxr-x---+ 1 Administrators avata 17875416 Apr  6 10:54 BlueIris_54200.exe

-rwxr-x---+ 1 Administrators avata 17877464 Apr  8 13:40 BlueIris_54202.exe

-rwxr-x---+ 1 Administrators avata 17885144 Apr 14 17:10 BlueIris_54305.exe

-rwxr-x---+ 1 Administrators avata 17975256 Apr 17 16:09 BlueIris_54308.exe

-rwxr-x---+ 1 Administrators avata 17975256 Apr 20 17:40 BlueIris_54309.exe

-rwxr-x---+ 1 Administrators avata 17976280 Apr 22 19:00 BlueIris_54311.exe

-rwxr-x---+ 1 Administrators avata 17976280 Apr 25 14:54 BlueIris_54312.exe

-rwxr-x---+ 1 Administrators avata 17979864 May  6 22:02 BlueIris_54407.exe

-rwxr-x---+ 1 Administrators avata 17982424 May 13 13:57 BlueIris_54503.exe

-rwxr-x---+ 1 Administrators avata 17985496 May 19 16:21 BlueIris_54602.exe

-rwxr-x---+ 1 Administrators avata 17986008 May 20 14:05 BlueIris_54603.exe

-rwxr-x---+ 1 Administrators avata 17995736 Jun  2 17:58 BlueIris_54707.exe

-rwxr-x---+ 1 Administrators avata 17995736 Jun  4 17:04 BlueIris_54708.exe

-rwxr-x---+ 1 Administrators avata 17996760 Jun  8 16:46 BlueIris_54709.exe

-rwxr-x---+ 1 Administrators avata 17997784 Jun 11 17:04 BlueIris_54711.exe

-rwxr-x---+ 1 Administrators avata 18009048 Jun 17 13:03 BlueIris_54801.exe

-rwxr-x---+ 1 Administrators avata 18323416 Jun 19 11:07 BlueIris_54802.exe

-rwxr-x---+ 1 Administrators avata 18327000 Jun 26 11:09 BlueIris_54901.exe

-rwxr-x---+ 1 Administrators avata 18329048 Jun 28 19:03 BlueIris_54902.exe

-rwxr-x---+ 1 Administrators avata 18352088 Jul  8 17:25 BlueIris_54906.exe

-rwxr-x---+ 1 Administrators avata 18358744 Jul 12 16:41 BlueIris_54907.exe

Initial gotchas from testing with single indoor cam

Hell Yeah! Direct Deepstack Integration - 5.4.0 - March 31, 2021

Testing with Amcrest 4k in living room, Blue Iris 5.4.2.2 and DeepStack CPU version for Windows. Doing basic test of walking the same path to see how various options affected detection.

Alerts must be enabled and set to triggered for AI to work even though no actions might exist.

Turning on any "advanced objection" (for instance to only check motion in zones) will limit to to ~30 secs min between AI calls.

Dropping the break to .1 secs still only got down to one pic per 1 sec make and only one AI recog/10 secs (even with make of .5 and breal of .1 only got 23 pics in ~30 seconds of action with only 2 of those AI rec pics. Though on one run I got 4 AI rec pics of 24 in 40 seconds of action.

Setting min time between alerts got me 4 of 23 in 37 secs of action.

Adding also on retriggers got 3 of 23 in 42 secs of action.

Switch from edge vector to simple algorithm and got 4 of 11 in 31 secs (Note 3 of the 4 were in a 9 sec window)

Switch back to edge vector and added hi-def and got 2 of 24 in 41 secs

Increased min obj size and contrast to 608/50 from 550/25 which got me 0 of 8 in 26 secs

Turned off hi-def and got 1 of 8 in 27 secs

Reduce contrast back to 25 got 2 of 18 in 33 secs

set min obj size to 401

Set to send 30 frames to AI per alert and set make to 30 sec. Got 0 of 1 frame IDed

Set break to 3 secs and got 3 of 3 frames IDed

Set break to 0.5 and got 6 of 15 frames IDed

4/12/2021 

On version 5.4.3.5

Setup on most of the live outdoor cams on Iris6.

4/17/2021 @ 16:54 Iris6

Changed DeepStack from Medium to High


Upgrade to 5.4.3.8


4/20/2021 20:08

Upgrade to 5.4.3.9


4/23/2021 19:32

Upgrade 5.4.3.11


4/25/2021

Upgrade 5.4.3.12

Seeing some issues with person detection.



4/27/2021 11:11

Adding email and SMS alerts using sites gmail. Variables available are:

&ALERT_DB The DB record locator for the most recent alert image for the camera.

&ALERT_PATH The path to the most recent alert image on the camera. Note that alert images are not saved to disc by default;

this is controlled with a setting on the Trigger page in camera settings.

&CAM Camera’s short name

&FILE The path to the currently recording clip on the camera

&MOTION_RECT The coordinates of a rectangle enclosing the motion [left,top,right,bottom]; values are normalized 0-1.

&NAME Camera’s long name

&PLATE License plate captured with ALPR if configured

&PRESET The most recently used PTZ preset on the camera

&PROFILE The active profile number

&SERVER The system name as set on the Settings/About page

&TYPE The source of the camera trigger, for example MOTION_A, EXTERNAL, or DIO. The letters following MOTION refer to the motion zones. Most useful for knowing if motion or external sensor trigger

&WAN The current system WAN address as shown on the Settings/Web server page

%x, %X, etc. Date and time. See the table below for a full list of time formatting macros.

&MEMO info like object type and confidence %


Email template

Blue Iris alert &MEMO on &CAM

Motion detected on camera: &CAM 

Name: &NAME

Alert Type: &TYPE

Area: &MOTION_RECT

Profile: &PROFILE

Preset: &PRESET

Memo: &MEMO

plate: &PLATE

Select first 2 attaches


SMS template

Blue Iris alert &MEMO

Motion detected on camera: &NAME

&TYPE

No attachments

Facial recognition seems iffy at best.


4/31/20201 

Upgrade 5.4.4.2

Added script and alert actions to copy confirmed alerts into folders by object found.

Note a space in the comma delimited list of object types will stop the AI from processing!


5/2/2021

Add actions to copy alert files to folders based on object types detected.

Pics are in folders by type AI detected, not what is actually in the shot.

Known types

bird, cat, dog, horse, sheep, cow

lumped into other folder: elephant, bear, zebra, giraffe, person

See robmarkcole/HASS-Deepstack-object.

Bumped min confidence to 60% on DAH412

5/3/2021

Upgrade 5.4.4.2

noticed mouse was not in "animal" list but is in object type list so added things to look for on DAH412

Set min confidence to 60% on DAH628 to cut down on seeing a tree as a person

Added save flagged actions to AM476

AI set to detect 

mouse,bird,cat,dog,horse,sheep,cow,elephant,bear,zebra,giraffe,person,car,truck,bus,bicycle,motorcycle


copyPublic.bat script is

echo %* >> F:\BlueIris\cpLog.out

copy E:\BlueIris\Alerts\%2 C:\_dea\odrive\GD.video\cams\flagged\%1 2>&1 >> F:\BlueIris\cpLog.out

Note first line is just for a debug log

Action looks like 

 

Note this action on fires if the AI detects at least one of the Required AI objects. In this example elephant,bear,zebra,giraffe,person

other is the folder here and &ALERT_PATH is the filename of the marked up alert.

5/4/2021 

made aliases for scripts so could tell in actions windows which was which and moved the bat and log files to the flagged folder.

Added scripts and folders for bear and person.

Also added &MEMO to all the actions so will be in log.

C:\_dea\odrive\GD.video\cams\flagged\copyPerson.bat

person &ALERT_PATH &MEMO

 

5/7/2021 10:16

Upgrade to 5.4.4.7

5/8/2021 14:39

Noticed a typo in copyPublic.bat script made on 5/4 broke all the saving of flagged alerts fail. Fixed it.

Also changed repost when triggered from every 10 sec to every 60 to try and stop Odrive warnings about long wait times.


5/9/2021 13:10

Removing "truck,bus,bicycle,motorcycle,car" from DAH616 AND IPcam124 now detection set to

mouse,bird,cat,dog,horse,sheep,cow,elephant,bear,zebra,giraffe,person:80

DAH628 changed to mouse,bird,cat,dog,horse,sheep,cow,elephant,bear,zebra,giraffe,person:70

Replacing dead DAH626 with DAH345 set to 

mouse,bird,cat,dog,horse,sheep,cow,elephant,bear,zebra,giraffe,person @ 60%


5/14/2021 System hung ~4:42 AM

rebooted and upgraded to 5.4.5.3 (note 5.4.4.8 is now listed as stable)


6/3/2021 

upgrade to 5.4.7.7 to get custom models support. (note almost no detected objects after)


,licence-plate,logo

Note: Turned out you can only have one custom model.


6/5/2021

upgrade 5.4.7.8 to try and sort almost nothing being detected. Helped but still detecting less than before. Seem to be getting fewer triggers causing fewer frames sent to AI.

6/8/2021

Increase extra frames to 30

upgrade 5.4.7.9 to try and sort almost nothing being detected. 

6/9/2021

turned off custom models which helped on cams set to 10 sec end triggers so set all cams to 10 secs.

It appears the second model is causing the issues. Left just the logo model in the custom folder and things seem to be back to normal.

Also turning off ignore static objects as that seems to be causing issues.


6/15/2021 11:33

switch custom model from logos to plates and upgrade to 5.4.7.11

6/18/2021

update to 5.4.8.1. Adds DeepStack stats dialog.





6/22/2021 9AM

update to 5.4.8.2 (note said 6/17/2021 though not there 6/18)

Finally got a licence-plate hit.

10:10 AM

Added plates to saved alerts.

licence-plate

C:\_dea\odrive\GD.video\cams\flagged\copyPlate.bat

plate &ALERT_PATH &MEMO

6/26/2021 14:34

update to 5.4.9.1

6/29/2021 15:30

Swapped logo custom model for plate one since all it tells you is there is a readable plate in the frame and often mistakes signs for plates.


18:09

update Iris6 to 5.4.9.2

Set up a flag archive script for logo objects

amazon,audi,bmw,chevrolet,chevrolet_text,fedex,ford,homedepot,homedepot_text,honda,honda_text,hyundai,hyundai_text,infiniti,infiniti_text,kia,lexus,mercedesbenz,mitsubishi,nike,nissan,porsche,renault,subaru,toyota,ups,volvo,walmart

Cloned cams from Iris4 (BI4) to Iris7 with BI5. Massive CPU reduction so installed and setup DeepStack 5.3.9.2 Working well.

7/10/2021

update Iris6 and Iris7 to 5.4.9.6

Iris6:lmost no alerts much less IDed. Cancelled alerts say DeepStack -1. Tried rebooting and such.

Iris7: still working as before.

7/12/2021 17:00

update Iris6 to 5.4.9.7

Iris6: Still almost nothing getting IDed. Running a clip of me returning from the mailbox registered my face and nothing else. I've unchecked custom models, "default objects and face recog but that did not help. Cancelled alerts say DeepStack -1. Tried rebooting and such.

Iris7: still working as before.

20:07 

reverted to 5.4.8.2

Started see alerts almost immediately. Ran the clip through analyse again and is seeing multiple times.




7/14/2021 11:47

Without changing anything IDs on Iris7 seem to have returned to normal.





Tuesday, February 23, 2021

Uncheck preserve time order unless you need the 000 image to always be the latest.

Not sure how but somehow I seemed to miss what Post tab, check Post JPEGs, check Maintain a ring of [some number], check preserve time order actually does. The default seems to be checked though I notice it is unchecked on some of my cams which I guess is why I had not noticed that when checked it renames all the posts in the ring so the newest is 000. Similar to log file rings if you are familiar. Now this is great if you want to use the 000 image on a web page or app to show the latest and only keeping a few. Not so great if your ring is a larger number like 10K or you are, as I was just trying to do, generate a time lapse from them. Since the file names keep changing it gets messy real fast. Especially if you are trying to save off some before they cycle off and then add the newer ones. I saw names changing mid copy for instance. Even worse if you are syncing those images to the cloud since it is not only having to process uploads but name changes. Assuming you upload app even recognizes name changes of course and is not reuploading each file multiple times. Not sure what CPU load this having but considering I have some rings set to 10K on servers that are about max safe CPU it is probably not insignificant. 

So make sure "preserve time order" is unchecked unless you really need that image order.

While here you might want to think about "Also post No Signal images". Again checking this might make sense for a local display of the latest image but in most cases it is a waste of resources.





For more on optimizing your Blue Iris server performance check out Optimizing Blue Iris's CPU Usage