The classical total variation image inpainting algorithm costs more iterations and time to remove the text and scratches. Aiming at this problem, we propose an improved algorithm. Firstly, the diffusion accommodation coefficient is added into the rcgularization term. Secondly, a self-adaptive parameter that varies with the number of iterations is added to the diffusion accommodation coefficient. Thus, the algorithm diffuses at a faster speed in the early iteration and slows down in the later iteration, and the restored image maintains a sharp edge. A large number of simulations show that the improved algorithm reduces the number of iterations and running time in the scratch and text removal, and the restored image has good visual effect.