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

can you provide more detail on the "copy/save settings" part? I added the &jpg=[imagepath] and checked merge annotations into images, but not sure about the copy. I see copy alert images to folder... is that the feature ? do i have to copy the image to a new image? if so, do hard code or can i use [imagepath] variable? thanks


Has anyone been able to get this to work?
I tried with push notifications, and I don't even get an image on the push via the app on IOS 14.0 (never tested on the older app or IOS)
I have been dealing with some delay with the SMS Alert images
Using the "older" duplicate camera setup (same cameras and setup as done by The Hook Up on YT)
The issue is after AI sends the URL trigger to the BI the SMS alert I get can be some times 10sec before of the original image sent to AI
This offten means the image i get via SMS is before the trigger, and leaves me wondering whats going on.


BI log:

3 9/28/2020 11:49:26 AM Cam7 MOTION
3 9/28/2020 11:49:27 AM Cam3 EXTERNAL
0 9/28/2020 11:49:30 AM Cam3 SMS: ##@mms.att.net with 1 attachment/s
0 9/28/2020 11:49:32 AM Cam3 SMS: ##@mms.att.net with 1 attachment/s

AI log:

[28.09.2020, 11:49:27.292]: The summary:person (96.46%) | truck (49.28%)
[28.09.2020, 11:49:27.292]: (5/6) Performing alert actions:
[28.09.2020, 11:49:27.292]: trigger url: http://**/admin?camera=Cam3&trigger&user=##&pw=##
[28.09.2020, 11:49:27.294]: trigger url: http://**/admin?camera=Cam3&flagalert=1&trigger&memo=person%20(96.46%25)%20%7C%20truck%20(49.28%25)&user=##&pw=##

Time stamps of each image by the camera Overlay not BI (NTP is correct and the same)
Cam7 (sent to AI): 11:49:25
Cam3 (sent to SMS) 11:49:10
 
Has anyone been able to get this to work?
I tried with push notifications, and I don't even get an image on the push via the app on IOS 14.0 (never tested on the older app or IOS)
I have been dealing with some delay with the SMS Alert images
Using the "older" duplicate camera setup (same cameras and setup as done by The Hook Up on YT)
The issue is after AI sends the URL trigger to the BI the SMS alert I get can be some times 10sec before of the original image sent to AI
This offten means the image i get via SMS is before the trigger, and leaves me wondering whats going on.

Though I am on Android so I can not speak for if this is an IOS issue or not but the alert image I get is pretty much always perfect with a person in frame. I use duplicated cameras as well because I like using the lower quality sub-stream for 24/7 recording and high quality main stream for trigger recording. The first thing I thought when you mentioned that you're alert is 10 seconds before the original image sent to AI-Tool makes me think you're getting your alert from the same camera sending images to AI-Tool. You do not want to do this, set the alerts on the camera that gets triggered to record by AI-Tool or you'll get all of the false triggers from your motion sensing camera.
 
The first thing I thought when you mentioned that you're alert is 10 seconds before the original image sent to AI-Tool makes me think you're getting your alert from the same camera sending images to AI-Tool. You do not want to do this, set the alerts on the camera that gets triggered to record by AI-Tool or you'll get all of the false triggers from your motion sensing camera.
So like you, I use cameras and setup as done by The Hook Up on YT. The only camera I have setup In ai tools is my sd stream. In Actions - settings (on the cameras page) I have two trigger urls pointing to the hd camera stream, ending in &jpeg=g:\alertimages. But like @thedoctor_1337 , I don't get an image in sms with any box or indication of the subject of the alert (person, dog, cat).

Are you (@charredchar) saying that the trigger url should point to the sd stream?
 
So like you, I use cameras and setup as done by The Hook Up on YT. The only camera I have setup In ai tools is my sd stream. In Actions - settings (on the cameras page) I have two trigger urls pointing to the hd camera stream, ending in &jpeg=g:\alertimages. But like @thedoctor_1337 , I don't get an image in sms with any box or indication of the subject of the alert (person, dog, cat).

Are you (@charredchar) saying that the trigger url should point to the sd stream?

No, I kept my setup simple by letting BI handle the entire alert and do little more with AI-Tool than triggering the camera. I don't care to see any boxes with the trigger subject, I only have mine set to person anyway and I review in AI-Tool History tab if I really need to. Something is giving an early image for your alert, my thought it was because it was grabbing it from the motion camera and not the triggered camera.

As for not seeing an image you're expecting it is also possible that BI is either ignoring the alert image sent to it by AI-Tool or it is not actually receiving one from it. Why are yo using two trigger URLs?
 
Any ideas where I should look to fix this? On motion I'm creating a jpeg every 2 seconds.

I would see a similar error when overloading the DeepStack server, it could not keep up with the amount of images being generated and AI-Tool starts skipping some when the queue fills up. Your "Average queue wait time" shows this as being the issue. At one point I had 3 docker images running with the Mode to LOW to attempt with fixing this but in the end it just couldn't handle it. My fix was to change hardware... I moved from running on my house server (2x Xeon X5650, no AVX support, took 2s-10s per image) to a Pi4 with an NCS2 (about 1s per image). I am not happy with the Alpha build on the Pi4 though (not as accurate as the Beta) and will be looking to move back to my server with an added GPU. Not to mention it looks like DeepStack might have been abandoned so I don't want to cling to a NCS2 in hopes I can use it again in the future.
 
"No, I kept my setup simple by letting BI handle the entire alert and do little more with AI-Tool than triggering the camera." In what way?
"my thought it was because it was grabbing it from the motion camera and not the triggered camera." I guess my "motion" camera is my sd stream, and my "triggered" camera is my hd stream (same camera, 2 streams). Is that correct?
"Why are yo using two trigger URLs?" Because the dude on YT told me to. :-)
http://ip:port/admin?camera=hd1&trigger&user=user&pw=password
http://ip:port/admin?camera=hd1&flagalert=1&trigger&memo=summary&user=user&pw=password

Should I have more than one camera setup in ai tools when I'm running in this config?
Again, I have my sd stream setup as the only camera, and the trigger urls point to the hd camera. Is that right?

Heading to bed now, will catch up in the morning!
 
Because the dude on YT told me to. :)
Oddly I do not remember this being a thing, or maybe I just ignored this part as you don't really need to flag an alert. But looking at that URL you are in fact triggering the same camera twice with one of them flagging the alert as well. Delete one of them (Doesn't matter which) and try it again.

Should I have more than one camera setup in ai tools when I'm running in this config?
Again, I have my sd stream setup as the only camera, and the trigger urls point to the hd camera. Is that right?
You do not need more than one camera setup in AI-Tool, it doesn't even need to be the Sub-stream. I am actually using the HD Stream (cloned from the triggered camera, not 24/7 recording but motion sensing snapshots) for DeepStack so it has a higher quality image to scan. But this is basically what you're doing:

A camera triggers on motion, dumps images into a folder. AI-Tool watches that folder for new images and sends it to DeepStack to scan for objects of interest then sends results back to AI-Tool. If AI-Tool sees a result you want it'll then send a web request to a specified URL, in this case a URL that triggers a specific camera to record. That's it... While there are a LOT more options being added to AI-Tool, all if it revolves around this basic setup.
 
So Now that I know I have the latest version installed I am getting (lots of) this error I am also getting- Error sending image to Telegram and Error Could not upload text... Do I need to change something or what is the deal? Telegram is getting images though? If there was a better way to upload the error sorry, tried to attach it in a txt file but would not work

Its not easy to read your error log but I do notice that it seems to be complaining about Deepstack registration. Have you registered deepstack and tested that you can bring it up on your browser without errors. In addition if you are starting from scratch you may wish to install the original app from @GentlePumpkin to become familiar with usage. I personally still use the original version at this time! For me reliability is more important than additional features. I plan to move to the more featured version in the next few months and am hoping by that time it will have most if not all the kinks ironed out.
 
  • Like
Reactions: balucanb
You do not need more than one camera setup in AI-Tool, it doesn't even need to be the Sub-stream. I am actually using the HD Stream (cloned from the triggered camera, not 24/7 recording but motion sensing snapshots) for DeepStack so it has a higher quality image to scan. But this is basically what you're doing


I wish blue iris would add the ability to record only the substream continuously and then use the hd stream for alerts. Would make it all so much slicker.
 
I wish blue iris would add the ability to record only the substream continuously and then use the hd stream for alerts. Would make it all so much slicker.
I believe you can achieve that by setting up a sort of clone camera. It's not exactly a clone because the streams would not be in the same order. Unfortunately you would take a hit on cpu overhead especially if you have lots of cameras.
 
So Now that I know I have the latest version installed I am getting (lots of) this error I am also getting- Error sending image to Telegram and Error Could not upload text... Do I need to change something or what is the deal? Telegram is getting images though? If there was a better way to upload the error sorry, tried to attach it in a txt file but would not work

The TRIGGER should be sending to blueiris, but since we are seeing deepstack references in the html code you are accedently trying to send a trigger to deepstack.

Change the port to the port blueiris is using - Deepstack must be using 80.

Also, in the trigger, your cameraname is invalid. Rather than using &camera=[YourActualCameraName] use "&camera=[camera]" and the name will be automatically replaced.
 
Thanks for this, but unfortunately this doesn't work. When I hit this from a browser it asks me for a username and password. I am running the newest version of BI.

Not sure of your exact problem, but I got around a similar thing by providing the login details manually the first time, then leaving that browser tab up (or minimized), and then running the subsequent automated ones. mine was for a camera api call, but might work for you as well?
 
Thanks for this, but unfortunately this doesn't work. When I hit this from a browser it asks me for a username and password. I am running the newest version of BI.

Add the IP of the machine you don’t want to require login in the advanced page of the web server config with a caret.

Ie. ^192.168.1.101

Now that machine will not be prompted for login.
 
Oddly I do not remember this being a thing, or maybe I just ignored this part as you don't really need to flag an alert. But looking at that URL you are in fact triggering the same camera twice with one of them flagging the alert as well. Delete one of them (Doesn't matter which) and try it again.


You do not need more than one camera setup in AI-Tool, it doesn't even need to be the Sub-stream. I am actually using the HD Stream (cloned from the triggered camera, not 24/7 recording but motion sensing snapshots) for DeepStack so it has a higher quality image to scan. But this is basically what you're doing:

A camera triggers on motion, dumps images into a folder. AI-Tool watches that folder for new images and sends it to DeepStack to scan for objects of interest then sends results back to AI-Tool. If AI-Tool sees a result you want it'll then send a web request to a specified URL, in this case a URL that triggers a specific camera to record. That's it... While there are a LOT more options being added to AI-Tool, all if it revolves around this basic setup.

The dual trigger is one to trigger, and the other to flag if i recall right
I currently am sending the trigger to the "HD" camera stream
Everything per the log seems to show correct order and timing, its just that the image in SMS is before the "motion" log entry

Cam7 is the sub-stream (SD) going to AI then a trigger url to CAM1 (HD) is the main stream
BI log:

3 9/28/2020 11:49:26 AM Cam7 MOTION
3 9/28/2020 11:49:27 AM Cam3 EXTERNAL
0 9/28/2020 11:49:30 AM Cam3 SMS: ##@mms.att.net with 1 attachment/s
0 9/28/2020 11:49:32 AM Cam3 SMS: ##@mms.att.net with 1 attachment/s

AI log:

[28.09.2020, 11:49:27.292]: The summary:person (96.46%) | truck (49.28%)
[28.09.2020, 11:49:27.292]: (5/6) Performing alert actions:
[28.09.2020, 11:49:27.292]: trigger url: http://**/admin?camera=Cam3&trigger&user=##&pw=##
[28.09.2020, 11:49:27.294]: trigger url: http://**/admin?camera=Cam3&flagalert=1&trigger&memo=person%20(96.46%25)%20%7C%20truck%20(49.28%25)&user=##&pw=##


So like you, I use cameras and setup as done by The Hook Up on YT. The only camera I have setup In ai tools is my sd stream. In Actions - settings (on the cameras page) I have two trigger urls pointing to the hd camera stream, ending in &jpeg=g:\alertimages. But like @thedoctor_1337 , I don't get an image in sms with any box or indication of the subject of the alert (person, dog, cat).

Are you (@charredchar) saying that the trigger url should point to the sd stream?

since i am unable to get the correct SMS image, i added this to the text part of the alert, and it will state what it triggered on.
This is also where i click attach current image, but again, for me its about 10sec ahead of the trigger.
Motion detected on camera: &CAM &NAME &MEMO



Though I am on Android so I can not speak for if this is an IOS issue or not but the alert image I get is pretty much always perfect with a person in frame. I use duplicated cameras as well because I like using the lower quality sub-stream for 24/7 recording and high quality main stream for trigger recording. The first thing I thought when you mentioned that you're alert is 10 seconds before the original image sent to AI-Tool makes me think you're getting your alert from the same camera sending images to AI-Tool. You do not want to do this, set the alerts on the camera that gets triggered to record by AI-Tool or you'll get all of the false triggers from your motion sensing camera.

Now that i have enabled Push as well, I notice that it some times does show an image, but its so small i cant tell if its the image sent via the trigger URL. If i click on the notifcation it just brings me into the app. This must be an IOS only issue.