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

LTek

Getting the hang of it
Joined
Jul 28, 2015
Messages
112
Reaction score
41
@GentlePumpkin sorry if this has been asked/explored... I just was told about your app, today so have only read the first post. Have you contacted the BI team to see if there was a way to auto-create the duplicate cameras and set the appropriate settings on them... and hide them from the GUI? It would be great to have the AI be seamless and not have to manage multiple cams that are not 'directly used' Just a thought. thx!
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
@GentlePumpkin wirh the latest version of BI ken has made a change which will allow a new URL trigger variable.

The new variable is &trigger&memo=text which allows up to 35 characters to be stored. This is great because it allows you to specify keywords ie “person” or “dog” or the actual relevant triggers?

Therefrore is it possible if you could add some variables into the program so we can do %trigger% Or similiar which will allow us to store the exact relevant trigger word? Great for high level overviews!

thoughts?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
@GentlePumpkin sorry if this has been asked/explored... I just was told about your app, today so have only read the first post. Have you contacted the BI team to see if there was a way to auto-create the duplicate cameras and set the appropriate settings on them... and hide them from the GUI? It would be great to have the AI be seamless and not have to manage multiple cams that are not 'directly used' Just a thought. thx!
An update is in testing, which includes the ability to flag alerts and ...

@GentlePumpkin wirh the latest version of BI ken has made a change which will allow a new URL trigger variable.

The new variable is &trigger&memo=text which allows up to 35 characters to be stored. This is great because it allows you to specify keywords ie “person” or “dog” or the actual relevant triggers?

Therefrore is it possible if you could add some variables into the program so we can do %trigger% Or similiar which will allow us to store the exact relevant trigger word? Great for high level overviews!

thoughts?
add the detected objecttto the trigger url. I'm still testing stability. The source code is already on Github.
 
Joined
May 27, 2020
Messages
13
Reaction score
1
Location
Idaho Springs, Colorado
First - thanks for this the potential is enormous.

My motion detection "needs" are mostly about wildlife. I started by attempting to trigger on my dogs. It does not seem to pick them up. For instance in the 2 attached images, it picks up the human, but not the dogs. My guess is because they are too far away? I have every possible animal selected in my settings, the only thing deselected is "boats", which is good because it occasionally thinks my greenhouse is a boat. :)

Any advice on this? Sure would love to make this work....

Thanks!

AI1.PNGAI2.PNG
 

thesleepy_slee

Young grasshopper
Joined
Jan 3, 2016
Messages
63
Reaction score
5
Hello,

Thanks for this program. Looks very promising.
One remark for install tutorial: port 81 is used for UI3 un BI5. May want to change this.

I installed everything and am getting those errors below. Running win10 in QEMU.
I have read only first and last 3/4 pages. Anthing I am missing?

EDIT: Seems Deepstack needs to be activated thru WebUI with API key, not only directly in the application itself. Will do more testing tomorrow.

thx

Code:
[27.05.2020, 21:51:37.382]:
[27.05.2020, 21:51:37.390]: Starting analysis of C:\BlueIris\aiinput/Z5AI.20200527_215137361.jpg
[27.05.2020, 21:51:37.398]: (1/6) Uploading image to DeepQuestAI Server
[27.05.2020, 21:51:37.581]: (2/6) Waiting for results
[27.05.2020, 21:51:37.641]: (3/6) Processing results:
[27.05.2020, 21:51:37.647]: System.NullReferenceException | La référence d'objet n'est pas définie à une instance d'un objet. (code: -2147467261 )
[27.05.2020, 21:51:37.653]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215137361.jpg' failed. Failure in AI Tool processing the image.
[27.05.2020, 21:51:37.659]: ERROR: Could not send text "[27.05.2020, 21:51:37.653]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215137361.jpg' failed. Failure in AI Tool processing the image." to Telegram.
[27.05.2020, 21:51:37.665]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215137361.jpg to Telegram.
[27.05.2020, 21:51:37.669]: ERROR: Could not send text "[27.05.2020, 21:51:37.665]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215137361.jpg to Telegram." to Telegram.
[27.05.2020, 21:51:38.427]: Loading time line from cameras/history.csv ...
[27.05.2020, 21:51:38.433]: Loading confidence-frequency chart from cameras/history.csv ...
[27.05.2020, 21:51:42.385]:
[27.05.2020, 21:51:42.393]: Starting analysis of C:\BlueIris\aiinput/Z5AI.20200527_215142365.jpg
[27.05.2020, 21:51:42.401]: System.IO.IOException | Le processus ne peut pas accéder au fichier 'C:\BlueIris\aiinput\Z5AI.20200527_215142365.jpg', car il est en cours d'utilisation par un autre processus. (code: -2147024864 )
[27.05.2020, 21:51:42.413]: Could not access file - will retry after 10 ms delay
[27.05.2020, 21:51:42.431]: Retrying image processing - retry  1
[27.05.2020, 21:51:42.437]: (1/6) Uploading image to DeepQuestAI Server
[27.05.2020, 21:51:42.451]: (2/6) Waiting for results
[27.05.2020, 21:51:42.458]: (3/6) Processing results:
[27.05.2020, 21:51:42.466]: System.NullReferenceException | La référence d'objet n'est pas définie à une instance d'un objet. (code: -2147467261 )
[27.05.2020, 21:51:42.472]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215142365.jpg' failed. Failure in AI Tool processing the image.
[27.05.2020, 21:51:42.478]: ERROR: Could not send text "[27.05.2020, 21:51:42.472]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215142365.jpg' failed. Failure in AI Tool processing the image." to Telegram.
[27.05.2020, 21:51:42.484]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215142365.jpg to Telegram.
[27.05.2020, 21:51:42.490]: ERROR: Could not send text "[27.05.2020, 21:51:42.484]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215142365.jpg to Telegram." to Telegram.
[27.05.2020, 21:51:43.201]: Loading time line from cameras/history.csv ...
[27.05.2020, 21:51:43.207]: Loading confidence-frequency chart from cameras/history.csv ...
[27.05.2020, 21:51:47.385]:
[27.05.2020, 21:51:47.391]: Starting analysis of C:\BlueIris\aiinput/Z5AI.20200527_215147365.jpg
[27.05.2020, 21:51:47.397]: System.IO.IOException | Le processus ne peut pas accéder au fichier 'C:\BlueIris\aiinput\Z5AI.20200527_215147365.jpg', car il est en cours d'utilisation par un autre processus. (code: -2147024864 )
[27.05.2020, 21:51:47.405]: Could not access file - will retry after 10 ms delay
[27.05.2020, 21:51:47.425]: Retrying image processing - retry  1
[27.05.2020, 21:51:47.437]: (1/6) Uploading image to DeepQuestAI Server
[27.05.2020, 21:51:47.445]: (2/6) Waiting for results
[27.05.2020, 21:51:47.454]: (3/6) Processing results:
[27.05.2020, 21:51:47.463]: System.NullReferenceException | La référence d'objet n'est pas définie à une instance d'un objet. (code: -2147467261 )
[27.05.2020, 21:51:47.469]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215147365.jpg' failed. Failure in AI Tool processing the image.
[27.05.2020, 21:51:47.475]: ERROR: Could not send text "[27.05.2020, 21:51:47.469]: ERROR: Processing the following image 'C:\BlueIris\aiinput/Z5AI.20200527_215147365.jpg' failed. Failure in AI Tool processing the image." to Telegram.
[27.05.2020, 21:51:47.481]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215147365.jpg to Telegram.
[27.05.2020, 21:51:47.487]: ERROR: Could not send text "[27.05.2020, 21:51:47.481]: ERROR: Could not upload image C:\BlueIris\aiinput/Z5AI.20200527_215147365.jpg to Telegram." to Telegram.
[27.05.2020, 21:51:48.215]: Loading time line from cameras/history.csv ...
[27.05.2020, 21:51:48.221]: Loading confidence-frequency chart from cameras/history.csv ...
 
Last edited:
Joined
May 27, 2020
Messages
5
Reaction score
0
Location
Canada
Hello,
I came here after watching "The Hookup"'s video tutorial on this tool. I have it running and I love it.
I have no experience with AI but I'm very intrigued and hoping to learn. I was disappointed to see that the Deepstack forums are basically inactive. Has the project been abandoned?
I started with Deepstack running in cpu mode in Docker on a linux server but it was too slow to be effective. By the time it analyzed an image, the trigger was long gone. So now I'm running deepstack on my windows desktop. I tried running Deepstack in gpu mode on the Linux machine but since it has an old Intel Q6600 cpu, I have to run the noavx version. I can see that the gpu is processing the images very quickly but it won't return results because it requires activation and the gpu-noavx version is telling me that I need a premium key. Has anyone been able to activate the gpu-noavx version with the free key?
Will this tool work with a different AI server?
 

devastator

Getting the hang of it
Joined
May 22, 2015
Messages
169
Reaction score
28
Location
Belgium
I get the error that it can't reach deepstack. However, if I enter the url supplied to the app in a browser, I do get the Deepstack screen. Any tips ?
 

pnakashian

n3wb
Joined
Dec 19, 2019
Messages
15
Reaction score
4
Location
Pflugerville Texas
edit:
looks like 3 of my camera files in camera's folder were corrupt, they had nothing but null characters only. I had to remove them
and recreate the camera setups from scratch. Plus with the new blue Iris bug I had to add &user=username&pw=password to the all the camera url.
i do recall one time my windows 10 system was hung, I had to power it off.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Anyone noticed AITool throwing unhandled exception on startup. It was working for a while, I've had a few windows 10 updates, last one I forgot to test if it broke anything.
running it manually I get this error. I've tried unzip from 1.65 again, moving the entire aitool install folder to c:\Users\myusername\ no difference.

1590649165206.png

when I click continue
1590649194741.png

finally AITool can't find any of my configured cameras, the files are there in cameras folder

1590649266660.png
 
Last edited:

thesleepy_slee

Young grasshopper
Joined
Jan 3, 2016
Messages
63
Reaction score
5
I get the error that it can't reach deepstack. However, if I enter the url supplied to the app in a browser, I do get the Deepstack screen. Any tips ?
Same issue. AItool cant reach localhost deepstack, cannot even send telegram notification. I disabled win10 firewall, but did not solve issue.
 

Judman

Getting the hang of it
Joined
Oct 23, 2016
Messages
52
Reaction score
37
Edit: I see in #501 and #502 discussions about the changes to urls. Is that what's breaking the program>

Did the latest update of BI change something in the URL triggering?

I started getting this message after updating BlueIris to 5.2.9.2.
Code:
[28.05.2020, 12:17:24.308]: ERROR: Could not trigger URL 'http://localhost:81/admin?trigger&camera=FWC&user=DQAI&pw=DeepAI', please check if 'http://localhost:81/admin?trigger&camera=FWC&user=DQAI&pw=DeepAI' is correct and reachable.
The Deepstack AI is functioning just fine, it's just the triggers aren't hitting BI.
 

pnakashian

n3wb
Joined
Dec 19, 2019
Messages
15
Reaction score
4
Location
Pflugerville Texas
Edit: I see in #501 and #502 discussions about the changes to urls. Is that what's breaking the program>

Did the latest update of BI change something in the URL triggering?

I started getting this message after updating BlueIris to 5.2.9.2.
Code:
[28.05.2020, 12:17:24.308]: ERROR: Could not trigger URL 'http://localhost:81/admin?trigger&camera=FWC&user=DQAI&pw=DeepAI', please check if 'http://localhost:81/admin?trigger&camera=FWC&user=DQAI&pw=DeepAI' is correct and reachable.
The Deepstack AI is functioning just fine, it's just the triggers aren't hitting BI.
in Blue Iris 5.2.9.2 passing password is now giving authentication required error message,
in Blue Iris 5.2.7.12 passing password still works.

in both Blue Iris branches , if you've setup authentication required from Non-Lan Only and were using
+, ^ to bypass the basic firewall function, they no longer work, it seems you now have to pass user,pw to make the rest
URL's work again, don't know how long this has been broken, I just discovered it a couple of days ago.

I've had to switch from 5.2.9.2 to 5.2.7.12 and now I have to pass user,pw to make the REST URL's work again.
 

Judman

Getting the hang of it
Joined
Oct 23, 2016
Messages
52
Reaction score
37
in Blue Iris 5.2.9.2 passing password is now giving authentication required error message,
in Blue Iris 5.2.7.12 passing password still works.

in both Blue Iris branches , if you've setup authentication required from Non-Lan Only and were using
+, ^ to bypass the basic firewall function, they no longer work, it seems you now have to pass user,pw to make the rest
URL's work again, don't know how long this has been broken, I just discovered it a couple of days ago.

I've had to switch from 5.2.9.2 to 5.2.7.12 and now I have to pass user,pw to make the REST URL's work again.
Thank you!

I rolled back to 5.2.7.12.
 

thesleepy_slee

Young grasshopper
Joined
Jan 3, 2016
Messages
63
Reaction score
5
Please see post #338 in this thread. I went over this issue with Deepstack on Windows.


Sent from my iPhone using Tapatalk
Thanks, this is page 17.
I installed the 2010 version, then tried the 2015 which says it cannot install since newer version already installed.
Still no change on AItool.

Simply having AItool running with nothing to analyse bumps my CPU from 35% to 70% though.
 

damitdang

n3wb
Joined
May 24, 2020
Messages
1
Reaction score
0
Location
Houston
Currently running - Release 5.2.9.2 x64

Everything seems to be working fine except for the trigger. I can see the AITool sending the trigger to BlueIris but it doesn't start recording..
I can verify that the trigger within blue iris does work by right-clicking a camera and selecting Trigger Now.. which then shows a clip on the righthand side.

