ONNXRuntimeAdapterForFasterRCNN#

class ONNXRuntimeAdapterForFasterRCNN[source]#

Bases: ONNXRuntimeAdapter

TorchVision Faster RCNN model exported as ONNX

__init__(ort_session: ort.InferenceSession) None#

Constructor.

Parameters:

ort_session (ort.InferenceSession) – ONNX-runtime InferenceSession.

Return type:

None

Methods

__init__(ort_session)

Constructor.

from_file(path[, providers])

Construct from file.

__init__(ort_session: ort.InferenceSession) None#

Constructor.

Parameters:

ort_session (ort.InferenceSession) – ONNX-runtime InferenceSession.

Return type:

None

classmethod from_file(path: str, providers: list[str] | None = None) Self#

Construct from file.

Parameters:
  • path (str) – Path to a .onnx file.

  • providers (list[str] | None) – ONNX-runtime execution providers. See onnxruntime documentation for more details. Defaults to None.

Returns:

An ONNXRuntimeAdapter instance.

Return type:

ONNXRuntimeAdapter