EdjeElectronics / TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

How to train a TensorFlow Object Detection Classifier for multiple object detection on Windows
Apache License 2.0
2.93k stars 1.3k forks source link

pls help me .. :( #177

Open alperzorlu opened 6 years ago

alperzorlu commented 6 years ago

(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import model_builder File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\builders\model_builder.py", line 30, in from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in from nets import inception_resnet_v2 ModuleNotFoundError: No module named 'nets'

ı have problem this error :(

KimSangYeon-DGU commented 6 years ago

Did you set the correct path?? If not, you should refer to this

alperzorlu commented 6 years ago

yes again run to path is work, but ı have to another problem :(

(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config WARNING:tensorflow:From C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:126: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. W1027 16:43:21.643006 16784 tf_logging.py:126] From C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:126: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\legacy\trainer.py:265: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.create_global_step W1027 16:43:21.939810 16784 tf_logging.py:126] From C:\tensorflow1\models\research\object_detection\legacy\trainer.py:265: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.create_global_step Traceback (most recent call last): File "train.py", line 184, in tf.app.run() File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run _sys.exit(main(argv)) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\util\deprecation.py", line 250, in new_func return func(*args, **kwargs) File "train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "C:\tensorflow1\models\research\object_detection\legacy\trainer.py", line 279, in train train_config.prefetch_queue_capacity, data_augmentation_options) File "C:\tensorflow1\models\research\object_detection\legacy\trainer.py", line 59, in create_input_queue tensor_dict = create_tensor_dict_fn() File "train.py", line 121, in get_next dataset_builder.build(config)).get_next() File "C:\tensorflow1\models\research\object_detection\builders\dataset_builder.py", line 123, in build num_additional_channels=input_reader_config.num_additional_channels) File "C:\tensorflow1\models\research\object_detection\data_decoders\tf_example_decoder.py", line 297, in init default_value=''), File "C:\tensorflow1\models\research\object_detection\data_decoders\tf_example_decoder.py", line 59, in init label_map_proto_file, use_display_name=False) File "C:\tensorflow1\models\research\object_detection\utils\label_map_util.py", line 164, in get_label_map_dict label_map = load_labelmap(label_map_path) File "C:\tensorflow1\models\research\object_detection\utils\label_map_util.py", line 136, in load_labelmap text_format.Merge(label_map_string, label_map) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 533, in Merge descriptor_pool=descriptor_pool) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 587, in MergeLines return parser.MergeLines(lines, message) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 620, in MergeLines self._ParseOrMerge(lines, message) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 635, in _ParseOrMerge self._MergeField(tokenizer, message) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 735, in _MergeField merger(tokenizer, message, field) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 823, in _MergeMessageField self._MergeField(tokenizer, sub_message) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 735, in _MergeField merger(tokenizer, message, field) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 874, in _MergeScalarField value = tokenizer.ConsumeString() File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 1237, in ConsumeString the_bytes = self.ConsumeByteString() File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 1252, in ConsumeByteString the_list = [self._ConsumeSingleByteString()] File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_format.py", line 1277, in _ConsumeSingleByteString result = text_encoding.CUnescape(text[1:-1]) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_encoding.py", line 103, in CUnescape result = ''.join(_cescape_highbit_to_str[ord(c)] for c in result) File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\google\protobuf\text_encoding.py", line 103, in result = ''.join(_cescape_highbit_to_str[ord(c)] for c in result) IndexError: list index out of range

KimSangYeon-DGU commented 6 years ago

What is the tensorflow version? and other environments also. Sometimes, this can be a problem caused by incompatible versions.

According to this repository, Last updated: 9/26/2018 with TensorFlow v1.10.

alperzorlu commented 6 years ago

tensorflow 1.8.0 libprotubuf : 3.5.2 zlip 1.2.11 protobuf 3.5.2

alperzorlu commented 6 years ago

and now updated tensorflow version to 1.9.0

KimSangYeon-DGU commented 6 years ago

Hmm, I think there are three checks to try

  1. Is there any other non-English character in your path?

  2. Did you installed tensorflow-gpu, not just tensorflow.

  3. Finally, you must make sure that nothing is missing from the installation process.

Actually, I haven't encountered this errors before, but it does not seem to import properly.

alperzorlu commented 6 years ago

so ı have check you say 1-2-3- after ı agaın run to code now is another error message : (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import model_builder File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\builders\model_builder.py", line 35, in from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res File "C:\Users\Alper Z\Anaconda3\envs\tensorflow1\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in from nets import inception_resnet_v2 ModuleNotFoundError: No module named 'nets'

KimSangYeon-DGU commented 6 years ago

Did you reboot the computer? The path you set previously seem to be removed.

alperzorlu commented 6 years ago

okay now is restarting..

alperzorlu commented 6 years ago

ı have same problem.. pls help me on teamviewer ?

LyonOconner commented 6 years ago

copy and paste (C:\TensorFlow\models\research\slim) slim content folder in

C:\ProgramData\Anaconda3\envs\tensorflow1\Lib\site-packages\object_detection-0.1-py3.5.egg\

Rajamohanreddyai commented 5 years ago

Hi, check this link https://youtu.be/nZUxoHPFf4w

it is very simple,.,.,., you have to export the python path from( tf1.12\model\research folder)

in windows

Configure PYTHONPATH environment variable

set PYTHONPATH=C:\Users\kumar\Desktop\tf1.12\model;C:\Users\kumar\Desktop\tf1.12\model\research;C:\Users\kumar\Desktop\tf1.12\model\research\slim

for ubuntu:

Configure PYTHONPATH environment variable

export PYTHONPATH=C:\Users\kumar\Desktop\tf1.12\model;C:\Users\kumar\Desktop\tf1.12\model\research;C:\Users\kumar\Desktop\tf1.12\model\research\slim