For anyone watching this now: models -> object_detection is now models -> research -> object_detection
@sentdex7 жыл бұрын
Pinning this, thanks!
@yegorkolodyazhniy62617 жыл бұрын
Man..whare are u been earlier! I was fuckedup with this problem about two days! But Thanks!)
@sazankalzd37886 жыл бұрын
where i can get that folder?? pls help me.. did i get that folder from here github.com/tensorflow/models/tree/master/research/object_detection??
@KyleIsWinnin6 жыл бұрын
Try this. You can get to this by navigating through the github in the path listed below. github.com/tensorflow/models/tree/master/research/object_detection/samples/configs/ssd_mobilenet_v1_pets.config
@himansu9796 жыл бұрын
just do a git clone, all files will be in your local repo git clone github.com/tensorflow/models.git
@katherinekleim73707 жыл бұрын
Hi sentdex I just would like to say "thanks" because only after watching your video I was able to run the training. For some reason ALL existing tutorials and articles miss the very important thing - paths to files and libraries and in my case it turned out to be the key point. Because the errors I saw said absolutely nothing and were just results of wrong paths. Watching your video I was able to put all paths on place and it worked!
@marcuscheung1287 жыл бұрын
Hello , I found that the website'' raw.githubusercontent.com/tensorflow/models/master/object_detection/samples/configs/ssd_mobilenet_v1_pets.config'' doesn't work .... Could you tell me what to do? Thanks!
@katherinekleim73707 жыл бұрын
They changed paths... try this one github.com/tensorflow/models/tree/master/research/object_detection/samples/configs
@marcuscheung1287 жыл бұрын
Thank you very much!!!!
@charimuvilla86936 жыл бұрын
Guys if you have more than one classes the right way to do it is something like this: item { id: 1 name: 'cat' } item { id: 2 name: 'dog' }
@thomasniedermayer59565 жыл бұрын
be careful. If you copy and paste from this comment you might run into problems like me. It led to this error: google.protobuf.text_format.ParseError: 14:2 It resolved when i wrote it down myself. It seems like there was some invisible character in there because it said it could not parse # . ........... where # represents a character that looks like a square.
@achalmukaty66734 жыл бұрын
What about config file? what do we need to change there?
@charimuvilla86934 жыл бұрын
@@achalmukaty6673 After rewatching I think you just need to change the number of classes to how many you have. Also keep in mind what the other commenter said, you might need to writer the whole thing yourself and not copy-paste from my comment.
@achalmukaty66734 жыл бұрын
@chari Muvilla I have 5 classes and have made train.record and test.record separately for each classes. Now I wanna know is how to put it in input_path there inside config file?
@charimuvilla86934 жыл бұрын
@@achalmukaty6673 I'm afraid I have no idea :/
@vicentealves6 жыл бұрын
Great tutorial! Just a repair: in fact, it isn't necessary to copy the "images" folder to the "object_detection" folder. That's why tfrecords were created. It contais the images samples used in the training.
@ohaRega5 жыл бұрын
Extra info for curious viewers who are on Linux: "Someone tell me why I need to use this export command even though I never rebooted." It's because the modification on PYTHONPATH via the export command only persists while the current Terminal instance is running. In other words, you need to modify the PYTHONPATH every time you open up a new Terminal. A way around this is to add the export command to the end of the ~/.bashrc file (which is a script that runs at each Terminal startup).
@BatMandor5 жыл бұрын
This! For windows users, you can create a PYTHONPATH variable (and first link to all the subfolders in your python installation folder) and then you can add path to your /research directory and so on. This stays after restart.
@ErickWalker5105 жыл бұрын
For anyone having the "No module named 'nets'" error, you need to copy the "nets" and "deployment" folders located under models esearch\slim in the folder where the train.py file is currently located (models esearch\object_detection\legacy by default).
@DanPetlin5 жыл бұрын
thanks!
@jaydevsinhzankat61373 жыл бұрын
what we have to do then?? copy the train.py to research/object_detection folder??
@Jacob0115 жыл бұрын
You actually don't need to copy "images" folder. Training works without it. My guess is the data from "images" is in the ".record" files.
@ameer-alahmadi Жыл бұрын
Thanks a lot for your great explanation 👍. I just have a note that may help some people, that I followed your steps and they did not work until I installed tensorflow 1.14 instead of 1.15.
@AlienAndrew515 жыл бұрын
Thanks for this tutorial series; machine learning isn't so difficult after all! I'm creating my own License Plate classifier instead of using open ALPR.
@dennis82134 жыл бұрын
Update: I did this series until the end and found out that there is no other solution to make everything work than using tensorflow verions 1 (I used 1.12.0) after you created the TFRecords. Also you should use the Tensorflow/models repository with the same commit as sentdex used, which is the following: github.com/tensorflow/models/tree/55b440f3cf58aa766e7ca14a02f0367f630b22c8 Good Luck!
@lakshay5104 жыл бұрын
Thanks buddy
@BillCarden Жыл бұрын
replace import tensorflow as tf with import tensorflow._api.v2.comapt.v1 as tf
@gau_rav_925 жыл бұрын
Hey Harrisson ,can we use our own model instead of pre-trained models and if we do could you please provide a tutorial for that ,thank you
@damianocappellini4214 жыл бұрын
Which tensorflow version should I be using for this tutorial?
@xabiercalle18976 жыл бұрын
Nice tutorial sentdex!!! Does anybody figure out a way to plot in tensorboard the accuracy on the train data set and the accuracy on the test data set?? I feel the Total Loss will give you an intuition of how well the model is learning but when you train the model for long time ( or image relatively simple) Total Loss values close to 0 can be the result of an over-fitting Thanks!!
@MrUmar396 жыл бұрын
Anyone following the text tutorial as well, change the line: "tensorboard --logdir='training'" to "tensorboard --logdir=training/" in order to make the tensor board work.
@im95196 жыл бұрын
I had been almost exhausted by the time I found your great advice..Thank you, man!
@ahmedhassan-il8cm6 жыл бұрын
TensorBoard 1.8.0 at DESKTOP-HJKQSM9:6006 (Press CTRL+C to quit) W0704 23:23:00.574867 Thread-2 application.py:274] path /[[_dataImageSrc]] not found, sending 404 W0704 23:23:00.579873 Thread-1 application.py:274] path /[[_imageURL]] not found, sending 404 can you help me to solve it
@ahmedhassan-il8cm6 жыл бұрын
tensorboard inactive
@PetrutiuMihai7 жыл бұрын
In the video you've created the file in training/object-detection.pbtxt, but in the config you've set it in data/object-detection.pbtxt. And in the tutorial's config you've set it to both data/object-detection.pbtxt and training/object-detection.pbtxt. Does this file matter, and if yes what is the correct approach?
@sentdex7 жыл бұрын
I just went through the video, and I see it's in data/object-detection.pbtxt in every instance in the config file, but yeah, we created the file in training/. News to me, nice catch. I would have to play around with it and see what's required and what's not. Other than in the config, and then in the testing, I do not think we point at all to that file. It's gotta be used in training for the label, surely... but maybe it's in the TFRecord data now? ....???? not sure, will have to look more into this one.
@ruksinkamal87546 жыл бұрын
Hai, first thanks for this tutorial... but I got the error when giving the command $ python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_coco.config it shows:: WARNING:tensorflow:From /home/doe/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py:124: main (from __main__) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. Traceback (most recent call last): File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1500, in _ParseAbstractInteger return int(text, 0) ValueError: invalid literal for int() with base 0: '03' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1449, in _ConsumeInteger result = ParseInteger(tokenizer.token, is_signed=is_signed, is_long=is_long) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1471, in ParseInteger result = _ParseAbstractInteger(text, is_long=is_long) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1502, in _ParseAbstractInteger raise ValueError('Couldn\'t parse integer: %s' % text) ValueError: Couldn't parse integer: 03 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "train.py", line 184, in tf.app.run() File "/home/doe/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 124, in run _sys.exit(main(argv)) File "/home/doe/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 136, in new_func return func(*args, **kwargs) File "train.py", line 93, in main FLAGS.pipeline_config_path) File "/home/doe/anaconda3/envs/tensorflow/models/research/object_detection/utils/config_util.py", line 94, in get_configs_from_pipeline_file text_format.Merge(proto_str, pipeline_config) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 536, in Merge descriptor_pool=descriptor_pool) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 590, in MergeLines return parser.MergeLines(lines, message) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 623, in MergeLines self._ParseOrMerge(lines, message) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 638, in _ParseOrMerge self._MergeField(tokenizer, message) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 763, in _MergeField merger(tokenizer, message, field) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 837, in _MergeMessageField self._MergeField(tokenizer, sub_message) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 763, in _MergeField merger(tokenizer, message, field) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 837, in _MergeMessageField self._MergeField(tokenizer, sub_message) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 763, in _MergeField merger(tokenizer, message, field) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 871, in _MergeScalarField value = _ConsumeInt32(tokenizer) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1362, in _ConsumeInt32 return _ConsumeInteger(tokenizer, is_signed=True, is_long=False) File "/home/doe/.local/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1451, in _ConsumeInteger raise tokenizer.ParseError(str(e)) google.protobuf.text_format.ParseError: 9:18 : Couldn't parse integer: 03 please do help,,,its urgent.
@yashturkar11755 жыл бұрын
When do I stop the training? Do I go 'CTRL+C' on it?
@kyedav5 жыл бұрын
Yeah it only stops when you press CTRL+C
@hanweijie80925 жыл бұрын
Hi, may i know do you have any more tutorials to show that your model is generalize well on train, test and validation set without without overfitting issue?
@imrans.m67884 жыл бұрын
@12:18 its happening because when you export env variable in the way that u did its going to only work for the terminal that you ran in so if u opened up a new terminal u should have to instruct it again OR you add those lines in ./bashrc file to load for every terminal u open !
@andihaki3 жыл бұрын
any tutorial for detecting not only "square box" but detection "keypoints" like "face landmarks" detection? thank you
@khouloudboujnah42246 жыл бұрын
when runing train.py i get this error """ File "train.py", line 50, in from object_detection.builders import graph_rewriter_builder ImportError: cannot import name 'graph_rewriter_builder '""""" any help please
@OWLMOTOVLOG4 жыл бұрын
thank you sir, very helpful, want to ask, for example, how to implement this as an online absent tool? is there a tutorial that helps? thank you
@matheusataide18617 жыл бұрын
Hey guys, In the config file "label_map_path" is set as "data/object-detection.pbtxt", but object-detection.pbtxt is put into training folder, not data. Why does it work??
@mustafaeris74867 жыл бұрын
matheus did u figure out how to place .pbtxt file ? i am confused in the web site it is more confusing. (pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/). Here in the config file first it is set as data/object-detection.pbtxt and than secon time it is set training/object-detection.pbtxt. But when i set them both as data/object-detection.pbtxt like in the video i get no errors.
@renukanale86707 жыл бұрын
Where should i place object-detection.pbtxt in training or data i am confuse
@mustafaeris74867 жыл бұрын
You can place it where ever you want i think. But, you need to specify label map paths corectly. For example if your .pbtxt file in /data folder, you need to set both labelmap paths like ""data/object-detection.pbtxt".
@renukanale86707 жыл бұрын
Mustafa Eriş thank you
@khanhquocle7 жыл бұрын
yeah, I actually don't know why this guy could run it like charm!
@sanmis-h5y6 жыл бұрын
@sentdex : You dont have to write python3 , if the file is an executable script. Just ./.py would do !
@Laila_Ha_d4 жыл бұрын
Great video. Thanks man ! (y)
@piethelderop80856 жыл бұрын
thank you for all the good information
@cristhianandresapolocevall89056 жыл бұрын
The solution for Windows (it worked for me) is this: - The object-detection.pbtxt file and the .config file go in the "training" folder - For environment variables: - Create a variable named PYTHONPATH and give it the directory values from the Tensorflow Models folder: C: \ Users \ .. \ models-master \ research; C: \ Users \ .. \ model-master \ research \ slim - Edit PATH variable and add the Python directory (my case). C: \ Program Files \ Python36 - Execute in models-master / research / object_detecion: python train.py --logtostderr --train_dir = training / --pipeline_config_path = training / ssd_inception_v2_pets.config I used the .config of ssd_inception_v2_pets. Greetings.
@davidepedone33706 жыл бұрын
Perfectly worked for me. You saved my day!
@cristhianandresapolocevall89056 жыл бұрын
It can be by administrator permissions ... Maybe you want to try locating the Models / Research folder ... in another location, changing the path again. I recommend you restart every time you change the path, hopefully you'll be lucky.
@barakbeilin87416 жыл бұрын
Hi I'm having a problem on windows, when tryring to train with mobile net v1 , raise TypeError('`pred` must be a Tensor, a Variable, or a Python bool.') helpp???
@jackdklee13966 жыл бұрын
no module named 'deployment' ... again and again! arggg
@inachrizayano13726 жыл бұрын
im getting an error when i followed your implementation. it says tensorflow.python.framework.errors_impl.UnknownError: NewRandomAccessFile failed to Create/Open: = : Access is denied. ; Input/output error
@valtersilva42136 жыл бұрын
For those stuck into "ImportError: cannot import name 'preprocessor_pb2'" Seems like we missed this: # From tensorflow/models/research/ protoc object_detection/protos/*.proto --python_out=. Worked for me =)
@DarkRedman315 жыл бұрын
12:25 it's not machine based but session based and gnome-terminal can contains many sessions from one tab, many tabs one instance of the programs or even many tabs from many windows so let's consider a session is one tab terminal. As recommended you can add this line to your .bashrc file once for all
@allea-zb7kl6 ай бұрын
I have a question. Why does TensorFlow Object Detection (TFOD) use steps? Also, what is the difference between steps and epochs? Why do steps tend to be in the tens of thousands, while epochs usually only reach the hundreds?
@TheParkitny5 жыл бұрын
@sentdex You get the import deployment error because you opened a new terminal and it did not persist your environment changes. Gotta add it to your ~/.bashrc file
@lingrajsvannur19186 жыл бұрын
hello guys please help me with this error : when i finally run to train the data i get google.protobuf.text_format.ParseError: 16:1 : Message type "object_detection.protos.TrainEvalPipelineConfig" has no field named "r".
@FreeLearnclass4 жыл бұрын
what is this - 13:03 /clone_loss is illegal; using clone_loss instead ?????
@kalyaansingh9484 жыл бұрын
object-detection.pdtxt file will be in data folder or training folder ? you created that file in training folder and In config. file you mention in data folder
@MrMkr896 жыл бұрын
Hi, I have my training data in the tfrecord format. and I guess I'm following the same procedure. However, I keep running into errors.
@bhuvneshsaini933 жыл бұрын
HI.., WHere have you mentioned images path in training but only entered the image name?
@ruchikamattoo19965 жыл бұрын
Since you have trained the model for custom object, would it still detect already trained objects like person, bottle?
@_skeptik2 жыл бұрын
It would be great to see this tutorial for TF 2
@jundong67897 жыл бұрын
Hello @sentdex, thank you very much for your tutorial. I have one question: where do you set up the stopping criteria for training?
@patricklaw4396 жыл бұрын
It is under train_config a value with name "num_steps". Training will stop at that stop but it is best just watch the losses until it is satisfactory and you can stop it manually.
@stephenwong34755 жыл бұрын
Can you explain why you would use the Pets CONFIG for the COCO model? Why not use the Coco Config for the Coco model? o.O
@pperez122410 ай бұрын
Where is 'object_detection_tutorial.ipynb' ? I can't find it in /models/research/object_detection
@ThinhHuynhh5 жыл бұрын
Is there an easy way to get something like Keras model.summary in Tensorflow?
@junweima6 жыл бұрын
@sentdex you need to add the path command to .bashrc file (if you are using bash) so you don't need to export every time
@PhD_drone_views7 жыл бұрын
Best tutorial ever..!!!! :) Thanks .!
@projectyeti45267 жыл бұрын
Hey @sentdex! What a great series! I actually wonder that: If I train my model apart from labeled images, with also non-labeled images that really seems like to my object i want to detect but actually not. Is it helps to training procedure or not?
@codyquist49087 жыл бұрын
This is a supervised learning model, therefore the images must have labels. If you show me a picture of a ball, and I have never seen a ball before, I can not say that it is a ball. Training on the nearly same image over and over again will be very good at classifing images almost identical to the images that it was trained on, however, this kind of training leads to poor testing, because the program just doesnt have enough information to train on. It has a hard time generalizing well. Despite the potential accuracy of my claim, I would not take my word for it, since I am not the author of this program, so I'll leave the final say, to someone with far more experience (sentdex).
@massivamiss52444 жыл бұрын
can use this steps with nvidia jetson nano ?? for make training ????????
@kanskejonasidag17 жыл бұрын
"hot dog!" "not hot dog!" ;)
@charimuvilla86936 жыл бұрын
You just need to train "hot dog" this is not a classifier you are all set here :P
@ronandean37576 жыл бұрын
r/woosh?.?
@ianhuang44646 жыл бұрын
JING YANGGGG
@patelmegh094 жыл бұрын
Octopus
@hashbits84026 жыл бұрын
what if we need to add this newly created model on top of a pre-defined model?
@abhipinky107 жыл бұрын
hi , How to train this on windows system . Can u point out the changes to be made in the files ?
@FalcoGer7 жыл бұрын
exports sets a temporary environment variable for the current session. if you close the console, or start a new instance of bash you get a new set of environment variables for that. you can make it fake-permanent if you include the export function in .bashrc then every time you open bash, it is automatically exported.
@anasbiniftikhar59187 жыл бұрын
When you forget to select "wget" the second time, it takes everything inside me to yell "you forgot to select that again, man". But you never listen and do that again every time I watch this video. :p
@uttiya107 жыл бұрын
You have to type the export command for every new terminal. Not after every restart
@ProfSoft4 жыл бұрын
windows users : the correct command for -> export PYTHONPATH=$PYTHONPATH........... is -> set PYTHONPATH=%PYTHONPATH%;path to models folder ; path to research folder ; path to slim folder that is in research folder so if models folder in desktop the command will be and change 'iP' to your computer name -> set PYTHONPATH=%PYTHONPATH%;C:\Users\iP\Desktop\models;C:\Users\iP\Desktop\models esearch;C:\Users\iP\Desktop\models esearch\slim
@cluelin93067 жыл бұрын
When I have more than one class, what format should I use in "object-detection'.pbtxt?
IMPORT ERROR If you're on windows and getting a "no module called nets" or some import error make sure to do the following: Go to System -> Advanced system settings -> Environment Variables -> System Variables -> New, and add a variable with the name PYTHONPATH and these values (make sure the path matches these are just examples): C:\Program Files\Python36\ OR anaconda if you're using that C:\TensorFlow\models C:\TensorFlow\models esearch C:\TensorFlow\models esearch\slim C:\TensorFlow\models esearch\object_detection Then while still there, in the system variables section click on path and add this => " %PYTHONPATH% " (not the quotes) => AND THEN REBOOT YOUR PC TRAIN.PY train.py is in ...models esearch\object_detection\legacy so I ran this from ...models esearch\object_detection instead: python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
@MegaKoobix4 жыл бұрын
Hello, can you elaborate on the system variables section? Because i added %PYTHONPATH% as a name and PYTHONPATH as a value. When I start the train.py command, "Windows fatal exception: access violation" occurs.
@fasofuture4 жыл бұрын
I get import error but I use ubuntu can you help me( from nets import inception_resnet_v2 ModuleNotFoundError: No module named 'nets')
@SubhamKumar-eg1pw4 жыл бұрын
How is the transfer learning happening here? Are we unfreezing all layers and training the model again on the custom dataset. or just unfreezing the last few layers? Can someone explain this? Thanks
@blabber924 жыл бұрын
can you please explain, the .pbtxt file was copied inside training folder, yet in the configuration file the path was given as data/. How does that work?
@huzefacalcuttawala67076 жыл бұрын
@sentdex is it possible to output the exact co-ordinates of bounding box i.e. (x1,y1) (x2,y2), (x3,y3), (x4,y4) instead of xmin,xmax,ymin,ymax
@sundararajan33064 жыл бұрын
ValueError: ssd_mobilenet_v2 is not supported. See `model_builder.py` for features extractors compatible with different versions of Tensorflow... Any suggestion for this error...
@shahdghorsi33126 жыл бұрын
Hello, did anyone get the error: InvalidArgumentError (see above for traceback): Incompatible shapes: [4,1917] vs. [7,1] [[{{node Loss/Match_5/cond/mul_4}} = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Loss/Match_5/cond/one_hot, Loss/Match_5/cond/Cast_2)]] I searched a lot for 3 days but nothing worked, any help?
@kevalvora50126 жыл бұрын
What is more important batch size or number of iteration in inception model training??
@desmondcodes936 жыл бұрын
Hi I am getting this error NotFoundError (see above for traceback): Can not get size for: training/model.ck pt-13.index : The system cannot find the file specified. ; No such file or directory [[Node: save_1/RestoreV2_586 = RestoreV2[dtypes=[DT_INT64], _device="/j ob:localhost/replica:0/task:0/device:CPU:0"](_arg_save_1/Const_0_0, save_1/Resto reV2_586/tensor_names, save_1/RestoreV2_586/shape_and_slices)]] What does this mean? Thank you
@JuJoVij6 жыл бұрын
Anybody know why "label_map_path: data/object-detection.pbtxt" works even though the label map is in the training folder ?
@Johnnyboycurtis6 жыл бұрын
For anyone who is curious, on kzbin.info/www/bejne/gIObdKCNrs1le5om4s he runs into some trouble because if you run `echo $PYTHONPATH` it may return blank, or without the needed directories appended to it. Python only knows to look for modules in directories where it's currently located at or in directories specified by PYTHONPATH. The command # From tensorflow/models/research/ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim specifies that you should run this in the directory where all your files are located in. From there, the command will append the current directory path and the slim directory. So if you run `echo $PYTHONPATH` afterwards, you should see new paths added.
@Ramiphylo6 жыл бұрын
Hey Sendex, If you make a mistake can't you just cut it from the your video? We rewatch your videos and each time we have to go through it again.
@shruthisivasubramanian94917 жыл бұрын
Hey guys! I was wondering how long I should let the training run for? It takes an awful lot of time on my computer. Am I supposed to terminate the training ing process after reaching a steady loss value of around 1?
@nikfaris21435 жыл бұрын
Hi. I want to know this too. Did you get it by now?
@walidmaly37 жыл бұрын
Thanks, can I train with images without the object at all as an example of negative objects? If I am trying to train with images with no maccheese I got the following error TypeError: None has type , but expected one of: (, )
@insidiousmaximus3 жыл бұрын
there is no setup.py in the git of tensorflow models now....so how do we install it?
@wfpnknw325 жыл бұрын
For anyone who's getting a find error for the .ckpt file (InvalidArgumentError: Unsuccessful TensorSliceReader constructor: Failed to get matching files on ssd_mobilenet_v1_coco_11_06_2017/model.ckpt: Not found: ssd_mobilenet_v1_coco_11_06_2017; No such file or directory) then you just need to explicitly state location of the .ckpt files in the config file. So change it from "ssd_mobilenet_v1_coco_11_06_2017/model.ckpt" to "model/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt" or whereever you put your .ckpt files..
@grownsimba81205 жыл бұрын
To anyone who gets this error, make sure you have the .ckpt files downloaded. I downloaded the ssd_mobilenet_v1_coco_11_06_2017 folder, but for someone reason, it only contained the frozen graph. Had to re-download it and unzip twice.
@shadabgada9375 жыл бұрын
I am getting resource exhaust error, OOM when allocating tensor shape. I have kept batch size 1 on my cpu. Plz help.
@yvan-kialandofusso5345 жыл бұрын
have you found a soulution to the problem?
@shadabgada9375 жыл бұрын
@@yvan-kialandofusso534 try to keep size of training images less than 200kb
@NUKEMAN8906 жыл бұрын
Can someone explain to me how the loss is calculated for this model? Trying to gain some intuition as to how accurate the model is before testing it.
@ahmedhany29946 жыл бұрын
for anyone who meet the problem : No module named 'object_detection' or can't find train.py because, now it exists in legacy. u can use model_main.py instead of it but, if u insist of using train.py xD instead of tweaking things & all that kind of stuff, the solution is very simple. Instead of typing "train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config" directly 1) just go back to be outside object_detection folder 2)after that, make both paths manually: object_detection/legacy/train.py --logtostderr --train_dir=object_detection/training/ --pipeline_config_path=object_detection/training/ssd_mobilenet_v1_pets.config hopefully this can reach everyone to help him & wish for all a Happy coding ^ ^
@hrehann6 жыл бұрын
hi i got the error in the video using train.py.. i followed all the above said suggestions..just tried using model_main.py but getting NO MODULE NAMED 'PYCOCOTOOLS' Kindly help me
@Charles-rn3ke6 жыл бұрын
@@hrehann Hi! I have same error" NO MODULE NAMED 'PYCOCOTOOLS' And installed COCO API. Do you have any idea?
@hrehann6 жыл бұрын
@@Charles-rn3ke Hi I have tried installing pycocotools both in MAC and windows environment using GitHub and also other pycocotools source...even though it gets installed there should be one specific .py file that won't get created i think it is something like _coco.py, so without that we can't use the model_main.py...I later tried with train.py...i got till the loss reduction stage but due to my hardware configuration i faced errors and gave a pause from there .
@Charles-rn3ke6 жыл бұрын
hrehann did you try on paper space?
@hrehann6 жыл бұрын
@@Charles-rn3ke No sir i did not...i tried with my personal PC that did not have a GPU...anyways i will resume my work on that anytime soon and let u know
@jaysonbalano89345 жыл бұрын
I got this error while running train.py, ImportError cannot import name cloud from tensorflow.contrib stackoverflow.com/questions/58595582/cannot-import-name-cloud-from-tensorflow-contrib How to fix it?
@wadewang5744 жыл бұрын
Can we implement data/image augmentation here ?
@MahadMajeed4 жыл бұрын
How do I weight the loss function? I have a highly imbalanced dataset
@Angel_Fontalvo6 жыл бұрын
FYI, it looks like as of July 13, 2018, they moved the "train.py" script to the directory "legacy".
@SalmanGhauri6 жыл бұрын
Hey there, a bit late but anyways, the export command (setting an environment variable and it to path in your case) in bash works only for existing session, if you want to make it persistent (available globally) you should add it to ~/.bashrc and restart the terminals session. Its like when you use absolute path for pip or any other program from windows CMD which you can make global by adding it to PATH.
@AbhishekKumar-hh8xc6 жыл бұрын
how to add it to the bash, can u explain?
@priyalgeorge71126 жыл бұрын
any idea of how to use model_main.py file instead of train.py file?
@sigmarulesog9844 жыл бұрын
Hey @sentdex can you please make a short video on how can i train object detection on google colab.
@anirudhakurhade85365 жыл бұрын
I think there is an error, setting label_map to data/object-detection.pbtxt , it is producing error for me. It should be training/object-detection.pbtxt. I don't know why this is running and not producing error for you.
@ciusingwong32586 жыл бұрын
it seems weird that on my Windows, when entering the training command it pop out no module named deployment...i have already done the "set PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim" I have no idea...
@jackdklee13966 жыл бұрын
wow thanks dude!!!
@justchill999026 жыл бұрын
Thank you very much! :)
@KaranKumar-ke2ki6 жыл бұрын
How can I use the pre-trained models (of those 90 objects) along with my newly created one? I guess there's something to do with the checkpoint files, but don't know how exactly. Need some help
@DrKhan-hd4cd6 жыл бұрын
Guys i am getting this error at train.py -->tensorflow.python.framework.errors_impl.NotFoundError: training/ssd_mobilenet_v1_pets.config; No such file or directory
@chengjieyun594 жыл бұрын
I'm getting the same error...
@DrKhan-hd4cd4 жыл бұрын
@@chengjieyun59 Check the pinned comment, maybe that was the issue two years back. Hey, I recommend you follow a tutorial that covers Tensorflow 2.0, which works well with windows, I ended up using Ubuntu/Linux for versions below 2.0.
@mrexnx6 жыл бұрын
is there a way to "freeze" some model layers before retraining? Or for that matter, how could we fine-tune the architecture of ssd-mobilenet from this detection API, e.g. change a layer or two?
@ramagrawal5335 жыл бұрын
I want the area of that resulting bounding box, how can i get it??
@ivanshelonick51206 жыл бұрын
For someone who watching now: change paths for downloading configuration file wget raw.githubusercontent.com/tensorflow/models/research/master/object_detection/samples/configs/ssd_mobilenet_v1_pets.config to wget github.com/tensorflow/models/tree/master/research/object_detection/samples/configs/ssd_mobilenet_v1_pets.config
@DrKhan-hd4cd6 жыл бұрын
hey, were you able to train your model?, and the link is not working btw
@ronayusan40475 жыл бұрын
Hello may I ask if the training cancels or pauses if my laptop sleeps or runs out of battery? Thanks
@abraham17985 жыл бұрын
When I try to train appears this error :( tensorflow.python.framework.errors_impl.InvalidArgumentError: Unsuccessful TensorSliceReader constructor: Failed to get matching files on PATH_TO_BE_CONFIGURED/model.ckpt: Not found: PATH_TO_BE_CONFIGURED; No such file or directory
@abraham17985 жыл бұрын
I have the same problem
@jaysonbalano89345 жыл бұрын
You reply on your own comment dude
@nikhiljaiswal49917 жыл бұрын
During training (rfcn architecture), the following error appears after some random steps: InvalidArgumentError (see above for traceback): assertion failed: [maximum box coordinate value is larger than 1.01: ] [1.0111111] I'm having the above error when I use any of the following: faster_rcnn_inception_resnet_v2_atrous_coco rfcn_resnet101_coco But NOT when I use: ssd_inception_v2_coco ssd_mobilenet_v1_coco Please help.
@aaaafireball93224 жыл бұрын
im getting this error, tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [Unable to decode bytes as JPEG, PNG, GIF, or BMP] . I did everything in the video and it worked the first time, when i did it again with new images i keep getting this error
@RahulKathet5 жыл бұрын
I am gettig this error: AttributeError: module 'tensorflow' has no attribute 'contrib'
@黃路飛-b6l5 жыл бұрын
Me,too. Tensorflow version >2.0 has remove 'contrib'. I have no idea to migrate the code.I need help.QQ
@BatMandor5 жыл бұрын
@@黃路飛-b6l There is a script by tensorflow, but until the api update to 2.0 (it still in alpha), your best bet is to sowngrade
@RahulKathet5 жыл бұрын
Mandor hmmmm But when I downgrade it gives me another error. Don’t know what to do.
@BatMandor5 жыл бұрын
@@RahulKathet If you're trying to run the tutorial.ipynb, then well, I also encountered that error, but I was able to run inference with the help of this: www.geeksforgeeks.org/ml-training-image-classifier-using-tensorflow-object-detection-api/ There seems to be a problem with the obj_det_tutorial.ipynb that it uses load_model for tensorflow_2.0 (not specifying all the arguments - model_dir and tags) whereas most of the other code is for 1.x. So writing your own it. If not, do tell me the error, I can try helping.
@dennis82134 жыл бұрын
I did this series until the end and found out that there is no other solution to make everything work than using tensorflow verions 1 (I used 1.12.0) after you created the TFRecords. Also you should use the Tensorflow/models repository with the same commit as sentdex used, which is the following: github.com/tensorflow/models/tree/55b440f3cf58aa766e7ca14a02f0367f630b22c8 Good Luck!
@abhijitbalaji7 жыл бұрын
Hey @sentdex Thats an awesome tutorial.Could you please do a tutorial on how to use a custom network say like VGG-16?
@krishind995 жыл бұрын
I seem to be struck on this output for about 20 mins time. Should I stop or is there more to it? Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.008 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.077 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.100 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.100 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.100 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000
@riyabanerjee26566 жыл бұрын
Hello, Can I use the above program for Tensorflow CPU support? When I run the code (video 6) I get the following error: File "/home/rao208//.local/lib/python3.5/site-packages/tensorflow/py thon/framework/errors_impl.py", line 519, in __exist__ c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.FailedPreconditionError: =; Is a directory I do not know if this error is because I use Tensorflow CPU or some other reason
@digindata60757 жыл бұрын
Hey everybody, everything works but I cannot visualize anything with tensorboard. I get the following message "No dashboards are active for the current data set." Any clues about how to fix this? The help file suggested on the page says that I should set up a file writer: # sess.graph contains the graph definition; that enables the Graph Visualizer. file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph) But I did not see that in the video
@torrangreen78415 жыл бұрын
did you fix it?
@杜旺-c1v4 жыл бұрын
your keeping making the same mistake twice is so cute
@recrudesce7 жыл бұрын
@sentdex There's a sentence below the export line you copied from the wiki that states that you need to do it for every new Terminal window, and also tells you how to make it more permanent via .bashrc :)
@sentdex7 жыл бұрын
I see, so I would have to read? Unacceptable tbh.
@awlc0997 жыл бұрын
sentdex could it be that if you just do a variable export in a terminal, it only lasts for the session of that terminal?
@amitnair926 жыл бұрын
Awesome Lazy !
@ahmedhassan-il8cm6 жыл бұрын
this work is transfer learning my question what is the type of transfer learning done? i konw there are two type of transfer learning the first one change in the last layer (softmax) ) and the second change in all layers with take the intial paramters from the trained model (ssd with mobilenet)