Yet Another Free Extension for Blue Iris Adding AI Object Dectection/Reduction in False Alarms/Enhanced Notification of Activity/On Guard

Have to figure out if can run Deepstack automatically upon Windows computer bootup
You can run DeepStack in a Docker container and have Docker start on boot.
 
You can run DeepStack in a Docker container and have Docker start on boot.
may tackle that after a week or two of making sure everything goes aok. But is good to know. Have never dabbled with Docker container but I'm sure vids on it.
 
OK. As of Sunday noon time, everything seems to be running AOK. I have a total of 3 main front of house cameras now using OnGuard/Deepstack with walk tests performed with 100% results with triggers, alerts, and recordings. Think I finally ironed out the configuration bugs.
Trigger alerts are sent to Blue Iris, have not yet dabbled with MQTT (waiting for ensure all things work for a couple days).
Ken.. upon first adding a new camera. If you forget or syntax config error and you do snapshot, it shows error dialog and exits program. Can change that to not exit the program?
Can add ability to have OnGuard appear in the below taskbar as an option instead of hidden minimized by the lower-right clock? Easier when doing config changes to easily flip back and forth between stuff :)
When adding a camera, default port listed is 80. Blue Iris default is 81. Great for folks that do not use BI, but confusing for those that do cause text says "often 80".
Have to figure out if can run Deepstack automatically upon Windows computer bootup.
Re running Deep Stack on startup: It is easy to run it when the user logs in. Startup without login is harder. Right now the DeepStack is in Beta. Once it goes to Release maybe they'll give the option of running as a service. We could probably do that now if we worked on it since I imagine the steps wouldn't be much different than they were previously. It is somewhat annoying to have it powershell or cmd visible. It is possible to run Powershell completely hidden. I did a Google search on that recently but I've forgotten the details. It isn't too hard. Right now I'm watching the DeepStack performance. I think Docker is overkill for the problem.
 
OK. As of Sunday noon time, everything seems to be running AOK. I have a total of 3 main front of house cameras now using OnGuard/Deepstack with walk tests performed with 100% results with triggers, alerts, and recordings. Think I finally ironed out the configuration bugs.
Trigger alerts are sent to Blue Iris, have not yet dabbled with MQTT (waiting for ensure all things work for a couple days).
Ken.. upon first adding a new camera. If you forget or syntax config error and you do snapshot, it shows error dialog and exits program. Can change that to not exit the program?
Can add ability to have OnGuard appear in the below taskbar as an option instead of hidden minimized by the lower-right clock? Easier when doing config changes to easily flip back and forth between stuff :)
When adding a camera, default port listed is 80. Blue Iris default is 81. Great for folks that do not use BI, but confusing for those that do cause text says "often 80".
Have to figure out if can run Deepstack automatically upon Windows computer bootup.
Unless I run across errors that prevent On Guard from running properly I'm probably going to wait a week or so for another release. I've got a list of cleanup and some minor feature improvements for that release. I'll consider requests, but nothing too big.
 
Re running Deep Stack on startup: It is easy to run it when the user logs in. Startup without login is harder. Right now the DeepStack is in Beta. Once it goes to Release maybe they'll give the option of running as a service. We could probably do that now if we worked on it since I imagine the steps wouldn't be much different than they were previously. It is somewhat annoying to have it powershell or cmd visible. It is possible to run Powershell completely hidden. I did a Google search on that recently but I've forgotten the details. It isn't too hard. Right now I'm watching the DeepStack performance. I think Docker is overkill for the problem.
spoke too soon. Or maybe... I am missing something? One camera catches me (AI_Entrance) as does another (AI_DrivewayR). However, I get no triggered alert for Entrance sent because "0 interesting objects"....but yet, I get red box, 0.99 confidence, SUCCESS in analyze window, red box is included in the zone of interest (can tell by the amber color). I am at a loss at the logic here.
interesting object1.jpg
interesting object2.jpg

------------------
To top it off, just had a guy show up to deliver some takeout order (wrong house)... I get red boxes and 0.99 confidence on AI_Front, yet nothing in the log about any event (trigger, interesting objects, etc). Is this something with DeepstackI should look into?
 

Attachments

  • no trigger alert.jpg
    no trigger alert.jpg
    1.1 MB · Views: 11
I have a request for anyone willing to help.

If the DeepStack people follow through they are going to be providing an easy tool to train the AI to recognize other than the stock objects. When that happens I'd like to train it to recognize people carrying packages and large (Amazon type) envelopes. To do that I'll need a minimum of 400-500 pictures of people doing that. I did some quick searches, and I'm not seeing anywhere near as many as I expected.

So, if you have the time and inclination I'd appreciate it if you could stockpile some of these. At some point I'll probably ask you to upload them to Github. It would be better if they were non-copyrighted material.

Time to target those porch pirates!
 
spoke too soon. Or maybe... I am missing something? One camera catches me (AI_Entrance) as does another (AI_DrivewayR). However, I get no triggered alert for Entrance sent because "0 interesting objects"....but yet, I get red box, 0.99 confidence, SUCCESS in analyze window, red box is included in the zone of interest (can tell by the amber color). I am at a loss at the logic here.
View attachment 78799
View attachment 78800

------------------
To top it off, just had a guy show up to deliver some takeout order (wrong house)... I get red boxes and 0.99 confidence on AI_Front, yet nothing in the log about any event (trigger, interesting objects, etc). Is this something with DeepstackI should look into?
It does look like it should have triggered on this one. The Analyze button goes through the same logic/code as the AI processing images. Analyze clearly shows it as interesting. As a quick re-test why don't you copy that file off, rename it (with the same prefix) and then drop it in your destination directory. I don't think it will be any different, but it couldn't hurt to check. Also, you could post that picture here and I'll do that same test on my box. I don't see why that would be any different, but you never know. Give me the X, Y, Width and Height of the area definition too. That is cutoff in the screen shot.

I haven't seen anything like that on my box, but it could be easy to miss some sort of edge case.
 
It does look like it should have triggered on this one. The Analyze button goes through the same logic/code as the AI processing images. Analyze clearly shows it as interesting. As a quick re-test why don't you copy that file off, rename it (with the same prefix) and then drop it in your destination directory. I don't think it will be any different, but it couldn't hurt to check. Also, you could post that picture here and I'll do that same test on my box. I don't see why that would be any different, but you never know. Give me the X, Y, Width and Height of the area definition too. That is cutoff in the screen shot.

I haven't seen anything like that on my box, but it could be easy to miss some sort of edge case.
I think something is messy on my end. No other folk speak of these issues. Is happening too frequently. Almost as if something is crashing after 1st use. I will investigate. Wish I knew C+ or NET framework to help out :)
Those pix...you can download from here, correct? For your analyze testing purposes.
 
I do put the area of interest (the amber box) to pretty much the entire image screen. could that be tooooo much? oh...you need the exact pic, not my Paint pic. yea...I'll upload.
 
here is the 0920.jpg
 

Attachments

  • AI_Entrance.20210103_162050920.jpg
    AI_Entrance.20210103_162050920.jpg
    248.8 KB · Views: 6
x position: 482
y position: 29
width: 54
height: 135
 
It does look like it should have triggered on this one. The Analyze button goes through the same logic/code as the AI processing images. Analyze clearly shows it as interesting. As a quick re-test why don't you copy that file off, rename it (with the same prefix) and then drop it in your destination directory. I don't think it will be any different, but it couldn't hurt to check. Also, you could post that picture here and I'll do that same test on my box. I don't see why that would be any different, but you never know. Give me the X, Y, Width and Height of the area definition too. That is cutoff in the screen shot.

I haven't seen anything like that on my box, but it could be easy to miss some sort of edge case.
might of figured it out. Do not waste time on my problem just yet. Lemme do 24 hours of testing and I'll let you know.
 
