* Initial package Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Use latest vision_msgs with string id Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Tiny improvements Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Add parser tests and ignore blank lines in class names Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Test when cfg file does not exist Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Rename test Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * openrobotics_darknet_ros -> openrobotics::darknet_ros Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Added visibility files Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Rename files Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * darknet_node -> detector_node Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Rename files Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Rename files Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * DetectorNetwork and DetectorNode Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Simple readme Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Add Example section Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Example actually works Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Fix link Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Linter tests pass Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Open Robotics Darknet ROS
This is a ROS 2 wrapper around darknet, an open source neural network framework.
DetectorNode
This node can run object detectors like YOLOv3 on images.
Subscribers
~/images(typesensor_msgs/msg/Image) - Input mages to feed to the detector
Publishers
~/detections(typevision_msgs/msg/Detection2DArray) - Objects detected in an image (if any)
Parameters
network.config- a path to a file describing a darknet detector networknetwork.weights- a path to a file with weights for the given networknetwork.class_names- a path to a file with names of classes the network can detect (1 per line)detection.threshold- Minimum probability of a detection to be publisheddetection.nms_threshold- Non-maximal Suppression threshold - controls filtering of overlapping boxes
Example
Download YOLOv3-tiny.
wget https://raw.githubusercontent.com/pjreddie/darknet/f86901f6177dfc6116360a13cc06ab680e0c86b0/cfg/yolov3-tiny.cfg
wget https://pjreddie.com/media/files/yolov3-tiny.weights
wget https://raw.githubusercontent.com/pjreddie/darknet/c6afc7ff1499fbbe64069e1843d7929bd7ae2eaa/data/coco.names
Save the following as detector_node_params.yaml
/**:
ros__parameters:
network:
config: "./yolov3-tiny.cfg"
weights: "./yolov3-tiny.weights"
class_names: "./coco.names"
detection:
threshold: 0.25
nms_threshold: 0.45
Then run the node.
ros2 run openrobotics_darknet_ros detector_node __params:=detector_node_params.yaml
The node is now running.
Publish images on ~/images to get the node to detect objects.
Description
This repository contains code for detecting heat pipes in the greenhouse as well as estimating the pose of the pipes
Languages
Jupyter Notebook
93.5%
Python
4.8%
C++
1.6%
