Raspberry Pi Object Detection Tutorial

preview_player
Показать описание
Here's how you can make your Raspberry Pi perform real-time object detection. It's a fun project and I hope you enjoy. Leave a comment if you have any questions or future video requests.

I may earn commission if you purchase from the links below:

0:00 Intro

0:43 Setup Raspberry Pi

ssh into your Pi or open a terminal on your pi
Update
sudo apt-get update
sudo apt-get upgrade -y

python3 -V
sudo -H python3 -m pip install virtualenv
mkdir project
cd project
python3 -m virtualenv env
source env/bin/activate

4:00 Install libraries
python3 -m pip install "picamera[array]"
python3 -m pip install tflite-runtime
python3
import tflite_runtime
tflite_runtime.__version__
# Both of the commands above should execute without errors
quit()

5:25 Install the example code
sudo apt-get install libatlas-base-dev

NOTE:

6:50 Testing!
Рекомендации по теме
Комментарии
Автор

Thank you thank you thank you so much sir... 🙏🙏🌹🌹
I was doing this object detection using raspberry Pi for my final year project. Because of you I have learned a new thing and saved my thousands of rupees... Again thank you sir... 🙏🌹

pratyushprajapati
Автор

great video!
thank you for teaching me how to implement object detection with my raspiberry 4.

tkqgigi
Автор

NICE!!! Thank you for this video!!!

At least we know that the raspberry has not become self-aware 😅

robertoguerra
Автор

Thank you so much for the video, pretty clear! However when I get to the final step after running python3 classify.pi I get errono 2 no such file in directory. Could anyone help me solving this?

miguelposada
Автор

I would like to perform object detection on a pi, and don't know if OpenCV or TensorFlow is the best tool. I want train the sw to detect any given object, and I also need an output that indicates the position, direction and (hopefully) speed of a moving object - a "follow me" or "follow a given object" feature. Any ideas or help would e appreciated. I'm a relative novice.

charleslinquist
Автор

can you please make a tutorial on training your own data using google colab?

calmrelaxangelicmusicph
Автор

I got to the end and it asked to install open cv2, so do I need to install that into the env?

gemininyte
Автор

I get an error in the end. Last command (python3 classify.py) starts but then stops and says "struct.error: unpack_from requires a buffer of at least 4 bytes". How to fix this?

matr
Автор

Very cool, is there a way to add a highlighted box around the object?

PCGamer-YT
Автор

Hi, I get following error when I try to install tflite-runtime using command "python3 -m pip install tflite-runtime"
ERROR: Could not find a version that satisfies the requirement tflite_runtime(from version: none)
ERROR: No matching distribution found for tflite_runtime

chaitanyavekaria
Автор

Thank you for you brief and precise tutorial ! LMS (France)

swat
Автор

Hi sir your tutorial was the one that worked after 3 days of finding. I wanted to know how to shutdown the video feed? And how can i get the boundries around the object? And how can we make it a standalone live feed system to a android phone or tablet? I mean i dont have to put the commands all the time. Thank you.

RETROGAME-FIX
Автор

hey this is so cool,
i have a question ... what if i take your code(python) and trying to connect it with oher devices using C programming ?

mohamedshoeib
Автор

Hi, i noticed that the video streaming of your Pi have 14 fps on it. I have tried installing Ultralytics YoloV8 on my Pi with the models also exported to NCNN. Now I also use a 720p webcam, however, my Pi can only give me 2fps max. I wonder if you were using a Google Coral USB Accelerator making it possible to reach 14fps for your stream. Did you? Or was it just the Raspberry Pi's power to deliver 14fps. Or does the brand of webcam even matters when it comes to fps? Would greatly appreciate a reply.

Thanks.

PS. I am using a Raspberry Pi 4B 8gb

gasiboi
Автор

Which algorithm is used for image classification in this tutorial?

sudhanshugorwadkar
Автор

really nice, it worked perfeclty with my raspberry pi3 model A. I was identified as a person an my face as a dog which is quite accurate.

SiriusFuenmayor
Автор

Couldn't get it to load numpy for pi camera array . That pretty much stopped me right there is there some numpy package not mentioned here that must be installed went on the third try wonder why the wonder years 😁

Ducerobot
Автор

do you have a guide in running yolov4 tiny on raspi

acmadianfaizalcasarungan
Автор

Can I stream this opencv object detection footage to a webpage?

sudhanshugorwadkar
Автор

Raise 0SError (port audio library not found) how do I fix this

sibiselvaraj