Тёмный

How To Train an Object Detection Neural Network Using TensorFlow (GPU) on Windows 10 

Edje Electronics
Подписаться 30 тыс.
Просмотров 998 тыс.
50% 1

This tutorial shows you how to train your own object detector for multiple objects using Google's TensorFlow Object Detection API on Windows. An updated written version of the tutorial is available at github.com/EdjeElectronics/Te... .
If you have questions, I usually respond more quickly on Twitter, so send me a tweet @EdjeElectronics ! / edjeelectronics
Here's the relevant specs of the PC I used for training.
GPU: GeForce GTX 1060 6Gb
CPU: Intel i5-7600
RAM: 16GB DDR4-2133
----Other links referenced in the video-----
How to Install TensorFlow on Windows: • How To Install TensorF...
TensorFlow Object Detection API repository: github.com/tensorflow/models
TensorFlow Model Zoo page: github.com/tensorflow/models/...
LabelImg utility: github.com/tzutalin/labelImg#...
----Time links to each step in the video----
1:54 Step 1. Install TensorFlow-GPU
3:14 Step 2. Set up Object Detection directory and Anaconda virtual environment
15:21 Step 3. Gather and label pictures
18:35 Step 4. Generate training data
20:16 Step 5. Create label map and configure training
23:46 Step 6. Train object detector
26:54 Step 7. Export inference graph
27:45 Step 8. Try out your object detector!!
Credit goes to Dat Tran for writing the xml_to_csv.py and generate_tfrecord.py scripts, which I took from his Raccoon Detector tutorial (towardsdatascience.com/how-to.... Thanks also goes out to Sentdex (www.pythonprogramming.net) for writing a tutorial on how to use the Object Detection API on Linux.
Music: Mason Donovan - Coffee House
/ coffee-house

Наука

Опубликовано:

 

18 фев 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5 тыс.   
@EdjeElectronics
@EdjeElectronics 5 лет назад
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 !
@nicholaspitti8171
@nicholaspitti8171 5 лет назад
This step(which idk if is neccesary) still wasnt added to the written tutorial.-> 12:05 set PATH=%PATH%;PYTHONPATH
@EdjeElectronics
@EdjeElectronics 5 лет назад
@@nicholaspitti8171 Yep, I removed it from the written tutorial because it isn't necessary!
@kushagra6495
@kushagra6495 5 лет назад
i am constantly getting module not found error for tensorflow in jupyter notebook.I followed the instructions on the github page.
@AffectiveApe
@AffectiveApe 5 лет назад
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!
@SuperHansburger93
@SuperHansburger93 5 лет назад
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
@user-cv4jm2sz5k
@user-cv4jm2sz5k 2 года назад
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
@jubileem.sibandajubbs2175
@jubileem.sibandajubbs2175 2 года назад
thank you so much I had run out of options.
@erwanmaulana3507
@erwanmaulana3507 2 года назад
THANKYOU SO MUCH BRO👍
@rufusdwamena8866
@rufusdwamena8866 2 года назад
i love you
@ivamarinova2433
@ivamarinova2433 2 года назад
i love you more
@AwesomeLemur
@AwesomeLemur 2 года назад
thank you kind sir!
@ahmadhasan3258
@ahmadhasan3258 4 года назад
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!!
@AlexAcostaB
@AlexAcostaB 4 года назад
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!
@MajinVegeto89
@MajinVegeto89 2 года назад
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.
@EdjeElectronics
@EdjeElectronics 6 лет назад
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!
@markmackenziesmith
@markmackenziesmith 6 лет назад
This is a great tutorial, thanks for making it. I think I found a small error at 12:01 (ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Rgpfk6eYxJA.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?
@EdjeElectronics
@EdjeElectronics 6 лет назад
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 :)
@jigarparekhplus
@jigarparekhplus 6 лет назад
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.
@EdjeElectronics
@EdjeElectronics 6 лет назад
It seems like a few people are having this issue, so I will look in to it and try to figure it out!
@mayankmehta9697
@mayankmehta9697 6 лет назад
yeah that would be of great help
@amankaushik5833
@amankaushik5833 4 года назад
very less start from scratch tutorials on youtube Thank you!!
@bmoore813
@bmoore813 4 года назад
What a fantastic Tutorial. I love the thoroughness. :)
@MicahYeah
@MicahYeah 4 года назад
God dude the beginning camera footage is so cool to watch
@relaxationandmeditation4249
@relaxationandmeditation4249 4 года назад
How much time and steps it took to train your dataset.?? @Good ki... Thank you
@KamilRiyas
@KamilRiyas 6 лет назад
Spent a whole night with this. Totally worth it. Amazing tut man...
@dawoodzaidi2018
@dawoodzaidi2018 6 лет назад
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?
@PixelGM
@PixelGM 4 года назад
Why worth it?
@mechaitanyashintre
@mechaitanyashintre 3 года назад
@Program-o-warrior hello sir could you please help me out. I got version problems with this video
@mechaitanyashintre
@mechaitanyashintre 3 года назад
@Program-o-warrior bro kindly help
@cosmicbathbomb
@cosmicbathbomb 5 лет назад
One of the not just best but one of the greatest video ever made in youtube for beginner .We can only say that you are the best thank you.❤❤❤
@manueljonaskranz6966
@manueljonaskranz6966 2 года назад
One of the cleanest videos i´ve ever seen
@otakuguild5603
@otakuguild5603 3 года назад
thanks for all your hard work you put in making this video
@leafiadias96
@leafiadias96 2 года назад
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
@dr.ramkumarlakshminarayana9800
@dr.ramkumarlakshminarayana9800 4 года назад
Patience required to complete, very excellent tutorial
@pierocasusol7279
@pierocasusol7279 5 лет назад
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
@maheqsaalamsyah4315
@maheqsaalamsyah4315 4 года назад
Bro why is the code content in object_detection_tutorial.ipynb not same with the tutorial you make?
@jesuschrist1501
@jesuschrist1501 4 года назад
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.
@EdjeElectronics
@EdjeElectronics 4 года назад
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
@syirrus
@syirrus 4 года назад
Thank you for making this tutorial. Massively helpful!
@NextLevelCode
@NextLevelCode 4 года назад
@Edje Electronics I would like to report using your tutorial as a starting point and a lot of googling! I was able to: 1. Translate all the required information to linux (Ubuntu 18.04) 2. Get Tensorflow Rocm working (Vega 56 AMD GPU) 3. Swap out the dataset with my own. Vega is humming along as I type this. Training now. Thanks for putting this detailed tutorial together. :)
@EdjeElectronics
@EdjeElectronics 4 года назад
Great! Glad it worked out! This video is getting a little dated, but the process is mostly the same. Just lots of version management to worry about!
@rawahamuhammad7805
@rawahamuhammad7805 4 года назад
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
@GarethBolton 4 года назад
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
@rawahamuhammad7805
@rawahamuhammad7805 4 года назад
@@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.
@ano8929
@ano8929 4 года назад
Which python and tensorflow version did you use?..I am getting many errors using tf 1.5
@mechaitanyashintre
@mechaitanyashintre 3 года назад
@@ano8929 same here
@mechaitanyashintre
@mechaitanyashintre 3 года назад
@@rawahamuhammad7805 kindly help for newer version
@SuperNinja201
@SuperNinja201 4 года назад
Hi, is there a way to get only the precision, recall, true positive, false positive and false negative values? I found that these values are calculated in the metrics.py file but I am unable to print/write these results to a csv file.
@tomdousek5819
@tomdousek5819 2 года назад
THis tutorial is absolutely awesome! I love it so much. I can't thank you enough.
@rufusdwamena8866
@rufusdwamena8866 2 года назад
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
@arsamali8584
@arsamali8584 6 лет назад
Desperately waiting for your video on implementing this on raspberry pi
@EdjeElectronics
@EdjeElectronics 6 лет назад
I'm working on it now, thank you for your interest! I'm hoping to have it done in a few weeks :)
@Matthewgarsteck
@Matthewgarsteck 6 лет назад
subscribing
@prodbyrish
@prodbyrish 3 года назад
how did u make the model tho? Like what loss function did u use??
@kushagraverma9169
@kushagraverma9169 3 года назад
hey can someone tell me which model works for tensorflow 2 ? as this video is only for tensorflow 1
@nguyentuan4589
@nguyentuan4589 2 года назад
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.
@EdjeElectronics
@EdjeElectronics 2 года назад
Thanks for helping out!
@alexroque91
@alexroque91 6 лет назад
Great Tutorial! Go to 16:20 for cat-cable ultimate battle!
@TheAndre2131
@TheAndre2131 4 года назад
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
@petermeier6501
@petermeier6501 4 года назад
yeah, I'm facing the ' no module named contrib' -error although I'm using tf 1.14 since the beginning. mysterious :O
@TheAndre2131
@TheAndre2131 4 года назад
@@petermeier6501 can you copy paste the whole stack trace of your errors?
@petermeier6501
@petermeier6501 4 года назад
@@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 ?
@TheAndre2131
@TheAndre2131 4 года назад
@@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
@petermeier6501
@petermeier6501 4 года назад
@@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.
@Lsc229
@Lsc229 4 года назад
what is the different between this model and yolo model?
@GunRampage
@GunRampage 4 года назад
Hi , if i want to train a specific type of object (eg. water bottle), for my image do i include 2 water bottle and only label one of it in the image?
@swombhai6493
@swombhai6493 5 лет назад
Does anyone know how to count the detected objects?
@kittuthegreat28
@kittuthegreat28 5 лет назад
i couldn't get the images at 15:00 ,please help.
@dudewhat9329
@dudewhat9329 4 года назад
me neither, have you solved it yet?
@mishanksingh1433
@mishanksingh1433 3 года назад
Hello, How do I allow continual training of my object detection model?
@julianfbeck
@julianfbeck 5 лет назад
do you know if i can use the ibm cloud anotation tool to mark the images?
@awaisahmadsiddiqi6505
@awaisahmadsiddiqi6505 5 лет назад
when i try to run train.py AttributeError: 'KeepAspectRatioResizer' object has no attribute 'resize_method' please help
@Creek1575
@Creek1575 4 года назад
Sir @Edje Electronics, does this work even if im not using Tensorflow-Gpu?
@wd-rmf60
@wd-rmf60 4 года назад
how can i see the accuracy graph like loss graph using tensor board? please say me.
@arunkarthik3877
@arunkarthik3877 4 года назад
can we use ssd_mobilenet_v2_coco instead of ssd_mobilenet_v2_quantised_coco model for this
@jefferylawrence992
@jefferylawrence992 4 года назад
Sir can we run this in Google colab and if possible can you help me with the steps
@cirianar
@cirianar 2 года назад
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>
@mohamedimran3193
@mohamedimran3193 2 года назад
@Edje Electronics, I'm also getting this error. Can someone help, please?
@cirianar
@cirianar 2 года назад
@@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.
@mohamedimran3193
@mohamedimran3193 2 года назад
@@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
@Suliemankh
@Suliemankh 2 года назад
@@mohamedimran3193 the setup.py in the slim folder
@77435book
@77435book 4 года назад
is the test set same as validation set?
@user-wp5cg8nc5s
@user-wp5cg8nc5s 4 года назад
Could you tell me how I print name of object as text when detected?
@aidos9753
@aidos9753 4 года назад
Use the solution here which also gives coordinate information and detection confidence: github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/69
@prashantgautam8983
@prashantgautam8983 4 года назад
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
@EdjeElectronics
@EdjeElectronics 4 года назад
Thanks! I will update my TensorFlow repository with this info when I get a chance.
@badcode8037
@badcode8037 4 года назад
I am still getting the same error :/
@peterscales6020
@peterscales6020 4 года назад
@@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.
@badcode8037
@badcode8037 4 года назад
@@peterscales6020 Thanks a lot. It finally worked
@badcode8037
@badcode8037 4 года назад
@@peterscales6020 getting another error when i ran the train.py in cmd- AttributeError: module 'tensorflow' has no attribute 'contrib'
@anmjubaer
@anmjubaer 4 года назад
I am getting: AttributeError: module 'tensorflow' has no attribute 'contrib'. Any solution?
@AeroAndZero
@AeroAndZero 4 года назад
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
@omkarpatil8720
@omkarpatil8720 4 года назад
Edje Electronics Thanks for tutorial it was of great help. 🙏
@abedachref3691
@abedachref3691 3 года назад
what alternative tool do i use instead of labelimg to labes non linear lines (transmission lines ) ; labelimg uses boxes which isn't helpful in my case
@rabiabibi8634
@rabiabibi8634 5 лет назад
Hi! I have no words to thank you. You really helped me. May Allah Pak bless you. Bundle of thanks :)
@hamzadbz1
@hamzadbz1 5 лет назад
Have you trained a model?
@aimanhaziq5246
@aimanhaziq5246 5 лет назад
Hi, want to ask, can i still done this if my laptop's graphic card is not Nvidea? Using intel graphic
@aidos9753
@aidos9753 5 лет назад
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.
@offifee8022
@offifee8022 5 лет назад
@@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?
@EdjeElectronics
@EdjeElectronics 5 лет назад
@@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!
@aidos9753
@aidos9753 5 лет назад
@@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.
@offifee8022
@offifee8022 5 лет назад
@@EdjeElectronics thank you very much! I expected a longer training time, that's okay :)
@mohamedtouati9663
@mohamedtouati9663 5 лет назад
i need to classify my dataset of car make models images files with tensorflow but i work with more then 1600 car models ? which one i should choose it as a detector ? and i should use labelimg ? or i just work with the image ?
@brianthemessiah5106
@brianthemessiah5106 4 года назад
@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?
@keshavpatta9946
@keshavpatta9946 4 года назад
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.
@jonosmilesalot
@jonosmilesalot 4 года назад
Did anyone solve this?
@moinkhan8900
@moinkhan8900 4 года назад
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
@moinkhan8900
@moinkhan8900 4 года назад
github.com/tensorflow/models/issues/6423 U can follow this thread
@MarcoW125
@MarcoW125 5 лет назад
how can i print the detecetd objects ?
@awaisahmadsiddiqi6505
@awaisahmadsiddiqi6505 5 лет назад
i am also looking for a solution for this problem
@alyasrat7086
@alyasrat7086 5 лет назад
in object_detection folder> utils folder > open visualization_utils.py and find "display_str = str(class_name)" after that line of code write print(display_str).
@AlanDeRossett
@AlanDeRossett 4 года назад
very good, I don't do windows 10 but it was very helpful for object recognition and training.
@coffeebean2541
@coffeebean2541 3 года назад
@Edje Electronics, I am getting error saying that the faster_rcnn_inception_v2 is not supported when running the train.py file
@jevoyjames2172
@jevoyjames2172 5 лет назад
Great tutorial man! My question is does this tutorial work with the current latest versions of tensorflow (v1.12), cuda (v10) and cuDNN (v7.4.1)?
@EdjeElectronics
@EdjeElectronics 5 лет назад
Thanks, and good question! The latest version of TensorFlow supports CUDA v9.0 and cuDNN >= v7.2. The instructions given in this procedure should still work (the last version I tried with was TF v1.10, and everything worked). The only major change is that the train.py file now lives in the object_detection/legacy folder; you have to move it back into the object_detection folder to run it. It was replaced with model_main.py, but that requires some extra steps to get working properly, so I just keep using the train.py file.
@user-fi5ly8me9j
@user-fi5ly8me9j 5 лет назад
Ive tried with v10 and it did not work ,throws a bunch of errors with TF v1.9.So i just installed Cuda v9 and everything worked.Also chrome browser by default now blocks jupypter printing the images from the tutorial so you have to click Untrust at the top right corner and then click Trust.It will rerun the jupyter test script and this time it will work
@subscripciones
@subscripciones 6 лет назад
The best tutorial on youtube by far!! Thank you so much. I did everything and works great, my question is: in Tensorboard, in the Projector Embeddings, you see 1024 points, 396 dimensions. I'd like to extract the data (classifiers labels and images) to create the tsv and sprite, or whatever is necesary to see the images in the projector. How do I do that_ I'd great if you make a tutorial or upload code to do that.
@hahahahah3038984
@hahahahah3038984 4 года назад
faster_rcnn_inception_v2 is not compatible with tensorflow v2.x Is there any way other than uninstall current version and install 1.x older versions? Would you recommend me other model compatible to current tensorflow version?
@painboy66
@painboy66 4 года назад
can this isntallation and setup be done for the the CPU version as well?
@jeroennasnl1156
@jeroennasnl1156 6 лет назад
So, I ran this successfully (with the occasional hick up here and there, especially around the protocs) and because I don't have a GPU, it trained over 5 days on my CPU. But I got there. Thanks to Edje! I'm recognizing parked cars, as the goal is to count the amount of parked cars in my neighborhood (for a community project) without manually counting them. How would anybody take the next step and count the amount of recognized parked cars? Suggestions are highly appreciated!
@EdjeElectronics
@EdjeElectronics 6 лет назад
Hi Jeroen, cool idea for an object detection application! I also want to count objects, except in my case they will be playing cards :) . I haven't started working on it yet, but I do know that the detection results are stored in the boxes, classes, scores, and num variables that are assigned on line 101 in Object_detection_webcam.py . You might be able to figure out how use them to obtain a count of the number of objects above a certain score threshold, which would tell you how many of the objects are in the current frame. Here's a comment I wrote that shows how to use the "classes" variable to print the top detection result for each frame. Good luck! ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Rgpfk6eYxJA.html&lc=UgxOWJuGXzOICoEpp-94AaABAg.8gWd_4PpDUy8gXmbG2XvVh
@jeroennasnl1156
@jeroennasnl1156 6 лет назад
Thanks for your quick reply! I'll let you know how I move forward with this!
@ShauvikChoudhury
@ShauvikChoudhury 6 лет назад
heyy how did you solve the protoc error ?/
@jeroennasnl1156
@jeroennasnl1156 6 лет назад
Shauvik Choudhury trying out all combinations of versions until I found one that worked (of course it was the last one I tried....). That was not the most academic approach, but it did the trick 😎
@michaelokiro8393
@michaelokiro8393 6 лет назад
lol. dont feel bad. same was the story of penicillin. and it worked for me too
@dharania4434
@dharania4434 4 года назад
hey, just a small question .. can i use the trained model from my pc and run it on a pi?
@dustinramiro4609
@dustinramiro4609 4 года назад
Yes. U just need to convert your model.
@nirajchotu6498
@nirajchotu6498 3 года назад
Hi for step 5b. If I selected ssd v2 model to be used, Won't I have to edit that and not the the faster v2 interception.pet?
@EdjeElectronics
@EdjeElectronics 3 года назад
Yep, you'll want to edit the ssd_mobilenet_v2_coco.config file instead. The changes are all similar to what I show for the faster_rcnn config file.
@bibibiti1098
@bibibiti1098 Год назад
Thank you bro 😊
@hemanthkumar7210
@hemanthkumar7210 4 года назад
Hi, how can we write down the information appeared on the rectangular boxes on the console? Example: if there is a car in the video, how can we get the information in console, saying this is the car appeared at this time in the video can we do that ?
@miharbi00
@miharbi00 6 лет назад
This video was very useful. Thanks a lot. I had 2 errors when training. First one TypeError: __init__() got an unexpected keyword argument 'dct_method'. Fixed this one by removing the 110th line "dct_method=dct_method" in object_detection/data_decoders/tf_example_decoder.py. Second error was this: TypeError: Expected int32, got range(0, 3) of type 'range' instead. Fixed this one like this: Go to object_detection/utils/learning_schedules.py Replace line 153 with this: tf.constant(list(range(num_boundaries)), dtype=tf.int32), So if anyone else has the same issues this is how I fixed it.
@EdjeElectronics
@EdjeElectronics 6 лет назад
Thanks Evpatoria! A few people have had that dct_method issue now, so I'll add the fix to my pinned comment.
@limyee1000
@limyee1000 6 лет назад
hi, I've removed line 110 as you said, but im still getting the exact same error? Even I've tried re-download the models-master file. I'm using tensorflow 1.5(cpu) and using python3 to execute Do you have any idea about the error?
@enzolongobucco4914
@enzolongobucco4914 4 года назад
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!
@enzolongobucco4914
@enzolongobucco4914 4 года назад
IMPORTANT: numpy must be 1.16 or above
@imtirtha
@imtirtha 4 года назад
In which portion of the object_dectection_image.py file contains the "comparison between the trained model and test image code"? Could you please help me with the solution??
@supermango1757
@supermango1757 4 года назад
Can this be done on mac os if you run the cmd prompt commands in terminal?
@satyamedh
@satyamedh 4 года назад
no, not all tuff supported. also no cuda, cudnn. dont think of programming ai if you're on a mac
@rajmeetsingh1625
@rajmeetsingh1625 4 года назад
facing error like this File "generate_tfrecord.py", line 23, in flags = tf.app.flags AttributeError: module 'tensorflow' has no attribute 'app' please help
@presidentislive6297
@presidentislive6297 4 года назад
Use tf-gpu version 1.15
@aspenplastics
@aspenplastics 4 года назад
@@presidentislive6297 I'm using tensorflow-gpu 2.1.0, are you saying i need to go backwards and use 1.15?
@mohamedfarj2825
@mohamedfarj2825 4 года назад
did you find a way to solve the error ? i got the same issue
@busekoseoglu979
@busekoseoglu979 3 года назад
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.
@muhammadahmadraza3145
@muhammadahmadraza3145 3 года назад
C:\tensorflow1\models esearch\slim find it here
@nguyenduykhanh7888
@nguyenduykhanh7888 3 года назад
i did this,you direct to slim and delete file Build then run it.
@nesacristin2913
@nesacristin2913 3 года назад
@@muhammadahmadraza3145 should i change directory to slim or move setup.py to folder research ??
@anandkishoriit
@anandkishoriit 3 года назад
@@nesacristin2913 move to folder reserach it worked
@anandkishoriit
@anandkishoriit 3 года назад
move to folder reserach it worked , move build to folder reserach it worked
@srinikethanr1056
@srinikethanr1056 4 года назад
hey, Edge electronics am able to get the output for webcam but I am not getting the output for the image I have changed the number of classes. the python code is running and displays the output but without detecting the image [like there are no rectangular boxes and on]
@sorpiseth6917
@sorpiseth6917 4 года назад
hi! I have a problem with detection.py, I try to do as your video but when I run detection (for image) the result is nothing, that mean do not have bonding box.
@kenlabadan3502
@kenlabadan3502 2 года назад
please help me with this error: (tensorflow1) C:\tensorflow1\models esearch>python setup.py build python: can't open file 'C:\\tensorflow1\\models\ esearch\\setup.py': [Errno 2] No such file or directory
@shahzebawan5540
@shahzebawan5540 Год назад
I am also facing the same issue
@shahzebawan5540
@shahzebawan5540 Год назад
you should try other models like tf 1.1 and so on , one of them have the setup.py in research folder
@kenlabadan3502
@kenlabadan3502 Год назад
@@shahzebawan5540 Thank you.
@manjari99
@manjari99 Год назад
@@shahzebawan5540 Hi, Can you elaborate I'm stuck at this?
@Nicky355
@Nicky355 9 месяцев назад
I'm stuck at here too
@alanpolanco984
@alanpolanco984 3 года назад
I had this problem running jupyter file: "ImportError: DLL load failed importing win32api". Just type "conda install pywin32" and reaload. It works for me.
@sergiomc
@sergiomc 4 года назад
Hi. On your example,your frozen file model is about 50Mb. But mine is 200 or 300 Mb. Why is this big? Is there a problem with the construction or anything im doing? And the file size impacts on video detecting? Thanks for your help.
@milan_shah
@milan_shah 4 года назад
how to use this repo for the BDD100k dataset? Because the main problem is in BDD100k, all the training labels for all the training images are in a single Jason file unlike the one shown here where there is a separate .XML label file for each image! Thanks in advance!
@sreelakshmiks4813
@sreelakshmiks4813 3 года назад
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
@theaussieengineer8542
@theaussieengineer8542 3 года назад
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
@marwanashraf5874
@marwanashraf5874 3 года назад
@@theaussieengineer8542 could you explain in steps what should I do?
@theaussieengineer8542
@theaussieengineer8542 3 года назад
@@marwanashraf5874 I will get onto putting something together that explains the changes and link it as soon as I can.
@marwanashraf5874
@marwanashraf5874 3 года назад
@@theaussieengineer8542 thanks in advance!, actually my graduation project is mainly depending on this step.
@sorarose8360
@sorarose8360 3 года назад
@@theaussieengineer8542 so we'll have to replace the whole thing? or what please inform us whenever you can!
@nontawatnokpet2543
@nontawatnokpet2543 3 года назад
i view don't have file setup.py in locations file C:\tensorflow1\models esearch
@shawntaekyukang2343
@shawntaekyukang2343 3 года назад
me either
@monaibrahim1482
@monaibrahim1482 3 года назад
Did you solve it or not I have the same error
@nguyenduykhanh7888
@nguyenduykhanh7888 3 года назад
did you solve this problem bro ,please?
@nguyenduykhanh7888
@nguyenduykhanh7888 3 года назад
Khánh Nguyễn Duy 1 giây trước i did this,you direct to slim and delete file Build then run it.
@anandkishoriit
@anandkishoriit 3 года назад
Those who are also searching for the setup python file: github.com/tensorflow/models/blob/master/research/object_detection/packages/tf1/setup.py
@shaheerkhan9542
@shaheerkhan9542 4 года назад
@Edje Electronics Have you any idea how to execute the custom object detection model on tf 1.x after tensorflow Up-gradation to 2.x because when I cloned the repo it generates many issues with my model? I already run my model but after up-gradation of tensorflow (2.x) it doesn't work properly.
@antoniodome9306
@antoniodome9306 4 года назад
Can I take the model and run it from my raspberry pi 4? I am working on a project and I want my model to detect only people. I know is the same process as in your video, but how can I take the model?
@edgarramos4830
@edgarramos4830 2 года назад
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?
@user-wm2wc5es2m
@user-wm2wc5es2m 2 года назад
You can try to recheck the label map in the training fold.
@tomdousek5819
@tomdousek5819 2 года назад
hello, have you solved this problem, i keep getting the same error and dont know what to do
@sunayanadas2171
@sunayanadas2171 2 года назад
Please slove this problem.
@clay8086
@clay8086 2 года назад
i have the same
@granatapfel6661
@granatapfel6661 2 года назад
pip install object-detection maybe?
@MohdAkmalZakiIO
@MohdAkmalZakiIO 5 лет назад
21:45 : 6 classes you mean 6 and not 36 right?
@adilhossain227
@adilhossain227 5 лет назад
yes it will be 6 , my detection was accurate on 6
@badcode8037
@badcode8037 4 года назад
It should be 6, he did it by mistake
@laskarfp1
@laskarfp1 3 года назад
Thank you, this video really helped me a lot!
@huracan311
@huracan311 4 года назад
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.
@EdjeElectronics
@EdjeElectronics 4 года назад
Thanks! I'm glad you were able to get it working. It's hard to stay on top of all the version changes!
@arsulan3801
@arsulan3801 4 года назад
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.
@O100OSTO
@O100OSTO 4 года назад
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?
@Armaan_Priyadarshan
@Armaan_Priyadarshan 3 года назад
I just made a RU-vid tutorial for the new TensorFlow 2 versions it's right here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oqd54apcgGE.html
@arsulan3801
@arsulan3801 3 года назад
@@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)
@arsulan3801
@arsulan3801 3 года назад
@@Armaan_Priyadarshan Great)
@AeroAndZero
@AeroAndZero 4 года назад
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
@renakiravtuber 4 года назад
Did u install tensorflow and tensorflow-gpu together? o.o
@AeroAndZero
@AeroAndZero 4 года назад
@@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
@renakiravtuber 4 года назад
@Aero'N'Zero thanks :) what about ur CUDA and cudnn versions?
@renakiravtuber
@renakiravtuber 4 года назад
@@AeroAndZero what about ur cuda and cudnn versions
@AeroAndZero
@AeroAndZero 4 года назад
​@@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)
@nguyenangthang7473
@nguyenangthang7473 4 года назад
Excuse me, when I run the protoc --python_out, there's one warning, it said ( warning: Import object_detection/protos/image_resizer.proto is unused.) what should I do with it?
@Armaan_Priyadarshan
@Armaan_Priyadarshan 3 года назад
nguyễn đăng thắng That probably means the command doesn’t account for all the protos you should try protoc object_detection\protos\*.proto --python_out=.
@johnlao1469
@johnlao1469 4 года назад
does object detection algorithms classify on size and colors too?
@unterwasseratmendertausend8902
@unterwasseratmendertausend8902 3 года назад
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
@furkancelik7925
@furkancelik7925 3 года назад
Did u find the solution?
@blazingfest5885
@blazingfest5885 3 года назад
Make sure to CD into object detection
@TheRAZSOR
@TheRAZSOR 3 года назад
@@blazingfest5885 Still not working!
@genyuanzhang5046
@genyuanzhang5046 3 года назад
@@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?
@npk4624
@npk4624 3 года назад
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.
@dontkillthisnoob4125
@dontkillthisnoob4125 5 лет назад
Hello sir, Your tutorial is so great and worked for so many people in the past but now with the updated tensorflow repository i am facing many errors and many mismatch. I am able to solve many of these errors and all but yet couldn't get any result after trying so many days. Would you mind making another new updated tutorial for object detection? That would be tremendously helpful. Thanks in advance.
@EdjeElectronics
@EdjeElectronics 5 лет назад
Hello! You're right, even I encounter errors when trying to do it with the latest version. The main problem is that the models repository (which contains the Object Detection API) gets continuously updated, and the updates break compatibility with older versions of TensorFlow. I am working on updating my guide to use the latest version (TF v1.13.1), and also add an explanation of how to use older versions in case the new ones don't work.
@EdjeElectronics
@EdjeElectronics 5 лет назад
Also, I intend to make a new video showing how to train an object detection model using Google Colab (or something similar) when TensorFlow 2.0 is officially released!
@ranaezzat7697
@ranaezzat7697 5 лет назад
@@EdjeElectronics I need an informative video or article for training the object detection model using Google Colab. Can you recommend an article or video tutorial? Thanks a lot!
@granatapfel6661
@granatapfel6661 2 года назад
@@EdjeElectronics please :) it would be great..now i try it with tensorflow2, but seems that it doesnt work
@melihunsal2395
@melihunsal2395 4 года назад
Hi, when I type conda install -c anaconda protobuf, it install and when I pip install anything after that, it gives me index out of boud exception even if I type pip install numpy or any package
@miguelangelislasguerrero5680
@miguelangelislasguerrero5680 5 лет назад
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
@plot.python
@plot.python 5 лет назад
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.
@EdjeElectronics
@EdjeElectronics 5 лет назад
Thanks for posting your solution!
@neagoeiulian5573
@neagoeiulian5573 4 года назад
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!
@joker__13
@joker__13 4 года назад
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
@johnlao1469
@johnlao1469 4 года назад
gotcha
@getlost1997
@getlost1997 4 года назад
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?
@andrejpiecka
@andrejpiecka 4 года назад
@@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.
@getlost1997
@getlost1997 4 года назад
@@andrejpiecka Thank you!
@patonaranjo9394
@patonaranjo9394 3 года назад
what version of tensorflow-gpu was used for this tutorial?
@danushipathirana40
@danushipathirana40 3 года назад
1.14.0
@bryankuan1420
@bryankuan1420 4 года назад
How do you cropped the image of the object being detected and show it with another frame?
@rahulvicky2102
@rahulvicky2102 5 лет назад
from object_detection.protos import calibration_pb2 as object__detection_dot_protos_dot_calibration__pb2 ImportError: cannot import name 'calibration_pb2' from 'object_detection.protos' (C:\Anaconda3\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos\__init__.py) i have this error is there any solution to clear this out
@DEBABRATABEDANT
@DEBABRATABEDANT 5 лет назад
I am facing same issue. Presently i try in cpu mode as i do not have nvidea graphics card
@DEBABRATABEDANT
@DEBABRATABEDANT 5 лет назад
Got the solution, proto(calibration.proto) missed at time 12.19. add the proto ".\object_detection\protos\calibration.proto"
@rahulvicky2102
@rahulvicky2102 5 лет назад
Where I get that proto file?
@DEBABRATABEDANT
@DEBABRATABEDANT 5 лет назад
@@rahulvicky2102 it is already there at research\object_detection\protos. check video at time 12.19
@rahulvicky2102
@rahulvicky2102 5 лет назад
DEBABRATA BEDANT yes I checked in my files it’s there but it show me error again 😓
@BhaktiAradhanaa
@BhaktiAradhanaa 4 года назад
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.
@Deepaksaini-od7fd
@Deepaksaini-od7fd 4 года назад
Hi Edje, I am also encountering with same issue
@ajaynegi2048
@ajaynegi2048 4 года назад
Hi Edje I am also facing same issue
@jackiestaiger3056
@jackiestaiger3056 4 года назад
I am getting the same error as well
@BhaktiAradhanaa
@BhaktiAradhanaa 4 года назад
Jackie Staiger did you find any solution for this. If yes then please share this with us as well
@ajaynegi2048
@ajaynegi2048 4 года назад
@@jackiestaiger3056 Bro You need to Tensorflow downgrade to 1.5 and select the Image Detection code V.1.7 for git
@kayvengoh2565
@kayvengoh2565 4 года назад
I am sorry to ask, is there any way to find out and extract the feature extraction part of this algorithm?
@sygys
@sygys 2 года назад
i also dont have the object detection tutorial file in the directory you say and python setup.py build says the file cannot be found. because its not in there. Is this tutorial so old or what is happening here!
@granatapfel6661
@granatapfel6661 2 года назад
you can just copy paste the setup.py from another folder but dont remember which, search for setup.py in the downloaded repo of edjeelectronics
Далее
OpenCV Python Neural Network Autonomous RC Car
3:06
Просмотров 2,4 млн
Train YOLOv10 on Custom Dataset
9:41
Просмотров 12 тыс.
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 831 тыс.
How One Line of Code Almost Blew Up the Internet
13:47
How to Install Tensorflow 2 Object Detection
26:33
Просмотров 33 тыс.