簡體   English   中英

tensorflow 1.0,Python3.5,Anaconda和WIndows10上的對象檢測錯誤

[英]Object detection error on tensorflow 1.0, Python3.5, Anaconda and WIndows10

在對象檢測包中運行train.py時,出現以下錯誤。 不知道我在想什么。 我已經完成了所有需要的配置。 然后,當我運行時:

python train.py --logtostderr --train_dir=training/ -- 
pipeline_config_path=ssd_mobilenet_v1_pets.config

我收到以下錯誤:

Traceback (most recent call last):
File "train.py", line 158, in tf.app.run()

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "train.py", line 154, in main
worker_job_name, is_chief, FLAGS.train_dir)

File "C:\Anaconda\envs\tensorflow\models\research\object_detection\trainer.py", line 210, in train
train_config.prefetch_queue_capacity, data_augmentation_options)

File "C:\Anaconda\envs\tensorflow\models\research\object_detection\trainer.py", line 56, in create_input_queue
tensor_dict = create_tensor_dict_fn()

File "C:\Anaconda\envs\tensorflow\models\research\object_detection\builders\input_reader_builder.py", line 61, in build
min_after_dequeue=input_reader_config.min_after_dequeue)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\contrib\slim\python\slim\data\parallel_reader.py", line 214, in parallel_read
name='filenames')

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py", line 216, in string_input_producer
string_tensor = ops.convert_to_tensor(string_tensor, dtype=dtypes.string)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 639, in convert_to_tensor
as_ref=False)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 704, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 113, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 370, in make_tensor_proto
_AssertCompatible(values, dtype)

File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected string, got ['data/train.record'] of type 'RepeatedScalarFieldContainer' instead.

似乎在管道配置文件中出現格式錯誤。 這是Windows的示例:

train_input_reader: {
  tf_record_input_reader {
    input_path: "P:\\data\\train.record"
  }
  label_map_path: "P:\\data\\label_map.pbtxt"
}

但是,祝您好運與Windows和對象檢測API :-)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM