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

I think I understand, you just want an alert recorded and not to trigger the cam to record but with you recording continuously does triggering the cam to record not just mean that you end up with an alert?
 
AI Tool seems to ignore a lot of images. Using 6 cameras with moving trees and a lot of thumbnails. It processes an image every 4 seconds or so. It disregards the other images, so frequently it processes only images with false alerts and the ones with a person are not processed. Is there a way to (force) process all images?
 
AI Tool seems to ignore a lot of images. Using 6 cameras with moving trees and a lot of thumbnails. It processes an image every 4 seconds or so. It disregards the other images, so frequently it processes only images with false alerts and the ones with a person are not processed. Is there a way to (force) process all images?
You may need to address the other issues more. Lets say trees are moving... How many images is one camera sending and how frequent? You may need to increase cool down periods and the number of snaps sent per motion detection, you also need to adjust your motion ranges and areas and try to limit the trees causing. People are getting caught up using AI thinking they can just turn motion on and not tune/tweak things. You still need to take steps to reduce some of the noise in BI and reduce the number of images being sent. Until you've run through those guides and post (IE pretend AI tools does not exist first) you're not going to have a good setup. AI is to aid, not make it flat fool proof because your system wouldn't be able to handle it, as you are seeing. Images can only process 1 at a time. You don't want it to sit and spin up 50 images from a trees moving on multiple cameras doing 1 image at a time because now you're missing time an valid alert that may mean the difference between catching or not catching something fast enough.

As to your issue, I've not ran into that on my setup and I have 7 cameras recording at 4k and messing around have had it throw a bunch of images. They all processed. It could be yours is throwing too many pictures at them and your system can't handle the performance so some are timing out after waiting to process vs. mine is processing them faster so not hitting a time out point that may or may not exist. I don't think it's setup to just line them all up and wait forever. I also don't know that I'd want it to because that can be used against you also since your system will be busy doing other things instead of notifying you faster...

I believe that you have an additional clone that you don’t need. I have one clone for each camera. The main records 24/7 like yours. I then have motion detection enabled only on the clones. AI Tool then triggers my main camera(s) if an object meets the criteria. I like your thinking with the 0 or 1 for a valid alert, but I don’t fully understand because a AI Tool wouldn’t trigger a camera if the event didn’t contain a valid object. If you don’t want to use clones you can flag valid alerts from AI Tool and then filter the app or web interface to only show flagged alerts. This is the way that Sentry does it. The major disadvantage of not using clones is that the alerts view aren’t as neat due to any motion event showing and not just valid alerts.


Sent from my iPhone using Tapatalk

I only have one clone of each. What I am describing though is so you don't need any clones to do this.
Sentry works exactly how I was asking. Sentry gets an image and sends a yes or no back to BI (and also has an option to send the detected area back). No cancels the alert and yes sends the alert. This is also confirmed by Ken. He stated AITools or whatever used would need to send flag=0 for alerts to cancel, not just =1 for triggered (as we are calling them). So basically AITools would have two triggers. One for matches and one for false positives... the false positive would use the 0 flag to send BI, the positive would send the 1 match.
This would allow you to have no clones. The single feed recording 24/7 would detect motion, send to AITools, AITool would say =1 and use the trigger as exist today and fire off the notification if valid. If it was not valid (this is what needs to be added) flag=0 would be sent instead. This would tell BI to cancel/reject the alert so no notification is sent and to clear the alert. Basically don't think of it as a trigger. People are getting caught up on terms. Think of it as accept/reject. Though one could argue make the default reject if not response. Ken's valid comment on that was what happens if something times out, you still want the record to exist so you can review it in case it was valid.

Now you have 24/7 recording and accurate alerting without the need for a clone. It's more efficient and cleaner this way.
As-is you have your main camera making images for BI which takes processing and dumps to AITools. And now you have a clone also making images which takes processing on top of the minor hit a clone does cause (and yes cloning does have a small resource hit still) to send to you as an alert. All unnecessary as BI supports what I am describing without the need for clone or new alert images to be created.

This also opens the door to using triggers (in the conventional thought some are thinking of when you think of trigger) without the need for cloned cameras.
 
You may need to address the other issues more. Lets say trees are moving... How many images is one camera sending and how frequent? You may need to increase cool down periods and the number of snaps sent per motion detection, you also need to adjust your motion ranges and areas and try to limit the trees causing. People are getting caught up using AI thinking they can just turn motion on and not tune/tweak things. You still need to take steps to reduce some of the noise in BI and reduce the number of images being sent. Until you've run through those guides and post (IE pretend AI tools does not exist first) you're not going to have a good setup. AI is to aid, not make it flat fool proof because your system wouldn't be able to handle it, as you are seeing. Images can only process 1 at a time. You don't want it to sit and spin up 50 images from a trees moving on multiple cameras doing 1 image at a time because now you're missing time an valid alert that may mean the difference between catching or not catching something fast enough.

As to your issue, I've not ran into that on my setup and I have 7 cameras recording at 4k and messing around have had it throw a bunch of images. They all processed. It could be yours is throwing too many pictures at them and your system can't handle the performance so some are timing out after waiting to process vs. mine is processing them faster so not hitting a time out point that may or may not exist. I don't think it's setup to just line them all up and wait forever. I also don't know that I'd want it to because that can be used against you also since your system will be busy doing other things instead of notifying you faster...

Yes, I understand that. Unfortunately, Trees or their shadows will cause problems when there is a lot of movement. But even when the number of images is not that large they are not all processed. I have a 16 core 3.8 ghz CPU and 64 gb ram, so performance should not really be an issue. I tried GPU (nvidia 980ti) and it works faster, but after one or two hours or so it stops working for some reason.
 
This would allow you to have no clones. The single feed recording 24/7 would detect motion, send to AITools, AITool would say =1 and use the trigger as exist today and fire off the notification if valid. If it was not valid (this is what needs to be added) flag=0 would be sent instead. This would tell BI to cancel/reject the alert so no notification is sent and to clear the alert.

Maybe I'm not understanding you correctly, but I don't see your issue and how a second flag would help.

I'm not using any clone cameras and BI does not send notifications (emails to pushover) unless AI reports a positive detection. Isn't this what you are trying to achieve? If so, then it's just a matter of configuration. No new flags are needed.
 
Maybe I'm not understanding you correctly, but I don't see your issue and how a second flag would help.

I'm not using any clone cameras and BI does not send notifications (emails to pushover) unless AI reports a positive detection. Isn't this what you are trying to achieve? If so, then it's just a matter of configuration. No new flags are needed.

I agree. The only reason to have clones is so that your alert view is cleaner because if you didn’t all motion events (including valid alerts) would show in your alert view since the “capture alert image” needs to be checked on the main cameras. To mitigate this you can flag the alert so that you can filter valid alerts. I agree that the clones do take up a small piece of CPU cycles. I’m thinking of ditching my clones to save CPU cycles to dedicate more CPU to Deepstack. I also understand what you mean by using the method that Sentry uses, but this would take integration for Deepstack into BI the same way that Sentry is integrated. Ken announced last year that he will be integrating other AI solutions in the future, so hopefully Deepstack will be considered for this. Once this happens AI Tool really wouldn’t be needed since AI Tool decides when an alert is sent. I believe that this is what you’re referring to?


Sent from my iPhone using Tapatalk
 
I agree. The only reason to have clones is so that your alert view is cleaner because if you didn’t all motion events (including valid alerts) would show in your alert view since the “capture alert image” needs to be checked on the main cameras. To mitigate this you can flag the alert so that you can filter valid alerts.

In my case I'm happy to have both the flagged AI and motion alert images in the list. I use the motion images to look for critters that AI might not pick up. We have rabbits, raccoons, coyotes, deer, and even bear roaming in our yard day and night. To see only AI flagged images I just check the Flagged Only box so it's easy to ignore the motion alert images if you want to.
 
It would be nice to know what parameters are used internally in AI Tool to determine why it does not process all images (or make these settings configurable).

Can someone try this: Just trigger all your cameras at once and see if it starts 'randomly' ignoring a lot of images.

Also, I was thinking: What if I run 3 dockers, with 3 AI tool instances and 3 separate folders, each for 2 cameras at once. Then AI tools might better work for parallel processing.
 
Maybe I'm not understanding you correctly, but I don't see your issue and how a second flag would help.

I'm not using any clone cameras and BI does not send notifications (emails to pushover) unless AI reports a positive detection. Isn't this what you are trying to achieve? If so, then it's just a matter of configuration. No new flags are needed.
It must be something different between our setups because the way you describe it and what Ken stated do not match. Can you provide details on one camera how you have it setup from motion/recording/alert etc.? I don't see how this is possible with my setup and Ken agreed the only way to do it right is to mimic sentry, which can be done without any work by Ken. He said use the flag=o to send cancels. This is all sentry does is send =1 yes or =0 no. Beyond that it does send the image info if you have the replace alert option checked which we couldn't do but we can still mimic the notification parts as is, but requires this other flag unless I'm really missing something and the developer is wrong??

BI alerts based on an alert being generated. An alert is generated for AITool to get an image by nature. Hence an alert notification would be sent regardless of AITool processing or not if you have alerts enabled because an alert was generated by BI. The alert tab doesn't have options to say "only alert on flagged alerts".
The flag/trigger option in AI tool just flags an alert or can be used to trigger another profile/camera etc. So it can flag so you can filter alerts in BI or it can trigger to cause some other action, say having your main camera alerts notifications are disabled to capture alerts and a cloned camera that does have alerts on which AI is triggering

If you have a single stream (not cloned though), record 24/7 w/ alerts enabled and motion how do you get BI to only alert on the flagged ones on that? The second you enable alert notifications you get them for everything because AITools plays no role in that processing, BI is looking at all alerts. The exception to that is to do like sentry does behind the scene, enable the flag "allow disarm time by delaying alert" and sending a flag =0 during that period of time to reject the alert and thus BI does not send every alert. It cancels or approves them.

It's possible I'm missing something but I'd been speaking to Ken over days on this so something is indeed different with your setup and what you describe vs. what I am trying to get?
 
It must be something different between our setups because the way you describe it and what Ken stated do not match. Can you provide details on one camera how you have it setup from motion/recording/alert etc.?

Take a look at one of my previous posts 1483 which contains images of my setup.

I configured things based on GentlePumpkin's guide at the beginning of this thread, with the exception of using a different trigger URL. The guide shows how to set things up using a clone camera and how to do it without a clone using flagging.

Let me know if you need something that's not in my previous post.
 
Last edited:
I have some problems getting the AI tool work to work proparly. I have my camera in a way that maybe isn't the best oriëntation for my camera, but this way I see most part of my front yard. But because of the oriëntation it fails quite often to recornize an object. See examples below. Is there a way to improve the object detection without changing the camera?

Miss.png

Car 100%.png
 
Hi; new here. I'm running BI 5 in demo mode and AITools 1.67 on win 10 computer. Using sub-stream recording 24x7 and trying to trigger HD recording when people and cars are detected.

Confusingly, AI Tool history shows, for example, a car that pulls up in front of the house as " irrelevant : car(95%)", but no HD recording happens.

Um...I want it to trigger when it sees a car. :)

A little different issue with a person; AI Tool history shows "person (99%)", but no HD recording happens.

If I simply trigger the hd camera with the HD stream URL, I'll get a 15 second recording.

Help?

Thanks!
 
Oh, wait...AI Tool history says the camera is "default". I want it to say "SD" (my sd camera name). But if I delete the default camera, I just get errors??
 
Hi; new here. I'm running BI 5 in demo mode and AITools 1.67 on win 10 computer. Using sub-stream recording 24x7 and trying to trigger HD recording when people and cars are detected.

Confusingly, AI Tool history shows, for example, a car that pulls up in front of the house as " irrelevant : car(95%)", but no HD recording happens.

Um...I want it to trigger when it sees a car. :)

A little different issue with a person; AI Tool history shows "person (99%)", but no HD recording happens.

If I simply trigger the hd camera with the HD stream URL, I'll get a 15 second recording.

Help?

Thanks!

If you haven't seen this video tutorial then you should check it out. The guy configures Blue Iris and AI Tool to do what you are attempting, so you can check your settings against what he suggests. There was some talk about the demo version of Blue Iris having some AI detection issues due to the watermark in the demo, so keep that in mind.

 
Ken announced last year that he will be integrating other AI solutions in the future, so hopefully Deepstack will be considered for this. Once this happens AI Tool really wouldn’t be needed since AI Tool decides when an alert is sent.

