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

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
Anyone decent enough to update the tool (until OP can) and add an option for a negative flag by the trigger one for BI? So basically right now it triggers when a match but with BI having the flag option you can also have it send 0 instead of 1 which will cancel an alert. So basically regardless have the AI send a yes or no response. This would remove the need for camera clones for alerts at least because it would be able to cancel false positives using the BI built in wait period you can define to allow alert canceles. As-is this ends up needing clone from what I can tell.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Anyone decent enough to update the tool (until OP can) and add an option for a negative flag by the trigger one for BI? So basically right now it triggers when a match but with BI having the flag option you can also have it send 0 instead of 1 which will cancel an alert. So basically regardless have the AI send a yes or no response. This would remove the need for camera clones for alerts at least because it would be able to cancel false positives using the BI built in wait period you can define to allow alert canceles. As-is this ends up needing clone from what I can tell.
That makes no sense to me? AITools triggers the cam if DQ reports something of interest. When would you want to send a trigger to cancel?
 

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
That makes no sense to me? AITools triggers the cam if DQ reports something of interest. When would you want to send a trigger to cancel?
Because I don't need the camera triggered. I need to get an alert or not.
My cameras record 24/7 so I have nothing to trigger. I simply want notification valid motion was detected.
I want to use the native BI settings which allow for an alert to be canceled if it's invalid.

This is what Sentry does, confirms or rejects an alert and that's how you don't require to use clones to get alerts otherwise.
As-is I must use clones because I have to use camera 1 to capture "alerts" which AITool uses. If valid I now have to send a trigger to a clone camera 2 to capture another image to send the actual alert because I can't use camera 1 for notifications since it's capturing everything junk or valid.

If I could send the flag=0 command that BI supports and what it was created for, I can use the same camera for both. It confirms if valid, rejects if not and the actual alerts are correct in BI now without needing separate clones/cameras or other complexity.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Because I don't need the camera triggered. I need to get an alert or not.
My cameras record 24/7 so I have nothing to trigger. I simply want notification valid motion was detected.
I want to use the native BI settings which allow for an alert to be canceled if it's invalid.

This is what Sentry does, confirms or rejects an alert and that's how you don't require to use clones to get alerts otherwise.
As-is I must use clones because I have to use camera 1 to capture "alerts" which AITool uses. If valid I now have to send a trigger to a clone camera 2 to capture another image to send the actual alert because I can't use camera 1 for notifications since it's capturing everything junk or valid.

If I could send the flag=0 command that BI supports and what it was created for, I can use the same camera for both. It confirms if valid, rejects if not and the actual alerts are correct in BI now without needing separate clones/cameras or other complexity.
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
 

OccultMonk

Young grasshopper
Joined
Jul 25, 2020
Messages
72
Reaction score
13
Location
A Mountain hilltop
Last time I tried GPU (a few weeks ago) it worked well, but stopped working after 30 min or an hour or so. I read others had the same problem. Has the GPU version been improved, or does it still stop working after some time?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
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?
 

OccultMonk

Young grasshopper
Joined
Jul 25, 2020
Messages
72
Reaction score
13
Location
A Mountain hilltop
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?
 

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
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.
 

OccultMonk

Young grasshopper
Joined
Jul 25, 2020
Messages
72
Reaction score
13
Location
A Mountain hilltop
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.
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
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.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
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
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
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.
 

OccultMonk

Young grasshopper
Joined
Jul 25, 2020
Messages
72
Reaction score
13
Location
A Mountain hilltop
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.
 

B-Murda

Getting the hang of it
Joined
Jun 16, 2020
Messages
32
Reaction score
26
Location
USA
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?
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
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:

Deadpool

n3wb
Joined
Aug 25, 2020
Messages
4
Reaction score
0
Location
Netherlands
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
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
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!
 

WildDoktor

Young grasshopper
Joined
Aug 25, 2020
Messages
76
Reaction score
11
Location
USA
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??
 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
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.

 

robpur

Getting comfortable
Joined
Jul 31, 2014
Messages
274
Reaction score
1,322
Location
Washington State
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
 
Top