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

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
This was fixed a couple of releases ago. However, those releases with the fixes were marked as "Pre-Release".
Please use the one from here: Release On Guard Security Assistant Version 1.6.1.2 · Ken98045/On-Guard

I was waiting to have at least a few people try these "pre-releases" before tagging them as "releases". In the last couple of minutes I just marked the latest (1.6.1.2) as a "release" since it is at least better than the version you are apparently running. I did just triple check the bug you are referring to to make sure it is gone.

Note that the "current" version is 1.6.1, and should say so in help/about window.
Also, note that the 1.6.1 version contains support for connecting to multiple DeepStack servers.
Thanks Ken, I have 4 instances of DeepStack running and will let it run through the night. I'll let you know if I see any issues.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Thanks Ken, I have 4 instances of DeepStack running and will let it run through the night. I'll let you know if I see any issues.
With a decent card you should be able to scroll through images using Page Up/Down at the full keyboard repeat speed (almost video --at least silent film days) frame rates. I am running 10 AI connections at the moment.

BTW, I did run across something some of you may be interested in. On the Microsoft Store there is an application called Windows Terminal (bad choice in name). With that you can run your DeepStack instances in one window with multiple tabs. Your command to start the window will look something like: wt deepstack --VISION-DETECTION True --PORT 8099; deepstack --VISION-DETECTION True --PORT 8098; deepstack --VISION-DETECTION True --PORT 8097; deepstack --VISION-DETECTION True --PORT 8096; deepstack --VISION-DETECTION True --PORT 8095; deepstack --VISION-DETECTION True --PORT 8094; deepstack --VISION-DETECTION True --PORT 8093; deepstack --VISION-DETECTION True --PORT 8092; deepstack --VISION-DETECTION True --PORT 8091; deepstack --VISION-DETECTION True --PORT 8090. In the image below each "Wind" has similar output for each DeepStack instance.

There are probably many other ways to do this, but this one is relatively user friendly, and you can easily look at all of your DeepStack output. It (or DeepStack) uses up a lot of memory (particularly at first, but it seems to release some memory after a few minutes for some reason).

To get around the Windows path limitation (260 characters) you will need to do a Windows Registry change (and re-boot). Unfortunately, I didn't bookmark the site describing in detail how to do that.

1611298422746.png

Be aware that IMO the only real reason to use multiple DeepStack instances (on one computer) is that DeepStack isn't capable of parallel processing multiple images at once. I am relatively sure that this will be corrected at some point.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Oh wow - so from that memo field, does the text that you put into that field then show up in the BI log next to the alert? Like right now, Plate Recognizer looks like this in the BI Alert file:

3 1/1/2021 12:03:20 AM Upstreet MOTION
3 1/1/2021 12:03:21 AM LPR1clone MOTION
0 1/1/2021 12:03:22 AM LPR1clone Plate: AXC7848 [91.4%]
3 1/1/2021 12:03:22 AM Street MOTION
I'm not sure. I know that plate recognizer is part of or has a business relationship with BI. Maybe they have a special arrangement with them. I'll look into it further. Maybe there is more that can be done.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Here's another one that moved.

View attachment 80204

I also noticed that when the registration point moves the AOI shifts as well. This occurs even though the GUI doesn't reflect the AOI shift. When this occurs motion does not get triggered in the affected area.
OK, that's very helpful. It looks like the resolution numbers are correct, assuming your images are always 720x1280. I wanted to rule out some screwy values being put there. If you ever have a case where the resolution of your camera changes (say going into night mode) that would also be good to know.

The registration change + area change was a deliberate attempt to give an adjustment in case the camera moved slightly. Many PTZ cameras don't allow provide for 100% accurate movement even to presets. So, rather than needing to rearrange the areas with a slight shift in camera this can be very helpful. For larger camera shifts this doesn't help much, or can be a problem. However, it all depends on the camera angles. That is documented behavior.

This is really the only case where the registration mark is expected to change: When you change it deliberately using ctrl + click. Even then it asks you for confirmation that you want to change it. Obviously that isn't the case with you. The other time it changes is when you change cameras in the UI, or it is read and/or re-saved to the registry. It is possible something is getting messed up there, but I don't see it happening to me.

