  The uncertainty quantification of prediction models (e.g., neural networks)
is crucial for their adoption in many robotics applications. This is arguably
as important as making accurate predictions, especially for safety-critical
applications such as self-driving cars. This paper proposes our approach to
uncertainty quantification in the context of visual localization for autonomous
driving, where we predict locations from images. Our proposed framework
estimates probabilistic uncertainty by creating a sensor error model that maps
an internal output of the prediction model to the uncertainty. The sensor error
model is created using multiple image databases of visual localization, each
with ground-truth location. We demonstrate the accuracy of our uncertainty
prediction framework using the Ithaca365 dataset, which includes variations in
lighting, weather (sunny, snowy, night), and alignment errors between
databases. We analyze both the predicted uncertainty and its incorporation into
a Kalman-based localization filter. Our results show that prediction error
variations increase with poor weather and lighting condition, leading to
greater uncertainty and outliers, which can be predicted by our proposed
uncertainty model. Additionally, our probabilistic error model enables the
filter to remove ad hoc sensor gating, as the uncertainty automatically adjusts
the model to the input data
