Skip to content

Commit edcdbcc

Browse files
authored
Merge pull request #47 from dongminlee94/main
Fix: Tensor Type Issue for `cv2.boxPoints()` in `gen_bbx()` by Explicit Float Conversion
2 parents 88140a0 + f30aad1 commit edcdbcc

File tree

1 file changed

+1
-1
lines changed
  • libcom/shadow_generation/source/cldm

1 file changed

+1
-1
lines changed

libcom/shadow_generation/source/cldm/cldm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def gen_bbx(self, pred_t, fg_instance_bbx, mask):
373373
pred_bbx[i,3] = temp
374374
pred_bbx[i,4] = pred_bbx[i,4] - 90
375375
x, y, w, h, theta = pred_bbx[i,0], pred_bbx[i,1], pred_bbx[i,2], pred_bbx[i,3], pred_bbx[i,4]
376-
box = ((x, y), (w, h), theta)
376+
box = ((float(x), float(y)), (float(w), float(h)), float(theta))
377377
box_points = cv2.boxPoints(box)
378378
## 训练时添加扰动
379379
# perturbation = np.random.uniform(-5, 5, box_points.shape)

0 commit comments

Comments
 (0)