Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Multitask Training With mmdet and yolov5 Models #856

Draft
wants to merge 122 commits into
base: master
Choose a base branch
from

Conversation

rsomani95
Copy link
Contributor

@rsomani95 rsomani95 commented May 31, 2021

This PR is the culmination of a long ongoing dicussion centered around multitask training on the icevision Discord forums. See this channel for more info.

This PR brings together a few things:

Common

  • ImageClassificationHead - A flexible single layer classification head that can work with either traditional classification models (where features are pooled) or FPN outputs in a flexible way
  • HybridSingleStageDetector - An mmdet -> SingleStageDetector extension that allows for classification with an arbitrary number of ImageClassificationHead heads
  • HybridAugmentationsRecordDataset - A dataset that allows for different augmentations for specific tasks. In practice, the model will do multiple forward passes for groups of tasks, followed by a collective backward pass. Useful when augmentations for a particular task destroy information for a different task
  • Tutorial with ExDark dataset
  • Standardise documentation style - it's currently structured, but not in a consistent way

MMDet - Single Stage

  • Hybrid single stage model - can be used for RetinaNet and FCOS out of the box
  • Model multi augmentation forward function
  • Model freezing interface
  • Model unfreezing interface
  • dataloaders for single image datasets
  • dataloaders for multi image augmentation datasets
  • higher level train_dl, valid_dl dataloader wrappers
  • prediction code
  • Fastai adapter
  • PyTorch Lightning adapter
  • Icevision style model loading API
    • RetinaNet loader
    • FCOS loader
  • Tests

Ultralytics - YOLO

  • Model implementation
  • Model multi augmentation forward function
  • Model freezing interface
  • Model unfreezing interface
  • dataloaders for single image datasets
  • dataloaders for multi image augmentation datasets
  • higher level train_dl, valid_dl dataloader wrappers
  • prediction code
  • Fastai adapter
  • PyTorch Lightning adapter
  • Icevision style model loading API
  • Tutorial for exporting? Should this be a module?
  • Tests

@rsomani95 rsomani95 changed the title Multitask Training With mmdet Models [WIP] Multitask Training With mmdet Models May 31, 2021
@codecov
Copy link

codecov bot commented May 31, 2021

Codecov Report

Merging #856 (d14a453) into master (38d46bf) will decrease coverage by 15.20%.
The diff coverage is 1.22%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #856       +/-   ##
===========================================
- Coverage   87.60%   72.40%   -15.21%     
===========================================
  Files         231      259       +28     
  Lines        4899     6066     +1167     
===========================================
+ Hits         4292     4392      +100     
- Misses        607     1674     +1067     
Flag Coverage Δ
unittests 72.40% <1.22%> (-15.21%) ⬇️

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

Impacted Files Coverage Δ
.../models/multitask/classification_heads/__init__.py 0.00% <0.00%> (ø)
...n/models/multitask/classification_heads/builder.py 0.00% <0.00%> (ø)
...sion/models/multitask/classification_heads/head.py 0.00% <0.00%> (ø)
...evision/models/multitask/data/dataloading_utils.py 0.00% <0.00%> (ø)
icevision/models/multitask/data/dataset.py 0.00% <0.00%> (ø)
...ion/models/multitask/engines/lightning/__init__.py 0.00% <0.00%> (ø)
...itask/engines/lightning/lightning_model_adapter.py 0.00% <0.00%> (ø)
icevision/models/multitask/mmdet/dataloaders.py 0.00% <0.00%> (ø)
icevision/models/multitask/mmdet/dtypes.py 0.00% <0.00%> (ø)
icevision/models/multitask/mmdet/pl_adapter.py 0.00% <0.00%> (ø)
... and 68 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 38d46bf...d14a453. Read the comment docs.

@rsomani95 rsomani95 changed the title [WIP] Multitask Training With mmdet Models [WIP] Multitask Training With mmdet and yolov5 Models Jun 13, 2021
@FraPochetti
Copy link
Contributor

I think we shall close this one.
@ai-fast-track ?

@rsomani95 rsomani95 marked this pull request as draft December 31, 2021 19:06
@rsomani95
Copy link
Contributor Author

@FraPochetti @ai-fast-track converting this to a draft for now. Hope to get back to it soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants