holoscan-cu13 3.7.0__cp313-cp313-manylinux_2_35_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- holoscan_cu13-3.7.0.data/purelib/holoscan/__init__.py +135 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/cli/__main__.py +26 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/conditions/__init__.py +75 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/conditions/_conditions.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/core/__init__.py +799 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/core/_core.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/data_loggers/__init__.py +79 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/data_loggers/async_console_logger/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/data_loggers/async_console_logger/_async_console_logger.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/data_loggers/basic_console_logger/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/data_loggers/basic_console_logger/_basic_console_logger.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/decorator.py +662 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/executors/__init__.py +26 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/executors/_executors.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/graphs/__init__.py +32 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/graphs/_graphs.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/gxf/__init__.py +60 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/gxf/_gxf.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_holoscan_wrapper.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_holoscan_wrapper_lib.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_ucx_holoscan.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_ucx_holoscan_lib.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_app.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_core.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_cuda.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_http.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_logger.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_multimedia.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_rmm.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_sample.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_serialization.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_std.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libgxf_ucx.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoinfer_utils.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_core.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_data_loggers_async_console_logger.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_data_loggers_basic_console_logger.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_infer.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_infer_onnx_runtime.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_infer_torch.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_infer_utils.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_logger.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_async_ping_rx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_async_ping_tx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_bayer_demosaic.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_format_converter.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_gxf_codelet.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_holoviz.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_inference.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_inference_processor.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_ping_rx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_ping_tensor_rx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_ping_tensor_tx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_ping_tx.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_segmentation_postprocessor.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_test_ops.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_v4l2.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_video_stream_recorder.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_op_video_stream_replayer.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_pose_tree.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_profiler.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_spdlog_logger.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libholoscan_viz.so.3.7.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libucm.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libucp.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libucs.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libucs_signal.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libuct.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/libucxx.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/ucx/libucm_cuda.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/ucx/libuct_cma.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/ucx/libuct_cuda.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/lib/ucx/libucx_perftest_cuda.so.0.0.0 +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/logger/__init__.py +37 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/logger/_logger.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/network_contexts/__init__.py +28 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/network_contexts/_network_contexts.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/__init__.py +99 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/bayer_demosaic/__init__.py +24 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/bayer_demosaic/_bayer_demosaic.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/format_converter/__init__.py +23 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/format_converter/_format_converter.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/gxf_codelet/__init__.py +67 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/gxf_codelet/_gxf_codelet.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/holoviz/__init__.py +423 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/holoviz/_holoviz.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/inference/__init__.py +28 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/inference/_inference.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/inference_processor/__init__.py +23 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/inference_processor/_inference_processor.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_rx/__init__.py +45 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_tensor_rx/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_tensor_rx/_ping_tensor_rx.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_tensor_tx/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_tensor_tx/_ping_tensor_tx.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/ping_tx/__init__.py +46 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/segmentation_postprocessor/__init__.py +23 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/segmentation_postprocessor/_segmentation_postprocessor.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/test_ops/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/test_ops/_test_ops.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/v4l2_video_capture/__init__.py +23 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/v4l2_video_capture/_v4l2_video_capture.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/video_stream_recorder/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/video_stream_recorder/_video_stream_recorder.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/video_stream_replayer/__init__.py +22 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/operators/video_stream_replayer/_video_stream_replayer.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/pose_tree/__init__.py +271 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/pose_tree/_pose_tree.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/resources/__init__.py +171 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/resources/_resources.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/schedulers/__init__.py +32 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan/schedulers/_schedulers.cpython-313-aarch64-linux-gnu.so +0 -0
- holoscan_cu13-3.7.0.data/purelib/holoscan_cu13-3.7.0.pth +1 -0
- holoscan_cu13-3.7.0.dist-info/LICENSE.txt +202 -0
- holoscan_cu13-3.7.0.dist-info/METADATA +148 -0
- holoscan_cu13-3.7.0.dist-info/NOTICE.txt +191 -0
- holoscan_cu13-3.7.0.dist-info/NVIDIA-AI-PRODUCT-EULA.txt +243 -0
- holoscan_cu13-3.7.0.dist-info/README.md +35 -0
- holoscan_cu13-3.7.0.dist-info/RECORD +124 -0
- holoscan_cu13-3.7.0.dist-info/WHEEL +5 -0
- holoscan_cu13-3.7.0.dist-info/axle.lck +0 -0
- holoscan_cu13-3.7.0.dist-info/entry_points.txt +3 -0
- holoscan_cu13-3.7.0.dist-info/symlinks.txt +78 -0
- holoscan_cu13-3.7.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
from collections.abc import MutableMapping, Sequence
|
|
19
|
+
|
|
20
|
+
# BooleanCondition, Allocator, CudaStreamPool are all used as argument types so have to be imported
|
|
21
|
+
# before HolovizOp's __init__() can be called.
|
|
22
|
+
from holoscan.conditions import BooleanCondition # noqa: F401
|
|
23
|
+
from holoscan.core import IOSpec, io_type_registry
|
|
24
|
+
from holoscan.resources import Allocator, CudaStreamPool, UnboundedAllocator # noqa: F401
|
|
25
|
+
|
|
26
|
+
from ._holoviz import HolovizOp as _HolovizOp
|
|
27
|
+
from ._holoviz import Pose3D # noqa: F401
|
|
28
|
+
from ._holoviz import register_types as _register_types
|
|
29
|
+
|
|
30
|
+
# register methods for receiving or emitting list[HolovizOp.InputSpec] and camera pose types
|
|
31
|
+
_register_types(io_type_registry)
|
|
32
|
+
|
|
33
|
+
_holoviz_str_to_input_type = {
|
|
34
|
+
"unknown": _HolovizOp.InputType.UNKNOWN,
|
|
35
|
+
"color": _HolovizOp.InputType.COLOR,
|
|
36
|
+
"color_lut": _HolovizOp.InputType.COLOR_LUT,
|
|
37
|
+
"points": _HolovizOp.InputType.POINTS,
|
|
38
|
+
"lines": _HolovizOp.InputType.LINES,
|
|
39
|
+
"line_strip": _HolovizOp.InputType.LINE_STRIP,
|
|
40
|
+
"triangles": _HolovizOp.InputType.TRIANGLES,
|
|
41
|
+
"crosses": _HolovizOp.InputType.CROSSES,
|
|
42
|
+
"rectangles": _HolovizOp.InputType.RECTANGLES,
|
|
43
|
+
"ovals": _HolovizOp.InputType.OVALS,
|
|
44
|
+
"text": _HolovizOp.InputType.TEXT,
|
|
45
|
+
"depth_map": _HolovizOp.InputType.DEPTH_MAP,
|
|
46
|
+
"depth_map_color": _HolovizOp.InputType.DEPTH_MAP_COLOR,
|
|
47
|
+
"points_3d": _HolovizOp.InputType.POINTS_3D,
|
|
48
|
+
"lines_3d": _HolovizOp.InputType.LINES_3D,
|
|
49
|
+
"line_strip_3d": _HolovizOp.InputType.LINE_STRIP_3D,
|
|
50
|
+
"triangles_3d": _HolovizOp.InputType.TRIANGLES_3D,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_holoviz_str_to_image_format = {
|
|
54
|
+
"auto_detect": _HolovizOp.ImageFormat.AUTO_DETECT,
|
|
55
|
+
"r8_uint": _HolovizOp.ImageFormat.R8_UINT,
|
|
56
|
+
"r8_sint": _HolovizOp.ImageFormat.R8_SINT,
|
|
57
|
+
"r8_unorm": _HolovizOp.ImageFormat.R8_UNORM,
|
|
58
|
+
"r8_snorm": _HolovizOp.ImageFormat.R8_SNORM,
|
|
59
|
+
"r8_srgb": _HolovizOp.ImageFormat.R8_SRGB,
|
|
60
|
+
"r16_uint": _HolovizOp.ImageFormat.R16_UINT,
|
|
61
|
+
"r16_sint": _HolovizOp.ImageFormat.R16_SINT,
|
|
62
|
+
"r16_unorm": _HolovizOp.ImageFormat.R16_UNORM,
|
|
63
|
+
"r16_snorm": _HolovizOp.ImageFormat.R16_SNORM,
|
|
64
|
+
"r16_sfloat": _HolovizOp.ImageFormat.R16_SFLOAT,
|
|
65
|
+
"r32_uint": _HolovizOp.ImageFormat.R32_UINT,
|
|
66
|
+
"r32_sint": _HolovizOp.ImageFormat.R32_SINT,
|
|
67
|
+
"r32_sfloat": _HolovizOp.ImageFormat.R32_SFLOAT,
|
|
68
|
+
"r8g8b8_unorm": _HolovizOp.ImageFormat.R8G8B8_UNORM,
|
|
69
|
+
"r8g8b8_snorm": _HolovizOp.ImageFormat.R8G8B8_SNORM,
|
|
70
|
+
"r8g8b8_srgb": _HolovizOp.ImageFormat.R8G8B8_SRGB,
|
|
71
|
+
"r8g8b8a8_unorm": _HolovizOp.ImageFormat.R8G8B8A8_UNORM,
|
|
72
|
+
"r8g8b8a8_snorm": _HolovizOp.ImageFormat.R8G8B8A8_SNORM,
|
|
73
|
+
"r8g8b8a8_srgb": _HolovizOp.ImageFormat.R8G8B8A8_SRGB,
|
|
74
|
+
"r16g16b16a16_unorm": _HolovizOp.ImageFormat.R16G16B16A16_UNORM,
|
|
75
|
+
"r16g16b16a16_snorm": _HolovizOp.ImageFormat.R16G16B16A16_SNORM,
|
|
76
|
+
"r16g16b16a16_sfloat": _HolovizOp.ImageFormat.R16G16B16A16_SFLOAT,
|
|
77
|
+
"r32g32b32a32_sfloat": _HolovizOp.ImageFormat.R32G32B32A32_SFLOAT,
|
|
78
|
+
"d16_unorm": _HolovizOp.ImageFormat.D16_UNORM,
|
|
79
|
+
"x8_d24_unorm": _HolovizOp.ImageFormat.X8_D24_UNORM,
|
|
80
|
+
"d32_sfloat": _HolovizOp.ImageFormat.D32_SFLOAT,
|
|
81
|
+
"a2b10g10r10_unorm_pack32": _HolovizOp.ImageFormat.A2B10G10R10_UNORM_PACK32,
|
|
82
|
+
"a2r10g10b10_unorm_pack32": _HolovizOp.ImageFormat.A2R10G10B10_UNORM_PACK32,
|
|
83
|
+
"b8g8r8a8_unorm": _HolovizOp.ImageFormat.B8G8R8A8_UNORM,
|
|
84
|
+
"b8g8r8a8_srgb": _HolovizOp.ImageFormat.B8G8R8A8_SRGB,
|
|
85
|
+
"a8b8g8r8_unorm_pack32": _HolovizOp.ImageFormat.A8B8G8R8_UNORM_PACK32,
|
|
86
|
+
"a8b8g8r8_srgb_pack32": _HolovizOp.ImageFormat.A8B8G8R8_SRGB_PACK32,
|
|
87
|
+
"y8u8y8v8_422_unorm": _HolovizOp.ImageFormat.Y8U8Y8V8_422_UNORM,
|
|
88
|
+
"u8y8v8y8_422_unorm": _HolovizOp.ImageFormat.U8Y8V8Y8_422_UNORM,
|
|
89
|
+
"y8_u8v8_2plane_420_unorm": _HolovizOp.ImageFormat.Y8_U8V8_2PLANE_420_UNORM,
|
|
90
|
+
"y8_u8v8_2plane_422_unorm": _HolovizOp.ImageFormat.Y8_U8V8_2PLANE_422_UNORM,
|
|
91
|
+
"y8_u8_v8_3plane_420_unorm": _HolovizOp.ImageFormat.Y8_U8_V8_3PLANE_420_UNORM,
|
|
92
|
+
"y8_u8_v8_3plane_422_unorm": _HolovizOp.ImageFormat.Y8_U8_V8_3PLANE_422_UNORM,
|
|
93
|
+
"y16_u16v16_2plane_420_unorm": _HolovizOp.ImageFormat.Y16_U16V16_2PLANE_420_UNORM,
|
|
94
|
+
"y16_u16v16_2plane_422_unorm": _HolovizOp.ImageFormat.Y16_U16V16_2PLANE_422_UNORM,
|
|
95
|
+
"y16_u16_v16_3plane_420_unorm": _HolovizOp.ImageFormat.Y16_U16_V16_3PLANE_420_UNORM,
|
|
96
|
+
"y16_u16_v16_3plane_422_unorm": _HolovizOp.ImageFormat.Y16_U16_V16_3PLANE_422_UNORM,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
_holoviz_str_to_depth_map_render_mode = {
|
|
100
|
+
"points": _HolovizOp.DepthMapRenderMode.POINTS,
|
|
101
|
+
"lines": _HolovizOp.DepthMapRenderMode.LINES,
|
|
102
|
+
"triangles": _HolovizOp.DepthMapRenderMode.TRIANGLES,
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
_holoviz_str_to_yuv_model_conversion = {
|
|
106
|
+
"yuv_601": _HolovizOp.YuvModelConversion.YUV_601,
|
|
107
|
+
"yuv_709": _HolovizOp.YuvModelConversion.YUV_709,
|
|
108
|
+
"yuv_2020": _HolovizOp.YuvModelConversion.YUV_2020,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
_holoviz_str_to_yuv_range = {
|
|
112
|
+
"itu_full": _HolovizOp.YuvRange.ITU_FULL,
|
|
113
|
+
"itu_narrow": _HolovizOp.YuvRange.ITU_NARROW,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
_holoviz_str_to_chroma_location = {
|
|
117
|
+
"cosited_even": _HolovizOp.ChromaLocation.COSITED_EVEN,
|
|
118
|
+
"midpoint": _HolovizOp.ChromaLocation.MIDPOINT,
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_holoviz_str_to_color_space = {
|
|
122
|
+
"srgb_nonlinear": _HolovizOp.ColorSpace.SRGB_NONLINEAR,
|
|
123
|
+
"extended_srgb_linear": _HolovizOp.ColorSpace.EXTENDED_SRGB_LINEAR,
|
|
124
|
+
"bt2020_linear": _HolovizOp.ColorSpace.BT2020_LINEAR,
|
|
125
|
+
"hdr10_st2084": _HolovizOp.ColorSpace.HDR10_ST2084,
|
|
126
|
+
"pass_through": _HolovizOp.ColorSpace.PASS_THROUGH,
|
|
127
|
+
"bt709_linear": _HolovizOp.ColorSpace.BT709_LINEAR,
|
|
128
|
+
"auto": _HolovizOp.ColorSpace.AUTO,
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class HolovizOp(_HolovizOp):
|
|
133
|
+
def __init__(
|
|
134
|
+
self,
|
|
135
|
+
fragment,
|
|
136
|
+
*args,
|
|
137
|
+
allocator=None,
|
|
138
|
+
receivers=(),
|
|
139
|
+
tensors=(),
|
|
140
|
+
color_lut=(),
|
|
141
|
+
window_title="Holoviz",
|
|
142
|
+
display_name="DP-0",
|
|
143
|
+
width=1920,
|
|
144
|
+
height=1080,
|
|
145
|
+
framerate=60,
|
|
146
|
+
use_exclusive_display=False,
|
|
147
|
+
fullscreen=False,
|
|
148
|
+
headless=False,
|
|
149
|
+
framebuffer_srgb=False,
|
|
150
|
+
vsync=False,
|
|
151
|
+
display_color_space=_HolovizOp.ColorSpace.AUTO,
|
|
152
|
+
enable_render_buffer_input=False,
|
|
153
|
+
enable_render_buffer_output=False,
|
|
154
|
+
enable_depth_buffer_input=False,
|
|
155
|
+
enable_depth_buffer_output=False,
|
|
156
|
+
enable_camera_pose_output=False,
|
|
157
|
+
camera_pose_output_type="projection_matrix",
|
|
158
|
+
camera_eye=(0.0, 0.0, 1.0),
|
|
159
|
+
camera_look_at=(0.0, 0.0, 0.0),
|
|
160
|
+
camera_up=(0.0, 1.0, 0.0),
|
|
161
|
+
key_callback=None,
|
|
162
|
+
unicode_char_callback=None,
|
|
163
|
+
mouse_button_callback=None,
|
|
164
|
+
scroll_callback=None,
|
|
165
|
+
cursor_pos_callback=None,
|
|
166
|
+
framebuffer_size_callback=None,
|
|
167
|
+
window_size_callback=None,
|
|
168
|
+
font_path="",
|
|
169
|
+
cuda_stream_pool=None,
|
|
170
|
+
window_close_condition=None,
|
|
171
|
+
name="holoviz_op",
|
|
172
|
+
):
|
|
173
|
+
if allocator is None:
|
|
174
|
+
allocator = UnboundedAllocator(fragment)
|
|
175
|
+
|
|
176
|
+
receiver_iospecs = []
|
|
177
|
+
for receiver in receivers:
|
|
178
|
+
if isinstance(receiver, str):
|
|
179
|
+
continue # skip
|
|
180
|
+
# raise NotImpelementedError(
|
|
181
|
+
# "TODO(unknown): need to enable access to self.spec for the OperatorSpec" # noqa: FIX002
|
|
182
|
+
# )
|
|
183
|
+
# receiver = IOSpec(
|
|
184
|
+
# op_spec=self.spec,
|
|
185
|
+
# name=receiver,
|
|
186
|
+
# io_type=IOSpec.IOType.kInput
|
|
187
|
+
# )
|
|
188
|
+
elif not isinstance(receiver, IOSpec):
|
|
189
|
+
raise ValueError(
|
|
190
|
+
"receivers must be a string containing the receiver name or an IOSpec object."
|
|
191
|
+
)
|
|
192
|
+
if not receiver.io_type == IOSpec.IOType.kInput:
|
|
193
|
+
raise ValueError("IOType of receiver IOSpec objects must be 'kInput'")
|
|
194
|
+
receiver_iospecs.append(receiver)
|
|
195
|
+
|
|
196
|
+
tensor_input_specs = []
|
|
197
|
+
for tensor in tensors:
|
|
198
|
+
# if this already is an InputSpec, just append
|
|
199
|
+
if isinstance(tensor, _HolovizOp.InputSpec):
|
|
200
|
+
tensor_input_specs.append(tensor)
|
|
201
|
+
continue
|
|
202
|
+
|
|
203
|
+
# if this is a dict then create an InputSpec by processing the dict entries
|
|
204
|
+
if not isinstance(tensor, MutableMapping):
|
|
205
|
+
raise ValueError(
|
|
206
|
+
"Tensors must be a sequence of MutableMappings (e.g. list of dict)."
|
|
207
|
+
)
|
|
208
|
+
if "name" not in tensor or not isinstance(tensor["name"], str):
|
|
209
|
+
raise ValueError(
|
|
210
|
+
"Tensor dictionaries must contain key 'name' with a value that is a str."
|
|
211
|
+
)
|
|
212
|
+
if "type" not in tensor:
|
|
213
|
+
raise ValueError("tensor dictionaries must contain key 'type'")
|
|
214
|
+
valid_keys = {
|
|
215
|
+
"name",
|
|
216
|
+
"type",
|
|
217
|
+
"opacity",
|
|
218
|
+
"priority",
|
|
219
|
+
"image_format",
|
|
220
|
+
"color",
|
|
221
|
+
"line_width",
|
|
222
|
+
"point_size",
|
|
223
|
+
"text",
|
|
224
|
+
"yuv_model_conversion",
|
|
225
|
+
"yuv_range",
|
|
226
|
+
"x_chroma_location",
|
|
227
|
+
"y_chroma_location",
|
|
228
|
+
"depth_map_render_mode",
|
|
229
|
+
"views",
|
|
230
|
+
}
|
|
231
|
+
unrecognized_keys = set(tensor.keys()) - valid_keys
|
|
232
|
+
if unrecognized_keys:
|
|
233
|
+
raise ValueError(f"Unrecognized keys found in tensor: {unrecognized_keys}")
|
|
234
|
+
input_type = tensor["type"]
|
|
235
|
+
ispec = HolovizOp.InputSpec(tensor["name"], tensor["type"])
|
|
236
|
+
ispec.opacity = tensor.get("opacity", 1.0)
|
|
237
|
+
ispec.priority = tensor.get("priority", 0)
|
|
238
|
+
|
|
239
|
+
if "image_format" in tensor:
|
|
240
|
+
image_format = tensor["image_format"]
|
|
241
|
+
if isinstance(image_format, str):
|
|
242
|
+
image_format.lower()
|
|
243
|
+
if image_format not in _holoviz_str_to_image_format:
|
|
244
|
+
raise ValueError(f"unrecognized image_format name: {image_format}")
|
|
245
|
+
image_format = _holoviz_str_to_image_format[image_format]
|
|
246
|
+
elif not isinstance(input_type, _HolovizOp.ImageFormat):
|
|
247
|
+
raise ValueError(
|
|
248
|
+
"value corresponding to key 'image_format' must be either a "
|
|
249
|
+
"HolovizOp.ImageFormat object or one of the following "
|
|
250
|
+
f"strings: {tuple(_holoviz_str_to_image_format.keys())}"
|
|
251
|
+
)
|
|
252
|
+
ispec.image_format = image_format
|
|
253
|
+
|
|
254
|
+
if "color" in tensor:
|
|
255
|
+
color = tensor["color"]
|
|
256
|
+
if not isinstance(color, Sequence) or len(color) != 4:
|
|
257
|
+
raise ValueError(
|
|
258
|
+
"Colors must be specified as a sequence of 4 values: (R, G, B, A)."
|
|
259
|
+
)
|
|
260
|
+
color = list(map(float, color))
|
|
261
|
+
for val in color:
|
|
262
|
+
if val < 0.0 or val > 1.0:
|
|
263
|
+
raise ValueError("color values must be in range [0, 1]")
|
|
264
|
+
else:
|
|
265
|
+
color = (1.0,) * 4
|
|
266
|
+
ispec.color = color
|
|
267
|
+
ispec.line_width = tensor.get("line_width", 1.0)
|
|
268
|
+
ispec.point_size = tensor.get("point_size", 1.0)
|
|
269
|
+
if "text" in tensor:
|
|
270
|
+
text = tensor["text"]
|
|
271
|
+
is_seq = isinstance(text, Sequence) and not isinstance(text, str)
|
|
272
|
+
if not (is_seq and all(isinstance(v, str) for v in text)):
|
|
273
|
+
raise ValueError("The text value of a tensor must be a sequence of strings")
|
|
274
|
+
else:
|
|
275
|
+
text = []
|
|
276
|
+
ispec.text = tensor.get("text", text)
|
|
277
|
+
|
|
278
|
+
if "depth_map_render_mode" in tensor:
|
|
279
|
+
depth_map_render_mode = tensor["depth_map_render_mode"]
|
|
280
|
+
if isinstance(depth_map_render_mode, str):
|
|
281
|
+
depth_map_render_mode.lower()
|
|
282
|
+
if depth_map_render_mode not in _holoviz_str_to_depth_map_render_mode:
|
|
283
|
+
raise ValueError(
|
|
284
|
+
f"unrecognized depth_map_render_mode name: {depth_map_render_mode}"
|
|
285
|
+
)
|
|
286
|
+
depth_map_render_mode = _holoviz_str_to_depth_map_render_mode[
|
|
287
|
+
depth_map_render_mode
|
|
288
|
+
]
|
|
289
|
+
elif not isinstance(input_type, _HolovizOp.DepthMapRenderMode):
|
|
290
|
+
raise ValueError(
|
|
291
|
+
"value corresponding to key 'depth_map_render_mode' must be either a "
|
|
292
|
+
"HolovizOp.DepthMapRenderMode object or one of the following "
|
|
293
|
+
f"strings: {tuple(_holoviz_str_to_depth_map_render_mode.keys())}"
|
|
294
|
+
)
|
|
295
|
+
else:
|
|
296
|
+
depth_map_render_mode = _HolovizOp.DepthMapRenderMode.POINTS
|
|
297
|
+
ispec.depth_map_render_mode = depth_map_render_mode
|
|
298
|
+
|
|
299
|
+
if "yuv_model_conversion" in tensor:
|
|
300
|
+
yuv_model_conversion = tensor["yuv_model_conversion"]
|
|
301
|
+
if isinstance(yuv_model_conversion, str):
|
|
302
|
+
yuv_model_conversion.lower()
|
|
303
|
+
if yuv_model_conversion not in _holoviz_str_to_yuv_model_conversion:
|
|
304
|
+
raise ValueError(
|
|
305
|
+
f"unrecognized yuv_model_conversion name: {yuv_model_conversion}"
|
|
306
|
+
)
|
|
307
|
+
yuv_model_conversion = _holoviz_str_to_yuv_model_conversion[
|
|
308
|
+
yuv_model_conversion
|
|
309
|
+
]
|
|
310
|
+
elif not isinstance(input_type, _HolovizOp.YuvModelConversion):
|
|
311
|
+
raise ValueError(
|
|
312
|
+
"value corresponding to key 'yuv_model_conversion' must be either a "
|
|
313
|
+
"HolovizOp.YuvModelConversion object or one of the following "
|
|
314
|
+
f"strings: {tuple(_holoviz_str_to_yuv_model_conversion.keys())}"
|
|
315
|
+
)
|
|
316
|
+
else:
|
|
317
|
+
yuv_model_conversion = _HolovizOp.YuvModelConversion.YUV_601
|
|
318
|
+
ispec.yuv_model_conversion = yuv_model_conversion
|
|
319
|
+
|
|
320
|
+
if "yuv_range" in tensor:
|
|
321
|
+
yuv_range = tensor["yuv_range"]
|
|
322
|
+
if isinstance(yuv_range, str):
|
|
323
|
+
yuv_range.lower()
|
|
324
|
+
if yuv_range not in _holoviz_str_to_yuv_range:
|
|
325
|
+
raise ValueError(f"unrecognized yuv_range name: {yuv_range}")
|
|
326
|
+
yuv_range = _holoviz_str_to_yuv_range[yuv_range]
|
|
327
|
+
elif not isinstance(input_type, _HolovizOp.YuvRange):
|
|
328
|
+
raise ValueError(
|
|
329
|
+
"value corresponding to key 'yuv_range' must be either a "
|
|
330
|
+
"HolovizOp.YuvRange object or one of the following "
|
|
331
|
+
f"strings: {tuple(_holoviz_str_to_yuv_range.keys())}"
|
|
332
|
+
)
|
|
333
|
+
else:
|
|
334
|
+
yuv_range = _HolovizOp.YuvRange.ITU_FULL
|
|
335
|
+
ispec.yuv_range = yuv_range
|
|
336
|
+
|
|
337
|
+
if "x_chroma_location" in tensor:
|
|
338
|
+
x_chroma_location = tensor["x_chroma_location"]
|
|
339
|
+
if isinstance(x_chroma_location, str):
|
|
340
|
+
x_chroma_location.lower()
|
|
341
|
+
if x_chroma_location not in _holoviz_str_to_chroma_location:
|
|
342
|
+
raise ValueError(
|
|
343
|
+
f"unrecognized x_chroma_location name: {x_chroma_location}"
|
|
344
|
+
)
|
|
345
|
+
x_chroma_location = _holoviz_str_to_chroma_location[x_chroma_location]
|
|
346
|
+
elif not isinstance(input_type, _HolovizOp.ChromaLocation):
|
|
347
|
+
raise ValueError(
|
|
348
|
+
"value corresponding to key 'x_chroma_location' must be either a "
|
|
349
|
+
"HolovizOp.ChromaLocation object or one of the following "
|
|
350
|
+
f"strings: {tuple(_holoviz_str_to_chroma_location.keys())}"
|
|
351
|
+
)
|
|
352
|
+
else:
|
|
353
|
+
x_chroma_location = _HolovizOp.ChromaLocation.COSITED_EVEN
|
|
354
|
+
ispec.x_chroma_location = x_chroma_location
|
|
355
|
+
|
|
356
|
+
if "y_chroma_location" in tensor:
|
|
357
|
+
y_chroma_location = tensor["y_chroma_location"]
|
|
358
|
+
if isinstance(y_chroma_location, str):
|
|
359
|
+
y_chroma_location.lower()
|
|
360
|
+
if y_chroma_location not in _holoviz_str_to_chroma_location:
|
|
361
|
+
raise ValueError(
|
|
362
|
+
f"unrecognized y_chroma_location name: {y_chroma_location}"
|
|
363
|
+
)
|
|
364
|
+
y_chroma_location = _holoviz_str_to_chroma_location[y_chroma_location]
|
|
365
|
+
elif not isinstance(input_type, _HolovizOp.ChromaLocation):
|
|
366
|
+
raise ValueError(
|
|
367
|
+
"value corresponding to key 'y_chroma_location' must be either a "
|
|
368
|
+
"HolovizOp.ChromaLocation object or one of the following "
|
|
369
|
+
f"strings: {tuple(_holoviz_str_to_chroma_location.keys())}"
|
|
370
|
+
)
|
|
371
|
+
else:
|
|
372
|
+
y_chroma_location = _HolovizOp.ChromaLocation.COSITED_EVEN
|
|
373
|
+
ispec.y_chroma_location = y_chroma_location
|
|
374
|
+
|
|
375
|
+
ispec.views = tensor.get("views", [])
|
|
376
|
+
|
|
377
|
+
tensor_input_specs.append(ispec)
|
|
378
|
+
super().__init__(
|
|
379
|
+
fragment,
|
|
380
|
+
*args,
|
|
381
|
+
allocator=allocator,
|
|
382
|
+
receivers=receiver_iospecs,
|
|
383
|
+
tensors=tensor_input_specs,
|
|
384
|
+
color_lut=list(color_lut),
|
|
385
|
+
window_title=window_title,
|
|
386
|
+
display_name=display_name,
|
|
387
|
+
width=width,
|
|
388
|
+
height=height,
|
|
389
|
+
framerate=framerate,
|
|
390
|
+
use_exclusive_display=use_exclusive_display,
|
|
391
|
+
fullscreen=fullscreen,
|
|
392
|
+
headless=headless,
|
|
393
|
+
framebuffer_srgb=framebuffer_srgb,
|
|
394
|
+
vsync=vsync,
|
|
395
|
+
display_color_space=display_color_space,
|
|
396
|
+
enable_render_buffer_input=enable_render_buffer_input,
|
|
397
|
+
enable_render_buffer_output=enable_render_buffer_output,
|
|
398
|
+
enable_depth_buffer_input=enable_depth_buffer_input,
|
|
399
|
+
enable_depth_buffer_output=enable_depth_buffer_output,
|
|
400
|
+
enable_camera_pose_output=enable_camera_pose_output,
|
|
401
|
+
camera_pose_output_type=camera_pose_output_type,
|
|
402
|
+
camera_eye=camera_eye,
|
|
403
|
+
camera_look_at=camera_look_at,
|
|
404
|
+
camera_up=camera_up,
|
|
405
|
+
key_callback=key_callback,
|
|
406
|
+
unicode_char_callback=unicode_char_callback,
|
|
407
|
+
mouse_button_callback=mouse_button_callback,
|
|
408
|
+
scroll_callback=scroll_callback,
|
|
409
|
+
cursor_pos_callback=cursor_pos_callback,
|
|
410
|
+
framebuffer_size_callback=framebuffer_size_callback,
|
|
411
|
+
window_size_callback=window_size_callback,
|
|
412
|
+
font_path=font_path,
|
|
413
|
+
cuda_stream_pool=cuda_stream_pool,
|
|
414
|
+
window_close_condition=window_close_condition,
|
|
415
|
+
name=name,
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
# copy docstrings defined in operators_pydoc.hpp
|
|
420
|
+
HolovizOp.__doc__ = _HolovizOp.__doc__
|
|
421
|
+
HolovizOp.__init__.__doc__ = _HolovizOp.__init__.__doc__
|
|
422
|
+
|
|
423
|
+
__all__ = ["HolovizOp"]
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
from holoscan.core import io_type_registry
|
|
20
|
+
from holoscan.resources import Allocator, CudaStreamPool # noqa: F401
|
|
21
|
+
|
|
22
|
+
from ._inference import InferenceOp
|
|
23
|
+
from ._inference import register_types as _register_types
|
|
24
|
+
|
|
25
|
+
# register methods for receiving or emitting list[InferenceOp.ActivationSpec] and camera pose types
|
|
26
|
+
_register_types(io_type_registry)
|
|
27
|
+
|
|
28
|
+
__all__ = ["InferenceOp"]
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
from holoscan.resources import Allocator, CudaStreamPool # noqa: F401
|
|
20
|
+
|
|
21
|
+
from ._inference_processor import InferenceProcessorOp
|
|
22
|
+
|
|
23
|
+
__all__ = ["InferenceProcessorOp"]
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
from holoscan.core import Operator, OperatorSpec
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PingRxOp(Operator):
|
|
22
|
+
"""Simple receiver operator.
|
|
23
|
+
|
|
24
|
+
This is an example of a native operator with one input port.
|
|
25
|
+
On each tick, it receives an integer from the "in" port.
|
|
26
|
+
|
|
27
|
+
**==Named Inputs==**
|
|
28
|
+
|
|
29
|
+
in : any
|
|
30
|
+
A received value.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, fragment, *args, **kwargs):
|
|
34
|
+
# Need to call the base class constructor last
|
|
35
|
+
super().__init__(fragment, *args, **kwargs)
|
|
36
|
+
|
|
37
|
+
def setup(self, spec: OperatorSpec):
|
|
38
|
+
spec.input("in")
|
|
39
|
+
|
|
40
|
+
def compute(self, op_input, op_output, context):
|
|
41
|
+
value = op_input.receive("in")
|
|
42
|
+
print(f"Rx message value: {value}")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
__all__ = ["PingRxOp"]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
|
|
20
|
+
from ._ping_tensor_rx import PingTensorRxOp
|
|
21
|
+
|
|
22
|
+
__all__ = ["PingTensorRxOp"]
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
|
|
20
|
+
from ._ping_tensor_tx import PingTensorTxOp
|
|
21
|
+
|
|
22
|
+
__all__ = ["PingTensorTxOp"]
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
from holoscan.core import Operator, OperatorSpec
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PingTxOp(Operator):
|
|
22
|
+
"""Simple transmitter operator.
|
|
23
|
+
|
|
24
|
+
On each tick, it transmits an integer to the "out" port.
|
|
25
|
+
|
|
26
|
+
**==Named Outputs==**
|
|
27
|
+
|
|
28
|
+
out : int
|
|
29
|
+
An index value that increments by one on each call to `compute`. The starting value is
|
|
30
|
+
1.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, fragment, *args, **kwargs):
|
|
34
|
+
self.index = 1
|
|
35
|
+
# Need to call the base class constructor last
|
|
36
|
+
super().__init__(fragment, *args, **kwargs)
|
|
37
|
+
|
|
38
|
+
def setup(self, spec: OperatorSpec):
|
|
39
|
+
spec.output("out")
|
|
40
|
+
|
|
41
|
+
def compute(self, op_input, op_output, context):
|
|
42
|
+
op_output.emit(self.index, "out")
|
|
43
|
+
self.index += 1
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = ["PingTxOp"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
from holoscan.resources import Allocator, CudaStreamPool # noqa: F401
|
|
20
|
+
|
|
21
|
+
from ._segmentation_postprocessor import SegmentationPostprocessorOp
|
|
22
|
+
|
|
23
|
+
__all__ = ["SegmentationPostprocessorOp"]
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
""" # noqa: E501
|
|
17
|
+
|
|
18
|
+
import holoscan.core # noqa: F401
|
|
19
|
+
|
|
20
|
+
from ._test_ops import DataTypeRxTestOp, DataTypeTxTestOp
|
|
21
|
+
|
|
22
|
+
__all__ = ["DataTypeRxTestOp", "DataTypeTxTestOp"]
|