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

meissen

Young grasshopper
Joined
Jun 28, 2017
Messages
61
Reaction score
10
Finally got a separate, dedicated Blue Iris computer that won't be sharing resources with a bunch of other services. Dell Optiplex with i7-6700 3.4ghz with 16GB of ram running Windows 10 pro. Granted I haven't fully turned on Blue Iris yet so the only thing running right now is DeepStack and chrome lol, but just for shits and grins I immediately installed DeepStackAI and set it up to at least process the requests from the current BlueIris instance -- I wanted to make sure I could get DeepStackAI running without crashing first before I make the switch. I went from averaging 2-3 seconds per request to ~750ms!
 

Coloscott

Young grasshopper
Joined
Dec 13, 2018
Messages
33
Reaction score
3
Location
United States
Are any of you using the single camera method getting Auth errors when you try to test the URL in a browser? I can't get past this and AI Tool has these errors in the logs:

The summary:person (66.53%) | truck (76.08%)
[11.08.2020, 16:18:48.409]: (5/6) Performing alert actions:
[11.08.2020, 16:18:48.416]: trigger url: {AIUser}&pw={XXXXXX}
[11.08.2020, 16:18:48.423]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.427]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.434]: trigger url: {AIUser}&pw={xxxxxxx}
[11.08.2020, 16:18:48.442]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.449]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.458]: -> 2 trigger URLs called.
 

aesterling

Getting comfortable
Joined
Oct 9, 2017
Messages
352
Reaction score
346
Finally got a separate, dedicated Blue Iris computer that won't be sharing resources with a bunch of other services. Dell Optiplex with i7-6700 3.4ghz with 16GB of ram running Windows 10 pro. Granted I haven't fully turned on Blue Iris yet so the only thing running right now is DeepStack and chrome lol, but just for shits and grins I immediately installed DeepStackAI and set it up to at least process the requests from the current BlueIris instance -- I wanted to make sure I could get DeepStackAI running without crashing first before I make the switch. I went from averaging 2-3 seconds per request to ~750ms!
Are you using the DeepStack native windows app or running it in Docker?
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
How can I clear this so that the History Log is back up to date?
You can close out AI Tools and then open up the history.cvs file (located in your AI Tools/cameras directory) using Notepad++ and delete all the entries and then save the file. Restart AI Tools and you should have a clean history.
 

meissen

Young grasshopper
Joined
Jun 28, 2017
Messages
61
Reaction score
10
Are you using the DeepStack native windows app or running it in Docker?
Native windows app - it was my #1 goal. My R510 server just didn't jive with having DeepStack as docker and the requests were averaging 2-3 seconds but easily could get to 5-6 if the server was getting taxed.
 

gazoo

n3wb
Joined
Dec 11, 2017
Messages
27
Reaction score
0
Are any of you using the single camera method getting Auth errors when you try to test the URL in a browser? I can't get past this and AI Tool has these errors in the logs:

The summary:person (66.53%) | truck (76.08%)
[11.08.2020, 16:18:48.409]: (5/6) Performing alert actions:
[11.08.2020, 16:18:48.416]: trigger url: {AIUser}&pw={XXXXXX}
[11.08.2020, 16:18:48.423]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.427]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.434]: trigger url: {AIUser}&pw={xxxxxxx}
[11.08.2020, 16:18:48.442]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.449]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.458]: -> 2 trigger URLs called.
If you added a special new user for just the AI part like "aiuser" or something like that, you might want to double check that. I added a guest user for the AI but it just wouldn't work. i quit trying and just used my admin user and pass and this worked. You may have to make the AI user an admin or just dig further into it. The way to check if this works (the remote triggering of motion), just type the trigger URL into a browser and it should give you a positive affirmation as follows:

signal=green
profile=1
lock=0
camera={your camera full name}
 

gazoo

n3wb
Joined
Dec 11, 2017
Messages
27
Reaction score
0
As an FYI all - I've been having my interfaces basically disconnect after 3-6 hours and have to reboot to get them back. Some of this is because I'm using an old supermicro motherboard and i cannot update drivers anymore other than what windows 10 supplies. However, I suspected that the virtualized environment had something to do with the errors in combination with my old drivers. I looked further into this and tried to get Docker to run in WSL2 hoping that I wouldn't need to use Hyper-V anymore. This panned out. I moved Docker to WSL2, and now it doesn't really utilize Hyper-V anymore. Hyper-V is still installed but not being used. This helped get my system stabilized and it's been working nonstop for 24 hrs. I haven't tried to check to see if it works logged off yet, but there's a chance that it will. I want to make absolutely sure this solved the interface instability before trying to see if it runs logged off.

I used this guide to get Docker to run WSL2. At the end of it, I had to reinstall the DeepStack container but that was just that one command line.

 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
Are any of you using the single camera method getting Auth errors when you try to test the URL in a browser? I can't get past this and AI Tool has these errors in the logs:

The summary:person (66.53%) | truck (76.08%)
[11.08.2020, 16:18:48.409]: (5/6) Performing alert actions:
[11.08.2020, 16:18:48.416]: trigger url: {AIUser}&pw={XXXXXX}
[11.08.2020, 16:18:48.423]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.427]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.434]: trigger url: {AIUser}&pw={xxxxxxx}
[11.08.2020, 16:18:48.442]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.449]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.458]: -> 2 trigger URLs called.
The updated instructions note that you have to disable 'use secure session keys and login page' within BI as noted below;

2.2 Enable URL flagging
To enable URL actions like flagging an alert, we have to do the following in Blue Iris:
1. go to Setting->Webserver->Advanced and disable 'use secure session keys and login page'.
2. go to Settings->Users and eighter select a user and copy the password, or create a new administrator user. The credentials will be needed in step 3.4.5 to make the flagging URL.

Also note that when you do add in both trigger URL's for flagging, no need to replace [camera] and [summary] as the AI tool populates that for you. You just need to update {user} with your user and {passwort} password and correct BI ports.
Remember to add both URLS on the same line separated by a comma, eg:

{user}&pw={passwort},{user}&pw={passwort}
 

ReXX

Young grasshopper
Joined
Dec 28, 2018
Messages
47
Reaction score
15
Location
Denmark
Are any of you using the single camera method getting Auth errors when you try to test the URL in a browser? I can't get past this and AI Tool has these errors in the logs:

The summary:person (66.53%) | truck (76.08%)
[11.08.2020, 16:18:48.409]: (5/6) Performing alert actions:
[11.08.2020, 16:18:48.416]: trigger url: {AIUser}&pw={XXXXXX}
[11.08.2020, 16:18:48.423]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.427]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.434]: trigger url: {AIUser}&pw={xxxxxxx}
[11.08.2020, 16:18:48.442]: The remote server returned an error: (401) Unauthorized.
[11.08.2020, 16:18:48.449]: ERROR: Could not trigger URL '{AIUser}&pw={xxxxx}', please check if '{AIUser}&pw={xxxxxxx}' is correct and reachable.
[11.08.2020, 16:18:48.458]: -> 2 trigger URLs called.
The {} in username/password should not be there.
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
now i have add clone cams but CPU 30% more. Working good but now cpu 80% ... motion 90%...

Why BI no option to send a externam Signal for Alarm ? like sentry ?
 

meissen

Young grasshopper
Joined
Jun 28, 2017
Messages
61
Reaction score
10
When is a bird NOT a bird?

Thought I would share this and bring a little levity to the discussion
hahaha my cameras are mounted up by the gutters in my 2 story colonial aimed down at the backyard. Always picks up my dogs as birds - but at least it picks them up as something! lol
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
now i have add clone cams but CPU 30% more. Working good but now cpu 80% ... motion 90%...

Why BI no option to send a externam Signal for Alarm ? like sentry ?
Unsure if you are trolling with such such an incorrect statement, rather than a question.
If you are asking how, then for most alarms you can simply tell BI make a Web request. Camera Settings -> Alert Tab -> On-Alert. However for more complicated setups you can run custom scripts (eg: I run PowerShell Scripts to control IOT devices without the lag of the cloud), but you can also set DIO bits as shown in the screen grab below.
Yes, BI can be daunting as it is feature rich, but you can pretty much make it do what ever your imagination desires.

Also my clones don't consume any additional CPU that I could measure and I have quite a few cams (8MP and 4MP), do you also have motion detection or something on the clones? If so you can avoid this by having the master's trigger the clones.

1597230326319.png
 
Last edited:

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
I think my post was done wrong. I would like to work without clone cameras. It would be nice to have 1 camera which sends its motion picture to AITOOL. BI should wait for an answer and only process the alarms when something has been recognized (push, mail ...). Clone cameras work with "delay" but also consume more CPU.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
With the FLAG and MEMO feature working well, I have fired off a support\feature request to have the ability in BI to FILTER based on Memo Types. If this is of interest you may wish to do the same.
Yes, we are being spoilt now, this has come so far, so quickly.

I also pointed out that, you can not currently both FLAG an Alert and Add a memo in one call, you need to make two API calls.
ie: {user}&pw={passwort} and {user}&pw={passwort}
Given how many cams some of you run, this may help scalability,..:)
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
I think my post was done wrong. I would like to work without clone cameras. It would be nice to have 1 camera which sends its motion picture to AITOOL. BI should wait for an answer and only process the alarms when something has been recognized (push, mail ...). Clone cameras work with "delay" but also consume more CPU.
My clone cams don't consume that much more CPU time?

You must have something setup incorrectly as BI only alerts me if AITools has triggered the cam after it has detected an object of interest, so I get way more false positives logged in AITools but no alerts for any of the false postives.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
I think my post was done wrong. I would like to work without clone cameras. It would be nice to have 1 camera which sends its motion picture to AITOOL. BI should wait for an answer and only process the alarms when something has been recognized (push, mail ...). Clone cameras work with "delay" but also consume more CPU.
I would propose that you first try to understand why your clone camera's consume more CPU power before moving forward. If the clone camera's are set up correctly they should not consume any additional cpu cycles.

Have you checked to ensure that you are recording directly to disk on both master and clone?
Are your streams setup the same on both master and clone camera's?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
I would propose that you first try to understand why your clone camera's consume more CPU power before moving forward. If the clone camera's are set up correctly they should not consume any additional cpu cycles.

Have you checked to ensure that you are recording directly to disk on both master and clone?
Are your streams setup the same on both master and clone camera's?
Mine aren’t which is what my they consume additional CPU. I have my main cam configured with substream but the clone without else it capture snapshots at the substream resolution which results in DQ missing to detect things.

I emailed support, a new resize option has been introduced but from the limited testing I did this option simply tries to upscale the low res image.
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
I think my post was done wrong. I would like to work without clone cameras. It would be nice to have 1 camera which sends its motion picture to AITOOL. BI should wait for an answer and only process the alarms when something has been recognized (push, mail ...). Clone cameras work with "delay" but also consume more CPU.
That is exactly how you can set it up, although as others have said, the clones shouldn't consume additional CPU's. Especially if the second cam is not recording and just sending alerts (sounds like that is what you want)
Cam 1: Sends the Images to AITool
Then you can have AITool, send the Trigger to your alarm or any web-hook. Or if you follow the instructions here, you can trigger your secondary CLONE CAM. On the secondary CAM you can then set BI to alert (ie: that way the second cam only alerts whentriggered by AITool). Just be sure to turn all other triggers off on the second cam, ie: No Motion Detect, No Cameras Digital Input. And turn alerts off on the primary cam.
You don't need to even record on the second cam, if that suits you, but if you do follow the instructions to have sufficient pre-recording.
Or just opt for a simpler setup and have AITool issue a Telegram alert with the Alert Image.... ohh so many options for you to consider.

Also clone cameras can work without delay. Long before BI introduced Sub-streams, I was always running motion detection from sub-streams and then triggering second cams to record full resolution.
SureDeppStack AI introduces a delay, but seriously it should be in ms and pale in comparison to say a typical delay with phone notifications. Could be mis-reading you again, but is still sounding like you are just finding excuses\issues that don't exist.
 
Last edited:
Top