-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
copypaste_based_on_bbox #8905
copypaste_based_on_bbox #8905
Conversation
Hi @JarvisKevin Thanks for your kind PR. It seems that CLA is not signed. Could you sign the CLA so that eventually we could merge this PR after review? You can check the contents and follow the instruction in the communication box shown as below |
[MMDet] copypaste with bbox - Jarvis的文章 - 知乎 |
Is there any idea to test this change in test_transforms.py? |
Thanks for you kind PR! CopyPaste with the PR can be directly used in object detection. Can you show images with CopyPaste based on bboxes? In addition, verify that CopyPaste can be used normally with |
@Czm369 Thanks for your suggestion of the unit_test. The picture with cp based on bboxes was posted on https://zhuanlan.zhihu.com/p/568957551, maybe you can refer it. |
The unit test for CopyPaste is at
|
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.
LGTM
Codecov ReportBase: 64.12% // Head: 64.10% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev #8905 +/- ##
==========================================
- Coverage 64.12% 64.10% -0.03%
==========================================
Files 361 361
Lines 29536 29558 +22
Branches 5022 4925 -97
==========================================
+ Hits 18939 18947 +8
- Misses 9580 9594 +14
Partials 1017 1017
Flags with carried forward coverage won't be shown. Click here to find out more.
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. |
drop parameter "using_cutmix" add indicator "paste_by_box"
@JarvisKevin Please fix the lint |
@@ -2813,6 +2814,42 @@ def get_indexes(self, dataset): | |||
""" | |||
return random.randint(0, len(dataset)) | |||
|
|||
def gen_masks_from_bboxes(self, bboxes, img_shape): |
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.
Does the dev-3.x branch need to be updated in sync?
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.
Yes, we should migrate the change.
We need to migrate this PR to MMDet 3.x |
…pen-mmlab#8905) * copypaste_based_on_bbox * docformatter * formatter again * fix bug of dict get method in check_gt_masks * test copypaste based on bbox * change mask generating method * docformatter * docformatter * update comment 'result' to 'results' * rename * Update transforms.py * Update transforms.py * Update transforms.py * rename 'mask_gen' to 'using_cutmix' * yapf * Add files via upload * yapf * paste_by_box drop parameter "using_cutmix" add indicator "paste_by_box"
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
It's much more expensive for us to annotate a mask label than bbox. So, How copypaste can be utilized when only bbox provided?
Modification
If only gt_bboxes provided, gt_masks can be generated by the gt_bboxes to get a second best preformance.