mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-25 08:40:35 +08:00
small fix for iou3d
Summary: A small numerical fix for IoU for 3D boxes, fixes GH #992 * Adds a check for boxes with zero side areas (invalid boxes) * Fixes numerical issue when two boxes have coplanar sides Reviewed By: nikhilaravi Differential Revision: D33195691 fbshipit-source-id: 8a34b4d1f1e5ec2edb6d54143930da44bdde0906
This commit is contained in:
committed by
Facebook GitHub Bot
parent
069c9fd759
commit
ccfb72cc50
@@ -90,7 +90,8 @@ __global__ void IoUBox3DKernel(
|
||||
for (int b2 = 0; b2 < box2_count; ++b2) {
|
||||
const bool is_coplanar =
|
||||
IsCoplanarFace(box1_intersect[b1], box2_intersect[b2]);
|
||||
if (is_coplanar) {
|
||||
const float area = FaceArea(box1_intersect[b1]);
|
||||
if ((is_coplanar) && (area > kEpsilon)) {
|
||||
tri2_keep[b2].keep = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user