33## Requirements
44- ROS2 Iron
55 - ros-iron-generate-parameter-library
6+ - ros-iron-vision-msgs
7+ - ros-iron-usb-cam
68- OpenCV 4.x
79- OpenVINO 2024.*
810- TensorRT 10.x *
@@ -30,28 +32,26 @@ git clone --recursive https://github.com/Ar-Ray-code/YOLOX-ROS -b iron
3032cd ~ /ros2_ws
3133
3234./src/YOLOX-ROS/weights/onnx/download.bash yolox_tiny
33- # Download onnx file and convert to IR format.
34- # ./src/YOLOX-ROS/weights/openvino/download.bash yolox_tiny
3535```
3636
3737### TensorRT
3838``` bash
3939cd ~ /ros2_ws
4040
4141# Download onnx model and convert to TensorRT engine.
42- # 1st arg is model name. 2nd is workspace size .
42+ # argument is model name. set yolox_tiny, yolox_nano, yolox_s, yolox_m or yolox_l .
4343./src/YOLOX-ROS/weights/tensorrt/convert.bash yolox_tiny
4444```
4545
46- #### Tensorflow Lite
46+ ### Tensorflow Lite
4747``` bash
4848cd ~ /ros2_ws
4949
5050# Download tflite Person Detection model: https://github.com/Kazuhito00/Person-Detection-using-RaspberryPi-CPU/
5151./src/YOLOX-ROS/weights/tflite/download_model.bash
5252```
5353
54- #### PINTO_model_zoo
54+ ### PINTO_model_zoo
5555- Support PINTO_model_zoo model
5656- Download model using the following script.
5757 - https://github.com/PINTO0309/PINTO_model_zoo/blob/main/132_YOLOX/download_nano.sh
@@ -77,15 +77,15 @@ cd ~/ros2_ws
7777# build with openvino
7878source /opt/ros/humble/setup.bash
7979source /opt/intel/openvino_2021/bin/setupvars.sh
80- colcon build --cmake-args -DYOLOX_USE_OPENVINO=ON
80+ colcon build --symlink-install -- cmake-args -DYOLOX_USE_OPENVINO=ON
8181```
8282
8383### TensorRT
8484
8585``` bash
8686# build with tensorrt
87- source /opt/ros/humble /setup.bash
88- colcon build --cmake-args -DYOLOX_USE_TENSORRT=ON
87+ source /opt/ros/iron /setup.bash
88+ colcon build --symlink-install -- cmake-args -DYOLOX_USE_TENSORRT=ON
8989```
9090
9191### TFLite
@@ -115,12 +115,13 @@ make -j"$(nproc)"
115115```
116116
117117``` bash
118- colcon build --cmake-args \
119- -DYOLOX_USE_TFLITE=ON \
120- -DTFLITE_LIB_PATH=${WORKSPACE} /tflite_build \
121- -DTFLITE_INCLUDE_DIR=${WORKSPACE} /tensorflow_src/ \
122- -DABSEIL_CPP_ICLUDE_DIR=${WORKSPACE} /tflite_build/abseil-cpp \
123- -DFLATBUFFERS_INCLUDE_DIR=${WORKSPACE} /tflite_build/flatbuffers/include
118+ colcon build --symlink-install \
119+ --cmake-args \
120+ -DYOLOX_USE_TFLITE=ON \
121+ -DTFLITE_LIB_PATH=${WORKSPACE} /tflite_build \
122+ -DTFLITE_INCLUDE_DIR=${WORKSPACE} /tensorflow_src/ \
123+ -DABSEIL_CPP_ICLUDE_DIR=${WORKSPACE} /tflite_build/abseil-cpp \
124+ -DFLATBUFFERS_INCLUDE_DIR=${WORKSPACE} /tflite_build/flatbuffers/include
124125```
125126
126127<br >
@@ -139,10 +140,6 @@ ros2 launch yolox_ros_cpp yolox_openvino.launch.py
139140# ros2 launch yolox_ros_cpp yolox_openvino.launch.py \
140141# model_path:=install/yolox_ros_cpp/share/yolox_ros_cpp/weights/onnx/yolox_tiny_480x640.onnx \
141142# model_version:="0.1.0"
142-
143- # # run YOLOX-tiny with NCS2
144- # ros2 launch yolox_ros_cpp yolox_openvino_ncs2.launch.py
145-
146143```
147144
148145### TensorRT
@@ -156,20 +153,20 @@ ros2 launch yolox_ros_cpp yolox_tensorrt.launch.py
156153
157154```
158155
159- ### Jetson + TensorRT
156+ <!-- ### Jetson + TensorRT
160157Jetson docker container cannot display GUI.
161158If you want to show image with bounding box drawn, subscribe from host jetson or other PC.
162159
163160```bash
164161# run yolox_tiny
165162ros2 launch yolox_ros_cpp yolox_tensorrt_jetson.launch.py
166- ```
163+ ``` -->
167164
168- <!-- ### ONNXRuntime
165+ ### ONNXRuntime
169166``` bash
170167# run yolox_tiny
171168ros2 launch yolox_ros_cpp yolox_onnxruntime.launch.py
172- ``` -->
169+ ```
173170
174171### Tensorflow Lite
175172``` bash
@@ -188,82 +185,90 @@ ros2 launch yolox_ros_cpp yolox_tflite.launch.py
188185<details >
189186<summary >OpenVINO example</summary >
190187
191- - ` model_path ` : ./install/yolox_ros_cpp/share/yolox_ros_cpp/ weights/openvino /yolox_tiny.xml
188+ - ` model_path ` : ./src/YOLOX-ROS/ weights/onnx /yolox_tiny.onnx
192189- ` p6 ` : false
193190- ` class_labels_path ` : ""
194191 - if not set, use coco_names.
195192 - See [ here] ( https://github.com/fateshelled/YOLOX-ROS/blob/dev_cpp/yolox_ros_cpp/yolox_ros_cpp/labels/coco_names.txt ) for label format.
196193- ` num_classes ` : 80
197194- ` model_version ` : 0.1.1rc0
198- - ` openvino/device ` : AUTO
195+ - ` openvino_device ` : AUTO
199196- ` nms ` : 0.45
200197- ` imshow_isshow ` : true
201198- ` src_image_topic_name ` : /image_raw
202199- ` publish_image_topic_name ` : /yolox/image_raw
203200- ` publish_boundingbox_topic_name ` : /yolox/bounding_boxes
201+ - ` use_bbox_ex_msgs ` : false
202+ - ` publish_resized_image ` : false
204203
205204</details >
206205
207206
208207<details >
209208<summary >TensorRT example</summary >
210209
211- - ` model_path ` : ./install/yolox_ros_cpp/share/yolox_ros_cpp /weights/tensorrt/yolox_tiny.trt
210+ - ` model_path ` : ../src/YOLOX-ROS /weights/tensorrt/yolox_tiny.trt
212211- ` p6 ` : false
213212- ` class_labels_path ` : ""
214213- ` num_classes ` : 80
215214- ` model_version ` : 0.1.1rc0
216- - ` tensorrt/device ` : 0
215+ - ` tensorrt_device ` : 0
217216- ` conf ` : 0.3
218217- ` nms ` : 0.45
219218- ` imshow_isshow ` : true
220219- ` src_image_topic_name ` : /image_raw
221220- ` publish_image_topic_name ` : /yolox/image_raw
222221- ` publish_boundingbox_topic_name ` : /yolox/bounding_boxes
222+ - ` use_bbox_ex_msgs ` : false
223+ - ` publish_resized_image ` : false
223224
224225</details >
225226
226227<details >
227228<summary >ONNXRuntime example</summary >
228229
229230
230- - ` model_path ` : ./install/yolox_ros_cpp/share/yolox_ros_cpp /weights/onnx/yolox_tiny.onnx
231+ - ` model_path ` : ./src/YOLOX-ROS /weights/onnx/yolox_tiny.onnx
231232- ` p6 ` : false
232233- ` class_labels_path ` : ""
233234- ` num_classes ` : 80
234235- ` model_version ` : 0.1.1rc0
235- - ` onnxruntime/use_cuda ` : true
236- - ` onnxruntime/use_parallel ` : false
237- - ` onnxruntime/device_id ` : 0
238- - ` onnxruntime/inter_op_num_threads ` : 1
239- - if ` onnxruntime/use_parallel ` is true, the number of threads used to parallelize the execution of the graph (across nodes).
240- - ` onnxruntime/intra_op_num_threads ` : 1
236+ - ` onnxruntime_use_cuda ` : true
237+ - ` onnxruntime_use_parallel ` : false
238+ - ` onnxruntime_device_id ` : 0
239+ - ` onnxruntime_inter_op_num_threads ` : 1
240+ - if ` onnxruntime_use_parallel ` is true, the number of threads used to parallelize the execution of the graph (across nodes).
241+ - ` onnxruntime_intra_op_num_threads ` : 1
241242 - the number of threads to use to run the model
242243- ` conf ` : 0.3
243244- ` nms ` : 0.45
244245- ` imshow_isshow ` : true
245246- ` src_image_topic_name ` : /image_raw
246247- ` publish_image_topic_name ` : /yolox/image_raw
247248- ` publish_boundingbox_topic_name ` : /yolox/bounding_boxes
249+ - ` use_bbox_ex_msgs ` : false
250+ - ` publish_resized_image ` : false
248251
249252</details >
250253
251254<details >
252255<summary >Tensorflow Lite example</summary >
253256
254- - ` model_path ` : ./install/yolox_ros_cpp/share/yolox_ros_cpp /weights/tflite/model.tflite
257+ - ` model_path ` : ./src/YOLOX-ROS /weights/tflite/model.tflite
255258- ` p6 ` : false
256259- ` is_nchw ` : true
257260- ` class_labels_path ` : ""
258261- ` num_classes ` : 1
259262- ` model_version ` : 0.1.1rc0
260- - ` tflite/num_threads ` : 1
263+ - ` tflite_num_threads ` : 1
261264- ` conf ` : 0.3
262265- ` nms ` : 0.45
263266- ` imshow_isshow ` : true
264267- ` src_image_topic_name ` : /image_raw
265268- ` publish_image_topic_name ` : /yolox/image_raw
266269- ` publish_boundingbox_topic_name ` : /yolox/bounding_boxes
270+ - ` use_bbox_ex_msgs ` : false
271+ - ` publish_resized_image ` : false
267272
268273</details >
269274
0 commit comments