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

  Рет қаралды 25,610

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 93
@paulmcwhorter
@paulmcwhorter Жыл бұрын
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.
@denicfor3811
@denicfor3811 Жыл бұрын
Спасибо, это сильно мне помогло!
@KelvinBenny-ed6ez
@KelvinBenny-ed6ez Жыл бұрын
it shows -u no such option
@stephenlightkep1621
@stephenlightkep1621 Жыл бұрын
Thank you.
@kazp5020
@kazp5020 Жыл бұрын
Thanks!
@davendren.t
@davendren.t Жыл бұрын
double dash for ''- - upgrade ''
@pralaymajumdar1206
@pralaymajumdar1206 10 ай бұрын
Nothing to say sir.. It's the ultimate🙏❤... Your patience and nature of teaching are going better day by day.
@cbrombaugh
@cbrombaugh Жыл бұрын
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!
@amarbakshi2839
@amarbakshi2839 Жыл бұрын
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.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Great to hear!
@lockarpsgokart6516
@lockarpsgokart6516 Жыл бұрын
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 KZbin. (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 Жыл бұрын
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 6 ай бұрын
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
@denicfor3811
@denicfor3811 Жыл бұрын
Спасибо, я раньше работал с нейросетями, и сначала мне было очень сложно, потому что сложно было найти хорошее объяснение, теперь же один знакомый рассказал мне про твой канал, и честно сказать я восхищён тем как ты объясняешь, все становится понятным и простым, спасибо, это очень круто!
@vampireheart2596
@vampireheart2596 5 ай бұрын
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)
@சூப்பர்தமிழா-ய6ற
@சூப்பர்தமிழா-ய6ற Жыл бұрын
Easy to understand. Beautiful programming. Thanks Paul.❤❤❤
@stephenlightkep1621
@stephenlightkep1621 Жыл бұрын
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.
@larryplatzek9017
@larryplatzek9017 Жыл бұрын
AS usual you produced a most excellent video! Hope you arrive home safe and healthy!
@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
@akanda3642
@akanda3642 2 ай бұрын
If you are having trouble importing some libraries like cv2, utils etc. try to downgrade numpy to some version under 2.0.0. For me it worked with 1.26.4
@bbamboo3
@bbamboo3 Жыл бұрын
Excellent educational piece, enjoyed following the development.
@foolofatook4925
@foolofatook4925 4 ай бұрын
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.
@rayrayg2
@rayrayg2 Ай бұрын
Great tutorial! Easy to follow along. Although I ran into error to get camera going… from picamera2 import Picamera2 No module named 'picamera2' ModuleNotFoundError: No module named 'picamera2' Any info will be appreciated on how to tackle this error. Thank you Paul! And thank y’all in this comment section!
@metalfred_
@metalfred_ 8 ай бұрын
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!
@khaledsaleh664
@khaledsaleh664 2 ай бұрын
Thank you Paul, very informative and useful. Should this whole be built in a virtual environment?
@qzorn4440
@qzorn4440 Жыл бұрын
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 4 ай бұрын
Hey can you plzzz help?
@theparadise5474
@theparadise5474 4 ай бұрын
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?
@Ducerobot
@Ducerobot Жыл бұрын
The coral option is cool.....I have a coral try one .
@daveedwards1663
@daveedwards1663 Жыл бұрын
Great video. Did you figure out why the picamera had such a low FPS?
@ליאםאמסלם-צ8ב
@ליאםאמסלם-צ8ב 9 ай бұрын
Hi someone know how to transform the thinks the raspberry find to audio??
@HA-wo3we
@HA-wo3we Жыл бұрын
you are funny, love your coffee receipt!!!
@AR-qb7nh
@AR-qb7nh 9 ай бұрын
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.
@raam-l9d
@raam-l9d 8 ай бұрын
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
@kurtroyales2659
@kurtroyales2659 10 ай бұрын
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!!
@davidcooper8700
@davidcooper8700 5 ай бұрын
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.
@visionupsc342
@visionupsc342 Жыл бұрын
Thats was really helpful sir 🙏 .. thanks for this session 👍
@panchoperico20
@panchoperico20 Жыл бұрын
cool stuff Paul.
@kalagecko77
@kalagecko77 Жыл бұрын
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 6 ай бұрын
how to add coral usb part in this tutorialJust making the statement "True" doesnot work
@hakimkm-e1u
@hakimkm-e1u 7 ай бұрын
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
@christiansariol5018
@christiansariol5018 10 ай бұрын
working great at 9 fps on pi 4! Thank you Paul-! supercool and fun
@paulmcwhorter
@paulmcwhorter 10 ай бұрын
Great to hear!
@sethbaidoo1941
@sethbaidoo1941 Жыл бұрын
Please I want to run Yolov7 or 8 on my raspberry pi please can you help me on that? Thanks in advance
@kirkkato7817
@kirkkato7817 Жыл бұрын
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?
@scottwait3585
@scottwait3585 Жыл бұрын
Thanks Paul!
@jal4796
@jal4796 Жыл бұрын
how can I fix attributeError module cv2.cv2 has no attribute CAP_PROP_FRAME_FPS?
@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)
@pedi4230
@pedi4230 10 ай бұрын
hello sir, my terminal report like this "libmmal.so: cannot open share object file" can you help me fix it, thanks
@oguzcan815
@oguzcan815 6 ай бұрын
this guy is my holy grail
@thomashu1095
@thomashu1095 7 ай бұрын
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 7 ай бұрын
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?
@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. 😊
@RaviKumar-fw8bv
@RaviKumar-fw8bv 10 ай бұрын
What version of tflite u have used sir
@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 .
@-iIIiiiiiIiiiiIIIiiIi-
@-iIIiiiiiIiiiiIIIiiIi- Жыл бұрын
This dude can detect kids on his lawn from over 20 feet away!
@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 8 ай бұрын
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..
@shakib993
@shakib993 Жыл бұрын
Is this model detect banana, orange, onion, potato, garlic?
@shakib993
@shakib993 Жыл бұрын
How cai i do with my custom data
@errrbrrr3821
@errrbrrr3821 Жыл бұрын
how to use it in custom dataset?
@mahmoudsholak1967
@mahmoudsholak1967 Жыл бұрын
Did you find a solution for this?!!
@hung1853
@hung1853 Жыл бұрын
​@@mahmoudsholak1967me too, i trained on gg colab, but it fail. Can you?
@theparadise5474
@theparadise5474 4 ай бұрын
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 4 ай бұрын
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
@peterdemharter5834
@peterdemharter5834 11 ай бұрын
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!
@peterdemharter5834
@peterdemharter5834 11 ай бұрын
I could solve it :-)
@sahrishmemmon4409
@sahrishmemmon4409 6 ай бұрын
@@peterdemharter5834 hi can you help me please. I am facing same problem
@HungNguyen-gl2xt
@HungNguyen-gl2xt 6 ай бұрын
Hi sir. If I want to detect only human, then what I should do. Could you please help me Mr. Paul ? :)
@刘雨晴-y1d
@刘雨晴-y1d 9 ай бұрын
Is it okay if I have only one Picamera, without the Webcamera?
@paulmcwhorter
@paulmcwhorter 9 ай бұрын
Should work for most things
@刘雨晴-y1d
@刘雨晴-y1d 9 ай бұрын
@@paulmcwhorter yeah it's functioning very well. Thank you sir
@daveCotterill
@daveCotterill Жыл бұрын
brilliant, thank-you.
@Eng.Ali13
@Eng.Ali13 Жыл бұрын
My master ❤🌹🌺
@jameslewellen150
@jameslewellen150 Жыл бұрын
Here is the link to my homework. kzbin.info/www/bejne/oJ3MiXtmbNyNqtk
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@jameslewellen150
@jameslewellen150 Жыл бұрын
@@paulmcwhorter Thanks, this one was really fun.
@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
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 23 МЛН
How AI Protects My Garden from Rabbits
14:22
Roboflow
Рет қаралды 3,2 М.
Why did Raspberry Pi make their own SSD?
12:58
Level 2 Jeff
Рет қаралды 258 М.
HowTo use Raspberry Pi & OpenCV to track objects & turn servo
15:57
CuriousInventor
Рет қаралды 18 М.
Raspberry Pi 5: Getting Started
24:43
Jeff Geerling
Рет қаралды 507 М.
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН