简体   繁体   English

Tensorflow /移动网络培训/ ValueError:不支持的input_reader_config

[英]Tensorflow / mobilenet training / ValueError: Unsupported input_reader_config

I'm trying to traing Mobilenet to recognize custom objects. 我正在尝试训练Mobilenet识别自定义对象。

I'm following this guide: https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 我正在遵循此指南: https : //towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9

and using a checkpoint and pipeline.config from here: ssdlite_mobilenet_v2_coco 并从此处使用检查点和pipeline.config: ssdlite_mobilenet_v2_coco

The Problem 问题

When I start traing with the following command: 当我使用以下命令开始训练时:

python object_detection/model_main.py \
--pipeline_config_path=C:\t\models\pipeline.config \
--model_dir=C:\t\models\ \
--num_train_steps=50000 \
--alsologtostderr

I get the following: 我得到以下内容:

C:\tensorflow\models-master\research>path=C:\t\models\pipeline.config \     --model_dir=C:\t\models\ \     --num_train_steps=50000 \     --alsologtostderr
WARNING:tensorflow:Estimator's model_fn (<function create_model_fn.<locals>.model_fn at 0x0000013B6CD26C80>) includes params argument, but params are not pa
ssed to Estimator.
Traceback (most recent call last):
  File "object_detection/model_main.py", line 101, in <module>
    tf.app.run()
  File "C:\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "object_detection/model_main.py", line 97, in main
    tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\training.py", line 447, in train_and_evaluate
    return executor.run()
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\training.py", line 531, in run
    return self.run_local()
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\training.py", line 681, in run_local
    eval_result, export_results = evaluator.evaluate_and_export()
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\training.py", line 886, in evaluate_and_export
    hooks=self._eval_spec.hooks)
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\estimator.py", line 453, in evaluate
    input_fn, hooks, checkpoint_path)
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\estimator.py", line 1346, in _evaluate_build_graph
    model_fn_lib.ModeKeys.EVAL))
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\estimator.py", line 985, in _get_features_and_labels_from_input_fn
    result = self._call_input_fn(input_fn, mode)
  File "C:\Python36\lib\site-packages\tensorflow\python\estimator\estimator.py", line 1074, in _call_input_fn
    return input_fn(**kwargs)
  File "C:\Python36\lib\site-packages\object_detection\inputs.py", line 493, in _eval_input_fn
    transform_input_data_fn=transform_and_pad_input_data_fn)
  File "C:\Python36\lib\site-packages\object_detection\builders\dataset_builder.py", line 150, in build
    raise ValueError('Unsupported input_reader_config.')
ValueError: Unsupported input_reader_config.

A comment in "dataset_builder.py" says: “ dataset_builder.py”中的注释说:

Raises: ValueError: On invalid input reader proto. 引发:ValueError:在无效的输入读取器原型上。 ValueError: If no input paths are specified. ValueError:如果未指定输入路径。

Question: 题:

Is it a problem with pipeline.config file? Pipeline.config文件有问题吗?

Does it mean that "dataset_builder.py" can't read it? 这是否意味着“ dataset_builder.py”无法读取?

OR 要么

Shall I pass some additional input path as it stated in the comment? 我是否应该按照评论中的说明传递一些其他输入路径?

If I remember correctly, cause of the problem was I didn't prepare test data. 如果我没记错的话,问题的原因是我没有准备测试数据。 There was a training data only. 只有训练数据。 So I prepared a list of test images with related XML files and generated test TFrecord. 因此,我准备了带有相关XML文件的测试图像列表,并生成了测试TFrecord。

Then the error has gone. 然后错误消失了。

PS I had a lot of other errors later but it's another story :) PS我后来还有很多其他错误,但这是另一个故事:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 tensorflow中的MobileNet预处理输入如何 - How is the MobileNet preprocess input in tensorflow Training Multiple Input and Output Keras Model (ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type list)) - Training Multiple Input and Output Keras Model (ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type list)) 张量流理解“ ssd_mobilenet_v1_pets.config” - tensorflow understanding “ssd_mobilenet_v1_pets.config” 张量流训练的第一个纪元结束时出现ValueError - ValueError in the first epoch ending of tensorflow training TensorFlow训练数据错误。 ValueError - TensorFlow training data Error. ValueError session.run上的Tensorflow ValueError与批处理培训 - Tensorflow ValueError on session.run with batch training 如何在 tensorflow 数据集上使用 mobilenet_v2.preprocess_input - How to use mobilenet_v2.preprocess_input on tensorflow dataset Tensorflow - Train.py - ValueError: ('%s is not decorated with @add_arg_scope', ('nets.mobilenet.mobilenet', 'depth_multiplier')) - Tensorflow - Train.py - ValueError: ('%s is not decorated with @add_arg_scope', ('nets.mobilenet.mobilenet', 'depth_multiplier')) Tensorflow 对象检测 API 错误:ValueError:不支持 ssd_mobil.net_v2 - Tensorflow Objct detection API error: ValueError: ssd_mobilenet_v2 is not supported Tensorflow输入管道用于分布式培训 - Tensorflow input pipeline for distributed training
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM