Skip to content

[Enhance] Replace data_dict calling 'img' key to support MMDet3D#514

Merged
xvjiarui merged 3 commits intoopen-mmlab:masterfrom
Wuziyi616:mmdet3d_compatibility
Apr 29, 2021
Merged

[Enhance] Replace data_dict calling 'img' key to support MMDet3D#514
xvjiarui merged 3 commits intoopen-mmlab:masterfrom
Wuziyi616:mmdet3d_compatibility

Conversation

@Wuziyi616
Copy link
Copy Markdown
Contributor

Hi, I am Ziyi, a developer from MMDet3D. In order to train/test 3D seg algorithms, I need to call functions from MMSeg. However, some functions in MMSeg calls data['img'], which causes KeyError because we don't have img. I replace these calling with some workarounds and make it compatibility with MMDet3D. Hope you can approve it. Thanks.

@Wuziyi616 Wuziyi616 changed the title [Enhance] Remove data_dict calling 'img' key in some functions [Enhance] Replace data_dict calling 'img' key to support MMDet3D Apr 25, 2021
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 25, 2021

Codecov Report

Merging #514 (b1a9bb6) into master (98ef5ac) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #514      +/-   ##
==========================================
+ Coverage   86.56%   86.60%   +0.04%     
==========================================
  Files          99       99              
  Lines        5164     5160       -4     
  Branches      836      834       -2     
==========================================
- Hits         4470     4469       -1     
+ Misses        535      533       -2     
+ Partials      159      158       -1     
Flag Coverage Δ
unittests 86.60% <100.00%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
mmseg/models/segmentors/base.py 44.95% <ø> (ø)
mmseg/apis/test.py 22.68% <100.00%> (ø)
mmseg/models/builder.py 91.30% <0.00%> (+9.82%) ⬆️

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 98ef5ac...b1a9bb6. Read the comment docs.

@Wuziyi616 Wuziyi616 requested a review from xvjiarui April 26, 2021 07:50
@Wuziyi616
Copy link
Copy Markdown
Contributor Author

This PR is ready for review @xvjiarui. Thanks!

results.append(result)

batch_size = data['img'][0].size(0)
batch_size = len(result)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@xvjiarui xvjiarui merged commit 768f704 into open-mmlab:master Apr 29, 2021
@Wuziyi616 Wuziyi616 deleted the mmdet3d_compatibility branch April 29, 2021 08:12
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
…n-mmlab#514)

* remove dict calling img key for compatibility

* fix unit test

* infer batch size using len(result) to be consistent with mmcv
michaelzhang-ai pushed a commit to michaelzhang-ai/mmsegmentation that referenced this pull request Mar 22, 2024
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