1
00:00:00,510 --> 00:00:07,680
Hi and welcome back to the course in this section, we'll take a look at using deep sort with YOLO V

2
00:00:07,680 --> 00:00:14,220
five to implement and integrate the tracking module with our object detector, which is YOLO V5.

3
00:00:14,790 --> 00:00:16,050
So let's get started.

4
00:00:16,110 --> 00:00:19,140
So open notebook 58, and we'll begin.

5
00:00:19,320 --> 00:00:27,480
And firstly, I will just say this YOLO V5 is the ultimate X Torch v4 YOLO integration.

6
00:00:28,590 --> 00:00:32,010
So also, just make sure you're using a GPU again for this lesson.

7
00:00:32,670 --> 00:00:35,320
You can check it here because it's a lot faster.

8
00:00:35,340 --> 00:00:41,820
It works with the CPU, but you know, GPUs are necessary in this deep learning computer vision world.

9
00:00:42,630 --> 00:00:44,580
So run this first block here.

10
00:00:44,590 --> 00:00:52,050
This Clunes, the report that we'll be using gets to model and installs the other required packages

11
00:00:52,050 --> 00:00:52,620
that we need.

12
00:00:52,920 --> 00:00:55,140
So it takes about 25 to 30 seconds.

13
00:00:56,220 --> 00:00:57,570
Next, skip this line.

14
00:00:57,580 --> 00:01:01,310
This was the previous code that we used to work with.

15
00:01:01,320 --> 00:01:04,740
I cleaned it up and now posted everything here.

16
00:01:04,890 --> 00:01:11,400
So this downloads the test video file, as well as the models actually the model to download it here

17
00:01:12,210 --> 00:01:12,810
next.

18
00:01:12,960 --> 00:01:15,570
So this takes about six to seven 10 seconds.

19
00:01:16,200 --> 00:01:18,720
Next, all you need to do is just run.

20
00:01:19,110 --> 00:01:26,160
So what we did before is that we don't let it a video calling it YouTube output because that was just

21
00:01:26,490 --> 00:01:32,010
a video on YouTube and per license free video I should add just to clarify.

22
00:01:32,640 --> 00:01:35,730
And yeah, it's downloaded here.

23
00:01:35,730 --> 00:01:36,920
So we just have that file.

24
00:01:36,930 --> 00:01:43,920
So all this track file needs is you need to point to the your five model that we'll be using to just

25
00:01:43,920 --> 00:01:45,180
point to the directory here.

26
00:01:45,750 --> 00:01:51,780
And we just point to where this YouTube file is stored and then we just go save it to see if the output.

27
00:01:52,350 --> 00:01:58,710
So this takes just under a minute to run, and it generates about seven seconds of video.

28
00:01:59,460 --> 00:02:02,960
And next, we could just convert it now to an MPEG4.

29
00:02:02,970 --> 00:02:10,350
But so we take the API committed to output the MPEG four and the six, about 30 seconds, roughly.

30
00:02:10,740 --> 00:02:17,910
And now we can display that video in our output, but by running this block here as well as this block.

31
00:02:18,330 --> 00:02:21,240
This takes about 20 seconds to load the video player.

32
00:02:21,930 --> 00:02:26,070
But let's check it out so you can see how well this is working.

33
00:02:26,070 --> 00:02:30,300
Carnival one is consistently kind of a one one that is sexist as well.

34
00:02:30,780 --> 00:02:33,850
Let's restore the video, and let's take a look at this person here.

35
00:02:33,870 --> 00:02:38,310
You can see this woman, this person of five to six seven.

36
00:02:39,450 --> 00:02:41,190
So you can see it's it's working quite well.

37
00:02:41,340 --> 00:02:42,830
Watch it one more time.

38
00:02:42,840 --> 00:02:43,350
Let's look at it.

39
00:02:43,350 --> 00:02:46,560
Cause again, the motorcycle.

40
00:02:46,710 --> 00:02:49,140
See, even though he disappears, it's 5:09.

41
00:02:49,140 --> 00:02:56,730
Let's take a look at that one more time so you can see the motorcycle for a moment 22 28.

42
00:02:56,730 --> 00:03:02,670
Which is a mistake, though, but generally this is looking quite low because this is a very cluttered

43
00:03:02,670 --> 00:03:03,450
cynicism.

44
00:03:03,780 --> 00:03:10,200
London Piccadilly Circus, which is a jam packed area and it's working quite well.

45
00:03:11,790 --> 00:03:14,280
So that's it for this lesson.

46
00:03:15,270 --> 00:03:17,220
What I will say is take a look.

47
00:03:17,580 --> 00:03:24,500
The code in this report because it is quite simple and easy to understand the track, the API file.

48
00:03:25,220 --> 00:03:27,540
And let's bring it up here so you can take a look.

49
00:03:28,110 --> 00:03:30,780
This is where everything is integrated here.

50
00:03:31,310 --> 00:03:33,750
It's well, commented the well labeled.

51
00:03:33,750 --> 00:03:36,780
And it's all of the it's quite easy to understand.

52
00:03:36,780 --> 00:03:44,330
In my opinion, they did a good job with this, and you can set all the parameters as well for different

53
00:03:44,340 --> 00:03:47,070
thresholds, but you'll be five as well as deep sort.

54
00:03:47,760 --> 00:03:53,250
So if you wanted to integrate deep sort deal of your five, you can just use this repo and build it

55
00:03:53,250 --> 00:03:53,520
there.

56
00:03:54,270 --> 00:03:56,560
OK, so thank you for watching.

57
00:03:56,580 --> 00:04:04,290
And in the next section, we'll take a look at making deepfakes, which is a very cool and fun, sometimes

58
00:04:04,470 --> 00:04:06,180
immoral thing to do.

59
00:04:06,840 --> 00:04:08,550
So I'll see you in the next lesson.

60
00:04:08,730 --> 00:04:09,120
Thank you.
