Git Product home page Git Product logo

ros_yolov4's Introduction

ros_yolov4

an implementation of Yolov4 algorithm to ROS using darknet framework and a python wrapper (PyYOLO)

How to use

In detection.py configure your cfg, data and weight file locations on those lines;

detector = pyyolo.YOLO(pkg_path+"/src/cfg/yolov4.cfg", # cfg file location
                           pkg_path+"/src/yolov4.weights", # weight file location
                           pkg_path+"/src/cfg/coco.data", # data file location
                           detection_threshold = 0.5,
                           hier_threshold = 0.5,
                           nms_threshold = 0.45)

Then add detection.py as node to your launch file as seen in example here. Don't forget to remap "camera/data" to source Image topic and detection/output to desired output Image topic. All detections will be also published on object_detection/detections in a custom message format I named as object_detection. You may need to create and generate that message type before you publish that. Or just comment out those in detection.py;

#line 25 - 29
detection.min_x, detection.min_y, detection.max_x, detection.max_y = det.to_xyxy()
detection.probability = det.prob
detection.class_ = det.name
detection.source = topic
detection_pub.publish(detection)

#line 50
global detection_pub

#line 66
detection_pub = rospy.Publisher("object_detection/detection",object_detection,queue_size=0)

object_detection.msg

int16 min_x
int16 max_x
int16 min_y
int16 max_y
string class
float32 probability
string source

ros_yolov4's People

Contributors

atagulmert avatar

Stargazers

Darcy Turk avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.