Welcome back.
Now let's export our model select TensorFlow Lite.
So here we have floating point quantized and edge TPU.
Go and select floating point.
And here we have the like a documentation how to use this.
So don't worry we're going to use it in a better and a professional way.
Download my model.
It's converting the model to TF Lite.
Please be patient.
Converting model takes some time.
And here we have the converted TF Lite.
Let me open it.
It's here.
Copy it and go to the desktop.
Create a new folder.
And here name it as Object detection.
Extract it.
And you see guys we have two files the label and the model.tf Lite.
This is the model of the object detection and the classification of um, the hard disk and the airports
that we're going to put in Android and this is the labels dot txt open it.
You see guys we have two classes hard disk and AirPods.
So it's very important to keep them and understand that we need to put those two files in Android Studio
okay.
So let's start building our application.
Open Android Studio, create a new project empty compose activity.
Select next and the name of the application would be Gadgets Detection App.
Click finish.
Also, you can name it as Gadgets Classifications app because this is a classification app and not actually
the object detection.
In the next sections, we're going to learn about object detections and we're gonna create our custom
object detections.
And we're going to use the pre-trained and pre and ready made object detections models.
Okay.
So in this application it's an image classification as usual.
Let's start adding our model.
So go to the others TensorFlow Lite model.
Select the model location from the desktop.
It's an object detection.
And this is the name model underscore unquantized.
I'll name it as HDD AirPods model.
Okay.
Copy it.
Click open automatically add features and dependencies and you can use the GPU dependencies.
So click okay and finish.
Let's add some dependencies for TensorFlow.
So here you see guys that whenever you import the gadgets TensorFlow Lite model into your uh into your
resources folder.
And once the ML package being created you see that the TensorFlow Lite GPU meta and support dependencies
are being added automatically.
Now let's add the other dependencies for TensorFlow.
And here start with implementation.
I'm gonna use the 2.17 version of TensorFlow.
That GPU is being added above, so you can cut those and paste them here in order to organize our code.
And one important note here that since we're going to use the camera, we need to add the dependency
of this camera.
So go to Google search for Android Camera.
And here we have camera X.
You see also we have camera two.
It's the latest version stable version 1.5.0.
Scroll down to get the dependencies and let me add the dependency for the camera two.
So here Android X camera camera two get the latest version of camera version two, which is 1.5.
I like to use the most stable one, so I'm not gonna use 1.6.
I'm gonna use the 1.5.1.
Okay.
Scroll up.
You can see it.
This is the latest version.
Also, if you want to additionally use Camerax Lifecycle library, you can copy this and paste it here.
We need to get the camera view.
So here copy this paste it here.
Also you can set additionally add camera kit vision integration.
Those are for the next videos and the next uh applications.
But for now we're going to make it simple.
So this is the camera dependencies.
And those are the TensorFlow dependencies.
Sync the project and wait for Android Studio to finish the build.
Gradle.