Capture.PNG
 

sn0000py

Young grasshopper
Joined
Dec 30, 2019
Messages
41
Reaction score
5
Location
Austria
Hello just tried the AITools and looks realy nice :D very nice tool.

A question, i have to clone the camera for the ai to genereate JPG, i have a 5MP and a 8MP Camera, is it better to clone this camera Stream, or should i use a substream (with lower resolution?)

The 5MP and 8MP Stream i record direct to disc 24/7.

Waht is the "perfect" resolution and FPS for AI?
 

morten67

n3wb
Joined
Jan 15, 2020
Messages
13
Reaction score
1
Hello just tried the AITools and looks realy nice :D very nice tool.

A question, i have to clone the camera for the ai to genereate JPG, i have a 5MP and a 8MP Camera, is it better to clone this camera Stream, or should i use a substream (with lower resolution?)

The 5MP and 8MP Stream i record direct to disc 24/7.

Waht is the "perfect" resolution and FPS for AI?
I believe the best is to clone the video stream you are recording now. That way Blue Iris will not use more CPU.
You will have to test how low you can go down in jpg quality, and still get good detection. The lower the size (i.e. quality % of jpg), the faster the processing by deepstack. I have found that during daylight, deepstack gives very good results almost no matter what. I have chosen to have a different profile during night, with a 100% HD photo every 2 seconds. This gives the best result for me (so far, always at least one correct detection per trigger series), compared to lesser quality with lower intervals. But you need a good PC for this to work. I just upgraded mine to an i9, and it works OK with AITool on the same PC, and Deepstack on a separate i7. Each trigger is now approx 800ms (from start to finish). I'm hoping to reduce further when I receive a Coral USB on order. I plan to run that on an i5 under linux, and I'm also hoping to improve training of the model with photos from my actual cameras during both day, and especially night. I will then also fine tune the jpg quality needed both during daylight and at night. I have also increased the contrast on the cameras. I will see at the end if I can tune it back to normal without reducing the detection success.

Edit: I just tested with Deepstack on the same PC (the i9). Looks like I'm down at approx 600ms per trigger.
 
Last edited:
Joined
Apr 23, 2019
Messages
2
Reaction score
0
Location
USA
I get the error that it can't reach deepstack. However, if I enter the url supplied to the app in a browser, I do get the Deepstack screen. Any tips ?
Same issue. AItool cant reach localhost deepstack, cannot even send telegram notification. I disabled win10 firewall, but did not solve issue.
I had the same issue yesterday when I set mine up. AI Tool could not reach Deepstack when I had the Deepstack URL set to localhost:[specificPort]. It worked perfectly after I changed 'localhost' to the actual private IP of the computer. This, for me, looked like: 192.168.1.[specificIP]:[specificPort]
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
I believe the best is to clone the video stream you are recording now. That way Blue Iris will not use more CPU.
You will have to test how low you can go down in jpg quality, and still get good detection. The lower the size (i.e. quality % of jpg), the faster the processing by deepstack. I have found that during daylight, deepstack gives very good results almost no matter what. I have chosen to have a different profile during night, with a 100% HD photo every 2 seconds. This gives the best result for me (so far, always at least one correct detection per trigger series), compared to lesser quality with lower intervals. But you need a good PC for this to work. I just upgraded mine to an i9, and it works OK with AITool on the same PC, and Deepstack on a separate i7. Each trigger is now approx 800ms (from start to finish). I'm hoping to reduce further when I receive a Coral USB on order. I plan to run that on an i5 under linux, and I'm also hoping to improve training of the model with photos from my actual cameras during both day, and especially night. I will then also fine tune the jpg quality needed both during daylight and at night. I have also increased the contrast on the cameras. I will see at the end if I can tune it back to normal without reducing the detection success.

Edit: I just tested with Deepstack on the same PC (the i9). Looks like I'm down at approx 600ms per trigger.
I find that when making clone cams in BI; i see a CPU rise per clone i make. Even ensuring under status tab..
 
Joined
May 27, 2020
Messages
5
Reaction score
0
Location
Canada
Each trigger is now approx 800ms (from start to finish).
How are you timing the start-to-finish detection time?
I'm hoping to reduce further when I receive a Coral USB on order.
Could you create a tutorial for running deepstack with a Coral?
I'm also hoping to improve training of the model with photos from my actual cameras during both day, and especially night.
Could you write a tutorial for how to train deepstack? It would be nice to teach the AI that the image below is just a bright spot from the IR illumination, and not a person.
 
Top