NVIDIA-ISAAC-ROS / isaac_ros_image_segmentation

NVIDIA-accelerated, deep learned semantic image segmentation
Apache License 2.0
64 stars 7 forks source link

how to fix the input and output binding for a custom trt engine , #20

Open BADAL244 opened 1 year ago

BADAL244 commented 1 year ago

ros2 launch isaac_ros_unet isaac_ros_unet_tensor_rt.launch.py model_name:=peoplesemsegnet_shuffleseg engine_file_path:=/home/badal/data/new_engine.plan input_binding_names:=['input_2:0'] output_binding_names:=['argmax_1'] network_output_type:='argmax' rvi[INFO] [launch]: All log files can be found below /home/badal/.ros/log/2023-07-25-18-56-14-386452-badal-desktop-4707 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container_mt-1]: process started with pid [4770] [component_container_mt-1] [INFO] [1690282576.766031488] [unet_container]: Load Library: /home/badal/vslam_ws/install/isaac_ros_dnn_encoders/lib/libdnn_image_encoder_node.so [component_container_mt-1] [INFO] [1690282577.418500576] [unet_container]: Found class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282577.418960256] [unet_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282577.474196192] [NitrosContext]: [NitrosContext] Creating a new shared context [component_container_mt-1] [INFO] [1690282577.475289536] [dnn_image_encoder]: [NitrosNode] Initializing NitrosNode [component_container_mt-1] [INFO] [1690282577.499201984] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/std/libgxf_std.so [component_container_mt-1] [INFO] [1690282577.536095968] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_gxf_helpers.so [component_container_mt-1] [INFO] [1690282577.564563936] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_sight.so [component_container_mt-1] [INFO] [1690282577.594015360] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_atlas.so [component_container_mt-1] [INFO] [1690282577.624380416] [NitrosContext]: [NitrosContext] Loading application: '/home/badal/vslam_ws/install/isaac_ros_nitros/share/isaac_ros_nitros/config/type_adapter_nitros_context_graph.yaml' [component_container_mt-1] [INFO] [1690282577.633416000] [NitrosContext]: [NitrosContext] Initializing application... [component_container_mt-1] [INFO] [1690282577.648229568] [NitrosContext]: [NitrosContext] Running application... [component_container_mt-1] 2023-07-25 18:56:17.648 WARN gxf/std/program.cpp@456: No system specified. Nothing to do [component_container_mt-1] [INFO] [1690282577.673352704] [dnn_image_encoder]: [NitrosNode] Starting NitrosNode [component_container_mt-1] [INFO] [1690282577.673727968] [dnn_image_encoder]: [NitrosNode] Loading built-in preset extension specs [component_container_mt-1] [INFO] [1690282577.695671456] [dnn_image_encoder]: [NitrosNode] Loading built-in extension specs [component_container_mt-1] [INFO] [1690282577.696311520] [dnn_image_encoder]: [NitrosNode] Loading preset extension specs [component_container_mt-1] [INFO] [1690282577.712717824] [dnn_image_encoder]: [NitrosNode] Loading extension specs [component_container_mt-1] [INFO] [1690282577.713155712] [dnn_image_encoder]: [NitrosNode] Loading generator rules [component_container_mt-1] [INFO] [1690282577.716584992] [dnn_image_encoder]: [NitrosNode] Loading extensions [component_container_mt-1] [INFO] [1690282577.726539072] [dnn_image_encoder]: [NitrosContext] Loading extension: gxf/lib/libgxf_message_compositor.so [component_container_mt-1] [INFO] [1690282577.750451488] [dnn_image_encoder]: [NitrosContext] Loading extension: gxf/lib/cuda/libgxf_cuda.so [component_container_mt-1] [INFO] [1690282577.778020864] [dnn_image_encoder]: [NitrosContext] Loading extension: gxf/lib/serialization/libgxf_serialization.so [component_container_mt-1] [INFO] [1690282577.811581536] [dnn_image_encoder]: [NitrosContext] Loading extension: gxf/lib/image_proc/libgxf_tensorops.so [component_container_mt-1] [INFO] [1690282577.928038944] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/multimedia/libgxf_multimedia.so [component_container_mt-1] [INFO] [1690282577.941050720] [dnn_image_encoder]: [NitrosNode] Loading graph to the optimizer [component_container_mt-1] [INFO] [1690282577.998541280] [dnn_image_encoder]: [NitrosNode] Running optimization [component_container_mt-1] [INFO] [1690282578.889717216] [dnn_image_encoder]: [NitrosNode] Obtaining graph IO group info from the optimizer [component_container_mt-1] [INFO] [1690282578.918500544] [dnn_image_encoder]: [NitrosNode] Creating negotiated publishers/subscribers [component_container_mt-1] [INFO] [1690282579.034744352] [dnn_image_encoder]: [NitrosNode] Starting negotiation... [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/dnn_image_encoder' in container '/unet_container' [component_container_mt-1] [INFO] [1690282579.073490656] [unet_container]: Load Library: /home/badal/vslam_ws/install/isaac_ros_tensor_rt/lib/libtensor_rt_node.so [component_container_mt-1] [INFO] [1690282579.087640320] [unet_container]: Found class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282579.088165504] [unet_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282579.166642240] [tensor_rt_node]: [NitrosNode] Initializing NitrosNode [component_container_mt-1] [INFO] [1690282579.208608416] [tensor_rt_node]: [TensorRTNode] Set input data format to: "nitros_tensor_list_nchw_rgb_f32" [component_container_mt-1] [INFO] [1690282579.208914752] [tensor_rt_node]: [TensorRTNode] Set output data format to: "nitros_tensor_list_nhwc_rgb_f32" [component_container_mt-1] [INFO] [1690282579.209256000] [tensor_rt_node]: [NitrosNode] Starting NitrosNode [component_container_mt-1] [INFO] [1690282579.209385184] [tensor_rt_node]: [NitrosNode] Loading built-in preset extension specs [component_container_mt-1] [INFO] [1690282579.226240448] [tensor_rt_node]: [NitrosNode] Loading built-in extension specs [component_container_mt-1] [INFO] [1690282579.226681248] [tensor_rt_node]: [NitrosNode] Loading preset extension specs [component_container_mt-1] [INFO] [1690282579.229786432] [tensor_rt_node]: [NitrosNode] Loading extension specs [component_container_mt-1] [INFO] [1690282579.230094560] [tensor_rt_node]: [NitrosNode] Loading generator rules [component_container_mt-1] [INFO] [1690282579.232664544] [tensor_rt_node]: [NitrosNode] Loading extensions [component_container_mt-1] [INFO] [1690282579.275218304] [tensor_rt_node]: [NitrosContext] Loading extension: gxf/tensor_rt/libgxf_tensor_rt.so [component_container_mt-1] [INFO] [1690282579.584771456] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282579.596685632] [tensor_rt_node]: [NitrosNode] Loading graph to the optimizer [component_container_mt-1] [INFO] [1690282579.600179584] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282579.610728960] [tensor_rt_node]: [NitrosNode] Running optimization [component_container_mt-1] [INFO] [1690282579.621694016] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282579.675447456] [tensor_rt_node]: [NitrosNode] Obtaining graph IO group info from the optimizer [component_container_mt-1] [INFO] [1690282579.679445600] [tensor_rt_node]: [NitrosNode] Creating negotiated publishers/subscribers [component_container_mt-1] [INFO] [1690282579.679762656] [tensor_rt_node]: [NitrosPublisherSubscriberGroup] Pinning the component "inference/rx" (type="nvidia::gxf::DoubleBufferReceiver") to use its compatible format only: "nitros_tensor_list_nchw_rgb_f32" [component_container_mt-1] [INFO] [1690282579.680097824] [tensor_rt_node]: [NitrosPublisherSubscriberGroup] Pinning the component "sink/sink" (type="nvidia::isaac_ros::MessageRelay") to use its compatible format only: "nitros_tensor_list_nhwc_rgb_f32" [component_container_mt-1] [INFO] [1690282579.694474464] [tensor_rt_node]: [NitrosNode] Starting negotiation... [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/tensor_rt_node' in container '/unet_container'

[component_container_mt-1] [INFO] [1690282579.717791808] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282579.722061536] [unet_container]: Load Library: /home/badal/vslam_ws/install/isaac_ros_unet/lib/libunet_decoder_node.so [component_container_mt-1] [INFO] [1690282579.742071616] [unet_container]: Found class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282579.742371008] [unet_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate [component_container_mt-1] [INFO] [1690282579.782681024] [unet_decoder_node]: [NitrosNode] Initializing NitrosNode [component_container_mt-1] [INFO] [1690282579.804838176] [unet_decoder_node]: [NitrosNode] Starting NitrosNode [component_container_mt-1] [INFO] [1690282579.805103424] [unet_decoder_node]: [NitrosNode] Loading built-in preset extension specs [component_container_mt-1] [INFO] [1690282579.815235968] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282579.819626336] [unet_decoder_node]: [NitrosNode] Loading built-in extension specs [component_container_mt-1] [INFO] [1690282579.820016384] [unet_decoder_node]: [NitrosNode] Loading preset extension specs [component_container_mt-1] [INFO] [1690282579.824074848] [unet_decoder_node]: [NitrosNode] Loading extension specs [component_container_mt-1] [INFO] [1690282579.824297824] [unet_decoder_node]: [NitrosNode] Loading generator rules [component_container_mt-1] [INFO] [1690282579.824387040] [unet_decoder_node]: [NitrosNode] Loading extensions [component_container_mt-1] [INFO] [1690282579.854912736] [unet_decoder_node]: [NitrosContext] Loading extension: gxf/libgxf_segmentation_postprocessor.so [component_container_mt-1] [INFO] [1690282579.878305888] [unet_decoder_node]: [NitrosNode] Loading graph to the optimizer [component_container_mt-1] [INFO] [1690282579.897539936] [unet_decoder_node]: [NitrosNode] Running optimization [component_container_mt-1] [INFO] [1690282579.922508416] [dnn_image_encoder]: [NitrosSubscriber] Received a message but the application receiver's pointer is not yet set. [component_container_mt-1] [INFO] [1690282580.043207552] [dnn_image_encoder]: [NitrosNode] Starting post negotiation setup [component_container_mt-1] [INFO] [1690282580.044096832] [dnn_image_encoder]: [NitrosNode] Getting data format negotiation results [component_container_mt-1] [INFO] [1690282580.044571904] [dnn_image_encoder]: [NitrosPublisher] Use the negotiated data format: "nitros_tensor_list_nchw_rgb_f32" [component_container_mt-1] [INFO] [1690282580.044825984] [dnn_image_encoder]: [NitrosSubscriber] Negotiation ended with no results [component_container_mt-1] [INFO] [1690282580.045043456] [dnn_image_encoder]: [NitrosSubscriber] Use the compatible subscriber: topic_name="/image", data_format="nitros_image_bgr8" [component_container_mt-1] [INFO] [1690282580.045369952] [dnn_image_encoder]: [NitrosNode] Exporting the final graph based on the negotiation results [component_container_mt-1] [INFO] [1690282580.105343104] [dnn_image_encoder]: [NitrosNode] Wrote the final top level YAML graph to "/home/badal/vslam_ws/install/isaac_ros_dnn_encoders/share/isaac_ros_dnn_encoders/YXBOCKVNMB.yaml" [component_container_mt-1] [INFO] [1690282580.106741440] [dnn_image_encoder]: [NitrosNode] Calling user's pre-load-graph callback [component_container_mt-1] [INFO] [1690282580.106968288] [dnn_image_encoder]: In DNN Image Encoder Node preLoadGraphCallback(). [component_container_mt-1] [INFO] [1690282580.107284608] [dnn_image_encoder]: [NitrosNode] Loading application [component_container_mt-1] [INFO] [1690282580.107480672] [dnn_image_encoder]: [NitrosContext] Loading application: '/home/badal/vslam_ws/install/isaac_ros_dnn_encoders/share/isaac_ros_dnn_encoders/YXBOCKVNMB.yaml' [component_container_mt-1] [INFO] [1690282580.135827552] [dnn_image_encoder]: [NitrosNode] Linking Nitros pub/sub to the loaded application [component_container_mt-1] [INFO] [1690282580.137354688] [unet_decoder_node]: [NitrosNode] Obtaining graph IO group info from the optimizer [component_container_mt-1] [INFO] [1690282580.137629664] [dnn_image_encoder]: [NitrosNode] Calling user's post-load-graph callback [component_container_mt-1] [INFO] [1690282580.137811776] [dnn_image_encoder]: In DNN Image Encoder Node postLoadGraphCallback(). [component_container_mt-1] [INFO] [1690282580.138377088] [dnn_image_encoder]: [NitrosContext] Initializing application... [component_container_mt-1] [INFO] [1690282580.152343392] [unet_decoder_node]: [NitrosNode] Creating negotiated publishers/subscribers [component_container_mt-1] [INFO] [1690282580.153414752] [unet_decoder_node]: [NitrosPublisherSubscriberGroup] Pinning the component "colored_segmentation_mask_sink/sink" (type="nvidia::isaac_ros::MessageRelay") to use its compatible format only: "nitros_image_rgb8" [component_container_mt-1] [INFO] [1690282580.181691168] [unet_decoder_node]: [NitrosNode] Starting negotiation... [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/unet_decoder_node' in container '/unet_container'

[component_container_mt-1] [INFO] [1690282580.202962944] [dnn_image_encoder]: [NitrosContext] Running application... [component_container_mt-1] [INFO] [1690282580.203566240] [dnn_image_encoder]: [NitrosNode] Starting a heartbeat timer (eid=46)

[component_container_mt-1] [INFO] [1690282580.697649376] [tensor_rt_node]: [NitrosNode] Starting post negotiation setup [component_container_mt-1] [INFO] [1690282580.697998720] [tensor_rt_node]: [NitrosNode] Getting data format negotiation results [component_container_mt-1] [INFO] [1690282580.698143520] [tensor_rt_node]: [NitrosPublisher] Use the negotiated data format: "nitros_tensor_list_nhwc_rgb_f32" [component_container_mt-1] [INFO] [1690282580.698274336] [tensor_rt_node]: [NitrosSubscriber] Use the negotiated data format: "nitros_tensor_list_nchw_rgb_f32" [component_container_mt-1] [INFO] [1690282580.698429440] [tensor_rt_node]: [NitrosNode] Exporting the final graph based on the negotiation results [component_container_mt-1] [INFO] [1690282580.717308256] [tensor_rt_node]: [NitrosNode] Wrote the final top level YAML graph to "/home/badal/vslam_ws/install/isaac_ros_tensor_rt/share/isaac_ros_tensor_rt/JROAGQYGZR.yaml" [component_container_mt-1] [INFO] [1690282580.717614592] [tensor_rt_node]: [NitrosNode] Calling user's pre-load-graph callback [component_container_mt-1] [INFO] [1690282580.717712448] [tensor_rt_node]: [NitrosNode] Loading application [component_container_mt-1] [INFO] [1690282580.717825056] [tensor_rt_node]: [NitrosContext] Loading application: '/home/badal/vslam_ws/install/isaac_ros_tensor_rt/share/isaac_ros_tensor_rt/JROAGQYGZR.yaml' [component_container_mt-1] 2023-07-25 18:56:20.727 WARN gxf/std/yaml_file_loader.cpp@952: Using unregistered parameter 'dummy_rx' in component ''. [component_container_mt-1] [INFO] [1690282580.730695520] [tensor_rt_node]: [NitrosNode] Linking Nitros pub/sub to the loaded application [component_container_mt-1] [INFO] [1690282580.731416160] [tensor_rt_node]: [NitrosNode] Calling user's post-load-graph callback [component_container_mt-1] [INFO] [1690282580.731563776] [tensor_rt_node]: In TensorRTNode postLoadGraphCallback(). [component_container_mt-1] [INFO] [1690282580.732454208] [tensor_rt_node]: [NitrosContext] Initializing application... [component_container_mt-1] [INFO] [1690282580.739824512] [tensor_rt_node]: [NitrosContext] Running application... [component_container_mt-1] [INFO] [1690282580.740747328] [tensor_rt_node]: [NitrosNode] Starting a heartbeat timer (eid=164) [component_container_mt-1] [INFO] [1690282581.187272768] [unet_decoder_node]: [NitrosNode] Starting post negotiation setup [component_container_mt-1] [INFO] [1690282581.189636608] [unet_decoder_node]: [NitrosNode] Getting data format negotiation results [component_container_mt-1] [INFO] [1690282581.189814016] [unet_decoder_node]: [NitrosPublisher] Negotiation ended with no results [component_container_mt-1] [INFO] [1690282581.189941056] [unet_decoder_node]: [NitrosPublisher] Use only the compatible publisher: topic_name="/unet/raw_segmentation_mask", data_format="nitros_image_mono8" [component_container_mt-1] [INFO] [1690282581.190038720] [unet_decoder_node]: [NitrosPublisher] Negotiation ended with no results [component_container_mt-1] [INFO] [1690282581.190119104] [unet_decoder_node]: [NitrosPublisher] Use only the compatible publisher: topic_name="/unet/colored_segmentation_mask", data_format="nitros_image_rgb8" [component_container_mt-1] [INFO] [1690282581.190212512] [unet_decoder_node]: [NitrosSubscriber] Use the negotiated data format: "nitros_tensor_list_nhwc_rgb_f32" [component_container_mt-1] [INFO] [1690282581.190394368] [unet_decoder_node]: [NitrosNode] Exporting the final graph based on the negotiation results [component_container_mt-1] [INFO] [1690282581.217646176] [unet_decoder_node]: [NitrosNode] Wrote the final top level YAML graph to "/home/badal/vslam_ws/install/isaac_ros_unet/share/isaac_ros_unet/JDKKGCNCOB.yaml" [component_container_mt-1] [INFO] [1690282581.218106880] [unet_decoder_node]: [NitrosNode] Calling user's pre-load-graph callback [component_container_mt-1] [INFO] [1690282581.218456000] [unet_decoder_node]: [NitrosNode] Loading application [component_container_mt-1] [INFO] [1690282581.218814016] [unet_decoder_node]: [NitrosContext] Loading application: '/home/badal/vslam_ws/install/isaac_ros_unet/share/isaac_ros_unet/JDKKGCNCOB.yaml' [component_container_mt-1] [INFO] [1690282581.237629792] [unet_decoder_node]: [NitrosNode] Linking Nitros pub/sub to the loaded application [component_container_mt-1] [INFO] [1690282581.238782848] [unet_decoder_node]: [NitrosNode] Calling user's post-load-graph callback [component_container_mt-1] [INFO] [1690282581.239325792] [unet_decoder_node]: [NitrosContext] Initializing application... [component_container_mt-1] [INFO] [1690282581.298128160] [unet_decoder_node]: [NitrosContext] Running application... [component_container_mt-1] [INFO] [1690282581.299689152] [unet_decoder_node]: [NitrosNode] Starting a heartbeat timer (eid=208) [component_container_mt-1] 2023-07-25 18:56:27.239 ERROR /home/badal/vslam_ws/src/isaac_ros_dnn_inference/isaac_ros_tensor_rt/gxf/tensor_rt/tensor_rt_inference.cpp@148: TRT ERROR: 3: Cannot find binding of given name: input_2:0 [component_container_mt-1] 2023-07-25 18:56:27.239 ERROR /home/badal/vslam_ws/src/isaac_ros_dnn_inference/isaac_ros_tensor_rt/gxf/tensor_rt/tensor_rt_inference.cpp@341: Failed to get binding index for input input_2:0 in model /home/badal/data/new_engine.plan [component_container_mt-1] 2023-07-25 18:56:27.242 WARN gxf/std/greedy_scheduler.cpp@241: Error while executing entity 164 named 'JROAGQYGZR_inference': GXF_FAILURE [component_container_mt-1] 2023-07-25 18:56:27.242 ERROR gxf/std/entity_executor.cpp@540: Entity [JROAGQYGZR_inference] must be in Lifecycle::kStarted or Lifecycle::kIdle stage before stopping. Current state is StartPending [component_container_mt-1] 2023-07-25 18:56:27.741 ERROR gxf/std/entity_executor.cpp@203: Entity with eid 164 not found! [component_container_mt-1] [WARN] [1690282587.741622848] [tensor_rt_node]: [NitrosNode] The heartbeat entity (eid=164) was stopped. The graph may have been terminated. [component_container_mt-1] [INFO] [1690282587.766059744] [unet_decoder_node]: [NitrosNode] Terminating the running application [component_container_mt-1] [INFO] [1690282587.766205152] [unet_decoder_node]: [NitrosContext] Interrupting GXF... [component_container_mt-1] [INFO] [1690282587.768190176] [unet_decoder_node]: [NitrosContext] Waiting on GXF... [component_container_mt-1] [INFO] [1690282587.768323328] [unet_decoder_node]: [NitrosContext] Deinitializing... [component_container_mt-1] [INFO] [1690282587.774302048] [unet_decoder_node]: [NitrosContext] Destroying context [component_container_mt-1] [INFO] [1690282587.775050144] [unet_decoder_node]: [NitrosNode] Application termination done [component_container_mt-1] [INFO] [1690282587.836418048] [tensor_rt_node]: [NitrosNode] Terminating the running application [component_container_mt-1] [INFO] [1690282587.836540736] [tensor_rt_node]: [NitrosContext] Interrupting GXF... [component_container_mt-1] [INFO] [1690282587.836605888] [tensor_rt_node]: [NitrosContext] Waiting on GXF... [component_container_mt-1] 2023-07-25 18:56:27.836 ERROR gxf/std/program.cpp@497: wait failed. Deactivating... [component_container_mt-1] 2023-07-25 18:56:27.838 ERROR gxf/core/runtime.cpp@1251: Graph wait failed with error: GXF_FAILURE [component_container_mt-1] [ERROR] [1690282587.838750656] [tensor_rt_node]: [NitrosContext] GxfGraphWait Error: GXF_FAILURE [component_container_mt-1] [INFO] [1690282587.838802848] [tensor_rt_node]: [NitrosNode] Application termination done [component_container_mt-1] [INFO] [1690282587.869010048] [dnn_image_encoder]: [NitrosNode] Terminating the running application [component_container_mt-1] [INFO] [1690282587.869272576] [dnn_image_encoder]: [NitrosContext] Interrupting GXF... [component_container_mt-1] [INFO] [1690282587.869350048] [dnn_image_encoder]: [NitrosContext] Waiting on GXF... [component_container_mt-1] [INFO] [1690282587.872316224] [dnn_image_encoder]: [NitrosContext] Deinitializing... [component_container_mt-1] [INFO] [1690282587.907488512] [dnn_image_encoder]: [NitrosContext] Destroying context [ERROR] [component_container_mt-1]: process has died [pid 4770, exit code -11, cmd '/home/badal/ros2_humble/install/rclcpp_components/lib/rclcpp_components/component_container_mt --ros-args -r __node:=unet_container -r __ns:=/'].

