Home

Awesome

ROS_NCNN

This is a ROS package for NCNN, a high-performance neural network inference framework - by Tencent - optimized for mobile platforms:

Setting up

Library

ROS package

General launch parameters

<node name="yolact_node" pkg="ros_ncnn" type="yolact_node" output="screen">
  <param name="display_output" value="$(arg display_output)"/>
  <remap from="/camera/image_raw" to="$(arg camera_topic)"/>
  <!-- Select discrete GPU, in any other case the node jumps to the first discrete GPU. -->
  <param name="gpu_device" value="0"/>
  <!-- Number of CPU threads to use, uses all available if not provided. -->
  <param name="num_threads" value="8"/>
  <!-- Turns engine.neuralnet.opt.use_vulkan_compute regardless the lib is built with GPU support -->
  <param name="enable_gpu" value="true"/>
</node>

YOLACT

Publisher

# Object message
Header header
Rectangle boundingbox # Vector2D position and size
string label
float32 probability

Params

YOLO v2 / v3

The assets repository has multiple YOLO networks, choose the parameter and model file before launch. ( Default is YOLO-3 on MobileNet-2 )

Publisher

# Object message
Header header
Rectangle boundingbox # Vector2D position and size
string label
float32 probability

Params

YOLO v5

Publisher

# Object message
Header header
Rectangle boundingbox # Vector2D position and size
string label
float32 probability

Params

RetinaFace

Publisher

# FaceObject message
Header header
Rectangle boundingbox # Vector2D position and size
Vector2D[5] landmark # 5x 2x float32
float32 probability

Params

HopeNet

Using RetinaFace as face detector:

Publisher

# Euler angles
float32 roll
float32 pitch
float32 yaw

PoseNet

Faster R-CNN

Don't forget to uncompress ZF_faster_rcnn_final.bin.zip in assets directory first. ( but again, R-CNN is the past and that's neither a cat nor a bird right there... that's my best friend )

:construction: To do

:v: Acknowledgements

Special thanks to Nihui for her wonderful work.