update for best percentage

This commit is contained in:
Josh Hawkins 2025-02-09 15:33:51 -06:00
parent 8ef88f7e73
commit 1149e9ec6f
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ False positives can also be reduced by filtering a detection based on its shape.
### Object Area ### Object Area
`min_area` and `max_area` filter on the area of an objects bounding box and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter. These values can either be in pixels or as a percentage of the frame (where 0.01 represents 1% of the frame and 0.99 represents 99% of the frame). `min_area` and `max_area` filter on the area of an objects bounding box and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter. These values can either be in pixels or as a percentage of the frame (for example, 0.12 represents 12% of the frame).
### Object Proportions ### Object Proportions

View File

@ -311,10 +311,10 @@ objects:
filters: filters:
person: person:
# Optional: minimum size of the bounding box for the detected object (default: 0). # Optional: minimum size of the bounding box for the detected object (default: 0).
# Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.0001 to 0.99). # Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.000001 to 0.99).
min_area: 5000 min_area: 5000
# Optional: maximum size of the bounding box for the detected object (default: 24000000). # Optional: maximum size of the bounding box for the detected object (default: 24000000).
# Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.0001 to 0.99). # Can be specified as an integer for width*height in pixels or as a decimal representing the percentage of the frame (0.000001 to 0.99).
max_area: 100000 max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0) # Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5 min_ratio: 0.5

View File

@ -13,11 +13,11 @@ DEFAULT_TRACKED_OBJECTS = ["person"]
class FilterConfig(FrigateBaseModel): class FilterConfig(FrigateBaseModel):
min_area: Union[int, float] = Field( min_area: Union[int, float] = Field(
default=0, default=0,
title="Minimum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.01 and 0.99).", title="Minimum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99).",
) )
max_area: Union[int, float] = Field( max_area: Union[int, float] = Field(
default=24000000, default=24000000,
title="Maximum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.01 and 0.99).", title="Maximum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99).",
) )
min_ratio: float = Field( min_ratio: float = Field(
default=0, default=0,