swapnesh-wani-nvidia commented 1 year ago

Could you confirm the input binding names of your engine file are correct? The way you are invoking the launch file is correct the launch arguments are passed through correctly.

BADAL244 commented 1 year ago

I have an engine file , i have confirmed the input and output binding name its correct . now the problem is my engine output is in the NCHW format for 19 classes. so i have a output of 1 19 224 * 224. but the IRIS (isaac ros image segmentation ) even after changing the "output_tensor_formats" default nitros_tensor_list_nhwc_rgb_f32 to nitros_list_nchw_rgb_f32 giving me the error, if i pass the default shape , then the height becomes 19 and classes becomes 224. so can you please tell me how to resolve this issue.

hemalshahNV commented 1 year ago

The code in Isaac ROS Image Segmentation/Unet Decoder is expecting the tensor output from inference on a UNet-architecture in NHWC format and does not generalize on a different format quite yet. You're using peoplesemsegnet_shuffleseg, however, which should output in NHWC as expected. Are you reading a different endpoint of the inference as "output" or something else?

BADAL244 commented 1 year ago

I am not using peopleseg ,I am using segformer from NGC catalog pretrained on cityscape dataset. I converted that into trt engine and passing it through the IRIS.

hemalshahNV commented 1 year ago

IRIS does not support SegFormer-architecture models yet but we have it on our radar. The modifications to have UNet Decoder support SegFormer at first glance do not seem significant so you could update it yourself. In the meantime, we'll get this on our roadmap.

