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

add object detection prediction example and fix batch #283

Merged
merged 5 commits into from
May 12, 2021

Conversation

edgarriba
Copy link
Contributor

What does this PR do?

Add object detection example #277

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 🙃

@edgarriba edgarriba linked an issue May 12, 2021 that may be closed by this pull request
@edgarriba edgarriba added the enhancement New feature or request label May 12, 2021
@edgarriba edgarriba force-pushed the feat/object_detection branch from 4433656 to cab4952 Compare May 12, 2021 10:30
@edgarriba edgarriba force-pushed the feat/object_detection branch from cab4952 to 9ebe92e Compare May 12, 2021 10:30
@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #283 (95aed15) into master (1380c53) will increase coverage by 5.73%.
The diff coverage is 100.00%.

❗ Current head 95aed15 differs from pull request most recent head 2dc2410. Consider uploading reports for the commit 2dc2410 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   82.48%   88.22%   +5.73%     
==========================================
  Files          74       74              
  Lines        3575     3576       +1     
==========================================
+ Hits         2949     3155     +206     
+ Misses        626      421     -205     
Flag Coverage Δ
unittests 88.22% <100.00%> (+5.73%) ⬆️

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

Impacted Files Coverage Δ
flash/data/batch.py 80.62% <100.00%> (+4.24%) ⬆️
flash/vision/segmentation/data.py 88.63% <0.00%> (ø)
flash/data/data_pipeline.py 93.05% <0.00%> (+0.69%) ⬆️
flash/vision/classification/data.py 93.40% <0.00%> (+1.09%) ⬆️
flash/data/properties.py 83.11% <0.00%> (+1.29%) ⬆️
flash/vision/backbones.py 77.66% <0.00%> (+1.94%) ⬆️
flash/data/data_module.py 92.34% <0.00%> (+2.39%) ⬆️
flash/data/data_source.py 96.72% <0.00%> (+2.41%) ⬆️
flash/core/trainer.py 87.17% <0.00%> (+5.12%) ⬆️
... and 15 more

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 1380c53...2dc2410. Read the comment docs.

@edgarriba edgarriba force-pushed the feat/object_detection branch from 534281a to 4b877c8 Compare May 12, 2021 11:15
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@edgarriba edgarriba force-pushed the feat/object_detection branch from 4b877c8 to 95aed15 Compare May 12, 2021 11:21
Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -243,6 +243,8 @@ def default_uncollate(batch: Any):
batch_type = type(batch)

if isinstance(batch, Tensor):
if len(batch.shape) == 0: # 0 shape tensors
return batch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason not to return a list here? (like [batch])

@ethanwharris ethanwharris merged commit f320720 into master May 12, 2021
@ethanwharris ethanwharris deleted the feat/object_detection branch May 12, 2021 14:39
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.

Add an object detection predict example
3 participants