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

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
147
Reaction score
23
Location
TX
Just FYI reference the ---- All URL's are in use, disabled, camera name doesn't match or time range was not met. (1 inuse, 0 disabled, 0 wrong camera, 0 not in time range, 0 at max per month limit) Waiting... line in the log pretty sure this is not an error but more of an information entry. @VorlonCD could you verify. Thanks
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
GPU(Windows Beta)+CPU(Docker) 11m53s

So first observation is GPU only queues more images than both, but not that many more, 1076 max queue size for GPU vs 1006 for both GPU and CPU.

Time wise 17:16:54 - 17:30:31 13m37s

I thought I would run CPU only again just to make sure

CPU only queued less images than Both GPU only and combined CPU and GPU at 902.

Time wise it started at 17:38:20 and finished at 17:50:05 - 11m45s

There appears to be zero benefit to running the windows GPU Beta Version in addition to the CPU docker version. Strangely the GPU version reports slightly faster processing times than the CPU version, so it has to be something to do with the way the Windows GPU version is passing the requests to the card and returning them.

This test was run on a I7-10750H with a GTX1650. YMMV.
I'm not sure what your trying to do. My GPU windows is certainly much faster than the CPU Docker. All versions I run are the latest including AITool.

I'm not trying to stress test it just run it in real world conditions in AITool.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
Based on your report it appears that the difference in confidence level that AskNoOne saw between the Nano and CPU versions has more to do with the version of DS being used, and not the platform. This is assuming that you are using the latest DS on all your platforms.
Yes all latest versions. Their is a big difference between the old and new versions in Deepstack not only in processing time but also the confidence % they show.
 

SyconsciousAu

Getting comfortable
Joined
Sep 13, 2015
Messages
872
Reaction score
825
FYI, Docker now supports GPU in WSL 2: WSL 2 GPU Support is Here - Docker Blog
Saw that but wasn't entirely happy with the level of access the Windows insider ring wanted to my computer activity so have decided to wait a bit.

I'm not sure what your trying to do.
Just trying to get some semi scientific metric by which I can justify spending the money for a graphics card for the BI box. Right now it's all fail because there is no improvement in actual processing times, even when the GPU and CPU version are run together.

My GPU windows is certainly much faster than the CPU Docker.
But is it? My GPU windows version reports it does the image processing part of the equation about 25 - 50ms faster than the CPU Docker version, but, when tested whollistically, the CPU docker version processes the images I fed it faster than the GPU version. I'm expecting that to change when the GPU docker version for windows becomes available to general public. Clearly there is an overhead in the round trip through the windows program that is not reflected in the actual processing time figures that deepstack is reporting.

I'm not trying to stress test it just run it in real world conditions in AITool.
2700 images in around 10 minutes is quite unrealistic as BI will never send that many images that fast to the AI tool for processing, but by throwing that many images at it in a test it created a way to measure the real world processing time in some meaningful way.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
2700 images in around 10 minutes is quite unrealistic as BI will never send that many images that fast to the AI tool for processing, but by throwing that many images at it in a test it created a way to measure the real world processing time in some meaningful way.
I have been doing 260 a minute within AITool.
 
Last edited:

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
1608845233126.png
Top one is Windows GPU, 2nd is Jetsun, 3rd docker CPU, 4th my laptop docker, 5th docker CPU on another desktop and sixth Amazon. !st and 3rd are on BI machine.


1608845746800.png
 
Last edited:

cscoppa

Getting the hang of it
Joined
Dec 14, 2019
Messages
50
Reaction score
26
Biggest issue I have with the GPU version is the 1st image in a series always takes WAY longer. The GPU clock speed is probably way down during that 1st image, then it throttles up and subsequent requests are very fast. Changing the settings in Nvidia Control Panel to Prefer Maximum Performance doesn't help.

[GIN] 2020/12/24 - 16:53:32 | 200 | 397.9982ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:53:38 | 200 | 81.0031ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:53:43 | 200 | 99.004ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:15 | 200 | 136.0008ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:19 | 200 | 84.0018ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:19 | 200 | 164.9922ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:23 | 200 | 138.0019ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:27 | 200 | 138.9995ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:31 | 200 | 125.9976ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:35 | 200 | 162.0054ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:06 | 200 | 44.9992ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:10 | 200 | 127.005ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:14 | 200 | 132.9966ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:17 | 200 | 84.0023ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:19 | 200 | 134.0005ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:15 | 200 | 134.0012ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:18 | 200 | 128.0008ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:22 | 200 | 129.9998ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:54 | 200 | 459.9971ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:55 | 200 | 132.0027ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:59 | 200 | 156.9986ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:59 | 200 | 111.9994ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:36:03 | 200 | 140.9979ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:36:03 | 200 | 109.0036ms | 127.0.0.1 | POST /v1/vision/detection
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
Biggest issue I have with the GPU version is the 1st image in a series always takes WAY longer. The GPU clock speed is probably way down during that 1st image, then it throttles up and subsequent requests are very fast. Changing the settings in Nvidia Control Panel to Prefer Maximum Performance doesn't help.

[GIN] 2020/12/24 - 16:53:32 | 200 | 397.9982ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:53:38 | 200 | 81.0031ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:53:43 | 200 | 99.004ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:15 | 200 | 136.0008ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:19 | 200 | 84.0018ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:19 | 200 | 164.9922ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:23 | 200 | 138.0019ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:27 | 200 | 138.9995ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:31 | 200 | 125.9976ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:54:35 | 200 | 162.0054ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:06 | 200 | 44.9992ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:10 | 200 | 127.005ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:14 | 200 | 132.9966ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:17 | 200 | 84.0023ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 16:55:19 | 200 | 134.0005ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:15 | 200 | 134.0012ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:18 | 200 | 128.0008ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:00:22 | 200 | 129.9998ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:54 | 200 | 459.9971ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:55 | 200 | 132.0027ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:59 | 200 | 156.9986ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:35:59 | 200 | 111.9994ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:36:03 | 200 | 140.9979ms | 127.0.0.1 | POST /v1/vision/detection
[GIN] 2020/12/24 - 17:36:03 | 200 | 109.0036ms | 127.0.0.1 | POST /v1/vision/detection

That's normal
 

cscoppa

Getting the hang of it
Joined
Dec 14, 2019
Messages
50
Reaction score
26
That's normal
It might be normal, but it kind of defeats the advantages of the GPU version. The time to notification on the 1st image is the most important of the whole "series"
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
It might be normal, but it kind of defeats the advantages of the GPU version. The time to notification on the 1st image is the most important of the whole "series"
Its only the very first image to be processed . If it's that important do a test image when you first start AITOOL. I have no problems at all because of it. I find the CPU version does it as well, so does the Jetson and the PI.

Sorry I didn't notice the one further down. It's only the very first time deepstack process an image with me after you've started it.
 
Last edited:

JL-F1

Getting the hang of it
Joined
Jun 12, 2020
Messages
118
Reaction score
71
Location
USA
For me the delay happens once it hasn't processed an image in about 4 mins.
 

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
147
Reaction score
23
Location
TX
Just wanted to say Thanks to everyone for all the fabulous work on this! I hope everyone has Safe and Happy Holiday Season! :clap:
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
It might be normal, but it kind of defeats the advantages of the GPU version. The time to notification on the 1st image is the most important of the whole "series"
I've tried to replicate it and it also happens with mine as well. It doesn't happen with the CPU' Docker deepstack but I've not tried it with the Windows CPU version.

I don't think it's creating much of a problem as its less than a half a second difference but I've opened an issue on Github.
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
278
Reaction score
1,350
Location
Washington State
Yeah it's doing my head in... it keeps telling me all my URLs are in use....?
I'm currently feeling your pain. I had been running AI Tool and the older Windows version of DS for some time without much trouble. Recently I upgraded to the latest Windows version of DS and added a Nano, again with the latest DS. I also added a fourth camera for use with AI. I didn't notice any trouble between the short time when I upgraded DS and when I added the camera, but I can't say for sure if there was an issue. However, after adding the camera I started getting the message that all URLs were in use and processing would stop. After 100 images collected in the queue then I started getting messages about the queue being full. After restarting AI Tool it would process images for a bit and then fail again.

I monkeyed with things quite a bit in an attempt to get it working again. I removed the new version of DS and went back to the old one. I removed AI Tool and tried starting over again, but it appears that you can't start fresh just by deleting the AI Tool program folder. After doing so and starting AI Tool, my cameras and settings were still there. The log said that the config file was messed up and that it was restoring from the registry. So I suppose there's some AI Tool settings stored in the Windows registry, or at least somewhere other than where AI Tool resides.

