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

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
An update to my VorlonCD mod:
  • Maybe fix dupe image issues sigh
Yes, but we all appreciate it! :)

We would not have this wonderful tool if not for GentlePumpkin, and it wouldn't be so awesome if not for your efforts as well as the work of others such as @classObject.

I had done all that I could to reduce false alerts but they were still annoying me. I used multiple cameras with 6mm lenses set up to view only important areas instead of wide angle lenses that capture trees and bushes that blow in the wind, along with AB>C unidirectional zone crossing and optimization of motion detection settings. But I was still getting false alerts from ground shadows as trees blew in the wind, from the movement of clouds overhead on sunny days, and a lot of false alerts at night due to bugs flying around the camera.

Most of the false alerts have been eliminated with AI. I rarely ever get a false alert from bugs flying around the camera at night, but one time AI thought that a wasp on the lens was a bear. It also detected a small bush in my yard as a person, but the bush needed trimming anyway. Since the trim there's been no false detections.

I believe that some of the previous work that I had done to eliminate false alerts such as using narrower lenses than normal, placing the cameras closer to the subject, mounting the cameras relatively low, and using auxiliary IR illuminators instead of the built in IR LEDs where appropriate has helped with my AI success. AI acts on what it sees so feeding it a better image can lead to better results. AI isn't an instant fix for a sloppy camera setup.

Again, I would like to express my appreciation for all the work that has been put into AI Tool and for making my life a little easier! :)
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
For comparison with my i7-4790 running Windows DeepStack in High mode I get times of 660 to 707ms when feeding it images of 2688 x 1520, 2048 x 1536, and 1920 x 1080.

I have a Celeron J1900 and an old i5-4460 system laying around and this coming weekend I plan to put fresh copies of Windows on them and check DS times, just out of curiosity and to see how they do against the Pi. The Celeron is a dog and I don't expect it to do well, but I'm curious to see how the old i5 does.
My i7 and i9 were getting time like that for 1080 images but for some reason they are now about 1 sec. I changed to the beta version of Deepstack and run in Windows Docker Desktop.

My interest in the pi is for power consumption reasons. I'm trying to be self sufficient which is hard during the winter months.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
Yes, but we all appreciate it! :)

We would not have this wonderful tool if not for GentlePumpkin, and it wouldn't be so awesome if not for your efforts as well as the work of others such as @classObject.

I had done all that I could to reduce false alerts but they were still annoying me. I used multiple cameras with 6mm lenses set up to view only important areas instead of wide angle lenses that capture trees and bushes that blow in the wind, along with AB>C unidirectional zone crossing and optimization of motion detection settings. But I was still getting false alerts from ground shadows as trees blew in the wind, from the movement of clouds overhead on sunny days, and a lot of false alerts at night due to bugs flying around the camera.

Most of the false alerts have been eliminated with AI. I rarely ever get a false alert from bugs flying around the camera at night, but one time AI thought that a wasp on the lens was a bear. It also detected a small bush in my yard as a person, but the bush needed trimming anyway. Since the trim there's been no false detections.

I believe that some of the previous work that I had done to eliminate false alerts such as using narrower lenses than normal, placing the cameras closer to the subject, mounting the cameras relatively low, and using auxiliary IR illuminators instead of the built in IR LEDs where appropriate has helped with my AI success. AI acts on what it sees so feeding it a better image can lead to better results. AI isn't an instant fix for a sloppy camera setup.

Again, I would like to express my appreciation for all the work that has been put into AI Tool and for making my life a little easier! :)

Ditto and thanks for the dynamic to static mask ability.
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
hmm i get no telegram BOT ID and Message is same aitool but in the new VorlonCD mod 1.72 i get mo message. Nothing in log. I have activate telegram alarm in my cams


