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

[BUG] from_rotated_box: theta kwarg represents clockwise, not counterclockwise rotation #4279

Open
3 tasks
allenleetc opened this issue Apr 17, 2024 · 1 comment
Labels
bug Bug fixes

Comments

@allenleetc
Copy link
Contributor

Describe the problem

The doc for from_rotated_box indicates that the theta kwarg represents a counter-clockwise rotation in radians (as would be typical).

However, in practice the rotation on the image as displayed in the App is clockwise.

Screenshot 2024-04-16 at 10 25 52 PM

Code to reproduce issue

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset('quickstart',
                               max_samples=1,
                               dataset_name='rotated-box',
                               drop_existing_dataset=True)
dataset.persistent = True

dataset.compute_metadata()
metadata = dataset.first().metadata
polyline = fo.Polyline.from_rotated_box(200, 100, 150, 30, np.pi/8, 
                                        frame_size=(metadata.width,metadata.height), 
                                        label='foo')
sample = dataset.first()
sample['rotated_box'] = polyline
sample.save()

session = fo.launch_app(dataset,auto=False)

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 22.04): MacOS 14.4
  • Python version (python --version): 3.10
  • FiftyOne version (fiftyone --version): 0.23.7
  • FiftyOne installed from (pip or source): pip

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@allenleetc allenleetc added the bug Bug fixes label Apr 17, 2024
@allenleetc
Copy link
Contributor Author

This is probably just due to axis conventions for image display; maybe just a doc issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant