An experimental minimal tool to create TFRecords from a small dataset of images (few thousand images max). Based on code from create_tfrecords but adapted to Tensorflow 2.0 with some changes.
pip install tfr_imageExample of the directory structure:
βββ cat_dogs_sample
β βββ train
β βββ cat
β βββ cat1.jpg
β βββ cat2.jpg
β βββ dog
β βββ dog1.jpg
β βββ dog2.jpg
Example to create tfrecords inside dataset_dir directory
from tfr_image import TFRimage
tool = TFRimage()
tool.create_tfrecords(
dataset_dir="../cat_dogs_sample/train",
tfrecord_filename="cat_dogs",
validation_size=0.2,
num_shards=2,
)- tensorflow-recorder : Google open source tool for Big dataset of images that provides connectivity with Google Cloud Dataflow.