ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

How to Perform Object Detection with TensorFlow Lite on Raspberry Pi | Digi-Key Electronics

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ต.ค. 2020
  • In this tutorial, Shawn walks you through installing TensorFlow Lite on a Raspberry Pi and using it to perform object detection.
    COCO SSD MobileNet V1 and labels (ZIP file): storage.google...
    Code for this tutorial can be found in the written tutorial here: www.digikey.co...
    Code is based on EdjeElectronics’ TensorFlow Lite demo project: github.com/Edj...
    Object detection is the process of having a computer look at an image, figure out which objects are in that image, and then classify them. It’s a difficult problem in the field of computer vision, but neural networks have made object detection possible on even low-powered computers, like the Raspberry Pi.
    TensorFlow Lite is a stripped-down version of TensorFlow that is optimized for speed and low memory. It is only capable of performing inference with a model, so don’t expect to use it for training. In the video, we’ll install TensorFlow Lite and OpenCV on a Raspberry Pi.
    Rather than train our own model, we’ll use a pre-trained model that can be downloaded from one of Google’s TensorFlow tutorials. The model is MobileNet v1, which has been configured for single shot multibox detection (SSD) on the Common Objects in Context (COCO) dataset. An SSD model gives us a list of objects it thinks it sees in an image along with a predicted bounding box for each object. The “single shot” aspect refers to the fact that we can get all of this information by performing inference only once.
    The COCO dataset is a popular set of around 200,000 images that have been labeled with around 90 object categories by researchers at Google, Facebook, and various universities. A model that has been pre-trained with the COCO dataset should be capable of identifying objects of those categories. While it’s often not the most accurate (as we discover in the video), it can work as a great starting point for SSD object detection.
    We can use transfer learning to tweak the parameters in a pre-trained network to detect objects of our choosing. This process requires collecting data and re-training part of the model, which we will cover in a future episode.
    Product Links:
    Raspberry Pi 3B+ - www.digikey.co...
    Raspberry Pi 4 (4 GB) - www.digikey.co...
    Raspberry Pi 4 (8 GB) - www.digikey.co...
    Raspberry Pi Camera Module V2 - www.digikey.co...
    Related Videos:
    What is Edge AI?
    • Intro to Edge AI: Mach...
    Intro to TensorFlow Lite Part 1: Wake Word Feature Extraction
    • Intro to TensorFlow Li...
    Intro to TensorFlow Lite Part 2: Speech Recognition Model Training
    • Intro to TensorFlow Li...
    Intro to TensorFlow Lite Part 3: Speech Recognition on Raspberry Pi
    • Intro to TensorFlow Li...
    Related Project Links:
    How to Perform Object Detection with TensorFlow Lite on Raspberry Pi - www.digikey.co...
    Related Articles:
    What is Edge AI? - www.digikey.co...
    TensorFlow Lite Tutorial Part 1: Wake Word Feature Extraction - www.digikey.co...
    TensorFlow Lite Tutorial Part 2: Speech Recognition Model Training - www.digikey.co...
    TensorFlow Lite Tutorial Part 3: Speech Recognition on Raspberry Pi - www.digikey.co...

