Skip to content

Commit 8f08d2e

Browse files
committed
some cleanup
1 parent 5dfd41b commit 8f08d2e

File tree

3 files changed

+83
-85
lines changed

3 files changed

+83
-85
lines changed

deep_yolo_inference/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ROS 2 node for YOLO inference using ONNX Runtime with TensorRT / CUDA / CPU fall
44

55
## Features
66
- **Execution providers**: prefers TensorRT (engine caching + automatic build logging), falls back to CUDA then CPU if necessary.
7-
- **Fixed batching**: always processes batches of 3 images (matching the three NuScenes front cameras) for consistent TensorRT performance.
7+
- **Batched inference**: collects up to `batch_size_limit` frames (default 3) before running inference to match multi-camera setups.
88
- **Multi-camera ingest**: list `camera_topics` to feed synchronized compressed topics; otherwise subscribe to a single raw/compressed stream with image_transport.
99
- **Automatic message aliasing**: publishes `deep_msgs::Detection2D(Array)` when the package is present; otherwise uses the upstream `vision_msgs` API. No code changes required on downstream consumers beyond selecting the right dependency.
1010
- **Warmup cache**: optional tensor-shape warmup primes TensorRT/CUDA kernels for each batch size before real traffic arrives.
@@ -24,7 +24,7 @@ ros2 launch deep_yolo_inference yolo_inference.launch.py \
2424
```
2525

2626
The sample `object_detection_params.yaml` configures both `object_detection_node`
27-
and `yolo_inference_node`. Edit camera topics, batching, providers, and scores in
27+
and `yolo_inference_node`. Edit camera topics, providers, batching, and scores in
2828
one place, re-launch, and both pipelines stay in sync. By default the YAML lists
2929
the NuScenes front/left/right compressed topics and sets `batch_size_limit: 3`
3030
so the YOLO node processes a batch containing all three frames.
@@ -38,9 +38,9 @@ so the YOLO node processes a batch containing all three frames.
3838
| `enable_trt_engine_cache` / `trt_engine_cache_path` | Set to `true` to reuse TensorRT engines across launches; optionally point the cache at a persistent directory.
3939
| `camera_topics` | Optional list of compressed topics for multi-camera batching. Leave empty for single input.
4040
| `input_image_topic` / `input_transport` | Single stream input topic + desired image_transport.
41-
| `batch_size_limit` | Fixed at 3. Any other value is ignored to keep TensorRT engine usage predictable.
41+
| `batch_size_limit` | Maximum number of frames per inference batch (default 3). Set to 1 for per-frame latency.
4242
| `score_threshold` / `nms_iou_threshold` | Detection filtering parameters.
43-
| `warmup_tensor_shapes` | When true, runs dummy inferences for batch sizes 1..N to build TensorRT engines up front.
43+
| `warmup_tensor_shapes` | When true, runs a dummy inference at startup to prime TensorRT/CUDA for the configured batch size.
4444

4545
See `config/object_detection_params.yaml` for additional QoS and preprocessing knobs.
4646

deep_yolo_inference/config/object_detection_params.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ yolo_inference_node:
33
model_path: "/workspaces/deep_ros/yolov8m.onnx"
44
input_image_topic: "/CAM_FRONT/image_rect_compressed"
55
camera_topics: ["/CAM_FRONT/image_rect_compressed", "/CAM_FRONT_LEFT/image_rect_compressed", "/CAM_FRONT_RIGHT/image_rect_compressed"]
6-
topic_type: "compressed_image"
76
queue_size: 10
87
input_transport: "compressed"
98
input_qos_reliability: "best_effort"

0 commit comments

Comments
 (0)