-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] Add points_in_polygons CUDA op for rotated detection. #1600
Conversation
Please @AllentDan have a look. |
Hi, @zytx121. Unit tests failed on my device. |
Sorry, I'll check it as soon as possible. |
Please test again. Thx. |
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.
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Is there any limit about the polygon? Such as convex or clockwise? Test failed with data: points = np.array([[20, 90]])
polygons = np.array([[0., 0., 100., 100., 10., 90., 0., 100.]]) If there are any limit about the polygon, please update the docstring. |
We believe that this method can handle all polygons without adding conditions such as convex or clockwise. As shown in the figure below, this point falls inside the polygon, which is consistent with the test results.
Note that the format of the polygon is (x,y,x,y,x,y,x,y). |
@zytx121 Thanks for the explanation. The data did pass the test as you said. |
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.
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Can be merged after resolving conflicts. |
Add points_in_polygons CUDA ops for anchor-free rotated detection. It is mainly used to judge whether the points are inside the ground true polygons during sample assignment.
Modification
Several files in mmcv/ops folder.
BC-breaking (Optional)
No.
Use cases (Optional)
from mmcv.ops import points_in_polygons