I'm working on this tutorial:
https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_201B_CIFAR-10_ImageHandsOn.ipynb
The test / train data files are simple tab separated text files containing image filenames and correct labels like this:
...\data\CIFAR-10\test\00000.png 3
...\data\CIFAR-10\test\00001.png 8
...\data\CIFAR-10\test\00002.png 8
Assume I create a minibatch like this:
test_minibatch = reader_test.next_minibatch(10)
How can I get to the filenames for the images, which was in the first column of the test data file?
I tried with this code:
orig_features = np.asarray(test_minibatch[features_stream_info].m_data)
print(orig_features)
But, that results in printing the bytes of the images itself.
The file name is lost when loading the images through image reader.
One possible solution is to use a composite reader to load the map file in text format simultaneously. We have composite reader example in here with BrainScript: https://github.com/Microsoft/CNTK/tree/master/Examples/Image/Regression
With Python, you could do something like: