SlideShare a Scribd company logo
1 of 31
Outline
1. Introduction
2. Install Darknet
3. Training YOLO on VOC
4. Training YOLO on COCO
5. Train YOLO on Your Own Data
5. Install YOLO3-4-Py
1. Introduction
What's YOLO
You only look once (YOLO) is a state-of-the-art, real-time object detection system. On a Pascal Titan X
it processes images at 30 FPS and has a mAP of 57.9% on COCO test-dev.
The network divides the image into regions and predicts bounding boxes and probabilities for each
region. These bounding boxes are weighted by the predicted probabilities.
YOLOv3 is extremely fast and accurate. In mAP measured at .5 IOU YOLOv3 is on par with Focal Loss but
about 4x faster. Moreover, you can easily tradeoff between speed and accuracy simply by changing the
size of the model, no retraining required!
Comparison with Other Detectors
Performance on the COCO Dataset
2. Install Darknet
Darknet has two OPTIONAL dependencies:
• OpenCV if you want a wider variety of supported image types.
• CUDA and cuDNN if you want GPU computation.
Install Darknet
Install Darknet with GPU Support
Clone the repository and make:
$ git clone https://github.com/pjreddie/darknet
$ cd darknet
Edit the makefile and set GPU=1, CUDNN=1, OPENCV=1:
$ vim Makefile
Build:
$ make
Add the directory to ~/.bashrc:
export DARKNET_HOME=/home/ben/ProgTest/third-part/darknet
export PATH=$PATH:$DARKNET_HOME
$ source ~/.bashrc
https://pjreddie.com/darknet/yolo/
Test Darknet
Get pretrained model:
$ wget https://pjreddie.com/media/files/yolov3.weights
Edit cfg/yolov3.cfg to save the memory:
batch=1
subdivisions=1
width=416
height=416
Test YOLOv3:
./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
!! Running YOLO on the CPU takes around 6-20 seconds
per image. It takes 0.082 seconds to run YOLO on GTX 960.
Detect Multiple Images
Leave the name of the image blank to try multiple images:
$ ./darknet detect cfg/yolov3.cfg yolov3.weights
Try different images e.g. data/eagle.jpg, data/dog.jpg, data/person.jpg,
or data/horses.jpg.
Use Ctrl-C to exit the program once you are done.
Changing The Detection Threshold
The default confidence of YOLO is 0.25 or higher.
You can change the threshold with -thresh flag:
$ ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg -thresh 0.1
Threshold=0.1​Default
Tiny YOLOv3
Run Tiny YOLOv3:
$ wget https://pjreddie.com/media/files/yolov3-tiny.weights
$ ./darknet detect cfg/yolov3-tiny.cfg yolov3-tiny.weights data/dog.jpg
Real-Time Detection
Real-Time Detection on a Webcam:
$ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights
Real-Time Detection on a video file:
$ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights <video file>
2. Training YOLO on VOC
The PASCAL Visual Object Classes Challenge
The goal of this challenge is to recognize objects from a number of visual object classes in realistic
scenes (i.e. not pre-segmented objects). It is fundamentally a supervised learning learning problem
in that a training set of labelled images is provided.
Get The Pascal VOC Data
$ wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar
$ wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar
$ wget https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar
$ tar xf VOCtrainval_11-May-2012.tar
$ tar xf VOCtrainval_06-Nov-2007.tar
$ tar xf VOCtest_06-Nov-2007.tar
Generate Labels for VOC
Darknet wants a .txt file for each image with a line for each ground truth object in
the image that looks like:
<object-class> <x> <y> <width> <height>
Use Python script to generate the labels:
$ wget https://pjreddie.com/media/files/voc_label.py
$ python3 voc_label.py
The script generates a lot of label files in VOCdevkit/VOC2007/labels and
VOCdevkit/VOC2012/labels. The script also generates a text files which contains the
path of the images e.g. 2007_train.txt.
Set the targets to train YOLO:
$ cat 2007_train.txt 2007_val.txt 2012_*.txt > train.txt
Organize the Files and Folders
$ mv /voc_label.py ​VOCdevkit
$ mv *.txt VOCdevkit
The files and folders under VOCdevkit:
Edit the Configuration of Data
Edit cfg/voc.data:
classes= 20
train = <path-to-voc>/train.txt
valid = <path-to-voc>2007_test.txt
names = data/voc.names
backup = backup
data/voc.names contains the classes of VOC dataset.
Edit the Configuration of Model
Edit cfg/yolov3-voc.cfg:​
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
Train with VOC Dataset
Download the pretrained weight:
$ wget https://pjreddie.com/media/files/darknet53.conv.74
$ ./darknet detector train cfg/voc.data cfg/yolov3-voc.cfg darknet53.conv.74
Edit the Configuration and Test
Edit cfg/yolov3-voc.cfg:​
# Testing
batch=1
subdivisions=1
# Training
# batch=64
# subdivisions=16
Test the new model:
$ ./darknet detector test cfg/voc.data cfg/yolov3-voc.cfg backup/yolov3-voc_final.weights 
VOCdevkit/VOC2007/JPEGImages/004948.jpg -thresh 0.1
3. Training YOLO on COCO
3. Install YOLO3-4-Py
YOLO3-4-Py is a Python wrapper of YOLO V3 Object Detector on Darknet which is also
compatible with other Darknet Object Detection models.
What's YOLO3-4-Py
http://absfreepic.com/free-photos/download/crowded-
vehicles-on-road-4752x3168_79207.html
Install YOLO3-4-Py
Add the variables to ~/.bashrc:
export DARKNET_HOME=/home/xxx/ooo/darknet/
export CUDA_HOME=/usr/local/cuda-9.0/
export PATH=${DARKNET_HOME}:${CUDA_HOME}bin:${PATH}
$ source ~/.bashrc
Install the share library and the header:
$ cd $DARKNET_HOME
$ sudo cp libdarknet.so /usr/lib
$ sudo cp include/darknet.h /usr/include
Installation from PyPI distribution:
$ sudo pip3 install yolo34py-gpu
https://github.com/madhawav/YOLO3-4-Py
Install YOLO3-4-Py
Installation from source:​
$ git clone https://github.com/madhawav/YOLO3-4-Py.git​
​$ export GPU=1​
$ export OPENCV=1
$ sudo pip3 install .
Test YOLO3-4-Py
Test with the sample code:
$ cd $DARKNET_HOME
$ mkdir weights
$ cd weights
$ wget https://pjreddie.com/media/files/yolov3.weights
$ cd ..
$ python3 sampleApp.py
https://pypi.org/project/yolo34py/
sampleApp.py​
Darknet yolo

More Related Content

What's hot

You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)Universitat Politècnica de Catalunya
 
#10 pydata warsaw object detection with dn ns
#10   pydata warsaw object detection with dn ns#10   pydata warsaw object detection with dn ns
#10 pydata warsaw object detection with dn nsAndrew Brozek
 
You Only Look Once: Unified, Real-Time Object Detection
You Only Look Once: Unified, Real-Time Object DetectionYou Only Look Once: Unified, Real-Time Object Detection
You Only Look Once: Unified, Real-Time Object DetectionDADAJONJURAKUZIEV
 
Yolo v2 ai_tech_20190421
Yolo v2 ai_tech_20190421Yolo v2 ai_tech_20190421
Yolo v2 ai_tech_20190421穗碧 陳
 
YOLO9000 - PR023
YOLO9000 - PR023YOLO9000 - PR023
YOLO9000 - PR023Jinwon Lee
 
Deep learning for object detection
Deep learning for object detectionDeep learning for object detection
Deep learning for object detectionWenjing Chen
 
Object detection
Object detectionObject detection
Object detectionSomesh Vyas
 
Anatomy of YOLO - v1
Anatomy of YOLO - v1Anatomy of YOLO - v1
Anatomy of YOLO - v1Jihoon Song
 
A Brief History of Object Detection / Tommi Kerola
A Brief History of Object Detection / Tommi KerolaA Brief History of Object Detection / Tommi Kerola
A Brief History of Object Detection / Tommi KerolaPreferred Networks
 
Deep learning based object detection
Deep learning based object detectionDeep learning based object detection
Deep learning based object detectionchettykulkarni
 
Object Detection with Tensorflow
Object Detection with TensorflowObject Detection with Tensorflow
Object Detection with TensorflowElifTech
 

What's hot (20)

You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)You only look once: Unified, real-time object detection (UPC Reading Group)
You only look once: Unified, real-time object detection (UPC Reading Group)
 
YOLO
YOLOYOLO
YOLO
 
#10 pydata warsaw object detection with dn ns
#10   pydata warsaw object detection with dn ns#10   pydata warsaw object detection with dn ns
#10 pydata warsaw object detection with dn ns
 
You Only Look Once: Unified, Real-Time Object Detection
You Only Look Once: Unified, Real-Time Object DetectionYou Only Look Once: Unified, Real-Time Object Detection
You Only Look Once: Unified, Real-Time Object Detection
 
Yolo releases gianmaria
Yolo releases gianmariaYolo releases gianmaria
Yolo releases gianmaria
 
Yolo v2 ai_tech_20190421
Yolo v2 ai_tech_20190421Yolo v2 ai_tech_20190421
Yolo v2 ai_tech_20190421
 
Yolo
YoloYolo
Yolo
 
YOLO V6
YOLO V6YOLO V6
YOLO V6
 
