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

BruceWA

n3wb
Joined
Feb 27, 2018
Messages
8
Reaction score
1
My question is probably very basic and somewhat Mundane when compared to most on here.
Here is my issue. I use my Blue Iris cameras to catch alerts of animals and birds around my property as well as people and vehicles. And can set the sensitivity settings to get those things to trigger Blue Iris. But obviously this give numerous false alerts from rain, wind and spiders at nights.
So I tried Using VorlonCD with my Blue Iris setup (I use a Camera Clone in Blue Iris to supply the trigger image) and the latest Deepstack CPU Beta running in docker. (latest as of yesterday).
That all seems to work but I find VorlonCD shows False alerts except for when people are actually in the frame. I have Birds selected as well as People in VorlonCD
Squirrels/birds all trigger Blue Iris but after going through Deepstack/Vorlon I get False alerts and the Main Blue Iris camera is thus not triggered. Any ideas?
 

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
146
Reaction score
23
Location
TX
It's a different release
@Tinbum ref the newest release- is the link I quoted from @Jooced post here and above "the place" to find it or are there other locations? I asked B/C I see where people ref this Version vs that one, are they compiling their own? How do you know which version you are running? May be wrong but I have been opening the manifest file and looking for changes in there i.e. the one I am running right now is 1.71.0.34045 I had downloaded what I thought was a newer one but it said 1.67.8.33855 am looking in the right place?
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
Ok, here we go...I'm going to try working thru this again. Can anybody help me get my timings correct enough so I can get a single text that shows what actually created the alert? (Person, cat, dog.)

My camera's hd stream settings:
1603761094788.png
SD stream settings:
1603761128073.png

In BI, on my hd camera, I set the following:
1603761686833.png
1603761660475.png
aitool - cameras - actions - settings - trigger urls:
and port/admin?camera=hd1&trigger&user=user&pw=password
and port/admin?trigger&camera=hd1&user=user&pw=password&flagalert=1&memo=[summary]

With those settings, I walked outside and waved.

aitool history shows:

1603761257483.png

BI has a clip from 6:01:54 to 6:02:15.
I got 3 texts at 6:02:xx; all of them have the same image with the same timestamp: 6:01:55. That's not even listed in the aitools history. ???

Any suggestions as to what settings I can tweak to get the correct image in my text? Like, one of the "relevant" ones listed in aitool?
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
Oh, by the way, in addition to the above, my SD stream is recording 24x7, but not alerting or triggering. At least I have that if something happens while I'm trying to get bi/aitool to work the way I expect them to.
 

barnyard

n3wb
Joined
Aug 9, 2020
Messages
24
Reaction score
5
Location
United States
Oh, by the way, in addition to the above, my SD stream is recording 24x7, but not alerting or triggering. At least I have that if something happens while I'm trying to get bi/aitool to work the way I expect them to.
Not 100% certain, but it looks like you have your hd camera set to trigger on motion above. Which screenshot shows how your sd cam? That's the one that needs to trigger on motion. AITool will send a trigger back to the HD cam via the link you set up in the camera settings

Sent from my Pixel 3 using Tapatalk
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
Thanks; the instructions on page one of this thread say that for aitool v1.67 on, a single cam should be used, not dual cameras. Those instructions also say to not check the motion detection box on the camera you've setup. But of course if you don't check that box, then no motion gets detected.
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
I just checked the "log everything" box in aitool, then went out front and came back inside (then unchecked the box). Same sort of deal; multiple texts with same image/timestamp.

But here's an excerpt of the log (somewhat sanitized for security). Can somebody tell me if my total, deepstack, file lock, and image queue times are reasonable? They seem really, really high to me...

