Skip to content

Commit 3f50e35

Browse files
authored
Merge pull request #22 from Ar-Ray-code/feature/yolox_py_update
Feature/yolox py update (v0.3.1)
2 parents 1ca9482 + 5989847 commit 3f50e35

16 files changed

+213
-313
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
| Base | ROS2 C++ | ROS2 Python |
1212
| --------------- | -------- | ----------- |
13-
| CPU | ||
14-
| CUDA | ||
15-
| CUDA (FP16) | ||
13+
| PyTorch | ||
14+
| PyTorch(CUDA) | ||
15+
| PyTorch(CUDA-FP16) | ||
1616
| TensorRT (CUDA) || |
1717
| OpenVINO |||
1818
| ONNX Runtime | ||
@@ -124,7 +124,7 @@ Check [this URL](https://github.com/Ar-Ray-code/YOLOX-ROS/tree/main/yolox_ros_cp
124124

125125
<!-- - yolox/image_raw : Resized image (`sensor_msgs/Image`) -->
126126

127-
- yololx/bounding_boxes : Output BoundingBoxes like darknet_ros_msgs (`bboxes_ex_msgs/BoundingBoxes`)
127+
- bounding_boxes: Output BoundingBoxes like darknet_ros_msgs (`bboxes_ex_msgs/BoundingBoxes`)
128128

129129
※ If you want to use `darknet_ros_msgs` , replace `bboxes_ex_msgs` with `darknet_ros_msgs`.
130130

yolox_ros_py/launch/yolox_tflite.launch.py renamed to yolox_ros_py/launch/yolox_lite_tflite_camera.launch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def generate_launch_description():
3737
yolox_tflite = launch_ros.actions.Node(
3838
package="yolox_ros_py", executable="yolox_tflite",output="screen",
3939
parameters=[
40-
{"model" : yolox_ros_share_dir+"/model.tflite"},
41-
{"score_th" : 0.4},
40+
{"model_path" : yolox_ros_share_dir+"/model.tflite"},
41+
{"conf" : 0.4},
4242
{"nms_th" : 0.5},
4343
{"input_shape/height" : 192},
4444
{"input_shape/width" : 192}

yolox_ros_py/launch/yolox_nano_onnx.launch.py renamed to yolox_ros_py/launch/yolox_nano_onnx_camera.launch.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ def generate_launch_description():
2828
yolox_onnx = launch_ros.actions.Node(
2929
package="yolox_ros_py", executable="yolox_onnx",output="screen",
3030
parameters=[
31-
{"image_size/width": 640},
32-
{"image_size/height": 480},
33-
3431
{"input_shape/width": 416},
3532
{"input_shape/height": 416},
3633

yolox_ros_py/launch/yolox_nano_onnx_gazebo.launch.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ def generate_launch_description():
3434
yolox_onnx = launch_ros.actions.Node(
3535
package="yolox_ros_py", executable="yolox_onnx",output="screen",
3636
parameters=[
37-
{"image_size/width": 640},
38-
{"image_size/height": 480},
39-
4037
{"input_shape/width": 416},
4138
{"input_shape/height": 416},
4239

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
from matplotlib import image
2+
import launch
3+
import launch_ros.actions
4+
from launch.actions import DeclareLaunchArgument
5+
from ament_index_python.packages import get_package_share_directory
6+
from launch.launch_description_sources import PythonLaunchDescriptionSource
7+
from launch.substitutions import LaunchConfiguration
8+
9+
from urllib.request import urlretrieve
10+
import os
11+
12+
def generate_launch_description():
13+
yolox_ros_share_dir = get_package_share_directory('yolox_ros_py')
14+
15+
dog_path = os.path.join(yolox_ros_share_dir, "./", "dog.jpg")
16+
url = "https://raw.githubusercontent.com/pjreddie/darknet/master/data/dog.jpg"
17+
if not os.path.exists(dog_path):
18+
os.system("wget {} -O {}".format(url, dog_path))
19+
20+
21+
image_path = LaunchConfiguration('image_path', default=dog_path)
22+
image_path_arg = DeclareLaunchArgument(
23+
'image_path',
24+
default_value=dog_path,
25+
description='Image path'
26+
)
27+
28+
image_pub = launch_ros.actions.Node(
29+
package='image_publisher',
30+
executable='image_publisher_node',
31+
name='image_publisher',
32+
arguments=[image_path],
33+
)
34+
yolox_onnx = launch_ros.actions.Node(
35+
package="yolox_ros_py", executable="yolox_onnx",output="screen",
36+
parameters=[
37+
{"input_shape/width": 416},
38+
{"input_shape/height": 416},
39+
40+
{"with_p6" : False},
41+
{"model_path" : yolox_ros_share_dir+"/yolox_nano.onnx"},
42+
{"conf" : 0.3},
43+
],
44+
)
45+
46+
rqt_graph = launch_ros.actions.Node(
47+
package="rqt_graph", executable="rqt_graph",
48+
)
49+
50+
return launch.LaunchDescription([
51+
image_path_arg,
52+
image_pub,
53+
yolox_onnx,
54+
# rqt_graph
55+
])

yolox_ros_py/launch/yolox_nano_onnx_youtube.launch.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from launch.launch_description_sources import PythonLaunchDescriptionSource
88
import launch_ros
99

10-
1110
def generate_launch_description():
1211
yolox_ros_share_dir = get_package_share_directory('yolox_ros_py')
1312
youtube_publisher_share_dir = get_package_share_directory('youtube_publisher')
@@ -37,9 +36,6 @@ def generate_launch_description():
3736
yolox_onnx = launch_ros.actions.Node(
3837
package="yolox_ros_py", executable="yolox_onnx",output="screen",
3938
parameters=[
40-
{"image_size/width": 640},
41-
{"image_size/height": 360},
42-
4339
{"input_shape/width": 416},
4440
{"input_shape/height": 416},
4541

yolox_ros_py/launch/yolox_nano_openvino.launch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ def generate_launch_description():
2929
yolox_openvino = launch_ros.actions.Node(
3030
package="yolox_ros_py", executable="yolox_openvino",output="screen",
3131
parameters=[
32-
{"image_size/width": 640},
33-
{"image_size/height": 480},
3432
{"device" : 'CPU'},
3533
{"model_path" : yolox_ros_share_dir+"/yolox_nano.onnx"},
3634
{"conf" : 0.3},

yolox_ros_py/launch/yolox_nano_cpu.launch.py renamed to yolox_ros_py/launch/yolox_nano_torch_cpu_camera.launch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def generate_launch_description():
2626
yolox_ros = launch_ros.actions.Node(
2727
package="yolox_ros_py", executable="yolox_ros",
2828
parameters=[
29-
{"image_size/width": 640},
30-
{"image_size/height": 480},
3129
{"yolox_exp_py" : yolox_ros_share_dir+'/yolox_nano.py'},
3230
{"device" : 'cpu'},
3331
{"fp16" : True},

yolox_ros_py/launch/yolox_nano.launch.py renamed to yolox_ros_py/launch/yolox_nano_torch_gpu_camera.launch.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
from launch.launch_description_sources import PythonLaunchDescriptionSource
66
from launch.substitutions import LaunchConfiguration
77

8-
from urllib.request import urlretrieve
9-
import os
10-
118
def generate_launch_description():
129
yolox_ros_share_dir = get_package_share_directory('yolox_ros_py')
1310

@@ -29,8 +26,6 @@ def generate_launch_description():
2926
yolox_ros = launch_ros.actions.Node(
3027
package="yolox_ros_py", executable="yolox_ros",
3128
parameters=[
32-
{"image_size/width": 640},
33-
{"image_size/height": 480},
3429
{"yolox_exp_py" : yolox_ros_share_dir+'/yolox_nano.py'},
3530
{"device" : 'gpu'},
3631
{"fp16" : True},

yolox_ros_py/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>yolox_ros_py</name>
5-
<version>0.3.0</version>
5+
<version>0.3.1</version>
66
<description>The yolox_ros_py package</description>
77
<maintainer email="[email protected]">Ar-Ray-code</maintainer>
88
<license>Apache License, Version 2.0</license>

0 commit comments

Comments
 (0)