[tool] [tutorial] Free AI Person Detection for Blue Iris

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Interesting... the documentation I read said to do it, didnt know we didnt need it.
Duplicate cameras are only needed if you don't want to have your BI alert view to be cluttered with false alerts that didn't get triggered. Having duplicate cameras keeps the alert view much cleaner.
 

pnakashian

n3wb
Joined
Dec 19, 2019
Messages
15
Reaction score
4
Location
Pflugerville Texas
Interesting... the documentation I read said to do it, didnt know we didnt need it.
There are some perks if you use AI clone camera and the original.
In the AI camera where I can have a lot of false positives, I don't set any Alert actions (on Alert, or on Reset).
The Original camera is triggered by AITool after it meets confidence criteria ,
So I have higher confidence this is a notification I really want to know about
i've setup MQTT and HTTP (for IFTTT) actions in camera settings->Alerts->Actions-> On Alerts On Resets
i've successfully set MQTT Topic, and sometimes even made IFTTT http web request
to communicate directly or in-directly to my Home Assistant there is an actual Alert, the Alert right now
go to an echo DOT announcement via Home Assistant.

The original Cameras via MQTT behave like accurate motion sensors in Home Assistant.
The trick is getting the Motion detection rules just right on the AI camera so it at least fires when there is a real activity
even if it includes some false positives, but that is ongoing.

if you are not planning to use Alerts then you can probably skip Cloned camera's
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
there was no file unrecognized file, it was definitely 3 camera files were corrupt.
I had that happen once about a month ago. I had backups so just copied them in to the camera folder. If I recall all the corrupt files were showing as a different size to the ok ones so they were easy to spot.
 

xdq

Young grasshopper
Joined
Jun 12, 2017
Messages
48
Reaction score
19
Location
m
I've been playing with this and have identified what looks like a bug in the masking implementation. I think occurrs when I create multiple mask areas in close proximity to one another and Deepstack detects an object across the two masks.
When sending a series of test images from BlueIris (Trigger now) some will experience the error and some won't. Those that experience the error won't show in the AI Tool history and will leave an error in the log
[01.06.2020, 21:18:38.356]: System.ArgumentOutOfRangeException | Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (code: -2146233086



Has anyone else had the same error?
 
Joined
May 23, 2020
Messages
6
Reaction score
0
Location
Louisiana
I figured it out. Change your docker image to deepquestai/deepstack:noavx (instead of :latest) and it'll then work after you input your key into the web interface.
Installed in a completely different computer using a different install method and still same errors.

[01.06.2020, 16:38:01.103]: Starting analysis of E:\aiinput/FCSD.20200525_194239018.jpg
[01.06.2020, 16:38:01.148]: (1/6) Uploading image to DeepQuestAI Server
[01.06.2020, 16:38:01.260]: (2/6) Waiting for results
[01.06.2020, 16:38:01.418]: (3/6) Processing results:
[01.06.2020, 16:38:01.426]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[01.06.2020, 16:38:01.432]: ERROR: Processing the following image 'E:\aiinput/FCSD.20200525_194239018.jpg' failed. Failure in AI Tool processing the image.
[01.06.2020, 16:38:45.485]:
[01.06.2020, 16:38:45.492]: Starting analysis of E:\aiinput/FCSD.20200601_163845468.jpg
[01.06.2020, 16:38:45.499]: (1/6) Uploading image to DeepQuestAI Server
[01.06.2020, 16:38:45.516]: (2/6) Waiting for results
[01.06.2020, 16:38:45.523]: (3/6) Processing results:
[01.06.2020, 16:38:45.531]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[01.06.2020, 16:38:45.537]: ERROR: Processing the following image 'E:\aiinput/FCSD.20200601_163845468.jpg' failed. Failure in AI Tool processing the image.
[01.06.2020, 16:38:50.592]:
[01.06.2020, 16:38:50.598]: Starting analysis of E:\aiinput/FCSD.20200601_163850579.jpg
[01.06.2020, 16:38:50.604]: (1/6) Uploading image to DeepQuestAI Server
[01.06.2020, 16:38:50.614]: (2/6) Waiting for results
[01.06.2020, 16:38:50.624]: (3/6) Processing results:
[01.06.2020, 16:38:50.631]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[01.06.2020, 16:38:50.636]: ERROR: Processing the following image 'E:\aiinput/FCSD.20200601_163850579.jpg' failed. Failure in AI Tool processing the image.

DeepStack Successfully Activated
/v1/vision/scene
---------------------------------------
v1/vision/addmodel
---------------------------------------
v1/vision/listmodels
---------------------------------------
v1/vision/deletemodel
---------------------------------------
v1/vision/setadminkey
---------------------------------------
v1/vision/setapikey
---------------------------------------
v1/vision/backup
---------------------------------------
v1/vision/restore
[GIN] 2020/06/01 - 21:36:31 | 200 | 5.524963418s | 172.17.0.1 | POST /v1/admin/activate
[GIN] 2020/06/01 - 21:38:01 | 200 | 582.3µs | 172.17.0.1 | POST /v1/vision/detection
[GIN] 2020/06/01 - 21:38:45 | 200 | 19.2µs | 172.17.0.1 | POST /v1/vision/detection
[GIN] 2020/06/01 - 21:38:50 | 200 | 19.2µs | 172.17.0.1 | POST /v1/vision/detection
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
I downloaded the AI Tool (1.65) and attempted to start aitool.exe, but nothing happens. Disabled Windows Defender and tried Windows 8 and 7 compatibility mode, still nothing happens when I double click. Anyone has similar issues with AI Tool? Tried on 2 different machines and it's the same issue.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
I downloaded the AI Tool (1.65) and attempted to start aitool.exe, but nothing happens. Disabled Windows Defender and tried Windows 8 and 7 compatibility mode, still nothing happens when I double click. Anyone has similar issues with AI Tool? Tried on 2 different machines and it's the same issue.
Have you tried unblocking the exe by right clicking on the exe and going to properties? Also is UAC enabled?


Sent from my iPhone using Tapatalk
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Have you tried unblocking the exe by right clicking on the exe and going to properties? Also is UAC enabled?


Sent from my iPhone using Tapatalk
You will also need to install .Net Framework, but you should be promoted for this when you first run AI Tool, if .Net Framework isn’t installed.


Sent from my iPhone using Tapatalk
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
You will also need to install .Net Framework, but you should be promoted for this when you first run AI Tool, if .Net Framework isn’t installed.


Sent from my iPhone using Tapatalk
Thanks for the quick reply. There isn't an option of "Block" when I right-click and choose Properties:
1591065533909.png

UAC is disabled:
1591065653075.png

I tried installing .Net Framework 4.8 and it prompted me that I have already installed 4.8 or later version. It didn't prompt me anything when I double-clicked on aitool.exe.
1591065609064.png

This is the same on 2 different Windows 10 machines. Anything else I should try? Thank you!
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Thanks for the quick reply. There isn't an option of "Block" when I right-click and choose Properties:
View attachment 62929

UAC is disabled:
View attachment 62931

I tried installing .Net Framework 4.8 and it prompted me that I have already installed 4.8 or later version. It didn't prompt me anything when I double-clicked on aitool.exe.
View attachment 62930

This is the same on 2 different Windows 10 machines. Anything else I should try? Thank you!
Anytime, I’m happy to help. Hopefully we can get this squared away.

That is very odd that AI Tool won’t run. I honestly haven’t had any issues getting AI Tool running. Are the machines that you tested AI Tool on fresh installs of Windows 10?


Sent from my iPhone using Tapatalk
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
Anytime, I’m happy to help. Hopefully we can get this squared away.

That is very odd that AI Tool won’t run. I honestly haven’t had any issues getting AI Tool running. Are the machines that you tested AI Tool on fresh installs of Windows 10?


Sent from my iPhone using Tapatalk
Windows 10 on Blue Iris server is relatively fresh. My work machine is on 1909, not a clean install though.

I pulled a log from Event Viewer on Blue Iris' server and here is what I found:
1591067551910.png

Application: aitool.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
at System.Windows.Forms.ListView+ColumnHeaderCollection.get_Item(Int32)
at WindowsFormsApp2.Shell.ResizeListViews()
at WindowsFormsApp2.Shell.Form1_Resize(System.Object, System.EventArgs)
at System.Windows.Forms.Control.OnResize(System.EventArgs)
at System.Windows.Forms.Form.OnResize(System.EventArgs)
at System.Windows.Forms.Control.OnSizeChanged(System.EventArgs)
at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)
at System.Windows.Forms.Control.UpdateBounds(Int32, Int32, Int32, Int32)
at System.Windows.Forms.Control.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Form.SetBoundsCore(Int32, Int32, Int32, Int32, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.ScrollableControl.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Form.ScaleControl(System.Drawing.SizeF, System.Windows.Forms.BoundsSpecified)
at System.Windows.Forms.Control.ScaleControl(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control)
at System.Windows.Forms.ContainerControl.Scale(System.Drawing.SizeF, System.Drawing.SizeF, System.Windows.Forms.Control)
at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean, Boolean)
at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean)
at System.Windows.Forms.Control.ResumeLayout(Boolean)
at WindowsFormsApp2.Shell.InitializeComponent()
at WindowsFormsApp2.Shell..ctor()
at WindowsFormsApp2.Program.Main()
System.ArgumentOutOfRange stood out in multiple entries. What could it be?

Thanks!
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,897
Reaction score
21,250
FYI, it looks like the BI developer is going to integrate local AI into the software.
From @Palmpilot
"I actually got a great response from Ken today! I wrote them a couple of days ago asking for local AI integration with Blue Iris (I specifically mentioned DeepStack.AI) and Ken replied with a short sweet sentence "This is coming ..." "

 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Windows 10 on Blue Iris server is relatively fresh. My work machine is on 1909, not a clean install though.

I pulled a log from Event Viewer on Blue Iris' server and here is what I found:
View attachment 62933



System.ArgumentOutOfRange stood out in multiple entries. What could it be?

Thanks!
That is definitely an issue with .Net. I’d uninstall all versions of .Net, reboot and then run AI Tool and install .Net when prompted.


Sent from my iPhone using Tapatalk
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
That is definitely an issue with .Net. I’d uninstall all versions of .Net, reboot and then run AI Tool and install .Net when prompted.


Sent from my iPhone using Tapatalk
I tried uninstalling all versions of .Net, reboot, and then ran AI Tool. It didn't prompt me anything just like before. Reinstalled .Net Framework and still the same issue. Replicated on both machines.

Can you please try to attach your working copy of AI Tool and see if I can run it? Thanks!
 
Joined
Jul 12, 2017
Messages
12
Reaction score
0
That is definitely an issue with .Net. I’d uninstall all versions of .Net, reboot and then run AI Tool and install .Net when prompted.


Sent from my iPhone using Tapatalk
I downloaded v1.63 of AI Tool on both the Blue Iris server and my work machine, and I could run AI Tool immediately with no issues! It seems like there may be something different from v1.65 and v1.64 that can't be run on both of the machines. Do you have any insights into why it might be?
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
I don't use duplicate cameras at all. Tried it but then found there was no need.
I'm curious as to how you have your trigger setup without duplicating the camera. Any chance of posting a screenshot?
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
I'm curious as to how you have your trigger setup without duplicating the camera. Any chance of posting a screenshot?
I don't use the AI tool to trigger the cameras. I let BI do the triggering just as it did before using the tool. I then use the AI tool to send me alerts using telegram.

This lets me have BI set up very sensitively so it doesn't miss recording anything but I get notifications when the tool thinks their is something I should know about.

I've now been using this for about a year and it's been working brilliantly. What I found was that the AI wasn't that good on a night time and that I couldn't rely on it doing the triggering.

I also have a lot of cameras so clones were bringing me over the camera limit for BI.
 
Last edited:

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
I downloaded v1.63 of AI Tool on both the Blue Iris server and my work machine, and I could run AI Tool immediately with no issues! It seems like there may be something different from v1.65 and v1.64 that can't be run on both of the machines. Do you have any insights into why it might be?
I'm glad that you got it working. I'm not sure what changed from version 1.63 to 1.65. I've been running version 1.65 since I stated using AI Tool and Deepstack. @GentlePumpkin can you advise on the major differences and what may cause the newer version to not work for @sunnyhaibin ?
 
Top