Alert and motion setup advice

Post Reply
buckeye
Posts: 2
Joined: Fri Jul 21, 2023 6:13 pm

Alert and motion setup advice

Post by buckeye »

I've had motion alerts setup for some time now but I am getting way to many false positives that the alerts are no longer useful.

I decided to start from scratch on the triggers, zones, motion, and alerts. I also started using codeproject.AI.

My goal is to identify when a person or vehicle comes down our driveway from the street. (Image below)

However, I am running into a few challenges.

1.) Our driveway is shaded by trees and when the wind is blowing the motion sensor gets set off with the shadows.
2.) I don't believe this would be as big of a problem it is given that AI can validate its a person or vehicle before alerting BUT we park one of our vehicles in the driveway. I think whats happening is that it sees shadows moving, sends codeproject the image to analzye, it sees the truck, and sends me an alert.

I haven't cracked the code between the various settings of obj size, contract, make time, different zones, object detection (zone A>B) to reduce the false positives.

Welcome any tips or alternate approaches from the community!

https://imgur.com/a/Z1lNQi6

Image
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Alert and motion setup advice

Post by Pogo »

Wow. That's almost my driveway!

So..., this'll be a real bag o' snakes thread since you covered just about everything involved to make BI work even reasonably well. LOL Everyone will have their preferred methods for achieving their results -- which aren't necessarily what will be required to obtain your desired results. Take everything that comes along here with a grain of salt until you determine if it'll work for you.

There were quite a few good threads about various approaches to different alert and recording requirements that were sadly lost just recently due to a major server issue. This thread could be a great starting point to re-establish much of it.

Your starting from square one again yourself is smart. It's obviously all about the triggers and what you want them to do. I'll chime back in a little later with my favorite starting point settings for a newly added camera as I'm sure others will as well., but my first piece of advice is to not put so much stock in CPAI that you lose sight of the basic essentials initially required to achieve effective functionality without it. Zones are a wonderful thing. Dedicated cheapie trigger cameras can be very useful in minimizing unnecessary alerts. Things like that can go a long way easily, but the most basic detection techniques are where everything begins and ends before AI or any other bells and whistles are worth 2 cents..., not to mention expensive schmega-pixel cameras, IMHO.
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Alert and motion setup advice

Post by Pogo »

Well, I just spent 3 hours putting a post together that immediately vanished when I submitted it. The basic gist follows since I had the sense to do the first half with WordPad..., just in case. Unfortunately the essence of the thing was the second half. This also needs to be posted in two parts due to the attachment limit.

=====================================================================================================================================
Definitely tl;dr territory. Hope ya have a beer and a sandwich handy.

I've only been using BI for a little over a year and have barely scratched the surface, but the first thing I learned was to not try to do everything at once and to embrace the learning curve with patience, not frustration..., and one size doesn't fit all..., and everyone is an expert. LOL

So with the disclaimer out of the way, my BI use case is basic homeowner surveillance with a healthy dose of network hobbyist thrown in for good measure. I have a modest i7 Gen 4 server that handles 20 cameras at an average 12% CPU utilization so I'm doing something right.

I'm set up as 'events based' for recording vs. 24x7x365 with nothing else involved except 2 additional DVRs and a NVR for redundancy and 24x7 on a couple cameras (and a little of the hobby part) all hanging off the same camera network and integrated to one extent or another with my BUI server. No AI. No Smart Home stuff. No Alexa.... Just pure nuts 'n' bolts Blue Iris (at present).

Triggering actions from detected events is what it's all about. And there are a million ways to go about it for a million more end use purposes and a million more results. Basic motion detection is where it all begins, but 'basic' certainly over-simplifies what is a fairly complex set of features right out of the gate. What follows is how I've adapted the 'basics' to a new camera addition as a starting point for what will ultimately become an exercise in tweaking to get it permanently dialed in for its location and purpose.

