Tensorflow Android: Real-time Object Detection in 6 steps
Вставка
- Опубліковано 3 кві 2018
- Please LIKE//Subscribe//Share
Step 1: Install Android Studio developer.android.com/studio/...
Step 2: Install python if not installed (Anaconda: conda.io/docs/user-guide/inst...)
Step 3: Install Tensorflow if not in your python package
git clone github.com/tensorflow/tensorflow
Step 4: Open Android Studio
select Open an existing Android Studio project
Select the tensorflow/examples/android directory from wherever you cloned the TensorFlow Github repo. Click OK.
If it asks you to do a Gradle Sync, click OK.
Install various platforms and tools If it asks.
Step 5: Open the build.gradle file
(you can go to 1:Project in the side panel and find it under the Gradle Scripts zippy under Android).
Look for the nativeBuildSystem variable and set it to none if it isn't already:
// set to 'bazel', 'cmake', 'makefile', 'none'
def nativeBuildSystem = 'none'
Step 6: Click the Run button (the green arrow) or use Run - Run 'android' from the top menu.
If it asks you to use Instant Run, click Proceed Without Instant Run. - Наука та технологія
Hi, thanks for the tutorial, I have installed the android demo on my device but i thinks there might be a bug on object detection.
When an object is detected the rectangle around the object, the label and the precision appear on the screen; but if I frame something that doesn't present anything to be detected after a detection then the rectangle and everything still remain on the screen.
Do you know how to fix this??
How would I use this to detect objects and count them via a udp external stream. Example I have a remote raspberry pi with a camera that ends video to my tablet via UDP.
1st tutorial done correctly waiting for second thank you sir
this one done?
I'll be very appreciated, if someone can explain why app only works when Sdk api level is set to 23, I tried >23 as it reccomended but then it crashed immediately after opening the app
Sir, I have created a model that detects eggs in an image. i followed the steps you have explained and changed the labels_list.txt file with my object. when i have run the list file is replaced by your objects . Please help me to slove this and build the custom object detection model.
can you teach me how to make own dataset for fishes recognition?
if you trained object is detecting fine but what about un-trained object what it will show ?
can you make a video on that.
Sir when you will make second tutorial how to train own data sets
If you set " def nativeBuildSystem = 'none'' ", and run "TF Detect" app. It will report "Object tracking support not found". I think we need to set "def nativeBuildSystem = ''bazle' " . But here: github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md , it is stated "NOTE: Bazel does not currently support building for Android on Windows. Full support for gradle/cmake builds is coming soon, but in the meantime we suggest that Windows users download the prebuilt binaries instead."
Sir can your app classifies an image as unknown if it is not image dataset?
can u say how to integrate text to speech in object detection ,like wen it will detect object it will say a name of the object.
Thank you. This helped me.
can you give me a source code
for step 2 the link is not working. page not found*
what if i want to run my own pb file?
why would I need python install?
in 6:48 why build button light on ?
Bro I am developing an android app for object recognition. I trained my own data set using keras. But the problem is I could not connect for processing. I used openCV library for image processing. Can you please help me regarding this issue. I have no idea how to do it.
hii, can we contact?!
Thanks a lot brother
What is the fps of the object detection.
Currently high end phones like a Samsung Note 9 get 100-200ms per frame or 5-10 fps
need help.. I successfully done with my own dataset and runs perfectly in my laptop, now I'm trying to run tfDetect in my android device. do you have step by step tutorial?
Just use Google AutoML, they allow exporting to tflite now.
Super brother ❤️
Thanks for the informative video. Please make the second tutorial for us. And record every step so that we can follow you.
mark fiesta I am from USA.
But I am originated from Bangladesh. I hope you are also a Bangladeshi if you allow to guess me. Thanks for the video. Please make the 2nd one.
i can not make my build button light on like you
Can you record every step ? I can not build that project
Báo lỗi gì thế ông??
Tui mới build và thấy chạy bình thường.
Thank u very much
did u got the output?
hello Mamoon Abdullah.
When will you make the second tutorial (custom object detector for android)
very soon, pls subscribe and stay tuned ;)
I want too, please do it soon
"Very soon", 6 months later...
thank you thank you sir
"This is the beauty of anaconda" That's what she said
Thanks for this tutorial, could you please make a video for fall detection using the accelerometer sensor?
Instablaster
How can I create a new Activity? For homepage
Head to the android docs, I started there before coming here.
how to trained fruits ?
hi my bro i have problem how to solve it
A problem occurred starting process 'command '/usr/local/bin/bazel
plz help me
download bazel and add its path to your enviromnent variables
please upload video how to train our dataset and import on android from scratch
Please subscribe to get the update.
Bro i did't see python folder in my anaconda's lib directory
same problem
hai, have you managed to find the python folder in anaconda's lib directory ? i am having the same problem
@@sarahismail-ob4is I thin the command `where python` in anaconda (or command prompt will show you where python is).
You will get something like
C:\ProgramData\Anaconda3\envs\tensorflow15\python.exe
C:\ProgramData\Anaconda3\python.exe
The first one says python in the virtual environment tensorflow15 and the second one shows python in the original location where you installed anaconda.
HOW TO CHANGE THER NASMES OF THAT APPS CAN U PLEASE TELL ME
The Tecky Rohit I dont get you, can you please repeat your question?
bhaiya apar Python programming and Data structure algorithm course korta chai
Nice tutorial man keep going,
But I've got these errors while running :
error: package org.tensorflow.contrib.android does not exist
error: cannot find symbol class TensorFlowInferenceInterface
Can you help .I've copied the android example to the tensorflow examples do I need to copy anything else?
You're using a newer version of tensorflow, something like Tensorflow 2.x which is not built on the contribs files anymore. to import the tf1 compatible files from the same tf2.x version, instead of importing tensorflow as to use "import tensorflow.v1.compat as tf". this will change all the instances of tf to tf.v1.compat. although this might fix your errors in some cases, in some other it might even make the task worse, what I'll suggest is for you to just create a new anaconda environment and then install a stable older version of tensorflow (eg v1.15) by using pip (pip install tensorflow=1.15) and python 3.6. and then proceed from the very initial step by activating the environment.
Unfortunately on Android I would hardly call it realtime. Usually 100-200 ms per frame on current flagship phones. Look at the lag as the phone moves
I consider realtime to be 30fps+. Video framerate.
Maybe in the next gen in 2020 or 2021. It is coming, just not quite there yet, need faster NPUs.
I haven't seen how fast it is on the Huawei mate pro 30 5g yet, which should be fastest.
Then get a better phone? Are you blaming the code for this or just making a distinction on real time? Realtime for most users is capability to react with user not seeing lag. While the human eye is 50fps, it doesn't detect and identify objects at 50fps.
@@edjones4748 By realtime I mean at least a bit more than half the camera frame rate, 25-30 fps at least.
Notice my comment is over a year old. I've since found that newer code/models work fine at those rates.
hello Mamoon Abdullah, thanks for your tutorial !
How can I change the example's model to my own model
that's my question too. Have you discovered?
Anyone have the answer yet?
hey which algorithm you used for detection objects
Faster R-CNN by MIT Vision Lab
Will you ever do the part 2?
lol why not, however I was busy with my PhD candidacy exam.
please - video how to train and get model)
Please subscribe to get the update.
wow you are genius
Lol, really am I?
lol :D , how did you do that exacty ? :D maybe you can use library ? :P
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':buildNativeBazel'. > A problem occurred starting process 'command '/usr/local/bin/bazel'' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at help.gradle.org BUILD FAILED in 42s
can i edit the user interface to android studio?
and
add some speech when it recognize objects?
Ivan XD yes
Mamoon Abdullah sir do you have any tutorials on how can i do that? Thank you sir!
could you pls provide the tutorial to create this object detection app step by step.
tayyip reis as bayrakları as as
give me quick solution plz
Daul Malik tell me
Mamoon Abdullah Brother I am working on a object detection system project.. Its really complecated nw.. I need your help... How can i contact you... newabdullah on insta is it you? I sended a request you..
Mamoon Abdullah check instagram..
@@newabdullah101 brother are you bz..? At least msg here...
You may ask your specific question here, I will try to answer if I can. Happy coding...
I'm doing my college project can I get your email address for help
I think he's no longer use this account.
@@KhoaNguyen-ws4hj lol I was busy with my PhD candidacy exam.
@@newabdullah101 How was it?
Hello Abdullah Al Mamun, thank you very much for the video. I have a drip counting project in Python Yolov7, but I intend to migrate this model to android. I'm having some issues. Can you help me? But I can't write everything here in a comment. Can I contact you via email? Thanks Abdullah Al Mamun