Accessing filename from file queue in Tensor Flow

前端 未结 5 1504
梦如初夏
梦如初夏 2021-02-20 10:11

I have a directory of images, and a separate file matching image filenames to labels. So the directory of images has files like \'train/001.jpg\' and the labeling file looks lik

5条回答
  •  逝去的感伤
    2021-02-20 10:46

    Another suggestion is to save your data in TFRecord format. In this case you would be able to save all images and all labels in the same file. For a big number of files it gives a lot of advantages:

    • can store data and labels at the same place
    • data is allocated at one place (no need to remember various directories)
    • if there are many files (images), opening/closing a file is time consuming. Seeking the location of the file from ssd/hdd also takes time

提交回复
热议问题