Skip to main content

Utilities to simplify working with TFRecord files and TensorFlow's data pipeline API

Project description

# TFRecordUtils

Making life easier for working with TFRecord files and TensorFlow's data pipeline API.


# How to: Create a TFRecord file from a directory of images

* crops images by default to 500x500, but you can override this

```
jpg_glob = './jpg/*.jpg'
tfrecord_file = 'images.tfrecords'

TFRecordUtils.jpgToTFRecord(jpg_glob)
```



# How to: get an image batch iterator from a TFRecord file

```
tfrecord_file = 'images.tfrecords'

with tf.Session() as sess:

iterator = TFRecordUtils.get_image_batch_iterator(sess, tfrecord_file)

batch = sess.run(iterator)

print(batch.shape)
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tfrecordutils-0.1.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page