Seeking Assistance with Eliminating False Positives in Motion Detection

General discussion about Blue Iris
Post Reply
User avatar
Sardon
Posts: 111
Joined: Sun Nov 19, 2023 10:50 am

Seeking Assistance with Eliminating False Positives in Motion Detection

Post by Sardon »

Dear Blue Iris Community,

I am reaching out for help after encountering persistent issues with false positives in my CCTV motion detection. Despite numerous attempts to adjust settings and configurations, I am still struggling to find a reliable solution.

Background:

Previous Post: I had previously sought advice here and received valuable input, but unfortunately, that thread was lost due to a system failure mentioned by the devs.
Main Issue: My system triggers too many false positives, especially with changing sunlight conditions. This has been an ongoing challenge for me for a few years - I have attempts to resolve then give up and I'm going round in circles.
Attempts Made: I've recently experimented with creating two zones (A and B) to reduce false detections, but this led to missed detections, like someone approaching my front door. When I tried integrating CP AI, it inaccurately detected objects (like teddy bears), which wasn't helpful.

Primary Requirement:
My key need is simple: to be alerted reliably when someone approaches my front door. The area to monitor is a narrow balcony. The system must eliminate false positives while ensuring no missed detections of people approaching.

Efforts Invested:
I have dedicated countless days/hours to tweaking motion detection settings, including playing with object size thresholds and light conditions, but to no avail.

Specific Query:

CodeProject Setup: Given my previous attempt with CodeProject, I am considering giving it another try. Could someone advise on the optimal setup for CodeProject in this context?
Model Configuration: What model would be best to accurately detect humans approaching my door, avoiding misidentifications like 'pizza' or other objects?

I am prepared to put in the work and am eagerly seeking guidance to overcome this challenge. The false positives caused by rapid changes in sunlight have been a constant hurdle.

Your advice and suggestions would be immensely valuable and appreciated. Thank you for taking the time to read my post.

Best regards,
SN
User avatar
TimG
Posts: 2084
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by TimG »

Was this the one with railings outside a window ?

Anyway, I would go for CPAI with one of MikeLud's custom models, as they remove broccoli and teddy bears as well as many other items that cctv surveillance users may not be interested in:
IPcam-combined Labels: - person, bicycle, car, motorcycle, bus, truck, bird, cat, dog, horse, sheep, cow, bear, deer, rabbit, raccoon, fox, skunk, squirrel, pig

IPcam-general Labels (includes dark models images): - person, vehicle

IPcam-animal Labels: - bird, cat, dog, horse, sheep, cow, bear, deer, rabbit, raccoon, fox, skunk, squirrel, pig

IPcam-dark Labels: - Bicycle, Bus, Car, Cat, Dog, Motorcycle, Person

license-plate Labels: - DayPlate, NightPlate

Plate Label: - Plate
I think the "general" model would suit.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Pogo
Posts: 389
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by Pogo »

These types of posts would be much more effectively addressed if a snapshot of the actual scene were provided for context.

Just a short line of pixels handles ingress and egress for my entire driveway with almost zero nuisance alerts. No AI or extravegant setups telling the camera what's NOT there. Just a simple trigger with a couple of basic control parameters detects vehicle or person/object activity within a defined target area that works very well for my particular purpose.

Different scenes and conditions require different solutions to achieve the most effective results for the intended purpose.

Many times common sense is actually the most intelligent way to go.
User avatar
TimG
Posts: 2084
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by TimG »

It depends what you are going to do with the trigger. In my case BI5 sends confirmed AI messages with MQTT to Homeseer, and can do different events (lights, Alexa announcements and reading number plates) for person, car or truck. Homeseer knows when my car comes up the road.
If the OP is who I think it is, he had already tried some fiendish standard settings including masking due to movement behind a handrail with vertical poles.
Then again it may be a different issue 8-)
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Pogo
Posts: 389
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by Pogo »

TimG wrote: Tue Nov 21, 2023 10:25 pm Then again it may be a different issue 8-)
We just really don't know, now do we?

That's the point..., 'it depends'.
User avatar
Sardon
Posts: 111
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by Sardon »

TimG wrote: Tue Nov 21, 2023 5:28 pm Was this the one with railings outside a window ?

Yes, it's about the railings outside the window. I was hoping to revisit a previous post as it contained some really useful tips I wanted to check back on. Sadly, I couldn't locate the post. I also tried logging into the site without success. When I reached out to the site admins, they informed me that my account was unfortunately lost due to a system error. I'm struggling to recall who I was chatting with in that thread. The only thing that stands out in my memory is their advice about "changing the model" to prevent AI from mistakenly identifying things as pizzas.

I'm guessing it was you who was helping me before. You have a great memory! 😊
User avatar
TimG
Posts: 2084
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by TimG »

One thing I have done since then is install a Reolink doorbell camera. This has its own "person" trigger, which only works if somebody is really close by. BI5 can pick this up as an ONVIF trigger.

I remember your issue being people walking the other side of the railings which was not a valid trigger for you, hence the extensive masking between the rails. BI5 cannot tell if it is close or far away only the size of the object, so the posts would have explored setting larger objects.

So, does your camera have person detection ? If not, then a custom model with a high % may sort it. With AI you let everything trigger BI5 but let the AI decide if it is "person" or not.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
Sardon
Posts: 111
Joined: Sun Nov 19, 2023 10:50 am

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by Sardon »

Pogo wrote: Tue Nov 21, 2023 10:04 pm These types of posts would be much more effectively addressed if a snapshot of the actual scene were provided for context.

Just a short line of pixels handles ingress and egress for my entire driveway with almost zero nuisance alerts. No AI or extravegant setups telling the camera what's NOT there. Just a simple trigger with a couple of basic control parameters detects vehicle or person/object activity within a defined target area that works very well for my particular purpose.

Different scenes and conditions require different solutions to achieve the most effective results for the intended purpose.

Many times common sense is actually the most intelligent way to go.
Snapshots of current setup:

Balcony :
https://drive.google.com/file/d/11HxHpz ... sp=sharing

Motion Settings:
https://drive.google.com/file/d/11Dz7xC ... sp=sharing

Object Detection Settings:
https://drive.google.com/file/d/11KdWgS ... sp=sharing

My current setup is the only one I've found that reliably detects everything entering the designated green zone. However, issues arose when I divided the zone into two parts, labelled A and B, with a 'Zone Crossing' setting A-B. This was meant to capture movement in both directions, supplemented by another zone covering the entire screen with an empty gap between A & B. Despite this, it failed to detect some individuals approaching from left to right. The front door is located on the right-hand side of the screen. This lead me to revert back to the settings above which literally captures everything 100%

Additionally, this setup did not solve the problem of fluctuating sunlight, which triggers an excessive number of alerts. This led me to reconsider setting up CPAI and having another go last week.

So I recently updated CPAI to the latest version and conducted a preliminary test with default settings, without altering any custom models (I think). For convenience, I used my hallway camera for the test to avoid repeatedly walking up and down my balcony. During the review of the BI footage, under 'Test and Tuning' > 'Analyze with AI', my computer's performance significantly increased, sounding as if it was under heavy strain. The Task Manager showed my I9-10850k CPU operating at full capacity. Although there is a setting in BI to utilise the GPU under 'Settings' > 'AI', CPAI still seems to rely on the CPU as stated on the CP web front end, it shows CPU and not GPU.

I also observed that the milliseconds recorded in the logs were in the thousands. In fact, here are the logs from a recent test conducted on 19/11/23:"

0 19/11/2023 11:26:07.303 Hallway AI: [Objects] person:93% [526,111 789,701] 6850ms
0 19/11/2023 11:26:07.686 Hallway AI: [ipcam-dark] Person:93% [521,92 799,740] 6850ms
0 19/11/2023 11:26:07.688 Hallway AI: [ipcam-general] person:93% [529,108 790,708] 6850ms
0 19/11/2023 11:26:07.689 Hallway AI: [ipcam-combined] person:92% [531,112 786,708] 6850ms
0 19/11/2023 11:26:07.690 Hallway AI: person:93%

The situation seems unusual to me, and I suspect that the use of all models might be causing the CPU overload. Those ms are way too high.

My objective is straightforward, all I want is to detect anyone approaching my front door while minimizing false positives caused by the sun's intermittent appearance.

I've conducted thorough research and experimented with various settings. Some online suggestions even include setting a profile to disable motion detection entirely during the day, reactivating it automatically at night. Currently, when the sun causes issues, I manually right-click the camera, deselect motion detection, and set a reminder on Alexa to re-enable it after a few hours. This is why I thought to give CPAI another try, to see if I could work it out.

Another crucial point is can I still use zones with CPAI? This would be essential to avoid detecting people on the lower floor.

In the worst-case scenario, I'll maintain the current setup, but I am willing to put in the effort to try and fix this hence why I'm reaching out to you guys again. I've spent considerable time adjusting settings to no avail. As I've mentioned before, when the situation becomes unbearable, it prompts me to make another attempt at modifying settings, which often leads to further frustration.

Clearly, in my case, common sense isn't as straightforward as it seems.
User avatar
TimG
Posts: 2084
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by TimG »

Running all the custom models on a camera will floor your cpu. The DAT files will show which models are in use. You can then stop unwanted models.

If you are using custom models, have you stopped the default model "Objects" in BI5 general settings ? You then look at a new DAT file to see what is left.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
User avatar
TimG
Posts: 2084
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Seeking Assistance with Eliminating False Positives in Motion Detection

Post by TimG »

Ifirc the "Analyze with AI" uses all available models, so it WILL floor your cpu with a video containing movement. Normally you only use one custom model. This can be seen in the DAT files, which are enabled by going to Camera settings/Alerts/Artificial Intelligence. Ticking "Save AI analysis details" will create DAT files for that camera. Turn them off when not required, as they use space. The DAT file shows you exactly what BI5 and CPAI were doing to make decisions, while the "Analyze with AI" just shows you it is working.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Post Reply