Skip to content

Commit

Permalink
version is 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar-Ray-code committed May 9, 2022
1 parent 27b4083 commit 5989847
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Check [this URL](https://github.com/Ar-Ray-code/YOLOX-ROS/tree/main/yolox_ros_cp

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion yolox_ros_py/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>yolox_ros_py</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>The yolox_ros_py package</description>
<maintainer email="ray255ar@gmail.com">Ar-Ray-code</maintainer>
<license>Apache License, Version 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion yolox_ros_py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

setup(
name=package_name,
version='0.3.0',
version='0.3.1',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand Down
5 changes: 1 addition & 4 deletions yolox_ros_py/yolox_ros_py/yolox_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def __init__(self) -> None:

self.bridge = CvBridge()

self.pub = self.create_publisher(BoundingBoxes,"yolox/bounding_boxes", 10)
# self.pub_image = self.create_publisher(Image,"yolox/image_raw", 10)

self.pub = self.create_publisher(BoundingBoxes,"bounding_boxes", 10)
self.sub = self.create_subscription(Image,"image_raw",self.imageflow_callback, self.qos_image_sub)

def imageflow_callback(self,msg:Image) -> None:
Expand Down Expand Up @@ -99,7 +97,6 @@ def imageflow_callback(self,msg:Image) -> None:
cv2.waitKey(1)

self.pub.publish(bboxes)
# self.pub_image.publish(self.bridge.cv2_to_imgmsg(origin_img,"bgr8"))

except Exception as e:
self.get_logger().info(f'Error: {e}')
Expand Down
9 changes: 1 addition & 8 deletions yolox_ros_py/yolox_ros_py/yolox_openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,10 @@ def __init__(self) -> None:

self.bridge = CvBridge()

self.pub = self.create_publisher(BoundingBoxes,"yolox/bounding_boxes", 10)
# self.pub_image = self.create_publisher(Image,"yolox/image_raw", 10)

self.pub = self.create_publisher(BoundingBoxes,"bounding_boxes", 10)
self.sub = self.create_subscription(Image,"image_raw",self.imageflow_callback, self.qos_image_sub)

def setting_yolox_exp(self) -> None:
# set environment variables for distributed training



print('Creating Inference Engine')
ie = IECore()
print(f'Reading the self.network: {self.model_path}')
Expand Down Expand Up @@ -131,7 +125,6 @@ def imageflow_callback(self,msg:Image) -> None:
cv2.waitKey(1)

self.pub.publish(bboxes)
# self.pub_image.publish(self.bridge.cv2_to_imgmsg(nodetect_image,"bgr8"))

except Exception as e:
self.get_logger().info(f'Error: {e}')
Expand Down
8 changes: 1 addition & 7 deletions yolox_ros_py/yolox_ros_py/yolox_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,14 @@ def __init__(self) -> None:

self.bridge = CvBridge()

self.pub = self.create_publisher(BoundingBoxes,"yolox/bounding_boxes", 10)
# self.pub_image = self.create_publisher(Image,"yolox/image_raw", 10)
self.pub = self.create_publisher(BoundingBoxes,"bounding_boxes", 10)

if (self.sensor_qos_mode):
self.sub = self.create_subscription(Image,"image_raw",self.imageflow_callback, qos_profile_sensor_data)
else:
self.sub = self.create_subscription(Image,"image_raw",self.imageflow_callback, 10)

def setting_yolox_exp(self) -> None:
# set environment variables for distributed training
# ==============================================================

WEIGHTS_PATH = '../../weights/yolox_nano.pth'

Expand Down Expand Up @@ -245,9 +242,6 @@ def imageflow_callback(self,msg:Image) -> None:
bboxes_msg = self.yolox2bboxes_msgs(bboxes, scores, cls, cls_names, msg.header, img_rgb)

self.pub.publish(bboxes_msg)
# msg = self.bridge.cv2_to_imgmsg(img_rgb,"bgr8")
# msg.header.frame_id = "camera"
# self.pub_image.publish(msg)

if (self.imshow_isshow):
cv2.imshow("YOLOX",result_img_rgb)
Expand Down
7 changes: 1 addition & 6 deletions yolox_ros_py/yolox_ros_py/yolox_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ def __init__(self):
)

self.sub = self.create_subscription(Image,"image_raw",self.imageflow_callback, self.qos_image_sub)

self.pub_detection = self.create_publisher(
BoundingBoxes,
'bounding_boxes',
10
)
self.pub_detection = self.create_publisher(BoundingBoxes, 'bounding_boxes', 10)

def imageflow_callback(self, msg):
start = time.time()
Expand Down

0 comments on commit 5989847

Please sign in to comment.