edit: i see i get wrong flags .. maybe tigger URL change ?
I get aitool 1x cat (78%( irrelevant ) but in BI i get flag : person 99,21

other i get aitool Irrlevant 3x cars 99-100% i get a tigger to BI with "summary"
AItool say Irrlevant (not green) but tigger urls send .. but no telegram.
my Tigger all new Line:


LOG:
Code:
[09:47:23.308]:           OnCreatedAsync> Adding new image to queue: C:\BlueIris\aiinput\aigarage2.20200904_094723291.jpg
[09:47:30.569]:            DetectObjects> 192.168.2.1:280 - (2/6) Posted in 10797ms, Received a 123 byte response.
[09:47:30.571]:            DetectObjects> 192.168.2.1:280 - (3/6) Processing results...
[09:47:30.573]:            DetectObjects> 192.168.2.1:280 -    Detected objects:cat (78,33%),
[09:47:30.574]:            DetectObjects> 192.168.2.1:280 - (4/6) Checking if detected object is relevant and within confidence limits:
[09:47:30.627]:            DetectObjects> 192.168.2.1:280 -    cat (78,33%) is irrelevant.
[09:47:30.630]:    CleanUpExpiredHistory> Removing expired history: key=2420546, name=person, xmin=1953, ymin=1192, xmax=2321, ymax=1435, counter=0, create date: 04.09.2020 08:16:00 for camera garage2 which existed for 31 minutes.
[09:47:30.629]:            DetectObjects> 192.168.2.1:280 - ### Masked objects summary for camera garage2 ###
[09:47:30.632]:            DetectObjects> 192.168.2.1:280 - (5/6) Performing alert CANCEL actions:
[09:47:30.673]:          CallTriggerURLs>    -> trigger URL called: http://192.168.2.5:81/admin?camera=garage2&trigger&user=iobroker&pw=123, response: 'signal=green profile=1 lock=0 clip=448933051 camera=garage2 '
[09:47:31.029]:          CallTriggerURLs>    -> trigger URL called: http://192.168.2.5:81/admin?camera=garage2&flagalert=1&trigger&memo=person%20(99,21%25)&user=iobroker&pw=123, response: 'signal=green profile=1 lock=0 clip=448933051 camera=garage2 '
[09:47:31.118]:                     Save> Settings saved to C:\Users\cam\Desktop\aitool\AITool.Settings.json
[09:47:31.118]:            DetectObjects> 192.168.2.1:280 - (6/6) Camera garage2 caused an irrelevant alert.
[09:47:31.121]:            DetectObjects> 192.168.2.1:280 - 1x irrelevant, so it's an irrelevant alert.
 
Last edited:

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
@ChrisX - If you have Camera > Actions > Settings > "Trigger Cancels" enabled it would not preform any of the actions except calling the trigger URL's. Its an experimental feature I'm not really sure works yet anyway.
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
@ChrisX - If you have Camera > Actions > Settings > "Trigger Cancels" enabled it would not preform any of the actions except calling the trigger URL's. Its an experimental feature I'm not really sure works yet anyway.
Ahh okay :)
But telegram get no images. Error send by telegram but no images
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
Raspberry Pi 4, has anyone installed deepstack on it and got it to work? I've done it ok on a 3 B+.

I've got it activated but for some reason it's not responding to requests from AITool.

pi@raspberrypi:~ $ sudo deepstack start "VISION-DETECTION=True"
Python 3.7.3
nohup: appending output to 'nohup.out'
nohup: appending output to 'nohup.out'
[setupvars.sh] OpenVINO environment initialized
nohup: ignoring input and appending output to 'nohup.out'
1269:C 05 Sep 2020 21:04:06.503 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1269:C 05 Sep 2020 21:04:06.503 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1269, just started
1269:C 05 Sep 2020 21:04:06.503 # Configuration loaded


DeepStack is Active


Active APIs:


/v1/vision/detection
---------------------------------------
v1/vision/addmodel
---------------------------------------
v1/vision/listmodels
---------------------------------------
v1/vision/deletemodel
---------------------------------------
v1/vision/setadminkey
---------------------------------------
v1/vision/setapikey
---------------------------------------
v1/vision/backup
---------------------------------------
v1/vision/restore
[GIN] 2020/09/05 - 21:12:50 | 200 | 1.479571ms | 192.168.3.12 | GET /
[GIN] 2020/09/05 - 21:12:50 | 200 | 13.596837ms | 192.168.3.12 | GET /assets/img/deepstack.png
[GIN] 2020/09/05 - 21:12:50 | 200 | 966.481µs | 192.168.3.12 | GET /assets/img/loader.gif
[GIN] 2020/09/05 - 21:12:50 | 200 | 365.393µs | 192.168.3.12 | GET /assets/img/dark-background.png
^C

1599337394166.png
 

VLITKOWSKI

Young grasshopper
Joined
May 9, 2019
Messages
75
Reaction score
7
Location
France
Raspberry Pi 4, has anyone installed deepstack on it and got it to work? I've done it ok on a 3 B+.

I've got it activated but for some reason it's not responding to requests from AITool.

pi@raspberrypi:~ $ sudo deepstack start "VISION-DETECTION=True"
Python 3.7.3
nohup: appending output to 'nohup.out'
nohup: appending output to 'nohup.out'
[setupvars.sh] OpenVINO environment initialized
nohup: ignoring input and appending output to 'nohup.out'
1269:C 05 Sep 2020 21:04:06.503 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1269:C 05 Sep 2020 21:04:06.503 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1269, just started
1269:C 05 Sep 2020 21:04:06.503 # Configuration loaded


DeepStack is Active


Active APIs:


