What is the fastest way to read a list of jpeg images and convert it into TFRecords in TensorFlow?
<p>I have a list of images and labels in a txt file, in this format:</p>

<p>file1.jpg 1</p>

<p>file2.jpg 0</p>

<p>file3.jpg 1</p>

<p>file4.jpg 1</p>

<p>where the labels are binary.</p>

<p>How could I convert the image data to a TFRecord file without assigning my images to a subdirectory of labels (which is used in the inception model data preparation), and through simply reading jpg images? I have seen the TFRecords tutorials from tensorflow but it seems that the images are already all constructed in a tensor form. </p>

<p>I have tried a solution from:
<a href="https://stackoverflow.com/questions/33849617/how-do-i-convert-a-directory-of-jpeg-images-to-tfrecords-file-in-tensorflow">How do I convert a directory of jpeg images to TFRecords file in tensorflow?</a></p>

<p>But it didn't seem to work.</p>