[20:41:29.057]: OnCreatedAsync> ====================== Adding new image to queue (Count=1): F:\hd1.20201026_204128849.jpg
[20:41:29.680]: DetectObjects> 127.0.0.1:port - (2/6) Posted in 2179ms, Received a 124 byte response.
[20:41:29.689]: DeepStack> Server.exe> [GIN] 2020/10/26 - 20:41:29 | 200 | 2.088998s | 127.0.0.1 | POST /v1/vision/detection
[20:41:29.695]: DetectObjects> 127.0.0.1:port - (3/6) Processing results...
[20:41:29.697]: DetectObjects> 127.0.0.1:port - Detected objects: Person (99.65%),
[20:41:29.699]: DetectObjects> 127.0.0.1:port - (4/6) Checking if detected object is relevant and within confidence limits:
[20:41:29.702]: DetectObjects> Person (99.65%): Upper: 0 Lower: 100
[20:41:29.723]: CreateDynamicMask> * Starting new object mask processing *
[20:41:29.726]: CreateDynamicMask> Current object detected: key=933816, name=Person, xmin=984, ymin=240, xmax=1547, ymax=1477, counter=0, camera=hd1, create date: 10/26/2020 8:41:29 PM on camera hd1
[20:41:29.729]: CreateDynamicMask> + New object found: key=933816, name=Person, xmin=984, ymin=240, xmax=1547, ymax=1477, counter=0, camera=hd1, create date: 10/26/2020 8:41:29 PM. Adding to last_positions_history for camera: hd1
[20:41:29.746]: Outsidemask> Checking if the object is in a masked area...
[20:41:29.752]: Outsidemask> 9 of 9 detection points are outside of masked areas.
[20:41:29.754]: Outsidemask> ->The object is OUTSIDE of masked area(s).
[20:41:29.757]: DetectObjects> 127.0.0.1:port - Person (99.65%) confirmed.
[20:41:29.760]: DetectObjects> 127.0.0.1:port - The summary:person (99.65%)
[20:41:29.762]: DetectObjects> 127.0.0.1:port - (5/6) Performing alert actions:
[20:41:29.851]: MergeImageAnnotations> Merged 1 detections in 96ms into image C:\Users\me\AppData\Local\Temp\hd1.20201026_204124797.jpg
[20:41:29.863]: CallTriggerURLs> -> trigger URL called: http://ip:port/admin?camera=hd1&trigger&user=user&pw=password, response: 'signal=green profile=1 lock=0 clip=50048492 camera=hd1 '
[20:41:29.884]: CallTriggerURLs> -> trigger URL called: http://ip:port/admin?trigger&camera=hd1&user=user&pw=password&flagalert=1&memo=Person%20(99.65%25), response: 'signal=green profile=1 lock=0 clip=50048492 camera=hd1 '
[20:41:29.886]: Trigger> Copying image to network folder...
[20:41:29.889]: CopyImage> File copying from C:\Users\me\AppData\Local\Temp\hd1.20201026_204124797.jpg to G:\AlertImages\hd1.20201026_204124797.jpg
[20:41:29.898]: Trigger> -> Image copied to network folder.
[20:41:29.905]: Trigger> hd1 last triggered at 10/26/2020 8:41:29 PM.
[20:41:29.917]: DetectObjects> 127.0.0.1:port - (6/6) SUCCESS.
[20:41:29.920]: DetectObjects> 127.0.0.1:port - Adding detection to history list.
[20:41:29.922]: DetectObjects> 127.0.0.1:port - Total Time: 4996ms (Count=10, Min=2122ms, Max=47501ms, Avg=7703ms)
[20:41:29.927]: DetectObjects> 127.0.0.1:port -DeepStack (URL) Time: 2179ms (Count=10, Min=1760ms, Max=43420ms, Avg=6252ms)
[20:41:29.935]: DetectObjects> 127.0.0.1:port - File lock Time: 0ms (Count=1, Min=1ms, Max=1ms, Avg=1ms)
[20:41:29.938]: DetectObjects> 127.0.0.1:port - Image Queue Time: 2536ms (Count=10, Min=263ms, Max=4042ms, Avg=1322ms)
[20:41:29.943]: DetectObjects> 127.0.0.1:port - Image Queue Depth: 1 (Count=12, Min=1, Max=1, Avg=1)
[20:41:30.280]: ImageQueueLoop> Adding task for file 'hd1.20201026_204126827.jpg' (Image QueueTime='0.1' mins, URL Queue wait='2563ms', URLOrder=1 of 1, URLOriginalOrder=1) on URL 'http://127.0.0.1:port/v1/vision/detection'
[20:41:30.284]: DetectObjects> 127.0.0.1:port - Starting analysis of F:\hd1.20201026_204126827.jpg...
[20:41:30.324]: DetectObjects> 127.0.0.1:port - (1/6) Uploading a 1191802 byte image to DeepQuestAI Server at http://127.0.0.1:port/v1/vision/detection
[20:41:30.583]: WaitForNextURL> ---- All URL's are in use or disabled, waiting...
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
ugh, sorry about the faces... a : and then a port right after think I'm trying to make a face. :)
 

ReXX

Young grasshopper
Joined
Dec 28, 2018
Messages
47
Reaction score
15
Location
Denmark
Any suggestions as to what settings I can tweak to get the correct image in my text? Like, one of the "relevant" ones listed in aitool?
It is recommended to set your i-interval to the same as your fps in your camera settings.

So set it to 15 instead of 30 in your case.
Or set your fps to 30.
 

cjowers

Getting the hang of it
Joined
Jan 28, 2020
Messages
107
Reaction score
36
Location
AUS
Thanks; the instructions on page one of this thread say that for aitool v1.67 on, a single cam should be used, not dual cameras. Those instructions also say to not check the motion detection box on the camera you've setup. But of course if you don't check that box, then no motion gets detected.
I might be using a different method than you, but I'll mention this as barnyard has...
I use a 1 physical camera, but I also have this copied as a BI camera clone. So there are 2 streams of the same cam basically, that you can setup with different settings. In my setup, only the clone has the motion detection enabled (in my case it uses no extra cpu, but ymmv). so the clone is triggered by motion, and it captures an image for the AI tool input folder, deepstack then confirms an object is there, then AI tool triggers the original BI camera to save an alert image. That way i only save images if there has been a positive ID first, and I have very clear control over my alert settings vs my motion settings (there is no crossover due to using the same cam, even though it is the same physical cam). Maybe worth a try?
 

crowax

n3wb
Joined
May 26, 2020
Messages
4
Reaction score
0
Any suggestions as to what settings I can tweak to get the correct image in my text? Like, one of the "relevant" ones listed in aitool?
It sounds like you have motion turned on for the Alerts tab. I uncheck everything except Extern. This way when the camera detects motion it does not alert you. Only when the AI tool sends the external alert command.

blueirisalert.PNG
 

Xavier6

n3wb
Joined
Dec 24, 2018
Messages
17
Reaction score
4
Location
Italy
I'm still receiving all these notification

[26.10.2020, 15:07:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:07:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:12:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:12:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:12:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:12:08]: ERROR: Can't write to cameras/history.csv!
[26.10.2020, 15:12:08]: ERROR: Can't write to cameras/history.csv!

Someone solved this problem ?

As I read somewhere in the topic, it seem connected to when the pictures in the AiInput folder are deleted. Also if it doesn't make much sense as they are different folders.
For future reference. The problem was caused by having AITool open as service when the console was open, it counts as having a second instance running and screw the access to files.

Now everything is working fine. I'll try the fork project, I just read about in some topic above when I'll have time.
 

blulite

n3wb
Joined
Aug 2, 2020
Messages
8
Reaction score
3
Location
FLorida
For future reference. The problem was caused by having AITool open as service when the console was open, it counts as having a second instance running and screw the access to files.

Now everything is working fine. I'll try the fork project, I just read about in some topic above when I'll have time.

I created a small BAT file that makes sure the service is killed before I open a new console. It also kills any running consoles before starting a new one.

Code:
net stop "AI tool"
taskkill /IM  "AITool.exe"
start /b /d H:\BlueIris\AI.Tool H:\BlueIris\AI.Tool\aitool.exe
 
Last edited:

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
It is recommended to set your i-interval to the same as your fps in your camera settings.

So set it to 15 instead of 30 in your case.
Or set your fps to 30.
Huh...maybe that's why my camera fps (in bi) was set to 30! I just set it to 15 so see if I could see a smoother live video feed. Thanks; I'll change fps back to 30.

I use a 1 physical camera, but I also have this copied as a BI camera clone.
This is how I had it setup till a few days ago; I had all the same issues. Only thing I didn't have was the extra hd recordings (now the hd stream records all motion, but only alerts me on stuff that aitools thinks I should be alerted on). But both ways, images in text are wrong 99% of the time.

It sounds like you have motion turned on for the Alerts tab.
Yeah; I didn't quite understand that, thanks for the tip. I'll uncheck that when I get home tonight and try again.
 

Jooced

n3wb
Joined
Jul 9, 2017
Messages
7
Reaction score
1
Location
California
Are they both using the same port where you'd have a conflict? What I mean is Blue Iris is assigned a port and you need to make sure that Deepstack is running on a different port as well.

One way to test, if Deepstack is turned off are you able to get a Blue Iris response?
 
Joined
Oct 27, 2020
Messages
1
Reaction score
1
Location
PNW
Well I just spent the last 3 hours re-doing everything, uninstalled everything and started from new.

And guess it works now.

I wish I could say I have an answer as why it was giving me that issue, but I have no idea.

Thank you for the assistance either way jooced! :)
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
You would have only had to change the BI or the Deepstack port and it would have worked. :)
 
Top