Hey everyone! I recently updated the written version of this guide to work with TensorFlow versions up to 1.13.1. If you are encountering errors following this video, please check out the guide and make sure you are using the most up-to-date commands. Here are answers to some common questions: - Where is the train.py file? The train.py file is now located in the /object_detection/legacy folder. You can copy it to the /object_detection folder and use it as normal. - Images aren't appearing when testing the Jupyter notebook, even though there were no errors? Try this: go in to object_detection/utils/visualization_utils.py and comment out the import statements on line 25 and 26 that include matplotlib. Then, re-run the script. - Can I run this just using CPU and not GPU? (Yes, just use "pip install tensorflow" instead of "pip install tensorflow-gpu".) - How to resolve errors related to _pb2 files? See Step 2f of the guide linked below. Check out the guide at github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 !
Thanks for the update! I managed to get through 90% of the tutorial a week and a half ago and couldnt figure out what the heck went wrong on the final stretch. Will give it another shot!
I followed the instructions in your tutorial but I'm having this error in jupyter when running object_detection_tutorial. No idea how to solve it as the import instructions are already there... i.imgur.com/wp5rtFO.png
13:38 -> you will find the setup.py in the slim folder copy that into research folder 13:59 -> Object_detection_tutorial.ipynb - Is located in the "object_detection\colab_tutorials" for anyone who can't find it 24:19 -> according to fixed comments, train.py file is now located in the /object_detection/legacy folder. fpn_pb2 -> protoc --python_out=. .\object_detection\protos\fpn.proto center_net_pb2 - > protoc --python_out=. .\object_detection\protos\center_net.proto official -> pip install tf-models-official etc... ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ If these error were found, I think you should start again from the beginning
weeks on the search for a good start tutorial that doesn't have 50+ parts and this is where I land. One of the best clear and concise tutorial/introduction video I've seen so far! Keep it up!!
Here are the issues that have been found so far with this tutorial: - TensorFlow moved the train.py file used in Step 6 to the "legacy" folder inside the /object_detection folder. You can still use it by moving it back into the /object_detection folder. - If the images aren't appearing in Jupyter notebook at the end of Step 2, try going in to object_detection/utils/visualization_utils.py and comment out both the import statements at the top that include matplotlib. Then, try re-running the Jupyter notebook. - Starting at 21:41, I say to change the num_classes variable to 6, but I accidentally changed it to 36. It should be 6. (Thanks Rafael!) - Google may add more .proto files to the object_detection/protos folder, so it may be necessary to add more files to the "protoc" command at 13:13. You can do this by adding ".\object_detection\protos\FILENAME.proto" to the end of the long command string for each new file. (Thanks exnaruto1!) - When running the "python train.py" command, if you get an error that says "TypeError: __init__() got an unexpected keyword argument 'dct_method'.", then remove the "dct_method=dct_method" argument from line 110 of the object_detection/data_decoders/tf_example_decoder.py file. (Thanks Evpatoria!) - When running "python train.py", if you get an error saying "google.protobuf.text_format.ParseError: 110:25 : Expected string but found: '“' ", try re-typing the quotation marks around each of the filepaths. If you copied the filepaths over from my GitHub tutorial, the quotation marks sometimes copy over as a different character type, and TensorFlow doesn't like that. - For train.py, if you get an error saying "TypeError: Expected int32, got range(0, 3) of type 'range' instead.", it is likely an issue with the learning_schedules.py file. In the \object_detection\utils\learning_schedules.py file, change line 153 from "tf.constant(range(num_boundaries), dtype=tf.int32)," to "tf.constant(list(range(num_boundaries)), dtype=tf.int32),". - If you are still getting an error complaining about "Expected int32, got range(0, 3)" or something similar, try implementing this fix: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11 Please let me know if you see any more errors with the video or with the commands/instructions from my GitHub repository!
This is a great tutorial, thanks for making it. I think I found a small error at 12:01 (th-cam.com/video/Rgpfk6eYxJA/w-d-xo.html) when you're setting the PATH variable, I think the line should read: SET PATH=%PATH%;%PYTHONPATH% or else it won't add the value of the PYTHONPATH variable to the PATH, it'll just add the string PYTHONPATH. If it still works, maybe you don't need to modify the PATH at all, just the PYTHONPATH?
Hmm, I tested it out, and you're right! You only need to set the PYTHONPATH variable; you don't need to make any changes to PATH. I thought adding "PYTHONPATH" to PATH added the variable itself, not just a "PYTHONPATH" string. I'm not very familiar with environment variables :)
WEBCAM VIDEO LAG ISSUE! I have trained my own object classifier using your method with the webcam, the classification is perfect, but I'm facing an issue with the real-time video feed, ie the video lags a lot. Can you please help me this issue? Thank you.
Hey all, I just uploaded a new video showing how to train TensorFlow object detection models inside your web browser with Google Colab. It's much easier than trying to follow this video! Check it out here: th-cam.com/video/XZ7FYAMCc4M/w-d-xo.html
You deserve a lot of credit for making this video. There are many tensorflow/machine learning tutorials online but few that really show you this detailed from getting started to creating your model and training it.
For those who have been stuck with choosing versions of software and modules to use, this is my additional suggestion. I am using Windows 10 pro. - Installing Anaconda: I chose the last version of anaconda released in 2018 which supports python 3.7.1. Technically, you can use the latest released version. - Python version: 3.7.1 - Tensorflow ver 1.13.1 goes along with its Github commit: github.com/tensorflow/models/tree/r1.13.0 - NumPy version 1.16.4 - pandas version 1.1.5 - Matplotlib version 3.0 For the rest, I just follow the author's instructions and the support from other guys here. Thanks a lot.
a shortcut while labelling the images is to make use of w - to start capturing the area (selecting) d- to move to the next image also , auto save your work
This is the exact explanation that I needed it about how the training process gets "stored" with the 5 minutes checkpoints by tensorflow. I'll try to replicate this in a Mac environment and then somewhere in the cloud. Thanks for this video, you rocks!
For those of you looking for the new zoo model link: github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md The Jupyter notebook is now in: C:\tensorflow1\models esearch\object_detection\colab_tutorials Update: I got the project to working.. what you guys should really do is: Clone the git repository and then switch to the branch version of the video, this way you guys will have the same directory structure as shown in the video.
@@GarethBolton you should only do this if you're having trouble following the tutorial for file directories.. because these are the new locations of the model and the notebook. You can look at the guideline in the GitHub repo if you're doing everything right and the images don't show up.
So, for anyone who is trying to use this tutorial in january 2020, with a ton of help I've finally made it to work out. Here's how: For Tensorflow-GPU: Download and install NVIDIA CUDA 10.0 Download cuDNN 7.4.2 for CUDA 10.0 -> open archieve and navigate to the 'bin' folder -> extract the only dll file from there to the CUDA v10.0/bin directory Your Tensorflow-GPU is ready to work! If you want to use Tensorflow-CPU ignore the steps from above Next: Download the latest version of models from the github repo linked in the description Download the faster_rcnn_inception archieve and extract it into the models/research/object_detection Download the Object-Detector API from the repo and extract it's files into models/research/object_detection Inside models/research/object_detection delete the inference_graph folder content, as well as the 2 csv files from images and the content of the training folder Open an Anaconda Command prompt and create a virtual env: C:\>conda create -n tensorflow1 pip python=3.6.10 //the 3.6.10 version its working with my overall setup C:\>activate tensorflow1 (tensorflow1) C:\>pip install tensorflow-gpu==1.13.1 //the 1.13.1 version is working as well (tensorflow1) C:\> conda install -c anaconda protobuf (tensorflow1) C:\> pip install pillow (tensorflow1) C:\> pip install lxml (tensorflow1) C:\> pip install Cython (tensorflow1) C:\> pip install contextlib2 (tensorflow1) C:\> pip install jupyter (tensorflow1) C:\> pip install matplotlib (tensorflow1) C:\> pip install pandas (tensorflow1) C:\> pip install opencv-python now uninstall numpy: (tensorflow1) C:\> pip uninstall numpy (tensorflow1) C:\> pip install numpy==1.16.4 //the 1.16.4 v is working (tensorflow1) C:\> set PYTHONPATH=C:\tensorflow1\models;C:\tensorflow1\models esearch;C:\tensorflow1\models esearch\slim (tensorflow1) C:\> cd C:\tensorflow1\models esearch NOW very important: open a file manager and navigate to tensorflow1/models/research/object_detection and search for the "protos" folder. Inside this folder you'll see a bunch of .proto files -> you need to make a .pb2 file instance for every single .proto file. DO NOT USE the long command from the written tutorial (protoc --python_out=. .\object_detection\protos\anchor_generator.proto .\object_detection\protos\argmax_matcher.proto......) Instead, look up for the first .proto file u see inside this folder and write the next command: (tensorflow1) C:\>protoc --python_out=. .\object_detection\protos\file_name.proto Repeat this command for every file you see inside the folder untill you make sure that every single .proto file has a .pb2 copy (it takes some time but it's the way to go) Next: (tensorflow1) C:\tensorflow1\models esearch> python setup.py build (tensorflow1) C:\tensorflow1\models esearch> python setup.py install BEFORE RUNNING THE JUPYTER COMMAND download the models file for version 1.7 from github -> open the archieve and search for /research/object_detection/object_detection_tutorial.ipynb -> extract that specific file into YOUR ACTUAL MODEL and replace it's own object_detection_tutorial.ipynb (otherwise it will mess your tensorflow version) Also, I'm not sure if this whole jupyter step is necessary since I'm still having an import error and the images are not showing, but it's still working out. Next: (tensorflow1) C:\tensorflow1\models esearch\object_detection> python xml_to_csv.py Then, generate the TFRecord files by issuing these commands from the \object_detection folder: python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record python generate_tfrecord.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record Do the labelmap thing just as in the tutorial, it's nothing to explain here !! Make sure to modify those specific lines inside the config file just as in the written tutorial And now you can run the training : python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Hope it works ! Let me know if it is woking for any of you ! Have a good day!
Hi, I'm trying to download the research models (/research/object_detection/object_detection_tutorial.ipynb) from version 1.7 from github, but the research models for all non-current versions were removed?
@@getlost1997 Here is the link for 1.7 models: github.com/tensorflow/models/tree/adfd5a3aca41638aa9fb297c5095f33d64446d8f Just download this and replace the object_detection_tutorial.ipynb file in the newest model.
To everyone having issues with tensorflow 'app' or tensorflow 'contrib' . You need to downgrade your tensorflow version to 1.14. Using tensorflow 2.0 onwards doesn't work. even if you use compat.v1, since 'contrib' was completely removed from tf 2. EDIT: for those of you wondering how to do this, go into terminal and activate tensorflow1 environment pip uninstall tensorflow Wait for it to uninstall pip install tensorflow-gpu==1.14 Wait for it to install and you should be good to go. Be aware that you will have to download the correct versions of CUDA and CUDNN
@@TheAndre2131 Yes, it's Traceback (most recent call last): File "model_main.py", line 26, in from object_detection import model_lib File "/home/pi/tensorflowgit/Tensordatensatz/models/research/object_detection/model_lib.py", line 27, in from object_detection import eval_util File "/home/pi/tensorflowgit/Tensordatensatz/models/research/object_detection/eval_util.py", line 40, in slim = tf.contrib.slim File "/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/util/lazy_loader.py", line 62, in __getattr__ module = self._load() File "/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/util/lazy_loader.py", line 45, in _load module = importlib.import_module(self.__name__) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'tensorflow.contrib' Do you have any idea what's causing the error o0 ?
@@petermeier6501 well. Firstly, it's not recommended to use model main.py but instead to use test.py from the legacy folder. Moreover you shouldn't be getting this error if you're using tf1.x could you check if you're in the Correct environement and uninstall and reinstall tensorflow Just in case
@@TheAndre2131thanks for the suggestions :), using the train.py file in the legacy folder or reinstalling tf unfortunately didn't do the trick. Trying other models and tf versions now.
thanks for this tutorial, was looking for something exactly like this, other videos don't go into details like, just skip here and there bam already trained data and detecting, i wanted to know how it looks like from start to finish cuz it was hard just trying to grasp text tutorials.
Thanks! If you run into issues while working through the guide, be sure to check my written guide. It has small updates for newer versions of TensorFlow (my pinned comment on this video also shows what the updates are): github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
For Tensorflow 2.0 use following command to upgrade generate_tfrecord.py on anaconda promt tf_upgrade_v2 --infile generate_tfrecord.py --outfile generate_tfrecord_new.py Also in line 23 replace # flags = tf.app.flags flags = tf.compat.v1.flags
@@badcode8037 Make sure you use the correct file, generate_tfrecord_new.py, when you run the command(python generate_tfrecord_new.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record). Otherwise you will get the same error again.
Hello, here are some tips on what helped me run this model. It includes the versions of the packages that i installed aswell as some notes on how to work arround the steps 1 and 2 of the GitHub manual. I have yet to try and run it with my own personal images so don't expect automatic results... NAME OF MY CONDA ENV: tf1.13 GPU: nvidia quadro k620 VERSIONS: cudnn 7.3.1 cuda 10.0_0 tensorflow-gpu 1.13.1 tensorflow-estimator 1.13.0 tensorflow 1.13.1 pip 10.0.1 protobuf 3.6.0 python 3.5 pillow 7.0.0 lxml 4.4.2 cython 0.29.15 contextlib2 0.6.0.post1 jupyter 1.0.0 jupyter-client 6.0.0 jupyter-console 6.1.0 jupyter-core 4.6.3 matplotlib 3.0.3 pandas 0.25.3 opencv-python 4.2.0.32 INSTALLING: pip install --ignore-installed --upgrade tensorflow==1.13.1 conda install -c anaconda cudnn==7.3.1 -> equivalent to 7.4 CHECKING: conda list NAMEOFPACKAGE SET PATHS: set PYTHONPATH=C:\tf1.13\models;C:\tf1.13\models esearch;C:\tf1.13\models esearch\slim CHECKING: echo %PYTHONPATH% PROTOBUF COMMAND EXCEPTIONS: REMOVED FROM ORIGINAL \object_detection\protos\calibration.proto . -> DOES NOT EXIST WITH TF1.13 \object_detection\protos\flexible_grid_anchor_generator.proto. -> DOES NOT EXIST WITH TF1.13 SETUP BUILD: cd C:\tf1.13\models esearch python setup.py build python setup.py install EXECUTE LOCALHOST DEMO: cd C:\tf1.13\models esearch\object_detection jupyter notebook object_detection_tutorial.ipynb LINKS: TENSORFLOW / PYTHON / CUDA / CUDNN - VERSIONS : www.tensorflow.org/install/source#tested_build_configurations PREBUILT MODELS: github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md ssd -> low CPU MAIN PROJECT: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#1-install-anaconda-cuda-and-cudnn I also ran into some DLL problems when executing the jupyter notebook because my Python folder had two. It only took removing one of them to work... I hope this helps you!
These settings seem to work for me : Tensorflow 1.13.1 Tensorflow-gpu 1.15 Cuda version 10.0 *Important* : From tensorflow model github repo, Only clone from the branch "r1.13.0" otherwise it will not work
@@renakiravtuber first i install tensorflow with this command : pip install tensorflow==1.13.1 --ignore-installed and then i installed tensorflow-gpu with this command : pip install tensorflow-gpu==1.15 notice that i didn't put --ignore-installed in tensorflow-gpu as it messes up all the packages for tensorflow 1.13.1
@@renakiravtuber I used cuda version 10.0 and cudnn v7.6.5 for cuda 10.0 Make sure to update your graphic card driver to the latest version I have this gpu : 920MX (for laptop)
This is the old tutorial using TF 1.x, for Tensorflow 2.0 I advise you to visit tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html for further training you custom object detector.
Have you tried using this tutorial's repository (github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#4-generate-training-data) to successfully installed Tensorflow 2.x API?
@@O100OSTO I've tried it, but still got many errors due to the incompatibility of TF versions, In that link which I've mentioned above, is the same procedure as in the video. You can still install and use TF 1 and follow the tutorial, there is no problem for that)
24:15 i keep getting the following error - ImportError: No module named 'tensorflow.compat' - is there any solution to this, ive scowered the internet and cant find one
@@mohamedimran3193 I checked the research/slim folder and there is already a file called "build". Aka in the newer version of tensorflow object detection API u dont need to run these sepcific set of commands. If I were you I wouldnt follow this tutorial as I ran into a ton of errors pertaining to me using outdated resources mentioned in the tutorials description.
@@cirianar Thank you for your inputs!. So you mean, it's not a good idea to follow this outdated tutorial? or you have something better than can help me. Because I'm badly in need of doing an object detection model for one of my projects
Thank you so much! i really appreciate your tremendous contribution to this community. I managed to adapt this tutorial to tensorflow2.0 and it worked!... Thank you! Like and new sub
I figured it out. If anyone gets the same error, after the final "else" in the generate_tfrecord.py change the last line to "return 0" instead of "return none" in the class_text_to_int function.
@@TheRAZSOR The absence of a setup.py file in the "research" folder is the cause of the problem, but I am still confused about how to solve it. Did you solve this problem?
I move "setup.py" file from "C:\tensorflow1\models esearch\object_detection\packages\tf2" (or tf1) folder to "C:\tensorflow1\models esearch" folder and I move "object_detection_tutorial.ipynb" file from "C:\tensorflow1\models esearch\object_detection\colab_tutorials" folder to "C:\tensorflow1\models esearch\object_detection" too for next process, that work for me.
I had this problem running jupyter file: "ImportError: DLL load failed importing win32api". Just type "conda install pywin32" and reaload. It works for me.
this tutorial won't work on tensorflow version 2.0 try these settings as they seem to work for me : Tensorflow 1.13.1 Tensorflow-gpu 1.15 Cuda version 10.0 Important : From tensorflow model github repo, Only clone from the branch "r1.13.0" otherwise it will not work
facing error like this File "generate_tfrecord.py", line 23, in flags = tf.app.flags AttributeError: module 'tensorflow' has no attribute 'app' please help
I have a problem while initialising the training File "train.py", line 48, in from tensorflow.contrib import framework as contrib_framework ModuleNotFoundError: No module named 'tensorflow.contrib' If any one have solution to this please help.
Yess...i got the same error... Bcoz I was using tensorflow 2.x, but it is not yet compatible for training purpose... So u should use tensorflow 1.14 for training
I've got an error, plz help me out (tensorflow) C:\tensorflow1\models\models-master esearch>python setup.py build python: can't open file 'C:\tensorflow1\models\models-master esearch\setup.py': [Errno 2] No such file or directory
The models have been removed in the latest version on github. to make it work download the version before and drop the contents over the top (without replacement) and it should work: github.com/tensorflow/tensorflow/releases/tag/v2.3.0
Hi regards from colombia, I would like to thank you for this exceptional video, for me is very useful this content for my grade work thanks. I haved many problems during the execution of the tutorial caused by versions of the libraries but finally works perfectly.
Hi Edje, Thankyou so much for such a beautiful tutorial. I am using Tensorflow 2.0 and was successful in creating the record file, but when trying this "python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config" I am encountering with an issue "File "train.py", line 49, in from tensorflow.contrib import framework as contrib_framework ImportError: No module named 'tensorflow.contrib'" Also tried to downgrade the Tensorflow version, but still not working. Any feedback would be greatly appreciated.
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see: * github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md * github.com/tensorflow/addons If you depend on functionality not listed there, please file an issue. Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import model_builder File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 20, in from object_detection.builders import anchor_generator_builder File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\anchor_generator_builder.py", line 22, in from object_detection.protos import anchor_generator_pb2 File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\anchor_generator_pb2.py", line 16, in from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2 ImportError: cannot import name 'flexible_grid_anchor_generator_pb2' from 'object_detection.protos' (C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\__init__.py) What should I do ???
me too. please help? WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see: * github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md * github.com/tensorflow/addons If you depend on functionality not listed there, please file an issue. Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import model_builder File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 20, in from object_detection.builders import anchor_generator_builder File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\anchor_generator_builder.py", line 22, in from object_detection.protos import anchor_generator_pb2 File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\anchor_generator_pb2.py", line 16, in from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2 ImportError: cannot import name 'flexible_grid_anchor_generator_pb2' from 'object_detection.protos' (C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\__init__.py)
@@EdjeElectronics Valorant is an upcoming fps from Riot Games (League of Legends developers). They promise a low ping, 128 tick rates and strong anti cheat. The game itself us a blend between CS:GO and Overwatch, where instead of buying grenades you should buy character abilities, that create tactical advantages. Today you can have the chance to get a key for closed beta.
I ran into problems because this guide is a bit old and made for tensorflow 1. If you simply install tensorflow or tensorflow-gpu with "pip install tensorflow" you will get the latest version which is (right now) 2.10. But this tutorial is made for tensorflow 1. After installing all those pip packages, you cant just simply downgrade to tensorflow1 because many of the already installed pip packages do not support it. So this means I'm kind of stuck. If you are also in this situation, my advice is to either: A) Start over from scratch and this time make sure you install tensorflow 1 so that you may follow the exact steps in this tutorial video. You can do this by simply creating a new conda enviroment that will be completely blank. Pip packages are linked to their respective enviroment, so it's very easy to jump between different enviroment that uses different versions of stuff. You don't have to redo the steps of installing CUDA/cuDNN etc, those are still installed on your system. Simply run "conda create -n tensorflow1-new" and then "conda activate tensorflow1-new". Now you can start over, this time make sure to install tensorflow 1 and not 2. Don't run "pip install tensorflow-gpu" but instead specify version, like this "pip install tensorflow-gpu=1.12" (or whatever version you want to use). Now reinstall and all those pip packages that are mentioned in the video. or B) Keep using your already installed tensorflow 2 enviroment and learn how to build using tensorflow 2 instead. If you are not lazy, I recommend going this route instead, because it is always better to use a later version, and by using tensorflow 2 you may also use newer versions of CUDA and cuDNN. Check this list to see compatabalities between tensorflow and CUDA and cuDNN: www.tensorflow.org/install/source_windows For instance, with tensorflow_gpu-2.9.0 you can use cuDNN 8.1+ and CUDA 11.2+ Here is a good tutorial for getting started with Tensorflow 2: th-cam.com/video/cvyDYdI2nEI/w-d-xo.html
@@aidos9753 So if I use tensorflow CPU I can just follow the other steps the same way, it just probably needs longer to train the network? And as far as I understood CUDA and cuDNN are also for GPU support? Do I still need to install them?
@@offifee8022Correct, you don't need to install CUDA and cuDNN. Instead of issuing "pip install tensorflow-gpu" just do "pip install tensorflow". But training will take much longer!
I had trouble when trying to generate the TFRecord with this command: "C:\tensorflow1\models esearch\object_detection>python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record" It says: "from object_detection.utils import dataset_util ModuleNotFoundError: No module named 'object_detection'". Does anyone knows how to solve this?
Great tutorial! Was using Cuda 10.0, Cudnn 7.6.5 for Cuda 10.0, conda latest version with python 3.5 in the environment and tensorflow-gpu 1.15 on an GeForce GTX 1080 with latest driver. Had to install protoc command manually, add object_detection folder path to environment variables, compile the proto files 1 by 1 to ensure the output of the files, delete the matplotlib imports in visualization_utils.py as described in the appendix of your github and only use *.PNG files as input as i mixed the images types in the first place.
@@jonathanetorma9849 if you mean the codebase/repository it can be found here as stated in the comments of the video: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 if you ment the model that was used for learning i used the Faster-RCNN-Inception-V2 also as stated in the video or the github readme
You're welcome! If you run in to errors, be sure to check my written guide, which is updated for more recent versions of TensorFlow: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
I have made a working repo from the tutorials tf 1.13.1 tf gpu 1.15 all thanks fro Edje Electronics for the great tutorials github.com/mustafaazzurr/object_detection-with-Tensorflow-API
Good Day Sir. Can i ask a copy of your trained frozen_inference_graph of this tutorial? .. just want to compare with my trained frozen_inference_graph . Mine is slow in detecting. at what step did you stop in training? at what loss value?
Important notes I've noticed while following this tutorial, 1.Type the full syntax command "conda create -n tensorflow1 pip python=x.x" *Python 3.6 is good enough* While creating your virtual environment, The default python version used with me was 3.7 which is not compatible with TensorFlow so far and I had to downgrade it. 2.The same problem but with TensorFlow version, I had Tensorflow 1.13.1, I had to downgrade it to 1.10.x to fix the error. Follow this link for more details about the error causes: github.com/tensorflow/tensorflow/issues/22794
Guys. I have a problem. While executing python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config then, ImportError: cannot import name 'fpn_pb2' from 'object_detection.protos Do you know solution?
@Furkan Çelik you need to convert the fpn.proto to fpn_pb2 by adding .\object_detetction\protos\fpn.proto to the command he gave to convert the .protos file to _pb2, you can do this to any other file that has not been converted by just adding the file name after the protos part of my command
Idea for another video - if that is at all possible: Interface with google photos (API?) and pull in data it already has classified of people and objects Interface with Google Image search type in a few search terms like Ace of Spades Card and download the result and use it as training. Sidenote: I see you used GTX 1060 - I'm curious to see how it scales in speed of training going from 1060 via 1080 all the way to a 2080Ti Finally is there a way to: 1. When watching a video/livecam note down the times when X object happened 2. When parsing pictures rename the pictures to the actual object found in them 3. Train the AI to understand an event as opposed to just an object - the difference between 'Paul is at 3:21 in the video' and 'Paul is jumping at 3:21 in the video' Thanks again!
Hey @Airbag888! Thanks for your interesting questions. I believe there are tools for automatically downloading images from a Google Image search, but I can't seem to find them right now. Also, I know you asked about identifying individual people, here is a great article explaining how to do that: www.pyimagesearch.com/2018/09/24/opencv-face-recognition/ 1. Yes, that would be pretty easy - take a look at this article: www.programiz.com/python-programming/datetime/current-time . If you want to see how to execute code only when a certain object is detected (like print the time and object name when a cat is detected), look at my Pet Detector video (code is linked in the description): th-cam.com/video/gGqVNuYol6o/w-d-xo.html 2. Yes, search for "cv2.imwrite" on Google, there are some good tutorials showing how it can be used to save files as a certain name. 3. That may be better for something like OpenPose. Take a look at this video to see a good use of OpenPose: th-cam.com/video/RHRQoaqQIgo/w-d-xo.html Good luck!
Edit: I solved everything now. If somebody runs into the same situation thats what I did. my solution: 1. labelmap.pbtxt -> followed tutorial 2. import error (see below) -> follow Step 2F from this tutorial 3. my ide could not import "from nets import inception_resnet_v2". This "nets " folder is in "slim" folder . could not set the path right so I copied the whole "slim" folder into the "models" folder and it works now for me. I just don't know if my changes affect the results. we will see. IDE: Pycharm Env: tensorflow1=3.5 (should work with 3.7 (NOT TESTED!)) First Comment: First of all nice tutorial, thx @Edje Electronic. At the moment I am stuck at step 6 . when I try to train the model I receive this error: Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import model_builder File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\builders\model_builder.py", line 20, in from object_detection.builders import anchor_generator_builder File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\builders\anchor_generator_builder.py", line 22, in from object_detection.protos import anchor_generator_pb2 File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\protos\anchor_generator_pb2.py", line 15, in from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2 ImportError: cannot import name 'flexible_grid_anchor_generator_pb2' IDE: Pycharm installed packages in tensorflow1 : absl-py==0.7.1 astor==0.8.0 attrs==19.1.0 backcall==0.1.0 bleach==3.1.0 certifi==2018.8.24 colorama==0.4.1 contextlib2==0.6.0 cycler==0.10.0 Cython==0.29.10 decorator==4.4.0 defusedxml==0.6.0 entrypoints==0.3 gast==0.2.2 google-pasta==0.1.7 grpcio==1.21.1 h5py==2.9.0 ipykernel==5.1.2 ipython==7.8.0 ipython-genutils==0.2.0 ipywidgets==7.5.1 jedi==0.15.1 Jinja2==2.10.1 jsonpickle==1.2 jsonschema==3.0.2 jupyter==1.0.0 jupyter-client==5.3.3 jupyter-console==6.0.0 jupyter-core==4.5.0 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.0 kiwisolver==1.1.0 lxml==4.4.1 Markdown==3.1.1 MarkupSafe==1.1.1 matplotlib==3.0.3 mistune==0.8.4 nbconvert==5.6.0 nbformat==4.4.0 notebook==6.0.1 numpy==1.17.2 object-detection==0.1 opencv-python==4.1.1.26 pandas==0.25.1 pandocfilters==1.4.2 parso==0.5.1 pickleshare==0.7.5 Pillow==6.1.0 prometheus-client==0.7.1 prompt-toolkit==2.0.9 protobuf==3.9.2 Pygments==2.4.2 pyparsing==2.4.2 pyrsistent==0.15.4 python-dateutil==2.8.0 pytz==2019.2 pywin32==225 pywinpty==0.5.5 pyzmq==18.1.0 qtconsole==4.5.5 Send2Trash==1.5.0 six==1.12.0 tensorboard==1.14.0 tensorflow-estimator==1.14.0 tensorflow-gpu==1.14.0 termcolor==1.1.0 terminado==0.8.2 testpath==0.4.2 tornado==6.0.3 traitlets==4.3.2 wcwidth==0.1.7 webencodings==0.5.1 Werkzeug==0.11.15 widgetsnbextension==3.5.1 win-unicode-console==0.5 wincertstore==0.2 wrapt==1.11.2 I tried it with python 3.5 and 3.7 . still same traceback / Import error. Any suggestions about how I can solve this situation?
Thanks for this clear tutorial, it helped me a lot. I am running the TF Lite on my Raspberry Pi 4B as you described in the other tutorial and it works great, slightly over 4 FPS. Now I want to train and got the setup working with this tutorial, even with Tensorflow 2.2.0 :). It took some time, especially to get rid of all the errors in the jupyter notebook. (turning on Linux support in Windows and installing Ubuntu, trouble with wrong package versions etc) Great to finally see the test images pop up in the end :) I have access to a nice tagged dataset with images. For each image the dataset contains a file with text on the position and decription of the objects of interest. However, all the tutorials I found use XML files, but the files in my dataset are in JSON format. I tried some JSON to XML converters but that does not seem to work. I get XML files which look okay, but the conversion to CSV results in empty CSV files. Is there a way to use the JSON files as they are or do they need to be converted to XML before I can use then to run the training?
Sir, did get error when want to start the training that saying the tensorflow version not compatible with the ssd mobilenet v2? and ask to look the compatible at model_buid. How do you solve this? Thanks
Thanks so much for these videos, all your instructions have been on-point! Is the process to classify 3d items (I believe you mentioned LEGO at some point?) the same as for something like a playing card? but just many more pics of the object from different angles?
Hi Edje Electronics Thank you for this great introductory step by step tutorial to object detection using TF GPU, I have gone through the tutorial and managed to successfully complete it, although I struggled for sometime while trying to set up the tensorflow GPU on my machine, that was the most difficult task due to clashes between versions of TF, cuda and cuDNN and other python libraries and packages. I have then adapted the tutorial to a more complicated dataset detecting tiny objects with minute characteristics, and tried three different classifiers Faster RCNN, R FCN & SSD, the two stage detectors (CNN family) performed way better than the one stage detector (SSD) same as you experienced in your tutorial, my target was not speed, but precision and accuracy, and the CNN family are known to be more precise than the likes of SSD, Yolo and RetinaNet, although I would like to try YoloV3 as I read it is catching up in terms of precision -mAP. I did not get the best of recall as my dataset had only few thousands of images and I am planing to augment it, I also got around 10% of false positives for Faster RCNN & R FCN, this is due (in my opinion) to the fact that the objects the models were detecting were very small in size and very similar in shape... I am wondering if there are any hyper-parameters I can tweak in order to improve the accuracy, recall and precision (in addition to drastically augmenting the dataset it is in the order of thousands and my plan is to augment it to tens or even hundred thousands of images) I appreciate your view on this, and thank you again for this eye opener on object detection.
Approximately how many pixels make up the smallest of objects you are trying to identify? Even a neural net will have limitations for inference if there is not enough inputs (in this case pixels) to make an accurate prediction on. (Perhaps why you are getting false positives as you say)
Hi Youcef! You're welcome, and thanks for the good question! @Aidos is right, it is difficult for neural networks to accurately detect small objects with minor differences. I'm not sure which hyper-parameters you might be able to change to help improve accuracy, I haven't tried that yet. I do know that my playing card detection performed MUCH better when I trained it using 50,000 synthetically generated images on YOLOv3. Having a huge number of accurately labeled training images will definitely help accuracy. So, if you want to improve accuracy, my first recommendation would be to use more training images. Also, YOLOv3 was more accurate for me than Faster-RCNN was. Here's a video showing my YOLOv3 card detection model in action. At 6:26 in the video, you can see a comparison between YOLOv3 and Faster-RCNN performance. th-cam.com/video/Nf3zBJ2cDAs/w-d-xo.html
@EdjeElectronics Hi, I'm in the middle of Step 6 trying to run the training, but when I do so, I come up with "ValueError: No variables to save. " Does this issue sound familiar?
You can do it on any laptop theoretically but it will just take longer. If it still doesn't work, consider using a cloud instance like AWS and you can run it on your Macbook Air
I am getting this error while exporting Inference Graph. File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\gen_variable_ops.py", line 59, in _InitOpDefLibrary op_def_lib.add_op_list(op_list) NameError: name 'op_def_lib' is not defined
Hi Edje, a few questions: What FPS speeds were you experiencing for inference? Are you familiar with Tensor RT/able to integrate it into this tutorial to allow the performance speeds to increase? I tried to deploy this code on an AWS P3 instance which has a Tesla V100 GPU and experienced no significant change in speed. Are you able to suggest what speeds I should expect when running a Faster-RCNN model on a P3 instance? Thanks in advance! Your tutorial is the best on TH-cam!
Hey Aidos, I can answer at least one of your questions! I get 6.5 - 7.5 FPS when running a Faster-RCNN model on my gaming PC (see specs in video description). I get 9 - 11 FPS when running an SSD-MobileNet-V2 model. This is with the Object_detection_webcam.py script running at a resolution of 1280x720. The FPS actually doesn't change much when I reduce the resolution to 640x360. Sorry, I'm not very familiar with Tensor RT, so I don't know how much it would increase the speeds. Also, I haven't tried deploying any of this on a cloud computer, so I'm not sure what to expect for inference speeds. Thanks for always helping out! I'm hoping to make an updated version of this video that hopefully simplifies the process a bit, but I don't have time right now! It's something I'm shooting to get done in the next 6 months.
@@EdjeElectronics Thanks Edje! I'm experiencing a similar FPS (about 5.5 on average) using a Quadro P2000 5GB. I realise now that maybe it would be best to upgrade to a better GPU with possibly more VRAM to achieve better processing speeds. No rush on future videos. Just trying to disseminate what affects processing speeds across different deep learning environments. Thanks again!
Hi there :) Its a great tutorial for beginners. I have successfully built an object detection model using faster CNN and it is working perfectly fine. Thanks for your share. It helped a lot to gain knowledge on open cv modules and deep learning. Is there any way to see more of your work through repositories? I would love to stay in touch with you for more applications in the future. cheers :)
Thanks for the kind feedback! I'm glad you were able to get it working. Keep an eye on my GitHub account and this TH-cam channel, I will be posting more work some time next month!
@@EdjeElectronics Thanks for the reply. I will sure keep an eye on your work. But I have one question regarding checkpoints that gets created while training. we are using RTX 2080 graphics card which has high-speed GPU processing and it is training 10000 steps in just 20 minutes and it is hard to keep an eye on training process because of its speed. As per model settings, checkpoints are creating every 10 minutes. But I want checkpoints to be created every 5 minutes so I could stop the model when the loss reaches to 0.05. Could you give me your valuable suggestion on this how to modify my checkpoints? cheers :)
@ Edje Electronics, Amazing video! I have a question. What is the difference between "test" and "train" folders? And what is the purpose of each of them?
A neural network needs both train and test data to be built. In a nutshell, the model is 'trained' on the train dataset. Then, that model is used on the 'test' set to validate how accurate the model is. The train and test data needs to be different otherwise the model could be considered 'cheating'. You want the model to work on images it has never seen before which is why our test and train data is different.
Hi Amazing tutorial!!!! I wanted to use the trained model to detect objects in Visual C++. Is there any suggestion you can give on how to do it? Or any video which would help me ? Please help soon!!
한국인 반갑습니다 ㅋㅋ 저도 여러 에러와 이슈들을 거치고 있는데.. 무엇보다 옛날 영상이라 지금의 텐서플로우와 버전이 맞지 않는 부분에서 에러가 계속 나네요 ㅎㅎ 현재는 faster_rcnn_inception_v2가 텐서플로우 1.12에서 빌드된 것이라 현재의 2.2 버전과는 맞지 않는 부분에 막혀 있는데.. 텐서플로우를 과거 버전으로 다시 받던가, 아니면 모델을 영상에 나와 있지 않은 최근의 것으로 찾던가 해야 한다고 생각합니다만 혹시 이 부분 어떻게 해결하셨나요?
In a prior video you did this with opencv. Is there a technical reason you started doing more in tensorflow? I'm planning to follow your videos to train a cat food dispenser to feed only when the two skinny cats are in the room. All 3 cats are distinctly different looking.
Good question! In OpenCV, I had to come up with my own specific algorithm to detect the cards: find card-sized contours, isolate the corners, and perform template matching to identify the card. It took several months to develop the algorithm, and it isn't very robust. It only works with solid backgrounds, only with one brand of card, and only if the cards aren't overlapping. With TensorFlow, the detection is more reliable, and I don't have to come up with a specific detection algorithm - the "machine learning" does that for me. The drawback to using TensorFlow is that it takes much more computational power. The "easy" way to do your project would be to use TensorFlow. Train it using 500+ images of your three different cats, and if they are visually distinct enough, it should be able to distinguish between them. The harder but more computationally efficient way is to come up with your own OpenCV algorithm to identify the cats. Good luck with your project, let me know if you have questions!
Hey! I'm getting this error: Traceback (most recent call last): File "train.py", line 48, in from tensorflow import framework as contrib_framework ImportError: cannot import name 'framework' Can you help me with that?? (Im really not the only one)
Hi @Edje Electronics, I have a problem while initialising the training File "train.py", line 52, in from object_detection.builders import model_builder File "C:\tensorflow1\models esearch\object_detection\builders\model_builder.py", line 39, in from object_detection.utils import tf_version File "C:\tensorflow1\models esearch\object_detection\utils\tf_version.py", line 17, in from tensorflow.python import tf2 # pylint: disable=import-outside-toplevel ImportError: cannot import name 'tf2'
When try to run object_detection_tutorial.ipynb getting this error "ImportError: DLL load failed while importing win32api: The specified module could not be found." Tried multiple times but no luck. Please help
hi guys, question for the community: when creating custom classifications, should i use the same model and just keep 'teaching' it new classifications or should i create new models for each classifications. i do a lot of work with animal behaviour and if i wanted to switch to whatever animal i was observing at the time, would it get confused. if it, for example, knew what a dog looked like but then i wanted it to exclusively look for another species, would this be ok? thanks for your help!
You could definitely build on top of existing models but in my opinion it would be harder to adapt them for custom classifications since you would need a really good understanding of what they are trained to detect. It would be better to custom train a model exclusively with your own data.
Excellent tutorial! But I have a problem. Is there any way that during the training I can save from one step to stop the process without losing the past steps? It seems that my program wont save any progress during the training
Hey everyone! I recently updated the written version of this guide to work with TensorFlow versions up to 1.13.1. If you are encountering errors following this video, please check out the guide and make sure you are using the most up-to-date commands. Here are answers to some common questions:
- Where is the train.py file? The train.py file is now located in the /object_detection/legacy folder. You can copy it to the /object_detection folder and use it as normal.
- Images aren't appearing when testing the Jupyter notebook, even though there were no errors? Try this: go in to object_detection/utils/visualization_utils.py and comment out the import statements on line 25 and 26 that include matplotlib. Then, re-run the script.
- Can I run this just using CPU and not GPU? (Yes, just use "pip install tensorflow" instead of "pip install tensorflow-gpu".)
- How to resolve errors related to _pb2 files? See Step 2f of the guide linked below.
Check out the guide at github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 !
This step(which idk if is neccesary) still wasnt added to the written tutorial.-> 12:05
set PATH=%PATH%;PYTHONPATH
@@nicholaspitti8171 Yep, I removed it from the written tutorial because it isn't necessary!
i am constantly getting module not found error for tensorflow in jupyter notebook.I followed the instructions on the github page.
Thanks for the update! I managed to get through 90% of the tutorial a week and a half ago and couldnt figure out what the heck went wrong on the final stretch. Will give it another shot!
I followed the instructions in your tutorial but I'm having this error in jupyter when running object_detection_tutorial. No idea how to solve it as the import instructions are already there...
i.imgur.com/wp5rtFO.png
13:38 -> you will find the setup.py in the slim folder copy that into research folder
13:59 -> Object_detection_tutorial.ipynb - Is located in the "object_detection\colab_tutorials" for anyone who can't find it
24:19 -> according to fixed comments, train.py file is now located in the /object_detection/legacy folder.
fpn_pb2 -> protoc --python_out=. .\object_detection\protos\fpn.proto
center_net_pb2 - > protoc --python_out=. .\object_detection\protos\center_net.proto
official -> pip install tf-models-official
etc...
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
If these error were found, I think you should start again from the beginning
thank you so much I had run out of options.
THANKYOU SO MUCH BRO👍
i love you
i love you more
thank you kind sir!
weeks on the search for a good start tutorial that doesn't have 50+ parts and this is where I land. One of the best clear and concise tutorial/introduction video I've seen so far! Keep it up!!
Here are the issues that have been found so far with this tutorial:
- TensorFlow moved the train.py file used in Step 6 to the "legacy" folder inside the /object_detection folder. You can still use it by moving it back into the /object_detection folder.
- If the images aren't appearing in Jupyter notebook at the end of Step 2, try going in to object_detection/utils/visualization_utils.py and comment out both the import statements at the top that include matplotlib. Then, try re-running the Jupyter notebook.
- Starting at 21:41, I say to change the num_classes variable to 6, but I accidentally changed it to 36. It should be 6. (Thanks Rafael!)
- Google may add more .proto files to the object_detection/protos folder, so it may be necessary to add more files to the "protoc" command at 13:13. You can do this by adding ".\object_detection\protos\FILENAME.proto" to the end of the long command string for each new file. (Thanks exnaruto1!)
- When running the "python train.py" command, if you get an error that says "TypeError: __init__() got an unexpected keyword argument 'dct_method'.", then remove the "dct_method=dct_method" argument from line 110 of the object_detection/data_decoders/tf_example_decoder.py file. (Thanks Evpatoria!)
- When running "python train.py", if you get an error saying "google.protobuf.text_format.ParseError: 110:25 : Expected string but found: '“' ", try re-typing the quotation marks around each of the filepaths. If you copied the filepaths over from my GitHub tutorial, the quotation marks sometimes copy over as a different character type, and TensorFlow doesn't like that.
- For train.py, if you get an error saying "TypeError: Expected int32, got range(0, 3) of type 'range' instead.", it is likely an issue with the learning_schedules.py file. In the \object_detection\utils\learning_schedules.py file, change line 153
from "tf.constant(range(num_boundaries), dtype=tf.int32)," to "tf.constant(list(range(num_boundaries)), dtype=tf.int32),".
- If you are still getting an error complaining about "Expected int32, got range(0, 3)" or something similar, try implementing this fix: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11
Please let me know if you see any more errors with the video or with the commands/instructions from my GitHub repository!
This is a great tutorial, thanks for making it.
I think I found a small error at 12:01 (th-cam.com/video/Rgpfk6eYxJA/w-d-xo.html) when you're setting the PATH variable, I think the line should read:
SET PATH=%PATH%;%PYTHONPATH%
or else it won't add the value of the PYTHONPATH variable to the PATH, it'll just add the string PYTHONPATH. If it still works, maybe you don't need to modify the PATH at all, just the PYTHONPATH?
Hmm, I tested it out, and you're right! You only need to set the PYTHONPATH variable; you don't need to make any changes to PATH. I thought adding "PYTHONPATH" to PATH added the variable itself, not just a "PYTHONPATH" string. I'm not very familiar with environment variables :)
WEBCAM VIDEO LAG ISSUE! I have trained my own object classifier using your method with the webcam, the classification is perfect, but I'm facing an issue with the real-time video feed, ie the video lags a lot. Can you please help me this issue? Thank you.
It seems like a few people are having this issue, so I will look in to it and try to figure it out!
yeah that would be of great help
Spent a whole night with this. Totally worth it. Amazing tut man...
Hey dude, What is the tensorflow version you used? I'm using 1.9 and I get an error while running training.py "Entry Point Not Found" got an idea?
Why worth it?
@Program-o-warrior hello sir could you please help me out. I got version problems with this video
@Program-o-warrior bro kindly help
Hey all, I just uploaded a new video showing how to train TensorFlow object detection models inside your web browser with Google Colab. It's much easier than trying to follow this video! Check it out here:
th-cam.com/video/XZ7FYAMCc4M/w-d-xo.html
but i do not conect gpu in google colab ?
very less start from scratch tutorials on youtube Thank you!!
You deserve a lot of credit for making this video. There are many tensorflow/machine learning tutorials online but few that really show you this detailed from getting started to creating your model and training it.
For those who have been stuck with choosing versions of software and modules to use, this is my additional suggestion.
I am using Windows 10 pro.
- Installing Anaconda: I chose the last version of anaconda released in 2018 which supports python 3.7.1. Technically, you can use the latest released version.
- Python version: 3.7.1
- Tensorflow ver 1.13.1 goes along with its Github commit: github.com/tensorflow/models/tree/r1.13.0
- NumPy version 1.16.4
- pandas version 1.1.5
- Matplotlib version 3.0
For the rest, I just follow the author's instructions and the support from other guys here. Thanks a lot.
Thanks for helping out!
a shortcut while labelling the images is to make use of
w - to start capturing the area (selecting)
d- to move to the next image
also , auto save your work
Great Tutorial! Go to 16:20 for cat-cable ultimate battle!
This is the exact explanation that I needed it about how the training process gets "stored" with the 5 minutes checkpoints by tensorflow. I'll try to replicate this in a Mac environment and then somewhere in the cloud. Thanks for this video, you rocks!
For those of you looking for the new zoo model link:
github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md
The Jupyter notebook is now in:
C:\tensorflow1\models
esearch\object_detection\colab_tutorials
Update: I got the project to working.. what you guys should really do is:
Clone the git repository and then switch to the branch version of the video, this way you guys will have the same directory structure as shown in the video.
9143 Rawaha Muhammad do I have to do this in order to see the images appear in the notebook? I ran it and no images appear
@@GarethBolton you should only do this if you're having trouble following the tutorial for file directories.. because these are the new locations of the model and the notebook.
You can look at the guideline in the GitHub repo if you're doing everything right and the images don't show up.
Which python and tensorflow version did you use?..I am getting many errors using tf 1.5
@@ano8929 same here
@@rawahamuhammad7805 kindly help for newer version
So, for anyone who is trying to use this tutorial in january 2020, with a ton of help I've finally made it to work out. Here's how:
For Tensorflow-GPU:
Download and install NVIDIA CUDA 10.0
Download cuDNN 7.4.2 for CUDA 10.0 -> open archieve and navigate to the 'bin' folder -> extract the only dll file from there to the CUDA v10.0/bin directory
Your Tensorflow-GPU is ready to work!
If you want to use Tensorflow-CPU ignore the steps from above
Next:
Download the latest version of models from the github repo linked in the description
Download the faster_rcnn_inception archieve and extract it into the models/research/object_detection
Download the Object-Detector API from the repo and extract it's files into models/research/object_detection
Inside models/research/object_detection delete the inference_graph folder content, as well as the 2 csv files from images and the content of the training folder
Open an Anaconda Command prompt and create a virtual env:
C:\>conda create -n tensorflow1 pip python=3.6.10 //the 3.6.10 version its working with my overall setup
C:\>activate tensorflow1
(tensorflow1) C:\>pip install tensorflow-gpu==1.13.1 //the 1.13.1 version is working as well
(tensorflow1) C:\> conda install -c anaconda protobuf
(tensorflow1) C:\> pip install pillow
(tensorflow1) C:\> pip install lxml
(tensorflow1) C:\> pip install Cython
(tensorflow1) C:\> pip install contextlib2
(tensorflow1) C:\> pip install jupyter
(tensorflow1) C:\> pip install matplotlib
(tensorflow1) C:\> pip install pandas
(tensorflow1) C:\> pip install opencv-python
now uninstall numpy:
(tensorflow1) C:\> pip uninstall numpy
(tensorflow1) C:\> pip install numpy==1.16.4 //the 1.16.4 v is working
(tensorflow1) C:\> set PYTHONPATH=C:\tensorflow1\models;C:\tensorflow1\models
esearch;C:\tensorflow1\models
esearch\slim
(tensorflow1) C:\> cd C:\tensorflow1\models
esearch
NOW very important: open a file manager and navigate to tensorflow1/models/research/object_detection and search for the "protos" folder.
Inside this folder you'll see a bunch of .proto files -> you need to make a .pb2 file instance for every single .proto file.
DO NOT USE the long command from the written tutorial (protoc --python_out=. .\object_detection\protos\anchor_generator.proto .\object_detection\protos\argmax_matcher.proto......)
Instead, look up for the first .proto file u see inside this folder and write the next command:
(tensorflow1) C:\>protoc --python_out=. .\object_detection\protos\file_name.proto
Repeat this command for every file you see inside the folder untill you make sure that every single .proto file has a .pb2 copy (it takes some time but it's the way to go)
Next:
(tensorflow1) C:\tensorflow1\models
esearch> python setup.py build
(tensorflow1) C:\tensorflow1\models
esearch> python setup.py install
BEFORE RUNNING THE JUPYTER COMMAND download the models file for version 1.7 from github -> open the archieve and search for /research/object_detection/object_detection_tutorial.ipynb -> extract that specific file into YOUR ACTUAL MODEL and replace it's own object_detection_tutorial.ipynb (otherwise it will mess your tensorflow version)
Also, I'm not sure if this whole jupyter step is necessary since I'm still having an import error and the images are not showing, but it's still working out.
Next:
(tensorflow1) C:\tensorflow1\models
esearch\object_detection> python xml_to_csv.py
Then, generate the TFRecord files by issuing these commands from the \object_detection folder:
python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
python generate_tfrecord.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record
Do the labelmap thing just as in the tutorial, it's nothing to explain here
!! Make sure to modify those specific lines inside the config file just as in the written tutorial
And now you can run the training :
python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
Hope it works ! Let me know if it is woking for any of you ! Have a good day!
imgur.com/a/tKRb18h
while applying python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
command
gotcha
Hi, I'm trying to download the research models (/research/object_detection/object_detection_tutorial.ipynb) from version 1.7 from github, but the research models for all non-current versions were removed?
@@getlost1997 Here is the link for 1.7 models:
github.com/tensorflow/models/tree/adfd5a3aca41638aa9fb297c5095f33d64446d8f
Just download this and replace the object_detection_tutorial.ipynb file in the newest model.
@@andrejpiecka Thank you!
To everyone having issues with tensorflow 'app' or tensorflow 'contrib' . You need to downgrade your tensorflow version to 1.14. Using tensorflow 2.0 onwards doesn't work. even if you use compat.v1, since 'contrib' was completely removed from tf 2.
EDIT: for those of you wondering how to do this, go into terminal and activate tensorflow1 environment
pip uninstall tensorflow
Wait for it to uninstall
pip install tensorflow-gpu==1.14
Wait for it to install and you should be good to go. Be aware that you will have to download the correct versions of CUDA and CUDNN
yeah, I'm facing the ' no module named contrib' -error although I'm using tf 1.14 since the beginning. mysterious :O
@@petermeier6501 can you copy paste the whole stack trace of your errors?
@@TheAndre2131 Yes, it's
Traceback (most recent call last):
File "model_main.py", line 26, in
from object_detection import model_lib
File "/home/pi/tensorflowgit/Tensordatensatz/models/research/object_detection/model_lib.py", line 27, in
from object_detection import eval_util
File "/home/pi/tensorflowgit/Tensordatensatz/models/research/object_detection/eval_util.py", line 40, in
slim = tf.contrib.slim
File "/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/util/lazy_loader.py", line 62, in __getattr__
module = self._load()
File "/home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'tensorflow.contrib'
Do you have any idea what's causing the error o0 ?
@@petermeier6501 well. Firstly, it's not recommended to use model main.py but instead to use test.py from the legacy folder. Moreover you shouldn't be getting this error if you're using tf1.x could you check if you're in the Correct environement and uninstall and reinstall tensorflow Just in case
@@TheAndre2131thanks for the suggestions :), using the train.py file in the legacy folder or reinstalling tf unfortunately didn't do the trick. Trying other models and tf versions now.
God dude the beginning camera footage is so cool to watch
How much time and steps it took to train your dataset.?? @Good ki... Thank you
thanks for this tutorial, was looking for something exactly like this, other videos don't go into details like, just skip here and there bam already trained data and detecting, i wanted to know how it looks like from start to finish cuz it was hard just trying to grasp text tutorials.
Thanks! If you run into issues while working through the guide, be sure to check my written guide. It has small updates for newer versions of TensorFlow (my pinned comment on this video also shows what the updates are): github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
For Tensorflow 2.0 use following command to upgrade generate_tfrecord.py on anaconda promt
tf_upgrade_v2 --infile generate_tfrecord.py --outfile generate_tfrecord_new.py
Also in line 23 replace
# flags = tf.app.flags
flags = tf.compat.v1.flags
Thanks! I will update my TensorFlow repository with this info when I get a chance.
I am still getting the same error :/
@@badcode8037 Make sure you use the correct file, generate_tfrecord_new.py, when you run the command(python generate_tfrecord_new.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record). Otherwise you will get the same error again.
@@peterscales6020 Thanks a lot. It finally worked
@@peterscales6020 getting another error when i ran the train.py in cmd- AttributeError: module 'tensorflow' has no attribute 'contrib'
Hi! I have no words to thank you. You really helped me. May Allah Pak bless you. Bundle of thanks :)
Have you trained a model?
What a fantastic Tutorial. I love the thoroughness. :)
Hello, here are some tips on what helped me run this model. It includes the versions of the packages that i installed aswell as some notes on how to work arround the steps 1 and 2 of the GitHub manual. I have yet to try and run it with my own personal images so don't expect automatic results...
NAME OF MY CONDA ENV:
tf1.13
GPU:
nvidia quadro k620
VERSIONS:
cudnn 7.3.1
cuda 10.0_0
tensorflow-gpu 1.13.1
tensorflow-estimator 1.13.0
tensorflow 1.13.1
pip 10.0.1
protobuf 3.6.0
python 3.5
pillow 7.0.0
lxml 4.4.2
cython 0.29.15
contextlib2 0.6.0.post1
jupyter 1.0.0
jupyter-client 6.0.0
jupyter-console 6.1.0
jupyter-core 4.6.3
matplotlib 3.0.3
pandas 0.25.3
opencv-python 4.2.0.32
INSTALLING:
pip install --ignore-installed --upgrade tensorflow==1.13.1
conda install -c anaconda cudnn==7.3.1 -> equivalent to 7.4
CHECKING:
conda list NAMEOFPACKAGE
SET PATHS:
set PYTHONPATH=C:\tf1.13\models;C:\tf1.13\models
esearch;C:\tf1.13\models
esearch\slim
CHECKING:
echo %PYTHONPATH%
PROTOBUF COMMAND EXCEPTIONS:
REMOVED FROM ORIGINAL
\object_detection\protos\calibration.proto . -> DOES NOT EXIST WITH TF1.13
\object_detection\protos\flexible_grid_anchor_generator.proto. -> DOES NOT EXIST WITH TF1.13
SETUP BUILD:
cd C:\tf1.13\models
esearch
python setup.py build
python setup.py install
EXECUTE LOCALHOST DEMO:
cd C:\tf1.13\models
esearch\object_detection
jupyter notebook object_detection_tutorial.ipynb
LINKS:
TENSORFLOW / PYTHON / CUDA / CUDNN - VERSIONS :
www.tensorflow.org/install/source#tested_build_configurations
PREBUILT MODELS:
github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
ssd -> low CPU
MAIN PROJECT:
github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#1-install-anaconda-cuda-and-cudnn
I also ran into some DLL problems when executing the jupyter notebook because my Python folder had two. It only took removing one of them to work...
I hope this helps you!
IMPORTANT:
numpy must be 1.16 or above
These settings seem to work for me :
Tensorflow 1.13.1
Tensorflow-gpu 1.15
Cuda version 10.0
*Important* : From tensorflow model github repo, Only clone from the branch "r1.13.0" otherwise it will not work
Did u install tensorflow and tensorflow-gpu together? o.o
@@renakiravtuber first i install tensorflow with this command : pip install tensorflow==1.13.1 --ignore-installed
and then i installed tensorflow-gpu with this command : pip install tensorflow-gpu==1.15
notice that i didn't put --ignore-installed in tensorflow-gpu as it messes up all the packages for tensorflow 1.13.1
@Aero'N'Zero thanks :) what about ur CUDA and cudnn versions?
@@AeroAndZero what about ur cuda and cudnn versions
@@renakiravtuber I used cuda version 10.0 and cudnn v7.6.5 for cuda 10.0
Make sure to update your graphic card driver to the latest version
I have this gpu : 920MX (for laptop)
This is the old tutorial using TF 1.x, for Tensorflow 2.0 I advise you to visit tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html for further training you custom object detector.
Have you tried using this tutorial's repository (github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#4-generate-training-data) to successfully installed Tensorflow 2.x API?
I just made a TH-cam tutorial for the new TensorFlow 2 versions it's right here th-cam.com/video/oqd54apcgGE/w-d-xo.html
@@O100OSTO I've tried it, but still got many errors due to the incompatibility of TF versions, In that link which I've mentioned above, is the same procedure as in the video. You can still install and use TF 1 and follow the tutorial, there is no problem for that)
@@Armaan_Priyadarshan Great)
Patience required to complete, very excellent tutorial
24:15 i keep getting the following error - ImportError: No module named 'tensorflow.compat' - is there any solution to this, ive scowered the internet and cant find one
By watching this video for 1 min, I found the PUBG and OW attract me more
Whenever I run the python setup.py build
/install command, it says it cant find a setup.py file in the directory of C:\tensorflow1\models
esearch>
@Edje Electronics, I'm also getting this error. Can someone help, please?
@@mohamedimran3193 I checked the research/slim folder and there is already a file called "build". Aka in the newer version of tensorflow object detection API u dont need to run these sepcific set of commands.
If I were you I wouldnt follow this tutorial as I ran into a ton of errors pertaining to me using outdated resources mentioned in the tutorials description.
@@cirianar Thank you for your inputs!. So you mean, it's not a good idea to follow this outdated tutorial? or you have something better than can help me. Because I'm badly in need of doing an object detection model for one of my projects
@@mohamedimran3193 the setup.py in the slim folder
One of the cleanest videos i´ve ever seen
python: can't open file 'C:\tensorflow1\models
esearch\setup.py': [Errno 2] No such file or directory Can you help me ? I take this error.
C:\tensorflow1\models
esearch\slim find it here
i did this,you direct to slim and delete file Build then run it.
@@muhammadahmadraza3145 should i change directory to slim or move setup.py to folder research ??
@@nesacristin2913 move to folder reserach it worked
move to folder reserach it worked , move build to folder reserach it worked
Bro why is the code content in object_detection_tutorial.ipynb not same with the tutorial you make?
Sir @Edje Electronics, does this work even if im not using Tensorflow-Gpu?
Thank you so much! i really appreciate your tremendous contribution to this community. I managed to adapt this tutorial to tensorflow2.0 and it worked!... Thank you! Like and new sub
I figured it out. If anyone gets the same error, after the final "else" in the generate_tfrecord.py change the last line to "return 0" instead of "return none" in the class_text_to_int function.
Thanks for posting your solution!
When I run "python setup.py build" I get the following error: "[Errno 2] No such file or directory". Can anyone please help? Would be very kind
Did u find the solution?
Make sure to CD into object detection
@@blazingfest5885 Still not working!
@@TheRAZSOR The absence of a setup.py file in the "research" folder is the cause of the problem, but I am still confused about how to solve it. Did you solve this problem?
I move "setup.py" file from "C:\tensorflow1\models
esearch\object_detection\packages\tf2" (or tf1) folder to "C:\tensorflow1\models
esearch" folder and I move "object_detection_tutorial.ipynb" file from "C:\tensorflow1\models
esearch\object_detection\colab_tutorials" folder to "C:\tensorflow1\models
esearch\object_detection" too for next process, that work for me.
I had this problem running jupyter file: "ImportError: DLL load failed importing win32api".
Just type "conda install pywin32" and reaload. It works for me.
Thank you for making this tutorial. Massively helpful!
i couldn't get the images at 15:00 ,please help.
me neither, have you solved it yet?
I am getting:
AttributeError: module 'tensorflow' has no attribute 'contrib'.
Any solution?
this tutorial won't work on tensorflow version 2.0
try these settings as they seem to work for me :
Tensorflow 1.13.1
Tensorflow-gpu 1.15
Cuda version 10.0
Important : From tensorflow model github repo, Only clone from the branch "r1.13.0" otherwise it will not work
facing error like this
File "generate_tfrecord.py", line 23, in
flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'
please help
Use tf-gpu version 1.15
@@presidentislive6297 I'm using tensorflow-gpu 2.1.0, are you saying i need to go backwards and use 1.15?
did you find a way to solve the error ? i got the same issue
thanks for all your hard work you put in making this video
I have a problem while initialising the training
File "train.py", line 48, in
from tensorflow.contrib import framework as contrib_framework
ModuleNotFoundError: No module named 'tensorflow.contrib'
If any one have solution to this please help.
Did anyone solve this?
Yess...i got the same error... Bcoz I was using tensorflow 2.x, but it is not yet compatible for training purpose... So u should use tensorflow 1.14 for training
github.com/tensorflow/models/issues/6423
U can follow this thread
I've got an error, plz help me out
(tensorflow) C:\tensorflow1\models\models-master
esearch>python setup.py build
python: can't open file 'C:\tensorflow1\models\models-master
esearch\setup.py': [Errno 2] No such file or directory
The models have been removed in the latest version on github. to make it work download the version before and drop the contents over the top (without replacement) and it should work:
github.com/tensorflow/tensorflow/releases/tag/v2.3.0
@@theaussieengineer8542 could you explain in steps what should I do?
@@marwanashraf5874 I will get onto putting something together that explains the changes and link it as soon as I can.
@@theaussieengineer8542 thanks in advance!, actually my graduation project is mainly depending on this step.
@@theaussieengineer8542 so we'll have to replace the whole thing? or what
please inform us whenever you can!
Hi regards from colombia, I would like to thank you for this exceptional video, for me is very useful this content for my grade work thanks. I haved many problems during the execution of the tutorial caused by versions of the libraries but finally works perfectly.
Thanks! I'm glad you were able to get it working. It's hard to stay on top of all the version changes!
Hi Edje, Thankyou so much for such a beautiful tutorial. I am using Tensorflow 2.0 and was successful in creating the record file, but when trying this "python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config" I am encountering with an issue "File "train.py", line 49, in
from tensorflow.contrib import framework as contrib_framework
ImportError: No module named 'tensorflow.contrib'"
Also tried to downgrade the Tensorflow version, but still not working. Any feedback would be greatly appreciated.
Hi Edje, I am also encountering with same issue
Hi Edje I am also facing same issue
I am getting the same error as well
Jackie Staiger did you find any solution for this. If yes then please share this with us as well
@@jackiestaiger3056 Bro You need to Tensorflow downgrade to 1.5 and select the Image Detection code V.1.7 for git
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.
Traceback (most recent call last):
File "train.py", line 51, in
from object_detection.builders import model_builder
File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 20, in
from object_detection.builders import anchor_generator_builder
File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\anchor_generator_builder.py", line 22, in
from object_detection.protos import anchor_generator_pb2
File "C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\anchor_generator_pb2.py", line 16, in
from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2
ImportError: cannot import name 'flexible_grid_anchor_generator_pb2' from 'object_detection.protos' (C:\Users\admin\Anaconda3\envs\objectDetection\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\__init__.py)
What should I do ???
me too. please help?
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.
Traceback (most recent call last):
File "train.py", line 51, in
from object_detection.builders import model_builder
File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\model_builder.py", line 20, in
from object_detection.builders import anchor_generator_builder
File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\builders\anchor_generator_builder.py", line 22, in
from object_detection.protos import anchor_generator_pb2
File "C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\anchor_generator_pb2.py", line 16, in
from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2
ImportError: cannot import name 'flexible_grid_anchor_generator_pb2' from 'object_detection.protos' (C:\Users\Windows\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\__init__.py)
Hi! I see you are playing shooters. Are you considering to try Valorant?
I haven't heard of Valorant, but I'll check it out! I mostly play CS:GO and Apex Legends nowadays :)
@@EdjeElectronics Valorant is an upcoming fps from Riot Games (League of Legends developers). They promise a low ping, 128 tick rates and strong anti cheat. The game itself us a blend between CS:GO and Overwatch, where instead of buying grenades you should buy character abilities, that create tactical advantages.
Today you can have the chance to get a key for closed beta.
I ran into problems because this guide is a bit old and made for tensorflow 1. If you simply install tensorflow or tensorflow-gpu with "pip install tensorflow" you will get the latest version which is (right now) 2.10. But this tutorial is made for tensorflow 1. After installing all those pip packages, you cant just simply downgrade to tensorflow1 because many of the already installed pip packages do not support it. So this means I'm kind of stuck.
If you are also in this situation, my advice is to either:
A) Start over from scratch and this time make sure you install tensorflow 1 so that you may follow the exact steps in this tutorial video. You can do this by simply creating a new conda enviroment that will be completely blank. Pip packages are linked to their respective enviroment, so it's very easy to jump between different enviroment that uses different versions of stuff. You don't have to redo the steps of installing CUDA/cuDNN etc, those are still installed on your system. Simply run "conda create -n tensorflow1-new" and then "conda activate tensorflow1-new". Now you can start over, this time make sure to install tensorflow 1 and not 2. Don't run "pip install tensorflow-gpu" but instead specify version, like this "pip install tensorflow-gpu=1.12" (or whatever version you want to use). Now reinstall and all those pip packages that are mentioned in the video.
or
B) Keep using your already installed tensorflow 2 enviroment and learn how to build using tensorflow 2 instead. If you are not lazy, I recommend going this route instead, because it is always better to use a later version, and by using tensorflow 2 you may also use newer versions of CUDA and cuDNN. Check this list to see compatabalities between tensorflow and CUDA and cuDNN:
www.tensorflow.org/install/source_windows
For instance, with tensorflow_gpu-2.9.0 you can use cuDNN 8.1+ and CUDA 11.2+
Here is a good tutorial for getting started with Tensorflow 2: th-cam.com/video/cvyDYdI2nEI/w-d-xo.html
Sir can we run this in Google colab and if possible can you help me with the steps
Hi, want to ask, can i still done this if my laptop's graphic card is not Nvidea? Using intel graphic
Yes but you won't be able to use tensorflow-gpu as it is only compatible with Nvidia cards. You can still use tensorflow on the CPU tho.
@@aidos9753 So if I use tensorflow CPU I can just follow the other steps the same way, it just probably needs longer to train the network?
And as far as I understood CUDA and cuDNN are also for GPU support? Do I still need to install them?
@@offifee8022Correct, you don't need to install CUDA and cuDNN. Instead of issuing "pip install tensorflow-gpu" just do "pip install tensorflow". But training will take much longer!
@@offifee8022 That's correct. If you don't have an NVIDIA gpu you can use Tensorflow-CPU and do not need to install CUDA and cuDNN.
@@EdjeElectronics thank you very much!
I expected a longer training time, that's okay :)
I had trouble when trying to generate the TFRecord with this command:
"C:\tensorflow1\models
esearch\object_detection>python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record"
It says: "from object_detection.utils import dataset_util
ModuleNotFoundError: No module named 'object_detection'". Does anyone knows how to solve this?
You can try to recheck the label map in the training fold.
hello, have you solved this problem, i keep getting the same error and dont know what to do
Please slove this problem.
i have the same
pip install object-detection maybe?
Great tutorial!
Was using Cuda 10.0, Cudnn 7.6.5 for Cuda 10.0, conda latest version with python 3.5 in the environment and tensorflow-gpu 1.15 on an GeForce GTX 1080 with latest driver.
Had to install protoc command manually, add object_detection folder path to environment variables, compile the proto files 1 by 1 to ensure the output of the files, delete the matplotlib imports in visualization_utils.py as described in the appendix of your github and only use *.PNG files as input as i mixed the images types in the first place.
you have the algorithm of this tutorial.?
@@jonathanetorma9849 if you mean the codebase/repository it can be found here as stated in the comments of the video:
github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
if you ment the model that was used for learning i used the Faster-RCNN-Inception-V2 also as stated in the video or the github readme
I mean something like this www.pyimagesearch.com/2018/09/24/opencv-face-recognition/
Under How OpenCV’s face recognition works
Pls help me for our thesis
@@jonathanetorma9849 I saw your answer and I will take a look at it maybe today or tomorrow if I can figure it out for you and will give you feedback
Does anyone know how to count the detected objects?
i view don't have file setup.py in locations file C:\tensorflow1\models
esearch
me either
Did you solve it or not
I have the same error
did you solve this problem bro ,please?
Khánh Nguyễn Duy
1 giây trước
i did this,you direct to slim and delete file Build then run it.
Those who are also searching for the setup python file: github.com/tensorflow/models/blob/master/research/object_detection/packages/tf1/setup.py
21:45 : 6 classes you mean 6 and not 36 right?
yes it will be 6 , my detection was accurate on 6
It should be 6, he did it by mistake
Thanks a lot man. This will boost my work InshaAllah. A great explanation.
Again, thank you.
You're welcome! If you run in to errors, be sure to check my written guide, which is updated for more recent versions of TensorFlow: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
hey, just a small question .. can i use the trained model from my pc and run it on a pi?
Yes. U just need to convert your model.
This tutorial is too outdated, please update it
i got it with tensorflow gpu v 1.13 on this week
Me too, I managed to make it work with v1.15
@@denisardelean8067 i]m sorry guy what CUDA CUDNN your use i will try it today
@@rafaelromeromunhoz9826
Hello Rafael, I'm trying to Implement it, How did you generate the TF_Records?
@@denisardelean8067 Did you install everything as it is from step 2d?
I have made a working repo from the tutorials
tf 1.13.1
tf gpu 1.15
all thanks fro Edje Electronics for the great tutorials
github.com/mustafaazzurr/object_detection-with-Tensorflow-API
Good Day Sir. Can i ask a copy of your trained frozen_inference_graph of this tutorial? .. just want to compare with my trained frozen_inference_graph . Mine is slow in detecting. at what step did you stop in training? at what loss value?
@@jitzuzitro3305 it's slow also here, i tried the ssd v2 model and it worked way faster
@@jitzuzitro3305 for my dataset which contain over 1000 training images and 200 test images it took 50000 steps
@@muatafaalahmid7467 what is your graphics card sir? How many seconds/step did it take to train your model?
@@jitzuzitro3305 GTX1050 4gb
around 4-5 hours
THis tutorial is absolutely awesome! I love it so much. I can't thank you enough.
Important notes I've noticed while following this tutorial,
1.Type the full syntax command "conda create -n tensorflow1 pip python=x.x" *Python 3.6 is good enough* While creating your virtual environment, The default python version used with me was 3.7 which is not compatible with TensorFlow so far and I had to downgrade it.
2.The same problem but with TensorFlow version, I had Tensorflow 1.13.1, I had to downgrade it to 1.10.x to fix the error.
Follow this link for more details about the error causes:
github.com/tensorflow/tensorflow/issues/22794
Hey, did train your own model? I wanna train a model that recognize systems screens, like outlook and etc... Could give me a help?
Nikko Morabe fabricio.siqueira9 my Skype
Nikko Morabe m.facebook.com/fabricio.siqueira.148
@Nikko Morabe Can you help me please,I have a similar issue.
I just used Anaconda navigator to create the environment and it worked for me. Using python 3.5 and tensorflow 1.12
Job offer regarding the same contents from this video. If you are interested and confident then pm me.
Thanks
Guys. I have a problem. While executing python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
then,
ImportError: cannot import name 'fpn_pb2' from 'object_detection.protos
Do you know solution?
@Furkan Çelik you need to convert the fpn.proto to fpn_pb2 by adding .\object_detetction\protos\fpn.proto to the command he gave to convert the .protos file to _pb2, you can do this to any other file that has not been converted by just adding the file name after the protos part of my command
did you find a solution to this
Thanks for the tutorial. I made a pretty cool OCR system using this in addition to tesseract
can you share it? I am trying to do the same later.
@@aqiff123 I would like to but I worked on it as a team and it isn't mine to share if that makes sense.
Nah, its okay Man, Ive tried to follow this tutorial, but it seems like I am facing some problems 😭
Can u please help me I was getting an error
I was trying to slove it from 1 month
@@AgentOfLogos Can you share the environment you installed on your machine ?
num_classes: 36 (?)
very good, I don't do windows 10 but it was very helpful for object recognition and training.
Idea for another video - if that is at all possible:
Interface with google photos (API?) and pull in data it already has classified of people and objects
Interface with Google Image search type in a few search terms like Ace of Spades Card and download the result and use it as training.
Sidenote: I see you used GTX 1060 - I'm curious to see how it scales in speed of training going from 1060 via 1080 all the way to a 2080Ti
Finally is there a way to:
1. When watching a video/livecam note down the times when X object happened
2. When parsing pictures rename the pictures to the actual object found in them
3. Train the AI to understand an event as opposed to just an object - the difference between 'Paul is at 3:21 in the video' and 'Paul is jumping at 3:21 in the video'
Thanks again!
Hey @Airbag888! Thanks for your interesting questions. I believe there are tools for automatically downloading images from a Google Image search, but I can't seem to find them right now. Also, I know you asked about identifying individual people, here is a great article explaining how to do that: www.pyimagesearch.com/2018/09/24/opencv-face-recognition/
1. Yes, that would be pretty easy - take a look at this article: www.programiz.com/python-programming/datetime/current-time . If you want to see how to execute code only when a certain object is detected (like print the time and object name when a cat is detected), look at my Pet Detector video (code is linked in the description): th-cam.com/video/gGqVNuYol6o/w-d-xo.html
2. Yes, search for "cv2.imwrite" on Google, there are some good tutorials showing how it can be used to save files as a certain name.
3. That may be better for something like OpenPose. Take a look at this video to see a good use of OpenPose: th-cam.com/video/RHRQoaqQIgo/w-d-xo.html
Good luck!
Can you make a video on how to calculate the actual height of the objects detected?
Thanks for you tutorial!!👍 It really helps me.
What version of python and tensorflow are you using? I can't run the generate_tfrecord.py :(
@@sergid98 i have a same probelm
@@sergid98 1.5
I resolve the problem with tf1.5
Edje Electronics Thanks for tutorial it was of great help. 🙏
Edit: I solved everything now. If somebody runs into the same situation thats what I did.
my solution:
1. labelmap.pbtxt -> followed tutorial
2. import error (see below) -> follow Step 2F from this tutorial
3. my ide could not import "from nets import inception_resnet_v2". This "nets " folder is in "slim" folder . could not set the path right so I copied the whole "slim" folder into the "models" folder and it works now for me. I just don't know if my changes affect the results. we will see.
IDE: Pycharm
Env: tensorflow1=3.5 (should work with 3.7 (NOT TESTED!))
First Comment: First of all nice tutorial, thx @Edje Electronic. At the moment I am stuck at step 6 . when I try to train the model I receive this error:
Traceback (most recent call last):
File "train.py", line 51, in
from object_detection.builders import model_builder
File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\builders\model_builder.py", line 20, in
from object_detection.builders import anchor_generator_builder
File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\builders\anchor_generator_builder.py", line 22, in
from object_detection.protos import anchor_generator_pb2
File "C:\Users\marvi\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\protos\anchor_generator_pb2.py", line 15, in
from object_detection.protos import flexible_grid_anchor_generator_pb2 as object__detection_dot_protos_dot_flexible__grid__anchor__generator__pb2
ImportError: cannot import name 'flexible_grid_anchor_generator_pb2'
IDE: Pycharm
installed packages in tensorflow1 :
absl-py==0.7.1
astor==0.8.0
attrs==19.1.0
backcall==0.1.0
bleach==3.1.0
certifi==2018.8.24
colorama==0.4.1
contextlib2==0.6.0
cycler==0.10.0
Cython==0.29.10
decorator==4.4.0
defusedxml==0.6.0
entrypoints==0.3
gast==0.2.2
google-pasta==0.1.7
grpcio==1.21.1
h5py==2.9.0
ipykernel==5.1.2
ipython==7.8.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.15.1
Jinja2==2.10.1
jsonpickle==1.2
jsonschema==3.0.2
jupyter==1.0.0
jupyter-client==5.3.3
jupyter-console==6.0.0
jupyter-core==4.5.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
lxml==4.4.1
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.0.3
mistune==0.8.4
nbconvert==5.6.0
nbformat==4.4.0
notebook==6.0.1
numpy==1.17.2
object-detection==0.1
opencv-python==4.1.1.26
pandas==0.25.1
pandocfilters==1.4.2
parso==0.5.1
pickleshare==0.7.5
Pillow==6.1.0
prometheus-client==0.7.1
prompt-toolkit==2.0.9
protobuf==3.9.2
Pygments==2.4.2
pyparsing==2.4.2
pyrsistent==0.15.4
python-dateutil==2.8.0
pytz==2019.2
pywin32==225
pywinpty==0.5.5
pyzmq==18.1.0
qtconsole==4.5.5
Send2Trash==1.5.0
six==1.12.0
tensorboard==1.14.0
tensorflow-estimator==1.14.0
tensorflow-gpu==1.14.0
termcolor==1.1.0
terminado==0.8.2
testpath==0.4.2
tornado==6.0.3
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.11.15
widgetsnbextension==3.5.1
win-unicode-console==0.5
wincertstore==0.2
wrapt==1.11.2
I tried it with python 3.5 and 3.7 . still same traceback / Import error.
Any suggestions about how I can solve this situation?
Thanks for updating us with your solution! I appreciate it.
Edje Electronics you are welcome. thx for your tutorial!
Thanks for this clear tutorial, it helped me a lot. I am running the TF Lite on my Raspberry Pi 4B as you described in the other tutorial and it works great, slightly over 4 FPS.
Now I want to train and got the setup working with this tutorial, even with Tensorflow 2.2.0 :). It took some time, especially to get rid of all the errors in the jupyter notebook. (turning on Linux support in Windows and installing Ubuntu, trouble with wrong package versions etc) Great to finally see the test images pop up in the end :)
I have access to a nice tagged dataset with images. For each image the dataset contains a file with text on the position and decription of the objects of interest. However, all the tutorials I found use XML files, but the files in my dataset are in JSON format.
I tried some JSON to XML converters but that does not seem to work. I get XML files which look okay, but the conversion to CSV results in empty CSV files. Is there a way to use the JSON files as they are or do they need to be converted to XML before I can use then to run the training?
Sir, did get error when want to start the training that saying the tensorflow version not compatible with the ssd mobilenet v2? and ask to look the compatible at model_buid. How do you solve this? Thanks
@@domionding4179 you need a version like ssd mobilenet fpn lite 320x320
Thanks so much for these videos, all your instructions have been on-point! Is the process to classify 3d items (I believe you mentioned LEGO at some point?) the same as for something like a playing card? but just many more pics of the object from different angles?
You can master Object Detection in this specialized practical online course: learnml.today
Hi Edje Electronics
Thank you for this great introductory step by step tutorial to object detection using TF GPU, I have gone through the tutorial and managed to successfully complete it, although I struggled for sometime while trying to set up the tensorflow GPU on my machine, that was the most difficult task due to clashes between versions of TF, cuda and cuDNN and other python libraries and packages.
I have then adapted the tutorial to a more complicated dataset detecting tiny objects with minute characteristics, and tried three different classifiers Faster RCNN, R FCN & SSD, the two stage detectors (CNN family) performed way better than the one stage detector (SSD) same as you experienced in your tutorial, my target was not speed, but precision and accuracy, and the CNN family are known to be more precise than the likes of SSD, Yolo and RetinaNet, although I would like to try YoloV3 as I read it is catching up in terms of precision -mAP.
I did not get the best of recall as my dataset had only few thousands of images and I am planing to augment it, I also got around 10% of false positives for Faster RCNN & R FCN, this is due (in my opinion) to the fact that the objects the models were detecting were very small in size and very similar in shape... I am wondering if there are any hyper-parameters I can tweak in order to improve the accuracy, recall and precision (in addition to drastically augmenting the dataset it is in the order of thousands and my plan is to augment it to tens or even hundred thousands of images)
I appreciate your view on this, and thank you again for this eye opener on object detection.
Approximately how many pixels make up the smallest of objects you are trying to identify? Even a neural net will have limitations for inference if there is not enough inputs (in this case pixels) to make an accurate prediction on. (Perhaps why you are getting false positives as you say)
Hi Youcef! You're welcome, and thanks for the good question! @Aidos is right, it is difficult for neural networks to accurately detect small objects with minor differences. I'm not sure which hyper-parameters you might be able to change to help improve accuracy, I haven't tried that yet. I do know that my playing card detection performed MUCH better when I trained it using 50,000 synthetically generated images on YOLOv3. Having a huge number of accurately labeled training images will definitely help accuracy. So, if you want to improve accuracy, my first recommendation would be to use more training images. Also, YOLOv3 was more accurate for me than Faster-RCNN was.
Here's a video showing my YOLOv3 card detection model in action. At 6:26 in the video, you can see a comparison between YOLOv3 and Faster-RCNN performance. th-cam.com/video/Nf3zBJ2cDAs/w-d-xo.html
@@EdjeElectronics Great reply and thanks so much for putting this tutorial out there!
hey nice to hear that, which version of tensorflow did you use ?
@EdjeElectronics Hi, I'm in the middle of Step 6 trying to run the training, but when I do so, I come up with "ValueError: No variables to save. " Does this issue sound familiar?
Me: Let's try it!
My MacBook Air: Well, yes, but actually no
You can do it on any laptop theoretically but it will just take longer. If it still doesn't work, consider using a cloud instance like AWS and you can run it on your Macbook Air
Good tutorials friend, very informative and helpfull for me. Thanks👍
I am getting this error while exporting Inference Graph.
File "C:\Users\Masked Lord\AppData\Roaming\Python\Python35\site-packages\tensorflow\contrib\framework\python\ops\gen_variable_ops.py", line 59, in _InitOpDefLibrary
op_def_lib.add_op_list(op_list)
NameError: name 'op_def_lib' is not defined
Thanks a lot...grate tutorial...everything works fine by using anaconda with python 3.6...
Hi Edje, a few questions:
What FPS speeds were you experiencing for inference?
Are you familiar with Tensor RT/able to integrate it into this tutorial to allow the performance speeds to increase?
I tried to deploy this code on an AWS P3 instance which has a Tesla V100 GPU and experienced no significant change in speed.
Are you able to suggest what speeds I should expect when running a Faster-RCNN model on a P3 instance?
Thanks in advance! Your tutorial is the best on TH-cam!
Hey Aidos, I can answer at least one of your questions! I get 6.5 - 7.5 FPS when running a Faster-RCNN model on my gaming PC (see specs in video description). I get 9 - 11 FPS when running an SSD-MobileNet-V2 model. This is with the Object_detection_webcam.py script running at a resolution of 1280x720. The FPS actually doesn't change much when I reduce the resolution to 640x360.
Sorry, I'm not very familiar with Tensor RT, so I don't know how much it would increase the speeds. Also, I haven't tried deploying any of this on a cloud computer, so I'm not sure what to expect for inference speeds.
Thanks for always helping out! I'm hoping to make an updated version of this video that hopefully simplifies the process a bit, but I don't have time right now! It's something I'm shooting to get done in the next 6 months.
@@EdjeElectronics Thanks Edje! I'm experiencing a similar FPS (about 5.5 on average) using a Quadro P2000 5GB. I realise now that maybe it would be best to upgrade to a better GPU with possibly more VRAM to achieve better processing speeds.
No rush on future videos. Just trying to disseminate what affects processing speeds across different deep learning environments. Thanks again!
Hi there :) Its a great tutorial for beginners. I have successfully built an object detection model using faster CNN and it is working perfectly fine. Thanks for your share. It helped a lot to gain knowledge on open cv modules and deep learning.
Is there any way to see more of your work through repositories? I would love to stay in touch with you for more applications in the future. cheers :)
Thanks for the kind feedback! I'm glad you were able to get it working. Keep an eye on my GitHub account and this TH-cam channel, I will be posting more work some time next month!
@@EdjeElectronics Thanks for the reply. I will sure keep an eye on your work. But I have one question regarding checkpoints that gets created while training.
we are using RTX 2080 graphics card which has high-speed GPU processing and it is training 10000 steps in just 20 minutes and it is hard to keep an eye on training process because of its speed. As per model settings, checkpoints are creating every 10 minutes. But I want checkpoints to be created every 5 minutes so I could stop the model when the loss reaches to 0.05. Could you give me your valuable suggestion on this how to modify my checkpoints? cheers :)
Thank you so much for the informative content
Loved it, thanks buddy
Awesome tutorial 👍
@
Edje Electronics, Amazing video! I have a question. What is the difference between "test" and "train" folders? And what is the purpose of each of them?
A neural network needs both train and test data to be built. In a nutshell, the model is 'trained' on the train dataset. Then, that model is used on the 'test' set to validate how accurate the model is. The train and test data needs to be different otherwise the model could be considered 'cheating'. You want the model to work on images it has never seen before which is why our test and train data is different.
Hi
Amazing tutorial!!!!
I wanted to use the trained model to detect objects in Visual C++. Is there any suggestion you can give on how to do it? Or any video which would help me ? Please help soon!!
so many errors, so many unreasonable issues
but i made it ! thank you
한국인 반갑습니다 ㅋㅋ 저도 여러 에러와 이슈들을 거치고 있는데.. 무엇보다 옛날 영상이라 지금의 텐서플로우와 버전이 맞지 않는 부분에서 에러가 계속 나네요 ㅎㅎ
현재는 faster_rcnn_inception_v2가 텐서플로우 1.12에서 빌드된 것이라 현재의 2.2 버전과는 맞지 않는 부분에 막혀 있는데.. 텐서플로우를 과거 버전으로 다시 받던가, 아니면 모델을 영상에 나와 있지 않은 최근의 것으로 찾던가 해야 한다고 생각합니다만 혹시 이 부분 어떻게 해결하셨나요?
@@제작자납신다 알려드리고 싶은게 많은데 댓글이라는 한계때문에 짧게 말씀드리면
텐서플로1.5 이하 버전, 넘파이 1.7버전으로 강등이 가장 중요합니다. 쿠다 버전도 신경써주시고... 그리고 경로설정도 많이 중요하니까 신경써주시면....어느정도 에러는 잡히지 않을까 싶네요^^
@@Spreme91 답변 정말 감사합니다 ! 바쁘시겠지만 제 오픈채팅 개인톡 링크로 와주시면 더 감사하겠습니다
open.kakao.com/o/sx06rymb
부탁드립니다 !
Good video, but please can you increase your font size for the videos
Excellent video bro!! Does this API use Keras as well?
Where did u get tutorial.py?
Thank you, this video really helped me a lot!
In a prior video you did this with opencv. Is there a technical reason you started doing more in tensorflow? I'm planning to follow your videos to train a cat food dispenser to feed only when the two skinny cats are in the room. All 3 cats are distinctly different looking.
Good question! In OpenCV, I had to come up with my own specific algorithm to detect the cards: find card-sized contours, isolate the corners, and perform template matching to identify the card. It took several months to develop the algorithm, and it isn't very robust. It only works with solid backgrounds, only with one brand of card, and only if the cards aren't overlapping. With TensorFlow, the detection is more reliable, and I don't have to come up with a specific detection algorithm - the "machine learning" does that for me. The drawback to using TensorFlow is that it takes much more computational power.
The "easy" way to do your project would be to use TensorFlow. Train it using 500+ images of your three different cats, and if they are visually distinct enough, it should be able to distinguish between them. The harder but more computationally efficient way is to come up with your own OpenCV algorithm to identify the cats. Good luck with your project, let me know if you have questions!
Hey! I'm getting this error:
Traceback (most recent call last):
File "train.py", line 48, in
from tensorflow import framework as contrib_framework
ImportError: cannot import name 'framework'
Can you help me with that?? (Im really not the only one)
i have face same issue
Hi @Edje Electronics, I have a problem while initialising the training
File "train.py", line 52, in
from object_detection.builders import model_builder
File "C:\tensorflow1\models
esearch\object_detection\builders\model_builder.py", line 39, in
from object_detection.utils import tf_version
File "C:\tensorflow1\models
esearch\object_detection\utils\tf_version.py", line 17, in
from tensorflow.python import tf2 # pylint: disable=import-outside-toplevel
ImportError: cannot import name 'tf2'
Thank you so much! this is amazing :)
AMAZING!! Nice info.. Semoga Berguna ilmunya ya, Mas!
When try to run object_detection_tutorial.ipynb getting this error "ImportError: DLL load failed while importing win32api: The specified module could not be found." Tried multiple times but no luck. Please help
same...
@Edje Electronics -> Working with TF v.1.13.1 !!!
Thanks for attention :)
hi guys, question for the community: when creating custom classifications, should i use the same model and just keep 'teaching' it new classifications or should i create new models for each classifications. i do a lot of work with animal behaviour and if i wanted to switch to whatever animal i was observing at the time, would it get confused. if it, for example, knew what a dog looked like but then i wanted it to exclusively look for another species, would this be ok?
thanks for your help!
You could definitely build on top of existing models but in my opinion it would be harder to adapt them for custom classifications since you would need a really good understanding of what they are trained to detect. It would be better to custom train a model exclusively with your own data.
Excellent tutorial! But I have a problem. Is there any way that during the training I can save from one step to stop the process without losing the past steps? It seems that my program wont save any progress during the training
@Edje Electronics, I am getting error saying that the faster_rcnn_inception_v2 is not supported when running the train.py file