ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.19k stars 9.71k forks source link

What is the reason for the program exiting when using Apollo's perception module? #14871

Open cherishTMYY opened 1 year ago

cherishTMYY commented 1 year ago

We appreciate you go through Apollo documentations and search previous issues before creating an new one. If neither of the sources helped you with your issues, please report the issue using the following form. Please note missing info can delay the response time.

System information

Steps to reproduce the issue:

Supporting materials (screenshots, command lines, code/script snippets):

I0406 11:11:07.341879 171746 global_data.cc:153] []host ip: 172.17.45.186 I0406 11:11:07.346683 171746 module_argument.cc:57] []binaryname is mainboard, processgroup is mainboard_default, has 1 dag conf I0406 11:11:07.346715 171746 module_argument.cc:60] []dag_conf: modules/perception/production/dag/dag_streaming_perception_camera.dag terminate called after throwing an instance of 'torch::jit::ErrorReport' what():

aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor): Expected at most 12 arguments but found 13 positional arguments. : /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/conv.py(419): _conv_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/conv.py(423): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/container.py(117): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/code/baidu/apollo-bj/apollo-perception/apollo_perception/camera/obstacle/SMOKE/smoke/modeling/backbone/dla.py(387): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/code/baidu/apollo-bj/apollo-perception/apollo_perception/camera/obstacle/SMOKE/smoke/modeling/backbone/dla.py(294): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/container.py(117): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/code/baidu/apollo-bj/apollo-perception/apollo_perception/camera/obstacle/SMOKE/smoke/modeling/detector/keypoint_detector.py(47): forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(709): _slow_forward /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/nn/modules/module.py(725): _call_impl /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/jit/_trace.py(934): trace_module /home/zhangxiao/anaconda3/envs/pytorch1.7/lib/python3.8/site-packages/torch/jit/_trace.py(733): trace tools/torch2onnx.py(59): main tools/torch2onnx.py(66): Serialized File "code/torch/torch/nn/modules/conv.py", line 8 def forward(self: torch.torch.nn.modules.conv.Conv2d, input: Tensor) -> Tensor: input0 = torch._convolution(input, self.weight, None, [1, 1], [3, 3], [1, 1], False, [0, 0], 1, True, False, True, True)


    return input0
class ConvTranspose2d(Module):

Aborted (core dumped)
LordonCN commented 1 year ago

It seems that you load ONNX type model, but the config file select libtorch type model. Can you past more information about your config file?

cherishTMYY commented 1 year ago

It seems that you load ONNX type model, but the config file select libtorch type model. Can you past more information about your config file?

stage_config: { stage_type: SMOKE_OBSTACLE_DETECTION enabled: true type: "camera_detector"

camera_detector_config { gpu_id: 0 camera_name: "front_6mm" root_dir: "/apollo/modules/perception/production/data/perception/camera/models/yolo_obstacle_detector" conf_file: "smoke-config.pt" } }

smoke-config.pt

model_param { model_name: "./3d-r4-half_caffe" model_type: "Obstacle" weight_file: "../smoke_libtorch_model/smoke_libtorch_model.pth" proto_file: "../smoke_libtorch_model/smoke_libtorch_model.pth" anchors_file: "anchors.txt" types_file: "types.txt" calibratetable_root: "./3d-r4-half_caffe" confidence_threshold: 0.25 offset_ratio: 0.0 cropped_ratio: 1.185185185185 resized_width: 960 aligned_pixel: 32 min_2d_height: 10 min_3d_height: 0.1 ori_cycle: 1 with_box3d: true light_swt_conf_threshold: 0 light_vis_conf_threshold: 0 with_lights: false with_ratios: false

num_areas: 4

border_ratio: 0.01 } net_param { det1_loc_blob: "loc_pred" det1_obj_blob: "obj_pred" det1_cls_blob: "cls_pred" det1_ori_blob: "ori_pred" det1_dim_blob: "dim_pred" input_data_blob: "data" input_ratio_blob: "ratio" input_instric_blob: "K" feat_blob: "conv3_3" } nms_param { type: "NormalNMS" threshold: 0.5 sigma: 0.4 inter_cls_nms_thresh: 0.6 }

cherishTMYY commented 1 year ago

It seems that you load ONNX type model, but the config file select libtorch type model. Can you past more information about your config file?

stage_config: { stage_type: SMOKE_OBSTACLE_DETECTION enabled: true type: "camera_detector"

camera_detector_config { gpu_id: 0 camera_name: "front_6mm" root_dir: "/apollo/modules/perception/production/data/perception/camera/models/yolo_obstacle_detector" conf_file: "smoke-config.pt" } }

smoke-config.pt

model_param { model_name: "./3d-r4-half_caffe" model_type: "Obstacle" weight_file: "../smoke_libtorch_model/smoke_libtorch_model.pth" proto_file: "../smoke_libtorch_model/smoke_libtorch_model.pth" anchors_file: "anchors.txt" types_file: "types.txt" calibratetable_root: "./3d-r4-half_caffe" confidence_threshold: 0.25 offset_ratio: 0.0 cropped_ratio: 1.185185185185 resized_width: 960 aligned_pixel: 32 min_2d_height: 10 min_3d_height: 0.1 ori_cycle: 1 with_box3d: true light_swt_conf_threshold: 0 light_vis_conf_threshold: 0 with_lights: false with_ratios: false

num_areas: 4

border_ratio: 0.01 } net_param { det1_loc_blob: "loc_pred" det1_obj_blob: "obj_pred" det1_cls_blob: "cls_pred" det1_ori_blob: "ori_pred" det1_dim_blob: "dim_pred" input_data_blob: "data" input_ratio_blob: "ratio" input_instric_blob: "K" feat_blob: "conv3_3" } nms_param { type: "NormalNMS" threshold: 0.5 sigma: 0.4 inter_cls_nms_thresh: 0.6 }