【问题标题】:building custom dataset with build_image_data.py for tensorflow inceptionv3 model使用 build_image_data.py 为 tensorflow inceptionv3 模型构建自定义数据集
【发布时间】:2018-02-24 00:35:37
【问题描述】:

我想用 tensorflow inception 模型 V3 训练我自己的图像数据集。我正在尝试将我的数据转换为 TFRecords 格式。我为 tfrecords 创建了培训、验证和输出文件夹。我也有我的 labels_file.txt。 当我尝试使用此命令转换数据时:

bazel-bin/inception/build_image_data 
--train_directory="${TRAIN_DIR}" 
--validation_directory="${VALIDATION_DIR}" 
--output_directory="${OUTPUT_DIRECTORY}" 
--labels_file="${LABELS_FILE}" 
--train_shards=128 
--validation_shards=24 
--num_threads=8

我没有收到任何错误,但收到了一条消息:

Saving results to /tmp/
Determining list of input files and labels from /tmp/.
Found 0 JPEG files across 0 labels inside /tmp/.
Launching 2 threads for spacings: [[0, 0], [0, 0]]
2017-09-14 11:37:47.985543: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-14 11:37:47.993902: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-14 11:37:47.993969: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-14 11:37:48.524331 [thread 1]: Wrote 0 images to /tmp/validation-00001-of-00002
2017-09-14 11:37:48.524490 [thread 1]: Wrote 0 images to 0 shards.
2017-09-14 11:37:48.525079 [thread 0]: Wrote 0 images to /tmp/validation-00000-of-00002
2017-09-14 11:37:48.525175 [thread 0]: Wrote 0 images to 0 shards.
2017-09-14 11:37:49.364996: Finished writing all 0 images in data set.
Determining list of input files and labels from /tmp/.
Found 0 JPEG files across 0 labels inside /tmp/.
Launching 2 threads for spacings: [[0, 0], [0, 0]]
2017-09-14 11:37:49.402218 [thread 0]: Wrote 0 images to /tmp/train-00000-of-00002
2017-09-14 11:37:49.404787 [thread 0]: Wrote 0 images to 0 shards.
2017-09-14 11:37:49.405332 [thread 1]: Wrote 0 images to /tmp/train-00001-of-00002
2017-09-14 11:37:49.405367 [thread 1]: Wrote 0 images to 0 shards.
2017-09-14 11:37:50.406126: Finished writing all 0 images in data set.

我为所有文件夹使用了正确的路径,但它没有读取文件。谁能帮我解决这个问题?

【问题讨论】:

    标签: python-2.7 tensorflow


    【解决方案1】:

    这是我的错。我忘了更新 imagenet_data.py 中的类和示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-17
      • 1970-01-01
      • 2016-08-15
      • 2017-12-11
      • 1970-01-01
      • 1970-01-01
      • 2019-06-19
      • 1970-01-01
      相关资源
      最近更新 更多