-
Notifications
You must be signed in to change notification settings - Fork 559
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
[Feature] Support CopyPaste for RotatedBoxes #657
Conversation
contours = cv2.findContours(self.masks[idx], cv2.RETR_TREE, | ||
cv2.CHAIN_APPROX_SIMPLE)[0][0] | ||
(cx, cy), (w, h), a = cv2.minAreaRect(contours) | ||
rboxes[idx, :] = np.array( | ||
[cx, cy, w, h, np.radians(a)], dtype=np.float32) |
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.
Here, we need to support mmrotate.core.bbox.poly2obb_np
for various angle versions.
However, poly2obb
supposes that polygons have 4 vertices.
How can we support this?
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.
In mmrotate1.x, we suppose all rotated boxes use oc
angle version during data transforms.
We only need to distinguish different angle versions within the box_head.
So I think it's OK to write like this.
Excellent job! It's very useful. |
@nijkah Sorry to reply so late. Anyway, I'm back. The project structure of MMDet and mmrotate has been updated. Please update your code according to https://github.com/open-mmlab/mmdetection/blob/3.x/mmdet/structures/mask/structures.py I will continue to pay attention to this important PR and hope your enthusiasm will not fade. |
@hongxrsysu I think it works normally after upgrading mmdet >= 2.26.0. Please refer to these links. |
@zytx121 The Is there any good way to support both |
Thanks! It works! |
Hi @nijkah! In 1. x, |
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
Closes #82
Modification
RBitMasks
RCopyPaste
Welcome any suggestions on the current implementation!
Example