otx.core.utils.tile_merge#
OTX tile merge module.
Classes
|
Detection tile merge. |
|
Instance segmentation tile merge. |
|
Semantic segmentation tile merge. |
|
Base class for tile merge. |
- class otx.core.utils.tile_merge.DetectionTileMerge(img_infos: list[ImageInfo], num_classes: int, tile_config: TileConfig, explain_mode: bool = False)[source]#
Bases:
TileMerge
Detection tile merge.
- class otx.core.utils.tile_merge.InstanceSegTileMerge(img_infos: list[ImageInfo], num_classes: int, tile_config: TileConfig, explain_mode: bool = False)[source]#
Bases:
TileMerge
Instance segmentation tile merge.
- get_saliency_maps_from_masks(labels: Tensor, scores: Tensor, masks: None | Tensor, num_classes: int) ndarray [source]#
Average and normalize predicted masks in per-class.
- Returns:
Class-wise Saliency Maps. One saliency map per each class - [class_id, H, W]
- Return type:
np.array
- class otx.core.utils.tile_merge.SegmentationTileMerge(img_infos: list[ImageInfo], num_classes: int, tile_config: TileConfig, explain_mode: bool = False)[source]#
Bases:
TileMerge
Semantic segmentation tile merge.
- class otx.core.utils.tile_merge.TileMerge(img_infos: list[ImageInfo], num_classes: int, tile_config: TileConfig, explain_mode: bool = False)[source]#
Bases:
Generic
[T_OTXDataEntity
,T_OTXBatchPredEntity
]Base class for tile merge.
- Parameters:
img_infos (list[ImageInfo]) – Original image information before tiling.
num_classes (int) – Number of classes.
tile_config (TileConfig) – Tile configuration.
explain_mode (bool, optional) – Whether or not tiles have explain features. Default: False.