Object Tracking Using DeepSORT and YOLOv5 | Multi Object Tracking

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this is rohi and welcome to my channel so guys in this video i will show you how we can perform object tracking using yolo v5 and deep sort algorithm so whenever we want to perform object tracking there are two things first is object detection and then we perform object tracking okay so for object detection we'll use yellow v5 algorithm and for object tracking we'll use deep sort algorithm so let's begin so guys first step is to clone this github repo i'm cloning this github repo and once you clone this github repo you will get this type of folder in your current working directory when you open this folder you will see a requirements.txt file over here and this requirement file have all the mod modules which you need to install if you want to run this particular code right so that's what i'm doing i'm entering in the folder i'm installing the requirements there's one thing to note over here is if you'll check this github repo over here they have mentioned to install python 3.8 or the later versions so when i tried my code with python 3.8 so i was getting some errors so i have downgraded my python version to this particular version so this is just an optional step i'm just telling you let's suppose if you're working with python 3.8 and you got you know any sort of errors then you can work with python 3.7 also and specifically i am using this particular version okay and uh okay you have installed the requirements now and after that now using this command we can perform the you know object tracking task so guys in my today's video i'm not working on a custom data set i'll show you that in my next video how to use object uh how to perform object tracking on your custom data set using this deep sort algorithm and yolo v5 in this video we will use a coco dataset a pre-trained model which uh we'll use a pre-trained model which is trained on coco dataset and we we are using the trained model and we'll give some demo video and we'll see if the object tracker is working or not okay so we have one file with the name of track dot py you'll get that file when you will clone when you'll open this clone github repo over there you'll see this track file okay using this file we are running okay so source okay now i want to run this object tracker on a video so that's why i'm writing this in a source so if you want to use webcam you can write source zero for image you can do this and for video you can do this okay so i am testing on a video so this is my source and guys this is this parameter is important save video because if you will not write this parameter in the command then algorithm will run but the saved video the video with the object tracking and detections that video will not be saved in any folder so if you want to save that video then you need to pass this parameter and this is the uh deep sort algorithm weights on cocoa dataset so we are providing that now let me show you the video before tracking first and then i'll show you the same video after tracking okay so the video is okay so this is the video on which i want to perform the tracking right just see this video all right now let's close it once you run this command guys after that and you can see here for every frame let me scroll up okay and when you will execute this command you'll see like this and for every frame the video which i'm giving it has 388 frames and for every frame it will also give you a count like this two persons seven cards three traffic lights okay in first frame these are the things in second frame these are the thing third frame have these things okay you'll get results like this and finally your video will be stored at this particular location okay now let's open that video and see so you'll get this runs folder once you execute this command right this runs folder will uh get created itself once you run that with that command and when you open it go under this track exp4 now let me run this video now you can see objects are tracking and uh in front of every object there is one id because object tracking we are tracking the object if one unique id will be assigned to one item right so every item this is traffic light right detection okay let's play again so this is a traffic light and over here we are getting a confidence score and in front of it we are getting a id9 okay in the same way this is a traffic light over here we have a confidence score and id is 10 for this every object will get a different id so this is how it works and guys now the next thing is this is one thing now for example if you want to track the object but you don't want to track all the objects you don't want to track the cars you only want to track the persons then how you can implement this code so for that this is the code tractor for uh py again source i'm working on that video only and these are the weights right these are the yellow weights these are the uh deep sort algorithm weights save video will save the uh our output video and classes zero class zero is for uh persons and let's suppose if you want to uh work on different classes for cat id is 16 for dogs idea is 17 this is how you can work on specific uh you know classes so now at this particular location we have a video where we are tracking only humans okay so let's see that let's open this video guys now you can see we are only tracking humans no traffic lights no cars nothing is detecting we are only tracking the persons over here okay so you can see here right so um this is how this object tracker work so guys um i will share this link the github link in my description section you can try this code and i'll show you how to work on custom classes custom data set using this yolo v5 and deepsort in my next video i hope you like my video thank you for watching and guys if you like my channel if you like my videos please like share and subscribe my channel thank you for watching
Info
Channel: Code With Aarohi
Views: 24,626
Rating: undefined out of 5
Keywords: DeepSORT, Object Tracking, yolov5, AI, Object Detection, Deep Neural Networks, Convolutional Neural Network, CNNs, Artificial Intelligence, Machine Learning, Computer Vision, Aarohi Singla, Piford Technologies, Akminder
Id: NhCQBQqTAhE
Channel Id: undefined
Length: 7min 42sec (462 seconds)
Published: Fri Jul 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.