简体   繁体   English

我如何在Tensorflow中准备自己的数据集(数千张图片)?

[英]How i can prepare my own dataset (thousand of images) in Tensorflow?

I have some thousands of images in .PNG format. 我有几千个.PNG格式的图像。 The labels for these png files are stored in txt file. 这些png文件的标签存储在txt文件中。 PNG files names are like 1.png, 2.png, 3.png and so on... TXT file contains labels separated by new lines (Each line contains a single lable) PNG文件名称类似于1.png,2.png,3.png等等... TXT文件包含由新行分隔的标签(每行包含一个标签)

How can I prepare them for use in tensorflow? 如何准备它们用于tensorflow?

Once prepared/loaded, I want to train a CNN in tensorflow by using the images mentioned. 一旦准备/加载,我想通过使用所提到的图像训练张量流中的CNN。 It will be highly appreciated If someone can give specific examples of reading png and txt files in tensorflow. 如果有人能够提供在tensorflow中读取png和txt文件的具体示例,将非常感激。

You might wanna check out tensorflow slim library, including its dataset class and use of data_set_data_provider.py 您可能想查看tensorflow slim库,包括其dataset类和data_set_data_provider.py使用

slim: https://github.com/tensorflow/tensorflow/tree/r0.11/tensorflow/contrib/slim 苗条: https//github.com/tensorflow/tensorflow/tree/r0.11/tensorflow/contrib/slim

dataset: https://github.com/tensorflow/tensorflow/tree/r0.11/tensorflow/contrib/slim/python/slim/data 数据集: https//github.com/tensorflow/tensorflow/tree/r0.11/tensorflow/contrib/slim/python/slim/data

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM