ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
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...
Crisp and clear. Good content.
Such an incredibly well made interesting video. Really good and useful.
90 % digikey ytb channel is shawn 😁
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?
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!
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.
Failed to fetch error
sudo apt -y install qt4-dev-tools libatlas-base-dev libhdf5-103
Love your videos❤️!! Keep them coming!
Can we use it for only detecting a specific object ?
I want to detect custom object ..what will be the changes.which file replace?
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'
I think that means you have not installed tensorflow correctly
tengo el mismo error
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!
Same issue. Please help!
@@911Kano got no help since
This video is exactly what I was looking for! Thank you!
Hey .Unable to sign- in into Google account(gmail account) on raspberry Pi 4....
Plz help...
tank you
i have an question.
please,can you tell me how i can use yolo model instead of ssd mobilenet?
Thank you! one problem: at 04:30, there is no such table of WHL files in the link. Perhaps it was changed? Help please.
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
After copying from the picture the path you provided (and not the one in the site) - I managed to pass this step
@@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+....
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?
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.
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
Can tflite model run on raspberry pi 2?
Great job, please keep making videos
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.
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.
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!!
This is great content! More like this please. :)
Fantastic ... I really learn from you ...
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!
Thanks, Great Video!!
Since the objects are detected, can you show how to convert it to speech in raspberry pi?
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!
I am facing the same problem did you got any solution for it if so do lmk
❤ the tutorial,
Can u provide information to run this model of tensorflow lite on sipeed M1n or on android phone.
Tensorflow running at? Fps
Hello everyone, I'm a beginner, at 1:53 how to save the .bashrc ?
Thanks again!
Cool project
great as usual!
It's saying "unable to locate package libjasper-dev"
I have the same problem did you ever sort this out if so how
sudo apt -y install qt4-dev-tools libatlas-base-dev libhdf5-103
it is not working and give error
@Shawn Hymel please se into it
Help! No module named cv2
im getting the same error, idk what to do about it
@@saadmunawar7920 I got it resolved, go back to the steps you might miss something that you type or copy-pasted.
FUCKING TENSORFLOW CHANGED THEIR SITE AND I CANT SEEM TO FIND OLDER VERSIONS BESIDE 2.5.0 PLEASE FUCKING HELP ME :'(
We'll, more like alphabet soup than object detection.