yangxue0827 / R2CNN_FPN_Tensorflow

R2CNN: Rotational Region CNN Based on FPN (Tensorflow)
419 stars 139 forks source link

python train.py fail. #21

Open zy486at189cn opened 6 years ago

zy486at189cn commented 6 years ago

When I use "python train.py" ,fail.
My train data is voc_pascal.I success to create pascal_train.tfrecord(2.7G) . The classes is 20(car,boat,person... etc) I also change cfgs.py . DATASET_NAME = 'pascal' . Also success load pre-train file resnet_v1_101.ckpt. But finally, report error,just like this:

restore model Traceback (most recent call last): File "tools/train.py", line 238, in train() File "tools/train.py", line 206, in train fast_rcnn_total_loss, total_loss, train_op]) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run run_metadata_ptr) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1120, in _run feed_dict_tensor, options, run_metadata) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run options, run_metadata) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.OutOfRangeError: PaddingFIFOQueue '_2_get_batch/batch/padding_fifo_queue' is closed and has insufficient elements (requested 1, current size 0) [[Node: get_batch/batch = QueueDequeueManyV2[component_types=[DT_STRING, DT_FLOAT, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](get_batch/batch/padding_fifo_queue, gradients/range/delta)]]

Caused by op u'get_batch/batch', defined at: File "tools/train.py", line 238, in train() File "tools/train.py", line 36, in train is_training=True) File "/media/stockerc/f/wz/project/R2CNN_FPN_Tensorflow/data/io/read_tfrecord.py", line 86, in next_batch dynamic_pad=True) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 927, in batch name=name) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/training/input.py", line 722, in _batch dequeued = queue.dequeue_many(batch_size, name=name) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/ops/data_flow_ops.py", line 464, in dequeue_many self._queue_ref, n=n, component_types=self._dtypes, name=name) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 2418, in _queue_dequeue_many_v2 component_types=component_types, timeout_ms=timeout_ms, name=name) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op op_def=op_def) File "/home/stockerc/Tensor1.4/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1470, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

OutOfRangeError (see above for traceback): PaddingFIFOQueue '_2_get_batch/batch/padding_fifo_queue' is closed and has insufficient elements (requested 1, current size 0) [[Node: get_batch/batch = QueueDequeueManyV2[component_types=[DT_STRING, DT_FLOAT, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](get_batch/batch/padding_fifo_queue, gradients/range/delta)]]

Whats matter?@yangxue0827

yangxue0827 commented 6 years ago

Please refer to sample.xml

zy486at189cn commented 6 years ago

Thank you ! I find the diffrent. @yangxue0827 original:xmin ymin xmax ymax now:x0 y0 y0 x1 y1 x2 y2 x3 y3

mengmeng510 commented 6 years ago

when I run python train.py,there has a problem:
OutOfRangeError (see above for traceback): PaddingFIFOQueue '_2_get_batch/batch/padding_fifo_queue' is closed and has insufficient elements (requested 1, current size 0) [[Node: get_batch/batch = QueueDequeueManyV2[component_types=[DT_STRING, DT_FLOAT, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](get_batch/batch/padding_fifo_queue, get_batch/batch/n)]] and the xml has no mistake Whats matter?@yangxue0827 thankyou!

wanghao14 commented 6 years ago

@mengmeng510 I met the same error and I have solved it. Just confirm that your tfrecods is under this path: ${R2CNN_FPN_Tensorflow}/data/tfrecords.

zhonhel commented 5 years ago

@JisuiWang remain OutOfRangeError

zhonhel commented 5 years ago

@yangxue0827 Hi, if I want to train on Pascal VOC, what should I do to fix this error..?

zhonhel commented 5 years ago

@yangxue0827 @JisuiWang Solved!That is because some of my xmls contain no object.