models icon indicating copy to clipboard operation
models copied to clipboard

train.py of object detection ,when try to use raccoon_label_map.pbtxt,report UnicodeDecodeError

Open Distance789 opened this issue 8 years ago • 1 comments

here is the content of raccoon_label_map.pbtxt item { id: 1 # id从1开始编号 name: 'raccoon' }

I run train.py ,this is the reported error E:\Python36\python.exe E:/raccoon_dataset-master/train.py --logtostderr --pipeline_config_path=E:/raccoon_dataset-master/ssd_mobilenet_v1_raccoon.config --train_dir=E:/raccoon_dataset-master/training WARNING:tensorflow:From G:\STUDY\tensorflow\models-master\models-master\research\object_detection\trainer.py:260: 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 "E:/raccoon_dataset-master/train.py", line 184, in tf.app.run() File "E:\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run _sys.exit(main(argv)) File "E:/raccoon_dataset-master/train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\trainer.py", line 274, in train train_config.prefetch_queue_capacity, data_augmentation_options) File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\trainer.py", line 59, in create_input_queue tensor_dict = create_tensor_dict_fn() File "E:/raccoon_dataset-master/train.py", line 121, in get_next dataset_builder.build(config)).get_next() File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\builders\dataset_builder.py", line 176, in build num_additional_channels=num_additional_channels) File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\data_decoders\tf_example_decoder.py", line 269, in init use_display_name) File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\utils\label_map_util.py", line 152, in get_label_map_dict label_map = load_labelmap(label_map_path) File "G:\STUDY\tensorflow\models-master\models-master\research\object_detection\utils\label_map_util.py", line 132, in load_labelmap label_map_string = fid.read() File "E:\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 127, in read pywrap_tensorflow.ReadFromStream(self._read_buf, length, status)) File "E:\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 95, in _prepare_value return compat.as_str_any(val) File "E:\Python36\lib\site-packages\tensorflow\python\util\compat.py", line 110, in as_str_any return as_str(value) File "E:\Python36\lib\site-packages\tensorflow\python\util\compat.py", line 87, in as_text return bytes_or_text.decode(encoding) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 20: invalid start byte

Process finished with exit code 1

Distance789 avatar Jul 28 '18 10:07 Distance789

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce

tensorflowbutler avatar Jul 28 '18 19:07 tensorflowbutler