【问题标题】:Object detection error on tensorflow 1.0, Python3.5, Anaconda and WIndows10tensorflow 1.0、Python3.5、Anaconda 和 WIndows10 上的对象检测错误
【发布时间】:2017-11-09 21:16:17
【问题描述】:

当我在对象检测包中运行 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.

【问题讨论】:

    标签: python windows tensorflow object-detection


    【解决方案1】:

    您的管道配置文件中似乎存在格式错误。以下是 windows 的示例:

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

    不过,祝你好运,Windows 和对象检测 api :-)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-01
      • 1970-01-01
      相关资源
      最近更新 更多