Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add more ways to load image data for classification and detection #1372

Merged
merged 3 commits into from Jul 1, 2022

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented Jun 30, 2022

What does this PR do?

Adds:

  • ImageClassificationData.from_images
  • ObjectDetectionData.from_numpy
  • ObjectDetectionData.from_images
  • ObjectDetectionData.from_tensors

Fixes #1371

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 馃檭

@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #1372 (dc16e80) into master (d751b83) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1372      +/-   ##
==========================================
+ Coverage   92.77%   92.81%   +0.04%     
==========================================
  Files         285      285              
  Lines       12685    12755      +70     
==========================================
+ Hits        11768    11839      +71     
+ Misses        917      916       -1     
Flag Coverage 螖
unittests 92.81% <100.00%> (+0.04%) 猬嗭笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
flash/image/classification/data.py 98.64% <100.00%> (+0.05%) 猬嗭笍
flash/image/classification/input.py 100.00% <100.00%> (酶)
flash/image/detection/data.py 100.00% <100.00%> (酶)
flash/image/detection/input.py 100.00% <100.00%> (酶)
flash/text/question_answering/model.py 93.19% <0.00%> (+0.68%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update d751b83...dc16e80. Read the comment docs.

@ethanwharris ethanwharris added this to the 0.8.0 milestone Jun 30, 2022
@ethanwharris ethanwharris added the enhancement New feature or request label Jun 30, 2022
@ethanwharris ethanwharris marked this pull request as ready for review June 30, 2022 17:47
@ethanwharris ethanwharris changed the title Add more ways to load image data Add more ways to load image data for classification and detection Jun 30, 2022
@ethanwharris ethanwharris merged commit ff92d44 into master Jul 1, 2022
@ethanwharris ethanwharris deleted the feature/image_data_formats branch July 1, 2022 09:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It would be nice to have something like ObjectDetectionData.from_image which accepted pil images.
1 participant