otx.core.model.rotated_detection#

Class definition for rotated detection model entity used in OTX.

Classes

OVRotatedDetectionModel(model_name, ...)

Rotated Detection model compatible for OpenVINO IR Inference.

RotatedMaskRCNNEfficientNet(label_info, ...)

Rotated MaskRCNN model with EfficientNet backbone.

RotatedMaskRCNNModel(label_info, input_size, ...)

Base class for the rotated detection models used in OTX.

RotatedMaskRCNNResNet50(label_info, ...[, ...])

Rotated MaskRCNN model with ResNet50 backbone.

class otx.core.model.rotated_detection.OVRotatedDetectionModel(model_name: str, model_type: str = 'MaskRCNN', async_inference: bool = True, max_num_requests: int | None = None, use_throughput_mode: bool = True, model_api_configuration: dict[str, Any] | None = None, metric: MetricCallable = <function _rle_mean_ap_f_measure_callable>, **kwargs)[source]#

Bases: OVInstanceSegmentationModel

Rotated Detection model compatible for OpenVINO IR Inference.

It can consume OpenVINO IR model path or model name from Intel OMZ repository and create the OTX detection model compatible for OTX testing pipeline.

class otx.core.model.rotated_detection.RotatedMaskRCNNEfficientNet(label_info: LabelInfoTypes, input_size: tuple[int, int] = (1024, 1024), optimizer: OptimizerCallable = <function _default_optimizer_callable>, scheduler: LRSchedulerCallable | LRSchedulerListCallable = <function _default_scheduler_callable>, metric: MetricCallable = <function _rle_mean_ap_f_measure_callable>, torch_compile: bool = False, tile_config: TileConfig = TileConfig(enable_tiler=False, enable_adaptive_tiling=True, tile_size=(400, 400), overlap=0.2, iou_threshold=0.45, max_num_instances=1500, object_tile_ratio=0.03, sampling_ratio=1.0, with_full_img=False))[source]#

Bases: RotatedMaskRCNNModel, MaskRCNNEfficientNet

Rotated MaskRCNN model with EfficientNet backbone.

class otx.core.model.rotated_detection.RotatedMaskRCNNModel(label_info: LabelInfoTypes, input_size: tuple[int, int], optimizer: OptimizerCallable = <function _default_optimizer_callable>, scheduler: LRSchedulerCallable | LRSchedulerListCallable = <function _default_scheduler_callable>, metric: MetricCallable = <function _rle_mean_ap_f_measure_callable>, torch_compile: bool = False, tile_config: TileConfig = TileConfig(enable_tiler=False, enable_adaptive_tiling=True, tile_size=(400, 400), overlap=0.2, iou_threshold=0.45, max_num_instances=1500, object_tile_ratio=0.03, sampling_ratio=1.0, with_full_img=False))[source]#

Bases: MaskRCNN

Base class for the rotated detection models used in OTX.

predict_step(*args: Any, **kwargs: Any) InstanceSegBatchPredEntity[source]#

Predict step for rotated detection task.

Note: This method is overridden to convert masks to rotated bounding boxes.

Returns:

The predicted polygons (rboxes), scores, labels, masks.

Return type:

InstanceSegBatchPredEntity

class otx.core.model.rotated_detection.RotatedMaskRCNNResNet50(label_info: LabelInfoTypes, input_size: tuple[int, int] = (1024, 1024), optimizer: OptimizerCallable = <function _default_optimizer_callable>, scheduler: LRSchedulerCallable | LRSchedulerListCallable = <function _default_scheduler_callable>, metric: MetricCallable = <function _rle_mean_ap_f_measure_callable>, torch_compile: bool = False, tile_config: TileConfig = TileConfig(enable_tiler=False, enable_adaptive_tiling=True, tile_size=(400, 400), overlap=0.2, iou_threshold=0.45, max_num_instances=1500, object_tile_ratio=0.03, sampling_ratio=1.0, with_full_img=False))[source]#

Bases: RotatedMaskRCNNModel, MaskRCNNResNet50

Rotated MaskRCNN model with ResNet50 backbone.