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

Draw motion masks under boxes in Debug view #11592

Closed
jftanner opened this issue May 28, 2024 · 5 comments · Fixed by #11598
Closed

Draw motion masks under boxes in Debug view #11592

jftanner opened this issue May 28, 2024 · 5 comments · Fixed by #11598
Labels
enhancement New feature or request

Comments

@jftanner
Copy link
Contributor

Describe what you are trying to accomplish and why in non technical terms
I am trying to use the debug tools to set up masks and zones in relation to bounding boxes. But this is sometimes difficult when a motion mask covers the boxes that I'm trying to see.

Describe the solution you'd like
I would like the motion mask to be drawn under the other overlayed content such as bounding boxes. This would make it easier to see the boxes, while still being able to see the mask.

Describe alternatives you've considered
An alternative might be to draw them as semi-transparent areas, so that things under them are still visible. But I imagine that would likely be more difficult.

Additional context
For example, in this (cropped for privacy) screenshot, the motion mask obscures the bounding box:
image

(That's not a great example, since I can clearly see what the object is, and where the middle center point is, but it's the best example I have without sharing pets or people.)

@jftanner jftanner added the enhancement New feature or request label May 28, 2024
@hawkeye217 hawkeye217 reopened this May 28, 2024
@NickM-27
Copy link
Sponsor Collaborator

objects that are detected and motion masks are not related, I don't think that this makes sense

@hawkeye217
Copy link
Collaborator

This is a little bit of a strange request, as motion masks are mostly irrelevant to bounding boxes. Motion masks are used to prevent unwanted motion in areas of your scene from triggering object detection, like moving trees or a camera timestamp. Over-masking will make it more difficult for Frigate to track objects.

@jftanner
Copy link
Contributor Author

Even if they're not related, I often want to be able to see all the settings on a particular camera. Needing to turn one off overlay in order to see a different one just adds extra steps.

My assumption (though perhaps incorrect) is that this would only be a matter of changing the order in which the elements are drawn. Though, admittedly, I don't know how it works. I should go find out. If it's as easy as I would think, I'll open a PR. If not, I'll close the issue.

@jftanner
Copy link
Contributor Author

Yup, found it: https://github.com/blakeblackshear/frigate/blob/dev/frigate/object_processing.py#L625

Pretty sure I just need to move that if statement so that it draws first. I'll submit a PR when I'm at a computer I can use for that. :)

@jftanner
Copy link
Contributor Author

Tested by editing the code in my deployed docker container:
image

jftanner added a commit to jftanner/frigate that referenced this issue May 28, 2024
This draws the motion mask before the other overlay elements (such as bounding boxes), so that they are still visible. Fixes blakeblackshear#11592
@NickM-27 NickM-27 linked a pull request May 28, 2024 that will close this issue
NickM-27 pushed a commit that referenced this issue May 28, 2024
This draws the motion mask before the other overlay elements (such as bounding boxes), so that they are still visible. Fixes #11592
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

Successfully merging a pull request may close this issue.

3 participants