The Non-Common Path Aberrations (NCPA) represent a non-negligible issue that degrades the performances of every high-resolution AO-assisted imager working at visible or near infrared wavelengths. We present an innovative technique for the NCPA mitigation, which we are developing in the framework of SHARK-VIS at LBT, where it is usually attained through a trial-error or phase-diversity approach. The proposed method is based on the use of a neural network for image recognition. This new technique is a promising way to directly measure the NCPA so that it can be corrected with the injection of an "aberration" offset into the AO system. In our approach, the neural network used to measure the NCPA is trained through an ad-hoc set of aberrated extrafocal PSF simulations, where a PCA analysis is used to optimize the dimension of the original data set for the classification purpose. The first steps of this study will be presented, discussing the potential and the drawbacks of this new method.