Comments (1)
If you are referring to an alternative method apart from what is provided in this repo, then I suggest you load your list of filenames like this as a Tensor and provide it to something like slice_input_producer
.
Example:
#Load the files into one input queue
images = tf.convert_to_tensor(image_files)
annotations = tf.convert_to_tensor(annotation_files)
input_queue = tf.train.slice_input_producer([images, annotations]) #Slice_input producer shuffles the data by default.
#Decode the image and annotation raw content
image = tf.read_file(input_queue[0])
image = tf.image.decode_image(image, channels=3)
#preprocess and batch up the image and annotation
preprocessed_image, preprocessed_annotation = preprocess(image, annotation, image_height, image_width)
images, annotations = tf.train.batch([preprocessed_image, preprocessed_annotation], batch_size=batch_size, allow_smaller_final_batch=True)
Further example here: https://github.com/kwotsin/TensorFlow-ENet/blob/master/train_enet.py
except that in this case, your annotation
is actually just a list of labels and you don't have to decode the annotation.
Hope it helps.
from create_tfrecords.
Related Issues (12)
- Need to prefix a 'b' to jpg in https://github.com/kwotsin/create_tfrecords/blame/master/dataset_utils.py#L202 HOT 3
- generated a empty tf record file HOT 1
- How to determine num_shards?
- Strange question, do you know how to solve it ?
- organize data according to labels HOT 1
- empty tf-records created
- dataset_utils.py _get_filenames_and_classes returns empty arrays HOT 5
- How to decode tfrecords with images which have different sizes HOT 3
- Resulting Files are of 0 KB HOT 3
- How to convert a numpy ndarray into tfrecord?
- with tf.Graph().as_default(): HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create_tfrecords.