【问题标题】:Tensorflow Object Detection API gives Tfrecord files of 0 bytes size?Tensorflow Object Detection API 提供 0 字节大小的 Tfrecord 文件?
【发布时间】:2022-06-13 06:50:53
【问题描述】:

我正在尝试使用 TFOD 训练自定义对象检测模型,遵循 this 文档。当我运行 generate_tfrecord.py 文件时,它会生成 0 字节的 tfrecord 文件,我不知道它以前工作时有什么问题。

 # Create train data:
 !python generate_tfrecord.py -x /content/drive/MyDrive/training_demo/images/train -l /content/drive/MyDrive/training_demo/annotations/label_map.pbtxt -o /content/drive/MyDrive/training_demo/annotations/train.record

# Create test data:
!python generate_tfrecord.py -x /content/drive/MyDrive/training_demo/images/test -l /content/drive/MyDrive/training_demo/annotations/label_map.pbtxt -o /content/drive/MyDrive/training_demo/annotations/test.record

【问题讨论】:

    标签: python tensorflow object-detection


    【解决方案1】:

    我为这个问题苦苦挣扎了很长时间。我在大学云中工作,我的存储库没有 Tensorflow 文件夹,我从工作区文件夹开始构建了一个文件夹结构。根据教程,generate_tfrecord.py 脚本应该在 TensorFlow/scripts/preprocessing 文件夹中。我在别处有过。结果,当我在工作区文件夹上方的文件夹中创建预处理文件夹并将脚本移到那里时,一切正常。完全不清楚为什么这会导致问题,因为脚本是从文件夹中调用的,并且我指定了绝对路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-28
      • 2018-07-28
      • 1970-01-01
      • 1970-01-01
      • 2018-07-01
      • 2019-12-08
      • 2018-07-30
      相关资源
      最近更新 更多