chensong1995 / HybridPose

HybridPose: 6D Object Pose Estimation under Hybrid Representation (CVPR 2020)
MIT License
412 stars 64 forks source link

error end of inference torch.solve --> torch.linalg.solve #80

Closed monajalal closed 10 months ago

monajalal commented 10 months ago

I got this error end of inference:

Epoch: [199][9/19]  Time: 0.356 (0.265) Sym: 4.1955 (3.8577)    Mask: 0.0054 (0.0077)   Pts: 0.0173 (0.0161)    Graph: 2.2473 (2.1458)  Total: 0.8229 (0.7688)
Epoch: [199][10/19] Time: 0.423 (0.279) Sym: 3.8438 (3.8564)    Mask: 0.0049 (0.0074)   Pts: 0.0147 (0.0159)    Graph: 1.6884 (2.1042)  Total: 0.7047 (0.7630)
Epoch: [199][11/19] Time: 0.171 (0.270) Sym: 4.7243 (3.9287)    Mask: 0.0112 (0.0077)   Pts: 0.0187 (0.0162)    Graph: 3.8997 (2.2538)  Total: 1.0606 (0.7878)
Epoch: [199][12/19] Time: 0.225 (0.267) Sym: 5.1071 (4.0194)    Mask: 0.0075 (0.0077)   Pts: 0.0174 (0.0163)    Graph: 3.3569 (2.3387)  Total: 1.0274 (0.8062)
Epoch: [199][13/19] Time: 0.447 (0.280) Sym: 3.3322 (3.9703)    Mask: 0.0057 (0.0076)   Pts: 0.0149 (0.0162)    Graph: 2.1500 (2.3252)  Total: 0.7026 (0.7988)
Epoch: [199][14/19] Time: 0.152 (0.271) Sym: 2.3985 (3.8655)    Mask: 0.0092 (0.0077)   Pts: 0.0155 (0.0161)    Graph: 1.6315 (2.2790)  Total: 0.5676 (0.7834)
Epoch: [199][15/19] Time: 0.261 (0.271) Sym: 4.4576 (3.9025)    Mask: 0.0075 (0.0077)   Pts: 0.0204 (0.0164)    Graph: 2.0311 (2.2635)  Total: 0.8604 (0.7882)
Epoch: [199][16/19] Time: 0.437 (0.280) Sym: 3.9817 (3.9072)    Mask: 0.0062 (0.0076)   Pts: 0.0156 (0.0163)    Graph: 1.6679 (2.2284)  Total: 0.7275 (0.7846)
Epoch: [199][17/19] Time: 0.256 (0.279) Sym: 4.7202 (3.9523)    Mask: 0.0075 (0.0076)   Pts: 0.0141 (0.0162)    Graph: 2.4042 (2.2382)  Total: 0.8608 (0.7889)
Epoch: [199][18/19] Time: 0.165 (0.273) Sym: 2.4379 (3.9035)    Mask: 0.0065 (0.0076)   Pts: 0.0142 (0.0162)    Graph: 1.4234 (2.2119)  Total: 0.5343 (0.7807)
Testing...
Loss: 0.6806
Successfully saved model into saved_weights/linemod/ape/checkpoints/0.001/199
Traceback (most recent call last):
  File "/home/mona/HybridPose/src/train_core.py", line 112, in <module>
    trainer.generate_data(val_loader)
  File "/home/mona/HybridPose/./trainers/coretrainer.py", line 572, in generate_data
    pts2d_pred_loc, pts2d_pred_var = self.vote_keypoints(pts2d_map_pred, mask_pred)
  File "/home/mona/HybridPose/./trainers/coretrainer.py", line 323, in vote_keypoints
    mean = ransac_voting_layer_v3(mask, pts2d_map, 512, inlier_thresh=0.99)
  File "/home/mona/HybridPose/lib/ransac_voting_gpu_layer/ransac_voting_gpu.py", line 595, in ransac_voting_layer_v3
    all_win_pts=torch.matmul(b_inv(ATA),torch.unsqueeze(ATb,2)) # [vn,2,1]
  File "/home/mona/HybridPose/lib/ransac_voting_gpu_layer/ransac_voting_gpu.py", line 511, in b_inv
    b_inv, _ = torch.solve(eye, b_mat)
  File "/home/mona/anaconda3/envs/hybridpose/lib/python3.10/site-packages/torch/_linalg_utils.py", line 109, in solve
    raise RuntimeError(
RuntimeError: This function was deprecated since version 1.9 and is now removed. Please use the `torch.linalg.solve` function instead.
monajalal commented 10 months ago
# b_inv, _ = torch.solve(eye, b_mat)
b_inv = torch.linalg.solve(eye, b_mat)