Тёмный

Build an Android app to recognize flowers 

Android Developers
Подписаться 1,3 млн
Просмотров 51 тыс.
50% 1

Khanh shows you how to train a TensorFlow Lite model that can recognize custom images with your own dataset using TensorFlow Lite Model Maker. Then, Hoi shows you how to integrate the model into an Android app using the new ML Model Binding plugin in Android Studio 4.1 beta.
Resources:
Codelab which goes through all the steps in this screencast → goo.gle/TFCodeLab
Android Studio 4.1 beta download → goo.gle/AS41
TensorFlow Model Maker → goo.gle/TFLMaker
Check out the 11 Weeks of Android website → goo.gle/30FDT8S
Related Playlists:
Machine Learning - 11 Weeks of Android playlist → goo.gle/ml-11w...
11 Weeks of Android playlist → goo.gle/androi...
Subscribe to Android Developers → goo.gle/Androi...
Speakers:
Khanh LeViet, Hoi Lam
#featured #android11 #11WeeksOfAndroid

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@bdmaxvalera
@bdmaxvalera 4 года назад
Android + Tensorflow 2.0 = ❤️
@BagusSulistyo
@BagusSulistyo Год назад
thanks Khanh , I really love this course/ video
@cerpenai1
@cerpenai1 2 года назад
my cnn tensorflow lite model has no metadata how do I convert cnn keras model to tensorflow lite model which contains metadata?
@Maniclout
@Maniclout 4 года назад
What if I have an h5 file model. Can I also import it like this? Edit nevermind you can just convert the h5 file to a tflite file
@Alexis-ho3vm
@Alexis-ho3vm 3 года назад
Hello, very good video ..... but I have a query .... you can output a confusion matrix to the tensorflow lite model
@snehitvaddi
@snehitvaddi 3 года назад
Hey!! Why can't you provide a direct link to the Colab notebook...
@aiders4352
@aiders4352 3 года назад
I'm 6 months late to this, seems the colab is broken. Getting the same error every time at the "import the required packages" step. The error is ModuleNotFoundError: No module named 'tflite_support'
@moufditaha8779
@moufditaha8779 3 года назад
same for me have you figured out a solution for this please ?
@amirayasmine8490
@amirayasmine8490 3 года назад
me too
@naufalilhamhw
@naufalilhamhw 3 года назад
I had the same problem but it could be solved thorough " pip install tflite_support ". Hope this would help!
@arnabkundu9410
@arnabkundu9410 3 года назад
Hi Khanh LeViet, Hoi Lam Could you please mention the repo branch and commit tag when you exactly recorded this video. So that I can follow along with the this demo. I found lots of daily basis commits in master branch. So getting confused you know. Thanks in advance.
@JohnSmith-ns3es
@JohnSmith-ns3es 4 года назад
Great, now can we get another video for face recognition?
@DinanathLad
@DinanathLad 2 года назад
Whats in TFL Classsify? I only have .tflite file with me from Vertex AI.
@fauzisafina1827
@fauzisafina1827 4 года назад
Sir.. when i run this in colab i get this error : No module named 'tensorflow_examples.lite.model_maker.core.task.metadata_writers'
@saibalaji4713
@saibalaji4713 4 года назад
Hello is it necessary to be expert in ML and DL to start Learning and using Tensor Flow
@vigneshjothilingam7624
@vigneshjothilingam7624 4 года назад
after importing the TFLClassify-main in the android studio... I can't able to run the project .. Why is that!? i'm not using the android studio beta version, is that make sense!?
@khanhleviet5416
@khanhleviet5416 4 года назад
It requires Android Studio 4.1, which was in Beta channel at the time of this post.
@facttv4405
@facttv4405 3 года назад
good job Sir, stay blessed.
@5minutetech841
@5minutetech841 3 года назад
This is awesome. Just what I needed for my project thank you guys
@niteshverma2310
@niteshverma2310 3 года назад
I am trying to build another app from tensorflow lite object detection android example. Need your guidance.
@deepanshudutta4443
@deepanshudutta4443 3 года назад
Sir I can't use 4.2 Beta 4.I download that but there is a folder called android studio,sir where I need to paste that foldar to work properly.One thing I have android studio.
@mirzamunib5964
@mirzamunib5964 4 года назад
Thank you Sir great explanation. Sir can you tell me how to import an image and then let tensorflow lite recognize it?
@khanhleviet5416
@khanhleviet5416 4 года назад
Do you mean recognize an image that is on phone's image gallery? Just load the image to a Bitmap instance, then feed it to the TFLite model as demonstrated in the video. devofandroid.blogspot.com/2018/09/pick-image-from-gallery-android-studio_15.html
@mirzamunib5964
@mirzamunib5964 4 года назад
@@khanhleviet5416 Thank you sir for helping.
@zairi36
@zairi36 3 года назад
@@mirzamunib5964 Did you manage to make it work? I actuallay tried but faced many issues that I can not solve. If you find something interesting on how to make it work with an image from the gallery
@kothamasusairahul879
@kothamasusairahul879 4 года назад
Where I can download the TFL Classify folder?
@khanhleviet5416
@khanhleviet5416 4 года назад
You can follow this instruction: codelabs.developers.google.com/codelabs/recognize-flowers-with-tensorflow-on-android-beta/#2
@guillermorayabatanero6623
@guillermorayabatanero6623 4 года назад
Great! And if I want to recognize a specific speech of a human voice I can do also?
@khanhleviet5416
@khanhleviet5416 4 года назад
Please check out the Android's speech regconizer developer.android.com/training/wearables/apps/voice#FreeFormSpeech
@atharvapuranik5342
@atharvapuranik5342 4 года назад
Sir can you help me?? Can a app developer reach to our gallery and media files stored in our phone (private photos and videos) if we had given him a storage permission? Even if we don't upload photos and videos on his app ?? Plz answer me? 😔
@simonium0
@simonium0 3 года назад
Does that work for a Flutter app as well?
@chiragmittal996
@chiragmittal996 4 года назад
Meanwhile, IOS: "Look, I got a new wallpaper!"
@otoS97
@otoS97 4 года назад
lamao
@atomtrevor9958
@atomtrevor9958 3 года назад
Thanks for your tutorial. I tried to incorporate it on my Android project; unfortunately, I have a problem with "RecognitionAdapter.kt". Specifically, the error regarding these lines: import org.TensorFlow.lite.examples.classification.databinding.RecognitionItemBinding import org.tensorflow.lite.examples.classification.viewmodel.Recognition I don't get the same java (generated) files. May you please help me to solve this problem? Thank you in advance.
@eyeopener2434
@eyeopener2434 4 года назад
Goodday .So if im using different image data set with more images its giving me an error on traing mentioning about Value Error : image size is zero
@phadu1024
@phadu1024 3 года назад
Same here
@chiragpatankar2013
@chiragpatankar2013 2 года назад
did u find the solution?
@shadmanadman5222
@shadmanadman5222 3 года назад
thanks. saved my day
@TheRandomTecLad
@TheRandomTecLad 4 года назад
i need help t load my own data and train
@sks-nz6mz
@sks-nz6mz 3 года назад
me too. have you figured out
@sciencetub
@sciencetub 4 года назад
"ValueError: The size of the train_data (13) couldn't be smaller than batch_size (32). To solve this problem, set the batch_size smaller or increase the size of the train_data." This error comes when I train my custom model.
@mirzamunib5964
@mirzamunib5964 4 года назад
Sir, i put the model i trained on 2 species in the start and at Model it says "no metadata found in this model" . The sample code of my model is shown. help pls
@khanhleviet5416
@khanhleviet5416 4 года назад
Do you use Model Maker to train the model as in this Colab notebook. tensorflow.page.link/tflite-img-classifier The error indicates that the TF Lite model doesn't have the metadata needed for Android Studio to parse it. Therefore, I suspect that you train the model without using Model Maker hence the metadata is missing. If you want to add metadata manually, you can check out this guide. www.tensorflow.org/lite/convert/metadata
@mirzamunib5964
@mirzamunib5964 4 года назад
@@khanhleviet5416 Sir i trained my model on my computer on anaconda jupyter. Sir what should i do now is there any way i can do it without metadata or its is necessary for this technique?
@khanhleviet5416
@khanhleviet5416 4 года назад
@@mirzamunib5964 TF Lite Model Maker can run on your local jupyter notebook as well. Just follow the step in the notebook I shared above. To integrate the TF Lite model using the Android Studio plugin as shown in the video, it must have metadata.
@mirzamunib5964
@mirzamunib5964 4 года назад
@@khanhleviet5416 Hello Sir sorry for disturbing you again i'm new to this field. Sir, should i again train all the model from scratch for model maker. can you tell me where to get this model maker code?
@khanhleviet5416
@khanhleviet5416 4 года назад
@@mirzamunib5964 Here is the version used in this video tensorflow.page.link/tflite-img-classifier And here is the full documentation of Model Maker for image classificationn www.tensorflow.org/lite/tutorials/model_maker_image_classification
@taschajalani7927
@taschajalani7927 4 года назад
great video. But how can I do the code in Android Studio if I create a new project ? please help
@vidyalakshmiprabhu7805
@vidyalakshmiprabhu7805 3 года назад
Hey did u develop in android studio by now?
@vidyalakshmiprabhu7805
@vidyalakshmiprabhu7805 3 года назад
Hey did u develop in android studio by now?
@niteshverma2310
@niteshverma2310 3 года назад
Wow. The video I was looking for.
@learner_1228
@learner_1228 3 года назад
android beta version 4.2 showing tensorflow lite min sdk>=19? how to fix it sir?
@mosin8673
@mosin8673 3 года назад
While creating new project , When you are selecting the minSDK like jellybean or something like that with multiple options available you see the api level beside name of SDK , select minSDK with api level >=19 then it will work fine
@abhishekrai2198
@abhishekrai2198 3 года назад
how to get the Android code i can't find it
@dawoodamir2011
@dawoodamir2011 4 года назад
This is just awesome.
@jayeshsrivastava3697
@jayeshsrivastava3697 4 года назад
I can't import the model on Android Studio 4.1 Beta. Please help.
@hoilam6785
@hoilam6785 4 года назад
Can you please give us more details? We are monitoring StackOverflow.com - tag your question with Android-Studio AND TensorFlow-Lite.
@mirzamunib5964
@mirzamunib5964 4 года назад
Sir when i import my model in the android studio i get this error: "Tried to use preview panel provider (JavaFX WebView), but it is unavailable. Reverting to default."
@khanhleviet5416
@khanhleviet5416 4 года назад
Did you use Android Studio 4.1, which is in beta channel at this time of this post? The project won't work on earlier versions of Android Studio.
@sks-nz6mz
@sks-nz6mz 3 года назад
@@khanhleviet5416 Hi, at 2:05 you tell we can upload our own images to collab, when i have uploaded a .zip file containing folders of pictures of mushrooms to the collab directory, how to get the http path of that file(and how to unzip it)? to update the cell that by default has the https path to the flower images. Would really appreciate your help
@khanhleviet5416
@khanhleviet5416 2 года назад
@@sks-nz6mz When you upload a file to Google Colab, It'll be uploaded to the "/content" directory. The path to the file will be something like /content/your_file.zip. Then you'll need to unzip it with this command: "unzip your_file.zip".
@user-wz5sy1oc6d
@user-wz5sy1oc6d 4 года назад
I can not start android studio in my computer 🙄🙄
@atta2616
@atta2616 4 года назад
Let me ask: In my video above, I see each folder with the name of a flower associated with that folder of flowers. Like directories: Roses come with lots of rose photos. So, my question is: 1 photo of me has many enlarged photos, what should I do? For example: If a picture of me has many flowers, I have to cut each flower in that picture ??
@khanhleviet5416
@khanhleviet5416 4 года назад
No you don't need to cut out each flower if all of them belong to the same class (e.g. roses). If a photo contains flowers of multiple classes, it will confuse the ML model. Image size doesn't matter. Model Maker will automatically resize it to fit with the model input size.
@stifenjans4342
@stifenjans4342 3 года назад
wish me success to learn it, amen, and a whole comentary below
@AlphaZ96
@AlphaZ96 4 года назад
amazing !
@gagang4286
@gagang4286 4 года назад
that's quite difficult to collect images of thousands of flowers by their categories🙄
@quockhanh6852
@quockhanh6852 4 года назад
chrome has extensions help you download a whole page of google image search
@idealclassroom6422
@idealclassroom6422 3 года назад
Use Google open datasets images....follow' the Ai guy' to know more
@motalshik
@motalshik 4 года назад
ANDROID TOP!!!!!!!!
Далее
Bird detection with TensorFlow Hub & ML Kit
18:31
Просмотров 18 тыс.
Kotlin Coroutines 101 - Android Conference Talks
24:49
Просмотров 136 тыс.
TensorFlow Lite for Android (Coding TensorFlow)
6:06
Просмотров 109 тыс.
Think Fast, Talk Smart: Communication Techniques
58:20
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 655 тыс.