asa-naki / YOLOX-ROS

YOLOX + ROS2 object detection package

Home Page:https://ar-ray-code.github.io/06_yolox_ros/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YOLOX-ROS

YOLOX+ROS2 Foxy

yolox_s_result

Supported List

Base ROS1 C++ ROS1 Python ROS2 C++ ROS2 Python
CPU
CUDA
CUDA (FP16)
TensorRT (CUDA)
OpenVINO
MegEngine
ncnn

Installation & Demo

Python (PyTorch)

Requirements

Installation

Install the dependent packages based on all tutorials.

STEP 1 : YOLOX Quick-start

YOLOX Quick-start (Python)

git clone https://github.com/Megvii-BaseDetection/YOLOX
cd YOLOX
pip3 install -U pip && pip3 install -r requirements.txt
pip3 install -v -e .  # or  python3 setup.py develop
pip3 install cython; pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'

STEP 2 : Install YOLOX-ROS

source /opt/ros/foxy/setup.bash
sudo apt install ros-foxy-v4l2-camera
git clone --recursive https://github.com/Ar-Ray-code/yolox_ros.git ~/ros2_ws/src/yolox_ros/
cd ~/ros2_ws
colcon build --symlink-install # weights files will be installed automatically.

(Step 2) Using CUDA

If you have NVIDIA Graphics, you can run YOLOX-ROS on GPU.

Additional installing lists

  • NVIDIA Graphics Driver
  • CUDA toolkit (11.0)
  • torch+cuda

Step3 : Demo

Connect your web camera.

source /opt/ros/foxy/setup.bash
source ~/ros2_ws/install/local_setup.bash
ros2 launch yolox_ros_py yolox_s_cpu.launch.py
# ros2 launch yolox_ros_py yolox_s.launch.py # <- GPU
C++ (OpenVINO)

Requirements

Step1 : Installation

source /opt/ros/foxy/setup.bash
sudo apt install ros-foxy-v4l2-camera

source /opt/intel/openvino_2021/bin/setupvars.sh
cd ~/ros2_ws/src
git clone --recursive https://github.com/Ar-Ray-code/YOLOX-ROS.git
# Download onnx file and Convert to IR format.
./YOLOX-ROS/weights/openvino/install.bash yolox_nano

Step2 : Demo

Connect your web camera.

source /opt/ros/foxy/setup.bash
source ~/ros2_ws/install/local_setup.bash
ros2 launch yolox_ros_cpp yolox_openvino.launch.py
C++ (TensorRT)

Docker Images is Released.

Topic

Subscribe

  • image_raw (sensor_msgs/Image)

Publish

  • yolox/image_raw : Resized image (sensor_msgs/Image)

  • yololx/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.

yolox_topic

Parameters

  • Check launch files.

Composition

  • Supports C++ only.

Reference

@article{yolox2021,
  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}
}

Contributors

About writer

About

YOLOX + ROS2 object detection package

https://ar-ray-code.github.io/06_yolox_ros/index.html

License:Apache License 2.0


Languages

Language:C++ 61.8%Language:Python 28.0%Language:CMake 5.4%Language:Shell 4.8%