def mask_and_add_image(min_y_, min_x_, max_y_, max_x_, mask, content_tensor, image_):
    'Applies mask to bbox region in image then adds content_tensor to it.'
    mask = tf.pad(mask, [[min_y_, ((image_height - 1) - max_y_)], [min_x_, ((image_width - 1) - max_x_)], [0, 0]], constant_values=1)
    content_tensor = tf.pad(content_tensor, [[min_y_, ((image_height - 1) - max_y_)], [min_x_, ((image_width - 1) - max_x_)], [0, 0]], constant_values=0)
    return ((image_ * mask) + content_tensor)
Applies mask to bbox region in image then adds content_tensor to it.
def mask_and_add_image(min_y_, min_x_, max_y_, max_x_, mask, content_tensor, image_):
    
    mask = tf.pad(mask, [[min_y_, ((image_height - 1) - max_y_)], [min_x_, ((image_width - 1) - max_x_)], [0, 0]], constant_values=1)
    content_tensor = tf.pad(content_tensor, [[min_y_, ((image_height - 1) - max_y_)], [min_x_, ((image_width - 1) - max_x_)], [0, 0]], constant_values=0)
    return ((image_ * mask) + content_tensor)