Yuliang commited on
Commit
ddda3eb
1 Parent(s): fb140f6

fix bug for multi-person

Browse files
Files changed (2) hide show
  1. configs/econ.yaml +1 -1
  2. lib/common/imutils.py +2 -2
configs/econ.yaml CHANGED
@@ -29,7 +29,7 @@ bni:
29
  boundary_consist: 1e-6
30
  poisson_depth: 10
31
  use_smpl: ["hand", "face"]
32
- use_ifnet: True
33
  use_poisson: True
34
  hand_thres: 8e-2
35
  face_thres: 6e-2
 
29
  boundary_consist: 1e-6
30
  poisson_depth: 10
31
  use_smpl: ["hand", "face"]
32
+ use_ifnet: False
33
  use_poisson: True
34
  hand_thres: 8e-2
35
  face_thres: 6e-2
lib/common/imutils.py CHANGED
@@ -43,8 +43,8 @@ def get_affine_matrix_box(boxes, w2, h2):
43
  ).T #(N,2)
44
  scale = torch.min(torch.tensor([w2 / width, h2 / height]),
45
  dim=0)[0].unsqueeze(1).repeat(1, 2) * 0.9 #(N,2)
46
- transl = torch.tensor([w2 / 2.0 - center[:, 0], h2 / 2.0 - center[:, 1]]).unsqueeze(0) #(N,2)
47
- M = get_affine_matrix2d(transl, center, scale, angle=torch.tensor([0.]))
48
 
49
  return M
50
 
 
43
  ).T #(N,2)
44
  scale = torch.min(torch.tensor([w2 / width, h2 / height]),
45
  dim=0)[0].unsqueeze(1).repeat(1, 2) * 0.9 #(N,2)
46
+ transl = torch.cat([w2 / 2.0 - center[:, 0:1], h2 / 2.0 - center[:, 1:2]], dim=1) #(N,2)
47
+ M = get_affine_matrix2d(transl, center, scale, angle=torch.tensor([0.,]*transl.shape[0]))
48
 
49
  return M
50