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

Visualize / exaggerate the single pixel at the bottom of the detection box used for zones #3911

Open
bagobones opened this issue Sep 23, 2022 · 6 comments
Labels
enhancement New feature or request pinned

Comments

@bagobones
Copy link

bagobones commented Sep 23, 2022

Describe what you are trying to accomplish and why in non technical terms
The documentation states that zones are determined only by a single pixel at the bottom of the object. I suggest adding a dot/square/crosshair at the bottom of every detection bounding box to help call this out.

Describe the solution you'd like
I suggest adding a dot/square/crosshair at the bottom of every detection bounding box to help show how a zone detection was made.

I personally keep forgetting that the zone needs to basically be at the FEET of the object to work and at various camera angles this creates some interesting problems where I wish zone detection was based on the box clipping the object instead of a single pixel.

@bagobones bagobones added the enhancement New feature or request label Sep 23, 2022
@NickM-27
Copy link
Sponsor Collaborator

Yeah that's probably a good idea to be a reminder.

I also have a PR up that adds configuration to make it the top center, left center, right center, or bottom center

@bagobones
Copy link
Author

I also have a PR up that adds configuration to make it the top center, left center, right center, or bottom center

Even more important to visualize it then.. Sounds like a nice option to have.

Is a center of object also possible? It would be useful for heavily overhead views.

@andrey-skat
Copy link

andrey-skat commented Feb 4, 2024

I wish zone detection was based on the box clipping the object instead of a single pixel.

I agree. It would likely be more accurate considering that bounding boxes don't always perfectly align with objects.
For example, we could set it to only record events if a zone covers a quarter (or a third, or option in settings) of the detected object. This method would simplify masking as well. Currently, an event can be triggered if even one pixel goes outside the mask

@blakeblackshear
Copy link
Owner

It would likely be more accurate considering that bounding boxes don't always perfectly align with objects.
For example, we could set it to only record events if a zone covers a quarter (or a third, or option in settings) of the detected object

This would be far less precise and almost impossible to use for cameras mounted at a front door. It started this way and it was almost useless.

@andrey-skat
Copy link

In my case it ends up something like this :)
изображение
изображение

Maybe it can be per-camera setting? Something like in_zone_method: [bottom_center_point|area_fill]? The center of the object is also good, but it seems like this is a specific case of 25-50% object filling

@arunes11
Copy link

It would likely be more accurate considering that bounding boxes don't always perfectly align with objects.
For example, we could set it to only record events if a zone covers a quarter (or a third, or option in settings) of the detected object

This would be far less precise and almost impossible to use for cameras mounted at a front door. It started this way and it was almost useless.

For me the easiest solution to understand from the end user's point of view would be to be able to use the center point of the entire area surrounded by the bounding box (not a point on the bounding box).
The cat example above makes this clear.
It should also be inexpensive to calculate from the perspective of CPU cycles consumed.
For a possible modification
https://github.com/blakeblackshear/frigate/pull/3263
I would vote to allow this choice.
Anyway, congratulations on the great work you do!

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

No branches or pull requests

5 participants