Back to Apollo

perception-tools

modules/perception/tools/README.md

11.0.03.1 KB
Original Source

perception-tools

Introduction

perception-tools provides debug tools for perception modules.

Directory Structure

tools
├── BUILD
├── README.md
├── common
├── cyberfile.xml
├── exporter         // message decompression tool
├── offline
└── offline_camera_detection  // camera offline detection tool

exporter

exporter is used to subscribe and save lidar/camera messages.

shell
cd /apollo

# run
/apollo/bazel-bin/modules/perception/tools/exporter/msg_exporter modules/perception/tools/exporter/export_msg.config

Messages are saved in a folder named by the corresponding channel.

Parameters

Write the channel names to be subscribed to in the export_msg.config file. Line breaks are required between multiple channels.

Offline_camera_detection

offline_camera_detection is used to test camera image detection. Its input is an image and its output are detected 2D bounding boxes.

shell
cd modules/perception/tools/offline_camera_detection

# run
bash offline_camera_detection.sh --config_file=yolo.pb.txt --detector_name=YoloObstacleDetector

The detection results are saved in the data/output directory

Parameters

The supported parameters are as follows.

Parameter typeParameter nameDefault valueDescription
int32height1080image height
int32width1920image width
int32gpu_id0gpu id
stringdest_dirdata/outputoutput dir
stringdist_type""dist pred type: H-on-h, H-from-h
stringkitti_dir""pre-detected obstacles (skip Detect)
stringroot_dir/apollo/modules/perception/tools/offline_camera_detection/image root dir
stringimage_ext.jpgextension of image name
stringconfig_pathperception/camera_detection_multi_stage/dataconfig path
stringconfig_fileyolox3d.pb.txtconfig file
stringcamera_namefront_6mmcamera name
stringdetector_nameYolox3DObstacleDetectordetector name