What is YOLOv5? Installing and Running YOLOv5 Starting from Zero

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what you're now seeing is the output of a yolo v5 and this video is a basic tutorial for those who like to benchmark a yolo v5 on their own videos or their own data sets after watching this video you would be able to render such object detection results or the bounding boxes on your own video footage this video is composed of two parts in the first part we are going to talk about what is a yolo v5 and how to run it on your own pc so that you can do your own benchmarks the second part is a video benchmark on four different models of yellow v5 using aerial footages so let's begin so in the first part we're going to mainly focus on these two questions what is this yolo thing we have just mentioned and how to use or benchmark yolo on our own computer using our own videos yolo is a state-of-the-art machine learning model for object detection there are different versions of yolo and by the time this video is made the most advanced yolo is yolo v5 invented by this guy i apologize so i don't know how to read his name probably this introduction is too brief but don't worry we're about to explain this more intuitively just think you as a machine if you're giving an input it will process it and give you an output so what is the input and output of a yolo since yolo is an object detection model it takes in an image or could be a batch of images as its input after processing this image it puts bounding boxes on it telling you there is one object detected in each bounding box these bounding boxes are its output it also recognizes what object it is inside each bounding box for example an output image shown here in the red bounding box there is a person but in the yellow bounding box there is a backpack in short yolo is a machine that puts such bounding boxes on pictures but yolo does not directly draw or render these boxes onto the image instead for each bounding box it provides you with several values for one bounding box it provides an x main and x max a y mean and y max to represent where this bounding box is a fifth value stands for the label where i'll say the id of this object for example 0 stands for person 27 stand for tie or some other value that stands for traffic light etc so with a label 0 we know there is a person here and then we can write person while rendering this bounding box the final value is the confidence telling you how sure it is with this entire result of course if you think yolo as a function which is orange f here its output should be a series of vectors just like many other machine learning models if this is your area of expertise of course you can directly manipulate these factors or you can choose to output the results to a partners data frame or a csv file or you can use the raw data for some other programming tasks you can even fine tune the model if you wish it's totally up to you but today we are not going further into this what we focus today is to run a yolo on your own pc and render your own benchmark video first of all we need a python environment there's no need for you to know how to program in python as the code is already there we just have to run it you can use either an individual python environment or an environment within anaconda both are fine if you don't have a python environment you can quickly get started by going to python.org and download it here we click this python version here under the download and we select the most appropriate version of python for our pc for me it's this one and yep download starts while you're installing this individual version of python please don't forget to add python to paths which will save you some effort later you can do it like this while you're installing you can also search online for how to install anaconda but we won't go through this today okay so the next step is to download the project from gtap i used this open source one by autolytics so what we have to do is like this we go back to google and research yellow v5 we click into this first link by autolytics on github and here we go if we scroll down then we can see some documentations and as we can see there are multiple versions of yellow e5 but now we simply click this green button code and we click this download zip and bingo download starts so now we have a yolo v5 dash master.zip and we simply unzip this file okay so the next step is to install some necessary libraries before we install these libraries we are going to launch the anaconda powershell prompt here if you have installed an individual version of python you can simply go to cmd if you have added that python to the system path okay so the first library we are going to install is pytorch if you have already installed pytorch on your computer you can simply skip this part if you don't have a pi torch installed on a computer then we can go back to google and search pytorch p-y-p-o-r-c-h we click into this first link and we scroll down [Music] here we can make some choices i'm installing this pi touch to my pc windows pc so i'm choosing this windows and i'm choosing pip if you if your python is running within anaconda then you can also choose counter and i'm installing this pytorch um for my python environment so i'm choosing this python finally my qr version is 11.3 so i'm choosing this 11.1 and it works without configurations here the system will generate a command we can simply copy this command and if you are running an individual version of python you can directly right click in your cmd window to paste this command and you can click enter to run it however if you are with an anaconda then please make sure to first activate the correct sub environment before executing this command you might encounter some problems while installing pytorch and google could be helpful once you see your console screen cleared with a down written at the top then congratulations your pi touch is successfully installed [Music] okay so now we are going to switch to the directory where our yolo e5 is located so i'm going to i remember that directory is a d so i am typing d colon to switch to d and uh let me see here yeah it's this directory so what i need to do is to type cd and plus this path [Music] okay so now we are in this is for the convenience of accessing the python scripts as well as the files in this folder and now i'm going to copy an mt4 file and paste it in this folder as you can see this one pubg.mp4 okay so now let's type together python detect dot py dash dash source pubg dot mp4 and we click enter and we can see there are some problems as we can see this is because the tqdm library was not found actually we haven't installed all the necessary libraries we have just installed one so we can simply type here pip install tqdm and the tqldm library will be installed automatically you are going to install multiple other libraries in this way including one called yaml while you are installing this library please type pip install pyyaml instead of directly yaml when such error does not occur anymore then congratulations again yolo v5 is running on your computer since this is the first time running downloading the weight might take some time this depends on your internet connection [Music] when it completes you can see this and you can go to this directory to check your results [Music] and this will be our result [Music] as we have previously seen on the gta page there are actually multiple versions of yellow v5 apart from this yellow v5s we have for example this yolo v5s6 so how can we benchmark this new model actually we can specify this in the command line let's type together okay so that should do it and as we can see the program is now automatically downloading the new weight [Music] [Music] so [Music] do [Music] so [Music] so [Music] [Music] [Music] [Music] [Music] [Music] so [Music] [Music] [Music] [Music] you
Info
Channel: Pei Yang
Views: 24,828
Rating: undefined out of 5
Keywords:
Id: h-PlslPNaeI
Channel Id: undefined
Length: 17min 0sec (1020 seconds)
Published: Tue Aug 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.