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

balucanb

Getting the hang of it
Joined
Sep 19, 2020
Messages
146
Reaction score
23
Location
TX
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

DTypeTimeIdxDetailMemberName
Detail10/11/2020 1:08:34 PM22-> trigger URL called: {admin}&pw={RDTFPE}, response: '<!DOCTYPE html> <html lang="en"> <head> <script> function renew(){ key_mode = false var admin_key = "" if (key_mode == true){ admin_key = prompt("Enter your admin key","") } document.getElementById("loader").style.display = "" var req = new XMLHttpRequest() req.onreadystatechange = function(){ if(this.readyState == 4 && this.status == 200){ response = JSON.parse(this.responseText) if(response.success == false){ document.getElementById("error_message_renew").innerText = response.error } else { document.getElementById("renew_success").style.display = "" document.getElementById("renew_button").style.display = "none" document.getElementById("expiringdate").innerText = response.expiringdate document.getElementById("daysleft").innerText = response.daysleft document.getElementById("error_message_renew").innerText = "" var plan = response.plan if (plan == 0){ document.getElementById("subscriptiontype").innerHTML = "Free" } else if (plan == 1){ document.getElementById("subscriptiontype").innerHTML = "Business" } else if(plan == 2){ document.getElementById("subscriptiontype").innerHTML = "Standard" } } document.getElementById("loader").style.display = "none" } } req.open("POST","/v1/admin/activate",true) req.setRequestHeader("Content-Type","application/x-www-form-urlencoded") req.send("admin_key="+admin_key) } function activate(re_activation){ key_mode = false var admin_key = "" if (key_mode == true){ admin_key = prompt("Enter your admin key","") } if (re_activation == false){ document.getElementById("loader1").style.display = "" } else{ document.getElementById("loader").style.display = "" } if(re_activation == true){ document.getElementById("error_message_new").innerText = "" } else { document.getElementById("error_message").innerText = "" } var req = new XMLHttpRequest() req.onreadystatechange = function(){ if(this.readyState == 4 && this.status == 200){ response = JSON.parse(this.responseText) if(response.success == false){ document.getElementById("error_message_new").innerText = response.error if(re_activation == true){ document.getElementById("error_message_new").innerText = response.error } else { document.getElementById("error_message").innerText = response.error } } else { if(re_activation == true){ document.getElementById("form-renew-key").style.display = "none" document.getElementById("renew_button").style.display = "none" document.getElementById("re_activate_success").style.display = "" document.getElementById("error_message_new").innerText = "" } document.getElementById("form-renew").style.display = "" document.getElementById("form").style.display = "none" document.getElementById("expiringdate").innerText = response.expiringdate document.getElementById("daysleft").innerText = response.daysleft document.getElementById("error_message").innerText = "" var plan = response.plan if (plan == 0){ document.getElementById("subscriptiontype").innerHTML = "Free" } else if (plan == 1){ document.getElementById("subscriptiontype").innerHTML = "Business" } else if(plan == 2){ document.getElementById("subscriptiontype").innerHTML = "Standard" } } if (re_activation == false){ document.getElementById("loader1").style.display = "none" } else{ document.getElementById("loader").style.display = "none" } } } if (re_activation == false){ key = document.getElementById("activation_key").value } else{ key = document.getElementById("activation_key_new").value } req.open("POST","/v1/admin/activate",true) req.setRequestHeader("Content-Type","application/x-www-form-urlencoded") req.send("key="+key+"&admin_key="+admin_key) } function onload(){ activation = true key_mode = false plan = 0 if(activation == true || plan != null ){ document.getElementById("form-renew").style.display = "" if (plan == 0){ document.getElementById("subscriptiontype").innerHTML = "Free" } else if (plan == 1){ document.getElementById("subscriptiontype").innerHTML = "Business" } else if(plan == 2){ document.getElementById("subscriptiontype").innerHTML = "Standard" } } else { document.getElementById("form").style.display = "" } } </script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content="s"> <title>DeepStack</title> <link rel="icon" href="assets/img/deepstack.png" > <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/vendor/fontawesome-free/css/all.min.css" rel="stylesheet"> <link rel="stylesheet" href="assets/vendor/simple-line-icons/css/simple-line-icons.css"> <link rel="stylesheet" href="assets/device-mockups/device-mockups.min.css"> <link href="assets/css/new-age.min.css" rel="stylesheet"> </head> <body id="page-top" onload="onload()"> <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav"> <div class="container"> <a class="navbar-brand js-scroll-trigger" href=""><img src="assets/img/deepstack.png" width="30" height="30" class="d-inline-block align-top" alt=""> <b style="color: white;" >DeepStack</b> </a> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> Menu <i class="fas fa-bars"></i> </button> </div> </nav> <header class="masthead"> <div class="container h-100" > <div class="row h-100" id="form" style="display: none;"> <div class="col-lg-7 my-auto"> <div class="header-content mx-auto"> <h1 class="mb-5" style="font-size: 70px;"><b>DeepStack 3.4</b></h1> <p class="mb-5">Congratulations! You have successfully installed DeepStack AI Server on your machine. To activate all the Recognition and Detection APIs, get an <b>Activation Key</b> and Enter the Key on the right.</p> <div class="row" > <div class="col-sm-12" > <a href="Sign Up" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger btn-primary" style="margin: 10px;">Get Activation Key!</a> </div> </div> <div class="row" > <div class="col-sm-8" > <a href="Dev Center - DeepStack" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Dev Center </a> </div> </div> <div class="row" > <div class="col-sm-8" > <a href="DeepStack Forum" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Forum </a> </div> </div> </div> </div> <div class="col-lg-5 my-auto" style="background-image: url('assets/img/dark-background.png')"> <br> <br> <div class="form-group"> <label for="activation_key">Enter Activation Key </label> <input type="text" class="form-control" id="activation_key" aria-describedby="emailHelp" placeholder=""> <span id="error_message" style="color: orangered;"></span> <span class="form-text" style="color: white;font-size: 14px;">Get a Key from <b><a href="Sign Up" target="_blank" style="color: green;">DeepStack AI Server</a></b></span> </div> <button type="submit" onclick="activate(false)" class="btn btn-primary btn-block">Activate Now!</button> <br> <br> <center><img src="assets/img/loader.gif" id="loader1" style="width: 60px; height: 60px; display: none;"/></center> </div> </div> <div class="row h-100" id="form-renew" style="display: none;"> <div class="col-lg-7 my-auto"> <div class="header-content mx-auto"> <h1 class="mb-12" style="font-size: 70px;"><b>DeepStack Activated</b></h1> <p class="mb-5">Your DeepStack Installation is Activated. </p> <p class="mb-5">Visit the Developer Center for Tutorials and Documentations </p> <div class="row" > <div class="col-sm-8" > <a href="Dev Center - DeepStack" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Dev Center</a> </div> </div> <div class="row" > <div class="col-sm-8" > <a href="DeepStack Forum" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Forum </a> </div> </div> </div> </div> <div class="col-lg-5 my-auto" style="background-image: url('assets/img/dark-background.png')"> <br> <br> <div class="form-group" > <p><b>Days left on Subscription:</b> <span id="daysleft"> 694<span></p> <p><b>Subscription Expiration:</b> <span id="expiringdate"> 2022-09-06 </span> </p> <p><b>Subscription Type:</b> <span id="subscriptiontype"> </span> </p> <button onclick="renew()" id="renew_button" class="btn btn-primary btn-block">Renew Current Subscription</button> <span id="error_message_renew" style="color: orangered;"></span> <h2 id="renew_success" style="color: green; display: none;"> Renewal Successful </h2> <br> <br> </div> <div class="form-group" id="form-renew-key" > <h1> New Key Activation </h1> <label for="activation_key">Enter New Activation Key </label> <input type="text" class="form-control" id="activation_key_new" aria-describedby="emailHelp" placeholder=""> <span id="error_message_new" style="color: orangered;"></span> <span class="form-text" style="color: white;font-size: 14px;">Get a Key from <b><a href="Sign Up" target="_blank" style="color: green;">DeepStack AI Server</a></b></span> <button type="submit" onclick="activate(true)" class="btn btn-primary btn-block"> Activate New Key </button> </div> <h2 id="re_activate_success" style="color: green; display: none;"> Reactivation Successful </h2> <br> <br> <center><img src="assets/img/loader.gif" id="loader" style="width: 60px; height: 60px;display: none;"/></center> </div> </div> <div class="row h-100" id="response" style="display: none;"> <div class="col-lg-7 my-auto"> <div class="header-content mx-auto"> <h1 class="mb-12" style="font-size: 70px;"><b>DeepStack Activated</b></h1> <p class="mb-5">Your DeepStack Installation is Activated. </p> <p class="mb-5">Visit the Developer Center for Tutorials and Documentations </p> <div class="row" > <div class="col-sm-8" > <a href="DeepStack AI Server" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Dev Center</a> </div> </div> <div class="row" > <div class="col-sm-8" > <a href="DeepStack Forum" target="_blank" class="btn btn-outline btn-xl js-scroll-trigger" style="margin: 10px;">DeepStack Forum</a> </div> </div> </div> </div> </div> </div> </header> </body> </html> ' CallTriggerURLs>
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
Any ideas where I should look to fix this? On motion I'm creating a jpeg every 2 seconds.

1.png
 

noderator

n3wb
Joined
Oct 11, 2020
Messages
2
Reaction score
0
Location
Earth
I'm paying a $60 Paypal reward to anyone who can help fix my deepquestai/deepstack:gpu setup. Regular deepquestai/deepstack already works.
Intially deepstack:gpu works but then stops with errors.
Alternatively, I'll pay a $100 reward to anyone who can help me replace deepstack in my system with a Coral Edge TPU or similar hardware accelerator.
Thanks in advance!
 
Joined
Sep 6, 2020
Messages
4
Reaction score
0
Location
us
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
 
Joined
Oct 1, 2020
Messages
18
Reaction score
2
Location
Texas
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.
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
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?
 
Joined
Oct 1, 2020
Messages
18
Reaction score
2
Location
Texas
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?
 
Joined
Oct 1, 2020
Messages
18
Reaction score
2
Location
Texas
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.
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
"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!
 
Joined
Oct 1, 2020
Messages
18
Reaction score
2
Location
Texas
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.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
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.
 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
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.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
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.
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
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.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
Top