Laser technology plays fundamental roles in the modern optical experiments and applications. The performance of optical devices will be significantly affected by micro impurities and defects on the optical surfaces. Therefore, precisely positioning the optical impurities and defects is an important issue in optics. In this paper, we theoretically propose to adopt the deep learning neural networks in addressing this problem. Specifically, we generate the training data via simulating the dynamic process in which a probe optical pulse being scattered by a micro-impurity on an optical surface, and then the position information of the impurity carried by the reflection and the transmission signal can be efficiently learned by a deep convolutional neural network. One step further, we show that the deep neural network can make precise predictions on the generalization datasets generated through varying the size, refractive index, and geometry of the impurity, respectively. Additionally, we also compared the learning capability of two different networks architectures. This work provides new perspective for the impurity and defect detections in the field of precision optics.