Skip to content

Conversation

@brunopicinin
Copy link
Contributor

@brunopicinin brunopicinin commented Oct 29, 2025

Description

  • Fix Detections Stitch block to output correct image dimensions in detection metadata. Previously, dimensions were being reused from existing values in sv.Detections, which had metadata from crops' image sizes.
  • Use util function to update all parent metadata properly
  • Set proper mask resolution to fix stitching masks when single block step testing

Before fix (detections "outside" of image):

CleanShot.2025-10-29.at.15.14.44.mp4

After fix:

CleanShot.2025-10-29.at.15.13.43.mp4

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this change been tested, please provide a testcase or example of how you tested the change?

Locally

Will the change affect Universe? If so was this change tested in universe?

No

Any specific deployment considerations

No

@codeflash-ai
Copy link
Contributor

codeflash-ai bot commented Oct 29, 2025

⚡️ Codeflash found optimizations for this PR

📄 274% (2.74x) speedup for manage_crops_metadata in inference/core/workflows/core_steps/fusion/detections_stitch/v1.py

⏱️ Runtime : 1.33 milliseconds 356 microseconds (best of 385 runs)

A dependent PR with the suggested changes has been created. Please review:

If you approve, it will be merged into this PR (branch fix/stitch-block-image-dimensions).

@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit 9b69b3c into main Oct 31, 2025
42 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the fix/stitch-block-image-dimensions branch October 31, 2025 18:07
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.

5 participants