diff --git a/config/dataset_config.py b/config/dataset_config.py index 346c0aa..c0990d6 100644 --- a/config/dataset_config.py +++ b/config/dataset_config.py @@ -11,6 +11,7 @@ class DatasetCommonConfig(BaseModel): device: str = "cuda:0" # Device used for training/testing (e.g., 'cpu' or 'cuda') use_amp: bool = False # Flag to use Automatic Mixed Precision (AMP) roi_size: int = 512 # The size of the square window for cropping + remove_boundary_objects: bool = True # Flag to remove boundary objects when testing masks_subdir: str = "" # Subdirectory where the required masks are located, e.g. 'masks/cars' predictions_dir: str = "." # Directory to save predictions pretrained_weights: str = "" # Path to pretrained weights diff --git a/core/segmentator.py b/core/segmentator.py index 5cc9151..a4b22ec 100644 --- a/core/segmentator.py +++ b/core/segmentator.py @@ -648,6 +648,8 @@ class CellSegmentator: logger.info(f"├─ Seed: {common.seed}") logger.info(f"├─ Device: {common.device}") logger.info(f"├─ Use AMP: {'yes' if common.use_amp else 'no'}") + logger.info(f"├─ ROI size: {common.roi_size}") + logger.info(f"├─ Remove boundary objects: {'yes' if common.remove_boundary_objects else 'no'}") logger.info(f"├─ Masks subdirectory: {common.masks_subdir}") logger.info(f"└─ Predictions output dir: {common.predictions_dir}") logger.info(f"├─ Pretrained weights: {common.pretrained_weights or 'None'}") @@ -1124,7 +1126,7 @@ class CellSegmentator: batch_prediction=predicted_masks, iou_threshold=iou_threshold, return_error_masks=return_error_masks, - remove_boundary_objects=True + remove_boundary_objects=self._dataset_setup.common.remove_boundary_objects ) tp = stats["tp"] fp = stats["fp"]