# Best way to fill an image placed into a larger box without creating artificial edges?

If you are training a neural net for a bunch of images of different size, and you have to put them all in a same-size enclosing box for input to the neural net, what's the best way to fill the background, if at all, where the inserted image is not covering the box?

It's basically the flip side of these questions:

• The question isn't clear. Could you try to explain it in a clearer fashion? – Royi May 26 '18 at 6:25
• @Royi: If you are training a neural net for a bunch of images of different size, and you have to put them all in a same-size enclosing box for input to the neural net, what's the best way to fill the background, if at all, where the inserted image is not covering the box? – Lars Ericson May 27 '18 at 1:38
• This is a much clearer explanation. You should rewrite the question in that spirit and I will be able to answer. – Royi May 27 '18 at 4:07

  float_caster = tf.cast(image_reader, tf.float32)