/v1/vision/detection
---------------------------------------
v1/vision/addmodel
---------------------------------------
v1/vision/listmodels
---------------------------------------
v1/vision/deletemodel
---------------------------------------
v1/vision/setadminkey
---------------------------------------
v1/vision/setapikey
---------------------------------------
v1/vision/backup
---------------------------------------
v1/vision/restore
[GIN] 2020/09/05 - 21:12:50 | 200 | 1.479571ms | 192.168.3.12 | GET /
[GIN] 2020/09/05 - 21:12:50 | 200 | 13.596837ms | 192.168.3.12 | GET /assets/img/deepstack.png
[GIN] 2020/09/05 - 21:12:50 | 200 | 966.481µs | 192.168.3.12 | GET /assets/img/loader.gif
[GIN] 2020/09/05 - 21:12:50 | 200 | 365.393µs | 192.168.3.12 | GET /assets/img/dark-background.png
^C

View attachment 69972
Running on PI4 + NCS2, no issues
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
Running on PI4 + NCS2, no issues
I put my sd card from the Pi 3B+ into the 4 and that runs ok so i don't know why it won't run on a new SD card and software installed using the 4.

Now trying a new install of the 64bit beta on the 3B+
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Pi 4 with 4Gb 32bit is running at about 0.8 seconds.
Can you share your MP load for the cameras that you’re sending images to Deepstack on the Pi 4? I’m looking to buy a separate machine to just run Deepstack on, but if the Pi 4 is capable, I’ll buy a Pi 4 instead.


Sent from my iPhone using Tapatalk
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
Re; Raspberry Pi,

I've just noticed that the box showing the item detected isn't in the correct place when using my Pi. It looks to be the right size and for the right object but shifted, normally down the screen.

I've tried it with a couple of different Pis and done a few new installs with the same results. The program works fine using a windows computer running docker.

I'm using the [U]Chris Dodge[/U] version but have also tested on the original GentlePumpkin AITool with the same result.

Any ideas anyone?

1599515658034.png
 
Last edited:

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
@Tinbum - I would prop the pi up a little, let it see outside the window. Poor little guy probably feels neglected sitting over there in the corner half covered in the national geographic magazines. Or is that just mine? :) (only used as a 'PiHole')

Hmm do you have the BI resize image option enabled? If so, try disabling to see if anything changes.

The DPI scaling on your monitor could be a factor. See if it happens when you set to 100% dpi. Or maybe play with AITOOL shortcut > compatibility tab > DPI settings.

Are you VNC'd'd or remote desktop to view the image? If so, see if that is a factor.
 
Joined
Sep 7, 2020
Messages
1
Reaction score
0
Location
Arkansas, United States
Having issues with Deepstack. I installed it Kubernetes in Portainer. The application is running and when i access it via the port it says DeepStack is activated. But I am getting the errors below in AiTool.

Code:
[07.09.2020, 19:39:32.756]: (1/6) Uploading image to DeepQuestAI Server
[07.09.2020, 19:39:43.113]: Cleaning cameras/history.csv if neccessary...
[07.09.2020, 19:41:12.789]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[07.09.2020, 19:41:12.811]: ERROR: Processing the following image 'F:\BlueIris\AIinput\frontsd.20200907_193756526.jpg' failed. Can't reach DeepQuestAI Server at http://192.168.1.190:30662/v1/vision/detection.
[07.09.2020, 19:41:12.843]:
[07.09.2020, 19:41:12.855]: Starting analysis of F:\BlueIris\AIinput\frontsd.20200907_193801585.jpg
[07.09.2020, 19:41:12.866]: (1/6) Uploading image to DeepQuestAI Server
[07.09.2020, 19:42:52.892]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[07.09.2020, 19:42:52.911]: ERROR: Processing the following image 'F:\BlueIris\AIinput\frontsd.20200907_193801585.jpg' failed. Can't reach DeepQuestAI Server at http://192.168.1.190:30662/v1/vision/detection.
[07.09.2020, 19:42:52.935]:
[07.09.2020, 19:42:52.947]: Starting analysis of F:\BlueIris\AIinput\frontsd.20200907_194008188.jpg
[07.09.2020, 19:42:52.959]: (1/6) Uploading image to DeepQuestAI Server
 

BlueTalker

n3wb
Joined
Sep 7, 2020
Messages
2
Reaction score
0
Location
Texas
Hello, I was hoping someone has seen something like this before. I'm using the AI Tool with a mask over a fire hydrant as it gets marked as a person often but the tool is not triggering when an actual person is seen outside of the masked area. Anyone have any ideas how to fix this situation?
 

Attachments

barnyard

n3wb
Joined
Aug 9, 2020
Messages
24
Reaction score
5
Location
United States
Hello, I was hoping someone has seen something like this before. I'm using the AI Tool with a mask over a fire hydrant as it gets marked as a person often but the tool is not triggering when an actual person is seen outside of the masked area. Anyone have any ideas how to fix this situation?
I don't see a mask in that second photo. How did you create your mask? Is it possible that the whole photo is a mask?
 
Top