Abstract: We present a new biomimetic image inpainting algorithm, the Averaging and Hypoelliptic Evolution (AHE) algorithm, inspiredby the one presented in Boscain et al. (SIAM J. Imaging Sci. 7(2):669–695, 2014) and based upon a semi-discrete variationof the Citti–Petitot–Sarti model of the primary visual cortex V1. The AHE algorithm is based on a suitable combination ofsub-Riemannian hypoelliptic diffusion and ad hoc local averaging techniques. In particular, we focus on highly corruptedimages (i.e., where more than the 80% of the image is missing), for which we obtain high-quality reconstructions.