Hey everyone! There are two MAJOR updates that make this guide much easier: 1) Installing TensorFlow on the Pi is now much easier. Rather than downloading and installing the wheel file at the beginning of Step 2 of this video, you can simply issue "sudo apt-get install libatlas-base-dev" and then "pip3 install tensorflow" to install it. You still need to issue "sudo pip3 install pillow lxml jupyter matplotlib cython" and "sudo apt-get install python-tk" after installing TensorFlow. 2) You don't have to build protobuf from source anymore! In Step 4, simply use "sudo apt-get install protobuf-compiler". Now you can skip everything from 6:05 to 10:28 . Also, it seems opencv-python has one more package requirement now. In Step 3, when doing the apt-get commands, add "sudo apt-get libatlas-base-dev". This guide works on both the Raspberry Pi 3 and Raspberry Pi 4 (Raspbian Stretch and Raspbian Buster).
@sbhurke1
5 жыл бұрын
Can we achieve higher fps by using Raspberry Pi 4B if it is so what will be the maximum FPS for the same
@EdjeElectronics
5 жыл бұрын
@@sbhurke1 I just posted a video showing what the FPS is running TensorFlow (and TensorFlow Lite) object detection on the Pi 4. Check it out! kzitem.info/news/bejne/tZ-FsaqFq4t_fH4
@yummy9731
4 жыл бұрын
Does it work on pi zero
@experimental87
4 жыл бұрын
"pip3 install tensorflow" is installing a older version. Better to follow the video OR pip3 install tensorflow==1.14.0
@experimental87
4 жыл бұрын
Same issue with protoc, with "apt-get install protobuf-compiler" 3.0.0 was installed. The latest version as on 11/nov/19 is "3.10.1" . I had to remove all files and compile the latest version from source. So before you do pip3 install check for the latest version.
@EdjeElectronics
5 жыл бұрын
The pet detector video is out! I promise no cats or dogs were harmed during the making of this video (although they may have been slightly annoyed) 😺😺: kzitem.info/news/bejne/yH2nvIKrkqGdaaQ . Thanks everyone for being awesome viewers!
@11.นายธีรดนย์ยืนสกุล
5 жыл бұрын
Hi i want to know how to send signal digital to pin on rassberry pi when it find objects
@barskorkmaz8323
5 жыл бұрын
I can't thank you enough to explain everything step by step. Liked and subbed.
@RossRocks07
5 жыл бұрын
After two days and going though couple of errors, I finally got it working. Thank you for the tutorial, I learned a lot during this project.
@EdjeElectronics
5 жыл бұрын
Hi everybody! Two updates: 1) Installing TensorFlow on the Pi is now much easier. Rather than downloading and installing the wheel file at the beginning of Step 2 of this video, you can simply issue "sudo apt-get install libatlas-base-dev" and then "pip3 install tensorflow" to install it. You still need to issue "sudo pip3 install pillow lxml jupyter matplotlib cython" and "sudo apt-get install python-tk" after installing TensorFlow. 2) My Pet Detector Camera video is out! It provides an example of how to find the names of detected objects, determine their locations, and trigger actions if certain objects are detected. You can view it here: kzitem.info/news/bejne/yH2nvIKrkqGdaaQ Good luck with your projects!
@dominic8570
5 жыл бұрын
I followed the new way of installing tensorflow, the confirmation said that it was successful, it even installed all the dependencies like protobuf. But when I typed protoc, it said command not found.
@pndrw
5 жыл бұрын
For me 'type protoc' shows 'protoc is hashed (/usr/local/bin/protoc)'. Try: ls -la /usr/local/bin/protoc. If it's not there, you may have missed one of the protoc install commands.
@reiniervanleeuwen9815
5 жыл бұрын
Everything worked for me on Windows when training and running my self trained model. But not on my Raspberry Pi. This model you used here, does work on my Pi. Error im getting: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def graph._c_graph, serialized, options) # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'T' not in Op selected_indices:int32>; NodeDef: {{node Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/non_max_suppression/NonMaxSuppressionV3}} = NonMaxSuppressionV3[T=DT_FLOAT](Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/unstack, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Reshape, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/non_max_suppression/iou_threshold, Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/non_max_suppression/score_threshold). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). EDIT: I figured it out, just me being stupidos. i tried to run a 1.12 model on a 1.11 tensorflow installation...
@EdjeElectronics
5 жыл бұрын
@Reinier, thanks for letting us know about the resolution to your error!
@jonathongoodacre118
5 жыл бұрын
Hi, I'm having an issue after installation. when i run Object_detection-picamera.py Object detection.py, line 137 value error: cannot set WRITEABLE flag to True of this array Any ideas how to fix?
@DanialStreetFighter
5 жыл бұрын
I have been using your tutorials for the past 3 weeks and they have been really helpful. I just wanted to say thanks I really appreciate the work you have done.
@EdjeElectronics
5 жыл бұрын
Thanks man, I'm glad to know it has been useful! Good luck on your projects.
@DanialStreetFighter
5 жыл бұрын
Just a question in your best knowledge what is the fastest detection model that should be used for tensorflow on Raspbbery Pi. I am using ssdlite_mobilenet_v2_coco but the FPS is 1 or less and if it could be faster than this I would appreciate that. I have also looked for tensorflow-gpu version for Raspbbery Pi but I don't think it is supported as of now. @@EdjeElectronics
@EdjeElectronics
5 жыл бұрын
Hey all, I just tested this with my new Raspberry Pi 4, and it does work! It runs a little faster, too: I get about 2.1 FPS using the SSDLite-MobileNet model. However, you have to build OpenCV-Python manually rather than using "pip3 install opencv-python". This is because the new Rasbpian Buster OS only has Python 3.7 installed, and the opencv-python package available through pip still only has the Python 3.5 version. I think the 3.7 package will be available in a few weeks, once PiWheels gets around to uploading it. Until then, instead of doing Step 3 from my guide, you can follow this guide to build/install OpenCV: www.pyimagesearch.com/2018/09/26/install-opencv-4-on-your-raspberry-pi/ .
@samjithraj7467
5 жыл бұрын
Yes. I'm using Rasbpian buster. But in pyimagesearch tutorial, he mentioned the installation of opencv by using virtual environment , Any suggestion about installing Opencv without using Virtual environment.?
@EdjeElectronics
5 жыл бұрын
@@samjithraj7467 My recommendation is to NOT use a virtual environment. You can skip the parts where he talks about setting up the virtual environment. If you do use a virtual environment, you will have to make sure all the TensorFlow packages are installed in that environment too.
@samjithraj7467
5 жыл бұрын
@@EdjeElectronics I have installed opencv without using virtual environment, but getting error when i import cv2 that "No module named cv2". How to solve this issue ?
@buZztiaan
5 жыл бұрын
ah yes, python 3.7 is there now www.piwheels.org/simple/opencv-python/opencv_python-3.4.3.18-cp37-cp37m-linux_armv7l.whl
@Astronomy_Live
6 жыл бұрын
Thanks for the tutorial, I'm working on a project to install pi security cameras around my house and this should let me set it to send an alert to my phone if a person is detected on my property while I'm away.
@EdjeElectronics
4 жыл бұрын
Hey everyone, quick heads up: the newest release of OpenCV-Python doesn't work on the Raspberry Pi! Instead of using "pip3 install opencv-python" (which gets the newest version) in Step 3, use "pip3 install opencv-python==3.4.6.27". If you already installed it, just uninstall OpenCV using "pip3 uninstall opencv-python" and then install the older version using "pip3 install opencv-python==3.4.6.27".
@amirsalehi7722
4 жыл бұрын
Edje Electronics when I install tensorflow on raspberry pi zero it downloads 99 percent not 100 please help
@amirsalehi7722
4 жыл бұрын
Edje Electronics help
@roshanakrazzazian3428
4 жыл бұрын
EDJE Help please
@wissamBotros
4 жыл бұрын
many many thanks for the video and instructions guys, also for the great comments!
@TheBeatboxHitmanTwo
5 жыл бұрын
Man you should be a professor. You explain everything easily
@ShameerMohammed
5 жыл бұрын
Beautifully explained! I managed to get my detector running finally :) now for the part of optimizing the speed by moving to lite versions of tensorflow and yolo... Guys make sure you use a heatsink and a fan on the rpi... once that is done, next mission is to move to Intel NCS2...
@charliefarnsbarnable
6 жыл бұрын
Thanks for this, really helpful. Keep up the great content!
@prateekgaur1172
4 жыл бұрын
Can I build Currency recognition and giving output via speaker using raspberry pi I need to build this project sir please help
@luismontoyalara
4 жыл бұрын
hi @Prateek have you solve the output audio problem?
@Ashukr711
4 жыл бұрын
were you able to make it
@drewdsaunders
5 жыл бұрын
This is a great tutorial, well-explained and detailed. I built it and made it work, and -- to give you a hint to my noobie-ness -- I don't think I have ever successfully built ANYTHING from source before! Thanks. I have had in mind a "bus detector" project to get my kids involved (and to keep from driving them to school most days),; and this may put me over the really hard part of that project. If you have advice on tuning to get the software to pick up a bus (as opposed to a mug, ball, person... which it does extremely effectively!), please share. I haven't tried, yet. Cheers, Drew
@EdjeElectronics
5 жыл бұрын
Awesome, glad you were able to get it to work! I like the bus detector idea. You're right, the detection accuracy is pretty finicky. I think the easiest way would be to add code to make it so the program ignores other objects and only reacts if a bus is detected, see my other video ( kzitem.info/news/bejne/yH2nvIKrkqGdaaQ ) for an example of how to do that. You can also try training your own neural network that ONLY detects school buses, but that takes a lot more work (like at least a weekend or two if you're starting from scratch). I have a different video that shows how that works. It's getting a little outdated, so you might run in to errors. kzitem.info/news/bejne/s52mzJ9snoupfXY
@niteshbharadwaj2477
5 жыл бұрын
This is a great project , thank u Edje. I need a small help sir. I am doing a project for the visually impaired. And i need to send a audio output of whatever object is being detected. Pls can someone suggest me a way out of it. Thank u :)
@sikhallday
5 жыл бұрын
Hi, I am working on something similar and need to get an audio output aswell. Did you ever figure out how to get an audio response of what is being detected? Any help would be appreciated!
@programmingorion529
5 жыл бұрын
@@sikhallday HI GUYS MEE TOO WORKING ON SAME PRODUCT, LET'S MAKE THE PRODUCT SUCCESSFUL BY COMBINING TOGETHER, IF YOU GUYS ARE INTERESTED, DON'T HESITATE TO CONTACT ME. SEND YOUR WHAT'S APP NUMBER TO MY MAIL akashyanakandla29@gmail.com
@programmingorion529
5 жыл бұрын
Hi Nitesh,me too working on same product. SEND YOUR WHAT'S APP CONTACT NUMBER to my mail akashyanakandla29@gmail.com
@Lucas-ih8bv
6 жыл бұрын
thank a lot. your video tutorial will be really usefull for my incoming projects
@sivaprakashthiyagarajan9398
6 жыл бұрын
This is awesome. Worked like a charm. The best guide ever. Thank you and Keep contributing.
@SmartEngine-
6 жыл бұрын
pls help me!!! everytime i run this code my raspberrypi 3b rebooting all the time! i have no idea why?? pls help guys
@enricosaccheggiani3192
4 жыл бұрын
Thanks a lot . I set up the system on my Raspberry PI and it works after some little problems. all the best regards
@mohammedalshatri9728
5 жыл бұрын
hi I have a question how can I make the code to say in voice the detected objects thanks sir
@EdjeElectronics
5 жыл бұрын
Hello, take a look at this website, it shows several options for doing text-to-speech. pythonprogramminglanguage.com/text-to-speech/ . My Pet Detector video can show you how to get the names of the detected objects: kzitem.info/news/bejne/yH2nvIKrkqGdaaQ
@mohammedalshatri9728
5 жыл бұрын
@@EdjeElectronics Yes sir I have seen the website but the codes did not work because of that text file format in picamera code is pbtxt the file name is "mscoco_label_map.pbtxt"
@mohammedalshatri9728
5 жыл бұрын
I need your help please
@EdjeElectronics
5 жыл бұрын
@@mohammedalshatri9728 Look at the 'gTTS text to speech portion' of the page I linked. It shows you the code for getting it to say "Good morning". You just need to substitute "Good morning" with the name of the detected object. You can see how to find the name of detected objects in my Pet Detector video: kzitem.info/news/bejne/yH2nvIKrkqGdaaQ
@ricsanders69
5 жыл бұрын
If you are on a rpi3 you should be able to issue make -j4 to utilize all 4 cores...might speed up you compile time! :-D I'm going to try this project...looks fun!
@shayanbanik1418
5 жыл бұрын
Can u tell me how to reduce the number of classes? As I want to detect the human only..how to do that?
@EdjeElectronics
5 жыл бұрын
Thanks! I'm paranoid about using the -j4 option. I have had builds work just fine when using one core, but then fail when using all four cores.
@EdjeElectronics
5 жыл бұрын
Then again, I'm a hardware engineer. I'm paranoid about many things related to software :D
@espmcui2can405
5 жыл бұрын
In a second trial, it worked.
@annahy7491
4 жыл бұрын
Hi thank you so much for making this video. I was wondering how I could display the number of counted "person"s instead of displayed the frame rate?
@EdjeElectronics
4 жыл бұрын
You're welcome! That's definitely doable, but it will take some significant changes to the code, which I unfortunately don't have time to help with. You might get a better idea of how to do it if you watch my Pet Detector video, which explains how the "scores" and "classes" variables work, and how to do certain things (like increase a variable count) if certain objects are detected. Good luck! kzitem.info/news/bejne/yH2nvIKrkqGdaaQ
@kaisze941
5 жыл бұрын
Hey, thank you for your tutorial! I got this after i wan to start some object-detecting tensorflow.python.framework.errors_impl.NotFoundError: /home/pi/tensorflowl/models/research/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09/frozen_inference_graph.pb; No such file or directory How do I fix this? Thank you in advance for any help given!
@EdjeElectronics
5 жыл бұрын
See my response on Twitter! 😃
@ivantodorov267
5 жыл бұрын
@@EdjeElectronics can you please link the response for this Error, I've the same error
@EdjeElectronics
5 жыл бұрын
@@ivantodorov267 It looks like the frozen_inference_graph.pb file is missing. Did you download and unpack the SSDLite-MobileNet model as instructed at the end of Step 5?
@mahmoudalqannas9021
5 жыл бұрын
Thank you for this tutorial, I want to ask you question, how can I transfer the real time video to another computer for faster processing and then return result to raspberry pi.
@vesper1140
6 жыл бұрын
Wow this is some crazy timing, I'm sitting here trying to get this set up right now and what do I find? Thanks!
@christopherh7918
4 жыл бұрын
Great video. I am trying to send webcam video over my local network from the pi to a PC which should perform object detection and send the output stream back to the pi over the local network. I hope this will increase fps even after networking overhead. Do you have any tips or experience on how to implement that?
@MrWaffelXD
4 жыл бұрын
Somehow I get an error I dont understand by typing: "python3 Object_detection_picamera.py --usbcam" in "~/tensorflow1/models/research/object_detection". The error is: Traceback (most recent call last): File "Object_detection_picamera.py", line 23, in import cv2 File "/home/pi/.local/lib/python3.7/site-packages/cv2/__init__.py", line 3, in from .cv2 import * ImportError: /home/pi/.local/lib/python3.7/site-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8 I am using a clean installation of Raspbian Buster 10 on a pi3 b+. Had someone a simmilar issue and know where I made an error? As the next step im going to redo everything linke in the written gitub tutorial. Thanks
@EdjeElectronics
4 жыл бұрын
That's just because the newer versions of OpenCV still have errors. Try installing an older version using: pip3 install opencv-python==3.4.6.27 . Then, re-run the script. Hope that helps!
@MrWaffelXD
4 жыл бұрын
@@EdjeElectronics Thanks for your answer and excuse my very late reply. I will test it soon.
@alastairgamble9067
4 жыл бұрын
@@EdjeElectronics after doing this the initial error subsided and was replace with--> AttributeError: module 'tensorflow' has no attribute 'GraphDef'
@kwea123
6 жыл бұрын
If you want to achieve real time performance : 1. Use video streaming and compression instead of frame by frame processing (something like camera.start_recording(output, format='mjpeg'), search for the documentation); Note that the quality decreases of course, but not that much to human eyes. 2. Transfer the data to a server which has more computational power e.g. a desktop PC, do detection on that machine, then send the data back to rasp pi if necessary. Following the above steps it gives you an easy 30FPS (image size 960*720) on this ssd lite model. If you wanna run the detection on rasp pi only and expect real time performance, that is simply impossible... P.S. possibly you need ROS to accelerate/simplify the data transmission part
@ooizian6925
6 жыл бұрын
hi can provide a guide of that?
@kwea123
6 жыл бұрын
I can give you the code (assume you know how to install and use ROS www.ros.org/) github.com/kwea123/raspberry_pi3/blob/master/camera/camera_send_ros.py github.com/kwea123/ROS_notes/blob/master/beginner_tutorials/src/object_detection.py In short, 1. capture the video stream from raspberry pi and send to the desktop PC using ROS 2. do object detection on the desktop PC (equipped with a good GPU) Here's a video showing it in action kzitem.info/news/bejne/2WibmYSvs599lKA&t=822s Sorry it's in chinese, but you can see it detects not bad and has high FPS (detection time on the lower left, I'm also recording video so it's slower than usual)
@egeyuceel6809
5 жыл бұрын
Hi. During I execute the "make" command in the protobuf directory i get this error of "libtool: error: 'google/protobuf/compiler/csharp/csharp_generator.lo' is not a valid libtool object" I need your consultancy since I couldnt figure out what to do.
@allanreylayese5349
5 жыл бұрын
hi sir edje thank you so much i use this tutorial and it is working any recomendation or suggestion on how to improve the frame rate?
@EdjeElectronics
5 жыл бұрын
Hey Allanrey! Unfortunately, there aren't really any good ways to improve the frame rate. You can try looking into an Intel Modivius NCS (a USB device that increases processing power: kzitem.info/news/bejne/0W6lmGxqoHSEpKQ ), but they don't work with TensorFlow models.
@goldiemusic8394
4 жыл бұрын
I can't event think about the number of errors that I would run into by trying this.
@EdjeElectronics
4 жыл бұрын
Check the updated written guide, it's much less error-prone 😄 github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi
@siddhantsangal5298
5 жыл бұрын
Can I do all this in SSH? I do not have a spare monitor for my pi zero. Can I run this on a pi zero?
@CrayyyCrayyy
5 жыл бұрын
You just need to enable SSH on the Raspberry Pi and then know the IP address :)
@bebeee4439
4 жыл бұрын
Hey all, while executing the statement 'python3 Object_detection_picamera.py' in the last step (detecting objects) I got the following messages. Does anyone know what went wrong? Thanks a lot: pi@raspberrypi:~/tensorflow1/models/research/object_detection $ python3 Object_detection_picamera.py Traceback (most recent call last): File "Object_detection_picamera.py", line 23, in import cv2 File "/home/pi/.local/lib/python3.7/site-packages/cv2/__init__.py", line 3, in from .cv2 import * ImportError: /home/pi/.local/lib/python3.7/site-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8
@ЕвгенийПадалка-б3ь
4 жыл бұрын
same problem
@habibabassi9876
4 жыл бұрын
you have to install opencv version 3.4.6.27 and uninstall the one you installed pip3 install opencv-python==3.4.6.27
@bebeee4439
4 жыл бұрын
@@habibabassi9876 Hi Habib, thanks . I uninstalled opencv and installed the version 3.4.6.27. But I still get the same error.
@bebeee4439
4 жыл бұрын
@Beautiful Greece Thanks to you and @Habib Abassi ,it works. It's amazing :-)
@imaddadi8674
4 жыл бұрын
@Beautiful Greece thx...i did this and installed openCV 3.4.6.27,,,it works fine
@chrischi7044
4 жыл бұрын
Is it possible to photograph objects according to the direction of movement and to save the images differently depending on the direction?
@minhhoangle536
6 жыл бұрын
Cant wait to see next video
@nahidch8697
5 жыл бұрын
Thanks Bro. At least I have done This . 💚💛🧡
@niteshbharadwaj2477
5 жыл бұрын
is there any chance of getting the text as a voice feedback after the object is detected?? because i would like to use this as a project for the blind with detecting objects and hence alerting them with a voice feedback..
@henrikgripenberg
5 жыл бұрын
Nitesh Bharadwaj try integrating a text to speech library like so: pythonprogramminglanguage.com/text-to-speech/
@sikhallday
5 жыл бұрын
At the last step when trying to run the code to activate the camera, I get an error saying ImportError: No module named 'matplotlib' Any ideas what to do here? For step 2 I used the shortcut Edje Electronics mentioned in the comments by issuing "sudo apt-get install libatlas-base-dev" and then "pip3 install tensorflow" , I wonder if that has anything to do with it?
@acrippledmango
5 жыл бұрын
Use "pip3 install matplotlib" which at first did may not work but in error it mentions 2 other things to install which can be done using "sudo apt-get" followed by their respective names. Do "pip3 install matplotlib" again once you've installed the other parts and it should work
@sikhallday
5 жыл бұрын
@@acrippledmango Thank you man, that fixed the issue! I appreciate the help
@aminulislambaygid9191
5 жыл бұрын
@@sikhallday hey man it would be kind if you can please tell me in which directory the matplotlib is needed to be installed? and the other two things.
@Vigodewar117
4 жыл бұрын
at the end of testing the implementation "cpp", I have this: Ran 821 tests in 6.155s FAILED (failures=1, skipped=10) Test failed: error: Test failed: how can I fix it? or can I continue the steps of the video?
@MrYong910
5 жыл бұрын
You are good at explaining the video. Did you apply D435 to "TensorFlow Object Detection"?
@EdjeElectronics
5 жыл бұрын
Thanks! No I haven't, but I bet that would be a fun project.
@adilhossain227
4 жыл бұрын
for faster installation , use memory swap for faster performance
@reapergrim5324
6 жыл бұрын
Awesome guide here have a cookie !
@telelaci2
4 жыл бұрын
I think you should use OpenCV for this kind of object detection. Tensorflow supports HW GPU acceleration via CUDA. As far as I know only nVidia embedded boards have CUDA support, like Jetson TX1/2 or Jetson Nano. Other embedded boards usually support HW OpenCL and thats good for OpenCV. So I think Tensorflow is a silly selection for RPi you wanna use OpenCV with HW accelerated OpenCL support.
@Ashukr711
4 жыл бұрын
Hey can you please tell me is it possible to convert the detected object in to speech. That will help as i am trying to this as a final year project.
@henrikfogbunzel2224
4 жыл бұрын
I had tried installing libQtTest.so.4 and .cv2 in different ways. I still got the same error. I'm using python 2.7. Can it be because of that? And does i after need to goes through every steps again after? n_picamera.py Traceback (most recent call last): File "Object_detection_picamera.py", line 23, in import cv2 File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 3, in from .cv2 import * ImportError: libQtTest.so.4: cannot open shared object file: No such file or directory
Hi thanks for this tutorial, I am getting a error "ImportError: libImath-2_2.so.12: cannot open shared object file: No such file or directory". What could be the issue??
@ginaoh6120
6 жыл бұрын
Same here getting stuck here
@cesaraliaga6894
3 жыл бұрын
Hello! Great tutorial. Do you have a proyect that recognized when a person use a mask covid19 or no? I use raspnerry pi 3b model. Thank you
@YigalBZ
3 жыл бұрын
I am trying now to follow the guide. When installing the .WHL file, the PI reports error: .WHL is not a supported wheel on this platform. Any idea why? I am using PI 4, and tried latest version, as well as 1.8.0
@ViralFeedHD
6 жыл бұрын
please help me out im stuck at Traceback (most recent call last): File "Object_detection_picamera.py.2", line 23, in import cv2 File "/usr/local/lib/python3.5/dist-packages/cv2/__init__.py", line 3, in from .cv2 import * ImportError: libQtGui.so.4: cannot open shared object file: No such file or directory
@Osmanity
6 жыл бұрын
I had the same problem, Edje helped by saying the solution to the problem is to try use the command "sudo pip3 install opencv-python". Hope it was the solution:)
@ElderPimenta
6 жыл бұрын
Worked for me: sudo apt-get install libopencv-dev python-opencv
@GodzillazzZ
6 жыл бұрын
looking forward for new vid ++ thxs sir
@TheDemiteli
5 жыл бұрын
Hi, thanks for great tutorial i've manged to install evereything. And it is working! But at first I faced the problem of overheating (small termometer icon appeared on desktop and raspberry pi just hanged) when i run python3 Object_detection_picamera.py --usbcam (I use cheap usb camera). I've placed a cooler on top of pi and the problem with temperature was solved (no termometer icon anymore). But now Object_detection_picamera.py just hangs my Pi, after a minute or two of work. Can you advice me how can I debug the issue? I'm using Raspberry Pi 3B (without plus) and lateset Raspbian.
@blbl2u
5 жыл бұрын
How much memory is left on your sd card? Try issuing df -h in the terminal , maybe that's causing problems although unlikely... And maybe you need to download fwusb ( not v sure of the name) library so that usb camera runs well , tge library was mentioned in a previous comment it's for supporting external usb cameras . For me , it made the code ran perfectly after that , I only had problems when I tried to turn it off though .. I'm also using raspberry pi 3 B+ model
@blbl2u
5 жыл бұрын
fswebcam is the correct name Google it 👍
@pranavk1473
5 жыл бұрын
How to get the IM_width and IM_Height to get the co-ordinates ... i made a detector using tensorflow api in windows video of yours . Please anyone help me to get the co-ordinates . I tried this code , but it shoots me name error : IM_width is not defined .
@se_12341
5 жыл бұрын
I have some problems with line51 With the word utils, there is no module named that. Did I miss a step or something?
@himanshugupta7947
5 жыл бұрын
Can we convert the.. same output into speech using tts
@chiraagarunkumar5691
3 жыл бұрын
Excellent bro! Thank you so much
@TugaAlphaz
6 жыл бұрын
Hey! What do you think is best to detect playing cards? Your Open CV algorithm or your tensorflow model? Thanks in advance!
@EdjeElectronics
6 жыл бұрын
Hello, thanks for the good question! That's a tough one. The OpenCV algorithm is much more reliable and accurate than the TensorFlow model. However, it won't work if the cards or overlapped or if the cards are against a non-uniform background. Ultimately, I think the TensorFlow model is better because it provides much more flexibility in the application, and its accuracy can be improved by giving it more training data. Actually, I just finished training a YOLO model that works very well at identifying cards. I'll be posting a video on it this month! I based the work off this guy's excellent video, which shows just how good the machine learning model can be: kzitem.info/news/bejne/0aSk2qabsHphq5w . This is the approach I'll be using for my blackjack robot!
@TugaAlphaz
6 жыл бұрын
Thank you very much! Looking forward for the next video then ;) And thanks for your amazing content
@aavlasti
6 жыл бұрын
Very good tutorial!! Please continue your series :). When you will publish the tutorial that you talk about at the end of this video? It very interesting for me )
@h.m.ibtihalutsho8554
5 жыл бұрын
There is a problem in openCV installing. When i press "sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv41-dev" and Entered. Then, Program Notifying me that, "E: Unable to locate package libv41-dev" How can i solve this problem?
@EdjeElectronics
5 жыл бұрын
It’s “libv4l-dev” , not “libv41-dev” . That’s a lower-case L, not a 1. :)
@h.m.ibtihalutsho8554
5 жыл бұрын
@@EdjeElectronics, I have a problem in protobuf-3.7.0, when i entered the command "make" it took 30 minutes and then completed with 2 error. It notifying me that, "Google/protobuf/compiler/plugin.pb.lo" is not a valid libtool object." What Should i do?
@gabrielvoss6251
5 жыл бұрын
I just reflashed the SD card an restarted, now protocols is working@@h.m.ibtihalutsho8554
@vladcalin4008
4 жыл бұрын
Can I implement my custom object detection using Raspberry? Because you said that your previous video about object recognition is for Windows.
@EdjeElectronics
4 жыл бұрын
Yes you can! Please watch this video starting at 16:20 , it shows how to set up your custom object detection model on the Pi.
@vladcalin4008
4 жыл бұрын
Edje Electronics Thank you very much for your answer!
@kashishnaqvi5639
4 жыл бұрын
@@vladcalin4008 hey, were you able to do it?
@chitrasuki883
5 жыл бұрын
is there any ways to convert the text obtained in the box into speech ??
@focus_on_X
5 жыл бұрын
i tried using keras but the model save .h5 file and your example frozen inference graph. I need help.
@krishind99
5 жыл бұрын
WHat If I wish to use a plain image, instead of streaming from live camera?
@Cobrastarzz1
3 жыл бұрын
I'm getting this error when trying to run the code :( Traceback (most recent call last): File "Object_detection_picamera.py", line 82, in od_graph_def = tf.GraphDef() AttributeError: module 'tensorflow' has no attribute 'GraphDef'
@vineethvijayan9695
3 жыл бұрын
did you manage to solve this error ?
@johan4787
3 жыл бұрын
tf.compat.v1.GraphDef
@liniutze
5 жыл бұрын
Now that Raspbery Pi 4 B is out and is more powerfull, do you think we can use a better library from google ?
@EdjeElectronics
5 жыл бұрын
The Pi 4 doesn't have a GPU, so I think MobileNet-SSD will still be best for using on the Pi. Detection speed will definitely improve! But I don't think the Pi 4 will be powerful enough to run Faster-RCNN. Once my Pi 4 arrives, I'll post a video showing how fast detection runs compared to the Pi 3!
@niteshbharadwaj2477
5 жыл бұрын
import error : no module named 'matplotlib'.... pls fix this issue... it comes up in the very last step
@Erichartman0604
5 жыл бұрын
sir, please check your pip . try "pip show matplotlib" or "pip3 show matplotlib" if no information, try "pip install matplotlib"
@jorgearmandomanriquezcurap8991
5 жыл бұрын
@@Erichartman0604 I have this message when installing matplotlib : command python setup.py egg_info failed with error code 1 in /tmp/pip-build-huceduf4/matplotlib
@dominic8570
5 жыл бұрын
Hi, I'm planning to do a 360 degree object detection, utilising a ricoh theta camera using a raspberry pi and googles vision bonnet. Does the trainign using tensorflow still applies to this king of application?
@dominic8570
5 жыл бұрын
and also your video about changing the trained items to detect what ever it is i want to detect, that tutorial was on windows, does that also apply to the raspi ?
@EdjeElectronics
5 жыл бұрын
Hello! If you want to do this on imagery from a 360 degree camera, you will have to break each 360-degree frame into separate images and pass them individually into the object detection graph. It might work on the Raspberry Pi, but it would probably be very slow. To answer your second question, yes, you can use models that you trained on your Windows PC and put them on the Raspberry Pi. My explanation for how to do that starts at 16:20 in this video. Good luck with your project!
@dominic8570
5 жыл бұрын
@@EdjeElectronics thank you!☺️
@Ra753c
6 жыл бұрын
Hello! How should I zoom out the Object Detector screen?
@melannyfeliz5
5 жыл бұрын
Hey! I have a few questions, i am getting many errors while trying to follow the tutorial. 1) jupyter-console requires Python ‘>3.5’ but the running Python is 2.7.13. I already updated python 3.5.3 but it’s still running on the oldest version. I do not want to remove the oldest version because i’ve heard it might cause other problems with NOOBS. Do you have any suggestions?
@aidos9753
5 жыл бұрын
You can make a python virtual environment to isolate python 3.5 from your 2.7 install.
@loganlaw4833
4 жыл бұрын
is it possible to modify this to use a single picture instead of a continuous video feed, or taking a small video feed first and then feeding it into the program, for what I am trying to do I just need either a good picture or about 3 seconds of video feed to monitor.
@abhinayraj9145
5 жыл бұрын
hiii, Thanks for great Video.. i am geting error : Traceback (most recent call last): File "/home/pi/tensorflow1/models/research/object_detection/protos/Object_detection_picamera.py", line 27, in import tensorflow as tf ImportError: No module named 'tensorflow' please help me
@miguelangelluengotoledano7106
4 жыл бұрын
Hi everyone. Excellent tutorial. I desperately need help. I am following all the steps of the tutorial but when I try to train my own model I always get an error related to the tf.contrib library regardless of the version of tensorflow. Do I need to make any additional changes? I would greatly appreciate a help. (I have been using TF 1.14, TF 2.0 and TF 2.1 +Python 3.7.4 with the same result)
@markjasonong5668
5 жыл бұрын
Good Day @Edje Electronics ! I just want to ask if you can run frozen inference graph trained by using faster rcnn in raspberry pi 3 model B+? Hoping for your reply. Thank you sir 😊
@EdjeElectronics
5 жыл бұрын
Hi again Mark! Yes you can, but it runs very slowly (I tried it and had something like 0.20 FPS). I recommend using the SDDLite-MobileNet model. Make sure whichever version of TensorFlow you use to train the model matches the version of TensorFlow that you have installed on the Pi.
@markjasonong5668
5 жыл бұрын
@@EdjeElectronics ok sir thank you so much 😊
@dhruv.pandey93
5 жыл бұрын
For cost cutting purpose can I build object detection on Pi Zero W model?
@EdjeElectronics
5 жыл бұрын
I haven't tried that yet, so I don't know! If it does work on the Zero W, it will run EXTREMELY slowly.
@electricalengineer3048
6 жыл бұрын
Great Video, I wanted to ask, how to modify the python code to send an output result to phone or email based on number of inputs detected?
@EdjeElectronics
6 жыл бұрын
I will be posting the "pet detector" video in mid-November along with the code I use to do it. The code should help you see how to trigger an action (like sending email or text) when a certain number of objects are detected.
@electricalengineer3048
6 жыл бұрын
Thanx, can't wait!
@adarshgampa391
4 жыл бұрын
Traceback (most recent call last): File "Object_detection_picamera.py", line 23, in import cv2 File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 3, in from .cv2 import * ImportError: libQtTest.so.4: cannot open shared object file: No such file or directory i get this error when i execute the below command python3 Object_detection_picamera.py
@EdjeElectronics
4 жыл бұрын
I think this might be a problem with the latest release of OpenCV. Can you try using "pip3 install opencv-python==3.4.6.27" and then try re-running the script? Let me know if that works!
@montitivat283
4 жыл бұрын
@@EdjeElectronics I have the same problem as Adarsh then I use pip3 install opencv-python==3.4.6.27 as you say now it work, but give warning, but it work thank youuuuu
@adarshgampa391
4 жыл бұрын
@@EdjeElectronics it didnt work for me !
@annahy7491
4 жыл бұрын
That fixed my problem!!
@GordonTamf35
4 жыл бұрын
Hi, it didn't work and ingot the same error even I have installed the 3.4.6.27version of opencv
@niteshbharadwaj2477
5 жыл бұрын
in the code object_detection_picamera.py what is the variable that prints the name of the objects?
@EdjeElectronics
5 жыл бұрын
Hi Nitesh, please take a look at my Pet Detector video, which shows the variable that holds the names of the detected objects: kzitem.info/news/bejne/yH2nvIKrkqGdaaQ
@mmcfly85
5 жыл бұрын
if pip3 is not installed just do this. sudo apt-get install python3-pip
@uzmamhate1328
5 жыл бұрын
Hi, I am using this model and need to speak out the labels of the object detected. Since I am new to this, I have no idea of which variable to use to with espeak to speak out the label. Please help.
@EdjeElectronics
5 жыл бұрын
Hi Uzma, please take a look at my Pet Detector video. It shows how to get the class name for the top detected object, and shows which variable it is stored in. Good luck! kzitem.info/news/bejne/yH2nvIKrkqGdaaQ
@uzmamhate1328
5 жыл бұрын
Thank you for this video and for the help. I went through visualization_utils.py and made changes to print out the classes and implemented espeak. Thanks again and great job :)
@EdjeElectronics
5 жыл бұрын
@@uzmamhate1328 Awesome, glad you got it figured out! Good idea to change it in visualization_utils.py.
@niteshbharadwaj2477
5 жыл бұрын
hey? im working on the same thing. could u pls help me on what to change in this code?
@yadhuvirpk7329
5 жыл бұрын
@@uzmamhate1328 Hi, 1. Did u print the class name and used TTS or any other method 2.can u please share the changes u made in visualization_utils.py code to get the voice feedback of class names
@jetbrain9115
5 жыл бұрын
Best! Thanks!!!
@TPA22222
4 жыл бұрын
Hi I'm using Jupyter Lab on my headless Raspberry Pi and have been trying to stream the csi camera into a notebook with ipywidgets and am having no luck. Can you offer any advice? Thanks
@TuanAnh-lj1id
4 жыл бұрын
Hi!. I have 2 question: How to set up tensorfow object detection on jetson nano? AND How to auto run this code(in jetson nano ) when power up ? Thank you!
@kaiwalya_patil
6 жыл бұрын
Hello, thanks for this amazing video! 😍. But my pi reboots when i execute the command to start camera, please help! Nothing except the CMD is working while i execute the instruction.
@EdjeElectronics
6 жыл бұрын
Hello! I'm not sure why it's doing that :( . Do you mean it reboots when you issue "python3 Object_detection_picamera.py " ? Does it reboot right away, or does it freeze up for a while?
@kaiwalya_patil
6 жыл бұрын
Edje Electronics Yes, ut does freeze for a while. Some of instructions get executed and then all of a sudden it reboots!
@bmartinp
4 жыл бұрын
Are you able to run the model for a long period of time ? I try it and my pi crash after 3min. I used a raspberry Pi 3 model b and I have a heat sink.
@fathiiot_control4545
6 жыл бұрын
hello edje!. Your tutorial so clear. Can you teach me how to publish detection result to mqtt?
@EdjeElectronics
6 жыл бұрын
Thanks man! Sorry, I don't know much about MQTT, so I won't be able to help.
@fathiiot_control4545
6 жыл бұрын
Did u setup autorun after reboot?,.. i try with rc.local , bashrc n crontab .. but did't work
@muhammadsalehuddin2443
3 жыл бұрын
May i know if I trained my own model, did i need to use ssd mobile net model to train my dataset? I have use my frozen inference graph that have been trained using faster rcnn and the fps on the raspberry pi is very slow. Please enlighten me.
@shreevlogs8853
5 жыл бұрын
@Edje Electronics I'm trying to run this as an auto running python script. But when I try to run it as sudo python3 /home/pi/tensorflow1/model/research/object_detection/Object_detection_picamera.py I get the following error! File "/home/pi/tensorflow1/models/research/object_detection/Object_detection_picamera.py", line 46, in from utils import label_map_util File "/home/pi/tensorflow1/models/research/object_detection/utils/label_map_util.py", line 21, in from object_detection.protos import string_int_label_map_pb2 ImportError: No module named 'object_detection' Please help me on this asap! It works when I go that folder and run the file. TIA
@incharas2890
4 жыл бұрын
Hello! I'm unable to run the code. I've followed the same steps as told in the video. Is it mandatory to install opencv within the tf directory?
@robinrai341
6 жыл бұрын
I Wanna generate sound for the specific object is detected like a person among the several objects? how to do it?
@EdjeElectronics
6 жыл бұрын
Hello, here's a modified script I made for someone that uses my card model and plays a video when a 'jack' is detected, and plays another video when a 'queen' is detected: www.dropbox.com/s/xlpiup19vu8qqla/Object_detection_webcam_notification.py?dl=0 This code shows an example of how to trigger an action when a certain object is detected. You can use it play sound instead of a video. Google "python play sound" to see examples of how to play sound. Good luck!
@robinrai341
6 жыл бұрын
thank u so much because of your help i got success
@EdjeElectronics
6 жыл бұрын
Awesome, thanks for letting me know!
@dashrathchauhan282
4 жыл бұрын
can you tell me about software implementation
@11.นายธีรดนย์ยืนสกุล
5 жыл бұрын
ValueError: NodeDef mentions attr 'Truncate' not in Op y:DstT; attr=SrcT:type; attr=DstT:type>; NodeDef: ToFloat_3 = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.) someone can i help me
@thedemonlord9232
5 жыл бұрын
is there any way that you could set this up just for human detection? if yes could somebody explain it to me please?
@rhyzo1
5 жыл бұрын
take a look at his Pet Detector project, in there he mentions how he just picks up cats, change the ID he uses from cats to Humans.
@bruhpizza69
3 жыл бұрын
its a very helpfull video dude
@bruhpizza69
3 жыл бұрын
but i can find the speed up button
@peideasrepository7696
4 жыл бұрын
Hello. Can you share, How can I run multiple models e.g. Object detection --> then pose estimation --> and then some other model?
@MrSiciro
5 жыл бұрын
Grat tutorial thank you. Hopwever when using wget the coco models i get the follow regardless of which model i use 2019-02-16 19:03:27 (14.7 MB/s) - Read error at byte 5655576/51025348 (Connection reset by peer). Retrying.
@elainechong7
6 жыл бұрын
Thanks for your tutorial, but I have an issue: python3 Object_detection_picamera.py Traceback (most recent call last): File "Object_detection_picamera.py", line 51, in from utils import label_map_util ImportError: cannot import name 'label_map_util' Can you please tell me how can I solve it? Thank you very much
@EdjeElectronics
6 жыл бұрын
Did you set PYTHONPATH (as shown at 11:30 in the video)? Try entering "echo $PYTHONPATH" in the terminal and see if it responds with anything.
@alanbrumley
6 жыл бұрын
I had a similar issue. My problem was I didn't download the script object_detection_picamera.py into the ~/tensorflow1/models/research/object_detection/ directory. I had it in my home directory. It needs to be down in the research/object_detection directory so it can find the referenced functions.
@EdjeElectronics
6 жыл бұрын
Thanks Alan!
@bkstyles5769
5 жыл бұрын
Hi Edje, is there a way to use or deploy object or image recognition on in a video clip or in a movie for images recognition or object recognition or characters recognition in a video etc, rather than using real-time object detection via webcam, etc. please reply
@aidos9753
5 жыл бұрын
Yes, this is quite simple, you just point your script to the file path of your video instead of the webcam. (Change cv2.videocapture(0) to cv2.videocapture("filepath")
@caesar6207
4 жыл бұрын
hey, can anyone help me out? I need to have an audio feedback for the detected objects. Can you help? what do we require to do? and which part of the project will the code be added to?
@aliprog4060
4 жыл бұрын
hello, please did you get an answer to your question about the text to speech conversion ? if yes, please let me know. Thanks in advance.
@caesar6207
4 жыл бұрын
@@aliprog4060 hey yes, I did. Do you want any help?
@ZaidT
4 жыл бұрын
@@caesar6207 Hello, I want to achieve the same thing, any idea or guide on how to do it? It'd be really helpful
@ilhamakbar5791
6 жыл бұрын
hello edje electronics :) i have question, can i increase the fps in raspberry pi?
@EdjeElectronics
6 жыл бұрын
Hey Ilham! Unfortunately, the Pi is pretty weak, so it's difficult to get higher FPS out of it. The MobileNet model is one of the lightest-weight object detection models from TensorFlow, but it still doesn't run very fast. You can use a smaller image resolution (like 640x480), but even then it doesn't improve FPS much.
Hi!! Thank you for the video! but I have a problem with 'pip3 install tensorflow'... it said "is not a supported wheel on this platform." I tried to solve this but i can't. How can i solve this??
@GabitTolendiyev
5 жыл бұрын
안녕하세요~ 혹시 protobuf을 설치해 보셨나요?
@adiva-e7h
5 жыл бұрын
@@GabitTolendiyev 아니요ㅠ 들어가보니까 종류가 많은것 같은데 어떤걸 설치해야 하나요??
@GabitTolendiyev
5 жыл бұрын
@@adiva-e7h protobuf-all-3.8.0.tar.gz all와 tar.gz이 있는 걸 실치해야 히는데요. 그런데 저는 아직 못 하고 있어요. test 단계에서 error가 나왔어서요
Пікірлер: 1,2 М.