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

[WIP] IceVision Integration #408

Closed
wants to merge 9 commits into from
Closed

[WIP] IceVision Integration #408

wants to merge 9 commits into from

Conversation

aniketmaurya
Copy link
Contributor

What does this PR do?

#119 - integration of IceVision

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 🙃

@aniketmaurya aniketmaurya mentioned this pull request Jun 13, 2021
8 tasks
@codecov
Copy link

codecov bot commented Jun 13, 2021

Codecov Report

Merging #408 (e90dc05) into master (de3f851) will decrease coverage by 6.09%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #408      +/-   ##
==========================================
- Coverage   91.31%   85.22%   -6.10%     
==========================================
  Files         112      113       +1     
  Lines        7061     7091      +30     
==========================================
- Hits         6448     6043     -405     
- Misses        613     1048     +435     
Flag Coverage Δ
unittests 85.22% <36.36%> (-6.10%) ⬇️

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

Impacted Files Coverage Δ
flash/image/detection/backbones.py 30.43% <30.43%> (ø)
flash/image/detection/model.py 40.69% <44.44%> (-40.56%) ⬇️
flash/core/utilities/imports.py 91.07% <100.00%> (+0.16%) ⬆️
flash/image/detection/data.py 29.60% <0.00%> (-66.41%) ⬇️
flash/image/segmentation/data.py 46.91% <0.00%> (-42.19%) ⬇️
flash/image/embedding/model.py 39.65% <0.00%> (-41.38%) ⬇️
flash/image/classification/data.py 54.65% <0.00%> (-39.54%) ⬇️
flash/image/detection/finetuning.py 62.50% <0.00%> (-37.50%) ⬇️
flash/image/data.py 65.62% <0.00%> (-34.38%) ⬇️
... and 16 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 de3f851...e90dc05. Read the comment docs.

@ethanwharris ethanwharris added this to the 0.4 milestone Jun 14, 2021
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.

Great work @aniketmaurya ! left a few comments 😃

if _ICEVISION_AVAILABLE:
import icevision

OBJECT_DETECTION_MODELS = FlashRegistry("backbones")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we call this OBJECT_DETECTION_HEADS instead?

OBJECT_DETECTION_BACKBONES(partial(load_backbone, _faster_rcnn), name='fasterrcnn')
OBJECT_DETECTION_BACKBONES(partial(load_backbone, _yolov5), name='yolov5')

@OBJECT_DETECTION_MODELS(name='icevision')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to register each head here, so name should be e.g. retinanet, faster_rcnn, yolov5, etc.

@@ -126,6 +127,12 @@ def get_model(
anchor_generator,
**kwargs,
):
if _ICEVISION_AVAILABLE:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't need a check here as the backbones will only be registered if the library is available.

@@ -74,7 +74,8 @@ class ObjectDetector(Task):

"""

backbones: FlashRegistry = OBJ_DETECTION_BACKBONES
backbones: FlashRegistry = OBJECT_DETECTION_BACKBONES
models: FlashRegistry = OBJECT_DETECTION_MODELS
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's call this heads as well :)

@ethanwharris ethanwharris modified the milestones: 0.4, 0.5 Jun 17, 2021
@Borda Borda added the enhancement New feature or request label Jun 26, 2021
@ethanwharris
Copy link
Collaborator

Closing this in favour of #608

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.

3 participants