Skip to content

Spain2394/yolo_seedling

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO_Seedling 🌱

  • Package tested on - NVIDIA Jetson TX2 running Jetpack 4.3 [L4T 32.3.1] CUDA 10.0.326, cuDNN 7.6.3.28, OpenCV4 4.1.1 compiled w/ CUDA running in ROS melodic

  • Package tested on - NVIDIA System 76 w/ Nvidia GTX1060 @ TODO

  • Package tested on - NVIDIA Jetson Nano - Jetpack 4.4 [L4T 32.4.2] CUDA 10.2.8, cuDNN 8.0.0.145, OpenCV4 4.1.1, Running ROS melodic

  • Purpose of this project: Real-time plant tracking using Yolov3/Yolov4 on edge devices

Setup

clone this darknet_ros into your ~/catkin_ws/src clone https://github.com/Spain2394/darknet_bckup into ~/catkin_ws/src/darknet_ros

To run tracking in ROS clone: https://github.com/Spain2394/sort-deepsort-yolov3-ROS And follow the respective readme for usage.

Build

  1. Ensure that you have compiled darknet_bckup seperately, you can do so by runnning cd ~/catkin_ws/src/darknet_ros/darknet_bckup and using make

To maximize performance, make sure to build in Release mode. You can specify the build type by setting

catkin_make -DCMAKE_BUILD_TYPE=Release

or using the Catkin Command Line Tools

catkin build darknet_ros -DCMAKE_BUILD_TYPE=Release

Models

download original models (trained for MS COCO dataset):

HERE - Yolo v4-tiny files

yolov4-tiny.cfg - 40.2% [email protected] - 371(1080Ti) FPS / 330(RTX2070) FPS - 6.9 BFlops - 23.1 MB: yolov4-tiny.weights

HERE - Yolo v3-tiny files

yolov3-tiny.cfg - 33.1% [email protected] - 345(R) FPS - 5.6 BFlops - 33.7 MB: yolov3-tiny.weights

My seedling models

Download the models and config (trained on UGA 2015 and UGA 2018) and tuned based on the combined validation set of UGA 2015 and UGA 2018. (on Tesla v100)

model maP BFLOPS weights config (widthxheight)
Yolov3-tiny-big 86.50% 12.388 weights cfg (1408x1088)
Yolov3-tiny-med 51.54% 3.097 weights cfg (704x544)
Yolov3-tiny-small 24.23% 1.490 weights cfg (480x384)
model maP BFLOPS weights config (widthxheight)
Yolov4-tiny-big 88.15% 60.095 weights cfg (1408x1088)
Yolov4-tiny-med 68.24% 15.024 weights cfg (704x544)
Yolov4-tiny-small 36.36% 7.231 weights cfg (480x384)

Hardware Benchmarks

Which is the best model for each device ? The following tests were performed during inference on the video ~20s videos from the UGA 2020, and UGA 2018 testing set.

Computer: Jetson Nano

model FR (FPS) PEAK POWER(W) RAM (MB)
Yolov3-tiny-big 0.7 4.5 3300
Yolov3-tiny-med 2.7 4.5 3000
Yolov3-tiny-small 5.6 4.4 2900
model FR (FPS) PEAK POWER (W) RAM (MB)
Yolov4-tiny-big 0.8 5.3 3700
Yolov4-tiny-med 3.0 4.6 3100
Yolov4-tiny-small 6.2 4.6 2950

Computer: Jetson TX2

model FR (FPS) PEAK POWER (W) RAM (MB)
Yolov3-tiny-big 9.7 9.8 3400
Yolov3-tiny-med 35.8 9.5 2750
Yolov3-tiny-small 75.1 9.4 2650
model FR (FPS) PEAK POWER (W) RAM (MB)
Yolov4-tiny-big 5.5 12.1 3300
Yolov4-tiny-med 19.8 11 2800
Yolov4-tiny-small 39.5 11 2750

Computer: SW10 w/ GTX 1060

model FR (FPS) PEAK POWER (W) RAM (MB)
Yolov3-tiny-big FR Power RAM
Yolov3-tiny-med FR Power RAM
Yolov3-tiny-small FR Power RAM
model FR (FPS) PEAK POWER (W) RAM (MB)
Yolov4-tiny-big FR Power RAM
Yolov4-tiny-med FR Power RAM
Yolov4-tiny-small FR Power RAM

ROS Setup

Image Stream

run with camera connected to dev/video<n> roslaunch video_stream_opencv camera.launch run with video feed run: roslaunch video_stream_opencv video_file.launch

Note: you can view the camera topic by running: rqt_image_view

Configuration using video_stream_opencv or any camera reading that publishes [sensor_msgs/Image] In ~/catkin_ws/darknet_ros/config/ros.yaml make sure your camera_read topic is set to videofile/image_raw for video feed and camera/image_raw for camera feed.

Run

roslaunch darknet_ros plant_weed_yolo_v3_tiny.launch

Credit

pjreddie, AlexeyAB darknet

leggedrobotics (Marko Bjelonic) darknet_ros

abewley sort

nwojke deep sort

About

Real-Time Object Detection and tracking in ROS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 79.7%
  • CMake 19.4%
  • C 0.9%