Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing Rotated Boxes Flip Randomly when resizing #788

Open
1 of 2 tasks
quitmeyer opened this issue Jan 8, 2025 · 3 comments
Open
1 of 2 tasks

Existing Rotated Boxes Flip Randomly when resizing #788

quitmeyer opened this issue Jan 8, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@quitmeyer
Copy link
Contributor

Search before asking

  • I have searched the X-AnyLabeling issues and found no similar bug report.

X-AnyLabeling Component

User Interface (UI)

Bug

So using the latest version of X anylabeling
image

If I have existing rotated box annotations like this:

image

and then I go to resize a box by grabbing one of its corners like this:
image

The whole box kinda jumps or rotates randomly. The only difference between the above photo, and the one below is i clicked and started dragging the corner circled in red.
image

Sometimes the shape is even weirder. Needless to say it's a pretty frustrating bug.

Information

python: can't open file 'C:\Users\andre\anylabeling\checks.py': [Errno 2] No such file or directory)

Link to a Reproducible Demonstration Video

i posted photos

Execution Mode

Pre-compiled Executable

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@quitmeyer quitmeyer added the bug Something isn't working label Jan 8, 2025
@CVHub520
Copy link
Owner

CVHub520 commented Jan 8, 2025

Sorry, but I’m unable to reproduce the issue you’re experiencing. As a suggestion, please ensure that the rotation shapes itself is valid. For instance, if the data was imported from an external model or a label file, it might result in distortion when dragging, as the coordinate format may not comply with X-AnyLabeling’s specifications.

If possible, please record a video demonstrating the entire process from the beginning, rather than sharing a single screenshot, as a screenshot alone cannot provide enough context to identify the problem.

01-05-41.mp4

@quitmeyer
Copy link
Contributor Author

" if the data was imported from an external model or a label file, it might result in distortion when dragging, as the"

I do think it only comes from data that was created externally, so I think you are right! I figured since the box renders correctly, they would be compatible, but once the box is moved, it shifts. Is there a reference for X-anylabeling's specifications?

@CVHub520
Copy link
Owner

CVHub520 commented Jan 9, 2025

Hey there! @quithmeyer,

It seems to occur because quad-type shapes (e.g., irregular quadrilaterals) are being defined as rotation types. While these shapes may sometimes visually resemble rotated bounding boxes, their underlying coordinate definitions differ.

quad shapes usually rely on explicit corner coordinates. When these quad shapes are treated as rotation types, transformations like dragging or resizing may result in unexpected shifts or distortions due to the mismatched assumptions about how the geometry is calculated.

For example, in OCR tasks like ocr_with_region, people usually define quad types. However, if these are mistakenly set as rotation types, it can cause distortions when dragging. Therefore, please ensure that the data you import or the results obtained through model inference comply with the standards for rotated boxes. To debug this, you can write a simple script to check the relationships between the coordinate points.

Let me know if further clarification is needed! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants