Introduction to object detection on Raspberry Pi

preview_player
Показать описание
In the first episode of Machine Learning for Raspberry Pi, learn how to download a pre-trained TensorFlow Lite object detection model and deploy it to your Raspberry Pi. This model can be used to recognize general objects such as an apple, a television, or a car.

00:00 Welcome to the Machine Learning for Raspberry Pi
00:12 What you’ll learn in this series
1:14 Get started running object detection
1:35 Download the latest version of Raspberry Pi OS (link below)
2:29 Connect a camera to Raspberry Pi
3:12 Setting up Raspberry Pi
3:42 Create a Python virtual environment
4:30 Clone the TensorFlow examples
5:45 Specific objects and faster speeds
6:16 A closer look at the code
9:34 What’s next

#TensorFlow #MachineLearning #ML #RaspberryPi

product: TensorFlow - TensorFlow Lite, TensorFlow - General; fullname: Khanh LeViet;
Рекомендации по теме
Комментарии
Автор

Guys if you want to detect specific objects use category_name_allowlist=['cat', 'dog'] in processor.Detector Options.

Ajey
Автор

Raspberry Pi is so useful. Thanks for this

innovationscode
Автор

I was able to install requirement.txt only with Python 3.7.12, but for the latest Pi OS which has Python 3.11.2 it's not working. Additional issue is that opencv not working with raspberry cameras so you actually can't realy test any of examples. One of proposed workaround to use picamera2 package (but unfortunatly, you cant install it in venv). Looking for the way to run object detection using latest version of python, opencv and TFlite... Any working axample would be highly appreciated!

IharRubanau
Автор

What is the Raspberry PI (RBP) model used in this example? Would it be the RBP 3B, RBP 3B+, RBP 4, RBP 5?

juliermearaujo
Автор

If anyone is having trouble setting up the label_allow_list thingy gor filtering out unwanted detections, you could try using category_label_allowlist instead

madnokof
Автор

All went well until the final command which did not launch the camera.. Does not seem to working with latest Bullseye

ttnownow
Автор

After I had the issue with Rasbian Bullseye and the new pi camera settings: Don't forget to enable Legacy Camera on your Raspberry! Otherwise, the example from this video won't work.

Dennis
Автор

Can it tell if an object is a hotdog or not hotdog?

notapplicable
Автор

Could TF be trained to determine wnd speed based on tree/branch/leaf movement?

Alpha_fitz
Автор

tried the example on raspberry pi 3, its breaking and displaying with error, "no attribute imageDataFree".What could be the problem

leonyamuronda
Автор

Hi, I get this error when running detect.py

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
Traceback (most recent call last):
File "/home/pi/examples/lite/examples/object_detection/raspberry_pi/detect.py", line 19, in <module>
import cv2
File "/home/pi/.pyenv/versions/3.7.0/lib/python3.7/site-packages/cv2/__init__.py", line 8, in <module>
from .cv2 import *
ImportError: numpy.core.multiarray failed to import

I have already tried upgrading opencv and numpy but they are latest version

loganmurray
Автор

One more thing. I also tried to test it with my Chromebook. Of course, I then get the error message regarding the camera ID. I'm not sure if it is a general problem to address a USB camera from the Linux container. There is obviously an open bug. But I might be wrong. If there is someone who has had success with a Chromebook and where there are instructions, I would be grateful for a hint.

TechCree
Автор

I want to glow led when car is detected what will the changes?

Satish_Lakhan
Автор

I am having a problem where the virtual machine is not being loaded it is saying that it needs the following arguments : ENV_DIR how do I fix it?

YNightmareT
Автор

Can this machine learning model capable of detecting texture of an object?

cheseewow
Автор

The code isn't the same is you showed in the video so how can I detect specific objects with the new code? What you told us dosnt work with the new code ☹️

Rmni
Автор

I have tested. It working but the camera was delay about 2-3 sec. How to fix this problem? system is PI4 8GB, HD camera.

atitjantapornsom
Автор

What about the pico? That is supported right? Can't have a Pi 4 for every little project.

anitamanchanda
Автор

Can we modify the code like the detected object are list or telling in headphones

saikumardhrmavarapu
Автор

Thank you for the information sir! Is it possible to run tensorflow object detection directly on a raspberry pi 3 without the TensorFlow lite?

yencytolentino