Home

Awesome

tfrecord_utility

Generate TFRecord file with TensorFlow.

Getting Started

This is a collection of handy Python scripts related with TensorFlow TFRecord file generation.

Prerequisites

TensorFlow

pip3 install tensorflow

Optional

Installing

Git clone this repo then you are good to go.

git clone https://github.com/yinguobing/tfrecord_utility.git

Running

Generating IBUG TFRecord file.

Assuming you have IBUG data organized in the following manner:

and you have list all the samples' name in a csv file:

/data/landmark/ibug.csv

and you want to put the generated TFRecord file here:

/data/landmark/ibug.record

Finally run the script like this:

python3 generate_tfrecord.py \
  --csv /data/landmark/ibug.csv \
  --image_dir /data/landmark/image/ \
  --mark_dir /data/landmark/mark/ \
  --output_file /data/landmark/ibug.record

The generated file ibug.record should be found.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments