From a024078513bcbaa256b5a0b21670511eafee65ac Mon Sep 17 00:00:00 2001 From: Ar-Ray-code Date: Sun, 23 Jun 2024 16:56:51 +0900 Subject: [PATCH] support openvino 2024 --- yolox_ros_cpp/README.md | 13 ++++--------- yolox_ros_cpp/docker/openvino/dockerfile | 24 +++++++++++++++++------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/yolox_ros_cpp/README.md b/yolox_ros_cpp/README.md index e9487bf..4bddad8 100644 --- a/yolox_ros_cpp/README.md +++ b/yolox_ros_cpp/README.md @@ -4,11 +4,11 @@ - ROS2 Humble - ros-humble-generate-parameter-library - OpenCV 4.x -- OpenVINO 2021.* -- TensorRT 8.x * +- OpenVINO 2024.* +- TensorRT 10.x * - ONNXRuntime * - Tensorflow Lite * -- **CUDA 11** +- **CUDA 12** ※ Either one of OpenVINO or TensorRT or ONNXRuntime or Tensorflow Lite is required. @@ -18,11 +18,6 @@ ※ Tensorflow Lite support float model and does not support integer model. -※ Model convert script is not supported OpenVINO 2022.* - -※ Don't use CUDA 12 - - ## Clone YOLOX-ROS ```bash cd ~/ros2_ws/src @@ -45,7 +40,7 @@ cd ~/ros2_ws # Download onnx model and convert to TensorRT engine. # 1st arg is model name. 2nd is workspace size. -./src/YOLOX-ROS/weights/tensorrt/convert.bash yolox_tiny 16 +./src/YOLOX-ROS/weights/tensorrt/convert.bash yolox_tiny ``` #### Tensorflow Lite diff --git a/yolox_ros_cpp/docker/openvino/dockerfile b/yolox_ros_cpp/docker/openvino/dockerfile index 2eb71bb..3be5630 100644 --- a/yolox_ros_cpp/docker/openvino/dockerfile +++ b/yolox_ros_cpp/docker/openvino/dockerfile @@ -1,10 +1,11 @@ -FROM openvino/ubuntu22_dev:2023.0.1 +FROM ubuntu:22.04 +ENV TZ=Asia/Tokyo +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV DEBIAN_FRONTEND=noninteractive USER root -# Install ROS2 RUN apt update && apt install locales && \ locale-gen en_US en_US.UTF-8 && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ @@ -13,12 +14,21 @@ RUN apt update && apt install locales && \ ENV LANG=en_US.UTF-8 RUN apt update && \ - apt install -y git wget curl gnupg2 lsb-release && \ - curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ + apt install -y git wget curl gnupg2 lsb-release + +# ROS +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ - sed -i -e 's/ubuntu .* main/ubuntu jammy main/g' /etc/apt/sources.list.d/ros2.list && \ - apt update && \ - apt install -y ros-dev-tools \ + sed -i -e 's/ubuntu .* main/ubuntu jammy main/g' /etc/apt/sources.list.d/ros2.list +# INTEL OPENVINO +RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \ + apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \ + echo "deb https://apt.repos.intel.com/openvino/2024 ubuntu22 main" | tee /etc/apt/sources.list.d/intel-openvino-2024.list + +# install ros and openvino +RUN apt update && \ + apt install -y openvino-2024.2.0 \ + ros-dev-tools \ ros-humble-cv-bridge \ ros-humble-generate-parameter-library \ ros-humble-parameter-traits \