How to Install TensorFlow Object Detection in 2020 (Webcam and Images!)

  Рет қаралды 62,904

Lazy Tech

Lazy Tech

Күн бұрын

Hey guys welcome back, Ben again! Today i'm going through the process step by step to get Google's TensorFlow Object Detection API working in 2020. If you've ever tried to do this before you've most likely followed sentdex's tutorials. While they are great and I personally use them, the object detection series is out of date in some places so I made this video using all the tips and tricks i've learned trying to make his tutorial work.
I've seen people have problems with jupyter, pycocotools, computer vision 2, tf_slim, protobuf, and more. I made sure to include all the fixes i've personally done so that others can hopefully fix their installations also.
pycocotools fix - 14:07
Run object detection on your local computer - 16:14
Using a webcam - 21:11
Install cv2 - 22:06
Commands:
o pip install TensorFlow==1.15 lxml pillow matplotlib jupyter contextlib2 cython tf_slim
o git clone github.com/ten...
o protoc object_detection/protos/*.proto --python_out=.
o python setup.py build
o python setup.py install
o pip install pycocotools (or) pip install git+github.com/phi...^&subdirectory=PythonAPI
Websites Used:
Sentdex KZbin Channel: / sentdex
Official TensorFlow Github: github.com/ten...
My Object Detection Github: github.com/Ben...
Protoc download page: github.com/pro...
cv2 download page: www.lfd.uci.ed...

Пікірлер: 329
@LazyTech825
@LazyTech825 Жыл бұрын
I have a Tensorflow 2 tutorial out now! Check it out here: kzbin.info/www/bejne/qIPal5-piJtqpdk
@Lafontein
@Lafontein 3 жыл бұрын
For the people who get an error for the installing tensorflow , you need the create the environment with the "conda create -n myenv python=3.7". Because it is need this version of Python. It worked for me.
@muhsinmuhammed7200
@muhsinmuhammed7200 3 жыл бұрын
Tx mate, it works!
@atillaonder1527
@atillaonder1527 3 жыл бұрын
olur gibi oldu ama hala hata alıyorum, sen yapabildin mi?
@Lafontein
@Lafontein 3 жыл бұрын
@@atillaonder1527 Evet
@atillaonder1527
@atillaonder1527 3 жыл бұрын
@@Lafontein protoc kısmında kaldım, nasıl yaptığını hatırlıyor musun?
@rishikeshborse834
@rishikeshborse834 3 жыл бұрын
how do we do it
@deniszoican3242
@deniszoican3242 4 жыл бұрын
Awesome video! The savior for programmers that started learning Object Detection in 2020 :D
@LazyTech825
@LazyTech825 4 жыл бұрын
Thanks! I hoped for this video to be useful for people just starting out, wish someone else made this when I learned!
@theodorgiles8351
@theodorgiles8351 4 жыл бұрын
Thanks for this vid, by the way. Got your example running. Super awesome to see people updating such convoluted or outdated instructions.
@LazyTech825
@LazyTech825 4 жыл бұрын
Thanks! Hoped it would help
@saadmunawar7920
@saadmunawar7920 3 жыл бұрын
Hey, so at 6:38 when it comes to compiling protoc, I'm not getting that warning that you say is essential and I'm not really sure what to do. i have followed this video step by step up until that point, so I doubt I've missed anything before. its in the right environment as well. if you could help solve this issue, that would be great. thanks
@tiarakusumadewi2337
@tiarakusumadewi2337 3 жыл бұрын
I face the same problem.
@yourmommy3394
@yourmommy3394 3 жыл бұрын
I have exactly the same problem.
@retrohead
@retrohead 3 жыл бұрын
try this : go to the folder esearch\object_detection\protos then open the file input_reader.proto and add this line after the package command: import "object_detection/protos/image_resizer.proto"; including the quotation marks and the semicolon. fixed it for me.
@wmb9
@wmb9 3 жыл бұрын
@@retrohead THANK YOU!
@anirbanghosh6328
@anirbanghosh6328 3 жыл бұрын
@@retrohead Thank you, It works
@yufliu
@yufliu 4 жыл бұрын
Hey, just want to say, this was great and super helpful! Thanks!
@pokerfreerolldonkey5189
@pokerfreerolldonkey5189 4 жыл бұрын
I managed to train objects in Google Colabs but it's a PITA. Thanks for this, I'd much rather have it on my machine even though it's not as fast. There is now integration on Tensorflow 2 for Object detection. The process seems easier and better integrated but as I'm an Android/ Java developer I don't know how (yet!) to implement my own code. Hopefully with TF2 there is no conflicts which inevitably occur on TF1x. I skipped through the LabelImg video as I'm already past this stage but look forward to your third video in the series.
@LazyTech825
@LazyTech825 4 жыл бұрын
I’ll have to look into TF2, hopefully when I go over google collab training next time I can simplify the process! It took some time to learn how to setup but now I use it all the time since I don’t have a compatible gpu
@teetanrobotics5363
@teetanrobotics5363 3 жыл бұрын
Love the TensorFlow object detection playlist. please make more Deep learning computer vision videos.
@zachsmith8762
@zachsmith8762 4 жыл бұрын
/bin/bash: line 2: protoc: command not found I am getting this error and do not get the warning when I compile the protoc and I do have the protoc in the research folder. Is there any solution to this? Protoc version 3.4
@anthonygonsalvis121
@anthonygonsalvis121 4 жыл бұрын
I ran into the same issue but followed the presenter's instructions carefully and finally overcame this issue (now running into some new issues, however). (1) After copying/Git cloning/unzipping, be sure to move or copy manually or via cmd prompt (cp command) the protoc.exe file from the default 'bin' folder into the '../models/research' folder. (2) Then in the Anaconda Prompt window, when you're in that '..\models esearch' directory, run the protoc command again. It should work. Good luck. (My problem was a small typo!)
@alimagzari7656
@alimagzari7656 4 жыл бұрын
I'm getting the same error on Jupyter notebook. Did you find a solution? Thanks
@zachsmith8762
@zachsmith8762 4 жыл бұрын
@@alimagzari7656 yeah added .exe in the colab tutorial where it was failing... just was directing to the wrong path. Once u fix it there youre able to save it and continue on
@alimagzari7656
@alimagzari7656 4 жыл бұрын
@@zachsmith8762 could you please share the command line?
@sashaabashkin8452
@sashaabashkin8452 4 жыл бұрын
Hi. I have error with third cell in Jupyter. Command 'b'cd models/research/ protoc object_detection/protos/*.proto --python_out=. '' returned non-zero exit status 1. I ran same code in prompt and it did nothing visible, but still, didn`t raise any error. How can I fix it?
@samarth2915
@samarth2915 3 жыл бұрын
protoc is not showing that warning and i am in research folder can anyone help !!
@sukilsiva2724
@sukilsiva2724 4 жыл бұрын
Aww!!! this is what i have been searching for
@LazyTech825
@LazyTech825 4 жыл бұрын
That’s great to hear!
@tymofei8586
@tymofei8586 4 жыл бұрын
AWESOME ! TNX A LOT. There is a lot bugs and issues with tensorflow 2. And other libraries. Couldnt figure out how to do without stupid errors.
@hellhammervs
@hellhammervs 3 жыл бұрын
Awesome tutorial! I've been following it step by step, but when I get to the command python setup.py install, half way through it, it exits with a fatal errors, saying Math.h: no such file or directory. I've been struggling with it for a while and nothing works. 🙁 Any ideas?
@hellhammervs
@hellhammervs 3 жыл бұрын
If anyone is in the same situation, I finally managed to solve it by uninstalling and re-installing the Visual C++ 2015 build tools.
@ashishjha8630
@ashishjha8630 3 жыл бұрын
@@hellhammervs For anyone that is looking for the missing "setup.py" file that he builds and installs, it is as of writing this comment, located in the .../models/research/object_detection/packages/tf1 folder. Copy it into research folder and you should be able to continue with the guide.
@leafiadias96
@leafiadias96 3 жыл бұрын
@@ashishjha8630 thanks mate! works
@alechorth1337
@alechorth1337 2 жыл бұрын
@@ashishjha8630 thank you it solves it :)
@afriquemodel2375
@afriquemodel2375 2 жыл бұрын
hi
@padisalashanthan98
@padisalashanthan98 4 жыл бұрын
Hey, I am getting the below listed error: ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0) ERROR: No matching distribution found for TensorFlow==1.15 What do I have to do now?
@wojtekolejko3904
@wojtekolejko3904 4 жыл бұрын
I am not sure is it correct, but maybe you should try create virtual enviroment with parameter python==3.7. As I read, python 3.8 do not support tensorflow 1.x, so you should try with previous version. Actually it works for me.
@barsozkan63
@barsozkan63 4 жыл бұрын
u use python 3.8, delete lastest version and download 3.7
@rgbsirius
@rgbsirius 2 жыл бұрын
Hello there. I seem to face this problem on anaconda prompt regarding pip. " 'pip' is not recognized as an internal or external command, operable program or batch file." This is what it shows.
@renzrafal
@renzrafal 2 жыл бұрын
hello I have problem with the tensorflow models git. it seems the contents of it from when you created the video is not the same now (2021). please help
@krishdesai1097
@krishdesai1097 3 жыл бұрын
I added protoc in my research file but once I do the command it says command not found. What should I do?
@Felix-pj6fn
@Felix-pj6fn 3 жыл бұрын
You need to put the protoc.exe in this folder "C:\Users\URNAME\AppData\Local\Programs\Python\Scripts" (Replace the URNAME with your name)
@하진석-t6f
@하진석-t6f 3 жыл бұрын
Thank you for video. It is very helpful! I have a question about the model config file. In that file, there are some lines like eval_config, and eval_input_reader. Those eval means validation during the train? or test the model?
@cmdownloader7514
@cmdownloader7514 4 жыл бұрын
Thanks man, it's helped me a lot! Appreciate that.
@leonripa8028
@leonripa8028 2 жыл бұрын
had some open cv errors with the webcam, used pip uninstall opencv-python-headless pip uninstall opencv-python pip install opencv-python and this worked for me
@longzhong.8149
@longzhong.8149 3 жыл бұрын
from object_detection.protos import string_int_label_map_pb2 ModuleNotFoundError: No module named 'object_detection' what problem with above depiction😥
@nguyenangthang7473
@nguyenangthang7473 3 жыл бұрын
Hi, I'm following your project and accidentally ran into a problem. What version of python were you using in this video, may I ask?
@LazyTech825
@LazyTech825 3 жыл бұрын
python3.7
@t_doggames4065
@t_doggames4065 4 жыл бұрын
oh my gosh I was just having problems with this the other day when I was planning my heist for world domination. Lol
@saiashwalkaligotla6639
@saiashwalkaligotla6639 4 жыл бұрын
hello, I have 3 doubts 1)Is tensorflow 2.0 gpu version working for object detection. 2)Do we need to create different environments for different projects 3)In practice will the companies or some softwares use these architectures like faster rcnn , mobilnet and yolo etc or do they create their own from scratch neural networks layers . thanks in advance
@LazyTech825
@LazyTech825 4 жыл бұрын
1) TensorFlow 2 just added support for object detection (I should be making a video about it in the future) 2) You don't have to create new environments, but it might be a good idea to do so 3) I can't say for sure but it is most likely a mix of both. For example, in my next video coming out soon I show how to make our own dataset using one of the premade models which can save days of time for computation. There is nothing stopping you from making your own from scratch, but this is what most people do
@hadilal-sewaiee7676
@hadilal-sewaiee7676 3 жыл бұрын
I am in the process of installing the tensorflow API, but then what to do with this message that appears during the installiation "tf-models-official 2.4.0 has requirement tensorflow>=2.4.0, but you'll have tensorflow 1.15.0 which is incompatible." what should I do, any help please ?
@MrUnxpectable
@MrUnxpectable 4 жыл бұрын
Thanks alot this helped me alot for my project!!!
@No_one_knows_01
@No_one_knows_01 4 жыл бұрын
i have followed all the steps, but i m opening jupyter notebook in 'object', it shows 'kernel error'. how i can fix this?
@soniaaryan5160
@soniaaryan5160 3 жыл бұрын
At 10:28 I got jupyter is not recognised as internal or external command. What should I do now?
@farzanayasmin8496
@farzanayasmin8496 3 жыл бұрын
How can I find a protoc for windows 64 version? The protoc used in the video is for windows 32 version and I don't see a protoc for windows 64. How can I work with it? Need help.
@yourmommy3394
@yourmommy3394 3 жыл бұрын
The win32 version works both for win32 and win64.
@christianmoreno7390
@christianmoreno7390 2 жыл бұрын
Hey, hope all is well! when the api demo is ran on jupyter notebook, I receive this error for this line of code: code: (line 24 in api demo) model_name = 'ssd_mobilenet_v1_coco_2017_11_17' detection_model = load_model(model_name) error: ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental' (C:\Users\chris\AppData\Roaming\Python\Python37\site-packages\tensorflow\_api\v2\compat\v2\experimental\__init__.py) Can't find any solution. I've spent hours on this issue, any help is deeply appreciated, thanks!
@fatihelibol58
@fatihelibol58 3 жыл бұрын
Hello, I want to print the defined objects to the console. Which variable should I print? could you please help :(
@otakuguild5603
@otakuguild5603 3 жыл бұрын
protoc object_detection/protos/*.proto --python_out=. nothing is showing after i enter this command. And yes i m in research directory
@mishaalnaeem6135
@mishaalnaeem6135 3 жыл бұрын
did you find a solution? I'm having the same issue - I'm in research, the exe is pasted in it too, but im not getting anything show
@iskraracheva1455
@iskraracheva1455 3 жыл бұрын
@@mishaalnaeem6135 +1 :(
@atillaonder1527
@atillaonder1527 3 жыл бұрын
i have the same problem :/
@MBassa
@MBassa 3 жыл бұрын
same problem here. Did you already try this one:"Please check the research/object_detectio/protos/input_reader proto file.In here after the package line add the import “object_detection/protos/image_resizer.proto”; someone had deleted it from the original file.worked for me"?
@billybrian7785
@billybrian7785 3 жыл бұрын
@@MBassa Brooooo you da real MVP
@hamoudi4u
@hamoudi4u 4 жыл бұрын
Would u plz provide us with which python version u use? And some people says that it works only with anaconda 32 bit is that true?
@LazyTech825
@LazyTech825 4 жыл бұрын
I use python 3.7. I’ve been using the 64 bit just fine
@RobbieLikesACDC
@RobbieLikesACDC 4 жыл бұрын
@@LazyTech825 Im using thesame version but pip install TensorFlow==1.15 returns ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0) ERROR: No matching distribution found for TensorFlow==1.15
@TheCodyuzumaki
@TheCodyuzumaki 4 жыл бұрын
@@RobbieLikesACDC You are probably using python 3.8, who doesn't support TF 1.X. To fix your problem swap your python version to 3,7 through the command "conda install python=3.7.7 and try again
@ameyathavia4529
@ameyathavia4529 3 жыл бұрын
When i run the updated file i got this - "Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 " what does this mean any why am I getting this error?
@anirbanghosh6328
@anirbanghosh6328 3 жыл бұрын
Thank you it works perfectly
@1hecuteangel
@1hecuteangel 4 жыл бұрын
Your video is awesome and very helpful but i have a slight error while running the last bit of the object detection tutorial notebook. The error is that the 'autotrackable' object has no attribute 'output_shapes', I have tried searching for online help but ended up lost.. any help here?
@bor77
@bor77 3 жыл бұрын
same for me if you've solved it?
@1hecuteangel
@1hecuteangel 3 жыл бұрын
@@bor77 시간이 지나서 잘 기억이 안나지만 텐서플로우 버전 때문에 생긴 에러인것 같았어요.. ㅜㅜ 기억이 잘 안나네요
@granatapfel6661
@granatapfel6661 2 жыл бұрын
you need the updated file there errors in it. updated file is in an issue of github discussions
@adelinvaduva7832
@adelinvaduva7832 3 жыл бұрын
Something that I don't understand is that you said when an error occurs we should make sure we are in the folder x when we do that action but what if we already done the exact same thing that you said and still get the error?
@tunaozates
@tunaozates 4 жыл бұрын
When I run the imports cell, I got the following error, I tried a lot of tutorials and got same can you please help? ModuleNotFoundError: No module named 'tensorflow.python.tools'
@LazyTech825
@LazyTech825 4 жыл бұрын
Try this: pip install -upgrade pip pip uninstall tensorflow pip install tensorflow==1.15
@yarabanda9639
@yarabanda9639 4 жыл бұрын
@@LazyTech825 it gives me this error: No matching distribution found for tensorflow==1.15
@TheCodyuzumaki
@TheCodyuzumaki 4 жыл бұрын
@@yarabanda9639 That's probably because you're using python 3.8, and 1.15 is not supported there. To fix it you can swap to 3.7 version through this command: conda install python=3.7.7
@JeonYoonChang
@JeonYoonChang 3 жыл бұрын
thx for the videos. I follow your video all but I have some errors. when I run webcam.py, there is no webcam with no error message. Just end. And running updated an old example.py, outputs folder is still empty. How can I fix these problem?
@JeonYoonChang
@JeonYoonChang 3 жыл бұрын
I solve it! I was in wrong path! thx!
@otakuguild5603
@otakuguild5603 3 жыл бұрын
I am using python 3.8 . Would that work or di i need older version ?
@ivanayudith2419
@ivanayudith2419 2 жыл бұрын
Hey, Thankyou so much, but on my research folder, there's none of the item that named by setup.py, can you help me? thankyou so much~
@ScottPoirier
@ScottPoirier 2 жыл бұрын
setup .py file is in models/official/pip_package directory
@alejandromonsalvek.2014
@alejandromonsalvek.2014 2 жыл бұрын
@@ScottPoirier thanks !!
@Artecd
@Artecd 3 жыл бұрын
Hello How much fps on 1650 or 1660 or titan 6gb?)
@leaduckworth
@leaduckworth 2 жыл бұрын
In the jupyter file, when I click cell and run all I get the error NameError: name 'TEST_IMAGE_PATH' is not defined. Does anyone know how to fix this? I followed everything in the video so far
@hamdanmahmood346
@hamdanmahmood346 3 жыл бұрын
Thank you, this was incredibly helpful for my school project!
@nikitanelson9073
@nikitanelson9073 4 жыл бұрын
Hey I am getting this problem:ImportError: Traceback (most recent call last): File "c:\users\pc\anaconda3\envs\objdetect\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed: The specified module could not be found. when running the collab example How to solve this? Can i run tensorflow api without gpu?
@dhruvmanral8284
@dhruvmanral8284 4 жыл бұрын
yes, tensorflow api can be used using cpu....and try to find the version of tensorflow suitable for the version of python you are using..like tensorflow 2.2 or later require python3.8
@TheCodyuzumaki
@TheCodyuzumaki 4 жыл бұрын
Hi Ben! First of all, thank you for your videos. Facing the typical problems associated to older versions of nice tutorials like Sentdex ones is shit... I have one question: You've said that it's advisable to use the 1.15 Tensorflow version, but in the first notebook code cell you're installing Tensorflow 2.X, right? What's the point of installing 1.15 in conda env then? And in the next code cells you're executing again the command protoc object_detection/protos/*.proto --python_out=., that you had executed before in conda env, right? Is that necessary? Thank you ;)
@LazyTech825
@LazyTech825 4 жыл бұрын
I probably left the TF 2.x line in there by accident whoops. Google collab doesn’t care too much about versions so as long as it’s set to TensorFlow 1. I might’ve left that protoc line in there twice but we also have to run it on the collab
@TheCodyuzumaki
@TheCodyuzumaki 4 жыл бұрын
@@LazyTech825 Perfect, thanks for the answer ;)
@rishikeshborse834
@rishikeshborse834 3 жыл бұрын
ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0) ERROR: No matching distribution found for TensorFlow==1.15 i am getting this error can u please help
@alanhelfer1337
@alanhelfer1337 3 жыл бұрын
Downgrade your python version TensorFlow 2.0.0 -> pip install python==3.6.9
@anggafs
@anggafs 4 жыл бұрын
great tutorial ben. Many Thanks.
@elchinhuseynov1492
@elchinhuseynov1492 2 жыл бұрын
Thank you!
@cool_videos6016
@cool_videos6016 4 жыл бұрын
i am not able to download pycoco tools please provide the exact command here
@ondereser648
@ondereser648 4 жыл бұрын
pip install pycocotools-windows
@ondereser648
@ondereser648 4 жыл бұрын
this is for windows users
@jesseholliday3480
@jesseholliday3480 3 жыл бұрын
@@ondereser648 This worked for me!!! since I am a windows user
@aysebeyzaunal3472
@aysebeyzaunal3472 3 жыл бұрын
for the protoc my computer is 64 bit, can i use the one you download ?
@Fartcat6992
@Fartcat6992 2 жыл бұрын
yup! win32 supports x32 and x64 I believe
@imagedetectionyolo2987
@imagedetectionyolo2987 4 жыл бұрын
I am getting error ... please help me in resolving this %%bash cd models/research/ protoc object_detection/protos/*.proto --python_out=.
@koskoski66
@koskoski66 4 жыл бұрын
if you are using windows change for %%cmd
@22draynor
@22draynor 3 жыл бұрын
@@koskoski66 This comment needs to be higher. I definitely overlooked this for several hours!
@mayukhmajumdar2640
@mayukhmajumdar2640 3 жыл бұрын
Thank you for the video. Excellent. Is there a way to export the detected objects to an excel format. I tried a few solutions available online but not working.
@arkgupta1555
@arkgupta1555 3 жыл бұрын
Hi, I've been getting an error while installing the TensorFlow, the error is : ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 (from versions: none) ERROR: No matching distribution found for TensorFlow==1.15
@arkgupta1555
@arkgupta1555 3 жыл бұрын
I don't know why I'm getting this error but it is been happening for other versions also. Please help
@thibautlehmann221
@thibautlehmann221 3 жыл бұрын
​@@arkgupta1555 Hello, make sure to have python 3.7 before installing tensorflow, write this in anaconda (in your environment) : conda install python=3.7.0
@arkgupta1555
@arkgupta1555 3 жыл бұрын
@@thibautlehmann221, right now I have python 3.9
@trickycloud2193
@trickycloud2193 3 жыл бұрын
you can check with version 1.14 instead using 1.15
@LazyTech825
@LazyTech825 3 жыл бұрын
make sure you're using python 3.7
@fengzhang9052
@fengzhang9052 4 жыл бұрын
I like your video so much. Thank you for your work! Can you please also talk about Mac? I am stuck on the pycocotools installation :(. I use pip install git+@t^&subdirectory=PythonAPI The message shows error is in the log file names
@LazyTech825
@LazyTech825 4 жыл бұрын
Unfortunately I do not know the process for Mac. If the command i provided did not work try this one: pip install git+github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
@hazwanhelmy9686
@hazwanhelmy9686 3 жыл бұрын
excuse me sir, does Esp 32 Cam also can apply to this?
@farzanayasmin8496
@farzanayasmin8496 3 жыл бұрын
I'm getting the following error while running the updated_old_example.py (I have installed all the packages): Traceback (most recent call last): File "C:/Users/Student/OneDrive - University Of Houston/Object-detection/models/research/object_detection/updated_old_example.py", line 15, in from utils import label_map_util File "C:\Users\Student\OneDrive - University Of Houston\Object-detection\models esearch\object_detection\utils\label_map_util.py", line 29, in from object_detection.protos import string_int_label_map_pb2 ModuleNotFoundError: No module named 'object_detection' How can this issue be solved?
@juancarlossalazarvaca7080
@juancarlossalazarvaca7080 3 жыл бұрын
solved... run this in your enviroment project python setup.py build python setup.py install
@umarsethi8980
@umarsethi8980 4 жыл бұрын
hay. i appreciate your effort but this video is confusing. you 1st installed ft1.15 after this in tutorial jupyter notebook in 1st cell there is command to install tf2 so you run whole notebook and you are installing tf2 can you elaborate this? Moreover, tf1.5 unable to run tutorial notebook bcz its crating issues while loading weights i also posted error on your github repository. thanks
@LazyTech825
@LazyTech825 4 жыл бұрын
I dont see where it installs tensorflow 2, if it is in there somewhere that it my mistake it should be using 1.15. Collab doesn't use specific version numbers, so saying 1.15 will switch it to 1.x.x mode
@umarsethi8980
@umarsethi8980 4 жыл бұрын
@@LazyTech825 check 1st cell in your jupyter notebook where you can see pip install tensorflow==2*
@kathrinkajderowicz134
@kathrinkajderowicz134 4 жыл бұрын
Worked great! Thanks a lot
@kellymac353
@kellymac353 3 жыл бұрын
@F O R E M A N yes!
@nithink94
@nithink94 3 жыл бұрын
Can you help me to count the number of objects in an image?? is there anything that I can modify in the present code?
@GauravSingh-ku5xy
@GauravSingh-ku5xy 3 жыл бұрын
Thanks for the tutorial. But I'm getting an error when I run the file "updated_old_example.py". The error is: ValueError: Protocol message StringIntLabelMapItem has no field frequency. I have no idea what this means. I'd like some guidance here.
@anthonygonsalvis121
@anthonygonsalvis121 4 жыл бұрын
PLEASE HELP! Getting tripped by the following bash command in the TF's updated Notebook. I'm a newbie at this. Please dumb it down for me. Thank you in advance. I'm using the object_detection_tutorial model that's currently available on TF's Github. I do have the protoc.exe in the 'research' directory as suggested in the video. %%bash cd models/research/ protoc object_detection/protos/*.proto --python_out=. /bin/bash: line 2: protoc: command not found (followed by several lines of source code traceback, and a final error message...) CalledProcessError: Command 'b'cd models/research/ protoc object_detection/protos/*.proto --python_out=. '' returned non-zero exit status 127.
@alimagzari7656
@alimagzari7656 4 жыл бұрын
I'm getting the same error on Jupyter notebook. Did you find a solution? Thanks
@mohitthorat288
@mohitthorat288 4 жыл бұрын
Hello, I ran the python script from python IDLE(I don't use pycharm.). I got the error ModuleNotFoundError: No module named 'object_detection' Does your virtual environment of 'object' has anything to do with this? Please help. Thanks.
@LazyTech825
@LazyTech825 4 жыл бұрын
No, the way I did it with pycharm was set the project directory at a higher folder than the object_detection folder. Doing this makes sure the scripts can find the correct imports
@tanmaydeshpande2409
@tanmaydeshpande2409 4 жыл бұрын
Hey i have got a question. What is the reason for creating new environments ? Like for using tensorflow, i was suggested to create new environment for it.Here, as well, for OBJECT_DETECTION, we have created a new environment. Now i know that creating environment will create a parallel space and we can work on that specific space for our application.How does it affect the memory and what would happen if we work on these applications on the BASE environment? Also, pycocotools installation is giving while installing. ERROR: Conflicting types I have created a separate environment for Tensorflow. Any idea about it ??
@LazyTech825
@LazyTech825 4 жыл бұрын
You create new environments when you use a collection of libraries or packages that don’t play nice with others (TensorFlow). Doing it on base would just be the same thing as using a normal cmd as it’s not separated from anything. The pycocotools error can be based on mixed package versions, make sure you’re using TensorFlow 1.15
@tanmaydeshpande2409
@tanmaydeshpande2409 4 жыл бұрын
@@LazyTech825 Ok I tried to download Tensorflow 1.15 but pip is redirecting to download Tensorflow 2.1.0 Any thing you can suggest for this?
@LazyTech825
@LazyTech825 4 жыл бұрын
Make sure you're using python 3.7, 3.8 wont allow tensorflow 1.x.x. Make sure you use : pip install tensorflow==1.15
@lowqchannel
@lowqchannel 4 жыл бұрын
what the difference of tensorflow and yolo
@LazyTech825
@LazyTech825 4 жыл бұрын
Yolo is another object detection api that generally uses darknet. TensorFlow is a google api which has an object detection api
@lowqchannel
@lowqchannel 4 жыл бұрын
@@LazyTech825 thank u for the feedback. Im absolute beginner. I dont have much ideas of many things in the video. Like whats the software used to edit the code, what must be installed and y are they chosen. Is there any video by you that start from scratch? Thanks
@LazyTech825
@LazyTech825 4 жыл бұрын
At the beginning of the video I talk about the software I’m using. Many of the packages you install are needed by the scripts that run the object detection. I don’t think I would be able to go over all of them as I myself don’t know what they all do in depth
@sharanrabinsonmohanraj6230
@sharanrabinsonmohanraj6230 3 жыл бұрын
How can I modify this code to print the particular class....if I have human, dogs and cat in my data set..... I want only the human to be displayed
@tipveyapayogrenme8064
@tipveyapayogrenme8064 3 жыл бұрын
dude when i clicking the object_detection/colab_tutorials/object_detection_tutorial.ipynb I get an 500 : Internal Server Error. WHY this happening ı don't know.
@alimagzari7656
@alimagzari7656 4 жыл бұрын
Hello everyone, I keep getting the follwoing error on Junyper notebook "/usr/bin/bash: line 2: protoc: command not found". What should I do? Thank you
@sashaabashkin8452
@sashaabashkin8452 4 жыл бұрын
Did you fix it?
@alimagzari7656
@alimagzari7656 4 жыл бұрын
@@sashaabashkin8452 Yesterday, I put the protoc.exe file in C:\Users\LENOVO\AppData\Local\Programs\Python\Python36\Scripts folder, and it worked. But today, it didn't. Try it and let me know if it works for you.
@sashaabashkin8452
@sashaabashkin8452 4 жыл бұрын
@@alimagzari7656 I didn`t have such problem. Code from colab tutorial raised strange error, and i thought that we have something common. I ran scripts, that Ben published, in PyCharm and it worked even with error in colab tutorial code.
@alimagzari7656
@alimagzari7656 4 жыл бұрын
@@sashaabashkin8452 I had other others while running the colab tutorial as well, such as "ModuleNotFoundError: No module named 'utils' ". So I just run Ben's script from the command prompt and it worked.
@pavinlimpotong9141
@pavinlimpotong9141 3 жыл бұрын
Hello, I download the protoc file and copy and paste the protoc.exe from the bin file to the research file. However, when I run the "protoc object_detection/protos/*.proto --python_out=." in the anaconda prompt, I couldn't get it to compile at all. Anybody else face the same problem? Please help asap.
@wilfrieddefotsing257
@wilfrieddefotsing257 2 жыл бұрын
can i use mobilenetv2 as the model ? not the ssd version
@LazyTech825
@LazyTech825 Жыл бұрын
Yes
@TenForceFalls
@TenForceFalls 4 жыл бұрын
I am getting a error saying ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 (from versions: none)
@LazyTech825
@LazyTech825 4 жыл бұрын
Make sure you're on a compatible version of python, try using 3.7
@saishashi9978
@saishashi9978 2 жыл бұрын
unable to get warning message while running protoc object_detection/protos/*.proto --python_out=. can you please guide
@LazyTech825
@LazyTech825 Жыл бұрын
Check out my newest video where this is fixed
@saishashi9978
@saishashi9978 Жыл бұрын
@@LazyTech825 sure!
@andihaki
@andihaki 3 жыл бұрын
any tutorial how to detect keypoint (face landmark) not only bounding box? thank you
@alejandro.l.alonso
@alejandro.l.alonso 4 жыл бұрын
what can i do if kernel starting, please wait...... when i enter to jupyter to run the object detection api demo¿?
@abishekrajpurohits1638
@abishekrajpurohits1638 3 жыл бұрын
guys for the protoc command there is no necessity of the warning. if your files in protos folder gets the python file that means the command has been executed
@redaabouzid2753
@redaabouzid2753 3 жыл бұрын
Hello sir, Please i want to build a model for extract the data from card-id using key-pair values please advice me how i can do that
@ayahassan8682
@ayahassan8682 2 жыл бұрын
python setup.py build python: can't open file 'C:\Tensorflow\models esearch\setup.py': [Errno 2] No such file or directory I still can't find this file after installing proctoc
@ScottPoirier
@ScottPoirier 2 жыл бұрын
setup.py is in \models\official\pip_package directory
@myprojectsmade6079
@myprojectsmade6079 3 жыл бұрын
thank you u helped a lot
@ErikBlueGuitar
@ErikBlueGuitar 3 жыл бұрын
Where do I find the updated_old_example.py?
@arnavmehta3669
@arnavmehta3669 4 жыл бұрын
Awesome sir🔥🔥.... Is it faster than yolo
@emilio4961
@emilio4961 4 жыл бұрын
Hi, can I make it detect only one object that I want and if I can how can I do that (custom data set).
@emilio4961
@emilio4961 4 жыл бұрын
using the webcam (live)
@LazyTech825
@LazyTech825 4 жыл бұрын
Yes you can do that! I will be making a tutorial soon on how we can make a custom model
@emilio4961
@emilio4961 4 жыл бұрын
Lazy Tech alright thanks
@anthonygonsalvis121
@anthonygonsalvis121 4 жыл бұрын
Running into ImportError with utils functions using Ben's .py file. Executing Ben's .py file using Anaconda's Spyder IDE. Using Python 3.7 64-bit version and the Python 3.7 Environment Variable. All dependencies are successfully installed in the virtual environment. protoc command executed successfully (didn't get any errors). Getting the following error for the line "from utils import label_map_util" ImportError: cannot import name 'label_map_util' from 'utils' (C:\ProgramData\Anaconda3\lib\site-packages\utils\__init__.py) Tried changing directory to .../object_detection/utils and making corresponding code changes per stackoverflow, etc. But no matter what I do, the error doesn't go away. Very frustrating to keep stumbling right out of the gate...
@loryhoof
@loryhoof 3 жыл бұрын
You got it fixed?
@neuron8186
@neuron8186 3 жыл бұрын
and next day he goes skateboarding with his bottle
@mohammedabed7900
@mohammedabed7900 4 жыл бұрын
when I run the generate_tfrecord.py I get this error: File "C:/Users/user/Desktop/Task6_custom-object-detection/generate_tfrecord.py", line 20, in from object_detection.utils import dataset_util ModuleNotFoundError: No module named 'object_detection' Is there a solution for this thing? everything works will thanks to you, but I am stuck here. Also, the same problem occurs on Google Colab
@LazyTech825
@LazyTech825 4 жыл бұрын
make sure you've built and installed setup.py, this usually fixes that error. If you still get problems try moving this script into research and run it from there
@mohammedabed7900
@mohammedabed7900 4 жыл бұрын
@@LazyTech825 Is there a way to run it on Google Colab ? cuz it is a disaster running it locally
@LazyTech825
@LazyTech825 4 жыл бұрын
@@mohammedabed7900 Yes! I actually just made a video about it today!
@dineshpramanik2571
@dineshpramanik2571 4 жыл бұрын
@@LazyTech825 I am getting same error even followed the above steps.
@michaeltenoyo2749
@michaeltenoyo2749 3 жыл бұрын
If you are using PyCharm, make sure you use the correct environment that you made, in case you might have other env than this one in the video.
@colinsutter6982
@colinsutter6982 4 жыл бұрын
"pip install opencv-python" to install cv2 you do not have to install the wheel file
@LazyTech825
@LazyTech825 4 жыл бұрын
Sometimes this works, sometimes it doesn’t - give it a try!
@sonoda7723
@sonoda7723 4 жыл бұрын
thank you, I had problems with the wheel file but this worked out easily
@krishnagandhi4296
@krishnagandhi4296 3 жыл бұрын
"NameError: name 'category_index' is not defined", I am getting error on this
@rishikeshborse834
@rishikeshborse834 3 жыл бұрын
ERROR: Could not find a version that satisfies the requirement TensorFlow==1.15 ERROR: No matching distribution found for TensorFlow==1.15 I am getting this error some one please help
@mattvale1
@mattvale1 3 жыл бұрын
same here
@kys1721
@kys1721 3 жыл бұрын
do you use anaconda or python because I had the error when I used python
@rishikeshborse834
@rishikeshborse834 3 жыл бұрын
@@kys1721 yes
@kys1721
@kys1721 3 жыл бұрын
@@rishikeshborse834 I would recommend you create a virtual env in anaconda and use this command in it conda install -c conda-forge tensorflow-gpu or this if you cant use the gpu conda install -c conda-forge tensorflow
@ovnd6825
@ovnd6825 4 жыл бұрын
i keep getting the ModuleNotFoundError: No module named 'object_detection.utils'; 'object_detection' is not a package error :/ anyone else facing this problem (macOS)
@devgaur5955
@devgaur5955 3 жыл бұрын
Yes, facing the same issue. Got any fix for this one ?
@harshbhatnagar2386
@harshbhatnagar2386 4 жыл бұрын
Tfrecords gives the error I have only CPU how can I create the record file in colab .
@sohailali5741
@sohailali5741 4 жыл бұрын
Great tutorial. Can you please make video on evaluation metrics of object detection?
@aysebeyzaunal3472
@aysebeyzaunal3472 3 жыл бұрын
ı cant download the protocols !! it made a cache error what can ı do?
@IdeeFixeGamer
@IdeeFixeGamer 4 жыл бұрын
Will this work for tensorflow 2 still?
@LazyTech825
@LazyTech825 4 жыл бұрын
I haven’t had the chance to look into TensorFlow 2 yet so I can not say for sure. However, I believe much of it is the same except for the content covered in my third video. I will make an update video about TensorFlow 2 in the future
@IdeeFixeGamer
@IdeeFixeGamer 4 жыл бұрын
@@LazyTech825 would much appreciate thank you.
@waitwhat3547
@waitwhat3547 4 жыл бұрын
I actually did this before using sentdex's tutorial and it worked like 1 year ago Now I tried to do this again, no anaconda python : 3.5 tensorflow version: 1.15 tensorflow gpu with CUDA and cuDNN = 1.15 protoc version : libprotoc 3.4.0 protobuf version : 3.13.0 did everything but I don't get any warning for : protoc object_detection/protos/*.proto --python_out=. as a matter of fact I dont get any output at all this is what i get D:\Tensorflow\models esearch>protoc object_detection/protos/*.proto --python_out=. D:\Tensorflow\models esearch> anyways I went on ahead with your tutorial and at In[5] Imports I got a huge error
@chathurafernando3026
@chathurafernando3026 4 жыл бұрын
Please check the research/object_detectio/protos/input_reader proto file.In here after the package line add the import “object_detection/protos/image_resizer.proto”; someone had deleted it from the original file.worked for me
@waitwhat3547
@waitwhat3547 4 жыл бұрын
@@chathurafernando3026 I guess you are right because older version of protoc worked for me
@pogchmp
@pogchmp 4 жыл бұрын
I keep getting this error. modulenotfounderror: no module named 'object_detection.utils'; 'object_detection' is not a package please help. I did the setup.py build/install. Even the protoc means. But its still there
@LazyTech825
@LazyTech825 4 жыл бұрын
make sure that your project directory is set to be above the object_detection folder
@peterzhou224
@peterzhou224 4 жыл бұрын
@@LazyTech825 by project directory do you mean the webcam_detection script ? and how can we set it above? really appreciated if you could answer!
@kemfes5263
@kemfes5263 4 жыл бұрын
replace imports to: from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util
@548latino
@548latino 3 жыл бұрын
@@LazyTech825 I realize that it's a shot in the dark for you to respond, but when I set the directory to the folder above object detection I get errors saying that some of the dependencies (tf-slim, pycoco tools, and lvis) aren't satisfied, even though they were installed as per the instructions of the video.
@mehtabbandesha5637
@mehtabbandesha5637 3 жыл бұрын
ERROR: python: can't open file 'setup.py': [Errno 2] No such file or directory cant see any setup.py file in the research folder Please advise, thank you
@Hackyourtechnologyy
@Hackyourtechnologyy 2 жыл бұрын
same
@chadarabit1398
@chadarabit1398 2 жыл бұрын
@@Hackyourtechnologyy same, did you solve it?
@junkmatrix
@junkmatrix 3 жыл бұрын
Hi Ben, this was very useful. Mucho appreciato. Any chance you can post the written document you were referring to, at 6:25 mark?
@puterailham7112
@puterailham7112 3 жыл бұрын
Does anyone knows how to change the model detection name? Cos I can't seem to be able to.
@p0ngzzznea780
@p0ngzzznea780 3 жыл бұрын
Thano you for video . But I cant find setup.py file in researh folder how can i fix it?
@kshitijvijayvergiya8785
@kshitijvijayvergiya8785 3 жыл бұрын
Same problem here. The research folder doesn't contain the same files as shown in video. Hey if you found anything related kindly inform me too.
@Hackyourtechnologyy
@Hackyourtechnologyy 2 жыл бұрын
@@kshitijvijayvergiya8785 have you solved this problem?
@aydinaltun3816
@aydinaltun3816 3 жыл бұрын
how can we set it for only person detection on the objet detection tutorial ? is a there a way without training
@nevzattanver8879
@nevzattanver8879 3 жыл бұрын
You can print the result on the screen only when person is detected. You need to determine the ID of the person for your model, generally it is 1. Go to your code and you can add something like this while (output_dict['detection_classes'][0] == 1) . . . Your program will determine only humans, im my project i would like to determine only cell phones so mine was while (output_dict['detection_classes'][0] == 77). I have a code, if you desire i can share mine.
@nevzattanver8879
@nevzattanver8879 3 жыл бұрын
Go to your models folder and make a windows search like .pbtxt(which is labelmap) and find your models IDs.
@aydinaltun3816
@aydinaltun3816 3 жыл бұрын
@@nevzattanver8879 valla hocam paylaşsan super olur
@nevzattanver8879
@nevzattanver8879 3 жыл бұрын
@@aydinaltun3816 while (output_dict['detection_classes'][0] == 77)://77 cep telefonlarının id si fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('helallen.avi', fourcc, 10.0, (640, 480)) cv2.destroyAllWindows() while True: print('%d',counter) ret, image_np = cap.read() # Expand dimensions since the model expects images to have shape: [1, None, None, 3] image_np_expanded = np.expand_dims(image_np, axis=0) # Actual detection. output_dict = run_inference_for_single_image(image_np, detection_graph) # Constant Rectangular cv2.rectangle(image_np, (80, 80), (600, 400), (0, 0, 255), 3) # Visualization of the results of a detection. vis_util.visualize_boxes_and_labels_on_image_array( image_np, output_dict['detection_boxes'], output_dict['detection_classes'], output_dict['detection_scores'], category_index, instance_masks=output_dict.get('detection_masks'), use_normalized_coordinates=True, line_thickness=8) out.write(image_np) cv2.imshow('Kilitlenme', image_np) counter=counter-1 if cv2.waitKey(1) & 0xFF == ord('q'): cv2.destroyAllWindows() break if counter < 0: cv2.destroyAllWindows() break Kod bildiğimiz tutorial kodu, ben sadece 77 ile ifledim, kamera telefon tespit edince 4 sn kadar video kaydı alıyor, counter=40 yapıp while ile 0 a inene kadar kayıt aldım, time kütüphaneleri ile de yapabilirmişim ama o zamanlar amatördüm. Kodun geri kalanı tensorflowun sitesindeki ile aynı ben sadece mantığını göstermek için paylaşıyorum
@aydinaltun3816
@aydinaltun3816 3 жыл бұрын
@@nevzattanver8879 tesekkürler hocam
How to Install Tensorflow 2 Object Detection
26:33
Lazy Tech
Рет қаралды 36 М.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 115 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 10 МЛН
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
MP3 CDs: a hybrid "format" that never existed, yet was surprisingly common
34:18
Technology Connections
Рет қаралды 496 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 719 М.
YOLOv8: Real-Time Object Detection with Webcam
15:22
Nicolai Nielsen
Рет қаралды 112 М.
"The Life & Death of htmx" by Alexander Petros at Big Sky Dev Con 2024
23:01
Montana Programmers
Рет қаралды 63 М.
How A Steam Bug Deleted Someone’s Entire PC
11:49
Kevin Fang
Рет қаралды 1 МЛН
When you Accidentally Compromise every CPU on Earth
15:59
Daniel Boctor
Рет қаралды 858 М.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 115 МЛН