Stepwise implementation of Fruits Prediction Android App using Tensorflowlite|Teachable ML|Quantized

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there today I'll show you how you can create your machine learning models in just 5 minutes and then you will be able to integrate your machine learning models in your Android application so let's talk about its prerequisites so there are two points in predict use it's the first point is you just have an Android studio downloaded in your Windows operating system or any operating system for downloading Android studio you just need to go to developer.android.com slash studio and you will be able to see download and loads to the option so you just need to download this IDE and then you have to install it like other software you do it will take some of your time and then you are good to go and the second point is that there is no prior knowledge of ml is required but yes to scale up this machine learning model in future you just need to have a good knowledge of that so let's quickly see the demo first we will talk about the development part later so you can see over here that it is predicting tomatoes bananas and lemons accordingly as you can see over here that I have divided this process of developing Android application based on machine learning into four categories first step is data collection so we will be collecting our data in the form of images so you can see over here that I have collected all the images of potatoes lemon and bananas through my mobile camera you can see over here that I have made a three subfolder of banana lemon Tomatoes inside fetch folder okay so you can see I have bananas images okay then I have some lemon images also and then I have some Tomatoes images right so if I have to give one word to all these process we will say that it is a data collection process right and here I have men will click the photos using my mobile camera right the second step is mobile training using teach ever machine learning by Google okay so teach evil machine learning is basically a platform which is provided by Google and idea is to create a machine learning models in very easy steps there is no knowledge requirement for this particular portal you just need to provide your data so you but you do you we'll just collect the data and you will provide all the data to the teachable machine running platform so machine learning model will do the training on the data which you have provided it after provided it will take some time it will do some training part okay then after that it will go to the third step you can see over here that after completing the training part you will be able to see that the third step is export model or download it to the local system so you just need to download that particular model which you have trained on your data right so you have to download that and keep it in your local system right and then the final step is to integrate that particular model into your android application we will be using tensorflow Android application project over here so we will do some changes according to the according to our need and then our application is ready so let's quickly jump to the browser I'm assuming that you have already downloaded to your Android studio right so now you have to go to the teachable machine learning okay so this is this is the URL a teachable machine dot with google.com it is provided by Google right ok so you can see over here that it it's a fast and easy way to create machine learning models for your site's application or many more right no expertise and coding is required clearly mentioned over here but yeah in future if you have to scale up your application and you should know about machine learning and deep learning process right alright so you can sus you just need to click on get started button and you will be landed over here right so you can see there are three options available where we will be solving image classification problem here ok so you just need to click over here so now you will be able to see that these options like class 1 class 2 and add classes so we have three classes so we have added three classes right ok so now let's go to the where you have collected your data ok so here are my data so you just need to drag and drop this particular folder which has all the photos of bananas over here in the class one it will take some time to upload all the images ok and you just need to change the class one name make it to bananas or whatever depending on your experimentation then for the second you just need to press upload and then lemon upload all the images of lemon okay and just change the class lame name to lemon according to your implementation it can be anything all right so now in third class we have tomato just drag and drop over here and then you have to change the tomatoes on the name of model over here right tomatoes alright after uploading all the images if we have second option or second step is training right so you just need to click over here and it will take some time after completion of the training and what basically training is doing like your model is learning from your data which you have provided to it right so model is learning that what is banana what is lemon look like what is tomatoes look like right and it is taking some time and it will be completed after some time right there is another option over here you can see that export model right so you just need to click on export model option okay and then you will be able to see that export model to use it in your projects right so we are developing android application so you just need to go to tensorflow light option and select floating-point and then download my model option right you just need to click over here okay and then you have to click on contest okay so it will take some it will take some time floating point will take some time let it do the converting of the model in the cloud right and meanwhile you just need to go to the github account over here right just click on github so you will be able to see that this is your github and you just need to download all this code okay and I'll be putting all the all this code in my github profile also which is the simplest one like there are lot of other projects of transfer flow light over here which is no use of yours right so I'll be putting or only the Android application in my github profile in the description box you can go over here right so you just need to do one thing like after clicking over here in the github you have to download it from you can clone it if you know good commands you just need to clone it otherwise you need to download the zip file right alright so I have what I have done is I have downloaded the floating-point after clicking over here right and you have to download the contents model also okay just select quantized and there is option of download over here you just need to download again ok so it will take some time ok and then it will get downloaded in your local system so you can see over here that I have downloaded all these files like converted - TF Lite which is a floating model and other is converted - TF light underscore quantized so it is my quantized model which I have showed you you have to download it right and then other thing is I have downloaded the tensorflow android application code right so I will be providing this in my github profile also you can download it from there so you have to unzip all okay so you will be able to see that there is a one label and then unquantified model okay and the same goes for quantized also one label and a model dot TF light right alright so you need to copy all four items over here okay and then you have to go inside your project which you have already downloaded from tensorflow data profile or my profile ok my data profile then you have to go to inside light then examples then image classification then Android and now you have to go to app then SRC main and then assets and inside assets you have to paste all for files so you will be able to see over here that these files are no of your's right you haven't seen all these files so ignore all these files just delete if you find something inside assets folder you just need to delete it so delete all and then copy and paste all these things the TF model which you have downloaded from here right like floating and quantized and as soon as you download it all quantized or floating-point models ok so you can see over here that I have downloaded the floating one so you will be able to find two files one is labels and other is model actual model okay now you have to paste all four things over here but because label is duplicate so ultimately you have three files one is labels like me like banana lemon and tomatoes okay and two models which is model dot TF light and unquantified okay so you will be able to see the highlighted three files in your asset folder okay just paste it and then what you have to do is you have to go to till examples examples and image classification and then Android okay so you have to go to till Android path okay of your code which you have downloaded from tensorflow and just copy and and then open Android studio alright I have already opened that now you will be able to see the standard studio ID like this right you just need to you have to press or open project okay you have to open a project then you have to give the location of Android folder which is which you have downloaded just now right and then you have to press ok ok so I have already done that it is already open in my Android studio then you will be able to see the code like this so let it build it will take some time it will download some dependencies from the node studio ok from Android depositories and then let it download and it will complete ok it will take some time and it will get complete alright so inside asset folder you have three files right now just ignore all the files ok just you have three files one is labels other is model dot TF light and third one is model underscore on corn tortilla flight right you have to click on camera activity which is inside your java and this this package ok you have to go to camera activity and you will be able to see that the line number one zero run over here okay so earlier it was quantized okay earlier it was quantized like this okay but you have to make it float efficient net they replaced with this ok just copy paste this line into your code then you have to go to the inside TF light package and you will be able to see overhead if you click on classify float efficient net and just scroll down you will be able to see that get the model method get model path method is over here then you have to give the name of the TF light model which you have downloaded using floating point right so my floating point model name is model underscore unguent or TF light so you just need to return that okay so just copy and paste this line also in your code then if you will go to the next classifier model float more mobile net then you have to give again that same same name now there is another quantized efficient model okay classifier quantized efficient file name then you have to give model dot TF light over here okay always remember the name of the context model is model dot T of light okay so always remember if you are able to see quantized in your class file then give the name of name to it model or TF light and then quantized model dot TF light and now you will be able to see that there is another label over here that get label path okay so always remember just make it labels dot txt everywhere like label dot txt inside the quantized model then label dot txt inside the classifier quantize efficient data model then inside this also classifier float efficient Java file right and then this one also okay so always remember you have to make two changes for floating and label name okay so if your labor name is different than changes to labels it has been honest lemon and tomatoes which is which are my classes or class lean right and modernity a flight and model underscore uncon try and now you are good to go you have to connect your Android mobile phone and then you have to just run it over here right so just you can press this particular link and then you will be able to see that it is running like this right so you can see over here I have recorded the video but yeah you will be able to see that it will work for you okay so yeah just let me know in case of any queries just comment down below in the description box if you liked my video and subscribe my channel and it motivates me always to carry new content for you guys thank you
Info
Channel: Dinesh Raturi
Views: 57,834
Rating: undefined out of 5
Keywords: machine learning with android, androidml, android with ml, how to make android app with machine learning, teachable machine learning, teachable ml with android, android ml model depolyment, teachable ml model deployment, android teachable ml, image classification app, fruit classifier android app, machine learning app android, mobile machine learning app, how to integrate ml model in android, dinesh raturi ml, how to use teachable ML, what is teachable ml, use teachable ml
Id: fNbxSXi0OkA
Channel Id: undefined
Length: 13min 23sec (803 seconds)
Published: Tue Jun 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.