Це відео не доступне.
Перепрошуємо.

Raspberry Pi LESSON 63: Object Detection on Raspberry Pi Using Tensorflow Lite

Поділитися
Вставка
  • Опубліковано 24 тра 2023
  • UPDATE:
    If you are getting an error like:
    ImportError: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ~/.local/lib/python3.9/site-packages/tensorflow_lite_support/metadata/cc/python/_pywrap_metadata_version.so)
    you need to be on the same version of software that I am of tflite_support. Downgrade yours from version 0.4.4 (current) to 0.4.3 (used in this tutorial)using this command:
    python -m pip install --upgrade tflite-support==0.4.3
    Check out gear here:
    amzn.to/3JWH7vp
    If you are able, I suggest you consider getting some spare servos for the pan tilt hat. During development if you are not careful, it is possible to damage a servo by crashing the camera into something. I like to keep a couple spares on hand:
    amzn.to/3E1KZaN
    Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!
    In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)
    amzn.to/3tSk9Mo
    or for our UK friends, amzn.to/3I5d401
    In today's video I will show you how install tensorflow lite on the Raspberry Pi. I will show how to use tensor flow to perform object detection from both a webcam and a pi camera. We will complete the program and by the end of the lesson you will have object detection working on a raspberry pi.
    If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:
    amzn.to/36NyfHq
    If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):
    amzn.to/3v13Mhl
    You guys get your hardware ordered so you can follow along at home!
    You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:
    amzn.to/3pBMfKm
    The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:
    amzn.to/3KcXTn2
    I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.
    amzn.to/36Rv9Sk
    You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    #tensorflow
    #objectdetection
    #raspberrypi