Yol ov2
Yol ov2Yol ov2
Yol ov2
 
YOLO.pptx
YOLO.pptxYOLO.pptx
YOLO.pptx
 
Yolov5
Yolov5 Yolov5
Yolov5
 
YOLO9000 - PR023
YOLO9000 - PR023YOLO9000 - PR023
YOLO9000 - PR023
 
Deep learning for object detection
Deep learning for object detectionDeep learning for object detection
Deep learning for object detection
 
Object detection
Object detectionObject detection
Object detection
 
Anatomy of YOLO - v1
Anatomy of YOLO - v1Anatomy of YOLO - v1
Anatomy of YOLO - v1
 
A Brief History of Object Detection / Tommi Kerola
A Brief History of Object Detection / Tommi KerolaA Brief History of Object Detection / Tommi Kerola
A Brief History of Object Detection / Tommi Kerola
 
Object detection
Object detectionObject detection
Object detection
 
Deep learning based object detection
Deep learning based object detectionDeep learning based object detection
Deep learning based object detection
 
ObjectDetection.pptx
ObjectDetection.pptxObjectDetection.pptx
ObjectDetection.pptx
 
Object Detection with Tensorflow
Object Detection with TensorflowObject Detection with Tensorflow
Object Detection with Tensorflow
 

Similar to Darknet yolo

4_image_detection.pdf
4_image_detection.pdf4_image_detection.pdf
4_image_detection.pdfFEG
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manualjoseig23
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Giulio Vian
 
Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveSling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveRobert Munteanu
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitJongWon Kim
 
DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14Peter Foerger
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to TestZsolt Fabok
 
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsPVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsAndrey Karpov
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetWalter Heck
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetOlinData
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023Anthony Dahanne
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptxwonyong hwang
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
Performance #5 cpu and battery
Performance #5  cpu and batteryPerformance #5  cpu and battery
Performance #5 cpu and batteryVitali Pekelis
 

Similar to Darknet yolo (20)

4_image_detection.pdf
4_image_detection.pdf4_image_detection.pdf
4_image_detection.pdf
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
 
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
Infrastructure as Code in your CD pipelines - London Microsoft DevOps 0423
 
Gradle como alternativa a maven
Gradle como alternativa a mavenGradle como alternativa a maven
Gradle como alternativa a maven
 
Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveSling Applications - A DevOps perspective
Sling Applications - A DevOps perspective
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
 
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsPVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
 
