  Perception modules are integral in many modern autonomous systems, but their
accuracy can be subject to the vagaries of the environment. In this paper, we
propose a learning-based approach that can automatically characterize the error
of a perception module from data and use this for safe control. The proposed
approach constructs an inverse perception contract (IPC) which generates a set
that contains the ground-truth value that is being estimated by the perception
module, with high probability. We apply the proposed approach to study a vision
pipeline deployed on a quadcopter. With the proposed approach, we successfully
constructed an IPC for the vision pipeline. We then designed a control
algorithm that utilizes the learned IPC, with the goal of landing the
quadcopter safely on a landing pad. Experiments show that with the learned IPC,
the control algorithm safely landed the quadcopter despite the error from the
perception module, while the baseline algorithm without using the learned IPC
failed to do so.
