Want to learn how to train your own TFLite model to run on the Raspberry Pi? I released a video giving step-by-step instructions for training TFLite object detection models inside your web browser using Google Colab and deploying it on the Pi. Check it out here! kzbin.info/www/bejne/jouad4x3gqiWaq8
@randomvideochamber1723 Жыл бұрын
FIRST!!!
@JoseMoreno-hp2le Жыл бұрын
Edje Electronics is it better to use the 8G or 4G raspberry pi
@andreguimaraes65095 ай бұрын
Can someone help me? I have a problem with the following command step "sudo pip3 install virtualenv", when I execute this command the following error "externally-managed-environment" appears, I performed all the previous steps but I was unable to resolve it
@NoHack_Know_How4 жыл бұрын
BroHam !!!!! this is what I was looking for, something simple to catapult my curiosity to see if I like it !!! Excellent work my friend.
@AffectiveApe4 жыл бұрын
I find it absurd, but also a complete testament to what you have done here, that I was able to get this working in about 15 minutes on the first try. Thank you!!!!
@EdjeElectronics2 жыл бұрын
Hey all! If you're using the Raspberry Pi OS Bullseye release (which is the latest version), there's a couple things you have to do to get it working with the Raspberry Pi Camera: 1. Make sure the OS is up-to-date by issuing "sudo apt update" and "sudo apt install" and then rebooting the Pi 2. Open a terminal, enter "sudo raspi-config", go to the "Interface Options" menu, then go to the "Legacy Camera" option and enable it. Then, reboot the Pi (again). 3. Run the TFLite_detection_webcam.py script as described in this video. Note: You only need to do these steps if you're using a Raspberry Pi Camera (HQ, v1, or v2). You don't need to do them if you're using a USB webcam. Also, you don't need to do them if you're using the Stretch or Buster OS releases.
@Satish_Lakhan292 жыл бұрын
I want to glow led when car detected what will be the changes ?
@keshavharipersad20242 жыл бұрын
hey so i wanted to detect only a sertain ojbject iinstead of all kinds.. how can i do that?
@gregkirk8932 жыл бұрын
Thank you so much for creating, uploading, and updating this program. It’s brilliant!
@tredixion93152 жыл бұрын
Can you show how to setup and run in vscode or pycharm?
@michaelharris13704 жыл бұрын
Great video. For those looking to do this and get a higher FPS rate try using the pi camera connection instead of USB. The actual connection on the board itself will use less power and will have lower latency plus it goes directly to the GPU which is what you want for object detection. I haven’t tested this with TF Lite but the results are dramatic when running OpenCV
@w2w9005 жыл бұрын
Dude! It worked!!! Thanks so much. I tried one of your older videos but had no luck so I'm pumped to have something that finally runs!
@jonathangerard7455 жыл бұрын
Amazing thing done on the Raspberry Pi, Sir. All this while I thought Tensorflow would never work properly on the Pi. But this video helped a lot, Sir. Please keep geeking Sir. :)
@KowPlayzMinecraft4 жыл бұрын
No joke, I actually love you, I've been looking everywhere for a video like this!
@Ko6i4 жыл бұрын
9:49 nice acoustic person/backpack you've got there xP
@chrismacaluso7814 жыл бұрын
Once I formatted my NOOBS and started fresh your tutorial worked perfectly. Honestly, I started here, I'm going to go back and do step 1 now. The documentation is excellent. You've given a lot to learn and it's walked through for the non-pro like myself. Excellent work
@EdjeElectronics4 жыл бұрын
Thank you! I tried to make the instructions as straightforward as possible. Glad to hear they are working!
@EdjeElectronics3 жыл бұрын
I recently updated some of the setup scripts to work with newer versions of Raspberry Pi OS. (With Raspberry Pi and TensorFlow always releasing new versions of software, it's hard to stay on top of it all.) Everything should still work when following the instructions in this video. Please let me know if you run into any errors!
@georgoschalkiadakis24022 жыл бұрын
hi i have arasberry pi 4 b 64 bit os and im getting this error at the very end when trying to run it. I am using a high quality pi camera [ WARN:0] VIDEOIO(V4L2:/dev/video0): can't open camera by index Traceback (most recent call last): File "/home/pi/tflite1/TFLite_detection_webcam.py", line 171, in frame = frame1.copy() AttributeError: 'NoneType' object has no attribute 'copy'
@syawal-eb1nb2 жыл бұрын
i run it at virtualbox with raspberry OS Desktop 32Bit. the tensorflow cannot installed. it says caould not find a version that satisfied the requirements tensorflow (From version: )
@Valentin-vd8gz2 жыл бұрын
I have a question... How to change the rotation of the camera ? Mine is too much rotated ://
@madhurajr4454Ай бұрын
@@georgoschalkiadakis2402 did you got it resolved?
@tbx10245 жыл бұрын
Thank you so much, I used your older guide for Tensorflow with SSDLite before, and now you release this. Thank you!
@shubhankardeshpande24594 жыл бұрын
For those having the following error: (tflite1-env) pi@raspberrypi:~/tflite1 $ python3 TFLite_detection_webcam.py --modeldir=Sample_TfLite_model Traceback (most recent call last): File "TFLite_detection_webcam.py", line 122, in with open(PATH_TO_LABELS, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/tflite1/Sample_TfLite_model/labelmap.txt' Remember that the model files have been unzipped in Sample_TFLite_model and not Sample_TfLite_model or Sample_Tflite_model for that matter. Just make sure that you type *TFLite* correctly, and you're good to go.
@crookedikon4 жыл бұрын
So excited. I've been looking for a light weight model to put onto a pi in a RC car - this guide was straight forward, you've put a lot of hardwork in getting everything done, and to see it in action is amazing. Looking for that next video about what will speed up the FPS! Thanks man!
@simeonmarkoski2784 жыл бұрын
Can you please tell me why my camera window is not showing? for webcam
@koustubhkashalkar4 жыл бұрын
This is super. very methodical and complete video. worked perfectly.
@นายนรินทร์อนงค์ชัย5 жыл бұрын
You are the great man. I'm computer science teacher from Thailand.
@EdjeElectronics5 жыл бұрын
Thank you!! I hope this video can help your students 😃
@omarcruz63264 жыл бұрын
Oh Man, that's a really great video! I definitively have to try this ! Thanks for the great work.
@FacadeMan3 жыл бұрын
This worked brilliantly. My pi 4 is setup to work with the Sunfounder Picar-x and was a little doubtful if your project would play along with their setup. Luckily, it worked seamlessly on the first attempt using your setup scripts and the default models. My picam is doing 20-24 FPS and I’m just amazed. My end goal is to have this Picar-x to roam around the house without colliding into anything and to annoy my cat to do some exercise (she is on the bulkier side)
@EdjeElectronics3 жыл бұрын
Thanks, I'm glad to hear it works well! Do you know what version of Raspberry Pi OS you were using? I'm working on updating some of the scripts to work without errors on the latest Raspberry Pi OS.
@japerelectronics25684 жыл бұрын
I did this 2 years ago and it was an nightmare. It was still fairly new and you had to find patches for the patches. You made this ridiculously simple.
@EdjeElectronics4 жыл бұрын
Thanks! It's a pain staying on top of all the version changes. I did my best to make this one easy to follow and future-proof to new versions!
@itsmeintorrespain27144 жыл бұрын
I followed the recommendation, below in the comments, to install tensorflow 1.14 after running the requirements script. Everything works and my Pi4 4GB is giving about 5fps with the google sample.
@alldudu45832 жыл бұрын
Thank you so much for this guide, i was strunggling a lot with the object detection application until i found your guide :)
@barsgecgil34374 жыл бұрын
Me and my team tried using a diffrent software and a pi 3 for object detection and it was hell. we only got results every 8 seconds and this was on a moving drone ship so by the time it detected what it had to it was already miles away lol. The detection speed in this is amazing.
@BinkiklouGaminglol4 жыл бұрын
How big was the drone ship
@barsgecgil34374 жыл бұрын
@@BinkiklouGaminglol well we had its 6 motors and sensors (mainly a bunch of MZ80s)running on a arduino mega and we had a pi3 with a pi camera on top) The physical dimensions are If I remmember correctly (it was some time ago so probably these might be off) İt was round 50 ish cm (how long it was) 30-40cm in height and again 30-40 cm in with. Why did you ask ? :D
@BinkiklouGaminglol4 жыл бұрын
@@barsgecgil3437 wait what's a drone ship
@barsgecgil34374 жыл бұрын
@@BinkiklouGaminglol An autonomous ship. In this case, we built it for a competition and the goal was that our "bigger" ship would be placed in a pool in which there were other "smaller ships" the smaller ships were red and green and you had to somehow capture the green ones and take them to a different part of the pool. I don't know if they have any English resources but you can search "Fetih1453 TeknoFest" that's the name of the competition. It would make more sense if you just looked at that :D
@BinkiklouGaminglol4 жыл бұрын
@@barsgecgil3437 Oh nice, this is kinda like FRC robots but on water, and the participants are a little bit older.
@MrSpaceboyy5 жыл бұрын
Your tutorials are good for beginners, please keep doing them :)
@devdylan61523 жыл бұрын
great instructions! I use the pi4 on 64bit mode, idk if that is related or not, but, I did have a issue with the version of opencv not being installed, this was resolved by : pip install --upgrade pip pip install opencv-python just posting this if anyone else gets that this should do the trick for no matching distribution
@ShaneTalib4 жыл бұрын
Absolutely great guide. Worked perfectly on Raspberry Pi4 8GB with Stretch installed! Thank you very much.
@ryamoo5 жыл бұрын
Is this something that would benefit being on a cluster? One Pi for the camera, one Pi for the processing? I don't know anything about tensor flow or Pi clusters, just curious.
@DieBastler12345 жыл бұрын
Reading in a frame from a USB camera vs reading it in from another Pi isn't really a difference in performance. But other processing steps after the detection might be heavy enough to benefit from multiple Raspberries.
@EdjeElectronics5 жыл бұрын
Good question! No, I don't think a cluster would help for this. The main chunk of processing occurs when passing the image through the neural network to find the detected objects, and there isn't any (easy) way to split that between multiple Pis. And couka is correct that using a separate Pi to handle the camera wouldn't really help. I already have the camera running in a separate thread to speed things up (see www.pyimagesearch.com/2015/12/28/increasing-raspberry-pi-fps-with-python-and-opencv/ )
@villagegreenpreservation78214 жыл бұрын
This was my first click researching a project and I live on one of the cross streets shown in the beginning of the video. So random! Helpful video too.
@EdjeElectronics4 жыл бұрын
Nice! Feel free to say hi if you ever see me in Bozeman :)
@parthk23174 жыл бұрын
It will be really useful to know How can you toggle GPIO when certain object is detected? Thanks.
@williamledda76604 жыл бұрын
Incredibly simple and verry well explained! This is exactly what I was looking for. Congratulations!
@AaronEstebanSEO4 жыл бұрын
Dude! This is cool! I didnt even know that they had this type of technology.
@sunimaliattanayake3089 ай бұрын
I am forever grateful for these video tutorials. Thank you
@sunimaliattanayake3089 ай бұрын
Hi @EdjeElectronics ! I have followed your tutorials for a project of mine. I have encountered some errors. Can you help me. I have followed you on twitter.
@MrRadnartjie2 жыл бұрын
@Edje Electronics I just want to say a big thankyou for your work of putting this tutorial out there. I have designed and constructed a Autonomous Mobile Robot which is 95% 3d printed that uses tflite to identify and exterminate weeds. I couldn't have done it without your help! If I'm ever in your neck of the woods. I would like to thankyou in person. Hello from a final year mechatronics student in Port Elizabeth, South Africa!
@EdjeElectronics2 жыл бұрын
That's awesome! Thank you for letting me know, I'm glad this video was helpful. Keep up the good work!
@PraiseTheLord527 Жыл бұрын
Hello Mr. Radnartjie, Trust you are well. Hey, I was wondering how you ran the object detection headless. Did you run this program on an IDE like Thonny / Geany? I'm trying also to build an Autonomous Mobile Robot that uses object detection but I can't seem to find how to run this program other than on the terminal... Mr. Radnartjie, I would be really grateful for some advice.
@carlosvasquez-xp8ei2 жыл бұрын
This is an outstanding tutorial.
@jimguffey74075 жыл бұрын
Great video! I followed your written instructions last week. I have modified your code to count the frames when it detects a person and take a picture every 10th frame. I placed the camera in my car dash at work today and it took pictures when people walked in front of my car (it took 48 pictures). Pretty cool! I am now wanting to train my own model.
@EdjeElectronics5 жыл бұрын
That's awesome, sounds like a cool project! Training a model takes a bit more work, but the written guide (linked in the video description) walks through every step of the process. There have been a lot of version changes since I made the original guide for training on TensorFlow, so you might hit a few snags along the way. But for the most part, you should be able to resolve them if you Google the errors. Hope you're able to get it working!
@frustrated38805 жыл бұрын
Hey Jim! Do you have a tutorial on how to do that? I am trying to make a program that takes pictures n seconds.
@JohnArrowShorts Жыл бұрын
Is it possible to shaew the github code for that function. Where it will take picture for every 10th frame?
@kyleheppler28604 жыл бұрын
Let's get that next video! The people need the next videoooooooo
@simeonmarkoski2784 жыл бұрын
Can you please tell me why my camera window is not showing? for webcam
@qazxali4 жыл бұрын
this is the best tutorial ive seen on youtube, thank you so much !
@garrettkajmowicz5 жыл бұрын
Is there a way to do text detection/capture? For example, reading street signs?
@rushbigmoney5 жыл бұрын
Nice Job! Had a issue reviewed the comments reinstalled Raspbian, followed the video all working, thanks for sharing
@thanaponthanasakonpong15635 жыл бұрын
Hi ! I'm run tflite on Raspberry Pi 3 B+. Why i get 0.6-0.9 fps? Can you help me for more fps?
@Airbag8885 жыл бұрын
Amazing vid! I feel like this is the start of an amazing channel. Couple of questions : I have a rpi 4 as well with rpi cam. I wanted to setup the rpi as a basic IP cam for streaming only, no recording but the fps is extremely low (15fps max) . The idea was to see how high it could go. So I guess I'm asking how high it could be and also in the last seconds of this video did you achieve 20fps with the coral connected? Finally could it be trained to identify people? Thanks. I'm now wondering about setting up tensor flow 24/7 on the house server to monitor the babies 🤣 maybe make a video on that ❤️
@JoshuaSeagroves5 жыл бұрын
Great video! Definitely subscribing for more. I already have the coral device's so I can't wait to see what you do with them.
@Couchwurst4 жыл бұрын
Fantastic guide - clear, well sized steps, i love that install script, well documented, use cases! Thx! Btw, i like how to model at the end of the video is sure (more or less) that your guitar is a person or a backpack! :D
@chanakanoearsakul85104 жыл бұрын
Hi Edje I have a problem about line 122 Traceback (most recent call last): File "TFLite_detection_webcam.py", line 122, in with open(PATH_TO_LABELS, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/tflitel/Sample_TFLite_model/labelmap.txt'
@lennderman59054 жыл бұрын
Had the same problem, I just created the /home/pi/tflite1/Sample_TFLite_model/ folder and moved the labelmap.txt and detect.tflite from the tflite1 folder into it!
@alexanderreznik17003 жыл бұрын
Wow! The best guide for TensorFlow Object Detection! Thank you sir!
@umairkamran87054 жыл бұрын
Can we use this to make smart traffic light differentiating between a normal vehicle and an emergency vehicle such as an ambulance? Can you make a video to demonstrate or help me out through any link. I will be obliged.
@EdjeElectronics4 жыл бұрын
Yes you can, that would be a cool project! I don't have time to help, but check out my Pet Detector video, that might give you some ideas for how to control a program based on what is detected. kzbin.info/www/bejne/nXjUh4GrjtSfbNE
@andrewchen17444 жыл бұрын
Nice to watch this video on KZbin! Thank you!
@AdrianFried2 жыл бұрын
How was your setup right at the beginning of the video in the car? How do you recorded the screen? what type of connection do you used to connect to the pi? thanks for the cool tutorial!
@EdjeElectronics2 жыл бұрын
I had my Pi plugged into a monitor and recorded the screen using this HDMI recorder: www.amazon.com/gp/product/B00KMTYPXC . Looks like it's no longer available on Amazon, but you should be able to find something similar!
@AdrianFried2 жыл бұрын
@@EdjeElectronics Thanks!
@rhoniandjeff74534 жыл бұрын
This looks like just what I need for a project. Thank you for this. Very good video.
@IM8-84 жыл бұрын
Hi, nice video, is it possible that when detecting a bird, turn on an LED light or send a pulse?
@Darth_Pig4 жыл бұрын
I have a similar project, Pi will automatically track down the object e.g. Raccoon or human for my project(you can train your own model use OpenCV), and "fire" laser on the target and sound the alarm. My project is based on this: www.pyimagesearch.com/2019/04/01/pan-tilt-face-tracking-with-a-raspberry-pi-and-opencv/
@gregoryM1014 жыл бұрын
Thank you! I really appreciate your efforts in clearing up how to get this working. So far things are working great after your set up instructions. I will be trying to set up some custom objects to detect and passing the locations via I2C to an Arduino. I'm looking forward to trying it with the USB Coral unit soon.
@mtheory19994 жыл бұрын
Gregory Mazza hey Gregory, curious to know what kind of objects you are trying to detect. I’m working on my own algorithms and was wondering if you’d like to share information, thanks. My email is jatinderm19@gmail.com.
@NoHypocrisy423 ай бұрын
I'm more interested if it can read and log license plates.
@redmanhurricanes5 жыл бұрын
You the real MVP keep making content!
@syedumaidahmed62955 жыл бұрын
Can I ask that can we train our own model on Tensorflow Lite ? As I have followed your previous tutorial for training my own model on Pi 3. It was good but in slow speed
@EdjeElectronics5 жыл бұрын
Here's my GitHub guide showing how to train your own TensorFlow Lite detection model! github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi
@d.edmunds99554 жыл бұрын
this whole video is blowing my mind.
@aayogyadav4 жыл бұрын
hey, thanks for the video it really helped me a lot. but i have a question , how can i detect from any website like from url of youtube . please help me i have to complete my project and i am confused .......... and again thanks for the video.
@wristcutters45394 жыл бұрын
Use web scraping...I guess that'll help.
@GOBish235 жыл бұрын
Thank you so much! I have all the components for Rpi 4 + Coral, so very much looking forward to your next installment.
@felixalbert80984 жыл бұрын
Can I download you're bird squirrel and racoon model anywhere?
@jasondegani4 жыл бұрын
This was perfect and works fabulously! Far better than the official Google coral documentation which I haven't been able to get working yet. When you have time...a video on how to access GPIO pins and activate them or to activate another program based on a detected class would be super helpful. I'm having trouble figuring out how to turn the results of a detection into concrete effects (if bird detected, take a photo and if squirrel detected turn a gpio high and take a video to record the fun). Thanks for all the hard work you put into these videos!
@EdjeElectronics4 жыл бұрын
Thanks, I'm glad the videos are helpful! I'm hoping to put out a video soon that will give an example of toggling GPIO when certain objects are detected. Really hoping to get started on it this weekend! I also want to do a video showing how to trigger video/audio recording using ffmpeg.
@krishnerkar25804 жыл бұрын
@@EdjeElectronics Yayyy, looking forward to the former !! Great content
@jasondegani4 жыл бұрын
@@EdjeElectronics In case you haven't seen it, Pyimagesearch has a nifty KeyClipWriter that looks like it might be a good way to record the video, not just of the action frames but storing the frames in a buffer and saving the entire event to video including the frames prior to and immediately after the event is detected. That blog post is " Saving key event video clips with OpenCV."
@EdjeElectronics4 жыл бұрын
@@jasondegani Thanks for the heads up, I will check it out! I love PyImageSearch 👍
@ryanford93103 жыл бұрын
can u do this on an old pc or laptop aswell? and can you accelerate this process with a graphics card? @Edje Electronics
@ilkayatil5 жыл бұрын
Thanks for the tutorial, it works perfectly. I got around 1.5fps with NoIR camera v2 (8MP) and Pi 3+.
@yasindemirkaya29545 жыл бұрын
Hocam öncelikle kolay gelsin. Artifical Intelligence dersim için TensorFlow Lite ile Food Recognition tarzı bi ödev yapmam gerekiyor ama kendi modelimi train etmekte sorunlar yaşıyorum. Bu uygulamayı çalıştırabildiyseniz yardımcı olabilir misiniz? Şimdiden çok teşekkürler.
@JohnArrowShorts Жыл бұрын
May i know what is the Gb Ram of your Pi3+?
@russelpamintuan44194 жыл бұрын
Can someone help? Im trying to control a servo motor once TF detected a specific object. Thank you
@arksindustry21714 жыл бұрын
Sorry i dont know that
@parthk23174 жыл бұрын
Anybody figured how to toggle GPIO in real time when XYZ object detected.
@pietrolungaro64114 жыл бұрын
Are you planning to use MQTT to start/stop the motor? That will work.
@DashcamDriversGermany4 жыл бұрын
Nice video! Is there a way to let this detect numberplates from a video or pictures and pixelate them?
@weslyvanbaarsen6664 жыл бұрын
yeah ofc
@DashcamDriversGermany4 жыл бұрын
@@weslyvanbaarsen666 you know how? I'm not programming a lot and I don't know how rn
@weslyvanbaarsen6664 жыл бұрын
@@DashcamDriversGermany well you would use the tf api to actuate on by applying a pixel effect on the detected object region
@stefanm20594 жыл бұрын
Hi, the tutorial is relly great, but is there an option to access the raspberry gpio`s? Can somebody help me please. I am under a little time pressure.
@stefanm20594 жыл бұрын
Ok i found a solution. Activate the virtual enviroment => cd tflite1/ source tflite1-env/bin/activate pip list #shows all installed packages pip install rpi.gpio
@EdjeElectronics4 жыл бұрын
@@stefanm2059 Thanks for sharing your solution! 😃
@isaacatia-abugbilla24764 жыл бұрын
Thank you for this video. This appears to be the material I needed to run a tflite object detection model from a pi cam.
@bored_deductionist4 жыл бұрын
Works in the pi zero ?
@hakimke25 жыл бұрын
I really love your channel. I will also credit your Github repo in my project submission. Keep up the awesome work
@EdjeElectronics2 жыл бұрын
I created a Google Colab notebook for making your own TensorFlow Lite model with custom data! You can train, convert, and export a TFLite SSD-MobileNet model (or EfficientDet), and then download it to your Raspberry Pi and use as shown in this video. I'm still working on the video that walks through the Colab notebook, but please try it out if you're interested! colab.research.google.com/github/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Train_TFLite2_Object_Detction_Model.ipynb
@casualjay74282 жыл бұрын
You are a lifesaver, thank you!
@EdjeElectronics2 жыл бұрын
You're very welcome! Were you successfully able to train a model with the Colab notebook? It hasn't been tested by many other users yet, so I'm curious to hear if you ran in to any errors or issues.
@casualjay74282 жыл бұрын
@@EdjeElectronics Well I wanted to train a clothes classifier using FASHION-MNIST, so I'm still in the process of figuring out how to change that dataset to fit the colab notebook. In short, not succeeded yet, but haven't had the time to properly test it, so fingers crossed!
@EdjeElectronics2 жыл бұрын
@@casualjay7428 Oh! Actually, my guide won't work for that 🙁. My guide is for "object detection" models, while the FASHION-MNIST dataset is used to train "image classification" models. Here's a good guide from TensorFlow on training a basic classifier on the FASHION-MNIST dataset. www.tensorflow.org/tutorials/keras/classification
@casualjay74282 жыл бұрын
@@EdjeElectronics Oh I see! Thank you! I'm learning a lot so I still see this as a win!
@nielok2664 жыл бұрын
Great course, but when I try to run the object detection on a video, it says "error, no module named cv2 found." What do you think this could be about?
@ThatOneHandsomeGamer4 жыл бұрын
Thank you Jessie Pinkman
@tomasgodoy36557 ай бұрын
Thanks for the video, however having many troubles installing get_pi_requirements.sh. getting unable to locate, [Errno -3] Temporary failure in name resolution')':
@colinbravi6854 жыл бұрын
Great video, How do i get a USB camera to work with this? when i run the code i get a list of invalid arguments. I can get the camera to work outside of tensorflow.
@nurulsyazamohdasri5434 жыл бұрын
hi can I know how to write if labels= person it will rotate the motor and if not it will continue running ?
@EdjeElectronics4 жыл бұрын
Hello, please watch my Pet Detector video. It explains how the variables work and gives an example of how to trigger actions if certain objects are detected. Good luck! kzbin.info/www/bejne/nXjUh4GrjtSfbNE
@sanjaybhatikar4 жыл бұрын
Thank you 🙏 this worked flawlessly following your instructions on Pi 3 running Raspbian Buster. I am grateful for your help. I am using Google’s teachable AI to fit and export TensorFlow Lite models. My next step is to see how well those models work in this scheme. Thank you so much!
@japerelectronics25684 жыл бұрын
Thanks for this comment. I have been trying on an off to get this working for weeks. After your comment I started with a fresh SD card with the latest version of buster and it works great.
@BunillaCircus Жыл бұрын
github keeps asking me to login when I try to download the packages and it keep rejecting it. what should I do?
@Bit930 Жыл бұрын
I am having the same issue.
@SchoolforHackers Жыл бұрын
Check the link you’re using. A git:// url requires a login, an url doesn’t.
@MaciejStachowiak4 жыл бұрын
I am recreating your turtorial this week!
@questionablecommands94235 жыл бұрын
0:02 Hotel Baxter?! HOLY SHIT! It's my home town of Bozeman!
@EdjeElectronics5 жыл бұрын
Haha yep!! I'm from Great Falls originally but living in Bozeman now. It's a great place to live! Check out my Raspberry Pi 3 vs Raspberry Pi 4 video, it's mostly footage of me driving around Bozeman :) kzbin.info/www/bejne/ipqyfKmFp76Bf6s
@foresttulip18954 жыл бұрын
I have checked the speed of runining two different tflite models on Raspberry Pi 3B+ for image classification. The two models are: 1. a keras model converted into tflite format without quantization, 2. the same keras model converted into tflite format with dynamic range quantization. The size of model 1 is 3.5 times of that of model 2. However the prediction speed of model 1 half of that of model 2. Do you know why model 1 is runing faster than model 2?
@rohanhasan14004 жыл бұрын
thanks a lot for this video but i just face some problem with this python3 TFLite_detection_webcam.py --modeldir=Sample_TFLite_model Traceback (most recent call last): File "TFLite_detection_webcam.py", line 19, in import cv2 File "/home/pi/tflite1/tflite1-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
@trevornkuna83914 жыл бұрын
I am having the same issue
@trevornkuna83914 жыл бұрын
I solved the problem by downloading this version of the model instead : wget storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip and unzip: unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip -d Sample_TFLite_model
@limbopferd4 жыл бұрын
I like the guitar person standing next to you.
@user-zm6kj7oi3d4 ай бұрын
Hey im running the bullseye os on a raspberry pi 4 B. I can't seem to get across the problem regarding running the .sh script
@domandrenog4 ай бұрын
Same here
@jonmoreland4404 ай бұрын
I think that part of the problem is that there are new versions of the programs that are being downloaded in the .sh that haven't been updated and so aren't working/downloading correctly. But I can't figure out which ones they are to get the updated ones.
@BooBar25212 жыл бұрын
What an amazing tutorial, thanks man👌🏻👍🏻
@genadimanoilenko14663 жыл бұрын
Hello Evan! thank you very much for your tutorial, it was a great pleaser to learn from you. Hope you will do more projects like that! I successfully repeated your project with my custom model for one month ago (I got my model from google cloud). Yesterday I built another model with different dataset and got some trouble with implementation. The error says next: ValueError: Op builtin_code out of range: 130. Are you using old TFLite binary with newer model? I found out they updated their conversion with TensorFlow 2.5 runtime. I guess this is the problem, may be you know how to fix it?
@genadimanoilenko14663 жыл бұрын
I tried update manually tflite-runtime package, but it did not help
@EdjeElectronics3 жыл бұрын
@@genadimanoilenko1466 Thanks, I'm glad the tutorial has been helpful! Hmm, if you updated tflite-runtime and you're still getting that error, then I'm not sure what the problem is. Can you check the version of tflite-runtime you're using on the Pi and the version of TensorFlow that you used for building your model? You should be able to use this to check the tflite-runtime version: import tflite_runtime tflite_runtime.__version__
@genadimanoilenko14663 жыл бұрын
@@EdjeElectronics thank you very much for your response. The version of tflite_runtime on raspberry pi is 2.5.0 and Google cloud uses TensorFlow 2.5.x (latest patch) cloud.google.com/ai-platform/training/docs/runtime-version-list package list
@electricsheep23054 жыл бұрын
Thanks man I was looking for something exactly like this
@ranahassankhalid63992 жыл бұрын
can i adjust the code to detect only 1 specific class like a person?
@keshavharipersad20242 жыл бұрын
yes, use google
@martinh90994 жыл бұрын
Thanks so much for this! Far better than the google documentation which I found to be as clear as mud
@lad75344 жыл бұрын
Could it be done in ubuntu mate? I have a rock64 and im curious if it gam be done on a raspberry like board
@Klffsj4 жыл бұрын
Yeah, it should work there. Raspbian and Ubuntu are both based on Debian after all. And, I'd be surprised if your PC doesn't hold up to a Raspberry Pi. All the steps should be the same.
@syedumaidahmed62955 жыл бұрын
Brother Can I do the same tutorial for real time card detection and making a card game from Raspberry pi ? I have also used your card detector script successfully. Which will be more fast and accurate ? This one or card detector you updated recently
@Amalokch3 жыл бұрын
I am new on this and perhaps this is a silly question: I am running a headless rpi connecting via ssh, I've done everything on this tutorial except the last part where I've to execute the python code. But when I run it "python3 TFLite_detection_webcam.py --modeldir=Sample_TFLite_model" I got this message: ": cannot connect to X server" anyone has faced the same issue? is it correct run the python code over ssh? if not, do I need the raspberry desktop version instead? Thanks in advance!
@EdjeElectronics3 жыл бұрын
Unfortunately, it doesn't work with a headless RPi connected over SSH. The "X server" error message occurs because it's trying to display an image to the screen, but there is no screen. You'll have to either use a desktop version, or modify the code so it just saves image files instead of trying to display them. Nice cat picture btw 😺
@Amalokch3 жыл бұрын
@@EdjeElectronics Many many thanks mate, now I get it, I also did some research in blogs and they pointed out to the same. About my profile pic, long live cat lovers 🐈 haha 👍🏻 Cheers!
@gusbakker5 жыл бұрын
It would be great to see a comparison between using Coral USB Accelerator and using another alternative like NVidia Jetson Nano!
@yalcin12345 жыл бұрын
Thank you 🙏 very useful tutorial
@ristopoho8244 жыл бұрын
The first thing to do on just anything. sudo apt-get update. I just ordered a raspberry pi. And have been binging on videos on what to do with it. Many videos mention this command as the first thing to do. And it's a good thing. Seems important and all. If only a few videos would have mentioned it, i probably would just skip it and wonder why things work less well than in videos, or something.
@jolly98337 ай бұрын
Is this compatible on raspberry pi 5?
@anthonyholmes13127 ай бұрын
I definitely would like to know as well. Been really struggling to get a coral TPU model to run on raspberry pi 5 with the latest OS...
@Minisatheesh2 күн бұрын
Hi I am a high schooler and working on a project using Raspberry Pi 5 for object detection. I have trained a custom TFLite model using your Colab notebook. However, when running the detect_webcam.py file, I get the error "VideoType has no object Frame". For this, I've tried to utilize camera pipes in both h264 and mJPEG formats, but to no avail. Can you please help me, as I've tried so many options, but feel stuck? I am using a Raspberry Pi Camera Module 3.
@EdjeElectronicsКүн бұрын
Hello, usually when you get that error, it indicates the program was unable to access the camera. In other words, the camera isn't working. The Pi Camera modules are tricky to set up, do you have a USB camera that you could try it with?
@carrotzombi5 жыл бұрын
Im looking to export label names as they come in / recognized by the pi. Does anyone happen to know where that string variable is? "for context, as a current student project, I am looking to pass this name on to another micro controller for a project I have been working. And now that i can "kind of" train a model, i would like to find this variable before moving forward" any and all help would be much appreciated.
@EdjeElectronics5 жыл бұрын
The label names are held in the "object_name" variable. If you add "print(object_name)" line after line 183 in TFLite_detection_webcam.py , it will print the name of every detected object on every frame.
@carrotzombi5 жыл бұрын
@@EdjeElectronics Thank you so much for responding This genuinely helps a ton.
@anukeshambatkar62554 жыл бұрын
sir, can we use it to detect different varieties of plants for agriculture purpose like distinguish between plant of bell paper and plant of cotton what changes we have to do in program
@charleskentucky63234 жыл бұрын
Hi, Edje thanks for the tutorial, the object detection works or certainly looks perfectly fine to me but after I run it, at first it says : ' HadoopFileSystem load error: libhfds.so: cannot open shared object file: No such file or directory ' Could you please help me solve this issue :)
@EdjeElectronics4 жыл бұрын
A few people have gotten this error! I haven't had time to look in to it yet. Can you tell me which Raspbian OS you are using? Buster or Stretch?
@charleskentucky63234 жыл бұрын
Edje Electronics Buster, 4.19
@riccardoesclapon5494 жыл бұрын
@@EdjeElectronics I am also getting this same error on Raspbian GNU/Linux 10 (buster)
@colbyhawker26594 жыл бұрын
I'm also getting this error on Buster. Any straight-foward solution yet?
@hfe18334 жыл бұрын
Wow bro, so many tutorial in KZbin is unique and fitted for my next project, if you have similar like this but using pytorch is high appreciated
@mohamedghezaiel52354 жыл бұрын
thank you for the video but i had this error when trying to open the pi camera VIDEOIO ERROR: V4L: can't open camera by index 0 Traceback (most recent call last): File "TFLite_detection_webcam.py", line 171, in frame = frame1.copy() AttributeError: 'NoneType' object has no attribute 'copy' can you help me with this
@ZEDketa4 жыл бұрын
I don't know but I sometimes have this problem after 1 to 2 hours of use ... For me it would come from my camera ...
@sribharathsajja57364 жыл бұрын
@@ZEDketa you need to change index from 0 to -1 in line 32 and need to modify the code to frame1 = videostream.read() if frame1 is None: break frame = frame1.copy() in line 171 in TFLite_detection_webcam.py
@darkgcn143 жыл бұрын
@@sribharathsajja5736 any chance you have another solution to this problem, I've googled this and feel like I've tried everything. This fix didn't work either
@stephendoroff79495 жыл бұрын
Hi, Just got the pre-compiled model from your Part 2 with the Coral Accelerator up and running at 20 to 24 FPS with the standard Edge TPU runtime, however, I had to make a small change. The first time through running the webcam detection script (in 2C) strangely it wasn't looking for detect_edgetpu.tflite but edgetpu.tflite, so I copied the detect_edgetpu.tflite model to create an edgetpu.tflite and restarted. Worked like a charm! Thanks for the awesome tutorial!!! Next steps learning to compile my own models.
@EdjeElectronics5 жыл бұрын
Awesome! I'm glad you were able to get it working, and thank you for the feedback! It looks like I have a mistake in my guide, I meant to rename the file to just "edgetpu.tflite", not "detect_edgetpu.tflite". I will change the guide to fix it! Training, converting, and compiling a TFLite model is quite the process! There's a lot of steps, but if you stick to it you should be able to get it all working. Please create an issue on the GitHub page (or comment here) if you run in to any problems following the guide!
@stephendoroff79495 жыл бұрын
@@EdjeElectronics Okay thanks!
@stephendoroff79495 жыл бұрын
I've successfully implemented transfer learning using classifier models like Resnet50, so I hopefully that will help with this process.
@stephendoroff79495 жыл бұрын
Just got this up and running!!! Just fantastic!! Had to uncomment some lines in the config.txt for my VGA monitor.
@nectaligironperdomo72195 жыл бұрын
could you help me with some bugs i'am having?
@stephendoroff79495 жыл бұрын
,@@nectaligironperdomo7219, What step did it bomb out on? Do you have and error messages?
@stephendoroff79495 жыл бұрын
any not and --- I used a Raspberry Pi 4 with 4gb ram