The implementation of bilinear inverse warp operation at TensorFlow.
The custom operation supports CPU and GPU devices.
- Linux (Ubuntu 16.04)
- TensorFlow 1.9
- Cuda 9.0
-
Command
make
and generateinverse_warp.so
-
Run example:
import tensorflow as tf from inverse_warp_op import inverse_warp inp = tf.ones([1, 300, 600, 3], tf.float32) flow = tf.ones([1, 300, 600, 2], tf.float32) warp_res = inverse_warp(inp, flow)
inverse_warp(
x,
flow
)
Args:
x
: ATensor
. Must befloat32
types. The shape can be 3-D[height, width, channels]
or 4-D[batch, height, width, channles]
.flow
: ATensor
. Must befloat32
types. The shape can be 3-D[height, width, 2]
or 4-D[batch, height, width, 2]
.
Returns:
A float32 Tensor
with the same shape as input x
.