In this section, we will learn how we can integrate YOLO v9 with flask and create a web app to do object
detection on images and on videos.
So here is a quick demo of how our application works.
So here you can see the upload icon.
So I will click on this icon over here.
And first I will upload an image.
So let me upload this image of players play football.
And after this I click on this play button.
So now I will show you how we can do object detection on this image.
So as you can click on the play button the processing starts and in two seconds you will get the output
image where we will have the person, both of the persons as are detected.
And you can see that, uh, this person is a bit far away and it's blurred, but our YOLO v nine model
is able to detect this person as well.
And you can see this person is too far away.
Plus it is blurred.
But our YOLO nine model has detected this person as well.
Thus we are also able to detect sports ball as well.
So four persons and one sports ball is being detected in this image.
So in the same way you can upload any video as well.
So let me upload this video in which a different persons are walking on a street.
Okay.
So I will click on this play button after this.
And now you can see the processing has started.
And uh this may take a few seconds.
I'm running it on CPU so the processing will be very slow.
But if you have a good chip, you just processing, uh, will be high and you will getting a good FPS.
So now you can see that, um, all detections in this video are being done.
Done frame by frame.
So, uh, all the detections are being done frame by frame.
And you can see the results over here on the screen.
Like you can see we are able to detect the person's handbag okay.
And the detection results are very good.
Like you can see that this handbag is too far away.
But our YOLO v nine model is able to detect this handbag.
This handbag is also detected.
But you can see that, uh, there are some persons which are very far away, but our model is successfully
able to detect this persons.
So we will be getting this complete web app like you can see over here.
And we will be doing object detection or images and videos using YOLO v9.
So let us create this web app using class.