Imported from https://github.com/RobotLocomotion/pytorch-dense-correspondence