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

cjowers

Young grasshopper
Joined
Jan 28, 2020
Messages
85
Reaction score
18
Location
AUS
Welp, I tried docker with the -noavx deepstack, but I get the same error as above. any ideas?

I'm still a bit lost a with configuring the deepstack server from docker,
But It seems to respond to webbrowser calls to localhost:80 (or my BI pc static IP) so I'm using this in the AI tool deepstack url field, and not to the hyper-V adapter IP, docker network IP, or IP on the deepstack server log. so hopefully i've got this part correct?

what should I have in the AI tool 'trigger' URL for testing?
should BI settings have the webserver HTTP option on?
BI logs connections from the relevant user login, and deepstack server POSTs on new images arriving in target folder, so I think everything is configured.... just want to double check with the experts.

Thanks
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
370
Reaction score
184
Location
Pennsylvania
Welp, I tried docker with the -noavx deepstack, but I get the same error as above. any ideas?

I'm still a bit lost a with configuring the deepstack server from docker,
But It seems to respond to webbrowser calls to localhost:80 (or my BI pc static IP) so I'm using this in the AI tool deepstack url field, and not to the hyper-V adapter IP, docker network IP, or IP on the deepstack server log. so hopefully i've got this part correct?

what should I have in the AI tool 'trigger' URL for testing?
should BI settings have the webserver HTTP option on?
BI logs connections from the relevant user login, and deepstack server POSTs on new images arriving in target folder, so I think everything is configured.... just want to double check with the experts.

Thanks
Glad to help. It sounds like you’ve got Deepstack running the noavx version in Docker. Below is the URL to put into AI Tool to trigger the camera:

IP:port/admin?camera=Camera short name&trigger&user=username&pw=password


Sent from my iPhone using Tapatalk
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
370
Reaction score
184
Location
Pennsylvania

cjowers

Young grasshopper
Joined
Jan 28, 2020
Messages
85
Reaction score
18
Location
AUS
This goes in the camera tap for each camera.
You can test the URL from a browser to confirm that the syntax is correct.

Sent from my iPhone using Tapatalk
OMG its working!!!!!!!!! this is wicked!! a bit slow on my old machine 3s-7s per post, but no dramas there. limiting the object search criteria doesn't seem to help either. I will have a play with it some more, and configure to run on powerup. (start script or taskscheduler maybe?)

oo, imagine if this tool could be extended to identify / read license plates as well!!!



Thanks all. What finally sorted it out for me was to reinstall and then run deepquestai/deepstack:noavx using powershell. that way i could specify the port number of the deepstack url, and the VISION-DETECTION=True (not scene-detection) [code shown below], and then I used that port info for the AITool settings tab Deepstack URL.

PS C:\Users\me> docker run -e VISION-DETECTION=True -v localstorage:/datastore -p 85:5000 deepquestai/deepstack:noavx

then the AITool setting tab deepstack URL used was: :85

