Skip to content

Fix GUI detection colors by rendering the original image - #631

Draft
divyanshAgarwal123 wants to merge 1 commit into
JdeRobot:masterfrom
divyanshAgarwal123:fix/524-original-inference-image
Draft

Fix GUI detection colors by rendering the original image#631
divyanshAgarwal123 wants to merge 1 commit into
JdeRobot:masterfrom
divyanshAgarwal123:fix/524-original-inference-image

Conversation

@divyanshAgarwal123

Copy link
Copy Markdown

What changed

The image detection tab was converting the model input tensor back to a display image. When normalization is configured, that tensor no longer contains display-ready RGB values.

This change draws the predictions on the original uploaded RGB image instead. The prediction path already maps bounding boxes back to the original image coordinates. A regression test verifies that the original image is passed to the drawing function and that the normalized sample is not requested.

Reproduction

With a small RGB sample, the current conversion changed pixel (128, 64, 32) to (18, 23, 195).

Checks

  • Black formatting check
  • pytest: 47 passed

Fixes #524

Signed-off-by: Divyansh agarwal <85987665+divyanshAgarwal123@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Inference tab renders normalized tensors without inverse normalization.

1 participant