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




[ad_1]

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 https://github.com/tensorflow/models.git
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+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

Websites Used:
Sentdex YouTube Channel: https://www.youtube.com/user/sentdex
Official TensorFlow Github: https://github.com/tensorflow/models
My Object Detection Github: https://github.com/Bengemon825/TF_Object_Detection2020
Protoc download page: https://github.com/protocolbuffers/protobuf/releases/tag/v3.4.0
cv2 download page: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

Source


[ad_2]

Comment List

  • Lazy Tech
    December 23, 2020

    Hey, I had an error with installing pycocotools and your exact link didn't quite work, so if anybody else has this issue I used this command:

    > pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

    (I have conda running 32 bit Python 3.7.7 on my windows 10 machine)

  • Lazy Tech
    December 23, 2020

    how to degrade tensorflow version from 2 to 1.15.2
    pleasee help me

  • Lazy Tech
    December 23, 2020

    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

  • Lazy Tech
    December 23, 2020

    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.

  • Lazy Tech
    December 23, 2020

    "NameError: name 'category_index' is not defined", I am getting error on this

  • Lazy Tech
    December 23, 2020

    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?

  • Lazy Tech
    December 23, 2020

    ModuleNotFoundError: No module named 'tensorflow'
    ModuleNotFoundError: No module named 'cv2'
    how i can fix this?

  • Lazy Tech
    December 23, 2020

    cool lego colllection😍😍

  • Lazy Tech
    December 23, 2020

    I came across your video to write about my Youtube project. I will be doing Python object recognition, but there are some parts I get stuck with. Tensorflow .1.14 Can you help me with this? I'm bothering you please don't be sad

  • Lazy Tech
    December 23, 2020

    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.

  • Lazy Tech
    December 23, 2020

    26:13 nvm me just leaving a bookmark

  • Lazy Tech
    December 23, 2020

    I am using python 3.8 . Would that work or di i need older version ?

  • Lazy Tech
    December 23, 2020

    protoc object_detection/protos/*.proto –python_out=. nothing is showing after i enter this command. And yes i m in research directory

  • Lazy Tech
    December 23, 2020

    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.

  • Lazy Tech
    December 23, 2020

    I am Getting below error ,

    CalledProcessError: Command 'b'cd models/research/nprotoc object_detection/protos/*.proto –python_out=n'' returned non-zero exit status 4294967295.

    How to fix this?
    can anyone help.?

  • Lazy Tech
    December 23, 2020

    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

  • Lazy Tech
    December 23, 2020

    can you make videos on setting up tensorflow2 api object detection in local system. it will be very much helpful..
    Thanks

  • Lazy Tech
    December 23, 2020

    how can we set it for only person detection on the objet detection tutorial ?
    is a there a way without training

  • Lazy Tech
    December 23, 2020

    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

  • Lazy Tech
    December 23, 2020

    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?

  • Lazy Tech
    December 23, 2020

    when I do this 'pip install TensorFlow==1.15 ' I get tiil 3mb of download then I get a lot of red lines

  • Lazy Tech
    December 23, 2020

    Awesome tutorial! Thank you so much!

  • Lazy Tech
    December 23, 2020

    i keep getting the ModuleNotFoundError: No module named 'object_detection.utils'; 'object_detection' is not a package error :/ anyone else facing this problem (macOS)

  • Lazy Tech
    December 23, 2020

    Tfrecords gives the error I have only CPU how can I create the record file in colab .

  • Lazy Tech
    December 23, 2020

    Hey I am getting this problem:ImportError: Traceback (most recent call last):

    File "c:userspcanaconda3envsobjdetectlibsite-packagestensorflowpythonpywrap_tensorflow.py", line 64, in <module>

    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?

  • Lazy Tech
    December 23, 2020

    Hey, just want to say, this was great and super helpful! Thanks!

  • Lazy Tech
    December 23, 2020

    Hey I am unable to add my own images, I tried adding images to the test_image folder…plz help me out!

  • Lazy Tech
    December 23, 2020

    Awesome sir🔥🔥…. Is it faster than yolo

  • Lazy Tech
    December 23, 2020

    a great video by lazy tech

  • Lazy Tech
    December 23, 2020

    Not working for many reasong

  • Lazy Tech
    December 23, 2020

    I am getting error … please help me in resolving this %%bash

    cd models/research/

    protoc object_detection/protos/*.proto –python_out=.

  • Lazy Tech
    December 23, 2020

    Can you please send me the webcam_detection.py and the updated_old_example.py. I followed everything perfectly fine but I cant find those.

  • Lazy Tech
    December 23, 2020

    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?

  • Lazy Tech
    December 23, 2020

    Hi. I have error with third cell in Jupyter. Command 'b'cd models/research/nprotoc object_detection/protos/*.proto –python_out=.n'' 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?

  • Lazy Tech
    December 23, 2020

    Mohammed zahid

    Hey.. I am completed this video and build my own model ( on local machine ) can anyone tell me how to deploy this or build an REST API service ? something like this ??

  • Lazy Tech
    December 23, 2020

    can u please put the link for the colab notebook?

  • Lazy Tech
    December 23, 2020

    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

Write a comment