-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Conversation
add get_ann_info in RepeatDataset and ConcatDataset to support MultiImageMixDataset
Hi, thanks for your contribution. We fixed python3.9 CI, please merge the latest master. |
Would you like to add |
As far as I know, only ClassBalancedDataset is not supported. I will try it. |
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
fix lint
There was a problem hiding this 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
@@ -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): |
There was a problem hiding this comment.
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.
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