Struggling with Deepstack AI alerts

danjb
Posts: 10
Joined: Wed Nov 25, 2020 11:24 pm

Struggling with Deepstack AI alerts

Post by danjb »

I am having problems getting the Deepstack integration to work in BI. I am running release 5.4.5.0 (came out today). Deepstack is installed, and BI is set to auto-launch it. When I launch a browser to http://127.0.0.1:82/ it tells me it's activated. BI shows the Stop Now button in the AI config dialog, meaning I assume it thinks Deepstack is running.

I followed The Hookup's most recent youtube video to enable Deepstack in BI, emulating his settings exactly just to try to eliminate some variable I may be missing. I get plenty of motion detections, but it doesn't seem like Deepstack is being called at all. The Hookup video shows lines where Deepstack is being called. I have none of those, although you can see earlier in the log where Deepstack is being started and is responding:
Blue_Iris_Log.jpg
Blue_Iris_Log.jpg (63.14 KiB) Viewed 8730 times
Should I just try a re-install of Deepstack from scratch? Here are my camera trigger and AI settings (same as the Hookup video, like I said) in case anything in here could be making the difference:
BI_Trigger.jpg
BI_Trigger.jpg (89.04 KiB) Viewed 8730 times
BI_AI.jpg
BI_AI.jpg (101.58 KiB) Viewed 8730 times
MikeBwca
Posts: 1109
Joined: Thu Jun 20, 2019 5:39 am

Re: Struggling with Deepstack AI alerts

Post by MikeBwca »

Awesome. Thank you for that link. I'm having trouble also, but, then I haven't retested for a few weeks. I'll watch the link and retest.

From the comments I've read...
- reduce the 'min confidence' so you'll get more matches. Even though they will be wrong, you'll know it's working.
- uncheck the 'Hide canceled alerts'. Again, you'll see the alerts that were canceled.
Then, adjust accordingly.

For all the others... is this a valid way to test?
danjb
Posts: 10
Joined: Wed Nov 25, 2020 11:24 pm

Re: Struggling with Deepstack AI alerts

Post by danjb »

Thank you for your reply! I've tried a number of things with no success:
  • As you suggested, tweaked the AI min confidence lower, and unchecked "Hide cancelled alerts" with no change. I am DEFINITELY getting motion detected by BI, it logs a MOTION event for the camera and adds a clip to my alerts list. But Deepstack does not seem to be being called to confirm the alert. The alert clip is treated by BI as if Deepstack is not enabled.
  • I found another suggestion of making sure I have at least one motion zone defined which I did not have. I added one, but no difference.
  • I turned off face recognition which I've seen others say causes problems with no different results.
  • I uninstalled Deepstack, deleted its folder, rebooted, and reinstalled it with no difference.
  • BI updated to BI version 5.4.5.1 while I was doing all this, and of course I have rebooted endlessly.
It is truly a mystery. BI starts Deepstack successfully, verifies it is running (can be seen in the log), it just never calls it when a high res image is captured on a motion trigger. I can see the images captured in their folder, and they have no AI markup on them like is shown in "The Hookup" video. So I assume Deepstack is never even looking at them.

I'm at the point where I'm thinking about a total reinstall of Windows, but would love any suggestions of anything else to test anyone else can think of?
MikeBwca
Posts: 1109
Joined: Thu Jun 20, 2019 5:39 am

Re: Struggling with Deepstack AI alerts

Post by MikeBwca »

I'm getting similar results.

You can see the DeepStack processes using cpu in Task Manager. But, like your situation, nothing seems to come back to BI. I'm also perplexed.
atreyu
Posts: 56
Joined: Fri Nov 27, 2020 7:22 pm

Re: Struggling with Deepstack AI alerts

Post by atreyu »

Probably nothing, but can you try using the IP address of the computer running BI instead of the localhost/127.0.0.1? Did you also let DeepStack install in the default location? C:\DeepStack

Another option for troubleshooting is to install DeepStack on another computer and point it to it. You won't have BI auto starting and setting it, but I did have it working that way until I decided to simplify and let BI control it.

Are you getting images showing up in your alerts folder? I think this is a folder that is not settable by BI (amazing! A lack of setting! ;) ). I wonder if you have renamed that folder or used a different position on the clips and archiving list if it would confuse BI. It ends up with all of the images upon camera trigger. Since I have "Burn label mark-up..." checked, if it finds something it is boxed and captioned.

As a general check to see if it's working within the system, you can drag a photo (any photo! but ideally a still from your camera), onto the BI application. It will open in a Snapshot viewer. Right click and see if you have "Analyze image with DeepStack". I get an error when I pick it, but then it marks up the image with detection boxes and scores. Full detection, all objects, regardless of what you tell it to look for within BI. It can be amazing and comical sometimes of its detection.
atreyu
Posts: 56
Joined: Fri Nov 27, 2020 7:22 pm

Re: Struggling with Deepstack AI alerts

Post by atreyu »

Also, search the log for DeepStack. You may need to check "Save to file" and let it run a while first.
danjb
Posts: 10
Joined: Wed Nov 25, 2020 11:24 pm

Re: Struggling with Deepstack AI alerts

Post by danjb »

Thanks for these troubleshooting suggestions. I did try using the real IP instead of 127.0.0.1 (as well as completely disabling the Windows firewall) with no different results. BI is definitely talking to DeepStack, because I can see in the BI log these lines:
  • App - DeepStack has been started
  • App - DeepStack responding at 127.0.0.1:82
When I change the DeepStack IP address to the real IP address, that second line shows the real IP address. Unfortunately, it is not as easy for me to try DeepStack on another system.

Your other suggestion made me play around with the location of the Alerts folder. I had it on a D: drive folder, but thought maybe it needed to be on a C: drive folder. When that made no difference, I thought maybe I should use the same "aiinput" folder I had used in my original BI / DeepStack setup based on the original "Hookup" video posted last year prior to BI supporting DeepStack natively.

None of these changes made any difference. In all cases, I DO get alert images in whatever folder it specified for Alerts. However, BI never calls DeepStack, and there is no confirmation step that occurs in the BI log. The alert is shown as an unqualified JPG Motion A alert in the BI list.

Finally, I did your last general check of dragging an image into BI, right clicking it and choosing "Analyze Image With DeepStack..." and it works! A "-1" error message is displayed, but then DeepStack markup appears on the image correctly recognizing objects in the image. So I can say I DO have DeepStack installed properly, and BI KNOWS how to call DeepStack, and BI IS starting and talking to DeepStack, and BI IS detecting motion. BI is just never calling DeepStack after BI detects motion for some reason.
danjb
Posts: 10
Joined: Wed Nov 25, 2020 11:24 pm

Re: Struggling with Deepstack AI alerts

Post by danjb »

Well, I might have found out how to work around this problem. I happened to add a new Nest camera, and noticed it had Deepstack alerts working on it! This prompted me to delete all my existing cameras and re-create them from scratch. Lo and behold, Deepstack now works. Something to try for anyone who comes across this post.
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Struggling with Deepstack AI alerts

Post by TimG »

Nice one danjb :D

Something hiding in the settings.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
norwestie
Posts: 3
Joined: Fri Jun 04, 2021 1:59 am

Re: Struggling with Deepstack AI alerts

Post by norwestie »

Did you run the command line instruction:

deep stack —VISION-DETECTION=True —PORT=5000
Post Reply