-
Notifications
You must be signed in to change notification settings - Fork 30
/
app_config.yaml
172 lines (161 loc) · 5.36 KB
/
app_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
%YAML 1.2
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
extensions:
- libgxf_std.so
- libgxf_cuda.so
- libgxf_multimedia.so
- libgxf_serialization.so
- ./gxf_extensions/aja/libaja_source.so
- ./gxf_extensions/custom_lstm_inference/libcustom_lstm_inference.so
- ./gxf_extensions/format_converter/libformat_converter.so
- ./gxf_extensions/visualizer_tool_tracking/libvisualizer_tool_tracking.so
- ./gxf_extensions/stream_playback/libstream_playback.so
source: "replayer" # or "aja"
do_record: false # or 'true' if you want to record input video stream.
aja:
width: 1920
height: 1080
rdma: true
replayer:
directory: "/workspace/test_data/endoscopy/video"
basename: "surgical_video"
frame_rate: 0 # as specified in timestamps
repeat: true # default: false
realtime: true # default: true
count: 0 # default: 0 (no frame count restriction)
recorder_format_converter:
in_dtype: "rgba8888"
out_dtype: "rgb888"
recorder:
directory: "/tmp"
basename: "tensor"
format_converter_replayer:
out_tensor_name: source_video
out_dtype: "float32"
scale_min: 0.0
scale_max: 255.0
format_converter_aja:
in_dtype: "rgba8888"
out_tensor_name: source_video
out_dtype: "float32"
scale_min: 0.0
scale_max: 255.0
resize_width: 854
resize_height: 480
lstm_inference:
model_file_path: /workspace/test_data/endoscopy/model/tool_loc_convlstm.onnx
engine_cache_dir: /workspace/test_data/endoscopy/model/tool_loc_convlstm_engines
input_tensor_names:
- source_video
- cellstate_in
- hiddenstate_in
input_state_tensor_names:
- cellstate_in
- hiddenstate_in
input_binding_names:
- data_ph:0 # (shape=[1, 480, 854, 3], dtype=float32) <==> source_video
- cellstate_ph:0 # (shape=[1, 60, 107, 7], dtype=float32) == internal state
- hiddenstate_ph:0 # (shape=[1, 60, 107, 7], dtype=float32) == internal state
output_tensor_names:
- cellstate_out
- hiddenstate_out
- probs
- scaled_coords
- binary_masks
output_state_tensor_names:
- cellstate_out
- hiddenstate_out
output_binding_names:
- Model/net_states:0 # (shape=[ 1, 60, 107, 7], dtype=float32)
- Model/net_hidden:0 # (shape=[ 1, 60, 107, 7], dtype=float32)
- probs:0 # (shape=[1, 7], dtype=float32)
- Localize/scaled_coords:0 # (shape=[1, 7, 2], dtype=float32)
- Localize_1/binary_masks:0 # (shape=[1, 7, 60, 107], dtype=float32)
force_engine_update: false
verbose: true
max_workspace_size: 2147483648
enable_fp16_: true
visualizer_format_converter_replayer:
in_dtype: "rgb888"
out_dtype: "rgba8888"
# out_tensor_name: video
visualizer_format_converter_aja:
in_dtype: "rgba8888"
out_dtype: "rgba8888"
resize_width: 854
resize_height: 480
visualizer:
videoframe_vertex_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/viewport_filling_triangle.vert
videoframe_fragment_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/video_frame.frag
tooltip_vertex_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/instrument_tip.vert
tooltip_fragment_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/instrument_tip.frag
overlay_img_vertex_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/viewport_filling_triangle.vert
overlay_img_fragment_shader_path: gxf_extensions/visualizer_tool_tracking/glsl/instrument_mask.frag
overlay_img_width: 107
overlay_img_height: 60
overlay_img_channels: 1
overlay_img_layers: 7
# overlay_img_colors:
# - [1.0, 0.0, 0.0]
# - [0.0, 1.0, 0.0]
# - [0.0, 0.0, 1.0]
# - [1.0, 1.0, 0.0]
# - [1.0, 0.0, 1.0]
# - [0.0, 1.0, 1.0]
# - [0.5, 1.0, 0.0]
num_tool_classes: 7
num_tool_pos_components: 2
# tool_tip_colors:
# - [1.0, 0.0, 0.0]
# - [0.0, 1.0, 0.0]
# - [0.0, 0.0, 1.0]
# - [1.0, 1.0, 0.0]
# - [1.0, 0.0, 1.0]
# - [0.0, 1.0, 1.0]
# - [0.5, 1.0, 0.0]
tool_labels:
- Grasper
- Bipolar
- Hook
- Scissors
- Clipper
- Irrigator
- Spec.Bag
label_sans_font_path: gxf_extensions/visualizer_tool_tracking/fonts/Roboto-Regular.ttf
label_sans_bold_font_path: gxf_extensions/visualizer_tool_tracking/fonts/Roboto-Bold.ttf
in_tensor_names:
- ""
- probs
- net_states
- binary_masks
- scaled_coords
in_width: 854
in_height: 480
in_channels: 4
in_bytes_per_pixel: 1
# tool_tip_colors: [[0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0],
# [0.0, 0.0, 0.0]]