Error in training my faster rcnn inception v2 model
Traceback (most recent call last):
File "train.py", line 49, in
The link iam referring to is-https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/?completed=/creating-tfrecord-files-tensorflow-object-detection-api-tutorial/
Please help me with this?
In the protos folder ensure that you have created .pb files for all the .proto files. You are seeing this error as there is no file named input_reader_pb2 in your protos folder. run:- protoc --python_out=. .\object_detection\protos\input_reader.proto
@QuickLearner171998 I renamed the files from .proto files to .pb files in protos folder inside object_detection folder, still iam getting the same errors as above.Please suggest me with this?
@ShilpaJagadeeshappa Hi, Actually you are not supposed to rename those .protos files to .pb. Instead you should move to the \models\research folder and run the command mentioned by @QuickLearner171998 . Your problem will be solved.
And if you have renamed all the protos file to pb then change them back to protos and run: protoc --python_out=. .\object_detection\protos\anchor_generator.proto .\object_detection\protos\argmax_matcher.proto .\object_detection\protos\bipartite_matcher.proto .\object_detection\protos\box_coder.proto .\object_detection\protos\box_predictor.proto .\object_detection\protos\eval.proto .\object_detection\protos\faster_rcnn.proto .\object_detection\protos\faster_rcnn_box_coder.proto .\object_detection\protos\grid_anchor_generator.proto .\object_detection\protos\hyperparams.proto .\object_detection\protos\image_resizer.proto .\object_detection\protos\input_reader.proto .\object_detection\protos\losses.proto .\object_detection\protos\matcher.proto .\object_detection\protos\mean_stddev_box_coder.proto .\object_detection\protos\model.proto .\object_detection\protos\optimizer.proto .\object_detection\protos\pipeline.proto .\object_detection\protos\post_processing.proto .\object_detection\protos\preprocessor.proto .\object_detection\protos\region_similarity_calculator.proto .\object_detection\protos\square_box_coder.proto .\object_detection\protos\ssd.proto .\object_detection\protos\ssd_anchor_generator.proto .\object_detection\protos\string_int_label_map.proto .\object_detection\protos\train.proto .\object_detection\protos\keypoint_box_coder.proto .\object_detection\protos\multiscale_anchor_generator.proto .\object_detection\protos\graph_rewriter.proto
Also ensure that the above command creates .pb files for all the the protos files present in the protos folder. If any file name is missing in the command the add that filename as I mentioned in my previous comment.
@Gaurav1298 and @QuickLearner171998 ,
This is my working directory- shilpa.j@Theorem-TrainUP:/opt/tensorflow/tensorflowapi/tensorflowapi/models/models/research$ protoc --python_out=. .\object_detection\protos\input_reader.proto .object_detectionprotosinput_reader.proto: No such file or directory shilpa.j@Theorem-TrainUP:/opt/tensorflow/tensorflowapi/tensorflowapi/models/models/research$
whereas my protos directory under research contains- shilpa.j@Theorem-TrainUP:/opt/tensorflow/tensorflowapi/tensorflowapi/models/models/research$ ls a3c_blogpost delf lstm_object_detection resnet adversarial_crypto differential_privacy marco sentiment_analysis adversarial_logit_pairing domain_adaptation maskgan seq2species adversarial_text efficient-hrl minigo setup.py adv_imagenet_models feelvos morph_net skip_thoughts astronet fivo namignizer slim attention_ocr gan neural_gpu steve audioset global_objectives neural_programmer street autoaugment im2txt next_frame_prediction struct2depth autoencoder inception nst_blogpost swivel brain_coder keypointnet object_detection syntaxnet cognitive_mapping_and_planning learned_optimizer pcl_rl tcn cognitive_planning learning_to_remember_rare_events protos tensorrt compression learning_unsupervised_learning ptn textsum cvt_text lexnet_nc qa_kg transformer deep_contextual_bandits lfads README.md vid2depth deeplab lm_1b real_nvp video_prediction deep_speech lm_commonsense rebar shilpa.j@Theorem-TrainUP:/opt/tensorflow/tensorflowapi/tensorflowapi/models/models/research$
Iam using Ubuntu 18.04.2 Linux server.I moved the protos folder under research folder,Iam not able to run the command protoc --python_out=. .\object_detection\protos\input_reader.proto.
@Gaurav1298 and @QuickLearner171998
ok if its not sorting out.U guys can take my system control and tell me how to train.So this is my skype id- [email protected]
@@Gaurav1298 and @QuickLearner171998 Hi, Iam getting this error
shilpa.j@Theorem-TrainUP:/opt/tensorflow/tensorflowapi/tensorflowapi/models/models/research/object_detection$ python3 train.py --logtostderr --train_dir=data/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets_1.config
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:
- https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
- https://github.com/tensorflow/addons If you depend on functionality not listed there, please file an issue.
Traceback (most recent call last):
File "train.py", line 51, in
Does your object _detection directory contain models directory? Can you share the directory structure?
please have look onto this and help me out

Please look at this and suggest me
There is no models directory in object_detection dir. Thats why you were receiving ModuleNotFoundError. I think you forgot this step: Put the config in the training directory, and extract the ssd_mobilenet_v1 in the models/object_detection directory
@QuickLearner171998
Pls find the screenshot below ,I have put my ssd_mobilenet_v1_pets.config file in models/research/object_detection/training directory

I have extracted the extract the ssd_mobilenet_v1 in the models/object_detection directory as per below screenshot-

please help me train my model?Iam getting error as -
Traceback (most recent call last):
File "train.py", line 51, in
In the protos folder ensure that you have created .pb files for all the .proto files. You are seeing this error as there is no file named input_reader_pb2 in your protos folder. run:- protoc --python_out=. .\object_detection\protos\input_reader.proto
Traceback (most recent call last): File "train.py", line 49, in from object_detection.builders import dataset_builder File "/usr/local/lib/python3.6/dist-packages/object_detection/builders/dataset_builder.py", line 27, in from object_detection.data_decoders import tf_example_decoder File "/usr/local/lib/python3.6/dist-packages/object_detection/data_decoders/tf_example_decoder.py", line 24, in from object_detection.protos import input_reader_pb2 ImportError: cannot import name 'input_reader_pb2'
The link iam referring to is-https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/?completed=/creating-tfrecord-files-tensorflow-object-detection-api-tutorial/
Please help me with this?
Thanks a lott!
Traceback (most recent call last): File "train.py", line 49, in from object_detection.builders import dataset_builder File "/usr/local/lib/python3.6/dist-packages/object_detection/builders/dataset_builder.py", line 27, in from object_detection.data_decoders import tf_example_decoder File "/usr/local/lib/python3.6/dist-packages/object_detection/data_decoders/tf_example_decoder.py", line 24, in from object_detection.protos import input_reader_pb2 ImportError: cannot import name 'input_reader_pb2' The link iam referring to is-https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/?completed=/creating-tfrecord-files-tensorflow-object-detection-api-tutorial/ Please help me with this?
Thanks a lott!
Thank You guys....I started to train
@ShilpaJagadeeshappa I hope this issue is fixed now , lets close the issue.