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

Joined
Mar 19, 2015
Messages
13
Reaction score
5
@GentlePumpkin is there anyway you could release a new version which supports the &memo=text variable?
I've created a fork and added memo support. Going to test it today. I'll create a pull request and if he wants he can pull it in.. or you can just build my version.
 
Joined
Mar 19, 2015
Messages
13
Reaction score
5
That sound really cool! Does the memo text show up in UI3 aswell? You can build the latest version from Github, it includes the following placeholders you can insert into the trigger url:
[detection]
[position]
[camera]
[confidence]
[detections] (all detected objects separated by comma)
[confidences] (all confidences separated by comma in the same oder as above)

So this might work: /admin?camera=x&trigger&memo=[detection]%20([confidence])

It's not yet release because I had no time to test it sufficiently and I don't want many people having problems after updating. And it includes some changes towards flagging relevant alerts (so that duplicate cams are no longer neccessary).
That would generate some odd results.. would give you for example 'person,car,dog 0.999999999,0.543242,0.123214'
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
That would generate some odd results.. would give you for example 'person,car,dog 0.999999999,0.543242,0.123214'
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?
 

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
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.
 

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
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?
 
Joined
Mar 19, 2015
Messages
13
Reaction score
5
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.
 
Joined
Mar 19, 2015
Messages
13
Reaction score
5
@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 :)
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
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?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
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/
 

naidu

Young grasshopper
Joined
May 22, 2020
Messages
31
Reaction score
5
Location
USA
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.
 

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
@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.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
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.
 

ManImCool

n3wb
Joined
Jun 4, 2020
Messages
4
Reaction score
0
Location
Texas
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?
 

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
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.
 
Top