So I decided to try an older version of AI Tool. I think it was 1.8 something, but I still had the same problem. So I gave up and did a bare metal restore from a backup and restored to a point before I upgraded to the newer version of DS and before I added the new camera, and then everything worked as expected. Well, until I added the fourth camera. After that I started getting the messages about all the URLs being in use. I removed the new camera and everything worked as expected again.

I was running the latest AI Tool and the older version of Windows DS on my BI machine. In an attempt to see if the new version of DS had something to do with it I pointed AI Tool only to the Nano. It seems to be working well now but I haven't had much time for testing. If it proves to be acting normal for a day or two then I'll try adding in the new camera.

The camera isn't anything fancy. Just a cheap Reolink RLC-410 that I put part way down my long driveway to see when someone is coming. There's a tree that blows in the wind but I have it masked out in a BI motion zone so it doesn't generate a lot of images to be analyzed by AI. It doesn't make sense but at the moment the new camera appears to be somehow involved. Be it the camera, the act of adding one more camera to AI Tool, or something I haven't yet considered.
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
448
Reaction score
126
Location
UK
I'm currently feeling your pain. I had been running AI Tool and the older Windows version of DS for some time without much trouble. Recently I upgraded to the latest Windows version of DS and added a Nano, again with the latest DS. I also added a fourth camera for use with AI. I didn't notice any trouble between the short time when I upgraded DS and when I added the camera, but I can't say for sure if there was an issue. However, after adding the camera I started getting the message that all URLs were in use and processing would stop. After 100 images collected in the queue then I started getting messages about the queue being full. After restarting AI Tool it would process images for a bit and then fail again.

I monkeyed with things quite a bit in an attempt to get it working again. I removed the new version of DS and went back to the old one. I removed AI Tool and tried starting over again, but it appears that you can't start fresh just by deleting the AI Tool program folder. After doing so and starting AI Tool, my cameras and settings were still there. The log said that the config file was messed up and that it was restoring from the registry. So I suppose there's some AI Tool settings stored in the Windows registry, or at least somewhere other than where AI Tool resides.

So I decided to try an older version of AI Tool. I think it was 1.8 something, but I still had the same problem. So I gave up and did a bare metal restore from a backup and restored to a point before I upgraded to the newer version of DS and before I added the new camera, and then everything worked as expected. Well, until I added the fourth camera. After that I started getting the messages about all the URLs being in use. I removed the new camera and everything worked as expected again.

I was running the latest AI Tool and the older version of Windows DS on my BI machine. In an attempt to see if the new version of DS had something to do with it I pointed AI Tool only to the Nano. It seems to be working well now but I haven't had much time for testing. If it proves to be acting normal for a day or two then I'll try adding in the new camera.

The camera isn't anything fancy. Just a cheap Reolink RLC-410 that I put part way down my long driveway to see when someone is coming. There's a tree that blows in the wind but I have it masked out in a BI motion zone so it doesn't generate a lot of images to be analyzed by AI. It doesn't make sense but at the moment the new camera appears to be somehow involved. Be it the camera, the act of adding one more camera to AI Tool, or something I haven't yet considered.
Could it be the ports that the camera uses?
 

MrPie

n3wb
Joined
Oct 6, 2020
Messages
11
Reaction score
0
Location
chile
This tool have been working very well for me, but very rarely I get some errors and I would like to know what cause them and how they could be avoided:

1. Sometimes the AITool can't access the image file so it tries 10 times and after that it gives up. It's rare that it fails after 10 times but very rarely, after thousands of detections, this error sometimes occurs.
So why is that can't access the file? It seems to be a common error because there is a loop dedicated only to try open the file 10 times.

2. Also very rarely I get a System.Threading.Tasks.TaskCanceledException. I have no idea what is causing it but lately I've been getting it a lot. I don't think it's about having the new deepstack windows version.

System.Threading.Tasks.TaskCanceledException. | A task was canceled (code: -2146233029 )
ERROR: Processing the following image 'C:\BlueIris\aiinput\PrimerPiso.20201226_150956557.jpg' failed. Failure in AI Tool processing the image.
Hopefully someone knows about this error or can comment if they have experienced it on their setup.

Thanks and happy holidays
 
Top