What I may need to do for you is to get you a version that logs absolutely everything that changes these values (including loading/saving the data to and from the registry). Let me know what version you are running. It is obviously greater than or equal to 1.5.x, but to get you a version without your needing to upgrade I would need to know precisely. However, if you don't mind upgrading to version 1.6.1 that would make tracking it down easier.

I'll be looking at this tomorrow as a first priority, but it may be very difficult to track without a log file with that information.
 

netmax

Getting the hang of it
Joined
Sep 6, 2015
Messages
30
Reaction score
25
@Ken98045 I really would love to use your great piece of software, but what is the reason behind such a high requirement of MS SQL server 2019? Why can't 2016 or before work?
I run all my instances on Windows Server 2012R2 (because I have licenses for it) and would never run a CCTV server on Windows 10 sh1t (with unpredictable restarts), but SQL2019 can't be installed here. Is there any way to use a lower version of MS SQL Express?
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
@Ken98045 I really would love to use your great piece of software, but what is the reason behind such a high requirement of MS SQL server 2019? Why can't 2016 or before work?
I run all my instances on Windows Server 2012R2 (because I have licenses for it) and would never run a CCTV server on Windows 10 sh1t (with unpredictable restarts), but SQL2019 can't be installed here. Is there any way to use a lower version of MS SQL Express?
I had to select something. It seemed reasonable to include a limited version of SQL 2019 (LocalDB) rather than load 5+ year old (or 13 year old in the case of SQL 2008) software onto peoples machines. However, you are correct in that the SQL installation process needs to be fixed. Another contributor to the project said he would probably take on the installer part. I don't know if he still plans on doing so. If I don't hear from him in a week or so I'll see what I can do.

The installer does give me the option to install 2019, 2017, 2012, 2008. I could just choose one, but which one? The other option is not not require any prerequisites, and just tell the user to install some version of SQL on their own. That doesn't seem like a great solution either since the application would not function properly if the DB isn't installed. In addition, the standalone localDB installers (except maybe 2008?) are far from user friendly for a user that doesn't know SQL.

I will be adding a new release (either 1.6.3 or 1.7.1) that allows the user to enter a custom connection string. That needs to be done anyway. The reason I didn't have it before was that it is pretty scary for the user who does not know SQL.

I'm open to specific suggestions. I'm a little inclined toward using 2008 either as a prerequisite or as a user installation requirement. I think the 2008 stand alone install isn't too bad. I know that the 2019 one is horrid.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I had to select something. It seemed reasonable to include a limited version of SQL 2019 (LocalDB) rather than load 5+ year old (or 13 year old in the case of SQL 2008) software onto peoples machines. However, you are correct in that the SQL installation process needs to be fixed. Another contributor to the project said he would probably take on the installer part. I don't know if he still plans on doing so. If I don't hear from him in a week or so I'll see what I can do.

The installer does give me the option to install 2019, 2017, 2012, 2008. I could just choose one, but which one? The other option is not not require any prerequisites, and just tell the user to install some version of SQL on their own. That doesn't seem like a great solution either since the application would not function properly if the DB isn't installed. In addition, the standalone localDB installers (except maybe 2008?) are far from user friendly for a user that doesn't know SQL.

I will be adding a new release (either 1.6.3 or 1.7.1) that allows the user to enter a custom connection string. That needs to be done anyway. The reason I didn't have it before was that it is pretty scary for the user who does not know SQL.

I'm open to specific suggestions. I'm a little inclined toward using 2008 either as a prerequisite or as a user installation requirement. I think the 2008 stand alone install isn't too bad. I know that the 2019 one is horrid.
This may or may not will not solve your DB problems completely, but I have added the ability to define a custom database connection string.
The release is located here: Release On Guard Security Assistant Version 1.6.2 · Ken98045/On-Guard.

ALSO: I Added a "Release" folder on GitHub zip file (Under OnGuardRelease.zip). This contains the executable and related support files. So, you can run the executable from that folder without ever running the installer. That might get around your installer/SQL issue. You might still need to install some of the other support files (.Net Framework 4.7.2), but if your Windows install is anywhere near up to date you shouldn't.

You would need to point your custom database connection string to DBMotionFrames files. That connection string is on the Application Settings dialog. Alternatively, you could probably extract the schema (very, very simple) and put in your SQL instance someplace.

Let me know if this helps. Also, please provide any database setup suggestions you may have.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
I might have fixed it and forgot that I did :) As one of the 2% oldest software engineers on the planet my memory isn't perfect.
I think I spoke too soon. I just updated to 1.6.2 and all of my reference points moved again. While putting them back to their original position I had one AOI at the bottom of the screen for one camera that was not visible. The scroll bar on the right side of the screen would let me scroll down so that the AOI could be seen but as soon as I moved the mouse into the main window the screen would reposition to the point that the AOI moved out of sight again. I had to delete all the AOI's for that camera and recreate them. Sorry, I should have grabbed some screenshots and or log files, but I didn't.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I think I spoke too soon. I just updated to 1.6.2 and all of my reference points moved again. While putting them back to their original position I had one AOI at the bottom of the screen for one camera that was not visible. The scroll bar on the right side of the screen would let me scroll down so that the AOI could be seen but as soon as I moved the mouse into the main window the screen would reposition to the point that the AOI moved out of sight again. I had to delete all the AOI's for that camera and recreate them. Sorry, I should have grabbed some screenshots and or log files, but I didn't.
I did see it go bad on one of my computers in the last few minutes (after checking all day). I'll keep looking
 

netmax

Getting the hang of it
Joined
Sep 6, 2015
Messages
30
Reaction score
25
You would need to point your custom database connection string to DBMotionFrames files. That connection string is on the Application Settings dialog. Alternatively, you could probably extract the schema (very, very simple) and put in your SQL instance someplace.

Let me know if this helps. Also, please provide any database setup suggestions you may have.
I've installed this SQL2016 Express and this version, left the SQL string as it was and it seems to work. How would I notice in case the SQL would not work?

I've also discovered an issue: When the BI server is not reachable and you click on "continuous" in a cam view, the software crashes. If you click Snapshot, you'll get an error message that the server does not react and it then crashes.

Next, it would be great if the AOI could be a polygon or at least it you could move any of the 4 edges. Camera AOI areas are not perfectly aligned to vertical and horizontal lines.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I've installed this SQL2016 Express and this version, left the SQL string as it was and it seems to work. How would I notice in case the SQL would not work?

I've also discovered an issue: When the BI server is not reachable and you click on "continuous" in a cam view, the software crashes. If you click Snapshot, you'll get an error message that the server does not react and it then crashes.

Next, it would be great if the AOI could be a polygon or at least it you could move any of the 4 edges. Camera AOI areas are not perfectly aligned to vertical and horizontal lines.
I think I spoke too soon. I just updated to 1.6.2 and all of my reference points moved again. While putting them back to their original position I had one AOI at the bottom of the screen for one camera that was not visible. The scroll bar on the right side of the screen would let me scroll down so that the AOI could be seen but as soon as I moved the mouse into the main window the screen would reposition to the point that the AOI moved out of sight again. I had to delete all the AOI's for that camera and recreate them. Sorry, I should have grabbed some screenshots and or log files, but I didn't.
OK, I am about 99% certain I fixed the issue. Even though you probably don't care I'll tell you what was going on.
1. The height resolution in the Live Camera setting was incorrectly being saved with the X Resolution. This was due to a typo at about 2:00am where an X looks awfully like an Y.
2. That resulted in a Snapshot (or worse Continuous button) being forced onto a square rather than the standard rectangle. The app attempted to adjust the registration point to cope with that.
3. When you went back to standard captured frames the app would try to force the registration back into a rectangle aspect ratio. It didn't get it back correctly.
4. When the camera stuff got saved the registration point got saved with the incorrect values.
5. In my testing prior to the release I probably didn't use the snapshot or continuous feature, or if I did I didn't notice the problem. In any event, the was nasty to track down.

The fixed is here along with the bonus feature of being able to keep pictures with objects when you "Cleanup Old Pictures": Release On Guard Security Assistant Version 1.7.1 · Ken98045/On-Guard
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I've installed this SQL2016 Express and this version, left the SQL string as it was and it seems to work. How would I notice in case the SQL would not work?

I've also discovered an issue: When the BI server is not reachable and you click on "continuous" in a cam view, the software crashes. If you click Snapshot, you'll get an error message that the server does not react and it then crashes.

Next, it would be great if the AOI could be a polygon or at least it you could move any of the 4 edges. Camera AOI areas are not perfectly aligned to vertical and horizontal lines.
You can move all 4 edges and all corners when defining an area. The polygon issue is something I've thought about. However, the code would be much more complicated if I was using polygons. I'd need to both determine if objects were within the polygon, but worse get the overlap percentage of the polygon. While that is on the long term list of things to do, it probably isn't happening soon. While this is a limitation, you can just use multiple rectangles now, or even multiple rectangles with an ignore are in the middle if you want. For practical purposes the way it is now works pretty well in about 90% of the cases. Yes, it would be a nice feature to have though.

I'm not sure what you mean about the AOI not being perfectly aligned. Yes they are all up and down (exactly as far as I know) with the underlying picture pixels. That's not to say that those lines would appear to match vertical/horizontal features in a picture. That depends on camera alignment and angles/depth.

If you don't have the camera setup properly the snapshot will return an error. That is correct.

The "crash" on the continuous was actually deliberate because the continuous stuff just calls the snapshot code repeatedly. If there is an error connection to the Blue Iris for a snapshot you would end up with hundreds or thousands of the snapshot warning message all wanting you to press OK. Therefore, continuous exits in those cases. So, fix the Snapshot issue first.

I've never had a case where the snapshot fails to get an image properly if the IPAddress and Port are correct and anti-virus doesn't interfere.

The sole job (right now) of the SQL stuff is to track the pictures with motion in them (well, actually recognized objects). So, if you use the "Motion Only" button and you can move to pictures with motion in them it works. In addition, SQL errors are logged in the log file. Please change the connection string only if you really need to (things don't work without it).
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
You can move all 4 edges and all corners when defining an area. The polygon issue is something I've thought about. However, the code would be much more complicated if I was using polygons. I'd need to both determine if objects were within the polygon, but worse get the overlap percentage of the polygon. While that is on the long term list of things to do, it probably isn't happening soon. While this is a limitation, you can just use multiple rectangles now, or even multiple rectangles with an ignore are in the middle if you want. For practical purposes the way it is now works pretty well in about 90% of the cases. Yes, it would be a nice feature to have though.

I'm not sure what you mean about the AOI not being perfectly aligned. Yes they are all up and down (exactly as far as I know) with the underlying picture pixels. That's not to say that those lines would appear to match vertical/horizontal features in a picture. That depends on camera alignment and angles/depth.

If you don't have the camera setup properly the snapshot will return an error message. That is correct.

The "crash" on the continuous was actually deliberate because the continuous stuff just calls the snapshot code repeatedly. If there is an error connection to the Blue Iris for a snapshot you would end up with hundreds or thousands of the snapshot warning message all wanting you to press OK. That is more than a little annoying. Therefore, continuous exits in those cases. So, fix the Snapshot issue first.

I've never had a case where the snapshot fails to get an image properly if the IPAddress and Port are correct and anti-virus doesn't interfere.

The sole job (right now) of the SQL stuff is to track the pictures with motion in them (well, actually recognized objects). So, if you use the "Motion Only" button and you can move to pictures with motion in them it works. In addition, SQL errors are logged in the log file. Please change the connection string only if you really need to (things don't work without it).
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I'm also experiencing multiple crashes in 1.6.2.

View attachment 80339
This looks like the problem originated when attempting to send a confirm or flag to Blue Iris. I'll look into it. Obviously I'm not handling any areas there "gracefully", but I don't know if the issue is something specific to BI or me yet. I'll keep looking. In the mean time if you want to stay operational you might uncheck the "confirm" and "flag" boxes for your areas.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I did update BI to 5.3.8.12 yesterday as well so it might be related to that.
I do need to fix it so it doesn’t nuke the app in cases like this. I will probably put out a minor release with no new features but fixes like that relatively soon. However I do want to slow down releases a bit
 
Top