Welcome back.
We've added our model TensorFlow model and we added the dependencies camera and TensorFlow to our project.
Now create a new package.
Name it as data.
Inside this data package.
Create a new Kotlin class.
Name it as detection results or result.
This is a data class so marked as data class.
Let me change this to instructor.
And inside this data class we need to get Val label.
It's of type string val confidence.
It's of type float and val bounding box.
It's of type rect f normalized coordinates.
So here we are defining a data class in Kotlin that represents a single object detection result from
your TensorFlow model.
This class serves as a structured container to hold all information about a detected object in a single
organized unit.
The label is of type string.
The name or the class of the detected object.
If you remember from the teachable machines, we have two classes the hard disk and the airports.
So this is the label in your in our case and in our application we have two classes hard disk or airports.
And by the way guys you should place the uh the labels dot txt file into our assets folder.
So copy it and paste it inside the folder click okay.
And here we go.
Now remove the zeros and one and make sure that they are every every class on a new line okay.
So here we have the hard disk and the AirPods.
We removed zero and one numbers and you should make the labels dot txt file like this.
Okay so this is how we edit and and and and organize the labels for our model.
The second parameter is the confidence.
How confident the model is about this detection.
And this is the probability.
So probability ranges from 0 to 100.
And uh for example uh .0.85 if you are using a range from 0 to 1 represents 85% the correct f, the
rectangular area where the object was detected.
So here, um, actually we're going to draw a rectangular area about the object.
So rectangular area where the object was detected.
Okay.
So this is our data class named as detection result.