  High-throughput 2D and 3D scanning electron microscopy, which relies on
automation and dependable control algorithms, requires high image quality with
minimal human intervention. Classical focus and astigmatism correction
algorithms attempt to explicitly model image formation and subsequently
aberration correction. Such models often require parameter adjustments by
experts when deployed to new microscopes, challenging samples, or imaging
conditions to prevent unstable convergence, making them hard to use in practice
or unreliable. Here, we introduce DeepFocus, a purely data-driven method for
aberration correction in scanning electron microscopy. DeepFocus works under
very low signal-to-noise ratio conditions, reduces processing times by more
than an order of magnitude compared to the state-of-the-art method, rapidly
converges within a large aberration range, and is easily recalibrated to
different microscopes or challenging samples.