Yobi d2 naver(create)
Yobi d2 naver(create)Yobi d2 naver(create)
Yobi d2 naver(create)
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 
CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023CNCF Québec Meetup du 16 Novembre 2023
CNCF Québec Meetup du 16 Novembre 2023
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptx
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
Performance #5 cpu and battery
Performance #5  cpu and batteryPerformance #5  cpu and battery
Performance #5 cpu and battery
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Darknet yolo

  • 1.
  • 2. Outline 1. Introduction 2. Install Darknet 3. Training YOLO on VOC 4. Training YOLO on COCO 5. Train YOLO on Your Own Data 5. Install YOLO3-4-Py
  • 4. What's YOLO You only look once (YOLO) is a state-of-the-art, real-time object detection system. On a Pascal Titan X it processes images at 30 FPS and has a mAP of 57.9% on COCO test-dev. The network divides the image into regions and predicts bounding boxes and probabilities for each region. These bounding boxes are weighted by the predicted probabilities.
  • 5. YOLOv3 is extremely fast and accurate. In mAP measured at .5 IOU YOLOv3 is on par with Focal Loss but about 4x faster. Moreover, you can easily tradeoff between speed and accuracy simply by changing the size of the model, no retraining required! Comparison with Other Detectors
  • 6. Performance on the COCO Dataset
  • 8. Darknet has two OPTIONAL dependencies: • OpenCV if you want a wider variety of supported image types. • CUDA and cuDNN if you want GPU computation. Install Darknet
  • 9. Install Darknet with GPU Support Clone the repository and make: $ git clone https://github.com/pjreddie/darknet $ cd darknet Edit the makefile and set GPU=1, CUDNN=1, OPENCV=1: $ vim Makefile Build: $ make Add the directory to ~/.bashrc: export DARKNET_HOME=/home/ben/ProgTest/third-part/darknet export PATH=$PATH:$DARKNET_HOME $ source ~/.bashrc https://pjreddie.com/darknet/yolo/
  • 10. Test Darknet Get pretrained model: $ wget https://pjreddie.com/media/files/yolov3.weights Edit cfg/yolov3.cfg to save the memory: batch=1 subdivisions=1 width=416 height=416 Test YOLOv3: ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg !! Running YOLO on the CPU takes around 6-20 seconds per image. It takes 0.082 seconds to run YOLO on GTX 960.
  • 11. Detect Multiple Images Leave the name of the image blank to try multiple images: $ ./darknet detect cfg/yolov3.cfg yolov3.weights Try different images e.g. data/eagle.jpg, data/dog.jpg, data/person.jpg, or data/horses.jpg. Use Ctrl-C to exit the program once you are done.
  • 12. Changing The Detection Threshold The default confidence of YOLO is 0.25 or higher. You can change the threshold with -thresh flag: $ ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg -thresh 0.1 Threshold=0.1​Default
  • 13. Tiny YOLOv3 Run Tiny YOLOv3: $ wget https://pjreddie.com/media/files/yolov3-tiny.weights $ ./darknet detect cfg/yolov3-tiny.cfg yolov3-tiny.weights data/dog.jpg
  • 14. Real-Time Detection Real-Time Detection on a Webcam: $ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights Real-Time Detection on a video file: $ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights <video file>
  • 16. The PASCAL Visual Object Classes Challenge The goal of this challenge is to recognize objects from a number of visual object classes in realistic scenes (i.e. not pre-segmented objects). It is fundamentally a supervised learning learning problem in that a training set of labelled images is provided.
  • 17. Get The Pascal VOC Data $ wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar $ wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar $ wget https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar $ tar xf VOCtrainval_11-May-2012.tar $ tar xf VOCtrainval_06-Nov-2007.tar $ tar xf VOCtest_06-Nov-2007.tar
  • 18. Generate Labels for VOC Darknet wants a .txt file for each image with a line for each ground truth object in the image that looks like: <object-class> <x> <y> <width> <height> Use Python script to generate the labels: $ wget https://pjreddie.com/media/files/voc_label.py $ python3 voc_label.py The script generates a lot of label files in VOCdevkit/VOC2007/labels and VOCdevkit/VOC2012/labels. The script also generates a text files which contains the path of the images e.g. 2007_train.txt. Set the targets to train YOLO: $ cat 2007_train.txt 2007_val.txt 2012_*.txt > train.txt
  • 19. Organize the Files and Folders $ mv /voc_label.py ​VOCdevkit $ mv *.txt VOCdevkit The files and folders under VOCdevkit:
  • 20. Edit the Configuration of Data Edit cfg/voc.data: classes= 20 train = <path-to-voc>/train.txt valid = <path-to-voc>2007_test.txt names = data/voc.names backup = backup data/voc.names contains the classes of VOC dataset.
  • 21. Edit the Configuration of Model Edit cfg/yolov3-voc.cfg:​ # Testing # batch=1 # subdivisions=1 # Training batch=64 subdivisions=16 Train with VOC Dataset Download the pretrained weight: $ wget https://pjreddie.com/media/files/darknet53.conv.74 $ ./darknet detector train cfg/voc.data cfg/yolov3-voc.cfg darknet53.conv.74
  • 22. Edit the Configuration and Test Edit cfg/yolov3-voc.cfg:​ # Testing batch=1 subdivisions=1 # Training # batch=64 # subdivisions=16 Test the new model: $ ./darknet detector test cfg/voc.data cfg/yolov3-voc.cfg backup/yolov3-voc_final.weights VOCdevkit/VOC2007/JPEGImages/004948.jpg -thresh 0.1
  • 23. 3. Training YOLO on COCO
  • 24.
  • 26. YOLO3-4-Py is a Python wrapper of YOLO V3 Object Detector on Darknet which is also compatible with other Darknet Object Detection models. What's YOLO3-4-Py http://absfreepic.com/free-photos/download/crowded- vehicles-on-road-4752x3168_79207.html
  • 27. Install YOLO3-4-Py Add the variables to ~/.bashrc: export DARKNET_HOME=/home/xxx/ooo/darknet/ export CUDA_HOME=/usr/local/cuda-9.0/ export PATH=${DARKNET_HOME}:${CUDA_HOME}bin:${PATH} $ source ~/.bashrc Install the share library and the header: $ cd $DARKNET_HOME $ sudo cp libdarknet.so /usr/lib $ sudo cp include/darknet.h /usr/include Installation from PyPI distribution: $ sudo pip3 install yolo34py-gpu https://github.com/madhawav/YOLO3-4-Py
  • 28. Install YOLO3-4-Py Installation from source:​ $ git clone https://github.com/madhawav/YOLO3-4-Py.git​ ​$ export GPU=1​ $ export OPENCV=1 $ sudo pip3 install .
  • 29. Test YOLO3-4-Py Test with the sample code: $ cd $DARKNET_HOME $ mkdir weights $ cd weights $ wget https://pjreddie.com/media/files/yolov3.weights $ cd .. $ python3 sampleApp.py https://pypi.org/project/yolo34py/