Downloads · 30 days
149
45% of all-time downloads
AutowareFoundation/traffic_light_fine_detector
traffic_light_fine_detector is a object detection model from AutowareFoundation. Use it when you need objects located in an image. It is set up for tensorrt. The card lists the license as apache-2.0.
Camera-based traffic light detection models, used by the autowaretrafficlightfinedetector node in Autoware.
Downloads · 30 days
149
45% of all-time downloads
All-time downloads
328
Public
Repo size
107 MB
Likes
0
Public
Click a slice to open those files.
.onnx107 MB · 100%
From the Hugging Face model README
traffic_light_fine_detector)Camera-based traffic light detection models, used by the
autoware_traffic_light_fine_detector
node in Autoware.
The models are YOLOX-s [1] detectors fine-tuned by TIER IV for traffic light detection. Given the full
camera image and the coarse ROIs predicted by the traffic_light_map_based_detector node, the fine detector
refines each ROI to a tight bounding box around the traffic light. The models are exported as ONNX; Autoware
builds the TensorRT engine from the ONNX file on first launch.
| Task | 2D traffic light detection (ROI refinement) in camera images |
| Architecture | YOLOX-s |
| Detected classes | traffic_light, pedestrian_traffic_light (plus a BACKGROUND label) |
| Runtime | TensorRT (FP16 by default, FP32 selectable) via the autoware_traffic_light_fine_detector ROS 2 node |
| Format | ONNX (Autoware builds the TensorRT engine locally on first launch) |
| License | Apache-2.0 |
The three ONNX files share the same weights and differ only in their static batch size. The TensorRT engine requires a fixed batch size, so the node pads the ROI list with dummy entries up to the model's batch size when fewer traffic lights are visible.
| Variant | Batch size | Default in Autoware |
|---|---|---|
tlr_car_ped_yolox_s_batch_1.onnx | 1 | |
tlr_car_ped_yolox_s_batch_4.onnx | 4 | |
tlr_car_ped_yolox_s_batch_6.onnx | 6 | yes (loaded by the package's launch file) |
| File | Description |
|---|---|
tlr_car_ped_yolox_s_batch_1.onnx | YOLOX-s traffic light detector, static batch size 1 |
tlr_car_ped_yolox_s_batch_4.onnx | YOLOX-s traffic light detector, static batch size 4 |
tlr_car_ped_yolox_s_batch_6.onnx | YOLOX-s traffic light detector, static batch size 6 (default) |
tlr_labels.txt | Class labels: BACKGROUND, traffic_light, pedestrian_traffic_light |
deploy_metadata.yaml | Deployment metadata recording the artifact version of this repository |
TensorRT engines are not distributed here. TensorRT engines are specific to the GPU architecture and TensorRT version they are built on and are not portable, so Autoware builds them locally from the ONNX files on first launch (or via
build_only:=true).
Inputs
| Topic | Type | Description |
|---|---|---|
~/input/image | sensor_msgs/msg/Image | The full size camera image |
~/input/rois | tier4_perception_msgs/msg/TrafficLightRoiArray | Coarse ROIs from the map-based detector |
~/expect/rois | tier4_perception_msgs/msg/TrafficLightRoiArray | Offset-free ROIs used to select the best detections |
Outputs
| Topic | Type | Description |
|---|---|---|
~/output/rois | tier4_perception_msgs/msg/TrafficLightRoiArray | The refined, accurate ROIs |
~/debug/exe_time_ms | autoware_internal_debug_msgs/msg/Float32Stamped | Inference time |
If no traffic light is detected inside a coarse ROI, the output ROI's x_offset, y_offset, height, and
width are set to 0. Detections from YOLOX are matched against the expect/rois array as a whole set, not
each ROI in isolation. Key node parameters (defaults): precision: fp16, score_thresh: 0.3,
nms_thresh: 0.65, gpu_id: 0.
The node expects these artifacts under ~/autoware_data/ml_models/traffic_light_fine_detector/ and launches
with, e.g.:
ros2 launch autoware_traffic_light_fine_detector traffic_light_fine_detector.launch.xml \
data_path:=$HOME/autoware_data/ml_models \
model_path:=$HOME/autoware_data/ml_models/traffic_light_fine_detector/tlr_car_ped_yolox_s_batch_6.onnx \
label_path:=$HOME/autoware_data/ml_models/traffic_light_fine_detector/tlr_labels.txt
Add build_only:=true to build the TensorRT engine from the ONNX as a one-off pre-task.
See the package README
for the full parameter reference.
| Original source | https://awf.ml.dev.web.auto/perception/models/tlr_yolox_s/v3/ |
| Version tag in this repository | v3.0 |
@article{ge2021yolox,
title = {YOLOX: Exceeding YOLO Series in 2021},
author = {Ge, Zheng and Liu, Songtao and Wang, Feng and Li, Zeming and Sun, Jian},
journal = {arXiv preprint arXiv:2107.08430},
year = {2021}
}