КОМЕНТАРІ • 90

  • @paulmcwhorter
    @paulmcwhorter  Рік тому +20

    UPDATE:
    If you are getting an error like:
    ImportError: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ~/.local/lib/python3.9/site-packages/tensorflow_lite_support/metadata/cc/python/_pywrap_metadata_version.so)
    you need to be on the same version of software that I am of tflite_support. Downgrade yours from version 0.4.4 (current) to 0.4.3 (used in this tutorial)using this command:
    python -m pip install --upgrade tflite-support==0.4.3
    This should fix things.

  • @cbrombaugh
    @cbrombaugh Рік тому +2

    Your patience in producing theses videos with all the intricate instructions is amazing. Many of the other online video tutorials skip over details and leave students wondering how to get from step to step. With my Pi camera and 8 max_results I see 8 FPS. Keep up the great work Paul!

  • @user-nj4vk5qo6y
    @user-nj4vk5qo6y Рік тому +1

    Easy to understand. Beautiful programming. Thanks Paul.❤❤❤

  • @bbamboo3
    @bbamboo3 Рік тому +1

    Excellent educational piece, enjoyed following the development.

  • @pralaymajumdar1206
    @pralaymajumdar1206 6 місяців тому +2

    Nothing to say sir.. It's the ultimate🙏❤... Your patience and nature of teaching are going better day by day.

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

    Thats was really helpful sir 🙏 .. thanks for this session 👍

  • @larryplatzek9017
    @larryplatzek9017 Рік тому +1

    AS usual you produced a most excellent video! Hope you arrive home safe and healthy!

  • @amarbakshi2839
    @amarbakshi2839 9 місяців тому

    WoW. I was frustrated just to setup opencv couple of weeks back before stumbling upon your videos. And now I have a working tensor flow setup detecting multiple objects. All thanks to your masterclasses. Thanks Paul.

  • @foolofatook4925
    @foolofatook4925 13 днів тому

    Important note for people taking this course from 2024!
    Viewer:
    1. I cannot stress how important it is to do the homework, which is to install a 64-bit version of Bullseye OS on your Pi on a new micro SD card. If you try running this lesson on another OS it is likely to not work.
    2. Test the code every time Mr. Paul does. It will save you frustration. For example, I found that this project requires numpy 1.x. I am a novice so it took me a while to figure out, but you can troubleshoot if you test along with Paul.
    Thanks Mr. Paul! As a person with limited coding and math experience, you are the best.

  • @denicfor3811
    @denicfor3811 Рік тому +1

    Спасибо, я раньше работал с нейросетями, и сначала мне было очень сложно, потому что сложно было найти хорошее объяснение, теперь же один знакомый рассказал мне про твой канал, и честно сказать я восхищён тем как ты объясняешь, все становится понятным и простым, спасибо, это очень круто!

  • @lockarpsgokart6516
    @lockarpsgokart6516 Рік тому +5

    Excellent. Now we talking. I really like TensorFlow, I tried YOLOv8 before on my Raspberry Pi4 but I only got 1.8 FPS. With the same setup as you I run 8 FPS both with Picamera2 and webcam. I hope you are going to produce a lot of TensorFlow lessons in the future. Btw, you are the best teacher on UA-cam. (Today I also bought a Coral Edge accelerator, will be fun to test and see the FPS)

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

      May I know how you did It?

    • @shivcharanthirunavukkarasu2131
      @shivcharanthirunavukkarasu2131 10 місяців тому

      Hey man! I am also facing the same problem. The FPS using YOLOv8 is very low. Can you please share your code/ resources you used to write your code?

    • @sahrishmemmon4409
      @sahrishmemmon4409 2 місяці тому

      how did you use coral usb with the same code.just making "True" doesnot solve the issue.I have also installed the libraries related to coral

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

    Thanks Paul!

  • @stephenlightkep1621
    @stephenlightkep1621 9 місяців тому

    Thanks Paul. I had a rough go from the beginning with all my mistakes, But every mistake I learned something from my past problems. I love this stuff.

  • @HA-wo3we
    @HA-wo3we Рік тому

    you are funny, love your coffee receipt!!!

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

    cool stuff Paul.

  • @vampireheart2596
    @vampireheart2596 Місяць тому

    Thank you sir ! It worked perfectly ! If anyone had the error with GLIBCXX_3.4.29 while testing the code, all you have to do is run the command : python -m pip install --upgrade tflite-support==0.4.2 (downgrade from 0.4.4)

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

    I have this in my pi4 b I love it it really is cool ❤awesome video! I also have opencv and visual studio code .

  • @metalfred_
    @metalfred_ 4 місяці тому +1

    I really thank you very much for taking the time and making these videos, and for sharing your knowledge with us, long live to you my good friend, greetings from Guatemala!

  • @Ducerobot
    @Ducerobot Рік тому +1

    The coral option is cool.....I have a coral try one .

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

    Bro i saw you in my dreams i met you and i was asking you python question about open cv i think you were my teacher i wish i can met you in real life you help me i lot you are great

  • @daveCotterill
    @daveCotterill 10 місяців тому

    brilliant, thank-you.

  • @daveedwards1663
    @daveedwards1663 Рік тому +1

    Great video. Did you figure out why the picamera had such a low FPS?

  • @AR-qb7nh
    @AR-qb7nh 5 місяців тому

    Thank you Paul for your amazing tutorials. Quick question: is there any way to extract values from the "detections" object? values such as category, bounding box coordinated, etc. You hinted at this topic at the end of your video but I'm not sure if there is another tutorial on TensorFlow.
    Thank you.

  • @christiansariol5018
    @christiansariol5018 6 місяців тому

    working great at 9 fps on pi 4! Thank you Paul-! supercool and fun

  • @qzorn4440
    @qzorn4440 Рік тому +1

    The Orange Pi5 is running this code about 2-3 times faster than the RP4. The OPi5 8 cores are around 50% at 48 C degrees. 800 x 600 = 20 FPS 1280 x 720 = 10 FPS 🐬 Cheers.
    Also, if the print statements are removed the FPS will increase a little. A most fun project. 🥰

    • @theparadise5474
      @theparadise5474 Місяць тому

      Hey can you plzzz help?

    • @theparadise5474
      @theparadise5474 Місяць тому

      I'm trying this code from last 1 month on Rpi 5 but it keeps giving me "subprocess exited with error" , whenever I try to execute sh setup.sh, can you help plzzz?

  • @oguzcan815
    @oguzcan815 2 місяці тому

    this guy is my holy grail

  • @user-wh3rj7ie9b
    @user-wh3rj7ie9b 6 місяців тому +1

    Hi someone know how to transform the thinks the raspberry find to audio??

  • @Eng.Ali13
    @Eng.Ali13 11 місяців тому

    My master ❤🌹🌺

  • @kurtroyales2659
    @kurtroyales2659 6 місяців тому

    Hello! If I want the system to print the name of the detected object, what command would you suggest? Thank you for the video by the way!!

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

    Please I want to run Yolov7 or 8 on my raspberry pi please can you help me on that?
    Thanks in advance

  • @jal4796
    @jal4796 11 місяців тому

    how can I fix attributeError module cv2.cv2 has no attribute CAP_PROP_FRAME_FPS?

  • @kirkkato7817
    @kirkkato7817 11 місяців тому

    My Webcam does not show a picture, I get the window that pops up. How do I fix error message, cv2.error opencv(4.5.3) - 206 bad flag?

  • @user-be7ol7om7m
    @user-be7ol7om7m 4 місяці тому +1

    Hey , sir i just wana know how to limit the number of objects being detected say for example i just want one object to be detected , is there a file where in i can change this i.e, the name of the classes i am unable to find one . can u help me with it

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

    Hi, I have been following your videos in the past months or so, first thank you for the great tutorials, it has been an amazing ride up until here. in this lesson, when I try to do what you did in 41:00 I get an error saying this "ValueError: The model is not a valid flatbuffer buffer"
    I have gone through everything I could find online but nothing worked, I have check what was installing on your Pi and checked the versions to my own, everything is the same as yours, but I get this error, I am using this for a university project and the deadline is closing in on me, any help would be great.
    thank you in advance (sorry if my English seems a little off, it's not my native language)

  • @kalagecko77
    @kalagecko77 11 місяців тому

    Hey Paul,
    i am facing problems as soon as i connect the USB webcam. If i run the script without connecting the USB webcam it runs normaly and i can interrupt the program with the key 'q'. Running the script with the USB webcam connected shows the frames but it freezes the mouse and keyboard. im not able to quit the script as long as the USB webcam is connected.
    I did a little search and found it "sudo setpci -s 01:00.0 0xD4.B=0x41" as Bugfix. But it didn't worked for me. The same occurs if i try to run the script with the USB webcam. Frames are shown but keyboard and mouse freeze.
    Could you please give a hint? Thx.

  • @sahrishmemmon4409
    @sahrishmemmon4409 2 місяці тому

    how to add coral usb part in this tutorialJust making the statement "True" doesnot work

  • @pedi4230
    @pedi4230 6 місяців тому

    hello sir, my terminal report like this "libmmal.so: cannot open share object file" can you help me fix it, thanks

  • @davidcooper8700
    @davidcooper8700 2 місяці тому

    Is the source code available anywhere? I am having trouble trying to listen to the video and typing the code into an editor?
    Love the way you cover the topics.

  • @user-ze4rw8oy2d
    @user-ze4rw8oy2d 3 місяці тому

    I have a question . I do what you do step by step and all of that work but the camera module raspberry it not working what's the problème

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

    I did this lesson on a RPI 3B (on the same SD-card as all the other lessons)
    I only changed the frame size to 640x360
    fps: 3
    How to change the color of the text showing the objects? The red color is difficult to read.

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

      That will be the whole point of the next lesson. We will not use the tensorflow utilities for drawing the annotations but will crack open the data structure and build our own boxes and annotations.

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

      @@paulmcwhorter Thanks Paul. 😊

  • @shakib993
    @shakib993 11 місяців тому

    How cai i do with my custom data

  • @RaviKumar-fw8bv
    @RaviKumar-fw8bv 6 місяців тому

    What version of tflite u have used sir

  • @-iIIiiiiiIiiiiIIIiiIi-
    @-iIIiiiiiIiiiiIIIiiIi- 9 місяців тому

    This dude can detect kids on his lawn from over 20 feet away!

  • @shakib993
    @shakib993 11 місяців тому

    Is this model detect banana, orange, onion, potato, garlic?

  • @thomashu1095
    @thomashu1095 3 місяці тому

    Hi Paul, I have been following your tutorials and have learned a lot of basic stuffs I missed in the past. I am currently upgrade my Pi to Bookworm (Debian 12). The legacy camera option is no longer available and Python is changed to version 11. The installation of tflite requires to down grade python to 3.9. After install 3.9 and create a virtual environment including system-site-package, I was able to install tflite and ran the example using the webcam by specify the cameraId to 1 using only cv2. When I try to implement picamera2 using CSI camera, I got an error of "module picamera2 not installed". I tried to install it using pip in the virtual environment but failed. I wonder if you have the same experience and have a way of resolving it? Thanks! Thomas

    • @burakay3609
      @burakay3609 3 місяці тому

      Hi Thomas, i am a newbie and i can't install python 3.9 whatever i do, do you have any video/link to follow through?

  • @peterdemharter5834
    @peterdemharter5834 8 місяців тому

    Hi, thx for this very good tutorial and thx for your perfect english, making it easy for understanding your explanations for non native speakers. All works fine. However has anyone already used the example with the USB Coral Edge TPU to run? Only the option set to TRUE does not work. I couldn't find anything on the web about the error message. I have already replaced the model, but I fear you have to install the Edge TPU runtime according to the Coral website, which I'm afraid will destroy the current installation, so it would be nice to get some information about the pitfalls beforehand. Thanks in advance!

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

    how to use it in custom dataset?

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

      Did you find a solution for this?!!

    • @hung1853
      @hung1853 11 місяців тому

      ​@@mahmoudsholak1967me too, i trained on gg colab, but it fail. Can you?

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

    I love your lessons, but you missed the fact that your apt-get update failed because your pi doesn't appear to be on the network looking at the top right of the screen. So the subsequent apt-get upgrade was of course extremely fast :-)

  • @gokulg8476
    @gokulg8476 4 місяці тому

    Hi, I am facing these type of error
    Traceback (most recent call last):
    File "/home/pi/Python/detect.py", line 40, in
    detector=vision.ObjectDetector.create_from_options(options)
    File "/home/pi/.local/lib/python3.9/site-packages/tensorflow_lite_support/python/task/vision/object_detector.py", line 87, in create_from_options
    detector = _CppObjectDetector.create_from_options(
    RuntimeError: Unable to open file at efficientdet_lite0.tflite
    I need your help.. How I resolve the error..

  • @theparadise5474
    @theparadise5474 Місяць тому

    Hey sir,,, I'm trying this code from last 1 month on Rpi 5 but it keeps giving me "subprocess exited with error" , whenever I try to execute sh setup.sh, can you help plzzz?

    • @vegabs
      @vegabs Місяць тому

      you have to use python 3.7.3 (same version as Paul). python 3.11 did not work for me so i had to downgrade python

  • @user-uw1nn5sf8s
    @user-uw1nn5sf8s 5 місяців тому

    Is it okay if I have only one Picamera, without the Webcamera?

    • @paulmcwhorter
      @paulmcwhorter  5 місяців тому

      Should work for most things

    • @user-uw1nn5sf8s
      @user-uw1nn5sf8s 5 місяців тому

      @@paulmcwhorter yeah it's functioning very well. Thank you sir

  • @HungNguyen-gl2xt
    @HungNguyen-gl2xt 2 місяці тому

    Hi sir. If I want to detect only human, then what I should do. Could you please help me Mr. Paul ? :)

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

    Here is the link to my homework. ua-cam.com/video/jliXH07wZtw/v-deo.html

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

    July 2023 and running into the same problem with this as every other time I've been trying to do tflite stuff...
    ImportError: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ~/.local/lib/python3.9/site-packages/tensorflow_lite_support/metadata/cc/python/_pywrap_metadata_version.so)
    tflite looks to be using a glibc version not currently available on the standard pi builds.

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

      Same problem here since few days.
      I've tried fresh install of Bullseye even without updating and it is still the same so something must have changed in tensorflow

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

      Facing the same problem.Let me know if you guys find any solution

    • @David-pp9th
      @David-pp9th Рік тому

      I got this same problem

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

      ​@@tanvirarnob49, @mchamster7
      I've found solution:
      In short downgrade tflite_support from version 0.4.4 (current) to 0.4.3 (used in this tutorial)using this command:
      python -m pip install --upgrade tflite-support==0.4.3