  Real-time performance of stereo matching networks is important for many
applications, such as automatic driving, robot navigation and augmented reality
(AR). Although significant progress has been made in stereo matching networks
in recent years, it is still challenging to balance real-time performance and
accuracy. In this paper, we present a novel edge-preserving cost volume
upsampling module based on the slicing operation in the learned bilateral grid.
The slicing layer is parameter-free, which allows us to obtain a high quality
cost volume of high resolution from a low-resolution cost volume under the
guide of the learned guidance map efficiently. The proposed cost volume
upsampling module can be seamlessly embedded into many existing stereo matching
networks, such as GCNet, PSMNet, and GANet. The resulting networks are
accelerated several times while maintaining comparable accuracy. Furthermore,
we design a real-time network (named BGNet) based on this module, which
outperforms existing published real-time deep stereo matching networks, as well
as some complex networks on the KITTI stereo datasets. The code is available at
https://github.com/YuhuaXu/BGNet.
