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

[Fix] Remove dependcy mmdet when do not use MaskFormerHead and MMDET_Mask2FormerHead #2448

Merged
merged 2 commits into from Dec 30, 2022

Conversation

MeowZheng
Copy link
Collaborator

Motivation

Calling mmseg.utils.register_all_modules will import MaskFormerHead and Mask2FormerHead, it will crash if mmdet is not installed as None cannot be initialized.

Modification

  • Modify MMDET_MaskFormerHead=BaseModule and MMDET_Mask2FormerHead = BaseModule when cannot import from mmdet

@MeowZheng MeowZheng changed the title Fix depends mmdet [Fix] Remove dependcy mmdet when do not use MaskFormerHead and MMDET_Mask2FormerHead Dec 30, 2022
@codecov
Copy link

codecov bot commented Dec 30, 2022

Codecov Report

Base: 83.33% // Head: 83.46% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (627d4ab) compared to base (534b27b).
Patch coverage: 90.67% of modified lines in pull request are covered.

❗ Current head 627d4ab differs from pull request most recent head 573850c. Consider uploading reports for the commit 573850c to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2448      +/-   ##
===========================================
+ Coverage    83.33%   83.46%   +0.12%     
===========================================
  Files          143      144       +1     
  Lines         8127     8238     +111     
  Branches      1211     1226      +15     
===========================================
+ Hits          6773     6876     +103     
- Misses        1165     1170       +5     
- Partials       189      192       +3     
Flag Coverage Δ
unittests 83.46% <90.67%> (+0.12%) ⬆️

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

Impacted Files Coverage Δ
mmseg/models/decode_heads/mask2former_head.py 89.83% <50.00%> (+0.17%) ⬆️
mmseg/models/decode_heads/maskformer_head.py 93.84% <50.00%> (+0.09%) ⬆️
mmseg/datasets/transforms/transforms.py 95.23% <88.31%> (-1.20%) ⬇️
mmseg/datasets/__init__.py 100.00% <100.00%> (ø)
mmseg/datasets/transforms/__init__.py 100.00% <100.00%> (ø)
mmseg/models/segmentors/__init__.py 100.00% <100.00%> (ø)
mmseg/models/segmentors/base.py 90.14% <100.00%> (+2.26%) ⬆️
mmseg/models/segmentors/seg_tta.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng MeowZheng merged commit d88f393 into open-mmlab:dev-1.x Dec 30, 2022
@MeowZheng MeowZheng deleted the fix-depends-mmdet branch December 30, 2022 17:03
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* Adding support for `safetensors` and LoRa.

* Adding metadata.
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
…ET_Mask2FormerHead` (open-mmlab#2448)

## Motivation

Calling `mmseg.utils.register_all_modules` will import `MaskFormerHead`
and `Mask2FormerHead`, it will crash if mmdet is not installed as `None`
cannot be initialized.

## Modification

- Modify `MMDET_MaskFormerHead=BaseModule` and `MMDET_Mask2FormerHead =
BaseModule` when cannot import from mmdet
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.

None yet

2 participants