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

Refactoring bounding_box.py #42

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

J-The-Fox
Copy link
Member

closes #37

Refactoring bounding_box.py

A refactor for bounding_box.py

Changes

  • Removed ObjectType class
  • Removed __repr__ method from BoundingBox class
  • Removed verticies properties (both setter and getter) from BoundingBox class
  • Removed obj_type properties (both setter and getter) from BoundingBox class
  • Removed attributes properties (both setter and getter) from BoundingBox class
  • Removed set_attribute method from BoundingBox class
  • Removed get_attribute method from BoundingBox class
  • Removed get_rotation_angle method from BoundingBox class
  • Removed get_tlwh method from BoundingBox class
  • Updated BoundingBox class parameters from verticies, obj_type, and attributes to top_left, width, and height
  • Updated __init__ method for BoundingBox class to reflect updated parameters
  • Updated docstring for BoundingBox class to reflect updated parameters
  • Updated driver for testing the BoundingBox class
  • Added additional comments throughout some of the methods in BoundingBox class

Additional Notes

Some of the methods can be further refactored to not use 4 verticies. However, I left them as such to not have to redo the math that goes into them. If need be, I can update those methods as well.

@J-The-Fox J-The-Fox added the vision Vision subteam / works with computer vision to interact with photos and identify important objects label Nov 15, 2024
@J-The-Fox J-The-Fox self-assigned this Nov 15, 2024
@J-The-Fox
Copy link
Member Author

J-The-Fox commented Nov 15, 2024

Looks like some other files may need to be updated before this can go through? As it seems that some of these were used by other files that pre-commit didn't catch during the commit itself (Like vision.standard_object.odlc_contour_filtering.py). I'm guessing these need to be updated as well

Copy link

@OrangePear13 OrangePear13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to go! Nice work

@OrangePear13
Copy link

Just the pre-commit errors in bounding_box.py need to be addressed. The other errors will be dealt with

@J-The-Fox
Copy link
Member Author

Just the pre-commit errors in bounding_box.py need to be addressed. The other errors will be dealt with

Ah alright, so those would be updated separate then?

@OrangePear13
Copy link

Yeah, I will take a look at the other files. Given that other people currently are changing those as well, I will coordinate with them to make necessary adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vision Vision subteam / works with computer vision to interact with photos and identify important objects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Bounding Box Code
2 participants