Optical distortions of an image are created in astronomical, optical microscopy and communication systems by light propagation throughout a variety of optical components. Usually, optical aberrations are corrected by using an Adaptive Optics system, where a wavefront sensor is used to measure the optical distortion. In this work, we propose to use a Lateral Inhibition Pyramidal Neural Network (LIPNet) in the frequency domain to classify optical defocus (using Zernike polynomials
), such that optical defocus value can be detected directly from the image without the use of wavefront sensing. The results show the potentiality of the method and open new opportunities to explore this kind of neural networks algorithms for wavefront sensing and Adaptive optic systems.