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

[Enhance] Add 'get_ann_info' to dataset_wrappers. #6352

Closed
wants to merge 4 commits into from
Closed

[Enhance] Add 'get_ann_info' to dataset_wrappers. #6352

wants to merge 4 commits into from

Conversation

zhaoxin111
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

add get_ann_info in RepeatDataset and ConcatDataset to support MultiImageMixDataset

Modification

add get_ann_info in RepeatDataset and ConcatDataset

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

add get_ann_info in RepeatDataset and ConcatDataset to support MultiImageMixDataset
@CLAassistant
Copy link

CLAassistant commented Oct 23, 2021

CLA assistant check
All committers have signed the CLA.

@RangiLyu
Copy link
Member

RangiLyu commented Nov 1, 2021

Hi, thanks for your contribution. We fixed python3.9 CI, please merge the latest master.

@RangiLyu
Copy link
Member

RangiLyu commented Nov 1, 2021

Would you like to add get_ann_info to all other dataset wrapper so all of these wrappers can support MultiImageMixDataset?

@zhaoxin111
Copy link
Contributor Author

Would you like to add get_ann_info to all other dataset wrapper so all of these wrappers can support MultiImageMixDataset?

As far as I know, only ClassBalancedDataset is not supported. I will try it.

@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #6352 (6872686) into master (db256a1) will increase coverage by 0.00%.
The diff coverage is 20.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6352   +/-   ##
=======================================
  Coverage   62.08%   62.09%           
=======================================
  Files         319      319           
  Lines       25304    25318   +14     
  Branches     4188     4191    +3     
=======================================
+ Hits        15711    15720    +9     
- Misses       8769     8770    +1     
- Partials      824      828    +4     
Flag Coverage Δ
unittests 62.06% <20.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
mmdet/datasets/dataset_wrappers.py 76.21% <20.00%> (-4.97%) ⬇️
mmdet/core/bbox/assigners/max_iou_assigner.py 72.36% <0.00%> (-1.32%) ⬇️
mmdet/apis/inference.py 38.53% <0.00%> (+0.35%) ⬆️
mmdet/models/dense_heads/corner_head.py 69.46% <0.00%> (+1.40%) ⬆️
mmdet/models/detectors/cornernet.py 100.00% <0.00%> (+5.12%) ⬆️

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 db256a1...6872686. Read the comment docs.

@RangiLyu RangiLyu changed the base branch from master to dev-v2.18.1 November 4, 2021 08:47
Copy link
Member

@RangiLyu RangiLyu left a comment

Choose a reason for hiding this comment

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

One more thing: Would you like to add some unit tests?
Try to use MagicMock to mock the data_infos in the dataset. You can refer to the unit test of MultiImageMixDataset in tests/test_data/test_datasets/test_dataset_wrapper.py

@RangiLyu RangiLyu changed the title Update dataset_wrappers.py [Enhance] Add 'get_ann_info' to dataset_wrappers. Nov 4, 2021
@RangiLyu RangiLyu requested a review from hhaAndroid November 4, 2021 08:52
@@ -165,6 +187,18 @@ def get_cat_ids(self, idx):

return self.dataset.get_cat_ids(idx % self._ori_len)

def get_ann_info(self, idx):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to add a note explaining why it is needed.

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.

4 participants