Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to ignore objects that do not travel through frame/or do not enter *multiple* zones #10414

Closed
raintonr opened this issue Mar 13, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@raintonr
Copy link

Describe what you are trying to accomplish and why in non technical terms

I want to be able to ignore detected objects that seem to appear instantly in frame without actually travelling through the frame so that I can reduce false positives.

Describe the solution you'd like

I think an option that would be very useful would be: when an object is first detected it should not be considered valid/active/whatever and an event should not be created unless the object actually moves in consecutive frames. Ie. it moves x pixels over y frames.

Describe alternatives you've considered

Currently I can only find the inertia (zones) setting that might help here, but that is only to do with how many frames an object is in zone before being confirmed there.

I have also looked at the required_zones (MQTT, events). I already have several zones configured for our cameras as those can be used for detection in an external system (MQTT). I have that system ignore objects unless they have been in multiple zones. This seems to work well externally, but that doesn't help Frigate recordings. I built this code with rules linking adjacent zones - even zones from different cameras can be considered in this way - and it works well. Maybe required_zones could somehow be augmented to have some simple AND/OR logic in there that could work?

Additional context

An example event: Sometimes dirt/snow/rain on the lens confuses the detector...

image

In this example an object appeared almost directly in the centre of the frame and appeared to stay motionless for some time (in this example, around 15 minutes) before the lens cleared. For slow frame rates and fast moving objects I guess that is possible but in most situations this should be impossible.

Frigate correctly marked the object as motionless 17 seconds after it appeared but did mark it as active a few times, however, the bounding box barely moved.

@raintonr raintonr added the enhancement New feature or request label Mar 13, 2024
@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Mar 13, 2024

This is already how frigate works. An object will not be considered part of a zone or considered for an event until it has moved.

@raintonr
Copy link
Author

Is there some kind of sensitivity around how far (how many pixels) an object needs to move then? Rather than the current 'number of frames'?

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Mar 13, 2024

it's not about pixels, it is about the IoU of the bounding box. Once the IoU of the bounding boxes is low enough it is considered a position change. The logic behind this has already been improved for 0.14

@raintonr
Copy link
Author

IoU, pixels, whatever... so long as there's a way to specify sensitivity think that would solve this one.

Good to know improvements coming. If you happen to have link(s) to the issue(s) around that would be good to see.

@NickM-27
Copy link
Sponsor Collaborator

There is no way for a user to specify sensitivity, this is one of those things that is better for frigate to handle internally and make improvements to become smarter. The docs to explain a certain value and what that value means would be very long and likely complicated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants