This package is based on Python3
and implements Paddle Inference
on ROS, which makes Paddle Inference
a node for real-time detection. It can help developers deploy CV model written by PaddlePaddle
in Ubuntu environment.
-|ConeDetection (ros package)
|-install_scripts
-cv_bridge/
-install_ppyolo.sh
|src/ppyolo
|-config
-ppyolo.yaml (configeration file)
|-launch
-ppyolo.launch (launch file)
|-scripts
-camera.py (for test)
-download_model.sh (for test)
-pp_infer.py (main code)
Paddle Inference
is the original reasoning library of the propeller, which provides high-performance reasoning ability.
Because the training operator is directly based on PaddlePaddle
, Paddle Influence
can generally support all models trained by the PaddlePaddle
.
Paddle Inference
has rich functional features and excellent performance. It has carried out in-depth adaptation and Optimization for different application scenarios on different platforms, so as to achieve high throughput and low delay, and ensure that the propeller model can be trained and used on the server side and deployed quickly.
- High-performance CPU / GPU kernel.
- Subgraph integration tensorrt speeds up GPU inference.
- ubuntu 18.04
- ROS Melodic
- python3.6.9(Default)
- paddlepaddle-gpu 2.1.1+ (URL:paddle-inference prebulided whl Or build from source:Jetson Nano——基于python API部署Paddle Inference GPU预测库(2.1.1))
- CUDA
- CuDnn
- TensorRT
This package is tested on linux with cuda10.2 cudnn8.1 tensorRT7 and paddlepaddle-cp36m.whl
On Ubuntu 18.04 ROS Melodic device:
$ cd install_scripts
$ bash install_ppyolo.sh
Check:
$ python3
import cv_bridge
from cv_bridge.boost.cv_bridge_boost import getCvType
Successfully installed:
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv_bridge
>>> from cv_bridge.boost.cv_bridge_boost import getCvType
>>>
$ cd ConeDetection/
$ catkin build
Download pre-trained yolov3 model:
$ cd src/paddle_inference_ros/scripts $$ ./download_model.sh
Run in three Terminal:
$ roscore
$ rosrun ppyolo camera.py
$ roslaunch ppyolo pp_infer.py
Please refer to the project on AI Studio: https://aistudio.baidu.com/aistudio/projectdetail/3428082
AI Studio platform provides free V100 GPU, which can satisfy most detection missions.