tf-image-segmentation icon indicating copy to clipboard operation
tf-image-segmentation copied to clipboard

tfrecords should also include depth and format

Open ahundt opened this issue 7 years ago • 3 comments

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?

ahundt avatar Mar 17 '17 19:03 ahundt

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)

vinayakarannil avatar Nov 16 '17 06:11 vinayakarannil

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 avatar Dec 15 '17 20:12 GHmaryam

@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!

damengdameng avatar Apr 04 '18 08:04 damengdameng