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.
  • Наука та технологія

КОМЕНТАРІ • 97

  • @edogrifone95
    @edogrifone95 6 років тому +1

    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??

  • @MrSiciro
    @MrSiciro 5 років тому

    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.

  • @omi_naik
    @omi_naik 5 років тому +3

    1st tutorial done correctly waiting for second thank you sir

  • @jed188
    @jed188 5 років тому

    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

  • @nagapoornima3194
    @nagapoornima3194 4 роки тому

    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.

  • @jdkun8661
    @jdkun8661 5 років тому +2

    can you teach me how to make own dataset for fishes recognition?

  • @athukurianilkumar5352
    @athukurianilkumar5352 2 роки тому

    if you trained object is detecting fine but what about un-trained object what it will show ?
    can you make a video on that.

  • @omi_naik
    @omi_naik 5 років тому +3

    Sir when you will make second tutorial how to train own data sets

  • @Dra60oN
    @Dra60oN 6 років тому +1

    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."

  • @Vathananable
    @Vathananable 4 роки тому

    Sir can your app classifies an image as unknown if it is not image dataset?

  • @chitrathever8812
    @chitrathever8812 5 років тому

    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.

  • @deekshapai4797
    @deekshapai4797 5 років тому

    Thank you. This helped me.

    • @veerab907
      @veerab907 4 роки тому

      can you give me a source code

  • @ektabhosale4843
    @ektabhosale4843 4 роки тому

    for step 2 the link is not working. page not found*

  • @wanghetongtt
    @wanghetongtt 5 років тому

    what if i want to run my own pb file?

  • @danielac1003
    @danielac1003 5 років тому

    why would I need python install?

  • @khoanguyenan6967
    @khoanguyenan6967 5 років тому

    in 6:48 why build button light on ?

  • @amanatkhanshishir3425
    @amanatkhanshishir3425 5 років тому +2

    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.

  • @ShakilAhmed-rb2or
    @ShakilAhmed-rb2or 4 роки тому +1

    Thanks a lot brother

  • @Augmented_AI
    @Augmented_AI 6 років тому

    What is the fps of the object detection.

    • @mattizzle81
      @mattizzle81 4 роки тому

      Currently high end phones like a Samsung Note 9 get 100-200ms per frame or 5-10 fps

  • @jaketv1855
    @jaketv1855 5 років тому

    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?

    • @mattizzle81
      @mattizzle81 4 роки тому

      Just use Google AutoML, they allow exporting to tflite now.

  • @nuralam_cse_kuet
    @nuralam_cse_kuet Рік тому

    Super brother ❤️

  • @m.a.qurishee9220
    @m.a.qurishee9220 6 років тому +2

    Thanks for the informative video. Please make the second tutorial for us. And record every step so that we can follow you.

    • @m.a.qurishee9220
      @m.a.qurishee9220 6 років тому

      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.

  • @khoanguyenan6967
    @khoanguyenan6967 5 років тому

    i can not make my build button light on like you

  • @khoanguyenan6967
    @khoanguyenan6967 5 років тому +3

    Can you record every step ? I can not build that project

    • @KhoaNguyen-ws4hj
      @KhoaNguyen-ws4hj 4 роки тому

      Báo lỗi gì thế ông??
      Tui mới build và thấy chạy bình thường.

  • @SherazManzoorOfficial
    @SherazManzoorOfficial 5 років тому +1

    Thank u very much

  • @muhammadsaqib1643
    @muhammadsaqib1643 5 років тому +4

    hello Mamoon Abdullah.
    When will you make the second tutorial (custom object detector for android)

    • @newabdullah101
      @newabdullah101  5 років тому +1

      very soon, pls subscribe and stay tuned ;)

    • @fatihcil3200
      @fatihcil3200 5 років тому

      I want too, please do it soon

    • @HBrsz
      @HBrsz 5 років тому

      "Very soon", 6 months later...

  • @memedkervanji275
    @memedkervanji275 4 роки тому

    thank you thank you sir

  • @diehappy3227
    @diehappy3227 4 роки тому +1

    "This is the beauty of anaconda" That's what she said

  • @zaheraabuhantash9146
    @zaheraabuhantash9146 3 роки тому

    Thanks for this tutorial, could you please make a video for fall detection using the accelerometer sensor?

  • @janrenan8471
    @janrenan8471 5 років тому

    How can I create a new Activity? For homepage

    • @edjones4748
      @edjones4748 3 роки тому

      Head to the android docs, I started there before coming here.

  • @cabogaming3430
    @cabogaming3430 4 роки тому

    how to trained fruits ?

  • @zakreyaomar4109
    @zakreyaomar4109 6 років тому

    hi my bro i have problem how to solve it
    A problem occurred starting process 'command '/usr/local/bin/bazel
    plz help me

  • @mimrankhan9974
    @mimrankhan9974 6 років тому +4

    please upload video how to train our dataset and import on android from scratch

  • @daulmalik8815
    @daulmalik8815 6 років тому +3

    Bro i did't see python folder in my anaconda's lib directory

    • @khangphantruong
      @khangphantruong 5 років тому

      same problem

    • @sarahismail-ob4is
      @sarahismail-ob4is 5 років тому

      hai, have you managed to find the python folder in anaconda's lib directory ? i am having the same problem

    • @samuelnde9917
      @samuelnde9917 5 років тому

      @@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.

  • @RohitGargGameZone
    @RohitGargGameZone 6 років тому +1

    HOW TO CHANGE THER NASMES OF THAT APPS CAN U PLEASE TELL ME

    • @newabdullah101
      @newabdullah101  6 років тому

      The Tecky Rohit I dont get you, can you please repeat your question?

  • @Mdtarekhossainkhan56
    @Mdtarekhossainkhan56 Рік тому

    bhaiya apar Python programming and Data structure algorithm course korta chai

  • @jihadalakl7964
    @jihadalakl7964 4 роки тому

    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?

    • @pringlesss7701
      @pringlesss7701 4 роки тому

      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.

  • @mattizzle81
    @mattizzle81 4 роки тому +2

    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.

    • @edjones4748
      @edjones4748 3 роки тому

      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.

    • @mattizzle81
      @mattizzle81 3 роки тому

      @@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.

  • @jimmykoh5907
    @jimmykoh5907 5 років тому +2

    hello Mamoon Abdullah, thanks for your tutorial !
    How can I change the example's model to my own model

  • @imenmkaddem7451
    @imenmkaddem7451 6 років тому +3

    hey which algorithm you used for detection objects

  • @steeley77
    @steeley77 5 років тому

    Will you ever do the part 2?

    • @newabdullah101
      @newabdullah101  4 роки тому

      lol why not, however I was busy with my PhD candidacy exam.

  • @worldofanimals8279
    @worldofanimals8279 6 років тому +1

    please - video how to train and get model)

  • @HeavyLexRock
    @HeavyLexRock 5 років тому +1

    wow you are genius

    • @newabdullah101
      @newabdullah101  5 років тому

      Lol, really am I?

    • @emreaydn7097
      @emreaydn7097 5 років тому

      lol :D , how did you do that exacty ? :D maybe you can use library ? :P

  • @zakreyaomar4109
    @zakreyaomar4109 6 років тому

    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

  • @ivanosorio6540
    @ivanosorio6540 6 років тому

    can i edit the user interface to android studio?

    • @ivanosorio6540
      @ivanosorio6540 6 років тому

      and
      add some speech when it recognize objects?

    • @newabdullah101
      @newabdullah101  6 років тому

      Ivan XD yes

    • @ivanosorio6540
      @ivanosorio6540 6 років тому

      Mamoon Abdullah sir do you have any tutorials on how can i do that? Thank you sir!

    • @nafisaaziz6479
      @nafisaaziz6479 5 років тому

      could you pls provide the tutorial to create this object detection app step by step.

  • @alperbalc7826
    @alperbalc7826 5 років тому

    tayyip reis as bayrakları as as

  • @daulmalik8815
    @daulmalik8815 6 років тому +1

    give me quick solution plz

    • @newabdullah101
      @newabdullah101  6 років тому +1

      Daul Malik tell me

    • @daulmalik8815
      @daulmalik8815 6 років тому

      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..

    • @daulmalik8815
      @daulmalik8815 6 років тому

      Mamoon Abdullah check instagram..

    • @daulmalik8815
      @daulmalik8815 6 років тому +1

      @@newabdullah101 brother are you bz..? At least msg here...

    • @newabdullah101
      @newabdullah101  6 років тому +1

      You may ask your specific question here, I will try to answer if I can. Happy coding...

  • @vishaltorgal3372
    @vishaltorgal3372 4 роки тому

    I'm doing my college project can I get your email address for help

  • @jonatapaulino
    @jonatapaulino Рік тому

    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