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

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
Is it possible to add deer to the detection list?
 

devastator

Getting the hang of it
Joined
May 22, 2015
Messages
169
Reaction score
28
Location
Belgium
@gentle Pumpkin

2 children are playing in the yard and there are parked 2 cars
Everytime i get 1 or 2 person and the same car.
But info for car position we allready have from previous detection.
it would be cool that Aitool looked previous snapshot rectangles position and if on new snapshot are detections almost on the same position, it should ignore them.(it differs for no more then 5 for each rectangle position limit number



AItool detected 2 persons and false detected car

View attachment 63693
This is particularly hard, because e.g. for objects further away something is detected in frame 1, but not anymore in frame 10 (noise, lighting conditions, ...). If you want something like this, you would defintely need object tracking. I saw this with my Google Coral implementation too (and am working on object tracking).
You also need object tracking for e.g. moving shadows due to trees. It will keep on detecting your cars if you do not track them.

This means you would have to throw images to the AI tool at a much higher frequency (even when no motion detected)
 
Last edited:

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
Thanks! Anyone know if flagalert will fire MQTT or other alerts in blueiris? I can't get them to fire.
Yes, it does. I had that working before I switched to my Docker implementation that natively supports MQTT.
 

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
Yes, it does. I had that working before I switched to my Docker implementation that natively supports MQTT.
Yes I am waiting for CUDA w/ wsl2 support in docker windows. which is coming later this year for deepstackgpu before I make the switch. Thanks for all the bringing the Docker support.
 
Last edited:

aledesma

n3wb
Joined
Jun 13, 2020
Messages
2
Reaction score
2
Location
USA
I just updated the software because there was a bug. When after the first analysis more images were found and analyzed, the program would not delete them.

GentlePumpkin, I just wanted to say thank you! I have been struggling with improving the alerts on my cameras for years. Nothing really worked. A shadow, a tree swaying in the wind even clouds moving all triggered alerts. So do you know what I did? I turned them off. I experimented with other VMSs open source paid. Either the detection didn't work properly or the VMS didn't work right. Some of them killed the CPU completely! So I just stuck to my Synology with continuous recording and no alerts. When I came across your post your AI Tool was the most elegant solution I had seen. Free (thanks for your hard work) local and integrated with a good VMS. I downloaded the demo of blue iris and said it up in like 10 minutes and WOW!!! It worked!!!! My wife was wondering why I kept on leaving the house at 2AM and coming right back in. I bought the BI license that day and have been tweaking ever since. There are some issues with the docker but I seemed to have fixed it by installing the docker directly from portioner as opposed to Unraid where I had it previously. I cant wait to see how this project improves with as DeepStack migrates to fully open source! I would like to buy you a beer my friend. How can I contribute?
 
Last edited:

ibwhite

n3wb
Joined
Oct 5, 2015
Messages
3
Reaction score
0
This is pretty neat, and I am looking forward to getting it working. Win10 running with HomeAssistant via VBOX, I followed along with the video from "The Hook Up" on the installation with Portainer. The deployment would fail using the UI, so I downloaded the container via terminal. This download failed a few times during unpacking one compressed file, but after a couple of tries it was successful. I was then able to find the container via the Portainer UI and complete the set up. I can access the Deepstack UI just fine, but I too am getting the "ERROR: Processing the following image 'E:\AIinput/DriveWay_West_SD.20200612_173229102.jpg' failed. Can't reach DeepQuestAI Server at http://:192.168.1.98:83.

My processor supports AVX, but figured I would give the NOAVX version a try. Same issue downloading, finally got it ok, and once installed the AI Tool is giving me the same error. I even tried installed the windows version as a localhost and still get the same.

I am new to HomeAssistant, Linux, VBox and might be missing something more basic in the installation. Thoughts on what else might be causing my issue?
 

JL-F1

Getting the hang of it
Joined
Jun 12, 2020
Messages
115
Reaction score
71
Location
USA
If you confirmed that Deepstack silently crashed you can eigther try to resolve thr problem in accordance with the Windows log, or just install the Docker version.
I'm sorry, I was unclear
I confirmed Deepstack did not crash, it just cannot be contacted by AI tool, according to log. I can contact it fine using browse to localhost:83
 

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
This is pretty neat, and I am looking forward to getting it working. Win10 running with HomeAssistant via VBOX, I followed along with the video from "The Hook Up" on the installation with Portainer. The deployment would fail using the UI, so I downloaded the container via terminal. This download failed a few times during unpacking one compressed file, but after a couple of tries it was successful. I was then able to find the container via the Portainer UI and complete the set up. I can access the Deepstack UI just fine, but I too am getting the "ERROR: Processing the following image 'E:\AIinput/DriveWay_West_SD.20200612_173229102.jpg' failed. Can't reach DeepQuestAI Server at http://:192.168.1.98:83.

My processor supports AVX, but figured I would give the NOAVX version a try. Same issue downloading, finally got it ok, and once installed the AI Tool is giving me the same error. I even tried installed the windows version as a localhost and still get the same.

I am new to HomeAssistant, Linux, VBox and might be missing something more basic in the installation. Thoughts on what else might be causing my issue?
Make sure you are exposing port 83 on the Docker container. By default Docker does not expose ports, you have to explicitly allow them to be used.
 

ibwhite

n3wb
Joined
Oct 5, 2015
Messages
3
Reaction score
0
Make sure you are exposing port 83 on the Docker container. By default Docker does not expose ports, you have to explicitly allow them to be used.
Appreciate the assist. In Portainer when I set up the container I did the "port configuration" so that 0.0.0.0:83>> 5000/tcp - assuming that exposes the port? Also visiting the actual 192.168.1.xxx:83 does show that Deepstack is running. Finally, figuring I may be missing something basic like this in the set up so I tried the Windows exe localhost and have the same issue :(
 

Forid200

Young grasshopper
Joined
Jul 11, 2019
Messages
31
Reaction score
7
Location
London
Windows, it was working previously which is what I don't understand. API is running and activated.

View attachment 63645
Ditch the deepstack AI Windows program and run it in docker instead. I had so many issues running the windows version randomly stopping processing images, since moving to docker it's been working reliably for days now. No issues at all.
 

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
@GentlePumpkin Is it possible to get some statistics on how much time/average time it takes for deepstack to process the image?
 
Joined
Jun 8, 2020
Messages
2
Reaction score
1
Location
USA
Check out this tutorial on how to set it up.

I followed this video when I set mine up, I am new to BI so I am having some issues with streams becoming stale after a while and need to be viewed live again before working again.

That aside, is there a way I can setup like this video guide but record in full camera resolution? Do I still need to have duplicate cameras to achieve this?
 

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
@GentlePumpkin

First I just want to say great job on this! I registered just for you after years lurking around LOL.

Since flagging is an option now in the latest releases could you also add the ability to send a request for a non-relevent so that we can use flagalert=0 to cancel an alert when used in combo with "Allow disarm time by delaying alerts" in BI?
So basically if an image is relevant it works as does now, but if not it has a second URL where we can basically use the same info but use this 0 flag to cancel actual alerting done. For those of us that have no use for cloned feeds and record 24/7 HD this allows us to keep a single camera still and use alerting on that single camera still.
One possible thing here could be if multiple images are taken for the same alert and one cancels or flags and the other doesn't but that can be solved by just using a single image

As is yea we can tell it to flag an alert but BI will still take all the alert actions since it triggered and we did not use the disarm function.

Also maybe instead of check boxes change the objects to be a list box and add the other missing objects? I think they have about 80 actually supported items.

And maybe a donate button for yourself? :p While I get this is open source/free I don't think some of us would be opposed to buying you a drink or two for the efforts!
In my case I run BI as a VM already and don't want to install docker on a VM or have to manage another VM. I'd like to keep it all one system so the container methods others are doing while great don't fit my desire so I'll be sticking to your model I think :)
 

arg07

n3wb
Joined
Jun 16, 2020
Messages
8
Reaction score
0
Location
Toronto
This is what I am getting in my log. Anyone else have the same issue?

[16.06.2020, 17:05:23.451]: Starting analysis of Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg
[16.06.2020, 17:05:23.453]: (1/6) Uploading image to DeepQuestAI Server
[16.06.2020, 17:05:23.463]: (2/6) Waiting for results
[16.06.2020, 17:05:23.464]: (3/6) Processing results:
[16.06.2020, 17:05:23.465]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[16.06.2020, 17:05:23.466]: ERROR: Processing the following image 'Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg' failed. Failure in AI Tool processing the image.
 
Joined
May 23, 2020
Messages
6
Reaction score
0
Location
Louisiana
This is what I am getting in my log. Anyone else have the same issue?

[16.06.2020, 17:05:23.451]: Starting analysis of Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg
[16.06.2020, 17:05:23.453]: (1/6) Uploading image to DeepQuestAI Server
[16.06.2020, 17:05:23.463]: (2/6) Waiting for results
[16.06.2020, 17:05:23.464]: (3/6) Processing results:
[16.06.2020, 17:05:23.465]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[16.06.2020, 17:05:23.466]: ERROR: Processing the following image 'Z:\BlueIris\aiinput/aiDriveway.20200616_170523436.jpg' failed. Failure in AI Tool processing the image.
Yep. I'm getting the same thing. Have not figured out the issue yet. Have tried on multiple computers with different install options and no luck. If i figure it out i will post. Anyone have any other ideas?
 

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
Since I see you have a z: drive I assume it's a network map? I suspect that may be your issue.
Network drive maps work slightly different and it could be the tool is seeing the file and trying to grab it before it's done being written so DeepQuest gets a garbled file. This isn't always an issue but for some it can be.
To test, try making a local folder on the computer running AI tool and point it to that, now drop an new image into that folder and see what it does?

I have this tool on the same machine as BI and the files are local, the DeepQuestAI is a different vm though (and my BI is VM also fwiw) and no issues and I've thrown thousands of images at it.

Also make sure AI is run from a non "Program Files" folder because those require admin to write to and for example the camera settings, history and log file can't properly write to anything in that. I have mine in an AI folder on C root.
 
Top