The typical defect detection method is based on the use of conventional cameras with limited dynamic range and image processing algorithm. Their identification efficiency is low particularly for industrial application because the light intensity from some highly reflective surfaces can easily exceed the maximum intensity limit of the sensor. In this paper, we take advantage of the fast spatial light modulation characteristics of the DMD system. By generating highlight defect datasets and training the neural network (i.e., mask region-based convolutional neural network), the defects covered by strong light can be detected quickly and automatically.