AbdullahGM1 commented 9 months ago

hello,

I am facing the exact issue, but for detection. and the weight is a custom one.

Did you solve it?

thank you

BADAL244 commented 9 months ago

You have to pass your input output binding name at the time of conversion in onnx format. Then pass the same name for the input and output binding in this launch file then this will work.

AbdullahGM1 commented 9 months ago

from where do I get the name of the binding input and output?

it's not clear to me, if you can explain more, I would appreciate it

BADAL244 commented 9 months ago

Input to the model

x = torch.randn(batch_size, 1, 224, 224, requires_grad=True) torch_out = torch_model(x)

Export the model

torch.onnx.export(torch_model, # model being run x, # model input (or a tuple for multiple inputs) "super_resolution.onnx", # where to save the model (can be a file or file-like object) export_params=True, # store the trained parameter weights inside the model file opset_version=10, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['input'], # the model's input names output_names = ['output'], # the model's output names dynamic_axes={'input' : {0 : 'batch_size'}, # variable length axes 'output' : {0 : 'batch_size'}})

BADAL244 commented 9 months ago

Input names and output names is the binding name here

jaiveersinghNV commented 9 months ago

Thanks @BADAL244 for your help!

@AbdullahGM1 , please let us know if this fixes your issue so that we can close this one out.

nlitz88 commented 8 months ago

I wanted to add a quick addition to this based on my recent experience.

[I] ==== TensorRT Engine ==== Name: Unnamed Network 0 | Explicit Batch Engine
---- 1 Engine Input(s) ---- {input_1:0 [dtype=float32, shape=(1, 3, 320, 320)]}
---- 1 Engine Output(s) ---- {argmax_1 [dtype=int32, shape=(1, 320, 320, 1)]}

That was way beyond the scope of your question, but I hope the context helps a bit @AbdullahGM1