apollo icon indicating copy to clipboard operation
apollo copied to clipboard

traffic_light detection with int8

Open leizi111 opened this issue 1 year ago • 8 comments

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 18.04): Ubuntu 20.04
  • Apollo installed from (source or binary): source
  • Apollo version (3.5, 5.0, 5.5, 6.0): 9.0
  • Output of apollo.sh config if on master branch: master

Steps to reproduce the issue:

Hello! When i use NVIDIA AGX orin run traffic_light perception with cyber_launch start modules/perception/launch/perception_trafficlight.launch, then terminal report an error: E0909 09:33:15.069639 61219 rt_net.cc:51] [mainboard]4: [standardEngineBuilder.cpp::initCalibrationParams::1460] Error Code 4: Internal Error (Calibration failure occurred with no scaling factors detected. This could be due to no int8 calibrator or insufficient custom scales for network layers. Please see int8 sample to setup calibration correctly.) traffic_light detection model download from https://apollo.baidu.com/community/article/1236. how can I fix this issue?

leizi111 avatar Sep 09 '24 02:09 leizi111

我也遇见了这个问题

E1022 17:38:31.408428 32422 rt_net.cc:51] 4: [standardEngineBuilder.cpp::initCalibrationParams::1460] Error Code 4: Internal Error (Calibration failure occurred with no scaling factors detected. This could be due to no int8 calibrator or insufficient custom scales for network layers. Please see int8 sample to setup calibration correctly.)

chenjian88888 avatar Oct 22 '24 09:10 chenjian88888

image

将detection.cc和classify.cc中的

  rt_net_.reset(inference::CreateInferenceByName(model_type, proto_file,
                                                 weight_file, net_outputs_,
                                                 net_inputs_, model_path));

改为如下,可强制使用FP32推理,临时解决问题

  rt_net_.reset(inference::CreateInferenceByName(model_type, proto_file,
                                                 weight_file, net_outputs_,
                                                 net_inputs_));

chenjian88888 avatar Oct 22 '24 10:10 chenjian88888

image

将detection.cc和classify.cc中的

  rt_net_.reset(inference::CreateInferenceByName(model_type, proto_file,
                                                 weight_file, net_outputs_,
                                                 net_inputs_, model_path));

改为如下,可强制使用FP32推理,临时解决问题

  rt_net_.reset(inference::CreateInferenceByName(model_type, proto_file,
                                                 weight_file, net_outputs_,
                                                 net_inputs_));

你好! 我也这样做了,现在网络的输出全是-1。 traffic_Light_detection_component.cc中的SelectOutputBoxes: output_blob = rt_net->get_blob(net_outputs_[0]) for (int i =0;i < output_blob->count();++i){ AERROR<<output_blob->cpu_data()[i]; } 输出全是-1。 导致traffic_lights->region.is_detected是false,交通灯的颜色是unknown,请问您遇到过这种错误吗? @chenjian88888

HandsomeAIccx avatar Jan 03 '25 07:01 HandsomeAIccx

没有遇到过。没有识别到结果的因素太多,需要调试模式下看下输入,还有内外参对不对

chenjian88888 avatar Jan 03 '25 08:01 chenjian88888

没有遇到过。没有识别到结果的因素太多,需要调试模式下看下输入,还有内外参对不对

谢谢,我用的就是apollo自己提供的sensor_rgb.record和perception Test V1来测的,一直是unknown,我不确定该怎么测试了,您能给我提供一些意见吗,怎么样测试红绿灯识别检测功能是否正常?我现在也没有其他数据包了。

HandsomeAIccx avatar Jan 06 '25 08:01 HandsomeAIccx

没有遇到过。没有识别到结果的因素太多,需要调试模式下看下输入,还有内外参对不对

谢谢,我用的就是apollo自己提供的sensor_rgb.record和perception Test V1来测的,一直是unknown,我不确定该怎么测试了,您能给我提供一些意见吗,怎么样测试红绿灯识别检测功能是否正常?我现在也没有其他数据包了。

我是将代码移植到ros中测试的,基本没怎么变。apollo检测红绿灯的流程比较长,首先排查红绿灯在高精地图中的位置投影到图像上是否正常,然后检查红绿灯的ROI框是否正常检测到,再排查颜色分类是否正常

chenjian88888 avatar Jan 06 '25 08:01 chenjian88888

traffic_Light_detection_component

颜色识别是在这个模块里面traffic_light_recognition,它的上一步是traffic_light_detection,所以可能红绿灯框都没有检测出来。再上一步是traffic_light_region_proposal,红绿灯框投影。感觉是红绿灯框投影到图像有问题。

下面黄色是高精地图的红绿灯框位置投影到图像的结果,红色是traffic_Light_detection_component检测的结果 image

chenjian88888 avatar Jan 06 '25 09:01 chenjian88888

traffic_Light_detection_component

颜色识别是在这个模块里面traffic_light_recognition,它的上一步是traffic_light_detection,所以可能红绿灯框都没有检测出来。再上一步是traffic_light_region_proposal,红绿灯框投影。感觉是红绿灯框投影到图像有问题。

下面黄色是高精地图的红绿灯框位置投影到图像的结果,红色是traffic_Light_detection_component检测的结果

非常感谢,您的回答很专业,我先按照这几个方向去排查!

HandsomeAIccx avatar Jan 06 '25 09:01 HandsomeAIccx