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

Make MMDetection config object accessible to users #904

Merged
merged 14 commits into from
Aug 12, 2021

Conversation

ai-fast-track
Copy link
Collaborator

@ai-fast-track ai-fast-track commented Aug 10, 2021

I'm making the MMDetection config object accessible to users. The goal is to be able to update model attributes: e.g. changing weighted loss parameters, changing anchor boxes ratios, etc.

model_type = models.mmdet.retinanet
backbone = model_type.backbones.resnet50_fpn_1x
'cfg_options' = { 
  'model.bbox_head.loss_bbox.loss_weight': 2,
  'model.bbox_head.loss_cls.loss_weight': 0.8 }

# Passing cfg_options to the `model()` method to update loss weights
model = model_type.model(backbone=backbone(pretrained=True), num_classes=len(parser.class_map), cfg_options=cfg_options)

closes #903

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #904 (f2ad5d9) into master (2d91eac) will increase coverage by 0.01%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master     #904      +/-   ##
==========================================
+ Coverage   87.44%   87.45%   +0.01%     
==========================================
  Files         232      232              
  Lines        5011     5015       +4     
==========================================
+ Hits         4382     4386       +4     
  Misses        629      629              
Flag Coverage Δ
unittests 87.45% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...ion/models/mmdet/common/bbox/single_stage/model.py 100.00% <ø> (ø)
icevision/models/mmdet/common/utils.py 82.05% <100.00%> (+0.97%) ⬆️
icevision/models/mmdet/utils.py 68.62% <100.00%> (+1.28%) ⬆️

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 2d91eac...fc3573a. Read the comment docs.

@ai-fast-track ai-fast-track merged commit 8739c4a into airctic:master Aug 12, 2021
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.

Make MMDetection config object accessible to users
1 participant