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

taylorjm

n3wb
Joined
Oct 12, 2020
Messages
3
Reaction score
0
Location
Saginaw, Michigan
Comparing an i5 to an i3 is not really valid. You really need to compare the full processor number. You are right, it probably is the hardware. Your specific i3's probably do not have enough horsepower to do everything you are asking.

What specific Intel processors are you talking about?
I would agree with you except neither deepstack or Onguard have listed a miniumum requirement. So having the full intel processor number isn't really going to help unless you can find documentation listing specific minimums and not just a "suggested" system.
 
Joined
Aug 8, 2018
Messages
7,423
Reaction score
26,019
Location
Spring, Texas
neither deepstack or Onguard have listed a miniumum requirement
That means nothing. So you have BI, Deepstack, and Onguard running on the same machine, and since DS and OG do not list a minimum requirement you don't think horsepower makes a difference? In that line of reasoning, they should work on an old 8086 processor.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
From what I've seen on the DeepStack web site they expect another version of their Windows engine out in November (yes, this November). This is supposed to considerably speed up processing/detection time. This may make the application able to run on a I3. I think that it is available now for Linux, but Windows is lagging behind in development.

There is nothing I know of that would prevent a connection to DeepStack on an I3. It is possible that you may also have limited memory on your I3 system that could be contributing to the problem. Other than that it should work. I suggest a minimum of 8 RAM.

I would definitely not recommend using it on an I3 however. I have a 4 core/8 thread I7 processor on my machine. Even then it takes about 0.8 seconds to analyze a frame. On an I3 I wouldn't be surprised at 5+ seconds. However, OnGuard does queue images waiting for the processor to catch up, and it does try to avoid bogging the machine down so it doesn't just throw a 100 images to DeepStack. I tried that, and it really makes your PC unusable. This may be related to thread priorities within DeepStack (it may be greedy for CPU time). So, in theory On Guard should handle an I3 but would be very, very slow. Hopefully the new DeepStack version will make that feasible.

Also, keep in mind that On Guard when it stat does go through all your security images matching your prefix/directory to create a list of available files on a per camera basis. If you have 10s of thousands of images in that directory this can take a while. Unfortunately, the UI doesn't come up until this process finishes. This is one of the things I want to fix.
 

taylorjm

n3wb
Joined
Oct 12, 2020
Messages
3
Reaction score
0
Location
Saginaw, Michigan
From what I've seen on the DeepStack web site they expect another version of their Windows engine out in November (yes, this November). This is supposed to considerably speed up processing/detection time. This may make the application able to run on a I3. I think that it is available now for Linux, but Windows is lagging behind in development.

There is nothing I know of that would prevent a connection to DeepStack on an I3. It is possible that you may also have limited memory on your I3 system that could be contributing to the problem. Other than that it should work. I suggest a minimum of 8 RAM.

I would definitely not recommend using it on an I3 however. I have a 4 core/8 thread I7 processor on my machine. Even then it takes about 0.8 seconds to analyze a frame. On an I3 I wouldn't be surprised at 5+ seconds. However, OnGuard does queue images waiting for the processor to catch up, and it does try to avoid bogging the machine down so it doesn't just throw a 100 images to DeepStack. I tried that, and it really makes your PC unusable. This may be related to thread priorities within DeepStack (it may be greedy for CPU time). So, in theory On Guard should handle an I3 but would be very, very slow. Hopefully the new DeepStack version will make that feasible.

Also, keep in mind that On Guard when it stat does go through all your security images matching your prefix/directory to create a list of available files on a per camera basis. If you have 10s of thousands of images in that directory this can take a while. Unfortunately, the UI doesn't come up until this process finishes. This is one of the things I want to fix.
Thanks. When running deepstack on my i3-550 it wasn't pegging the cpu at all, but I wasn't running blue iris either, just deepstack and OnGuard and copied some pics from the BI box. So it wasn't being overtaxed, but I know what you mean about deepstack taking time to process images. On my BI box which is only an i5-2600 it does fine with just BI and my 6 cameras, but if they get triggered in succession, I see deepstack taking 10 seconds for a group, which is why I wanted to upgrade the machine to maybe an i7-4790. I have over 8gb of ram on all my machines but I'd bump that up to at least 16 and an ssd drive. Also, I know what you mean about having too many images in the folder to queue up. I set limits in BI to ruh maintenance and keep the amount of images low. In my test scenarios, there weren't many images at all in the folder, but still couldn't get anything to come up in OnGuard. First I thought maybe BI needs to be on the same machine, but I tried that too and it didn't seem to help.

I really like OnGuard. It has some quirks about it that I've worked around and would be difficult to troubleshoot and replicate. For instance, I added 5 cameras, setup all the areas and zones, it's working fine, but when I try to add another camera, I can't get to the camera screen. Just an error to quit or continue. I've also had some areas of interest all the sudden not be accessible and all the coordinates are zeros and I can't adjust it or even delete it, but I found just ignoring it and creating another zone gets around it. So, what I've found is I uninstall OnGuard, reinstall it in a different folder and start over. If you input all the cameras at once, create all the zones at once, everything seems to work fine, it's going back and trying to edit or add things that can give an error, but only sometimes, so it's something that would be very difficult to troubleshoot. But I really like the flexibility of creating zones and adjusting the sensitivity of the zones. You did an excellent job with it.
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
Thanks. When running deepstack on my i3-550
This is why its important to indicate what processor you are using. Your 10 year old inefficient i3 which should be in the trash bin (certainly not running 24/7) does not support AVX.
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Can someone please help.. running windows 10... i am getting the following error when i try to start it all up?


As you can see when i press the "test" button, it does connect to the Deepstack as per debug window?

The error message is:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

** Exception Text **
SAAI.AiNotFoundException: The AI Detection process was not found at: . Ensure that the AI program is running that this location.
at SAAI.AIAnalyzer.<ProcessVideoImageViaAI>d__13.MoveNext() in C:\Users\Ken\Source\Repos\OnGuard\AIAnalyzer.cs:line 355
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SAAI.SettingsDialog.<testButton_Click>d__3.MoveNext() in C:\Users\Ken\Source\Repos\OnGuard\SettingsDialog.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)


** Loaded Assemblies **
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
On Guard
Assembly Version: 0.1.0.0
Win32 Version: 0.1.0.0
CodeBase: file://C:/Program%20Files%20(x86)/On%20Guard/On%20Guard/On%20Guard.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4220.0 built by: NET48REL1LAST_C
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Net.Http
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
Newtonsoft.Json
Assembly Version: 12.0.0.0
Win32 Version: 12.0.3.23909
CodeBase: file://C:/Program%20Files%20(x86)/On%20Guard/On%20Guard/Newtonsoft.Json.DLL
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
I think this has such great potential... it would be amazing if you could add a URL trigger webhook so you can notify blue iris via URL that the alert is actually a person etc... as blue iris supports remote URL flagging of alerts and also adding memos
 

yusufptl

n3wb
Joined
Nov 5, 2020
Messages
11
Reaction score
1
Location
South Africa
I get this error, i do know that the deepstack server is running correctly as the AITool is working properly. Not sure why onguard is not.


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

** Exception Text **
SAAI.AiNotFoundException: The AI Detection process was not found at: . Ensure that the AI program is running that this location.
at SAAI.AIAnalyzer.<ProcessVideoImageViaAI>d__13.MoveNext() in C:\Users\Ken\Source\Repos\OnGuard\AIAnalyzer.cs:line 355
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SAAI.SettingsDialog.<testButton_Click>d__3.MoveNext() in C:\Users\Ken\Source\Repos\OnGuard\SettingsDialog.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)


** Loaded Assemblies **
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
On Guard
Assembly Version: 0.1.0.0
Win32 Version: 0.1.0.0
CodeBase: file://C:/Program%20Files%20(x86)/On%20Guard/On%20Guard/On%20Guard.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Net.Http
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
Newtonsoft.Json
Assembly Version: 12.0.0.0
Win32 Version: 12.0.3.23909
CodeBase: file://C:/Program%20Files%20(x86)/On%20Guard/On%20Guard/Newtonsoft.Json.DLL
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file://C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
On Guard Version 1.1.0 has been released on GitHub. This adds the capability to browse through just the "interesting" pictures. You can potentially bypass hundreds or thousands of pictures with irrelevant motion. It also adds some bug fixes.

The previous minor release (1.0.9?) added the ability to test your DeepStack connection (via Tools/Settings. This should help you verify whether problems such as the in the post above are actually related to the DeepStack connection itself. There were some cases where the DeepStack connection was actually good but you would get that error.

Please report back to me any further errors. Unfortunately, I was involved in other things for a while and I had not been as responsive here as I'd like to be. I hope to be better about getting back to people.
 

Attachments

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Well, I tried adding the setup and installation file here in my previous post, and I guess the forum only allowed the setup.exe (which is useless). The full installation (Setup.exe and installer.msi) is on Github under the Setup directory. Here is the link: Ken98045/On-Guard
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Also, if you do pickup the current 1.1.0 version, you should have a look at the documentation file too. In particular, take a look at the section related to the "Motion Only" button.

While the "Motion Only" feature is trivially easy to use, some of the details are not necessarily obvious.

Here is the link: Ken98045/On-Guard
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I think this has such great potential... it would be amazing if you could add a URL trigger webhook so you can notify blue iris via URL that the alert is actually a person etc... as blue iris supports remote URL flagging of alerts and also adding memos
I'll look into that
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I'll look into that
So, I did look into it. In about 20 minutes I got memos (zone names) added. I can add the object type (people/cars/etc.) in addition to or instead of that. Which would you prefer?

However, the memo text at least in the mobile iPhone app is very difficult to read (very small). Maybe you have better eyes than I do or have a bigger phone screen. I will add this feature in the next release. I did not see the memo text in the Windows BI display, but maybe I am looking in the wrong place for it.

I probably should always have included the alert file name in the trigger.

These items will be included in the Auto Fill option under URL Notifications.

This will require some additional testing to make sure everything works as expected. Look for a release in the next day or two.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Per JoshWah's request I added a new release 1.1.2 that add a memo tag to the Blue Iris video clip. It also adds an "Alert" picture. Here is the link: Release On Guard Security Assistant Version 1.1.2 · Ken98045/On-Guard

Note that because of the way Blue Iris displays memo fields you will only get the memo for the first picture that triggered the clip. So, even though On Guard sends a memo with every area affected you will only see one. The same goes for the Alert picture. Only the picture that triggered a clip will be stored in your Alerts folder.

Also note that (at least on the iPhone) the font size used for the video clip memo is quite small. Therefore, it may be difficult to spot the memo at first glance.

Right now only the triggered area name is shown in the memo. In the future I'd like to add the specific object type that triggered the clip (for example Driveway/Truck). That would involve significantly more code changes.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
The memo field does show up in the iPhone Blue Iris app (although, again the font is small). However, the memo does not show up in the app on my Android tablet. It just shows "External". I assume that Android phones will have the same problem, but I don't have one to test.

This may be a bug on my part. Please let me know if you've seen this show up on Android with On Guard or any other app. I suspect that this is an Android "feature". I'll try to ask Blue Iris support, but I'm not holding my breath about getting anyone who would know anything about this.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Version 1.1.3 has now been released on Github here: Release On Guard Security Assistant Version 1.1.3 · Ken98045/On-Guard
.
It fixes a bug that was (in case anyone cares) apparently the result of Visual Studio auto-generated code. It also fixes a couple that were mine.

Note that this code does include some internal changes designed to start implementing the detection and reporting of the direction of objects moving to/from an area/zone. There is quite a bit of remaining work to do before this feature is completed. These changes should not affect anyone yet, but there is always that possibility. Just note that if you Shift+Click an area you should see a small blueish square. This will be the focus point/target point of the area. Since areas can be large I need such a target to determine the direction of object travel to/from that target. Right now the target is ignored. I don't think that will affect anyone's area definitions, but I can't be absolutely certain.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
Yet another new release containing bug fixes. The new version is here: Release On Guard Security Assistant Version 1.1.3.2 · Ken98045/On-Guard.

These fixes are related to motion only browsing. Files were incorrectly added (during browsing only) when there were objects found, but those objects did not meet the "interesting" criteria. In addition, there could have been a lockup under certain circumstances if files in the motion list were deleted.
 

tripp396

Getting the hang of it
Joined
Jun 18, 2020
Messages
65
Reaction score
30
Location
Minnesota
I’ve been running AItool and deep stack for a while but there’s a few things here that interests me. Gonna play with it tomorrow and report back my thoughts. Thanks for creating this for the community!
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
219
Reaction score
74
Location
Seattle
I’ve been running AItool and deep stack for a while but there’s a few things here that interests me. Gonna play with it tomorrow and report back my thoughts. Thanks for creating this for the community!
To some extent I'm taking requests on new features and improvements. If I can add something reasonably useful with moderate effort I'll look into it. If people are really interested in using Telegram that might be something along those lines.

Right now I'm working (slowly) on determining motion direction (to/from specific spots in areas). I'm not sure how well this will work, or how useful it will be. I'm guessing it would be more useful if DeepStack was substantially faster so that we could capture and analyze more frames. Hopefully the next Windows release (slightly overdue) will be faster.
 
Top