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

Improvements to icevision data loading #889

Closed
wants to merge 15 commits into from

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented Oct 25, 2021

What does this PR do?

This PR moves conversion from icevision record to dict to the load_data hook. This means that we can use Flash to load the image file rather than icevision so that support for formats is a match to what we have in image classification.

Fixes #881

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 Oct 25, 2021

Codecov Report

Merging #889 (16cfdc7) into master (2ad6359) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 16cfdc7 differs from pull request most recent head 76f6d5d. Consider uploading reports for the commit 76f6d5d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #889      +/-   ##
==========================================
+ Coverage   89.08%   89.09%   +0.01%     
==========================================
  Files         230      230              
  Lines       12708    12705       -3     
==========================================
- Hits        11321    11320       -1     
+ Misses       1387     1385       -2     
Flag Coverage Δ
unittests 89.09% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
flash/__about__.py 100.00% <100.00%> (ø)
flash/core/data/data_source.py 94.80% <100.00%> (ø)
flash/core/integrations/icevision/data.py 87.50% <100.00%> (+1.22%) ⬆️
flash/core/integrations/icevision/transforms.py 95.00% <100.00%> (+0.83%) ⬆️
flash/image/detection/data.py 93.75% <100.00%> (ø)

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 2ad6359...76f6d5d. Read the comment docs.

record.set_img(image)
record.add_component(ClassMapRecordComponent(task=tasks.detection))
record = to_icevision_record(sample)
record.autofix()
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this voodoo function do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The autofix just has some simple logic to deal with invalid annotations. E.g. often you get bounding boxes that are out of bounds due to floating point wierdness, and this would clamp them to the width / height of the image.

@stale
Copy link

stale bot commented Jan 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jan 2, 2022
@ethanwharris ethanwharris removed the won't fix This will not be worked on label Jan 4, 2022
@ethanwharris ethanwharris mentioned this pull request Jan 11, 2022
8 tasks
@ethanwharris ethanwharris added this to the v0.8 milestone Feb 19, 2022
@stale
Copy link

stale bot commented Apr 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Apr 21, 2022
@stale stale bot closed this Apr 30, 2022
@Borda Borda reopened this Mar 7, 2023
@Borda Borda requested a review from krshrimali as a code owner March 7, 2023 12:25
@Borda Borda closed this Mar 7, 2023
@stale stale bot removed won't fix This will not be worked on labels Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exeded RAM for instance segmentation
4 participants