This module provides a Python API to underlying C++ API Operators.
Operator to get a video stream from an AJA capture card. |
|
Format conversion operator. |
|
Format conversion operator. |
|
|
Holoviz visualization operator using Holoviz module. |
Operator class to perform inference using an LSTM model. |
|
Multi-AI inference operator. |
|
Multi-AI post-processing operator. |
|
Members: |
|
Operator carrying out post-processing operations used in the ultrasound demo app. |
|
Operator class to perform inference using TensorRT. |
|
Operator performing post-processing for the endoscopy tool tracking demo. |
|
Operator class to record the video stream to a file. |
|
Operator class to replay a video stream from a file. |
|
iCardio Multi-AI demo application visualization operator. |
- class holoscan.operators.AJASourceOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator to get a video stream from an AJA capture card.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.AJASourceOp, fragment: holoscan.core._core.Fragment, device: str = '0', channel: holoscan.operators._operators.NTV2Channel = <NTV2Channel.NTV2_CHANNEL1: 0>, width: int = 1920, height: int = 1080, framerate: int = 60, rdma: bool = False, enable_overlay: bool = False, overlay_channel: holoscan.operators._operators.NTV2Channel = <NTV2Channel.NTV2_CHANNEL2: 1>, overlay_rdma: bool = True, name: str = 'aja_source') → None
Operator to get a video stream from an AJA capture card.
- Parameters
- fragmentFragment
- devicestr, optional
- channel
holoscan.operators.NTV2Channel
or int, optional - widthint, optional
- heightint, optional
- framerateint, optional
- rdmabool, optional
- enable_overlaybool, optional
- overlay_channel
holoscan.operators.NTV2Channel
or int, optional - overlay_rdmabool, optional
- namestr, optional
The fragment that the operator belongs to.
The device to target (e.g. “0” for device 0)
The camera NTV2Channel to use for output.
Width of the video stream.
Height of the video stream.
Frame rate of the video stream.
Boolean indicating whether RDMA is enabled.
Boolean indicating whether a separate overlay channel is enabled.
The camera NTV2Channel to use for overlay output.
Boolean indicating whether RDMA is enabled for the overlay.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.AJASourceOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.AJASourceOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.BayerDemosaicOp
Bases:
holoscan.gxf._gxf.GXFOperator
Format conversion operator.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: holoscan.operators._operators.BayerDemosaicOp) -> None
Format conversion operator.
__init__(self: holoscan.operators._operators.BayerDemosaicOp, fragment: holoscan.core._core.Fragment, pool: holoscan.resources._resources.Allocator, cuda_stream_pool: holoscan.resources._resources.CudaStreamPool, in_tensor_name: str = ‘’, out_tensor_name: str = ‘’, interpolation_mode: int = 0, bayer_grid_pos: int = 2, generate_alpha: bool = False, alpha_value: int = 255, name: str = ‘format_converter’) -> None
Format conversion operator.
- Parameters
- fragmentFragment
- pool
holoscan.resources.Allocator
- cuda_stream_pool
holoscan.resources.CudaStreamPool
- in_tensor_namestr, optional
- out_tensor_namestr, optional
- interpolation_modeint, optional
- bayer_grid_posint, optional
- generate_alphabool, optional
- alpha_valueint, optional
- namestr, optional
The fragment that the operator belongs to.
Memory pool allocator used by the operator.
CUDA Stream pool to create CUDA streams
The name of the input tensor.
The name of the output tensor.
The interpolation model to be used for demosaicing. Values available at: https://docs.nvidia.com/cuda/npp/group__typedefs__npp.html#ga2b58ebd329141d560aa4367f1708f191
The Bayer grid position (default of 2 = GBRG). Values available at: https://docs.nvidia.com/cuda/npp/group__typedefs__npp.html#ga5597309d6766fb2dffe155990d915ecb
Generate alpha channel.
Alpha value to be generated if generate_alpha is set to True.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.BayerDemosaicOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.BayerDemosaicOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.FormatConverterOp
Bases:
holoscan.gxf._gxf.GXFOperator
Format conversion operator.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.FormatConverterOp, fragment: holoscan.core._core.Fragment, pool: holoscan.resources._resources.Allocator, out_dtype: str, in_dtype: str = '', in_tensor_name: str = '', out_tensor_name: str = '', scale_min: float = 0.0, scale_max: float = 1.0, alpha_value: int = 255, resize_height: int = 0, resize_width: int = 0, resize_mode: int = 0, out_channel_order: List[int] = [], name: str = 'format_converter') → None
Format conversion operator.
- Parameters
- fragmentFragment
- pool
holoscan.resources.Allocator
- out_dtypestr
- in_dtypestr, optional
- in_tensor_namestr, optional
- out_tensor_namestr, optional
- scale_minfloat, optional
- scale_maxfloat, optional
- alpha_valueint, optional
- resize_heightint, optional
- resize_widthint, optional
- resize_modeint, optional
- channel_ordersequence of int
- namestr, optional
The fragment that the operator belongs to.
Memory pool allocator used by the operator.
Destination data type (e.g. “RGB888” or “RGBA8888”).
Source data type (e.g. “RGB888” or “RGBA8888”).
The name of the input tensor.
The name of the output tensor.
Output will be clipped to this minimum value.
Output will be clipped to this maximum value.
Unsigned integer in range [0, 255], indicating the alpha channel value to use when converting from RGB to RGBA.
Desired height for the (resized) output. Height will be unchanged if resize_height is 0.
Desired width for the (resized) output. Width will be unchanged if resize_width is 0.
Resize mode enum value corresponding to NPP’s nppiInterpolationMode (default=NPPI_INTER_CUBIC).
Sequence of integers describing how channel values are permuted.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.FormatConverterOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.FormatConverterOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.HolovizOp(fragment, allocator=None, receivers=[], tensors=[], color_lut=[], window_title='Holoviz', display_name='DP-0', width=1920, height=1080, framerate=60, use_exclusive_display=False, fullscreen=False, headless=False, enable_render_buffer_input=False, enable_render_buffer_output=False, name='holoviz_op')
Bases:
holoscan.operators._operators.HolovizOp
Holoviz visualization operator using Holoviz module.
This is a Vulkan-based visualizer.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
InputSpec
- class InputSpec
Bases:
pybind11_builtins.pybind11_object
- __init__(self: holoscan.operators._operators.HolovizOp.InputSpec, arg0: str, arg1: holoscan.operators._operators.HolovizOp.InputType) → None
- class InputType
Bases:
pybind11_builtins.pybind11_object
Members:
UNKNOWN
COLOR
COLOR_LUT
POINTS
LINES
LINE_STRIP
TRIANGLES
CROSSES
RECTANGLES
OVALS
TEXT
Attributes
value
-
COLOR =
-
COLOR_LUT =
-
CROSSES =
-
LINES =
-
LINE_STRIP =
-
OVALS =
-
POINTS =
-
RECTANGLES =
-
TEXT =
-
TRIANGLES =
-
UNKNOWN =
- __init__(self: holoscan.operators._operators.HolovizOp.InputType, value: int) → None
- property name
- property value
-
COLOR =
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.HolovizOp, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator, receivers: List[holoscan.core._core.IOSpec] = [], tensors: List[holoscan::ops::HolovizOp::InputSpec] = [], color_lut: List[List[float]] = [], window_title: str = 'Holoviz', display_name: str = 'DP-0', width: int = 1920, height: int = 1080, framerate: int = 60, use_exclusive_display: bool = False, fullscreen: bool = False, headless: bool = False, enable_render_buffer_input: bool = False, enable_render_buffer_output: bool = False, name: str = 'holoviz_op') → None
Holoviz visualization operator using Holoviz module.
This is a Vulkan-based visualizer.
- Parameters
- fragmentFragment
- allocator
holoscan.core.Allocator
, optional - receiverssequence of holoscan.core.IOSpec, optional
- tensorssequence of holoscan.core.InputSpec, optional
- color_lutlist of list of float, optional
- window_titlestr, optional
- display_namestr, optional
- widthint, optional
- heightint, optional
- framerateint, optional
- use_exclusive_displaybool, optional
- fullscreenbool, optional
- headlessbool, optional
- enable_render_buffer_inputbool, optional
- enable_render_buffer_outputbool, optional
- namestr, optional
The fragment that the operator belongs to.
Allocator used to allocate render buffer output. If None, will default to holoscan.core.UnboundedAllocator.
List of input receivers.
List of input tensors. ‘name’ is required, ‘type’ is optional (unknown, color, color_lut, points, lines, line_strip, triangles, crosses, rectangles, ovals, text).
Color lookup table for tensors of type ‘color_lut’. Should be shape (n_colors, 4).
Title on window canvas.
In exclusive mode, name of display to use as shown with xrandr.
Window width or display resolution width if in exclusive or fullscreen mode.
Window height or display resolution width if in exclusive or fullscreen mode.
Display framerate if in exclusive mode.
Enable exclusive display.
Enable fullscreen window.
Enable headless mode. No window is opened, the render buffer is output to port render_buffer_output.
If True, an additional input port, named render_buffer_input is added to the operator.
If True, an additional output port, named render_buffer_output is added to the operator.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.HolovizOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.HolovizOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.LSTMTensorRTInferenceOp(fragment, pool, cuda_stream_pool, model_file_path, engine_cache_dir, input_tensor_names, input_state_tensor_names, input_binding_names, output_tensor_names, output_state_tensor_names, output_binding_names, max_workspace_size, force_engine_update=False, verbose=True, enable_fp16_=True, name='lstm_inferer')
Bases:
holoscan.operators._operators.LSTMTensorRTInferenceOp
Operator class to perform inference using an LSTM model.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.LSTMTensorRTInferenceOp, fragment: holoscan.core._core.Fragment, input_tensor_names: List[str], output_tensor_names: List[str], input_binding_names: List[str], output_binding_names: List[str], model_file_path: str, engine_cache_dir: str, pool: holoscan.resources._resources.Allocator, cuda_stream_pool: holoscan.resources._resources.CudaStreamPool, plugins_lib_namespace: str = '', input_state_tensor_names: List[str] = [], output_state_tensor_names: List[str] = [], force_engine_update: bool = False, enable_fp16_: bool = False, verbose: bool = False, relaxed_dimension_check: bool = True, max_workspace_size: int = 67108864, max_batch_size: int = 1, name: str = 'lstm_tensor_rt_inference') → None
Operator class to perform inference using an LSTM model.
- Parameters
- fragmentFragment
- input_tensor_namessequence of str
- output_tensor_namessequence of str
- input_binding_namessequence of str
- output_binding_namessequence of str
- model_file_pathstr
- engine_cache_dirstr
- pool
holoscan.resources.Allocator
- cuda_stream_pool
holoscan.resources.CudaStreamPool
- plugins_lib_namespacestr
- input_state_tensor_namessequence of str, optional
- output_state_tensor_namessequence of str, optional
- force_engine_updatebool, optional
- enable_fp16bool, optional
- verbosebool, optional
- relaxed_dimension_checkbool, optional
- max_workspace_sizeint, optional
- max_batch_sizeint, optional
- namestr, optional
The fragment that the operator belongs to.
Names of input tensors in the order to be fed into the model.
Names of output tensors in the order to be retrieved from the model.
Names of input bindings as in the model in the same order of what is provided in input_tensor_names.
Names of output bindings as in the model in the same order of what is provided in output_tensor_names.
Path to the ONNX model to be loaded.
Path to a folder containing cached engine files to be serialized and loaded from.
Allocator instance for output tensors.
CudaStreamPool instance to allocate CUDA streams.
Namespace used to register all the plugins in this library.
Names of input state tensors that are used internally by TensorRT.
Names of output state tensors that are used internally by TensorRT.
Always update engine regardless of whether there is an existing engine file. Warning: this may take minutes to complete, so is False by default.
Enable inference with FP16 and FP32 fallback.
Enable verbose logging to the console.
Ignore dimensions of 1 for input tensor dimension check.
Size of working space in bytes.
Maximum possible batch size in case the first dimension is dynamic and used as batch size.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.LSTMTensorRTInferenceOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.LSTMTensorRTInferenceOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.MultiAIInferenceOp
Bases:
holoscan.gxf._gxf.GXFOperator
Multi-AI inference operator.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
DataMap
DataVecMap
- class DataMap
Bases:
pybind11_builtins.pybind11_object
Methods
get_map
(self)insert
(self)- __init__(self: holoscan.operators._operators.MultiAIInferenceOp.DataMap) → None
- get_map(self: holoscan.operators._operators.MultiAIInferenceOp.DataMap) → Dict[str, str]
- insert(self: holoscan.operators._operators.MultiAIInferenceOp.DataMap) → Dict[str, str]
- class DataVecMap
Bases:
pybind11_builtins.pybind11_object
Methods
get_map
(self)insert
(self)- __init__(self: holoscan.operators._operators.MultiAIInferenceOp.DataVecMap) → None
- get_map(self: holoscan.operators._operators.MultiAIInferenceOp.DataVecMap) → Dict[str, List[str]]
- insert(self: holoscan.operators._operators.MultiAIInferenceOp.DataVecMap) → Dict[str, List[str]]
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.MultiAIInferenceOp, fragment: holoscan.core._core.Fragment, backend: str, allocator: holoscan.resources._resources.Allocator, inference_map: dict, model_path_map: dict, pre_processor_map: dict, in_tensor_names: List[str] = [''], out_tensor_names: List[str] = [''], infer_on_cpu: bool = False, parallel_inference: bool = True, input_on_cuda: bool = True, output_on_cuda: bool = True, transmit_on_cuda: bool = True, enable_fp16: bool = False, is_engine_path: bool = False, name: str = 'multi_ai_inference') → None
Multi-AI inference operator.
- Parameters
- fragmentFragment
- backend{“trt”, “onnxrt”}
- allocator
holoscan.resources.Allocator
- inference_map
holoscan.operators.MultiAIInferenceOp.DataMap
- model_path_map
holoscan.operators.MultiAIInferenceOp.DataMap
- pre_processor_map
holoscan.operators.MultiAIInferenceOp::DataVecMap
- in_tensor_namessequence of str, optional
- out_tensor_namessequence of str, optional
- infer_on_cpubool, optional
- parallel_inferencebool, optional
- input_on_cudabool, optional
- output_on_cudabool, optional
- transmit_on_cudabool, optional
- enable_fp16bool, optional
- is_engine_pathbool, optional
- namestr, optional
The fragment that the operator belongs to.
Backend to use for inference. Set “trt” for TensorRT and “onnxrt” for the ONNX runtime.
Memory allocator to use for the output.
Tensor to model map.
Path to the ONNX model to be loaded.
Pre processed data to model map.
Input tensors.
Output tensors.
Whether to run the computation on the CPU instead of GPU.
Whether to enable parallel execution.
Whether the input buffer is on the GPU.
Whether the output buffer is on the GPU.
Whether to transmit the message on the GPU.
Use 16-bit floating point computations.
Whether the input model path mapping is for trt engine files
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.MultiAIInferenceOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.MultiAIInferenceOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.MultiAIPostprocessorOp
Bases:
holoscan.gxf._gxf.GXFOperator
Multi-AI post-processing operator.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
DataMap
DataVecMap
- class DataMap
Bases:
pybind11_builtins.pybind11_object
Methods
get_map
(self)insert
(self)- __init__(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataMap) → None
- get_map(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataMap) → Dict[str, str]
- insert(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataMap) → Dict[str, str]
- class DataVecMap
Bases:
pybind11_builtins.pybind11_object
Methods
get_map
(self)insert
(self)- __init__(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataVecMap) → None
- get_map(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataVecMap) → Dict[str, List[str]]
- insert(self: holoscan.operators._operators.MultiAIPostprocessorOp.DataVecMap) → Dict[str, List[str]]
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.MultiAIPostprocessorOp, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator, process_operations: dict, processed_map: dict, in_tensor_names: List[str] = [''], out_tensor_names: List[str] = [''], input_on_cuda: bool = False, output_on_cuda: bool = False, transmit_on_cuda: bool = False, name: str = 'multi_ai_postprocessor') → None
Multi-AI post-processing operator.
- Parameters
- fragmentFragment
- allocator
holoscan.resources.Allocator
- post_processor_map
holoscan.operators.MultiAIPostprocessorOp.DataVecMap
- process_operations
holoscan.operators.MultiAIPostprocessorOp.DataVecMap
- processed_map
holoscan.operators.MultiAIPostprocessorOp::DataMap
- in_tensor_namessequence of str, optional
- out_tensor_namessequence of str, optional
- input_on_cudabool, optional
- output_on_cudabool, optional
- transmit_on_cudabool, optional
- namestr, optional
The fragment that the operator belongs to.
Memory allocator to use for the output.
All post processor settings for each model.
Operations in sequence on tensors.
Input-output tensor mapping.
Names of input tensors in the order to be fed into the operator.
Names of output tensors in the order to be fed into the operator.
Whether the input buffer is on the GPU.
Whether the output buffer is on the GPU.
Whether to transmit the message on the GPU.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.MultiAIPostprocessorOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.MultiAIPostprocessorOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.NTV2Channel
Bases:
pybind11_builtins.pybind11_object
Members:
NTV2_CHANNEL1
NTV2_CHANNEL2
NTV2_CHANNEL3
NTV2_CHANNEL4
NTV2_CHANNEL5
NTV2_CHANNEL6
NTV2_CHANNEL7
NTV2_CHANNEL8
NTV2_MAX_NUM_CHANNELS
NTV2_CHANNEL_INVALID
Attributes
value
-
NTV2_CHANNEL1 =
-
NTV2_CHANNEL2 =
-
NTV2_CHANNEL3 =
-
NTV2_CHANNEL4 =
-
NTV2_CHANNEL5 =
-
NTV2_CHANNEL6 =
-
NTV2_CHANNEL7 =
-
NTV2_CHANNEL8 =
-
NTV2_CHANNEL_INVALID =
-
NTV2_MAX_NUM_CHANNELS =
- __init__(self: holoscan.operators._operators.NTV2Channel, value: int) → None
- property name
- property value
-
NTV2_CHANNEL1 =
- class holoscan.operators.SegmentationPostprocessorOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator carrying out post-processing operations used in the ultrasound demo app.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Operator initialization method.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.SegmentationPostprocessorOp, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator, in_tensor_name: str = '', network_output_type: str = 'softmax', data_format: str = 'hwc', name: str = 'segmentation_postprocessor') → None
Operator carrying out post-processing operations used in the ultrasound demo app.
- Parameters
- fragmentFragment
- allocator
holoscan.resources.Allocator
- in_tensor_namestr, optional
- network_output_typestr, optional
- data_formatstr, optional
- namestr, optional
The fragment that the operator belongs to.
Memory allocator to use for the output.
Name of the input tensor.
Network output type (e.g. ‘softmax’).
Data format of network output.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.core._core.Operator) → None
Operator initialization method.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.SegmentationPostprocessorOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.TensorRTInferenceOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator class to perform inference using TensorRT.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.TensorRTInferenceOp, fragment: holoscan.core._core.Fragment, model_file_path: str, engine_cache_dir: str, input_tensor_names: List[str], input_binding_names: List[str], output_tensor_names: List[str], output_binding_names: List[str], pool: holoscan.resources._resources.Allocator, cuda_stream_pool: holoscan.resources._resources.CudaStreamPool, plugins_lib_namespace: str = '', force_engine_update: bool = False, max_workspace_size: int = 67108864, max_batch_size: int = 1, enable_fp16_: bool = False, relaxed_dimension_check: bool = True, verbose: bool = False, name: str = 'tensor_rt_inference') → None
Operator class to perform inference using TensorRT.
- Parameters
- fragmentFragment
- model_file_pathstr
- engine_cache_dirstr
- input_tensor_namessequence of str
- input_binding_namessequence of str
- output_tensor_namessequence of str
- output_binding_namessequence of str
- pool
holoscan.resources.Allocator
- cuda_stream_pool
holoscan.resources.CudaStreamPool
- plugins_lib_namespacestr
- force_engine_updatebool, optional
- max_workspace_sizeint, optional
- max_batch_sizeint, optional
- enable_fp16bool, optional
- relaxed_dimension_checkbool, optional
- verbosebool, optional
- namestr, optional
The fragment that the operator belongs to.
Path to the ONNX model to be loaded.
Path to a folder containing cached engine files to be serialized and loaded from.
Names of input tensors in the order to be fed into the model.
Names of input bindings as in the model in the same order of what is provided in input_tensor_names.
Names of output tensors in the order to be retrieved from the model.
Names of output bindings as in the model in the same order of what is provided in output_tensor_names.
Allocator instance for output tensors.
CudaStreamPool instance to allocate CUDA streams.
Namespace used to register all the plugins in this library.
Always update engine regardless of whether there is an existing engine file. Warning: this may take minutes to complete, so is False by default.
Size of working space in bytes.
Maximum possible batch size in case the first dimension is dynamic and used as batch size.
Enable inference with FP16 and FP32 fallback.
Ignore dimensions of 1 for input tensor dimension check.
Enable verbose logging to the console.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.TensorRTInferenceOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.TensorRTInferenceOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.ToolTrackingPostprocessorOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator performing post-processing for the endoscopy tool tracking demo.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Operator initialization method.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.ToolTrackingPostprocessorOp, fragment: holoscan.core._core.Fragment, device_allocator: holoscan.resources._resources.Allocator, host_allocator: holoscan.resources._resources.Allocator, min_prob: float = 0.5, overlay_img_colors: List[List[float]] = [[0.11999999731779099, 0.4699999988079071, 0.7099999785423279], [0.20000000298023224, 0.6299999952316284, 0.17000000178813934], [0.8899999856948853, 0.10000000149011612, 0.10999999940395355], [1.0, 0.5, 0.0], [0.41999998688697815, 0.23999999463558197, 0.6000000238418579], [0.6899999976158142, 0.3499999940395355, 0.1599999964237213], [0.6499999761581421, 0.8100000023841858, 0.8899999856948853], [0.699999988079071, 0.8700000047683716, 0.5400000214576721], [0.9800000190734863, 0.6000000238418579, 0.6000000238418579], [0.9900000095367432, 0.75, 0.4399999976158142], [0.7900000214576721, 0.699999988079071, 0.8399999737739563], [1.0, 1.0, 0.6000000238418579]], name: str = 'tool_tracking_postprocessor') → None
Operator performing post-processing for the endoscopy tool tracking demo.
- Parameters
- fragmentFragment
- device_allocator
holoscan.resources.Allocator
- host_allocator
holoscan.resources.Allocator
- min_probfloat, optional
- overlay_img_colorssequence of sequence of float, optional
- namestr, optional
The fragment that the operator belongs to.
Output allocator used on the device side.
Output allocator used on the host side.
Minimum probability (in range [0, 1]).
Color of the image overlays, a list of RGB values with components between 0 and 1.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.core._core.Operator) → None
Operator initialization method.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.ToolTrackingPostprocessorOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.VideoStreamRecorderOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator class to record the video stream to a file.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.VideoStreamRecorderOp, fragment: holoscan.core._core.Fragment, directory: str, basename: str, flush_on_tick: bool = False, name: str = 'recorder') → None
Operator class to record the video stream to a file.
- Parameters
- fragmentFragment
- directorystr
- basenamestr
- flush_on_tickbool, optional
- namestr, optional
The fragment that the operator belongs to.
Directory path for storing files.
User specified file name without extension.
Flushes output buffer on every tick when True.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.VideoStreamRecorderOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.VideoStreamRecorderOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.VideoStreamReplayerOp
Bases:
holoscan.gxf._gxf.GXFOperator
Operator class to replay a video stream from a file.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.VideoStreamReplayerOp, fragment: holoscan.core._core.Fragment, directory: str, basename: str, batch_size: int = 1, ignore_corrupted_entities: bool = True, frame_rate: float = 1.0, realtime: bool = True, repeat: bool = False, count: int = 0, name: str = 'format_converter') → None
Operator class to replay a video stream from a file.
- Parameters
- fragmentFragment
- directorystr
- basenamestr
- batch_sizeint, optional
- ignore_corrupted_entitiesbool, optional
- frame_ratefloat, optional
- realtimebool, optional
- repeatbool, optional
- countint, optional
- namestr, optional
The fragment that the operator belongs to.
Directory path for reading files from.
User specified file name without extension.
Number of entities to read and publish for one tick.
If an entity could not be deserialized, it is ignored by default; otherwise a failure is generated.
Frame rate to replay. If zero value is specified, it follows timings in timestamps.
Playback video in realtime, based on frame_rate or timestamps.
Repeat video stream in a loop.
Number of frame counts to playback. If zero value is specified, it is ignored. If the count is less than the number of frames in the video, it would finish early.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.VideoStreamReplayerOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.VideoStreamReplayerOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.
- class holoscan.operators.VisualizerICardioOp
Bases:
holoscan.gxf._gxf.GXFOperator
iCardio Multi-AI demo application visualization operator.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
The fragment that the operator belongs to.
The GXF component ID.
The GXF context of the component.
The GXF entity ID.
The GXF type name of the resource.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
Methods
Members:
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Initialize the operator.
setup
(self, spec)Define the operator specification.
start
(self)Operator start method.
stop
(self)Operator stop method.
- class OperatorType
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
Attributes
value
-
GXF =
-
NATIVE =
- __init__(self: holoscan.core._core.Operator.OperatorType, value: int) → None
- property name
- property value
-
GXF =
- __init__(self: holoscan.operators._operators.VisualizerICardioOp, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator, in_tensor_names: List[str], out_tensor_names: List[str], input_on_cuda: bool = False, name: str = 'visualizer_icardio') → None
iCardio Multi-AI demo application visualization operator.
- Parameters
- fragmentFragment
- allocator
holoscan.resources.Allocator
- in_tensor_namessequence of str, optional
- out_tensor_namessequence of str, optional
- input_on_cudabool, optional
- namestr, optional
The fragment that the operator belongs to.
Memory allocator to use for the output.
Names of input tensors in the order to be fed into the operator.
Names of output tensors in the order to be fed into the operator.
Boolean indicating whether the input tensors are on the GPU.
The name of the operator.
- add_arg(*args, **kwargs)
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Overloaded function.
Add an argument to the component.
Add a list of arguments to the component.
- property args
The list of arguments associated with the component.
- Returns
- arglist
holoscan.core.ArgList
- arglist
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) → None
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions
Conditions associated with the operator.
- property fragment
The fragment that the operator belongs to.
- Returns
- name
holoscan.core.Fragment
- name
- property gxf_cid
The GXF component ID.
- property gxf_context
The GXF context of the component.
- property gxf_eid
The GXF entity ID.
- property gxf_typename
The GXF type name of the resource.
- Returns
- str
The GXF type name of the resource
- property id
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (
holoscan.gxf.GXFExecutor
), the identifier is set to the GXF component ID.- Returns
- idint
- initialize(self: holoscan.operators._operators.VisualizerICardioOp) → None
Initialize the operator.
This method is called only once when the operator is created for the first time, and uses a light-weight initialization.
- property name
The name of the operator.
- Returns
- namestr
- property operator_type
The operator type.
holoscan.core.Operator.OperatorType
enum representing the type of the operator. The two types currently implemented are native and GXF.- property resources
Resources associated with the operator.
- setup(self: holoscan.operators._operators.VisualizerICardioOp, spec: holoscan.core._core.OperatorSpec) → None
Define the operator specification.
- Parameters
- spec
holoscan.core.OperatorSpec
The operator specification.
- spec
- property spec
- start(self: holoscan.core._core.Operator) → None
Operator start method.
- stop(self: holoscan.core._core.Operator) → None
Operator stop method.