Object detection app using YOLOv8 and Android
ฝัง
- เผยแพร่เมื่อ 5 เม.ย. 2024
- In this comprehensive tutorial, learn the complete process of training, testing, and exporting object detection models to TensorFlow Lite format for integration into mobile apps. Follow along as we delve into the intricacies of model training, validation, and optimization, ensuring optimal performance for real-world applications.
GitHub: github.com/AarohiSingla/Objec...
Email: aarohisingla1987@gmail.com
We'll start by guiding you through the process of training your own YOLOv8 object detection model using popular frameworks like TensorFlow and Keras. Gain insights into dataset preparation, model architecture selection, and fine-tuning parameters to achieve accurate object detection results.
Once your model is trained and tested, we'll walk you through the crucial steps of exporting it to TensorFlow Lite format. Understand the nuances of model conversion, ensuring seamless compatibility with mobile platforms while preserving performance and efficiency.
But that's not all! This tutorial goes beyond model creation, diving into the realm of mobile app development. Discover how to leverage Android Studio to create a custom Android app for object detection. We'll provide a step-by-step guide, from project setup to integrating the TensorFlow Lite model into your Android application.
By the end of this video, you'll have the skills and knowledge to embark on your own object detection journey, creating powerful mobile applications capable of real-time detection and recognition. Don't miss out on this comprehensive guide to building cutting-edge object detection solutions for Android devices!
#objectdetection #computervision #yolov8 #yolo - วิทยาศาสตร์และเทคโนโลยี
hello, any suggestion how to optimise the app further so that the ms and the detection becomes faster? and maybe how to include int8 format?
any links/suggestions/example projects on how to make the detection faster?
thanks for any answer in advance
How to make the bounding box gone after a while? Can this use for yolov5 model? How to make detection more faster? How to show confident score beside class name?
Hi, first of all thank u for this amazing content. I want to ask you a question. I am trying to create a model based on YoloV8 to detect the color of the traffic light. I am having an issue that when I use the train model with the camera in video mode, the model takes a while but detect the traffic light but when I try to detect only by sending one frame, the detection is null. I do not understand why when you send multiple frames it gives you a better detection. Could you help me with this?
Thank u
You are such an amazing content provider for Professionals working in Artificial Intelligence & Data Science
Thank you so much
My pleasure!
Thanks a lot for the video. I have a question. @CodeWithAarohi why did you use kotlin instead of java like in yolov5 android app?
Android Studio recommended it. When creating an app in Android Studio, there's an option to choose between Java and Kotlin. Since "recommended" is written next to Kotlin, I chose it. Additionally, some of my subscribers requested that I work with Kotlin :)
EVery helpful & simple way of explaination
Thanks!
Thank you very much for this video 💕Could the next video be about creating an audio feedback for this model using Spread-to-Text libraries etc. by Android Studio?🤭🙏
thanks for the tutorial, it was very helpful, I have a question, the model I created is running quite slow, it was much faster when I tried it directly on the yolov8 model in python, is this slowdown because I converted it to tflite or do I need to make improvements in the code
You can quantize your model. quantization can reduce the model size and improve inference speed. Also, make sure that the input data format matches what the model expects.
thank you for this video. helped me and my friends so much you wouldnt even believe. i wish you best. i couldnt thank you enough
Glad to hear that! Good Luck 😊
@@CodeWithAarohi while we were working on our project we trained and quantized our model. it runs at 400ms but we need it to be faster. we trained our model with yolov8 and converted this model to tflite. how can we make it faster, what would you recommend?
Add Configuration is empty , then can't run. How to fix ?
thanks for sharing. Every time we have to connect the mobile phone with PC or is there any separate app icon is created on phone to run ?
To create a standalone app icon on your Android phone , you need to package your app into an APK file and install it on your phone. This way, you won't need to connect your phone to your PC every time you want to test the app.
You are a true inspiration madam.Thanks a lot for the lessons.
Thank you so much for your kind words! I'm truly honored to have been able to inspire you🙂
Great Work, would be very helpful
Thank you!
thank you maam for this video tutorial this will help me a lot in my new project
You are welcome 😊
Greeting Ma'am, can the YOLOv9 be used to classify the images as i am trying to build a project on image classification . Thank You
No
how can i put the confidence of the image detect on the screen (like for example "label : confidance")?
Thank you and great work
You can make changes in the file which is responsible for putting bounding boxes.
For long time waiting for this, thanks
You're welcome! I'm glad I could help 🙂
@@CodeWithAarohi Thank you very much Ms. Aarohi 🤍
Thank you .. i want ask u .. How long did it take? and Is this command correct for conversion in cmd (yolo export model=yolov8n.pt format=tflite) ..
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n.pt') # load an official model
model = YOLO('path/to/best.pt') # load a custom trained model
# Export the model
model.export(format='tflite')
Very informative thanks for sharing
You're welcome! I'm glad you found the information informative.
hi ma'am, may I ask something, when I try to pip install tensorflow 2.13.1 inside jupyter. This error message appear: Could not find a version that satisfies the requirement tensorflow==2.13.1 (from versions: 2.16.0rc0, 2.16.1),
Do you know what caused it and how to fix it? Thanks
This means that the pip version you are using don't have tensorflow 2.13.1. Now, to solve this issue there are 2 methods. 1st method is to downgrade the pip version and install tensorflow 2.13.1. 2nd method- Just install tensorflow 2.16.1 with your current pip version.
hello maam , i cant convert the the dataset to tflite file , it cause my tensorflow version is not 1.13.1 , but when i want to pip install it , it says cannot find the tensorflow version , how can i fix this
You need to convert your trained model to tflite not dataset. To install temsorflow, just run pip install tensorflow
i am unable to run the app, "This app has stopped" did anyone know why is this happen? I use android 7 device
Hello mam. I have a YOLOv8 model for detecting 10 object. When I change the path with my model and labels the app crushes. your app is build to detect 4 object. what should i do to deploy a 10 object detecting model in your code?
Make sure that you have done all the changes as per your custom dataset. In this video, I have explained all the changes you need to make.
You're such an amazing professional. My new IDOL for now! Anyways, Did u have a not custom dataset. Its like its already made for tflite?
I dont have. But the process will be same for custom dataset also. Just train your object detection model then convert it to tflite and use that tflite model in your android app.
@@CodeWithAarohi Thanks, What I mean is that Do you have a ready-made models or datasets with various images? So that, I have variety of images than i can scan? Not only the fork and such?
@pinocchio200 sorry, I don’t have. But you can use pretrained model like the pretrained model train on coco dataset which have 80 classes.
Will you make any video for attention mechanism? (Like what you made for resnet50, that was amazing)
I will try!
Hello! I'm here again. Not related. But is it possible to build an application or to train models with gesture recognition? I already made a static sign language translator but i want it to be dyamic. It can identify dynamic sign language. Is it possible? If yes, then how?
Yes, you can do that. For that, train your model on sign language gestures. Then integrate the model into an application.
@@CodeWithAarohi What tech should I use? Do you have references where i can visit?
Impressive Content
Thanks!
How can I lower the MS. Currently on my phone it is around 800MS wich makes the detections have a significant delay
Use a better mobile or quntaize the model
You are very good at what you do… trust me! After deploying it on android. How can I share the application or how someone else could get it
Generate APK file and then upload the app on google play store.
Thanks a lot Aarohi
Welcome!
Great job as always! Thanks Aarohi. Do you sell online training?
No
Thankyou so much maam
Welcome!
When I try to train the model in vscode using gpu. Why it became hang my laptop?
If your GPU doesn't have enough memory to handle the model and the training data, it can lead to hanging or crashing.
what is your python version? I tried with 3.9 and 3.11 and an error occurred when exporting to tflite
Python 3.11.9
@@CodeWithAarohi Thanks, I skipped the metrics part, I don't know if that was the problem, but it worked
thank you for the helpful tutorial. Would you consider doing one for object counting as an android app ?
Sure thing!
for fine tuning the model mam you took 2 GPUs but its throwing me an error when i run that on my machine
i dont have 2 GPUs
write --device 0 for 1 gpu
@@CodeWithAarohi thanks mam that issue is resolved but now i'm unable to find the data.yaml file from the github repo
neither i am able to find the dataset which you used... is it not publicly available?
@@syedmuazuddin8721 you can get the dataset.yaml file from github.com/AarohiSingla/yolov5
And you can download dataset from roboflow universe
could you please create YOLOv8 android app that use onnx
YOU ARE BRILLIANT, BEAUTIFUL, THANK YOU SO MUCH. U SAVED ME.
Glad I could help!
really very helpful.
Can you please upload image segmentation on android app?
Sure
Does the int8 quantized TFLite file work with this app?
I haven’t tested that but I think it will work.
thank you safe my freelacer project
You're welcome! I'm glad I could help 🙂
can you do a react native integration with live feed camera in the two weeks that will helps a lot thank you
I never worked with react native. So, not sure!
Thanks you very much
You are welcome
hi great job thank you for the video .... plz i need to be part of your memeber channel i need to learn more from you .. and have full folder of code plz help me
Is there a way to lower the MS maam? Can you teach us. Pleaseee
Sure
Mam you have made plenty of videos on yolo model
Mam if possible could make a video human action recognition using lstm cnn and mediapipe
Also make it end to end that would be great
I will try!
Miss, where is the confidence score? 🙃 I need that
You can modify the code
Please guide me, I know nothing about android studio🙏🏼
Will this work with yolov9
Haven't tried yet! Will test soon and let you know.
can you do keypoints detection please? using yolov8 on android
Sure!
thanks!
Welcome!
app code is there in repository?
yes
please make a video for yolov5 in kotlin
Sure
@@CodeWithAarohi thanks you 🙏
Mam can you start Deepstream
Sure!
Yolov5 to kotlin realtime🙏
I will try