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.

## Installation

```
pip install tfrecordutils
```


### HOWTO
### 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)
```



### HOWTO
### 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.

Files for tfrecordutils, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size tfrecordutils-0.1.4.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page