ROMP icon indicating copy to clipboard operation
ROMP copied to clipboard

【ROMP】romp/lib/utils/projection.py未定义INVALID_TRANS,引发训练时错误

Open 15897811771 opened this issue 2 years ago • 2 comments

您好,我在训练ROMP的时候,偶尔会遇到NameError: name 'INVALID_TRANS' is not defined的问题,好像是由于romp/lib/utils/projection.py引用了这个未定义的参数,请问您知道怎么解决吗.

15897811771 avatar Feb 01 '23 11:02 15897811771

bug日志如下

Epoch: [0][850/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 280.80 | Losses {'reg': 252.22, 'det': 28.58, 'CenterMap': 28.58, 'P_KP2D': 49.88, 'MPJPE': 104.67, 'PAMPJPE': 35.15, 'Pose': 59.25, 'Shape': 0.68, 'Prior': 2.59} Epoch: [0][900/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 300.81 | Losses {'reg': 267.77, 'det': 33.04, 'CenterMap': 33.04, 'P_KP2D': 50.77, 'MPJPE': 118.01, 'PAMPJPE': 36.24, 'Pose': 59.48, 'Shape': 0.66, 'Prior': 2.61} Bin size was too small in the coarse rasterization phase. This caused an overflow, meaning output may be incomplete. To solve, try increasing max_faces_per_bin / max_points_per_bin, decreasing bin_size, or setting bin_size to 0 to use the naive rasterization.Bin size was too small in the coarse rasterization phase. This caused an overflow, meaning output may be incomplete. To solve, try increasing max_faces_per_bin / max_points_per_bin, decreasing bin_size, or setting bin_size to 0 to use the naive rasterization.Epoch: [0][950/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 295.17 | Losses {'reg': 263.04, 'det': 32.13, 'CenterMap': 32.13, 'P_KP2D': 48.09, 'MPJPE': 119.18, 'PAMPJPE': 34.19, 'Pose': 58.33, 'Shape': 0.66, 'Prior': 2.6} Epoch: [0][1000/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 287.90 | Losses {'reg': 253.48, 'det': 34.42, 'CenterMap': 34.42, 'P_KP2D': 49.9, 'MPJPE': 109.95, 'PAMPJPE': 33.79, 'Pose': 56.57, 'Shape': 0.65, 'Prior': 2.62} Epoch: [0][1050/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 279.03 | Losses {'reg': 247.6, 'det': 31.43, 'CenterMap': 31.43, 'P_KP2D': 48.29, 'MPJPE': 106.23, 'PAMPJPE': 34.22, 'Pose': 55.65, 'Shape': 0.62, 'Prior': 2.59} Epoch: [0][1100/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 281.43 | Losses {'reg': 250.56, 'det': 30.87, 'CenterMap': 30.87, 'P_KP2D': 49.82, 'MPJPE': 107.14, 'PAMPJPE': 33.69, 'Pose': 56.69, 'Shape': 0.62, 'Prior': 2.61} Epoch: [0][1150/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 268.40 | Losses {'reg': 234.66, 'det': 33.74, 'CenterMap': 33.74, 'P_KP2D': 45.85, 'MPJPE': 98.54, 'PAMPJPE': 32.61, 'Pose': 54.44, 'Shape': 0.63, 'Prior': 2.6} Epoch: [0][1200/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 269.47 | Losses {'reg': 235.81, 'det': 33.66, 'CenterMap': 33.66, 'P_KP2D': 44.66, 'MPJPE': 99.38, 'PAMPJPE': 32.63, 'Pose': 55.91, 'Shape': 0.63, 'Prior': 2.59} Epoch: [0][1250/12153] Time 0.00 RUN 0.99 Lr 5e-05 Loss 276.87 | Losses {'reg': 248.24, 'det': 28.63, 'CenterMap': 28.63, 'P_KP2D': 43.51, 'MPJPE': 113.71, 'PAMPJPE': 32.87, 'Pose': 54.91, 'Shape': 0.63, 'Prior': 2.61} Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/root/autodl-tmp/ROMP/model/romp/train.py", line 189, in main() File "/root/autodl-tmp/ROMP/model/romp/train.py", line 183, in main trainer.train() File "/root/autodl-tmp/ROMP/model/romp/train.py", line 49, in train self.train_epoch(epoch) File "/root/autodl-tmp/ROMP/model/romp/train.py", line 115, in train_epoch outputs, loss = self.train_step(meta_data) File "/root/autodl-tmp/ROMP/model/romp/train.py", line 54, in train_step outputs = self.network_forward(self.model, meta_data, self.train_cfg) File "/root/autodl-tmp/ROMP/model/romp/base.py", line 123, in network_forward outputs = model(meta_data, **cfg_dict) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward return self.module(*inputs[0], **kwargs[0]) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/ROMP/model/romp/lib/models/base.py", line 28, in forward return self.matching_forward(meta_data, **cfg) File "/root/autodl-tmp/ROMP/model/romp/lib/models/base.py", line 40, in matching_forward outputs, meta_data = self._result_parser.matching_forward(outputs, meta_data, cfg) File "/root/autodl-tmp/ROMP/model/romp/lib/maps_utils/result_parser.py", line 34, in matching_forward outputs = self.params_map_parser(outputs,meta_data) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/root/autodl-tmp/ROMP/model/romp/lib/utils/../models/smpl_wrapper.py", line 51, in forward outputs.update(vertices_kp3d_projection(outputs,meta_data=meta_data,presp=args().perspective_proj))
File "/root/autodl-tmp/ROMP/model/romp/lib/utils/../models/../utils/projection.py", line 34, in vertices_kp3d_projection cam_trans = estimate_translation(predicts_j3ds, predicts_pj2ds, File "/root/autodl-tmp/ROMP/model/romp/lib/utils/../models/../utils/projection.py", line 94, in estimate_translation trans[i] = INVALID_TRANS NameError: name 'INVALID_TRANS' is not defined

15897811771 avatar Feb 01 '23 11:02 15897811771

我翻到了之前的issue#112,INVALID_TRANS = np.ones(3)*-1

15897811771 avatar Feb 01 '23 11:02 15897811771