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

feat: Add Retinanet and backbones for detection #121

Merged
merged 20 commits into from
Feb 16, 2021

Conversation

kaushikb11
Copy link
Contributor

@kaushikb11 kaushikb11 commented Feb 14, 2021

What does this PR do?

Add Retinanet & backbones for detection with fpn support.

Support for torchvision and bolts backbones.

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 Feb 14, 2021

Codecov Report

Merging #121 (25500b3) into master (be07c10) will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
+ Coverage   87.12%   87.39%   +0.26%     
==========================================
  Files          49       49              
  Lines        1554     1579      +25     
==========================================
+ Hits         1354     1380      +26     
+ Misses        200      199       -1     
Flag Coverage Δ
unittests 87.39% <100.00%> (+0.26%) ⬆️

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

Impacted Files Coverage Δ
flash/vision/backbones.py 93.54% <100.00%> (+2.63%) ⬆️
flash/vision/classification/model.py 100.00% <100.00%> (ø)
flash/vision/detection/model.py 73.97% <100.00%> (+8.51%) ⬆️
flash/vision/embedding/image_embedder_model.py 79.66% <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 be07c10...76fa0b0. Read the comment docs.

@kaushikb11 kaushikb11 marked this pull request as ready for review February 14, 2021 19:32
@Borda Borda added the documentation Improvements or additions to documentation label Feb 14, 2021
flash/vision/backbones.py Outdated Show resolved Hide resolved
flash/vision/detection/model.py Show resolved Hide resolved
flash/vision/detection/model.py Outdated Show resolved Hide resolved
@kaushikb11 kaushikb11 added backbone Flash backbone enhancement New feature or request labels Feb 14, 2021
@kaushikb11 kaushikb11 changed the title feat: Add backbones for detection [WIP] feat: Add Retinanet and backbones for detection Feb 14, 2021
@kaushikb11 kaushikb11 marked this pull request as draft February 14, 2021 20:25
@kaushikb11 kaushikb11 changed the title [WIP] feat: Add Retinanet and backbones for detection feat: Add Retinanet and backbones for detection Feb 14, 2021
@kaushikb11 kaushikb11 marked this pull request as ready for review February 14, 2021 22:27
@kaushikb11 kaushikb11 removed the documentation Improvements or additions to documentation label Feb 15, 2021
@kaushikb11 kaushikb11 self-assigned this Feb 15, 2021
flash/vision/backbones.py Show resolved Hide resolved
flash/vision/backbones.py Show resolved Hide resolved
fpn: bool = True,
pretrained: bool = True,
pretrained_backbone: bool = True,
trainable_backbone_layers: int = 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic could/should be within FinetuningCallback.

If the user requires model= fasterrcnn, then it should choose the FasterRCNNFinetuning Callback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both the models will have the same FineTuningCallback as they would have similar backbones, but different heads. But yes, could think of moving trainable_backbone_layers for FineTuningCallback OR we could offer some options for finetuning functionalities to the User and it would override the trainable_backbone_layers.

flash/vision/detection/model.py Outdated Show resolved Hide resolved
docs/source/reference/object_detection.rst Outdated Show resolved Hide resolved
docs/source/reference/object_detection.rst Outdated Show resolved Hide resolved
@williamFalcon williamFalcon merged commit 24c5b66 into Lightning-Universe:master Feb 16, 2021
@kaushikb11 kaushikb11 deleted the detect/back branch February 16, 2021 13:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backbone Flash backbone enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants