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

Tanaban

n3wb
Joined
Jul 7, 2017
Messages
13
Reaction score
7
Location
Texas
In regards to training Deepstack, @GentlePumpkin posted a week or so ago that Deepstack is going to be open source in the future, so once he starts AI Tool development again he can add in the ability to train Deepstack.
Awesome to hear about the open source in the future.


I had it pick up incorrect objects, i.e. it thought that a cat was a dog, a bird was a cat, etc. I ended up only setting AI Tool to detect people and I’ve had great success with this. I would like to detect dogs, but it was generating too many false positives. I also adjusted the confidence levels to better detect people rather than false alerts from cats, dogs, etc.

Edit: you can also set up a mask to ignore the flower pots in the image where Deepstack thought they were a bird.
There aren't too many of what I would call "true false positives" where it really isn't an object of note. The amount of objects I'm getting alerted about is a small fraction compared to how I use to have it BI set with just motion. With just BI motion there were simply too many variables in a scene to make a simple blanket rule. If I ratcheted it too tight I would miss many things that needed to be an alert. If I opened it up to let the motion sense be sensitive enough to see small but still important motion, everything would set it off. I'm pretty happy with the letting the motion sensing run wide open to sense just about any motion and then let the Ai filter through the mess for actual objects that warrant an alert.

All that said, I did run into an issue today with AiTool just randomly not sending new images to Deepstack. It was odd and took me a minute to realize that was what was happening and not some issue with Deepstack (I auto pointed my finger at that program since I had a bit of hell getting it running). BI was still snap shooting motion. AiTool was still functioning as far as the interface (I could click around, see that it was "running", and could review previous Deepstack processed images). Ended up having to shut down AiTool and restart it. After that it started sending newly created images off to Deepstack (no restart on Deepstack). Lost half a day's worth of motion analysis with alerts. Not the end of the world since I keep continuous recording, if I found out about something I need to go back to look at. Anyone ran into that kind of issue where AiTool, where it just kind of stops sending new images ? Currently I am just running AiTool as a regular program not a service.

Beyond that it's time to look at each camera's motion settings and tweak those a bit and do the dreaded new server search. My current BI computer is getting a bit bottlenecked by the CPU these days. If anyone has some good threads/posts on VM setups and what to absolutely have on a new system for BI, Deepstack, etc, that would be great.
 

badandy996

n3wb
Joined
May 11, 2020
Messages
22
Reaction score
9
Location
California
Please see my post #338 in this thread. I outlined the prerequisites for running Deepstack on Windows. The one prerequisite is Visual C++. The other is that your processor HAS to support AVX for Deepstack to run in Windows. If the processor doesn't support AVX then you can run Deepstack in Docker on Ubuntu with the noavx tag.
I am running HA through portainer on ESXI. How would I run the noavx tag on the docker? This may be the issue that I am running into.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
I am running HA through portainer on ESXI. How would I run the noavx tag on the docker? This may be the issue that I am running into.
I don’t have the full syntax handy, but you just put the noavx tag at the end of the command to run Deepstack. I can get you the full syntax tonight/tomorrow.


Sent from my iPhone using Tapatalk
 
Joined
May 17, 2020
Messages
2
Reaction score
0
Location
United States
Hey @GentlePumpkin just wanted to say thanks fo the tool and for posting the source on GitHub. I spent a few minutes in c# earlier and got it to work with my Synology Surveillance Station. Only had to make a couple changes to your code and it is working great.
Any chance you could share this code? I also would like to use this with Surveillance Station. Thanks
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
Is this able to detect if a package is left at the front door? (like the new nest hello) feature?
 

badandy996

n3wb
Joined
May 11, 2020
Messages
22
Reaction score
9
Location
California
I don’t have the full syntax handy, but you just put the noavx tag at the end of the command to run Deepstack. I can get you the full syntax tonight/tomorrow.


Sent from my iPhone using Tapatalk
I downloaded the noavx deepstack with the command.
deepquestai/deepstack:noavx

But I am still getting the errors. How shold this be setup in hassio?
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Is this able to detect if a package is left at the front door? (like the new nest hello) feature?
Unfortunately this can't detect packages yet, at least that isn't a detection type in AI Tool. Deepstack may be able to detect packages, although if it did I'd imagine @GentlePumpkin would have included it as an object type in AI Tool.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
I downloaded the noavx deepstack with the command.
deepquestai/deepstack:noavx

But I am still getting the errors. How shold this be setup in hassio?
I'm not sure if the command is different in Hass.io, but this is the command that I run for Deepstack on Docker in Ubuntu to start it with the noavx tag: sudo docker run -e VISION-DETECTION=True -v localstorage:/datastore -p 80:5000 deepquestai/deepstack:noavx
 

just2bad

n3wb
Joined
Apr 28, 2020
Messages
11
Reaction score
9
Location
Canada
Hello, last week we did two installation of BI / Deepstack / AITool.

everything seems to be working fine but now on both installation in AITool we are getting this error message "Can't write to cameras/history.csv!" . I restarted pc, deleted the file to have it re-created, made sure the user was ownder of all the files etc... so luck. Anyone got this and solve it ?

Thanks in advance
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Hello, last week we did two installation of BI / Deepstack / AITool.

everything seems to be working fine but now on both installation in AITool we are getting this error message "Can't write to cameras/history.csv!" . I restarted pc, deleted the file to have it re-created, made sure the user was ownder of all the files etc... so luck. Anyone got this and solve it ?

Thanks in advance
Is UAC disabled? If not try running AI Tool as administrator or disable UAC and reboot.


Sent from my iPhone using Tapatalk
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
have the step by step install instructions changed? The signup page now takes you to a fourm..
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
This tool seems pretty interesting. I will be trying this in near future. Funny thing I was thinking about something today. So like can it make a catalog of people face and see how many times this face was seen in the past :D Like google photos label for faces.. then we can look it up like License plate.. But more life facial identity how many times this person has visited this area or has been spotted :D
 

Tanaban

n3wb
Joined
Jul 7, 2017
Messages
13
Reaction score
7
Location
Texas
This tool seems pretty interesting. I will be trying this in near future. Funny thing I was thinking about something today. So like can it make a catalog of people face and see how many times this face was seen in the past :D Like google photos label for faces.. then we can look it up like License plate.. But more life facial identity how many times this person has visited this area or has been spotted :D
Whoa whoa whoa, calm down Orwell. Haha

Looking at the documentation the facial recognition is there as one of the main APIs of deepstack. Wouldn't be too far fetched to link deepstack's output up to a local database with dates and times for individuals. As you said just like a license plate.
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
Question; i have a car parked in my driveway and i have the AI tool set to people and cars. If someone walks in my detection zone, will it always pickup that car as well since its parked there?
 

Tanaban

n3wb
Joined
Jul 7, 2017
Messages
13
Reaction score
7
Location
Texas
Question; i have a car parked in my driveway and i have the AI tool set to people and cars. If someone walks in my detection zone, will it always pickup that car as well since its parked there?
Yes, if you have it set to identify both it will likely see both the car and the person.

The Ai looks at every image as though it's never seen an image from this camera. So it doesn't get use to your car parked in the driveway and ignore it. It could be trained to do that, but that is beyond me and likely would be harder to program unless the software becomes fully open source.

All that said if you only have it set to people and cars and the scenario you set up happened, but with a cat setting off the motion trigger in Blue Iris, the Ai will still identify the car parked there. It will also try to identify the cat as a cat, but "ignore" the cat, not triggering past the Ai Tool based on the cat not being selected as a trigger.
 

just2bad

n3wb
Joined
Apr 28, 2020
Messages
11
Reaction score
9
Location
Canada
Is UAC disabled? If not try running AI Tool as administrator or disable UAC and reboot.


Sent from my iPhone using Tapatalk
Yes UAC is disabled and tried to run as admin with no luck. was working fine last week but starting yesterday I get those errors after some time
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
Yes, if you have it set to identify both it will likely see both the car and the person.

The Ai looks at every image as though it's never seen an image from this camera. So it doesn't get use to your car parked in the driveway and ignore it. It could be trained to do that, but that is beyond me and likely would be harder to program unless the software becomes fully open source.

All that said if you only have it set to people and cars and the scenario you set up happened, but with a cat setting off the motion trigger in Blue Iris, the Ai will still identify the car parked there. It will also try to identify the cat as a cat, but "ignore" the cat, not triggering past the Ai Tool based on the cat not being selected as a trigger.
Thanks for the reply; so as you mentioned in the later part of your reply - if my car is parked in the driveway and a cat creates movement and that image is sent to AI to process, it will ignore the cat but then it will analyze the picture and see a car and i would assume that i would get a triggered alert (in my case, this would be false). Is this correct?
 

nstig8

n3wb
Joined
Jan 21, 2015
Messages
23
Reaction score
11
Thanks for the reply; so as you mentioned in the later part of your reply - if my car is parked in the driveway and a cat creates movement and that image is sent to AI to process, it will ignore the cat but then it will analyze the picture and see a car and i would assume that i would get a triggered alert (in my case, this would be false). Is this correct?
Yes. You can create a mask .png file with your car parking space blocked off so it will ignore your car when doing the object detection. The instructions to do that are in the first post of this thread.
 

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
Yes. You can create a mask .png file with your car parking space blocked off so it will ignore your car when doing the object detection. The instructions to do that are in the first post of this thread.
With it being a driveway; there will always be a car either on the left side or right side and if mask the entire driveway, it will block the area where i would want to be notified. Not sure if this is really any good for this use. You would almost have to ensure there are no cars parked on the driveway.
 

nstig8

n3wb
Joined
Jan 21, 2015
Messages
23
Reaction score
11
With it being a driveway; there will always be a car either on the left side or right side and if mask the entire driveway, it will block the area where i would want to be notified. Not sure if this is really any good for this use. You would almost have to ensure there are no cars parked on the driveway.
Well you could skip the mask and have deepstack only detect people. The people in your driveway have to get out of their cars eventually, right? I've even had mine detect people through the front windshield sometimes.
 
Top