We propose an adaptive optics system for a lightweight remote sensing sensor. The phase diversity (PD) technique, in which known wavefronts (Phase Diversity) are applied to the optics and the inherent aberrations are estimated using the acquired images without a priori information, is a key to realizing the system. For the reduction of computing cost and the enhancement of the estimation accuracy of aberration, a spatial light modulator (SLM) is adopted not only for wavefront compensator but also for PD generator. The SLM produces arbitrary "aberration modes" that are each represented by a Zernike polynomial. Therefore, optimal phase diversities are applied to the optical system and particular modes are effectively obtained, which makes it possible to overcome the conventional PD generated by defocusing that describes only quadratic form and lacks information of a particular mode. In order to solve the complex inverse problem of phase diversity with low computing cost, a general regression neural network (GRNN) is used. Moreover, principal component analysis compresses the input data for GRNN by extracting information from collected images in Fourier space, and reduces computation cost considerably. The performance is validated by numerical simulation, and the result of experiment using SLM is described.