| 
45 | 45 | ]  | 
46 | 46 | 
 
  | 
47 | 47 | 
 
  | 
48 |  | -def _check_coplanar(boxes: torch.Tensor, eps: float = 1e-5) -> None:  | 
 | 48 | +def _check_coplanar(boxes: torch.Tensor, eps: float = 1e-4) -> None:  | 
49 | 49 |     faces = torch.tensor(_box_planes, dtype=torch.int64, device=boxes.device)  | 
50 | 50 |     # pyre-fixme[16]: `boxes` has no attribute `index_select`.  | 
51 | 51 |     verts = boxes.index_select(index=faces.view(-1), dim=1)  | 
@@ -89,7 +89,7 @@ def backward(ctx, grad_vol, grad_iou):  | 
89 | 89 | 
 
  | 
90 | 90 | 
 
  | 
91 | 91 | def box3d_overlap(  | 
92 |  | -    boxes1: torch.Tensor, boxes2: torch.Tensor  | 
 | 92 | +    boxes1: torch.Tensor, boxes2: torch.Tensor, eps: float = 1e-4  | 
93 | 93 | ) -> Tuple[torch.Tensor, torch.Tensor]:  | 
94 | 94 |     """  | 
95 | 95 |     Computes the intersection of 3D boxes1 and boxes2.  | 
@@ -136,8 +136,8 @@ def box3d_overlap(  | 
136 | 136 |     if not all((8, 3) == box.shape[1:] for box in [boxes1, boxes2]):  | 
137 | 137 |         raise ValueError("Each box in the batch must be of shape (8, 3)")  | 
138 | 138 | 
 
  | 
139 |  | -    _check_coplanar(boxes1)  | 
140 |  | -    _check_coplanar(boxes2)  | 
 | 139 | +    _check_coplanar(boxes1, eps)  | 
 | 140 | +    _check_coplanar(boxes2, eps)  | 
141 | 141 | 
 
  | 
142 | 142 |     # pyre-fixme[16]: `_box3d_overlap` has no attribute `apply`.  | 
143 | 143 |     vol, iou = _box3d_overlap.apply(boxes1, boxes2)  | 
 | 
0 commit comments