otx.core.ov.models#

Module for otx.core.ov.models.

Classes

MMOVModel(model_path_or_model[, ...])

MMOVModel for OMZ model type.

OVModel([model_path_or_model, weight_path, ...])

OVModel class.

ParserMixin()

ParserMixin class.

class otx.core.ov.models.MMOVModel(model_path_or_model: str | Model, weight_path: str | None = None, inputs: Dict[str, str | List[str]] | List[str] | str | None = None, outputs: Dict[str, str | List[str]] | List[str] | str | None = None, *args, **kwargs)[source]#

Bases: OVModel, ParserMixin

MMOVModel for OMZ model type.

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(inputs, gt_label=None)[source]#

Function forward.

class otx.core.ov.models.OVModel(model_path_or_model: str | Model | None = None, weight_path: str | None = None, inputs: str | List[str] | None = None, outputs: str | List[str] | None = None, features_to_keep: List | None = None, remove_normalize: bool = False, merge_bn: bool = True, paired_bn: bool = True, init_weight: bool | Callable = False, verify_shape: bool = True)[source]#

Bases: Module

OVModel class.

Initializes internal Module state, shared by both nn.Module and ScriptModule.

static build_custom_inputs(graph, inputs: str | List[str])[source]#

Function build_custom_inputs.

static build_custom_outputs(graph, outputs)[source]#

Function build_custom_outputs.

static build_graph(model_path_or_model, weight_path=None)[source]#

Function build_graph.

static build_torch_module(graph)[source]#

Function build_torch_module.

static clean_up(graph, inputs=None, outputs=None)[source]#

Function clean_up.

forward(*args, **kwargs)[source]#

Function forward.

property features#

Property features.

property input_shapes#

Property input_shapes.

property inputs#

Property inputs.

property output_shapes#

Property output_shapes.

property outputs#

Property outputs.

class otx.core.ov.models.ParserMixin[source]#

Bases: object

ParserMixin class.

parse(model_path_or_model: str | Model, weight_path: str | None = None, inputs: Dict[str, str | List[str]] | List[str] | str | None = None, outputs: Dict[str, str | List[str]] | List[str] | str | None = None, parser: str | Callable | None = None, **kwargs) Tuple[str | List[str], str | List[str]][source]#

Parse function of ParserMixin class.

static parser(graph, **kwargs) Dict[str, List[str] | Dict[str, List[str]]][source]#

Function parser.