minhnhat93 / tf_object_detection_multi_channels

Tutorial on How to change tensorflow object detection API to allow any number of input channels
61 stars 17 forks source link

Error training multi channel = 4 #5

Open Shiro-LK opened 6 years ago

Shiro-LK commented 6 years ago

Hello,

I am trying to train SSDlite mobilenet v2 following your tutorial but I am stuck withi this error :

INFO:tensorflow:Starting Queues.
2018-06-05 13:29:49.582518: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,381,638,4]
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,381,638,4]
     [[Node: batch/padding_fifo_queue_enqueue = QueueEnqueueV2[Tcomponents=[DT_STRING, DT_INT32, DT_FLOAT, DT_INT32, DT_FLOAT, ..., DT_INT32, DT_INT32, DT_INT32, DT_STRING, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](batch/padding_fifo_queue, IteratorGetNext, Shape_3, IteratorGetNext:1, Shape_5, Merge_1, Shape_4, Merge_2, Shape_10, IteratorGetNext:4, Shape_7, IteratorGetNext:5, Shape_8, IteratorGetNext:6, Shape_6, IteratorGetNext:7, Shape_9, ExpandDims_1, Shape, IteratorGetNext:9, Shape_3, IteratorGetNext:10, Shape_3, IteratorGetNext:11, Shape_3)]]
2018-06-05 13:29:49.704473: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,495,450,4]
2018-06-05 13:29:49.707130: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,426,640,4]
2018-06-05 13:29:49.709755: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,145,179,4]
2018-06-05 13:29:49.741023: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,400,431,4]
2018-06-05 13:29:49.743633: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at queue_ops.cc:105 : Invalid argument: Shape mismatch in tuple component 16. Expected [1,?,?,3], got [1,150,229,4]

Did someone get this error and solve it ? I check if I forgot some parameters but it does not seems the case. My images are all in .jpg formats.

EDIT : I tried to use frcnn resnet50 but I have some errors too regarding the softmax function.

EDIT 2 : It seems the problem comes from the function we modified in tf.example_decoder.py, even with 3 channels it doesn't work

cmbowyer13 commented 6 years ago

I had it working feeding in raw data for 3 channels before. But I've changed some things in tf.example decoder and now I get a flood of errors. It would be nice if minhnhat93 would update this to work with the current tensor flow object detection api code base. I would be eternally grateful.

Shiro-LK commented 6 years ago

@cmbowyer13 did you succeed to solve the problem ?