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

Hello Folks,

I am new in AI management for IP surveillance CAMs. Got runnning flawlessly AI tools with DeepStack and BI5.
But I'm having some false alerts at night with IR LEDs ON, on AI tools which are clear to be an actual alert.
As I am still testing everything I have confidence at 0-100% and Car and person detection.

View attachment 63287

Do I have any solution? Is there any other AI server better than Deepstack?

Thank you guys!!

How many core does the CPU running deepstack has and are you running deepstack on High?
 
it should give "person (0.999999)". Only [detections] gives all detected&relevant objects. I agree, the confidence value could be shortened ;-)

@BrutusBoots what did you do different in your memo integration?

I added a property to the Camera class called 'last_detections_summary' that's a pretty formatted string of detections (ie: 'person (99%) | car (50%) | dog (10%)') and I then I added a [summary] replacement variable and you can use that to feed memo in the url. I can create a pull request for you if you want to pull it in.
 
Is it possible to run this with dual stream in Blue iris? Can the trigger URL be specified which stream to trigger? Example: I set low resolution stream as main and HD as sub and have trigger URL trigger sub stream in blueiris. That would save having to duplicate camera's for SD and HD.
I think it's not possible to trigger a specific stream, only a specific camera.


I added a property to the Camera class called 'last_detections_summary' that's a pretty formatted string of detections (ie: 'person (99%) | car (50%) | dog (10%)') and I then I added a [summary] replacement variable and you can use that to feed memo in the url. I can create a pull request for you if you want to pull it in.
Yes sure, sounds great. I'm sometimes just careful to add larger changes without having the time to test them.

@GentlePumpkin hope you don't mind my contributions. Feel free to kick back anything you don't want. Don't want to mess with your project. It's very cool :)
No not at all! I just noticed that you added multiple pull requests which hadn't seen before :facepalm::).




Looks amazing, let's add this! Btw: does the memo text also show up in the Web interface UI3?
 
Forum member @neile recently developed an interesting alternative to AI Tool which is entirely Docker-based + the following main features:
  • AI detection using DeepStack.ai (inspired by gentlepumpkin's idea and initial implementation)
  • Initial configuration and installation with just two files
  • Support for web requests to trigger BlueIris camera recording
  • Support for sending MQTT messages
  • Support for sending Telegram messages
This indeed seems like a viable alternative for some people that requested p.e. a system without Windows earlier. Full link to the thread:

https://ipcamtalk.com/threads/ai-motion-detection-with-blueiris-an-alternate-approach.48406/
 
Forum member @neile recently developed an interesting alternative to AI Tool which is entirely Docker-based + the following main features:
  • AI detection using DeepStack.ai (inspired by gentlepumpkin's idea and initial implementation)
  • Initial configuration and installation with just two files
  • Support for web requests to trigger BlueIris camera recording
  • Support for sending MQTT messages
  • Support for sending Telegram messages
This indeed seems like a viable alternative for some people that requested p.e. a system without Windows earlier. Full link to the thread:

AI motion detection with BlueIris: an alternate approach

I wish there was guide somewhere to install this via portainer UI.
 
@naidu Unfortunately I'm not familiar with Portainer, but I'll take a look tonight and see if I can give you some pointers on how to proceed.
 
I'm sorry for having to ask such a beginner photoshop question, but I cannot figure out the actual proper creation of a mask in photoshop. I understand the easy BI/AI Tool procedural stuff; I just am not quite sure what to do within photoshop following those 4 steps in OP.

Once I start with a full image, do I create a duplicate layer, then start painting that layer with a brush with sufficient capacity? Or do I have to add a layer mask to the duplicate layer and begin painting that? If the latter, am I painting the areas I want to block white, with the parts I want to keep black?

You practically have to create an image of the same size as the camera image that is transparent everywhere where detections should be possible and not transparent in masked areas. I use Paint.Net and there you can create an empty new layer of the same size above a reference picture you opened with Paint.net, then paint all areas that should be masked in this new layer and finally delete the layer with the image and save it as png.
 
You practically have to create an image of the same size as the camera image that is transparent everywhere where detections should be possible and not transparent in masked areas. I use Paint.Net and there you can create an empty new layer of the same size above a reference picture you opened with Paint.net, then paint all areas that should be masked in this new layer and finally delete the layer with the image and save it as png.

I was able to finally get it, thanks!

Next (and hopefully last) question: I must have some setting incorrectly checked in either BI or AI Tool, because I want to have it set up such that after AI Tool scans an image and detects a person, Blue Iris sends an alert via MQTT to my Node Red in Home Assistant. But with my current incorrect settings, Blue Iris sends an alert via MQTT every single time an image is taken by BI, whether or not something was actually detected by AI Tool!

I must be missing something here, because it seems like with my current setup, here's what happens when there's motion.

1. Generally, the main "camera" is recording 24/7 with no triggers/alerts. Clone of the main camera, "cameraai," takes pictures (no video) only when motion is detected.
2. Then, when Blue Iris (cameraai) detects motion all on its own, cameraai takes a picture and send it to AI Tool's folder
3. At the same time, because Blue Iris detects motion, and has an alert setup to send MQTT message, it sends the MQTT message regardless of AI Tool's analysis
4. AI Tool completes analyzing the picture and determines whether or not there is a person. This information goes nowhere; it doesn't trigger anything in BI (if person) nor does it prevent BI from not sending the MQTT message (if no person). No matter what conclusion AI Tool came to, it keeps that information to itself.

What am I doing wrong here?
 
The main camera is the one that should send the MQTT event, not the cameraai one. Just add it to the On Alert trigger list of the main camera (HD feed) and it should work as you expect. That's how I was running for a while until...

... I added MQTT support directly in my alternate, Docker-based, approach. I really didn't like messing with BlueIris for MQTT events and wanted it to come directly from the AI system to my Home Assistant install. That way I can have home automation control when to kick BlueIris into recording with advanced logic, e.g. when I'm on the deck enjoying the nice weather there's no need to trigger HD recording.
 
  • Like
Reactions: GentlePumpkin
The main camera is the one that should send the MQTT event, not the cameraai one. Just add it to the On Alert trigger list of the main camera (HD feed) and it should work as you expect. That's how I was running for a while until...

... I added MQTT support directly in my alternate, Docker-based, approach. I really didn't like messing with BlueIris for MQTT events and wanted it to come directly from the AI system to my Home Assistant install. That way I can have home automation control when to kick BlueIris into recording with advanced logic, e.g. when I'm on the deck enjoying the nice weather there's no need to trigger HD recording.

Oh I hope that's the fix! Wait, does that mean I need to change for my main 24/7 camera, under "Alerts" tab "Fire when"? Because it's currently set to "Never." Or should I be changing something on my "Trigger" tab?
 
Oh I hope that's the fix! Wait, does that mean I need to change for my main 24/7 camera, under "Alerts" tab "Fire when"? Because it's currently set to "Never." Or should I be changing something on my "Trigger" tab?
on the HD camera motion detection should be turned off, but the fire when "this camera is triggered" should be on under the alerts tab.
 
Ok, I have the main camera to Fire When this camera is triggered, but the obvious question is how does it get triggered? On the Trigger tab, I have nothing checked under Sources. The only box checked on that entire Trigger tab is "Capture an alert list image."
 
Ok, I have the main camera to Fire When this camera is triggered, but the obvious question is how does it get triggered? On the Trigger tab, I have nothing checked under Sources. The only box checked on that entire Trigger tab is "Capture an alert list image."
It gets triggered by AI Tool using the URL or MQTT command, depending on which version you're running (AI Tool on Windows, or the @neile's version)