I've been thinking about the integration of DeepStack with Blue Iris and I'm not convinced that it's a good idea. Depending on the developers involved, there can be greater innovation and quicker progress in an open source project. You mentioned that Ken announced his intentions to integrate with other AI solutions last year but GentlePumpkin is the only one I know of that has produced a product. Other developers have been working behind the scenes adding features and enhancements. The VorlonCD fork added a lot of new features and there's more to come. classObject is working on dynamic masking so that a stationary object such as a car doesn't trigger an alert every time the camera sees motion. Something that is greatly needed in AI Tool. I'm grateful for the work that talented programmers are putting into this project.

The downside of Open Source is that if the developers lose interest or no longer have the time to donate to the project then the project can stagnate. This has happened with a few Open Source products that I've used in the past.

I don't know if it would even be worthwhile for Ken to integrate DeepStack and all the features in, and coming to, AI Tool. He could not take the project and put it in his commercial product so he would have to rewrite all the code himself which would be a lot of work, and he probably wouldn't make any more money on Blue Iris unless he increased the price. Also, if DeepStack integration was in Blue Iris then the development of AI Tool might slow and we could lose innovation.

A better way to go could be for Ken to provide support for the AI Tool project by providing things in Blue Iris that might make AI Tool integrate more smoothly, and if he had the time he could be a contributor to the project. AI Tool's success adds value to Blue Iris so it's in Ken's best interest for the project to succeed. He gets the value without having to rewrite all the code himself. I guess one down side could be that since the code is Open Source then some competitor to Blue Iris could also use AI Tool, but at the moment Blue Iris doesn't seem to have a direct competitor. Not when you consider the price range and features.

You can check out some of the things being developed here.

Dynamic masking by classObject · Pull Request #38 · gentlepumpkin/bi-aidetection

Many updates by VorlonCD · Pull Request #32 · gentlepumpkin/bi-aidetection
 
If you haven't seen this video tutorial then you should check it out.
My bad; I should have mentioned that I've watched that video 5x, and I've also looked over this site for hints.

There was some talk about the demo version of Blue Iris having some AI detection issues due to the watermark in the demo, so keep that in mind.
Interesting; maybe I'll try to mask the area of the watermark. (I haven't bought BI yet because I've not gotten any response about how the v5 licensing / support actually works.)

I unchecked the "Enable AI Detection for this camera" box for the default camera; but now I get NO detection at all, even though it's checked in my SD camera that I added. (Should I have added the SD or the HD camera?)
 
I unchecked the "Enable AI Detection for this camera" box for the default camera; but now I get NO detection at all, even though it's checked in my SD camera that I added. (Should I have added the SD or the HD camera?)

Sorry, I can't help with the specifics of SD and HD camera selection since I've never set things up to do what you are attempting. That's why I pointed you to a video that I knew was geared toward SD/HD recording rather than answering your original questions. I record HD 24/7. Perhaps someone else with more knowledge in this area will chime in.

When I bought BI the licensing was a bit unclear to me. I understood that it came with one year of updates, and I thought that even after the year was up that I could still get updates within the version that I owned, but I would have to pay for another year of support to get any major updates. However, it didn't work that way. After the year i tried to install what I thought was a minor update and it turned into a demo so I moved back to an older version to keep things going. I didn't mind paying for another year of updates since it's not expensive, it was just not what I was expecting. Now I just plan to pay every year.
 
Thanks; no sweat...I bought the software just now (figuring I'll have to buy it every year), and setup the default camera in AI Tool to point to my hd camera, and now all is working! What a relief. Now I can get back to flying MSFS 2020. :-)
 
Thanks; no sweat...I bought the software just now (figuring I'll have to buy it every year), and setup the default camera in AI Tool to point to my hd camera, and now all is working! What a relief. Now I can get back to flying MSFS 2020. :-)

What did you do to get it working? Might be of help to others with the same/similar issues?
 
Is there anything that can be done for this false positive? it happens a lot at night and can't be masked as it will render the entire camera useless because of the huge area.
It is also so strange that the confidence level is so high.

1598447742980.png