Skip to content

Conversation

@ebowwa
Copy link
Owner

@ebowwa ebowwa commented Jan 6, 2026

Summary

Fixes detection boxes appearing as vertical lines when video is letterboxed or pillarboxed.

Problem

Detection coordinates are normalized to original video dimensions, but were being transformed using the container geometry size. This caused incorrect rendering when the video aspect ratio differed from the container.

Solution

Modified prepareObjectForSwiftUI to accept an optional videoSize parameter:

  • Uses actual video dimensions for coordinate transformation
  • Scales transformed coordinates to fit the container geometry
  • Maintains backward compatibility

Test Plan

  • ✅ Build succeeds
  • ✅ App launches correctly
  • ✅ Detection boxes now render with proper aspect ratios

Related

Fixes: andrewginns#3
Upstream PR: andrewginns#4

🤖 Generated with Claude Code

@ebowwa ebowwa force-pushed the fix/detection-box-rendering branch from 4c2de76 to a792910 Compare January 6, 2026 20:04
@ebowwa ebowwa merged commit ad0c76f into main Jan 6, 2026
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.

ML proposal localizations not appearing correctly

2 participants