TRI-ML / dd3d

Official PyTorch implementation of DD3D: Is Pseudo-Lidar needed for Monocular 3D Object detection? (ICCV 2021), Dennis Park*, Rares Ambrus*, Vitor Guizilini, Jie Li, and Adrien Gaidon.
MIT License
451 stars 74 forks source link

RuntimeError: cannot perform reduction function argmax on a tensor with no elements because the operation does not have an identity #33

Open 1s23 opened 2 years ago

1s23 commented 2 years ago

`Error executing job with overrides: ['+experiments=dd3d_kitti_dla34_overfit', 'EVAL_ONLY=True', 'MODEL.CKPT=/home/cgim/yyh/github/dd3d/model_final.pth', 'TEST.IMS_PER_BATCH=4'] Traceback (most recent call last): File "./scripts/train.py", line 60, in main test_results = do_test(cfg, model, is_last=True) File "./scripts/train.py", line 232, in do_test per_dataset_results = inference_on_dataset(model, dataloader, evaluator) File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/detectron2/evaluation/evaluator.py", line 158, in inference_on_dataset outputs = model(inputs) File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/core.py", line 121, in forward fcos2d_info File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 327, in call pred_instances[lvl], fcos2d_info[lvl] File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 408, in forward_for_single_feature_map depth_is_distance=self.predict_distance File "/home/cgim/yyh/github/dd3d/tridet/modeling/dd3d/fcos3d.py", line 48, in predictions_to_boxes3d quat = allocentric_to_egocentric(quat, proj_ctr, inv_intrinsics) File "/home/cgim/yyh/github/dd3d/tridet/utils/geometry.py", line 47, in allocentric_to_egocentric egocentric_quat = matrix_to_quaternion(R_obj_to_global) File "/home/cgim/anaconda3/envs/yyh/lib/python3.6/site-packages/pytorch3d/transforms/rotation_conversions.py", line 151, in matrix_to_quaternion F.one_hot(q_abs.argmax(dim=-1), num_classes=4) > 0.5, : # pyre-ignore[16] RuntimeError: cannot perform reduction function argmax on a tensor with no elements because the operation does not have an identity

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.`

Can you tell me how to solve this problem? When I use this model I get an error like this

截图_20220622204726

chegnyanjun commented 1 year ago

@1s23 hi, I met the same problem, Do you have solved it now?