In this research, a high-power ultraviolet-light-emitting diode was employed as a substitute for a conventional mercury lamp and found to result in a considerable reduction of the lens cementing manufacturing time from 24 h to just a few minutes. The widely recognized VGG19 architecture was employed to effectively classify images depicting cementing defects and discovered to achieve an impressive success rate of 87.26%. The training outcomes were successfully applied in subsequent experiments, which led to a marked decrease in the occurrence of cementing defects from 17.71% to a mere 1.82%. Consequently, the overall efficiency of the entire process was substantially enhanced, ultimately leading to a significant improvement in cementing lens production.