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

Ontology Box init by top left point and bottom right point #879

Merged
merged 17 commits into from
Jul 19, 2022
Merged

Ontology Box init by top left point and bottom right point #879

merged 17 commits into from
Jul 19, 2022

Conversation

hepengfe
Copy link
Collaborator

This PR fixes #878.

Description of changes

  • The default Box init method: height and width and center -> init Box by top left point and bottom right point
  • move init by height & width & center to a classmethod

Possible influences of this PR.

It can simplify the Box API and enable two ways of initialization.

Test Conducted

Tested wrong box shape and wrong x/y coordinates of top left point and bottom right point.

@hepengfe hepengfe added topic: ontology All issues related to ontologies in core, top and base_ontology topic:cv labels Jul 14, 2022
@hepengfe hepengfe self-assigned this Jul 14, 2022
@hepengfe hepengfe changed the title Box init Ontology Box init by top left point and bottom right point Jul 14, 2022
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #879 (6316d8a) into master (9e20ed5) will increase coverage by 0.07%.
The diff coverage is 73.21%.

@@            Coverage Diff             @@
##           master     #879      +/-   ##
==========================================
+ Coverage   80.78%   80.86%   +0.07%     
==========================================
  Files         254      254              
  Lines       19401    19434      +33     
==========================================
+ Hits        15673    15715      +42     
+ Misses       3728     3719       -9     
Impacted Files Coverage Δ
forte/data/ontology/top.py 78.22% <54.54%> (+2.46%) ⬆️
tests/forte/image_annotation_test.py 100.00% <100.00%> (ø)

@hepengfe hepengfe marked this pull request as ready for review July 14, 2022 20:02
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
tests/forte/image_annotation_test.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
@hepengfe
Copy link
Collaborator Author

Actually, not one of those PR require BoundingBox so I think we can still include here to differentiate BoundingBox and Box. And current BoundingBox is in vanilla status and can be added more functionality as needed.

forte/data/ontology/top.py Outdated Show resolved Hide resolved
tests/forte/image_annotation_test.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Outdated Show resolved Hide resolved
@hepengfe hepengfe merged commit 64fade1 into asyml:master Jul 19, 2022
@hepengfe hepengfe deleted the box_init branch July 19, 2022 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:cv topic: ontology All issues related to ontologies in core, top and base_ontology
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Box API
2 participants