ความคิดเห็น • 65

  • @sugumarp3454
    @sugumarp3454 3 ปีที่แล้ว +1

    Crisp and clear. Good content.

  • @LouisFox89
    @LouisFox89 3 ปีที่แล้ว +3

    Such an incredibly well made interesting video. Really good and useful.

  • @tanjiro3285
    @tanjiro3285 9 หลายเดือนก่อน

    90 % digikey ytb channel is shawn 😁

  • @sqribe
    @sqribe 9 หลายเดือนก่อน

    the script works fine when running on a usb web cam, but when i use the camera module from amazon (has the night vision /ir switching, i read somewhere it's modelled after the official v1 module.) anyway, when i use it with that camera, nothing happens. a little 'preview' box shows up empty and i get an error about frame1.copy returning a Nonetype, indicating it's not pulling info off the camera, however, libcamera-hello gives me a crisp clear picture of myself, so i know the camera functions.
    anyone out there have any advice?

  • @aisolutions834
    @aisolutions834 3 ปีที่แล้ว

    Nice work Shawn!, I just finished this project, was a really great experience as a new Pi member!
    I've done some transfer learning for my project, but I think everybody likes to see your take on transfer learning on Pi4 and ESP32!

  • @WTFhowdIdie
    @WTFhowdIdie 2 ปีที่แล้ว

    Hello, I am trying to follow this build and I encounter an error at 10:12 in the video. When I try to execute the script, I get:
    Traceback (most recent call last):
    File "TFLite_detection_webcam.py", line 19, in
    import cv2
    File "/home/pi/Projects/Python/tflite/tflite-env/lib/python3.7/site-packages/cv2/__init__.py", line 3, in
    from .cv2 import *
    ImportError: libjasper.so.1: cannot open shared object file: No such file or directory
    ________________________________________
    I've followed the video exactly and started with a fresh build. If anyone could help me out I'd really appreciate it.

  • @KD_edit_bt
    @KD_edit_bt 3 ปีที่แล้ว +1

    Failed to fetch error
    sudo apt -y install qt4-dev-tools libatlas-base-dev libhdf5-103

  • @vedantpoddar2309
    @vedantpoddar2309 3 ปีที่แล้ว +1

    Love your videos❤️!! Keep them coming!

  • @amritraj7640
    @amritraj7640 2 ปีที่แล้ว +1

    Can we use it for only detecting a specific object ?

  • @newsonsports7457
    @newsonsports7457 2 ปีที่แล้ว

    I want to detect custom object ..what will be the changes.which file replace?

  • @ikhwalsyukur2068
    @ikhwalsyukur2068 3 ปีที่แล้ว +1

    Anyone know how to fix it?
    I have problem in last code when u want to show camera,
    The error write like this
    "TFLite_detection_webcam.py", line 102, in
    "ModuleNotFoundError: No Module named 'tensorflow'

  • @michaelhofmann5091
    @michaelhofmann5091 3 ปีที่แล้ว +1

    Hey man great stuff
    I got stuck at 4:03" ,
    My command promp sais "could not find a version that satisfies the requirement opencv-contrib-python=4.1.0.25. N matching disptribution found for opencv-contrib-python==4.1.0.25.
    Am I missing something here or should I type in a diferent Version?
    Cheers!

    • @911Kano
      @911Kano ปีที่แล้ว

      Same issue. Please help!

    • @michaelhofmann5091
      @michaelhofmann5091 ปีที่แล้ว

      @@911Kano got no help since

  • @gabrielcassoni9514
    @gabrielcassoni9514 3 ปีที่แล้ว

    This video is exactly what I was looking for! Thank you!

  • @harshita8600
    @harshita8600 3 ปีที่แล้ว

    Hey .Unable to sign- in into Google account(gmail account) on raspberry Pi 4....
    Plz help...

  • @ahedmafarjeh936
    @ahedmafarjeh936 2 ปีที่แล้ว

    tank you
    i have an question.
    please,can you tell me how i can use yolo model instead of ssd mobilenet?

  • @YigalBZ
    @YigalBZ 3 ปีที่แล้ว +1

    Thank you! one problem: at 04:30, there is no such table of WHL files in the link. Perhaps it was changed? Help please.

    • @YigalBZ
      @YigalBZ 3 ปีที่แล้ว

      Found a link to the list. But when I run it, the following error occurred: ""Could not install packages due to an EnvironmentError: 404 client error: Not found for url pypi.org/simple/tflite-runtime

    • @YigalBZ
      @YigalBZ 3 ปีที่แล้ว

      After copying from the picture the path you provided (and not the one in the site) - I managed to pass this step

    • @ichibankasuga5787
      @ichibankasuga5787 3 ปีที่แล้ว

      @@YigalBZ Not for me (( still getting "tflite_runtime-2.1.0.post1-cp37-cp37m-linux-armv7l-linux_armv7l.whl is not a supported wheel on this platform" on Pi 3+....

  • @donnguyen4956
    @donnguyen4956 3 ปีที่แล้ว

    even though TensorFlow make the program lightweight to fit on a single board computer, can the Program be optimize any futher (in term of memory, and computational power), in order to be operational on something like ESP32?

  • @deepeshdeepakdd2
    @deepeshdeepakdd2 3 ปีที่แล้ว

    Can you guide on as to how to stream this Tensorflow object detection video feed to Windows/Ubuntu which is connected to the same WiFi network as the RPi.

  • @haseenabegum6153
    @haseenabegum6153 3 ปีที่แล้ว

    Sir can you please tell me How activate the tflite environment automatically without typing the commands and can u please tell me how te get speech output of the objects detected

  • @aynonsense7716
    @aynonsense7716 ปีที่แล้ว

    Can tflite model run on raspberry pi 2?

  • @markpretorius6854
    @markpretorius6854 3 ปีที่แล้ว

    Great job, please keep making videos

  • @tiarakusumadewi2337
    @tiarakusumadewi2337 3 ปีที่แล้ว

    Hi Sir. I have succeeds to follow your tutorial. Thanks to you. However, after a while, when re-try to run the code, the object detector web does not pop up.

  • @amnahrafie1435
    @amnahrafie1435 3 ปีที่แล้ว

    Thank you for the very informative video, I have a small question due to an error that appears while running the python code that opens the RPI camera. The error stated: Didn't find op for builtin opcode 'CONV_2D' version '5'. Any idea on how to solve this error? The code is given in the tutorial runs with no error it's just the command prompt in the RPI that shows the error I mentioned earlier.

  • @gautamnarayan2617
    @gautamnarayan2617 2 ปีที่แล้ว

    Thank you for the video. I have a small question. How can we detect a particular object for the label map? Is there a way to do it? I just want to detect people from the list.
    Thank you in advance!!

  • @jasondeglint
    @jasondeglint 3 ปีที่แล้ว +1

    This is great content! More like this please. :)

  • @amirmahdisoltani1
    @amirmahdisoltani1 3 ปีที่แล้ว

    Fantastic ... I really learn from you ...

  • @mohammedkedir1591
    @mohammedkedir1591 3 ปีที่แล้ว

    This video is really helpful great job! But I was trying to download opencv 4.1.0.25 but it starts then it stops when it gets 92% then the error is update the hashe do you have any idea about that thanks!

  • @mayurbhat9479
    @mayurbhat9479 3 ปีที่แล้ว

    Thanks, Great Video!!
    Since the objects are detected, can you show how to convert it to speech in raspberry pi?

  • @jellianjanenegrite8503
    @jellianjanenegrite8503 3 ปีที่แล้ว

    There's an error in last program in TFlite_detection_webcam.py --modeldir=coco_ssd_mobilenet_V1, it say's the following arguments are required: --modeldir.
    Can you help me about this? Thank You!

    • @ninaddeshmukh654
      @ninaddeshmukh654 3 ปีที่แล้ว +1

      I am facing the same problem did you got any solution for it if so do lmk

  • @faisalali5864
    @faisalali5864 3 ปีที่แล้ว

    ❤ the tutorial,
    Can u provide information to run this model of tensorflow lite on sipeed M1n or on android phone.

  • @terryterry1655
    @terryterry1655 2 ปีที่แล้ว

    Tensorflow running at? Fps

  • @jean-marckapisu7512
    @jean-marckapisu7512 3 ปีที่แล้ว

    Hello everyone, I'm a beginner, at 1:53 how to save the .bashrc ?

  • @yaribnevarez2541
    @yaribnevarez2541 3 ปีที่แล้ว

    Thanks again!

  • @MuhammadDaudkhanTV100
    @MuhammadDaudkhanTV100 3 ปีที่แล้ว

    Cool project

  • @lernenmitrobin
    @lernenmitrobin 3 ปีที่แล้ว

    great as usual!

  • @akeemlouigarde4946
    @akeemlouigarde4946 2 ปีที่แล้ว

    It's saying "unable to locate package libjasper-dev"

    • @jameshodds8800
      @jameshodds8800 2 ปีที่แล้ว

      I have the same problem did you ever sort this out if so how

  • @texasdaveodell
    @texasdaveodell 3 ปีที่แล้ว +1

    sudo apt -y install qt4-dev-tools libatlas-base-dev libhdf5-103

    • @KD_edit_bt
      @KD_edit_bt 3 ปีที่แล้ว

      it is not working and give error

    • @KD_edit_bt
      @KD_edit_bt 3 ปีที่แล้ว

      @Shawn Hymel please se into it

  • @projectideas6543
    @projectideas6543 3 ปีที่แล้ว

    Help! No module named cv2

    • @saadmunawar7920
      @saadmunawar7920 3 ปีที่แล้ว

      im getting the same error, idk what to do about it

    • @projectideas6543
      @projectideas6543 3 ปีที่แล้ว

      @@saadmunawar7920 I got it resolved, go back to the steps you might miss something that you type or copy-pasted.

  • @JohnGalanakis
    @JohnGalanakis 3 ปีที่แล้ว

    FUCKING TENSORFLOW CHANGED THEIR SITE AND I CANT SEEM TO FIND OLDER VERSIONS BESIDE 2.5.0 PLEASE FUCKING HELP ME :'(

  • @Tony770jr
    @Tony770jr 3 ปีที่แล้ว +1

    We'll, more like alphabet soup than object detection.