mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-13 04:25:32 +08:00
feat(compressors): add object scoring and selection for SAM masks
This commit is contained in:
27
mini-nav/compressors/object_score/config.py
Normal file
27
mini-nav/compressors/object_score/config.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MaskScoringConfig:
|
||||
min_area_ratio: float = 0.003
|
||||
max_area_ratio: float = 0.70
|
||||
max_aspect_ratio: float = 6.0
|
||||
min_fill_ratio_hard: float = 0.08
|
||||
max_components: int = 6
|
||||
min_largest_component_ratio: float = 0.60
|
||||
reject_edge_touch_count: int = 4
|
||||
reject_large_edge_touch_count: int = 3
|
||||
reject_large_edge_area_ratio: float = 0.25
|
||||
|
||||
area_score_low: float = 0.02
|
||||
area_score_high: float = 0.35
|
||||
fill_score_low: float = 0.25
|
||||
fill_score_high: float = 0.90
|
||||
soft_aspect_ratio: float = 2.5
|
||||
hole_penalty_step: float = 0.05
|
||||
max_hole_penalty_count: int = 5
|
||||
|
||||
weight_area: float = 0.35
|
||||
weight_shape: float = 0.25
|
||||
weight_fragment: float = 0.25
|
||||
weight_boundary: float = 0.15
|
||||
Reference in New Issue
Block a user