mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
28 lines
797 B
Python
28 lines
797 B
Python
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
|