I have my own dataset which includes around 500 images, and I am looking for the way to create tfrecord file for feeding to my CNN network. I have checked the 09_tfrecord_example.py and it works properly. But it just consider 1 image and I have 500 images in my folder, I want to modify this file to read all my images from folder and in the main function I add these line.Is it correct way?
def main():
# assume the image has the label Chihuahua, which corresponds to class number 1
label = 1
**for item in os.listdir(IMAGE_PATH):
image_file = IMAGE_PATH + item**
tfrecord_file = IMAGE_PATH + 'train.tfrecord'
write_tfrecord(label, image_file, tfrecord_file)
read_tfrecord(tfrecord_file)
Hey guys,
I have my own dataset which includes around 500 images, and I am looking for the way to create tfrecord file for feeding to my CNN network. I have checked the 09_tfrecord_example.py and it works properly. But it just consider 1 image and I have 500 images in my folder, I want to modify this file to read all my images from folder and in the main function I add these line.Is it correct way?