Skip to content

phuoc101/yolov7_ros

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLOv7 ROS

This is a ROS package for object detection with the official Yolov7

Installation

Built and tested on Python3.8, Ubuntu 20.04, ROS Noetic.

  • Clone the package and install dependencies for Yolov7 (follow the guide from the official repository, might be better to set up a virtual environment)

    virtualenv --system-site-packages -p python3.8 ~/ros_torch_env
    ## install dependencies in the environment base on yolov7's requirements.txt
    cd <YOUR_ROS_WORKSPACE>/src
    git clone https://github.com/phuoc101/yolov7_ros
    cd src/yolov7
    pip install -r requirements.txt
    • Build the package and source it
    cd <YOUR_ROS_WORKSPACE>
    catkin build yolov7_ros
    source devel/setup.bash #or setup.zsh, depends on what shell you're using

Testing Yolov7 with webcam

cd scripts
python3 webcam.demo --visualize --show_perf

Usage

# default input image topic is /image_raw, but can be modified by specifying input_img_topic:=<YOUR_TOPIC>
roslaunch yolov7_ros yolov7.launch
# to test with webcam, need to install usb_cam ros package first
roslaunch yolov7_ros yolov7_webcam.launch

Custom weights

Put the weights you want to use in yolov7_ros/src/yolov7/weights and specifying it during launching

roslaunch yolov7_ros yolov7.launch weights:=weights/<YOUR_WEIGHTS>.pt
# or
roslaunch yolov7_ros yolov7_webcam.launch weights:=weights/<YOUR_WEIGHTS>.pt

About

ROS package for official YOLOv7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.0%
  • Python 3.0%