In this study, a numerical method of the identification of mechanical parameters of thin films such as Young's modulus is developed. The identification is based on the minimization of a cost functional using a gradient descent algorithm. The main result is the computation of the gradient of the contact problem using a direct differentiation technique. The efficiency of the method is illustrated in the identification of the Young's moduli of thin films.