Не удается обучить тензорный поток ssd_mobilenet_v2. Не удалось получить соответствующие файлы.

После успешного обучения модели faster_rcnn_inception_v2_coco_2018_01_28 на настраиваемом наборе данных и получения хороших результатов я попытался использовать модель ssd_mobilenet_v2_quantized_300x300_coco, используя тот же набор данных и следуя тому же руководству, указанному ниже. Я получаю эту ошибку при попытке тренироваться. Я дважды проверил все используемые файлы и получаю ту же ошибку при использовании ssd_mobilenet_v1.


    (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr -train_dir=C:/tensorflow1/models/research/object_detection/training --pipeline_config_path=C:/tensorflow1/models/research/object_detection/training/ssd_mobilenet_v2_quantized_300x300_coco.config
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      _np_qint8 = np.dtype([("qint8", np.int8, 1)])
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      _np_qint16 = np.dtype([("qint16", np.int16, 1)])
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      _np_qint32 = np.dtype([("qint32", np.int32, 1)])
    C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
      np_resource = np.dtype([("resource", np.ubyte, 1)])
    WARNING:tensorflow:From C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:125: 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
    WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
    WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\builders\dataset_builder.py:80: parallel_interleave (from tensorflow.contrib.data.python.ops.interleave_ops) is deprecated and will be removed in a future version.
    Instructions for updating:
    Use `tf.data.experimental.parallel_interleave(...)`.
    WARNING:tensorflow:From C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\sparse_ops.py:1165: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
    Instructions for updating:
    Create a `tf.sparse.SparseTensor` and use `tf.sparse.to_dense` instead.
    WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\core\preprocessor.py:1208: calling squeeze (from tensorflow.python.ops.array_ops) with squeeze_dims is deprecated and will be removed in a future version.
    Instructions for updating:
    Use the `axis` argument instead
    WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\core\batcher.py:96: batch (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
    Instructions for updating:
    Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.batch(batch_size)` (or `padded_batch(...)` if `dynamic_pad=True`).
    WARNING:tensorflow:From C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\training\input.py:751: QueueRunner.__init__ (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
    Instructions for updating:
    To construct input pipelines, use the `tf.data` module.
    WARNING:tensorflow:From C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\training\input.py:751: add_queue_runner (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
    Instructions for updating:
    To construct input pipelines, use the `tf.data` module.
    INFO:tensorflow:depth of additional conv before box predictor: 0
    INFO:tensorflow:depth of additional conv before box predictor: 0
    INFO:tensorflow:depth of additional conv before box predictor: 0
    INFO:tensorflow:depth of additional conv before box predictor: 0
    INFO:tensorflow:depth of additional conv before box predictor: 0
    INFO:tensorflow:depth of additional conv before box predictor: 0
    Traceback (most recent call last):
      File "train.py", line 184, in <module>
        tf.app.run()
      File "C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
        _sys.exit(main(argv))
      File "C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, 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 396, in train
        include_global_step=False))
      File "C:\tensorflow1\models\research\object_detection\utils\variables_helper.py", line 126, in get_variables_available_in_checkpoint
        ckpt_reader = tf.train.NewCheckpointReader(checkpoint_path)
      File "C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 326, in NewCheckpointReader
        return CheckpointReader(compat.as_bytes(filepattern), status)
      File "C:\Users\gregt_000\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in __exit__
        c_api.TF_GetCode(self.status.status))
    tensorflow.python.framework.errors_impl.InvalidArgumentError: Unsuccessful TensorSliceReader constructor: Failed to get matching files on C:/tensorflow1/models/research/object_detection/ ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03/model.ckpt: Not found: FindFirstFile failed for: C:/tensorflow1/models/research/object_detection/ ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03 : The system cannot find the path specified.
    ; No such process

    (tensorflow1) C:\tensorflow1\models\research\object_detection>

https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi


person gregt2278    schedule 25.05.2020    source источник


Ответы (1)


В учебнике есть пробелы в виде румян, если следовать им в точности. это вызывало ошибку.

Строка 156. Измените fine_tune_checkpoint на: «C: / tensorflow1 / models / research / object_detection / ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03 / model.ckpt»

person gregt2278    schedule 26.05.2020