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

Neil Sidhu

Getting the hang of it
Joined
Mar 9, 2019
Messages
105
Reaction score
7
Location
Toronto
Several people have given you advice on this setup, and I'm not sure if you've tried the advice or not. Again, you could set up zones in BI so that only motion in the area of the porch triggers the AI. I'd probably use 2 zones and setup crossing so that people just walking past won't trigger. So, for example, the "A" zone would be the whole image and the "B" zone would be the area that's not masked in the image you shared. Setup BI to trigger the AI when there's motion from A>B.

Then basically remove the left half of your AI mask so that Bluestack gets the full person (I'm not sure if that's even necessary as it seems to be able to detect "partial" people in my experience if it can see legs. It's still going to see people in the left background, but they won't trigger the camera/alerts unless someone approaches.

If you can't get some combination of these to work then I don't think there's anything this tool (or users here) can help you with. Fundamentally, the camera angle you have set up makes this a difficult proposition.
I understand what others including your self are saying and i get it (thank you) - i have zone crossing already setup and works somewhat ok. Issue is in the evening when the sun is coming down, a person walking on the sidewalk (out of the zone) there shadow will cross the zone i have set in BI and produce an image for AI to see - now.. there would be kids on the road in the back if i remove the masking in AI on the left side and bluestack will see the kids as human and send me the alert (which would be false..) Seems like this is only good for less traffic areas such as the side of the house or a backyard..
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
I understand what others including your self are saying and i get it (thank you) - i have zone crossing already setup and works somewhat ok. Issue is in the evening when the sun is coming down, a person walking on the sidewalk (out of the zone) there shadow will cross the zone i have set in BI and produce an image for AI to see - now.. there would be kids on the road in the back if i remove the masking in AI on the left side and bluestack will see the kids as human and send me the alert (which would be false..) Seems like this is only good for less traffic areas such as the side of the house or a backyard..
As I said before either move the camera or change the angle of the camera. You are blaming the program for what is a bad setup.
 
Last edited:

Inshakoor

n3wb
Joined
May 22, 2020
Messages
6
Reaction score
2
Location
Nevada
Tried just about every combination I could think of unfortunately.
Not sure this helps but I had 2 problems getting AITool working with DeepStack (UnRaid Docker): First was I didn't have the variable VISION-DETECTION=true set in for the docker container and, as mentioned earlier, I didn't use the noavx version. Recreating the docker with the deepstack:noavx version and adding the VISION-DETECTION=true variable got it working for me. My .02.
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Is there any way to add text to the telegram alerts and not just the image? i.e. what was detected. what time, what confidence level, etc.?
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Also, is there any way to modify the URL trigger so that it 'flags' the alert? Furthermore, it would be great if you could add a description in the alerts panel where it normally says "Motion A" or "external" to include the RELEVANT triggers, i.e. "Person, cat", or, "Dog" or whatever is revelant based on the settings? I am guessing it be something like:


or


or


etc.

Thoughts?
 
Joined
May 23, 2020
Messages
6
Reaction score
0
Location
Louisiana
Any help is greatly appreciated. I'm getting the error like many below. I have installed all the C++ packages that were suggested, restarted the PC, used the noavx version, etc. I have deepstacks installed on Portainer in Home Assistant and tried installing the Windows version (which gave the could not find server error). Thanks in advance for any help.

[23.05.2020, 01:40:33.028]: Starting analysis of X:\AI Input/FCSD.20200523_014031937.jpg
[23.05.2020, 01:40:33.081]: (1/6) Uploading image to DeepQuestAI Server
[23.05.2020, 01:40:33.188]: (2/6) Waiting for results
[23.05.2020, 01:40:33.341]: (3/6) Processing results:
[23.05.2020, 01:40:33.347]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[23.05.2020, 01:40:33.353]: ERROR: Processing the following image 'X:\AI Input/FCSD.20200523_014031937.jpg' failed. Failure in AI Tool processing the image.
 

powaypat

n3wb
Joined
Apr 1, 2020
Messages
5
Reaction score
3
Hello. If I understand your post correctly; you have changed AITool to use (send image to) the Coral USB accelerator instead of Deepstack? If that's the case, could you please describe how you did? Thanks in advance.
Right. I started up an Ubuntu (19.10) VM. Then I used the Get started with the USB Accelerator information on google to install the dependencies needed for linux. I then downloaded the MobileNet SSD v2 (COCO) object detection Edge TPU model from Models | Coral. I then installed coral-pi-rest-server on the server. This is basically the "deepstack" equivelent and you point the AI Tool to that instead of the deepstack program. This will use the COCO object detection instead of sending off the images. Of course, you could also make your own object detection to make the processing even better.
 

Inshakoor

n3wb
Joined
May 22, 2020
Messages
6
Reaction score
2
Location
Nevada
Any help is greatly appreciated. I'm getting the error like many below. I have installed all the C++ packages that were suggested, restarted the PC, used the noavx version, etc. I have deepstacks installed on Portainer in Home Assistant and tried installing the Windows version (which gave the could not find server error). Thanks in advance for any help.

[23.05.2020, 01:40:33.028]: Starting analysis of X:\AI Input/FCSD.20200523_014031937.jpg
[23.05.2020, 01:40:33.081]: (1/6) Uploading image to DeepQuestAI Server
[23.05.2020, 01:40:33.188]: (2/6) Waiting for results
[23.05.2020, 01:40:33.341]: (3/6) Processing results:
[23.05.2020, 01:40:33.347]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[23.05.2020, 01:40:33.353]: ERROR: Processing the following image 'X:\AI Input/FCSD.20200523_014031937.jpg' failed. Failure in AI Tool processing the image.
When you setup the DeepStack docker, did you add "-e VISION-DETECTION=True" to the docker command when you created it I had similar problems until I did that.
 
Joined
May 23, 2020
Messages
6
Reaction score
0
Location
Louisiana
When you setup the DeepStack docker, did you add "-e VISION-DETECTION=True" to the docker command when you created it I had similar problems until I did that.
Yep added that to the Enviroment tab.

I am running Deepstack and the AI tool on a different PC than i am running Blue Iris. Would that be an issue? I tested that the triggers work and i have access to the still that are being analyzed so i don't think it is a problem just figured i would mention. I'm also seeing the requests into DeepStack so i don't think that is the issue.

[GIN] 2020/05/23 - 19:50:24 | 403 | 64.764µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:50:27 | 403 | 90.153µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:15 | 403 | 141.876µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:17 | 403 | 91.782µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:20 | 403 | 137.769µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:22 | 403 | 147.11µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:25 | 403 | 1.763197ms | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:52:27 | 403 | 675.513µs | 192.168.XX.XX | POST /v1/vision/detection

[GIN] 2020/05/23 - 19:54:54 | 403 | 64.74µs | 192.168.XX.XX | POST /v1/vision/detection



Untitled.png
 

morten67

n3wb
Joined
Jan 15, 2020
Messages
13
Reaction score
1
Right. I started up an Ubuntu (19.10) VM. Then I used the Get started with the USB Accelerator information on google to install the dependencies needed for linux. I then downloaded the MobileNet SSD v2 (COCO) object detection Edge TPU model from Models | Coral. I then installed coral-pi-rest-server on the server. This is basically the "deepstack" equivelent and you point the AI Tool to that instead of the deepstack program. This will use the COCO object detection instead of sending off the images. Of course, you could also make your own object detection to make the processing even better.
Thanks a lot. I've ordered the USB-accellerator. For some reason I could not get it delivered in France, where I live. Had to get it delivered to my father in Norway. It arrived yesterday, and he will mail it to me next week. Now I'm wondering if in the meantime I should spend the time and test tensorflow-lite without the Edge.

I'm guessing we'll soon see cameras with e.g. edge TPU's. I'm also thinking it might benifit some of us (like myself) to improve the model with training on actual photos taken by the respective Blue Iris installations (especially photos at night). We live in exciting times. Thanks again for the feedback.
 

lukyjay

n3wb
Joined
May 24, 2020
Messages
5
Reaction score
3
Location
australia
Any help is greatly appreciated. I'm getting the error like many below. I have installed all the C++ packages that were suggested, restarted the PC, used the noavx version, etc. I have deepstacks installed on Portainer in Home Assistant and tried installing the Windows version (which gave the could not find server error). Thanks in advance for any help.

[23.05.2020, 01:40:33.028]: Starting analysis of X:\AI Input/FCSD.20200523_014031937.jpg
[23.05.2020, 01:40:33.081]: (1/6) Uploading image to DeepQuestAI Server
[23.05.2020, 01:40:33.188]: (2/6) Waiting for results
[23.05.2020, 01:40:33.341]: (3/6) Processing results:
[23.05.2020, 01:40:33.347]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[23.05.2020, 01:40:33.353]: ERROR: Processing the following image 'X:\AI Input/FCSD.20200523_014031937.jpg' failed. Failure in AI Tool processing the image.
I'm having the same issue. It's a problem with the tool, when you run it in debugging mode via Visual Studio it spits out errors with some of the code.

This is the first error:
I then commented out that bit of code since logging isn't critical. I then got this error:
I'm not sure how to code in this language so unsure how to fix this. Hope the dev can assist.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Hi All,
I have running about a month without any problem this tool but I added detection for dogs (now that I have a dog :) and its not identifying it as a dog (or a cat)... I attached two images... I know that the dog is small but even with dogs or cats, it doesnt detect it. Do you know what I could configure in order to work? Its strange because it detects like an object ... Regards
Yeah, it doesn't work overly well with things apart from humans and vehicles. I currently have no insight in Deepstack internals, so ....
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
I am not trying to monitor the road in the bad - thats my issues, i am trying to mask the entire area in the back but as shown in my pictures - when i mask the back, the front door area is also getting masked so as shown the person at the door then is half cut from the top as i am trying to block the street from the back. Am i doing something wrong with the mask?

As per the Pic, you can see that i have masked the whole street and sidewalk in the back. But now if you notice, my front porch is now masked as well. So if a person comes to the door, the top half of them will be cut. How would i address this?

Thank you,
Sorry, I didn't want to attack you. I think kumar2020 advice with motion zones is indeed the best solution to that issue.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
I'm having the same issue. It's a problem with the tool, when you run it in debugging mode via Visual Studio it spits out errors with some of the code.

This is the first error:
I then commented out that bit of code since logging isn't critical. I then got this error:
I'm not sure how to code in this language so unsure how to fix this. Hope the dev can assist.
My best bet would be that Deepstack returns a wrong answer, maybe because the detection api isn't enabled? Strange.
 

ABnSultan

n3wb
Joined
Mar 4, 2018
Messages
23
Reaction score
5
could you please add more to the filter not just show relevant or irrelevant
i want to filter if it shows human or cats etc

thanks.
 

AndyHoover

n3wb
Joined
May 24, 2020
Messages
3
Reaction score
2
Location
USA
Is there a way to pass the name of the image file that resulted in a positive identification to the trigger url? A variable name perhaps?
 
Top