Skip to content

jmarrietar/tfr_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TFRimage

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.

πŸ“‹ Installation

pip install tfr_image

πŸ’» Usage

Example 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,
)

Other Tools

  • tensorflow-recorder : Google open source tool for Big dataset of images that provides connectivity with Google Cloud Dataflow.

About

An experimental minimal tool to create TFRecords from a small dataset of images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages