In a method of generating a virtual 3D model of a dental site, scan data comprising an intraoral image is received during an intraoral scan of a dental site. A representation of a foreign object is identified in the intraoral image based on an analysis of the scan data. The intraoral image is modified by removing the representation of the foreign object from the intraoral image. Additional scan data comprising a plurality of additional intraoral images of the dental site is received during the intraoral scan. A virtual 3D model of the dental site is then generated using the modified intraoral image and the plurality of additional intraoral images.