The use of artificial intelligence (AI) software for wavefront sensing has been demonstrated in previous studies. In this work, we have developed a novel approach to wavefront sensing by coupling an AI software with an Autostigmatic Microscope (AM). The resulting system offers optical component and system testing capabilities similar to those of an interferometer used in double pass, but with several advantages. The AM is smaller, lighter, and less expensive than commercially available interferometers, while the AI software is capable of reading out Zernike coefficients, providing real-time feedback for alignment. Our AI software uses an artificial neural network (NN) that is trained to output the Zernike coefficients, or any other relevant figures of merit, exclusively from synthetic data. The synthetic data includes random Zernike coefficients for a parametric description of the wavefront, noise, and a defocus error to avoid any stringent accuracy requirement. Once trained, the NN yields Zernike coefficients from a single frame of defocused intensity. The feedforward architecture of the NN enables swift output of Zernike coefficients, eliminating the need for iteration or optimization during run time. Using the software with an AM allows for paraxial alignment of the object in the test cavity, with the real-time Zernike coefficients guiding the item into optimal alignment. This double pass test is not possible with most other types of wavefront sensors, as they are designed for single-pass use. Our results demonstrate that the test results obtained compare well with modeled results, and that errors in the AM can be removed by calibration, as in the case of interferometer transmission spheres. Furthermore, the simple defocused image of a source provides non-ambiguous phase retrieval, which competes with traditional wavefront sensors such as Shack-Hartmann (SH) sensors or interferometers. The AI software provides high dynamic range, sensitivity and precision. This novel approach to wavefront sensing has significant potential for use in a wide range of applications in the field of optics.