  Wavefront shaping is increasingly being used in modern microscopy to obtain
distortion-free, high-resolution images deep inside inhomogeneous media.
Wavefront shaping methods typically rely on the presence of a 'guidestar' in
order to find the optimal wavefront to mitigate the scattering of light.
However, this condition cannot be satisfied in most biomedical applications.
Here, we introduce a novel, guidestar-free wavefront shaping method in which
the optimal wavefront is computed using a digital model of the sample. The
refractive index model of the sample, that serves as the input for the
computation, is constructed in-situ by the microscope itself. In a proof of
principle imaging experiment, we demonstrate a large improvement in the
two-photon fluorescence signal through a diffuse medium, outperforming the
state-of-the-art wavefront shaping techniques by a factor of 21.
