Skip to content

Enable non square resolution for custom object detection #396

@leonce-m

Description

@leonce-m

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, bug report, or anything other than a feature request directly related to this project.

Proposal

As evident in the ZED SDK custom object detection sample, the onnx dynamic input shape can be set to a non-square resolution.

detection_parameters.custom_onnx_dynamic_input_shape = sl::Resolution(320, 320);

But in the ros2 wrapper it is set to a single integer value, which I assume default constructs a square sl::Resolution with width and height equal to mYoloOnnxSize.

od_p.custom_onnx_dynamic_input_shape = mYoloOnnxSize

I propose allowing the object_detection.custom_onnx_input_size ros2 parameter to be an array or adding object_detection.custom_onnx_input_width and object_detection.custom_onnx_input_height, such that non-square input tensors can be used.

Use-Case

Running YOLO inference on a non-square input tensor.

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions