From c18e0bfc8f7c8ca9c039b112ac695bab94b4f323 Mon Sep 17 00:00:00 2001 From: Georgia Gkioxari Date: Tue, 2 Apr 2024 21:00:30 -0700 Subject: [PATCH] lower eps in box iou3d --- pytorch3d/csrc/iou_box3d/iou_utils.cuh | 2 +- pytorch3d/csrc/iou_box3d/iou_utils.h | 2 +- tests/test_iou_box3d.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch3d/csrc/iou_box3d/iou_utils.cuh b/pytorch3d/csrc/iou_box3d/iou_utils.cuh index 5ad5b165d..4702ed7a7 100644 --- a/pytorch3d/csrc/iou_box3d/iou_utils.cuh +++ b/pytorch3d/csrc/iou_box3d/iou_utils.cuh @@ -15,7 +15,7 @@ // are orthogonal (or coplanar). It's an epsilon on cos(θ). // With dEpsilon = 0.001, two unit vectors are considered co-planar // if their θ = 2.5 deg. -__constant__ const float dEpsilon = 1e-3; +__constant__ const float dEpsilon = 1e-4; // aEpsilon: Used once in main function to check for small face areas __constant__ const float aEpsilon = 1e-4; // kEpsilon: Used only for norm(u) = u/max(||u||, kEpsilon) diff --git a/pytorch3d/csrc/iou_box3d/iou_utils.h b/pytorch3d/csrc/iou_box3d/iou_utils.h index 283822a11..892ea028e 100644 --- a/pytorch3d/csrc/iou_box3d/iou_utils.h +++ b/pytorch3d/csrc/iou_box3d/iou_utils.h @@ -22,7 +22,7 @@ // are orthogonal (or coplanar). It's an epsilon on cos(θ). // With dEpsilon = 0.001, two unit vectors are considered co-planar // if their θ = 2.5 deg. -const auto dEpsilon = 1e-3; +const auto dEpsilon = 1e-4; // aEpsilon: Used once in main function to check for small face areas const auto aEpsilon = 1e-4; // kEpsilon: Used only for norm(u) = u/max(||u||, kEpsilon) diff --git a/tests/test_iou_box3d.py b/tests/test_iou_box3d.py index f5f2b9e44..50b1d233b 100644 --- a/tests/test_iou_box3d.py +++ b/tests/test_iou_box3d.py @@ -21,7 +21,7 @@ OBJECTRON_TO_PYTORCH3D_FACE_IDX = [0, 4, 6, 2, 1, 5, 7, 3] DATA_DIR = get_tests_dir() / "data" DEBUG = False -DOT_EPS = 1e-3 +DOT_EPS = 1e-4 AREA_EPS = 1e-4 UNIT_BOX = [