3 walk tests with 3 cameras using OnGuard & Deepstack: 100% successful.
I think I know what went wrong with my configuration.
I have a 192.168.4.x subnet for camera & Blue Iris server which also has Deepstack and OnGuard.
Last week, my Ubiquiti UDM router had an issue and I had to factory reset and quickly rebuild all vlans/subnets/firewalls (I've been having a tire slashing problem and couldn't be without cameras & alerts even for a single evening).
One of the firewall rules was to totally lock down the subnet, everything blocked as is common practice. Not even Blue Iris could check for any updates.
Out of frustration as to why OnGuard/Deepstack was not working this evening....I allowed the Blue Iris server access through the firewall to do the latest BI update ( .10).
I believe allowing the BI server to allow routing into the firewall finally is what made things work as it was messing up localhost & 127.0.0.1 routing.
Still can't input localhost for live camera snapshots, have to use 127.0.0.1 but eh.
But once I allowed Blue Iris server to any port destination, everything has worked (so far).
 
might of figured it out. Do not waste time on my problem just yet. Lemme do 24 hours of testing and I'll let you know.
OK, I was able to duplicate this problem. What was strange that I took a picture that did not trigger anything initially. I copied it. I pasted it into the camera folder, and this time it did trigger. I'm working on it.
 
OK, I was able to duplicate this problem. What was strange that I took a picture that did not trigger anything initially. I copied it. I pasted it into the camera folder, and this time it did trigger. I'm working on it.
When I said that the Analyze button and the analysis performed for live pictures was the same that wasn't 100% true. One thing that could possibly have resulted in "interesting" pictures not being reported correctly is the rejection of parked/motionless vehicles from the "interesting" definition. I not sure that this is the problem, but I'm still working on it. That should not have affected "people" at all, but....

I do expect to release the next version within the next day or two. One thing I've added that would be helpful for all of and and for me is the option to record more detailed information in the log file. I

'm trying to avoid multiple releases close together to avoid annoying all of you. That said, I don't want unresolved issues out there either.
 
When I said that the Analyze button and the analysis performed for live pictures was the same that wasn't 100% true. One thing that could possibly have resulted in "interesting" pictures not being reported correctly is the rejection of parked/motionless vehicles from the "interesting" definition. I not sure that this is the problem, but I'm still working on it. That should not have affected "people" at all, but....

I do expect to release the next version within the next day or two. One thing I've added that would be helpful for all of and and for me is the option to record more detailed information in the log file. I

'm trying to avoid multiple releases close together to avoid annoying all of you. That said, I don't want unresolved issues out there either.
understood. keep in mind, seems I was the only one having this issue. since my firewall rule changes, things have been 100%. so my problems/issues are low priority. I honestly think the 0 interesting issue was due to my firewall lockdown of the entire subnet and blockage of all ports (even 127.0.0.1 somehow).
however, you also were able to duplicate the problem. Hmmm :)
 
That said, I don't want unresolved issues out there either.
There still seems to be an issue when there are parked vehicles in the AOI. When there is a truck parked in my driveway I am getting notifications whenever a vehicle drives by even though they are outside the AOI. In the screenshot below you can see that the moving vehicle in the street is outside of the AOI. However, there was a notification triggered for this event.

2021.01.05 07:25:39:2589 - Successfully notified URL:
Screen Shot 2021-01-05 at 7.30.13 AM.png
 
Last edited:
I have released version 1.4.7 on GitHub here: Release On Guard Security Assistant Version 1.4.7 · Ken98045/On-Guard

This version includes:

Several bug fixes.
The ability to delete the log file from the help menu.
The ability to set a flag for detailed logging from the help menu. This allows the user to determine why the real time images were accepted or rejected as “interesting”.
Revises the logic for detecting and ignoring parked vehicles and vehicles that have multiple definitions (truck, car, etc.). It boosts the confidence level for these vehicles further.
Some minor user interface improvements.
The OnGuard-ReadMe.docx file has changed. Among other things it describes how to setup IFTTT with On Guard.

In particular, note that the log file with Log Detailed Information will allow you (and me) to help determine why live images were accepted or rejected. All of the "detailed" information will be preceded with the notation "(Trace)".

So, please try to redo any apparently incorrect scenarios before posting them here. Look very closely at any notations immediately after the movement. Because of the extensive detail these log files get very long. So, in any posts here please select only the relevant areas and include them as attached files (along with any specific picture that this the subject of the problem). Note specifically the area starting with something like: "(Trace) Starting AI analysis of file: X.jpg" and through the end of the area: " (Trace) Starting FRAME analysis of file: X" with: Y objects" up to the start of the next picture analysis.

Also, if it appears that a picture was flagged as "interesting" but no responses via URL/HTTP or MQTT were made, pay attention to the log file after that point. There is additional (Trace) information there too.

I cannot guarantee I will be able to track your problems with this information, but it certainly improves the odds dramatically. There may be some areas where detailed information should have been provided, but that information was not logged. If so, I'll need to post an update to GitHub with that information.

Because of the need for more detailed log information I won't be able to respond to any previous posts noting the incorrect analysis of and response to apparently valid pictures.

Many thanks to those of you who have tried this product and stuck with it in spite of any bugs!.
 
I have released version 1.4.7 on GitHub here: Release On Guard Security Assistant Version 1.4.7 · Ken98045/On-Guard

This version includes:

Several bug fixes.
The ability to delete the log file from the help menu.
The ability to set a flag for detailed logging from the help menu. This allows the user to determine why the real time images were accepted or rejected as “interesting”.
Revises the logic for detecting and ignoring parked vehicles and vehicles that have multiple definitions (truck, car, etc.). It boosts the confidence level for these vehicles further.
Some minor user interface improvements.
The OnGuard-ReadMe.docx file has changed. Among other things it describes how to setup IFTTT with On Guard.

In particular, note that the log file with Log Detailed Information will allow you (and me) to help determine why live images were accepted or rejected. All of the "detailed" information will be preceded with the notation "(Trace)".

So, please try to redo any apparently incorrect scenarios before posting them here. Look very closely at any notations immediately after the movement. Because of the extensive detail these log files get very long. So, in any posts here please select only the relevant areas and include them as attached files (along with any specific picture that this the subject of the problem). Note specifically the area starting with something like: "(Trace) Starting AI analysis of file: X.jpg" and through the end of the area: " (Trace) Starting FRAME analysis of file: X" with: Y objects" up to the start of the next picture analysis.

Also, if it appears that a picture was flagged as "interesting" but no responses via URL/HTTP or MQTT were made, pay attention to the log file after that point. There is additional (Trace) information there too.

I cannot guarantee I will be able to track your problems with this information, but it certainly improves the odds dramatically. There may be some areas where detailed information should have been provided, but that information was not logged. If so, I'll need to post an update to GitHub with that information.

Because of the need for more detailed log information I won't be able to respond to any previous posts noting the incorrect analysis of and response to apparently valid pictures.

A note on parked vehicles: As stated above the logic for ignoring parked vehicles has changed. I can't guarantee perfection, but I think it is substantially better. Once concern is that moving vehicles may be flagged as parked when they are not. In my tests this didn't happen but it could. Also, I probably need to work more on scenarios where people (or vehicles) are moving in front of parked vehicles. This can change the area definition for the vehicle. I try to account for that by looking at the upper left and lower right corners. It works pretty well when there is only one person there (say at one corner of a car). It will not work very well if there are two or more people and they are at both the left and right corners of the car.

If a vehicle is so far away that one person stepping in front of it change both the left and right edges of the vehicle, then I think that you need to consider revising your area definitions to give them a minimum size for the vehicle.

Also, if the vehicle changes from (1) being recognized by DeepStack and (2) not recognized by DeepStack and then (3) recognized again by DeepStack the vehicle will be flagged as moving. There may be more I can do about that in the future, but not right now.

Many thanks to those of you who have tried this product and stuck with it in spite of any bugs!.
 
Last edited:
1.4.7 still crashes on my server. One thing I noticed in the even log as soon as it crashed was this SQL error.

Log Name: Application
Source: Microsoft-Windows-Perflib
Date: 1/7/2021 6:15:49 PM
Event ID: 2003
Task Category: None
Level: Warning
Keywords:
User: DOMAIN\Administrator
Computer: neptune
Description:
The configuration information of the performance library "sqlctr90.dll" for the "MSSQL$MICROSOFT##SSEE" service does not match the trusted performance library information stored in the registry. The functions in this library will not be treated as trusted.