shanice-l / gdrnpp_bop2022

PyTorch Implementation of GDRNPP, winner (most of the awards) of the BOP Challenge 2022 at ECCV'22
Apache License 2.0
229 stars 49 forks source link

Cholesky fails #114

Open zuodexin opened 6 months ago

zuodexin commented 6 months ago
Traceback (most recent call last):
  File "test_from_init_pose_pickle.py", line 390, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "test_from_init_pose_pickle.py", line 343, in main
    outputs = model(Gs=pose_input, images=images_input, depths_fullres=depths_input, \
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/usr/local/lib/python3.8/dist-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.__traceback__) from None
  File "/usr/local/lib/python3.8/dist-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/poselab/projects/bin-picking/gpose_cir/pose_models/raftse3.py", line 214, in forward
    Gs, _, _ = MoBA(target, weight, Gs, depths, intrinsics, num_solver_steps, ii, jj)
  File "/poselab/projects/bin-picking/gpose_cir/utils/geom/ba.py", line 217, in MoBA
    poses, depths, intrinsics = _step_moba(target, weight, poses, depths, intrinsics, ii, jj)
  File "/poselab/projects/bin-picking/gpose_cir/utils/geom/ba.py", line 203, in _step_moba
    dx = DenseSystemSolver.apply(_H, _v)
  File "/poselab/projects/bin-picking/gpose_cir/utils/geom/ba.py", line 128, in forward
    U = torch.cholesky(H)
RuntimeError: cholesky: (Batch element 0): The factorization could not be completed because the input is not positive-definite (the leading minor of order 4 is not positive-definite).

I got this problem using the given weights. I guess there might be something wrong with my data. Since I'm running on T-LESS dataset and there are not models directory, I symlink it to 'models_reconst'. Am I using the right models for rendering or is there any way to find the cause of this problem?

shanice-l commented 1 month ago

Sorry I didn't meet this error before. Maybe you should check if the matrices are positive-definite.