Initialize method. Args: area_budget: Maximum pixel area for 'area_budget' resize mode. When provided, BSSLoader will downscale images so that width * height <= area_budget (with alignment applied). W
(
self,
area_budget: Optional[int] = None,
align: int = 1,
logger: Optional[logging.Logger] = None,
)
| 21 | """ |
| 22 | |
| 23 | def __init__( |
| 24 | self, |
| 25 | area_budget: Optional[int] = None, |
| 26 | align: int = 1, |
| 27 | logger: Optional[logging.Logger] = None, |
| 28 | ): |
| 29 | """Initialize method. |
| 30 | |
| 31 | Args: |
| 32 | area_budget: Maximum pixel area for 'area_budget' resize mode. |
| 33 | When provided, BSSLoader will downscale images so that |
| 34 | width * height <= area_budget (with alignment applied). |
| 35 | When None, images are loaded at native GT resolution. |
| 36 | align: Alignment requirement (output dims must be multiples of this) |
| 37 | logger: Optional logger instance |
| 38 | """ |
| 39 | |
| 40 | if area_budget is not None: |
| 41 | self.resize_context = ResizeContext( |
| 42 | mode='area_budget', align=align, area_budget=area_budget |
| 43 | ) |
| 44 | else: |
| 45 | self.resize_context = ResizeContext(mode='none') |
| 46 | |
| 47 | self.align = align |
| 48 | self.logger = logger |
| 49 | |
| 50 | @abstractmethod |
| 51 | def process_scene(self, gt_artifact: BSSArtifact) -> Dict[str, Any]: |
nothing calls this directly
no test coverage detected