In dental treatment, an increasing number of patients choose metal-implant surgery to treat oral conditions. Computed tomography (CT) images of patients with implanted foreign bodies such as dentures and metal clips are difficult to interpret correctly owing to the presence of high-density metal artifacts. In severe cases, these artifacts may even lead to misdiagnosis, potentially affecting subsequent treatment. Therefore, metal artifact reduction remains an important concern. We propose a novel homographic adaptation convolutional neural network (HACNN) algorithm to solve the problem of metal artifacts in the mouth in head CT. In an experiment, we use a 17-layer CNN as a framework for deep learning, in conjunction with the VGG19 network, to extract the features of CT images, including the original CT, reference CT, and CT images processed by the CNN network. Then, to solve the problem of data misalignment, the improved contextual loss is used as the loss function in the network, and the parameters are adjusted to produce the best results. In contrast to the results of similar experiments, the metal artifacts were removed, details of the CT image were well conserved, and generation of new artifacts was avoided without introducing image blurring.