[Feature] Support CocoPanoptic Metric#106
Open
BIGWangYuDong wants to merge 16 commits intoopen-mmlab:mainfrom
Open
[Feature] Support CocoPanoptic Metric#106BIGWangYuDong wants to merge 16 commits intoopen-mmlab:mainfrom
BIGWangYuDong wants to merge 16 commits intoopen-mmlab:mainfrom
Conversation
6 tasks
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
RangiLyu
reviewed
Mar 3, 2023
Co-authored-by: RangiLyu <lyuchqi@gmail.com>
BIGWangYuDong
commented
Mar 7, 2023
RangiLyu
reviewed
Mar 8, 2023
| thing_classes = self.dataset_meta['thing_classes'] | ||
| elif self.dataset_meta and 'THING_CLASSES' in self.dataset_meta: | ||
| thing_classes = self.dataset_meta['THING_CLASSES'] | ||
| warnings.warn( |
Member
There was a problem hiding this comment.
It will raise a warning whenever you call it.
BIGWangYuDong
commented
Mar 8, 2023
| @property | ||
| def thing_classes(self) -> tuple: | ||
| """Get thing classes from self.dataset_meta.""" | ||
| if self.dataset_meta and 'thing_classes' in self.dataset_meta: |
Collaborator
Author
There was a problem hiding this comment.
add comments we will Deprecate in v1.0.0
RangiLyu
reviewed
Mar 8, 2023
Comment on lines
+681
to
+690
| if self.dataset_meta and 'thing_classes' in self.dataset_meta: | ||
| thing_classes = self.dataset_meta['thing_classes'] | ||
| elif self.dataset_meta and 'THING_CLASSES' in self.dataset_meta: | ||
| thing_classes = self.dataset_meta['THING_CLASSES'] | ||
| warnings.warn( | ||
| 'DeprecationWarning: The `THING_CLASSES` in `dataset_meta` ' | ||
| 'is deprecated, use `thing_classes` instead!') | ||
| else: | ||
| raise RuntimeError('Could not find `thing_classes` in ' | ||
| f'dataset_meta: {self.dataset_meta}') |
Member
There was a problem hiding this comment.
Suggested change
| if self.dataset_meta and 'thing_classes' in self.dataset_meta: | |
| thing_classes = self.dataset_meta['thing_classes'] | |
| elif self.dataset_meta and 'THING_CLASSES' in self.dataset_meta: | |
| thing_classes = self.dataset_meta['THING_CLASSES'] | |
| warnings.warn( | |
| 'DeprecationWarning: The `THING_CLASSES` in `dataset_meta` ' | |
| 'is deprecated, use `thing_classes` instead!') | |
| else: | |
| raise RuntimeError('Could not find `thing_classes` in ' | |
| f'dataset_meta: {self.dataset_meta}') | |
| if hasattr(self, '_thing_classes'): | |
| return self._thing_classes | |
| else: | |
| if self.dataset_meta and 'thing_classes' in self.dataset_meta: | |
| thing_classes = self.dataset_meta['thing_classes'] | |
| elif self.dataset_meta and 'THING_CLASSES' in self.dataset_meta: | |
| thing_classes = self.dataset_meta['THING_CLASSES'] | |
| warnings.warn( | |
| 'DeprecationWarning: The `THING_CLASSES` in `dataset_meta` ' | |
| 'is deprecated, use `thing_classes` instead!') | |
| else: | |
| raise RuntimeError('Could not find `thing_classes` in ' | |
| f'dataset_meta: {self.dataset_meta}') | |
| self._thing_classes = thing_classes | |
| return thing_classes | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PR: open-mmlab/mmdetection#9863
Thanks to the previous work of @Even-ok, I optimized it on the basis of #69
TODO:
Before:

After:
