R2CNN_HEAD_FPN_Tensorflow
R2CNN_HEAD_FPN_Tensorflow copied to clipboard
Batched inference
Thank you for you great work and ideas. I would like to try this repo on my own satellite images. However since I don't get good utilization by passing images one by one in inference.py I decided to inference by batches. Initially I added one dimension to the image placeholder:
img_plac = tf.placeholder(shape=[None, None, None, 3], dtype=tf.uint8)
And created a batch of images before feeding session.run
feed_dict={img_plac: IMG_BATCH}
I also changed the batch size in the config, and the preprocesding code that resizes the image to take.batch into account.
The error message i get with batch_size=8 is: InvalidArgumentError: Incompatible shapes: [1964160] vs. [245520] [[Node: rpn_proposals/decode/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](rpn_proposals/decode/truediv, rpn_proposals/decode/sub)]]
Can you please guide me through this process because I am not familiar with tensorflow semantics? Thank you very much once more