and what was probably obvious for everyone, but I never found any info on... BI - settings - webserver tab - http server option - should be ticked 'on'. (and use same LAN and port # that you use in AITool camera tab - Trigger URL field)

Thanks pmcross, gentle pumpkin, and any other content creators!
 
Last edited:

pbc

Pulling my weight
Joined
Jul 11, 2014
Messages
843
Reaction score
119
If anyone is willing to run a small test for me it would be appreciated. I seem to be doubling my bitrates from ~490ish MP/s to 900ish MP/s when I turn on my AI clone cameras. I run 8 cameras in total, 7 of which are cloned for purposes of the AITool.

When I just run the 7 on their own, no clones, I'm at ~20ish % CPU usage from BI. When I turn on the clone cameras, the CPU usage almost doubles.

As far as I can tell, the only difference between the main cams and the clones, is that I have motion trigger turned on in the clone cameras and not the primary cameras, and on the primary cameras they are set to continuous record vs snapshot on trigger for the AI cams.

If I disable all the AI clones, and then turn on motion trigger in the primary cams, the bitrate usage doesn't move much, from 490ish to 550ish.

For some reason I didn't think running the clones should be almost doubling the bitrate usage? Curious if this is the case for others as well?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
2,126
Reaction score
1,389
Location
United Kingdom
Are you using sub streams? In either the main or the clones?

What I found was with substreams enabled, if cloned a cam then the jpgs captured would be the lower res from the substream. So in order to fix that I deleted the substream from the clone which has the effect that BI no longer viewed the cam as a clone and so started pulling a separate stream.

I’ve reported this, asking if maybe we could have an option to select which stream the jpg would be from, I also urge anybody else having this same problem to report it, the more that do the more likely that it might be implemented as a new feature, unless there’s a technical reason why it wouldn’t be possible.
 

pbc

Pulling my weight
Joined
Jul 11, 2014
Messages
843
Reaction score
119
Don't believe so:

1596111444959.png

Believe fenderman mentioned substreams were still a bit wonky in the 5.x versions of BI.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
2,126
Reaction score
1,389
Location
United Kingdom
Try copying and pasting the main stream details into the main and clone cam to see if that makes a difference.
 

pbc

Pulling my weight
Joined
Jul 11, 2014
Messages
843
Reaction score
119
Not following what you mean (i.e., copying the main stream details?). When I set the AI cameras up, I simply copied the main camera so I'm assuming everything would be identical?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
175
Reaction score
301
In principle, you can cut out the entire duplicate camera setup, keep motion detection on your camera enabled and just replace the trigger url with this url:

http://localhost:80/admin&camera={short cam name}&flagalert=1&memo=[summary]&user={user}&pw={password}

Replace everything in the {} brackets (together with the {}) according to your setup, and leave the [summary] untouched :D
It will flag the alert in the original camera if something was detected in it. The writeup will probably take me some hours, but that's the main difference.
This requires latest version 1.67

Download v1.67
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
175
Reaction score
301
update 1.67

- Flagging the original alerts replaces duplicate cameras
Blue Iris now allows us to flag AI-confirmed alerts, so duplicate cameras are no longer needed. You can use http://localhost:80/admin&camera={short cam name}&flagalert=1&memo=[summary]&user={user}&pw={password} with your BI credentials to flag alerts and display the detected object and confidence in Blue Iris. Of course you can continue to use your duplicate cameras, but for new cameras, this is the easiest way.​

- the trigger url now supports a variety of placeholders. Following url parameters (placeholders) are available: @BootsSiR
[summary]gives a nice summary with all detected objects and confidences
[camera]gives camera name
[detection]gives first detected object
[position]gives position of first detected object
[confidence]gives confidence of first detected object
[imagepath]give the full path to the image that caused the trigger
[imagefilename]gives only the filename of the image
further changes:

  • added close confirm dialog to prevent accidently closing AI Tool. On first use, AI Tool will ask if you would like to use this feature.
  • info text on Main tab shows camera and time of last trigger
  • added filter options for people, vehicles, and animals @Lazersfly
  • added analysis sleep during first half of cooldown time to reduce CPU load in busy situations
  • enhanced choppy UI content resize behavior (mainly in Cameras and Settings tab)
  • Fixed error 'Processing the following image' because paths are not properly joined @kvanhertum
  • improved DeepStack URL input @edalquist and made 127.0.0.1 default Deepstack URL (more reliable on some systems)


The setup guide is not updated yet, work in progress


Download v1.67
 
Last edited:

pbc

Pulling my weight
Joined
Jul 11, 2014
Messages
843
Reaction score
119
Will wait for the rewrite, not sure how this would prevent constant triggering/alerts by the main cameras. I.e., I assume the reason the clones were setup is that in the main camera we turn off the trigger but setup the Alerts in that cam so that when it is triggered by the AITool it results in an Action Alert, but since those Alerts are turned off in the AIClone cameras, we don't get alerts every time motion is detected. So maybe I'm not following how this prevents that...but hopefully will once the write up is done.

Now to figure out how the heck one uses Docker Desktop. Have it set up on my server, and it's on (see the little whale or whatever it is icon), but I can't figure out where I would be able to input command lines.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
175
Reaction score
301
The main camera will produce an alert every time motion detection triggers it, but only AI-confirmed alerts will be flagged. So you p.e. can switch to show only flagged alerts in Blue Iris. And if you think that AI has missed something, you can easily check all triggers with one click.
 
Joined
May 27, 2020
Messages
13
Reaction score
1
Location
Idaho Springs, Colorado
I have a bridge on my property that Deepstack is pretty sure is a truck. I'd like to be able to detect a truck crossing the bridge, but I cannot do that without either masking the bridge, or removing trucks from detection - both would mean i would lose truck detection. ;-)

Is there any way to tell Deepstack "that is not a truck"? Or any way to tell AItool to use confidence of 80% or higher just for trucks?

Capture.PNG
 
Last edited:

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
2,126
Reaction score
1,389
Location
United Kingdom
Not following what you mean (i.e., copying the main stream details?). When I set the AI cameras up, I simply copied the main camera so I'm assuming everything would be identical?
When I had a problem with a clone pulling a separate stream what I did to fix the issue was copy the string from the main cam and then paste it into the clone cam, yes I know I was overwriting the same but that had the action of doing something in BI which then recognised the cam as being a clone and it stopped pulling a separate stream.
 
Top