  Background fluorescence, especially when it exhibits undesired spatial
features, is a primary factor for reduced image quality in optical microscopy.
Structured background is particularly detrimental when analyzing
single-molecule images for 3D localization microscopy or single-molecule
tracking. Here, we introduce BGnet, a deep neural network with a U-net-type
architecture, as a general method to rapidly estimate the background underlying
the image of a point source with excellent accuracy, even when point spread
function (PSF) engineering is in use to create complex PSF shapes. We trained
BGnet to extract the background from images of various PSFs and show that the
identification is accurate for a wide range of different interfering background
structures constructed from many spatial frequencies. Furthermore, we
demonstrate that the obtained background-corrected PSF images, both for
simulated and experimental data, lead to a substantial improvement in
localization precision. Finally, we verify that structured background
estimation with BGnet results in higher quality of super-resolution
reconstructions of biological structures.
