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

Image size access from ImageAnnotation #893

Merged
merged 25 commits into from
Aug 26, 2022
Merged

Image size access from ImageAnnotation #893

merged 25 commits into from
Aug 26, 2022

Conversation

hepengfe
Copy link
Collaborator

@hepengfe hepengfe commented Jul 27, 2022

This PR fixes #880.

Description of changes

  • implement a function in image annotation to get the image size by ImageAnnotation.pack.get_payload().cache_shape

Possible influences of this PR.

  • ImageAnnotation can access image size that it operates on.
  • all payloads can be initialized with data shape
    For text data, it is the length of the text.[length, text_embedding_dim]
    For audio data, it is the length of the audio. [length, audio_embedding_dim]
    For image data, it is the shape of the image. [height, width, channel]

Test Conducted

Describe what test cases are included for the PR.

@hepengfe hepengfe added topic: data Issue about data loader modules and data processing related topic:cv labels Jul 27, 2022
@hepengfe hepengfe self-assigned this Jul 27, 2022
@hepengfe hepengfe mentioned this pull request Jul 27, 2022
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #893 (29c9ce3) into master (588d6bc) will decrease coverage by 0.07%.
The diff coverage is 41.02%.

@@            Coverage Diff             @@
##           master     #893      +/-   ##
==========================================
- Coverage   80.95%   80.88%   -0.08%     
==========================================
  Files         254      254              
  Lines       19566    19599      +33     
==========================================
+ Hits        15840    15852      +12     
- Misses       3726     3747      +21     
Impacted Files Coverage Δ
tests/forte/image_annotation_test.py 81.08% <25.00%> (-18.92%) ⬇️
forte/data/ontology/top.py 75.68% <52.17%> (-0.76%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hepengfe hepengfe changed the title Image size init in Image payload and access image size from ImageAnnotation Image size access from ImageAnnotation Aug 16, 2022
@hepengfe hepengfe requested a review from mylibrar August 16, 2022 18:36
@hepengfe hepengfe marked this pull request as ready for review August 17, 2022 08:51
forte/data/ontology/top.py Outdated Show resolved Hide resolved
forte/data/ontology/top.py Show resolved Hide resolved
@hepengfe hepengfe merged commit 6b29ed2 into asyml:master Aug 26, 2022
@hepengfe hepengfe deleted the image_size_init branch August 26, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:cv topic: data Issue about data loader modules and data processing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImagePayload initialized with image size
2 participants