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

aaronjlee

n3wb
Joined
May 6, 2020
Messages
7
Reaction score
0
Location
Charleston, SC
go to the first post in this thread and have a look at the troubleshooting section, I added it just yesterday and there your problem is described (deepstack silently crashed).
After running coreinfo it appears this CPU does not support AVX, perhaps that was my initial issue masked by the port overlap. I will set up on a different machine and report back.
Thanks for the help troubleshooting!
 

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Ken delivers the goods again...

flagalert=1 to flag the alert
flagalert=0 to CANCEL the alert. You will get the "NO" symbol in the database.

If you use this in combination with the "allow disarm time by delaying alerts" on the Alerts tab, this will define the time the software will wait for the alert to be flagged or cancelled before proceeding. If the timing expires, the alert proceeds as well.
 

JL-F1

Getting the hang of it
Joined
Jun 12, 2020
Messages
115
Reaction score
71
Location
USA
Everything installed and setup
windows version of deepstack
did the deepstack troubleshoot and it is running
cpu does support avx
I can access deepstack with localhost:83 in browser

always errors:


[12.06.2020, 15:27:51.244]: Starting analysis of V:\cam\aiinput/RWsd.20200612_152440844.jpg
[12.06.2020, 15:27:51.261]: (1/6) Uploading image to DeepQuestAI Server
[12.06.2020, 15:29:31.289]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[12.06.2020, 15:29:31.300]: ERROR: Processing the following image 'V:\cam\aiinput/RWsd.20200612_152440844.jpg' failed. Can't reach DeepQuestAI Server at localhost:83.
 
Last edited:
Joined
Jun 12, 2020
Messages
12
Reaction score
3
Location
Indiana
I keep getting a login screen using the large url. I have turned off login for all connections and that still doesn't work. I'm not sure why I'm getting this login screen. What's worse is when I try to login with he login screen it just pops up the same login screen again. It's an endless cycle.
 

Attachments

joshwah

Pulling my weight
Joined
Apr 25, 2019
Messages
298
Reaction score
146
Location
australia
Feature requests:
1. On the stats tab, in would be great if it could calculate some % i.e. number of false alerts % reduced, etc.
2. Ability to reset the camera stats by clicking a button (write STATS: alerts,irrelevant alerts,false alerts: "0, 0, 0") on the bottom line of the camera file?
 

Wilko

n3wb
Joined
Oct 25, 2017
Messages
4
Reaction score
0
Alerts on phone:
To be comfort I need to get different PUSH sounds on phone for different detected objects for the same camera.(if there is a cat i even not look for the push event)

Now i need to have 3 duplicates to get this:
BEEP BEEP if detected car
VUIP if detected person
MIAU if detected cat

Is there better option to get different push sounds with one duplicate.
(I use win10 and AItool1,65)


Feature requests:


MASK the area where CAR is parked is not ok, because when there is no CAR on that area nothing is detected then. MASKshould be use only to eliminate permanent objects, like trees, neighbour area.
It would be nice that program would compare the picture before and eliminate fixed detected objects allready known.(or automask for the time it is stil there)
(othervise someone come on coffee and park car outside and then after 5 minutes come person and i get that there come person and a car)

This AItool together with Blueiris is awesome combination.

Thank you @GentlePumpkin and to all who participiate with ideas.

W
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Everything installed and setup
windows version of deepstack
did the deepstack troubleshoot and it is running
cpu does support avx
I can access deepstack with localhost:83 in browser

always errors:


[12.06.2020, 15:27:51.244]: Starting analysis of V:\cam\aiinput/RWsd.20200612_152440844.jpg
[12.06.2020, 15:27:51.261]: (1/6) Uploading image to DeepQuestAI Server
[12.06.2020, 15:29:31.289]: System.Threading.Tasks.TaskCanceledException | A task was canceled. (code: -2146233029 )
[12.06.2020, 15:29:31.300]: ERROR: Processing the following image 'V:\cam\aiinput/RWsd.20200612_152440844.jpg' failed. Can't reach DeepQuestAI Server at localhost:83.
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.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
I keep getting a login screen using the large url. I have turned off login for all connections and that still doesn't work. I'm not sure why I'm getting this login screen. What's worse is when I try to login with he login screen it just pops up the same login screen again. It's an endless cycle.
You have to use the same port which gives you access to Blue Iris UI3, are you sure it's port 21432?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Alerts on phone:
To be comfort I need to get different PUSH sounds on phone for different detected objects for the same camera.(if there is a cat i even not look for the push event)

Now i need to have 3 duplicates to get this:
BEEP BEEP if detected car
VUIP if detected person
MIAU if detected cat

Is there better option to get different push sounds with one duplicate.
(I use win10 and AItool1,65)
With 1.67 you can integrate different placrholders in the URL (p.e. [summary] which will be replaced by the detection + confidence. If you trigger something that allows url processing, you could then differentiate.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
try the trigger url on the BI machine itself with the ip 127.0.0.1 and check if that works. Please check if secure session keys is disabled in BI Webserver->advanced. Otherwise this is a problem that occurs since BI 5.2.9 and probably has osmething todo with which network you defined as LAN in Blue Iris.
 

Wilko

n3wb
Joined
Oct 25, 2017
Messages
4
Reaction score
0
Feature requests:

MASK the area where CAR is parked is not ok, because when there is no CAR on that area nothing is detected then. MASKshould be use only to eliminate permanent objects, like trees, neighbour area.
It would be nice that program would compare the picture before and eliminate fixed detected objects allready known.(or automask for the time it is stil there)
(othervise someone come on coffee and park car outside and then after 5 minutes come person and i get that there come person and a car)
@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

[13.06.2020, 16:29:10.058]: Done.
[13.06.2020, 16:29:10.064]: 1 - 217, 111, 316, 356
[13.06.2020, 16:29:10.070]: Done.
[13.06.2020, 16:29:10.076]: 2 - 482, 29, 539, 120
[13.06.2020, 16:29:10.082]: Done.
[13.06.2020, 16:29:10.088]: 3 - 1243, 503, 1908, 1075
[13.06.2020, 16:29:10.095]: Done.
[13.06.2020, 16:29:13.093]: Loading object rectangles...
[13.06.2020, 16:29:13.097]: 0 - 801, 199, 888, 408
[13.06.2020, 16:29:13.103]: Done.
[13.06.2020, 16:29:13.108]: 1 - 204, 107, 337, 357
[13.06.2020, 16:29:13.114]: Done.
[13.06.2020, 16:29:13.118]: 2 - 1241, 501, 1909, 1077
[13.06.2020, 16:29:13.123]: Done.
[13.06.2020, 16:29:14.626]: Loading object rectangles...
[13.06.2020, 16:29:14.631]: 0 - 340, 105, 437, 341
[13.06.2020, 16:29:14.638]: Done.
[13.06.2020, 16:29:14.643]: 1 - 895, 215, 1006, 426
[13.06.2020, 16:29:14.648]: Done.
[13.06.2020, 16:29:14.652]: 2 - 1238, 502, 1906, 1076
[13.06.2020, 16:29:14.656]: Done.
[13.06.2020, 16:29:19.133]: Loading object rectangles...
[13.06.2020, 16:29:19.137]: 0 - 722, 105, 801, 334
[13.06.2020, 16:29:19.142]: Done.
[13.06.2020, 16:29:19.146]: 1 - 1288, 314, 1376, 558
[13.06.2020, 16:29:19.150]: Done.
[13.06.2020, 16:29:19.155]: 2 - 1238, 506, 1913, 1077
[13.06.2020, 16:29:19.162]: Done.
[13.06.2020, 16:29:20.652]: Loading object rectangles...
[13.06.2020, 16:29:20.658]: 0 - 1243, 502, 1908, 1078
[13.06.2020, 16:29:20.664]: Done.
AItool detected 2 persons and false detected car

1592060310159.png
 
Joined
Jun 12, 2020
Messages
12
Reaction score
3
Location
Indiana
EDIT::: I fixed the url trigger. I had an apparent / between admin/?trigger. It now works on the BI machine but still the same issue if I use other computer browsers. I am still getting errors in the log though.
try the trigger url on the BI machine itself with the ip 127.0.0.1 and check if that works. Please check if secure session keys is disabled in BI Webserver->advanced. Otherwise this is a problem that occurs since BI 5.2.9 and probably has osmething todo with which network you defined as LAN in Blue Iris.
Here's my setup: I have BI 5.2.9.17 on a windows server using windows 10 pro. That is assigned 200.200.200.0/24 LAN. I have a Synology NAS on 10.1.1.0/24 which is where a portioner is running Deepstack. Your AI tool is on the windows server in the same partion as BI.

I went ahead and added the url to the trigger just to see what happens. I get the following errors in the log:

[13.06.2020, 11:32:57.319]: Starting analysis of S:\aiinput/lowersd.20200613_113257286.jpg
[13.06.2020, 11:32:57.333]: (1/6) Uploading image to DeepQuestAI Server
[13.06.2020, 11:32:57.359]: (2/6) Waiting for results
[13.06.2020, 11:32:57.373]: (3/6) Processing results:
[13.06.2020, 11:32:57.387]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[13.06.2020, 11:32:57.401]: ERROR: Processing the following image 'S:\aiinput/lowersd.20200613_113257286.jpg' failed. Failure in AI Tool processing the image.
[13.06.2020, 11:32:59.341]:
[13.06.2020, 11:32:59.355]: Starting analysis of S:\aiinput/homesd.20200613_113259315.jpg
[13.06.2020, 11:32:59.473]: System.IO.IOException | The process cannot access the file 'S:\aiinput\homesd.20200613_113259315.jpg' because it is being used by another process. (code: -2147024864 )
[13.06.2020, 11:32:59.487]: Could not access file - will retry after 10 ms delay
[13.06.2020, 11:32:59.525]: Retrying image processing - retry 1
[13.06.2020, 11:32:59.539]: (1/6) Uploading image to DeepQuestAI Server
[13.06.2020, 11:32:59.566]: (2/6) Waiting for results
[13.06.2020, 11:32:59.596]: (3/6) Processing results:
[13.06.2020, 11:32:59.610]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[13.06.2020, 11:32:59.624]: ERROR: Processing the following image 'S:\aiinput/homesd.20200613_113259315.jpg' failed. Failure in AI Tool processing the image.
 
Last edited:

aaronjlee

n3wb
Joined
May 6, 2020
Messages
7
Reaction score
0
Location
Charleston, SC
Here's my setup: I have BI 5.2.9.17 on a windows server using windows 10 pro. That is assigned 200.200.200.0/24 LAN. I have a Synology NAS on 10.1.1.0/24 which is where a portioner is running Deepstack. Your AI tool is on the windows server in the same partion as BI.

I went ahead and added the url to the trigger just to see what happens. I get the following errors in the log:

[13.06.2020, 11:32:57.319]: Starting analysis of S:\aiinput/lowersd.20200613_113257286.jpg
[13.06.2020, 11:32:57.333]: (1/6) Uploading image to DeepQuestAI Server
[13.06.2020, 11:32:57.359]: (2/6) Waiting for results
[13.06.2020, 11:32:57.373]: (3/6) Processing results:
[13.06.2020, 11:32:57.387]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[13.06.2020, 11:32:57.401]: ERROR: Processing the following image 'S:\aiinput/lowersd.20200613_113257286.jpg' failed. Failure in AI Tool processing the image.
[13.06.2020, 11:32:59.341]:
[13.06.2020, 11:32:59.355]: Starting analysis of S:\aiinput/homesd.20200613_113259315.jpg
[13.06.2020, 11:32:59.473]: System.IO.IOException | The process cannot access the file 'S:\aiinput\homesd.20200613_113259315.jpg' because it is being used by another process. (code: -2147024864 )
[13.06.2020, 11:32:59.487]: Could not access file - will retry after 10 ms delay
[13.06.2020, 11:32:59.525]: Retrying image processing - retry 1
[13.06.2020, 11:32:59.539]: (1/6) Uploading image to DeepQuestAI Server
[13.06.2020, 11:32:59.566]: (2/6) Waiting for results
[13.06.2020, 11:32:59.596]: (3/6) Processing results:
[13.06.2020, 11:32:59.610]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[13.06.2020, 11:32:59.624]: ERROR: Processing the following image 'S:\aiinput/homesd.20200613_113259315.jpg' failed. Failure in AI Tool processing the image.
Very interesting as I was previously having the same issue...which then morphed into your previous issue. What did you change between the two? I still have not figured mine out with the exception of AXV support, however I was previously able to get thru step 3/6 and generate the same nullreference error as you have above.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
@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
No, it did not false detect the cars because there are two cars. If you don't want to get the cars detected, don't set them as relevant objects. Then you don't need a mask aswell.

I did understand that you would like me to implement change detection. And I can assure you that I've been working towards this for a longer time, step by step adding the prerequisites. I do this in my freetime and as I've posted many times, my freetime is a scarce resource at the moment. So honestly, if the way AI Tool was programmed so far is "not ok" and everything "should" be different, don't blame me and switch to another solution.
I've always tried to make this program as useful as possible to everyone using it and I spent many many hours implementing features people asked for, making the gui easier to navigate and to understand, simplifying the initial setup, helping troubleshooting and so on. I'm very aware of the things that Could be better and I steadily work on them.

I mainly do that for you guys and I'm encouraged every time someone states his appreciatiation or constructively discusses ideas he has. Sadly, after reading some posts, I get the distinct feeling that whoever posted this takes all the efforts of many people who have contributed to this project for granted.
 
Last edited:

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Here's my setup: I have BI 5.2.9.17 on a windows server using windows 10 pro. That is assigned 200.200.200.0/24 LAN. I have a Synology NAS on 10.1.1.0/24 which is where a portioner is running Deepstack. Your AI tool is on the windows server in the same partion as BI.

I went ahead and added the url to the trigger just to see what happens. I get the following errors in the log:
If you run AI Tool on the same device, always use localhost or better 127.0.0.1 (which equals localhost, but seemingly is more reliable) and not the outside IP. It's as little faster and way more reliable.

I've copied the log to show something:

Everything green is from the first image being analyzed.

[13.06.2020, 11:32:57.319]: Starting analysis of S:\aiinput/lowersd.20200613_113257286.jpg
[13.06.2020, 11:32:57.333]: (1/6) Uploading image to DeepQuestAI Server

Deepstack gets the image and analyzes it within a few milliseconds. If it was true, this was super cool, but as Deepstack usually takes at least 700ms to do that, this indicates something is wrong with Deepstack. I guess that eigther deepstack crashed on your Synology NAS, or that you did not enable to right API (detection api!) or that deepstack isn't activated. I think you wouldn't post if it was something simple like guess 2 and 3, so probably Deepstack crashed. Have a look at portainer and check if Deepstack requires around 1GB of RAM. If not, it's crashed (maybe already because the Syno hasn't got enough free RAM).

[13.06.2020, 11:32:57.359]: (2/6) Waiting for results
[13.06.2020, 11:32:57.373]: (3/6) Processing results:
[13.06.2020, 11:32:57.387]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[13.06.2020, 11:32:57.401]: ERROR: Processing the following image 'S:\aiinput/lowersd.20200613_113257286.jpg' failed. Failure in AI Tool processing the image.[/COLOR]
[13.06.2020, 11:32:59.341]:



And now comes the second image that is analyzed. The first exception in the blue line is totally normal. AI Tool tries to load the image as fast as possible and Blue Iris hasn't finished writing the image to the drive. We therefor enhanced AI Tool so that it can spot such situation and will dynamically wait until writing the alert picture is finished.

The last error is caused - like in the green marked text - by Deepstack. it returns information that AI Tool does not expect.


[13.06.2020, 11:32:59.355]: Starting analysis of S:\aiinput/homesd.20200613_113259315.jpg

[13.06.2020, 11:32:59.473]: System.IO.IOException | The process cannot access the file 'S:\aiinput\homesd.20200613_113259315.jpg' because it is being used by another process. (code: -2147024864 )[ [/COLOR]
[COLOR=rgb(0, 0, 0)][13.06.2020, 11:32:59.487]: Could not access file - will retry after 10 ms delay
[13.06.2020, 11:32:59.525]: Retrying image processing - retry 1
[13.06.2020, 11:32:59.539]: (1/6) Uploading image to DeepQuestAI Server
[13.06.2020, 11:32:59.566]: (2/6) Waiting for results
[13.06.2020, 11:32:59.596]: (3/6) Processing results:
[13.06.2020, 11:32:59.610]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )

[13.06.2020, 11:32:59.624]: ERROR: Processing the following image 'S:\aiinput/homesd.20200613_113259315.jpg' failed. Failure in AI Tool processing the image.



So far so good (EDIT: ok not good, but we'll fix this:highfive:), check if Deepstack runs correctly and try to trigger Blue Iris from webbrowser on the PC blue iris runs on with 127.0.0.1 instead of the lan ip. And please keep us up to date how (fast) Deepstack runs on your Synology, I'm very interested :D

EDIT: I tried using colors and code in this posted and really failed :D
 
Last edited:

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Very interesting as I was previously having the same issue...which then morphed into your previous issue. What did you change between the two? I still have not figured mine out with the exception of AXV support, however I was previously able to get thru step 3/6 and generate the same nullreference error as you have above.
"Object reference not set to an instance of an object" in this case pretty much means "well, yes I've got a response from Deepquest. But eigther Deepquest changed our talk language to traditional chinese or fell asleep on his keyboard. Anyways, there is no useful information in the response."

So the problem actually isn'T AI Tool but that there is something wrong with Deepquest.
 
Last edited:
Joined
Jun 12, 2020
Messages
12
Reaction score
3
Location
Indiana
So far so good (EDIT: ok not good, but we'll fix this:highfive:), check if Deepstack runs correctly and try to trigger Blue Iris from webbrowser on the PC blue iris runs on with 127.0.0.1 instead of the lan ip. And please keep us up to date how (fast) Deepstack runs on your Synology, I'm very interested :D
Well I managed to get it working. Not 100% sure what I did. I installed 2 versions of Deepstack on the Synology but only the noavx worked. I get results in about 10-15secs but the occasionally 45-70secs.

My only other issue is my Synology DS918+ (Intel Celeron 1.5GHz & 16GB of ram) is hitting really high on my CPU usage (65-90%). I'm not sure that it's Deepstack though. Docker is only running between 1-1.5% CPU usage. I still have my Synology Surveillance running (until I work everything out with BI) but the DSM (to monitor CPU usage) is steady at 5.5%.

Besides backups; I'm running a Plex Server, MQTT Broker, Docker (with about 15 containers), Home Assistant, and still Surveillance Station.

I'll have to continue to monitor.
 

pdxcam

n3wb
Joined
Feb 21, 2015
Messages
4
Reaction score
0
No, it did not false detect the cars because there are two cars. If you don't want to get the cars detected, don't set them as relevant objects. Then you don't need a mask aswell.

I did understand that you would like me to implement change detection. And I can assure you that I've been working towards this for a longer time, step by step adding the prerequisites. I do this in my freetime and as I've posted many times, my freetime is a scarce resource at the moment. So honestly, if the way AI Tool was programmed so far is "not ok" and everything "should" be different, don't blame me and switch to another solution.
I've always tried to make this program as useful as possible to everyone using it and I spent many many hours implementing features people asked for, making the gui easier to navigate and to understand, simplifying the initial setup, helping troubleshooting and so on. I'm very aware of the things that Could be better and I steadily work on them.

I mainly do that for you guys and I'm encouraged every time someone states his appreciatiation or constructively discusses ideas he has. Sadly, after reading some posts, I get the distinct feeling that whoever posted this takes all the efforts of many people who have contributed to this project for granted.
I had a similar issue as well.
There is probably a better way to handle this but what I did was I created two different virtual AI Cams in blueiris for my driveway instead of one. For the first AI cam, that is configured in AI Tool to only look for vehicles, I created a mask where we park our cars and said to detect cars everywhere else for that AI cam. The second ai cam in blueiris has no mask and checks for everything else I care about (people, animals etc, but not cars.) previously with a global mask if a prowler is trying to get in to my car and they were in the mask area they wouldn't be detected but now they will.
 
Last edited:
Top