A basic driveway setup is fairly simple..., and can be done a million ways, of course. Mine is about as simple as it gets. It's not an 'alerts-based' setup, (though it could easily be), but rather just a 'recorded event' setup. (My alerts are actually provided by an electro-magnetic sensor at the end of the drive via RF transmitter to a receiver at the house. Using it as a BI trigger would be relatively simple and virtually eliminate false positives.)

To understand triggering, one must also understand that they are generated by the camera's sub-stream. This is very important when making certain adjustments to certain settings, namely anything pixel related due to the sub-stream resolution being made up of much larger pixels per area than the main stream. (Forgive me if I'm stating the obvious, but it's surprising how many folks simply don't know this.)

So the first thing I do is extend the max trigger/alert duration. What this does is allow a continuous time frame for recording clips without stopping and starting ongoing activity from a new trigger every minute as seemed to be the case with the default setting. This should also help minimize multiple alerts from what would essentially be the same event that generated the initial trigger..., though I'm only guessing there since I don't have alerts set up presently. (This is also particularly handy for successively viewing a day's worth of individual clips with the clip viewer instead of extracting them from the timeline.)

Not sure how many attachments can be included in the same post, so here goes...
Max Trigger.jpg
Max Trigger.jpg (90.4 KiB) Viewed 15219 times
I experiment with this camera quite a bit for obvious reasons and always seem to come back to a single zone for general purposes. I have the convenience of my BI server being very handy and can adjust settings quickly according to changing conditions. The intention is to permanently enable alerting, add another or split the existing zone and set up separate day and night configurations.
Driveway Zone A.jpg
Driveway Zone A.jpg (109.8 KiB) Viewed 15219 times
These settings were explained in detail in the disappearing post and this was the last allowable attachment. I'll pick it back up and conclude later with a couple final setting examples if time (and space) permit.
Motion Sensor.jpg
Motion Sensor.jpg (94.69 KiB) Viewed 15219 times
Last edited by Pogo on Sun Jul 23, 2023 10:14 pm, edited 2 times in total.
buckeye
Posts: 2
Joined: Fri Jul 21, 2023 6:13 pm

Re: Alert and motion setup advice

Post by buckeye »

Appreciate the info and your time in responding! Sorry to hear that you lost some work. I was wondering why a number of posts I found while google-ing ended up with post not found ... server issue wiping out posts would explain it.
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Alert and motion setup advice

Post by Pogo »

The short rundown on my motion sensor settings for this camera is they're primarily for night time activity and work well detecting a cat or raccoon coming up the driveway almost from the road. But they also think a bug is a pterodactyl and the short make time isn't very forgiving in that regard! LOL A longer make time would reduce those triggers as would increasing the object size. These same settings still do the job during the day and will immediately detect a chipmunk entering the frame. A person or vehicle are obviously detected easily and maintain triggering quite well throughout the duration of most events.

The zone sort of speaks for itself. The non-designated perimeter eliminates road traffic and branch/leaf movement from being detected but obviously still allows detection of shadow motion which I generally tolerate as things currently stand or simply de-activate motion detection for this camera in BI during crazy weather. (I do have it recording 24/7 on an Amcrest DVR along with a few other cameras which makes BI less mission critical in my particular situation than is probably the case in most.)

The zones and hot spot being selected is a general zone application in this situation and pretty much self-explanatory with a single zone, though can be very flexible with more advanced settings and additional zones as you're probably aware. Hot spots are selected as Zone 'H' and are a special zone that operates all by itself with no rules or settings having any effect whatsoever. Use with caution or expect constant alerts. Using small managed zones is preferable over hot spots in most cases. A single small zone near the driveway entrance could actually trigger anything coming across it to simply activate an alert which in turn could activate additional action such as recording the event with entirely different parameters using a cloned or additional camera set up specifically for the recording aspect.

There's plenty of discussion on the detection algorithm with the consensus I've garnered seeming to indicate there's not much difference until Deepstack or CPAI are being implemented. Even then the discussion lacks clarity and I'm quite content sticking with the Edge Vector default.

So onward...
Object Detection.jpg
Object Detection.jpg (52.44 KiB) Viewed 15188 times
The object detection feature is where understanding the sub-stream resolution comes into play. The lower the resolution, the larger the pixels within a given area of the frame. I reduce the default by 50% as a starting point when using object detection. This and reducing object size for resetting the detector pretty much ensure they'll both at least do something to help evaluate their effectiveness in a particular configuration. This is where you can minimize bug and small object detection from triggering false alerts or recording useless clips. Experimentation is obviously required to determine whether useful results can be obtained for a given situation.
Record.jpg
Record.jpg (109.24 KiB) Viewed 15188 times
My recording parameters are also pretty bare bones and work well for my purposes. My triggers record clips. Lots of em. A 2 second pre-record suits my general requirements. Longer times are useful for areas of increased activity in more security critical environments where details preceding an event can be critical to catching bad guys, etc.

My cut/combine times are dramatically reduced from the norm to accommodate my extended triggering duration times of the clips in general since I'm basically a clips based setup with maybe 20/30 clips per camera over any 24hr. period. No reason to search through 8 hours of video for something I can pull from smaller segments of storage in a few minutes -- at least in my case using very basic methods. I pretty much understand how it works and why it's set up the way it is. I just don't use it that way.

Lots of folks record dual streams for different reasons and I understand why. I personally only record the main stream at the highest practical quality. If needed for tuning triggers or alerts, I can always record the sub stream on an as needed basis.

It's all about what works for you. The cool thing is it can always be improved upon given the capabilities of Blue Iris, additional hardware, and last but certainly not least, having the right type and quality of camera for the task at hand combined with realistic expectations for the anticipated results of your efforts. Know your own cameras. Even cheap cameras can pull off some amazing stuff with BlueIris. Nothing wrong with 2MP 1080 cameras -- if you have enough of em. LOL

Anyway, this is by no means intended to be anything more than what it is..., someone else's 2 cents worth of basic advice and general observation, with 'basic' being the operative word.

Try a small zone at the end of your drive as a trigger similar to a trip wire and play around with it for awhile. If all you're wanting to achieve is an alert that a person or vehicle is entering your drive, a simple uncomplicated trigger should do the trick. Documenting and archiving events is where the rubber really meets the road and when all the other considerations can become complicated quickly. Smart AI cameras can make it much easier but also have their own learning curves and present their own challenges integrating effectively with Blue Iris.

But if it weren't fun!

And finally, this is one of the best Blue Iris tutorials out there. It's older and based on v4 but is very good at covering the fundamentals in a clear and concise manner over the course of several relatively short videos -- pretty much in the optimum sequence for learning BI from the beginning to some of the fairly advanced capabilities. Good stuff.

https://www.youtube.com/playlist?list=P ... Ajp7ZH8CWB

Good luck!
User avatar
Pogo
Posts: 652
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Alert and motion setup advice

Post by Pogo »

Try a small zone at the end of your drive as a trigger similar to a trip wire and play around with it for awhile. If all you're wanting to achieve is an alert that a person or vehicle is entering your drive, a simple uncomplicated trigger should do the trick.
Or so I thought. LOL

I spent hours trying to set up a simple uncomplicated alert for a small 'B' zone at the end of my driveway using the same motion trigger as the main 'A' zone. As logical as it sounded, it didn't work at all as was expected. There may well be a way to do this with a single camera, but I sure haven't found it yet, and trying to get there has been anything but intuitive.

The camera ended up needed to be cloned with a trigger exclusive to the defined area in zone 'A' for the intended result. It works great with the exception of sending an added email back to the originating email account's address instead of just sending a single SMS image alert to my phone -- which it does do as intended and quickly.

Otherwise, I've received zero unintended alerts over the past 24hrs. Zero. The main camera still records normally with a 2 second pre-trigger to capture everything within the allotted time frame..., and triggers not stepping all over each other.

Klunky, but works well.
Post Reply