{"id":20099079,"url":"https://github.com/ros2/openrobotics_darknet_ros","last_synced_at":"2025-05-06T06:30:53.102Z","repository":{"id":77913515,"uuid":"212707332","full_name":"ros2/openrobotics_darknet_ros","owner":"ros2","description":"ROS 2 interface to darknet, an open source neural network library.","archived":false,"fork":false,"pushed_at":"2024-10-28T20:57:43.000Z","size":772,"stargazers_count":21,"open_issues_count":4,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T21:44:13.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ros2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-04T00:29:11.000Z","updated_at":"2024-10-28T20:57:47.000Z","dependencies_parsed_at":"2023-12-15T21:01:55.666Z","dependency_job_id":null,"html_url":"https://github.com/ros2/openrobotics_darknet_ros","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Fopenrobotics_darknet_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Fopenrobotics_darknet_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Fopenrobotics_darknet_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Fopenrobotics_darknet_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ros2","download_url":"https://codeload.github.com/ros2/openrobotics_darknet_ros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224490709,"owners_count":17319983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T17:08:02.987Z","updated_at":"2024-11-13T17:08:03.504Z","avatar_url":"https://github.com/ros2.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Robotics Darknet ROS\n\nThis is a **ROS 2 wrapper around [darknet](https://pjreddie.com/darknet)**, an open source neural network framework.\n\n![Example image with bounding boxes created using darknet and the yolov3-tiny network](doc/example_darknet_yolov3-tiny.png)\n\n## DetectorNode\n\nThis node can run **object detectors** like [YOLO v3](https://pjreddie.com/darknet/yolo/) or [YOLO v7](https://github.com/WongKinYiu/yolov7) on images and video streams.\n\n### Subscribers\n\n* `~/images` (type `sensor_msgs/msg/Image`) - Input mages to feed to the detector\n\n### Publishers\n\n* `~/detections` (type `vision_msgs/msg/Detection2DArray`) - Objects detected in an image (if any)\n\n### Parameters\n\n* `network.config` - a path to a file describing a darknet detector network\n* `network.weights` - a path to a file with weights for the given network\n* `network.class_names` - a path to a file with names of classes the network can detect (1 per line)\n* `detection.threshold` - Minimum probability of a detection to be published\n* `detection.nms_threshold` - Non-maximal Suppression threshold - controls filtering of overlapping boxes\n\n## Dependencies\n\nThis package depends on [darknet](https://github.com/AlexeyAB/darknet). If you can't use CUDA but want to use your CPU instead make sure to build it with the flag `-DENABLE_CUDA=OFF` and potentially also disabling multi-threading with `-DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE`.\n\n### Launching\n\nCompiling this package with\n\n```bash\n$ colcon build --cmake-args -DDOWNLOAD_YOLO_CONFIG=ON\n```\n\nwill automatically download the pretrained YOLO v3, v4 and v7 configuration files.\n\nYou can then launch the detector node with\n\n```bash\n$ ros2 launch openrobotics_darknet_ros detector_launch.py rgb_image:=/topic\n```\n\noptionally supplying a desired parameter file `detector_parameters:=path/to/detector_node_params.yaml`.\n\nYou can also train YOLO to detect custom objects like described [here](https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects) and create the following as `detector_node_params.yaml`:\n\n```yaml\n/**:\n  ros__parameters:\n    network:\n      config: \"./your-yolo-config.cfg\"\n      weights: \"./your-yolo-weights.weights\"\n      class_names: \"./your-cocos.names\"\n    detection:\n      threshold: 0.25\n      nms_threshold: 0.45\n```\n\nFinally you can run the detector node with\n\n```bash\n$ ros2 run openrobotics_darknet_ros detector_node --ros-args --params-file path/to/detector_node_params.yaml\n```\n\nand publish images on `~/images` to get the node to detect objects. You can also manually remap an external topic to the `~/images` topic with:\n\n```bash\n$ ros2 run openrobotics_darknet_ros detector_node --ros-args --params-file path/to/detector_node_params.yaml -r '~/images:=/your/camera/topic'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fros2%2Fopenrobotics_darknet_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fros2%2Fopenrobotics_darknet_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fros2%2Fopenrobotics_darknet_ros/lists"}