Welcome back.
We added the required dependencies for our project.
Now let's start building the data classes.
Create a new package.
Name it as data.
Inside this package, create a new Kotlin data class.
Name it as detection object.
This data class has three variables val score.
It's of type float val label.
It's of type string val bounding box.
It's of type rect f rect f from Android graphics.
Inside this data package, create a new data class.
Name it as detection parameters.
Inside this detection parameters set val score threshold.
It's of type float and set it to 0.6.
So any object with inference with approximation greater than 60% go and display this object.
So this is the threshold.
Everything above 0.7 or 60%.
Go and display this object.
So we we trust that the object is 60% accurate.
And this is a good a range and a good percentage for object detections.
You can increase the inference if you need objects with higher inference and scores.
So you set it to 0.8 which means 80% and detections and probability 0.9 is higher as and so on.
Okay.
I prefer using 0.66.
And this is good.
This is a score threshold.