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

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
I am currently using deepstack CPU version and want to switch to GPU. I installed an NVIDIA card and drivers, unloaded the docker CPU version and pulled the GPU, but now AItools does not get back a response from deepstack. Do I have to install NVIDIA drivers into docker or do some other form of configuration in addition to just installing the GPU version.
Are you getting this same error I am (I just did the same thing)?

[13.11.2020, 15:58:57]: ERROR: Processing the following image 'D:\aiinput\Driveway.20201113_155405209.jpg' failed. Can't reach DeepQuestAI Server at .
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
@setchells
Code:
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list |\
    sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install nvidia-container-runtime
Also make sure you include --gpus all in the docker command.
Where does one run linux commands on a windows docker implementation? Powershell doesn't understand curl and sudo commands.

BTW, is there an "idiots guide" to installing from the git? I have 1.67 installed in an AITools directory. The git says to download the zip, unblock it, then "extract it into this directory". I assume "this directory" is the AITools directory. But if I do that, all it does is create a new directory in AITools called "bi-aidetection-master", and doesn't actually overwrite anything.
 

kosh42efg

n3wb
Joined
Aug 14, 2020
Messages
29
Reaction score
13
Where does one run linux commands on a windows docker implementation? Powershell doesn't understand curl and sudo commands.
My bad. To use GPU at all from Docker you'll need to be using WSL with the Cuda build toolkit.

I tried this but failed a while back. My current solution is that I'm running Proxmox with Docker on bare metal, with BI running in a Windows virtual machine. Unfortunately Proxmox doesn't like Nvidia drivers, so I'm working on trying to get it working with Deepstack:GPU. I'll let you know if I succeed.

Windows Subsystem for Linux (WSL) is a Windows 10 feature that enables users to run native Linux command-line tools directly on Windows. WSL is a containerized environment within which users can run Linux native applications from the command line of the Windows 10 shell without requiring the complexity of a dual boot environment. Internally, WSL is tightly integrated with the Microsoft Windows operating system, which allows it to run Linux applications alongside traditional Windows desktop and modern store apps.
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
My bad. To use GPU at all from Docker you'll need to be using WSL with the Cuda build toolkit.

I tried this but failed a while back. My current solution is that I'm running Proxmox with Docker on bare metal, with BI running in a Windows virtual machine. Unfortunately Proxmox doesn't like Nvidia drivers, so I'm working on trying to get it working with Deepstack:GPU. I'll let you know if I succeed.
Thanks, pretty sure I installed the WSL with Cuda driver some time ago when I first tried the Deepstack GPU back when it wasn't working so well.
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
No idea what's going on at this stage, but nothing seems to be working.

[13.11.2020, 20:22:59]: ERROR: Can't clean the cameras/history.csv!

Is the most recent error I'm getting. If I wanted to start AITools from a clean slate, how do I install something from that git zip file? I.e., if I just deleted my 1.67 AITools directory, do I simply extract the zip file and fine the AITools executable in whatever new directory that extracted folder has it in, and start from scratch setting up cameras?
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Any suggestions on how to resolve this issue? I am getting heaps of errors when it comes to shadows... See below screenshot... the shadow from the big tree basically moves with the wind in front of the main footpath ... it detects the shadow as a person with a very high detection %.... i cant just mask the whole footpath as it'll stop detections of actual people?shadow 1.pngshadow.png
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
So, have a completely non-functioning setup right now. I deleted deepstack container from docker, then ran this:

Code:
docker run --restart=always -e MODE=Low -e VISION-DETECTION=True -v localstorage:/datastore -p 81:5000 --name deepstack deepquestai/deepstack:gpu-x4-beta
But get these errors:

[13.11.2020, 20:22:59]: ERROR: Can't clean the cameras/history.csv!
[13.11.2020, 21:09:49]: ERROR: Processing the following image 'D:\aiinput\Driveway.20201113_210809565.jpg' failed. Can't reach DeepQuestAI Server at .

So thought I'd try the newer version that @Chris Dodge has on git. Looking at Git, I pulled the zip file which zips to a directory name of "bi-aidetection-master", then followed these instructions below.

Code:
Backup your current AITOOLS folder.
Download the ZIP, right-click > Properties > UNBLOCK.
Unzip to existing folder, overwriting any files.
Most if not all settings should migrate.
But the above doesn't make much sense to me, as if I simply unzip/extract the contents of "bi-aidetection-master" into the AITools directory, all it does is create a new directory in the AITools directory called "bi-aidetection-master" and extract the files to it. But when I run the executable AITools which is in the AITools directory, of course it doesn't have any relation to the files in the bi-aidetection-master directory. Am I instead supposed to extract the files, then copy and paste them from the bi-aidetection-master directory?

Deepstack is activated when I check localhost:81, and in my 1.67 version of AITools the Deepstack URL is correctly listed as localhost:81. So no idea i) what I'm doing wrong as it relates to the deepstack pull on docker (maybe my docker run command above is incorrect somewhere even though it seems to be running fine?), and ii) how to "update" AITools 1.67 to the newest version.

Help!!
 

Nierka

n3wb
Joined
Jan 21, 2016
Messages
14
Reaction score
11
Good catch, yes it did. 2 minutes, which is the other thing I'm wondering. Does the cool down mean it won't look at another image for a full 2 minutes? What do other folks use?

Having said that, looking through the folder, it didn't drop a photo of either of the two guys leaving to go back to their vehicles, so BI presumably didn't trigger.
At 5:17 AI/Deppstack recognized the first person, after this 2 min cooldown means the next recognition will be after 5:19. You are correct cooldown means AItools won't look at another image for 2 min.
 

Alan_F

Getting the hang of it
Joined
May 17, 2019
Messages
64
Reaction score
57
Location
Maryland
So thought I'd try the newer version that @Chris Dodge has on git. Looking at Git, I pulled the zip file which zips to a directory name of "bi-aidetection-master", then followed these instructions below.

Code:
Backup your current AITOOLS folder.
Download the ZIP, right-click > Properties > UNBLOCK.
Unzip to existing folder, overwriting any files.
Most if not all settings should migrate.
But the above doesn't make much sense to me, as if I simply unzip/extract the contents of "bi-aidetection-master" into the AITools directory, all it does is create a new directory in the AITools directory called "bi-aidetection-master" and extract the files to it. But when I run the executable AITools which is in the AITools directory, of course it doesn't have any relation to the files in the bi-aidetection-master directory. Am I instead supposed to extract the files, then copy and paste them from the bi-aidetection-master directory?

I think you're downloading the zip of the project (to be opened in Visual Studio for editing/compiling) and not the zip of the compiled application. From Releases · VorlonCD/bi-aidetection ... scroll down to the bottom of the first post where you'll see a link to AITOOL-VORLONCD.zip. Download that file. By default that should unzip into a folder called AITOOL-VORLONCD, not bi-aidetection-master. The AITool.exe in that folder is the program you need to run.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
Any suggestions on how to resolve this issue? I am getting heaps of errors when it comes to shadows... See below screenshot... the shadow from the big tree basically moves with the wind in front of the main footpath ... it detects the shadow as a person with a very high detection %.... i cant just mask the whole footpath as it'll stop detections of actual people?
You've already asked this question once before. Move the camera to a better position if you don't want to mask it out.
 

jgosnell

n3wb
Joined
May 31, 2020
Messages
2
Reaction score
0
Location
Alabama
Look in the Json file in settings folder.
I found a setting in there that changes border and font size for the images in the "History" tab of AITool, but this doesn't seem to affect the images sent through Telegram. Any other ideas?
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
I think you're downloading the zip of the project (to be opened in Visual Studio for editing/compiling) and not the zip of the compiled application. From Releases · VorlonCD/bi-aidetection ... scroll down to the bottom of the first post where you'll see a link to AITOOL-VORLONCD.zip. Download that file. By default that should unzip into a folder called AITOOL-VORLONCD, not bi-aidetection-master. The AITool.exe in that folder is the program you need to run.
Ah, thanks, that makes more sense.

The new tool doesn't seem to be recognizing the mask I had for my Driveway camera...how does one select the correct png file that I created for 1.67?
 

aesterling

Getting comfortable
Joined
Oct 9, 2017
Messages
352
Reaction score
346
Also, when I have the 'Cancel URL' enabled: what happens is, it deletes the actual alert from the alerts list... this may be great for some....

Ideally, if the memo variable is not empty, I believe it should keep the original alert (not delete) and simply add the text (CANCELLED) or whatever text we would like... is this possible?
@joshwah Instead of using &flagalert=0 in the cancel URL, I believe you could use &flagalert=-1 to reset the alert state. Then it wouldn’t be removed from the alerts list.

Here are the options from the manual:
x = 0 mark the most recent alert as cancelled.
x = 1 mark the most recent alert as flagged.
x = 2 mark the most recent alert as confirmed.
x = 3 mark the most recent alert as flagged and confirmed.
x = -1 reset the flagged, confirmed, and cancelled states
Currently, the canceled alerts are just moved to the Canceled Alerts section if you still want to review them there:

IMG_0003.jpg
 
Last edited:

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
147
Reaction score
23
Location
TX
Ah, thanks, that makes more sense.

The new tool doesn't seem to be recognizing the mask I had for my Driveway camera...how does one select the correct png file that I created for 1.67?
If you have the new version look in the Settings file any masks you had before (if that is what you are asking) should be in there.
 

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
147
Reaction score
23
Location
TX
So obviously not a car. I have noticed since going to AITool" version="2.0.109.7617 I am getting many more incorrect ID's- this one seems to coming up alot- do you think it is just the time of day / shadow play causing it to falsely identify the pothole as a car?
Not a car.jpg
 

blazin912

Getting the hang of it
Joined
Sep 15, 2019
Messages
168
Reaction score
41
Location
MA
Looking for some help with an alert issue I'm having. I have multiple cameras setup with cloned cameras working just fine. One camera doesn't seem to work.

1 - Manually triggering Blue Iris works
2 - "Test" button in AI Tools triggers camera in Blue Iris
3 - Motion creates an alert clip on the main camera in Blue Iris as expected
4 - AI Tools correctly identifies the object as Person with 99% confidence for the motion in question

So as far as I can tell:

1 - I walk into the path of the camera which triggers the motion of the main camera
2 - AI Tools checks the JPEG snapshot folder and finds the correct file
3 - AI Tools correctly IDs the targets
4 - Something fails

I thought testing that AI Tools could make an external URL trigger was good enough.. but clearly not. Any ideas on what else could be going wrong?

Any help would be greatly appreciated!
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
So obviously not a car. I have noticed since going to AITool" version="2.0.109.7617 I am getting many more incorrect ID's- this one seems to coming up alot- do you think it is just the time of day / shadow play causing it to falsely identify the pothole as a car?
I don't think there is much that can be done about that kind of thing, short of masking that small area I guess. Weeks ago a bird fly by my camera, and AITools (or Deepstack..which does the analysis?) was pretty sure it was a bear. Today I ended up with several giraffe's on my driveway. It's like I live in animal kingdom. Apparently I was a bird.

Might be just me, but the detection algorithms seem to have gotten worse of late?

1605390918237.png
 

blazin912

Getting the hang of it
Joined
Sep 15, 2019
Messages
168
Reaction score
41
Location
MA
Looking for some help with an alert issue I'm having. I have multiple cameras setup with cloned cameras working just fine. One camera doesn't seem to work.

1 - Manually triggering Blue Iris works
2 - "Test" button in AI Tools triggers camera in Blue Iris
3 - Motion creates an alert clip on the main camera in Blue Iris as expected
4 - AI Tools correctly identifies the object as Person with 99% confidence for the motion in question

So as far as I can tell:

1 - I walk into the path of the camera which triggers the motion of the main camera
2 - AI Tools checks the JPEG snapshot folder and finds the correct file
3 - AI Tools correctly IDs the targets
4 - Something fails

I thought testing that AI Tools could make an external URL trigger was good enough.. but clearly not. Any ideas on what else could be going wrong?

Any help would be greatly appreciated!
This turns out to be due to the settings not saving as the service was running while.i was modifying and saving

Word to the wise, stop the service (aitools) make edits, restart the service for victory
 
Top