WEBVTT

00:00.080 --> 00:01.000
Welcome back.

00:01.040 --> 00:10.360
We've added our model TensorFlow model and we added the dependencies camera and TensorFlow to our project.

00:10.400 --> 00:12.920
Now create a new package.

00:12.920 --> 00:15.200
Name it as data.

00:15.200 --> 00:16.840
Inside this data package.

00:16.840 --> 00:19.120
Create a new Kotlin class.

00:19.120 --> 00:23.320
Name it as detection results or result.

00:23.320 --> 00:27.920
This is a data class so marked as data class.

00:27.960 --> 00:31.160
Let me change this to instructor.

00:31.280 --> 00:36.080
And inside this data class we need to get Val label.

00:36.080 --> 00:40.000
It's of type string val confidence.

00:40.160 --> 00:45.520
It's of type float and val bounding box.

00:45.520 --> 00:49.720
It's of type rect f normalized coordinates.

00:49.880 --> 00:57.960
So here we are defining a data class in Kotlin that represents a single object detection result from

00:57.960 --> 01:00.040
your TensorFlow model.

01:00.040 --> 01:09.300
This class serves as a structured container to hold all information about a detected object in a single

01:09.300 --> 01:10.780
organized unit.

01:10.780 --> 01:13.220
The label is of type string.

01:13.260 --> 01:16.460
The name or the class of the detected object.

01:16.580 --> 01:24.140
If you remember from the teachable machines, we have two classes the hard disk and the airports.

01:24.180 --> 01:33.900
So this is the label in your in our case and in our application we have two classes hard disk or airports.

01:33.900 --> 01:43.220
And by the way guys you should place the uh the labels dot txt file into our assets folder.

01:43.220 --> 01:48.780
So copy it and paste it inside the folder click okay.

01:48.820 --> 01:50.180
And here we go.

01:50.220 --> 02:02.500
Now remove the zeros and one and make sure that they are every every class on a new line okay.

02:02.940 --> 02:06.180
So here we have the hard disk and the AirPods.

02:06.180 --> 02:14.970
We removed zero and one numbers and you should make the labels dot txt file like this.

02:15.010 --> 02:23.810
Okay so this is how we edit and and and and organize the labels for our model.

02:23.970 --> 02:27.330
The second parameter is the confidence.

02:27.330 --> 02:30.930
How confident the model is about this detection.

02:31.130 --> 02:33.970
And this is the probability.

02:33.970 --> 02:38.730
So probability ranges from 0 to 100.

02:38.770 --> 02:52.290
And uh for example uh .0.85 if you are using a range from 0 to 1 represents 85% the correct f, the

02:52.290 --> 02:56.050
rectangular area where the object was detected.

02:56.050 --> 03:04.970
So here, um, actually we're going to draw a rectangular area about the object.

03:04.970 --> 03:10.610
So rectangular area where the object was detected.

03:10.650 --> 03:11.130
Okay.

03:11.370 --> 03:16.330
So this is our data class named as detection result.
