otx.core.model.rotated_detection#
Class definition for rotated detection model entity used in OTX.
Classes
|
Rotated Detection model compatible for OpenVINO IR Inference. |
|
Base class for the rotated detection models used in OTX. |
- 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.RotatedMaskRCNNModel(label_info: LabelInfoTypes, model_name: str, 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:
MaskRCNN
Base class for the rotated detection models used in OTX.
- predict_step(*args: torch.Any, **kwargs: torch.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