aliyun / conditional-lane-detection

Apache License 2.0
386 stars 89 forks source link

KeyError: 'gt_points' when run the image_demo.py #45

Open batuhanbeytekin opened 2 years ago

batuhanbeytekin commented 2 years ago

I have tried to test my image with tusimple_small.pth. I ran this command line python3 demo/image_demo.py ../linesDetected.jpg configs/condlanenet/tusimple/tusimple_small_test.py ../Downloads/tusimple_small.pth.

When I run the command I get this error:

/home/batuhanbeytekin/conditional-lane-detection/mmdet/models/necks/trans_fpn.py:44: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). dim_t = self.temperature*(2 (dim_t // 2) / self.num_pos_feats) /home/batuhanbeytekin/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1640811797118/work/aten/src/ATen/native/TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] The model and loaded state dict do not match exactly

unexpected key in source state_dict: bbox_head.reg_branch.0.conv.weight, bbox_head.reg_branch.0.bn.weight, bbox_head.reg_branch.0.bn.bias, bbox_head.reg_branch.0.bn.running_mean, bbox_head.reg_branch.0.bn.running_var, bbox_head.reg_branch.0.bn.num_batches_tracked, bbox_head.reg_branch.1.conv.weight, bbox_head.reg_branch.1.bn.weight, bbox_head.reg_branch.1.bn.bias, bbox_head.reg_branch.1.bn.running_mean, bbox_head.reg_branch.1.bn.running_var, bbox_head.reg_branch.1.bn.num_batches_tracked, bbox_head.reg_branch.2.conv.weight, bbox_head.reg_branch.2.bn.weight, bbox_head.reg_branch.2.bn.bias, bbox_head.reg_branch.2.bn.running_mean, bbox_head.reg_branch.2.bn.running_var, bbox_head.reg_branch.2.bn.num_batches_tracked

Traceback (most recent call last): File "demo/image_demo.py", line 26, in main() File "demo/image_demo.py", line 20, in main result = inference_detector(model, args.img) File "/home/batuhanbeytekin/conditional-lane-detection/mmdet/apis/inference.py", line 82, in inference_detector data = test_pipeline(data) File "/home/batuhanbeytekin/conditional-lane-detection/mmdet/datasets/pipelines/compose.py", line 29, in call data = t(data) File "/home/batuhanbeytekin/conditional-lane-detection/mmdet/datasets/pipelines/lane_formating.py", line 420, in call valid = self.target(results) File "/home/batuhanbeytekin/conditional-lane-detection/mmdet/datasets/pipelines/lane_formating.py", line 332, in target gt_points = results['gt_points'] KeyError: 'gt_points'

Does anyone know how to solve this problem?

GongDianCheng commented 2 years ago

Hi bro,have you solved this problem? I meet the same problem.