tf-image-segmentation
tf-image-segmentation copied to clipboard
tfrecords should also include depth and format
https://github.com/ahundt/tf-image-segmentation/blob/ahundt-keras/tf_image_segmentation/utils/tf_records.py
I believe this TFRecord format currently has implicit information including:
- number of channels
- channel order (bgr vs rgb)
Would it be okay to update this to include the relevant information?
this can solve OutOfRangeError (see above for traceback): RandomShuffleQueue '_2_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 1, current size 0)
Trying to reproduce this error, it did not happen again but reproduced this error:
FIFOQueue '_1_processed_queue' is closed and has insufficient elements (requested 7, current size 0)
which I fixed by changing the following line (when building the graph and not in in the above mentioned tf_records.py file):
filename_queue = tf.train.string_input_producer([tfrecords_filename], num_epochs=num_epochs)
to
filename_queue = tf.train.string_input_producer([tfrecords_filename])
In the tensorflow document for tf.train.string_input_producer, it says:
num_epochs: .... If not specified, string_input_producer can cycle through the strings in string_tensor an unlimited number of times. That fixed my issue since I did not necessarily have this error in the first round; but very randomly on the subsequent epochs!
@GHmaryam hi.i used your method, solved the original error, then there was a new error ..
OutOfRangeError (see above for traceback): RandomShuffleQueue '_3_shuffle_batch/random_shuffle_queue' is closed and has insufficient elements (requested 100, current size 0) [[Node: shuffle_batch = QueueDequeueManyV2[component_types=[DT_FLOAT, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](shuffle_batch/random_shuffle_queue, shuffle_batch/n)]]
Do you have any ideas about this? thanks a lot!