WEBVTT

00:00.080 --> 00:01.920
We validated the model.

00:01.920 --> 00:05.440
Now let's test our model and make the predictions.

00:05.560 --> 00:07.680
I prepared this image.

00:07.680 --> 00:15.800
I take it from um, from my mobile and it's not included in my data set.

00:15.800 --> 00:18.320
So drag and drop it to here.

00:18.440 --> 00:21.880
It's called new image dot jpg.

00:22.000 --> 00:30.120
By the way, did you notice that U11 and U11 YOLO version eight and the files are included?

00:30.240 --> 00:37.240
Actually we are going to use the YOLO version uh eight and DT for training.

00:37.240 --> 00:40.480
And this is what we've used in the previous videos.

00:40.480 --> 00:42.880
Now let's test our image.

00:42.880 --> 00:45.560
This is new image dot jpg.

00:45.960 --> 00:49.000
It's including uh, a battery.

00:49.200 --> 00:56.040
Now let's test the model and see if it will detect the battery or not.

00:56.080 --> 00:59.760
To make the predictions let me start with ultra.

00:59.760 --> 01:03.880
Let's import YOLO and load the model.

01:03.880 --> 01:07.310
Model equals to YOLO Content.

01:07.310 --> 01:11.910
As I told you, we need to use our trained model.

01:11.910 --> 01:14.070
The trained model is called best.

01:14.830 --> 01:18.110
Copy the path and paste it here.

01:18.230 --> 01:23.150
Like this okay, now model dot predict.

01:23.150 --> 01:32.510
We're going to use the predict function for predicting the object on our new Image.jpg copy path.

01:32.550 --> 01:36.350
Copy path of this image and paste it here.

01:36.390 --> 01:36.870
Okay.

01:37.070 --> 01:40.830
Then what we need to add is some parameters.

01:40.830 --> 01:43.110
Save equals to true.

01:43.270 --> 01:47.670
We need to save it to the content and image size.

01:47.670 --> 01:50.270
We can set it to 640.

01:50.310 --> 01:51.150
It's good.

01:51.270 --> 01:55.390
And the confidence display a confidence.

01:55.590 --> 02:04.150
If there is a detection greater than 40% you can increase this up to 100%.

02:04.190 --> 02:10.070
Okay, so here I am telling a YOLO model that we created here.

02:10.230 --> 02:13.180
Inside the runs detect strain and waits.

02:13.180 --> 02:14.100
Best pity.

02:14.340 --> 02:19.020
Go and examine this new image.jpg.

02:19.340 --> 02:27.820
If it contains any object, and the confidence of your detection is greater than 50%, go and detect

02:27.820 --> 02:28.020
it.

02:28.060 --> 02:31.140
Draw a box around it and save it.

02:31.180 --> 02:32.900
Let me run and see.

02:32.940 --> 02:33.820
And here we go.

02:34.020 --> 02:36.420
Results saved to content.

02:36.460 --> 02:37.740
Let me go up.

02:37.940 --> 02:38.780
Content.

02:38.820 --> 02:39.620
Run, run.

02:39.740 --> 02:41.860
Detect and predict.

02:41.860 --> 02:42.340
You see?

02:42.380 --> 02:43.140
New folder.

02:43.140 --> 02:44.700
Predict is created.

02:44.740 --> 02:46.260
There is a new image.

02:46.260 --> 02:47.540
Let me open it.

02:47.540 --> 02:49.180
And here we go.

02:49.180 --> 02:52.220
Guys, this is the prediction.

02:52.220 --> 02:55.620
Battery a box drawn around this.

02:55.660 --> 03:02.940
And the percentage of or the confidence is 0.95 which is 95%.

03:02.980 --> 03:10.820
Okay so congratulations guys for detecting this object using the trained model.

03:11.100 --> 03:13.500
This is how we train the models.

03:14.020 --> 03:17.300
How to train a custom model in YOLO.
