Difference between revisions of "YOLO"
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
*Run the detector (webcam): | *Run the detector (webcam): | ||
./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights | ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights | ||
+ | |||
+ | === Training your own Dataset === | ||
+ | |||
+ | *Download the convolutional weights from the darknet53 model that are pre-trained on Imagenet and place them in the Darknet folder: | ||
+ | wget https://pjreddie.com/media/files/darknet53.conv.74 | ||
+ | |||
+ | *Step 1: Images | ||
+ | *Download the images for the categories that you would like YOLO to detect. | ||
+ | |||
+ | *Step 2: Data Annotation | ||
+ | *Download the YOLO annotation tool: | ||
+ | https://github.com/ManivannanMurugavel/Yolo-Annotation-Tool-New- | ||
+ | *Enter the directory with the terminal: | ||
+ | cd Downloads | ||
+ | cd Yolo-Annotation-Tool-New- | ||
+ | python main.py | ||
+ | *Past the path where you have placed the images of the first category of your dataset and click the button "Load" | ||
+ | *Create the bounding boxes in each one of the images in this category by first, clicking on the image and then clicking on the button Next | ||
+ | *When you are done with all the images of that category | ||
+ | |||
+ | |||
+ | |||
+ | *We need to create 3 files: | ||
+ | **myDataset.data | ||
+ | |||
+ | |||
=== Guide === | === Guide === | ||
*https://pjreddie.com/darknet/yolo/ | *https://pjreddie.com/darknet/yolo/ | ||
*Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners | *Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners |
Revision as of 22:03, 15 July 2019
Installation
- Fist, we install OpenCV:
- OpenCV Installation
- Then, we need to install our modified version of Darknet:
- Darknet Installation
- Go to the directory and download the YOLO weights:
cd darknet wget https://pjreddie.com/media/files/yolov3.weights
Using YOLO
- Using YOLO with Darknet (GPU + OpenCV). Tested on Ubuntu 16.04
Using YOLO with an image
- Go to the directory and run the detector for images:
cd darknet ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
Using YOLO with a video
- Go to the directory and run the detector for videos:
cd darknet ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights data/ny720p2.mp4
- Run the detector (webcam):
./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights
Training your own Dataset
- Download the convolutional weights from the darknet53 model that are pre-trained on Imagenet and place them in the Darknet folder:
wget https://pjreddie.com/media/files/darknet53.conv.74
- Step 1: Images
- Download the images for the categories that you would like YOLO to detect.
- Step 2: Data Annotation
- Download the YOLO annotation tool:
https://github.com/ManivannanMurugavel/Yolo-Annotation-Tool-New-
- Enter the directory with the terminal:
cd Downloads cd Yolo-Annotation-Tool-New- python main.py
- Past the path where you have placed the images of the first category of your dataset and click the button "Load"
- Create the bounding boxes in each one of the images in this category by first, clicking on the image and then clicking on the button Next
- When you are done with all the images of that category
- We need to create 3 files:
- myDataset.data
Guide
- https://pjreddie.com/darknet/yolo/
- Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners