In order to solve the problems of difficult detection,low detection accuracy,and high leakage rate in the surface coating defect detection of aluminum cans,the convolutional neural networks is investigated to detect the surface coating defect of aluminum cans.By training four convolutional neural network models,AlexNet,GoogLeNet,ReseNet and optimized DenseNet,the most suitable model was selected to detect the inner and outer surface coating defects of aluminum cans.The detection software was designed and developed for automated aluminum can production lines.The result shows that the optimized DenseNet18 model has the highest accuracy in detecting the inner surface coating defects,at 96.67%.The ResNet18 model has the highest accuracy in detecting the outer surface coating defects,at 93.33%.The detection time of the two models is about 250 ms.The detection accuracy and speed of this method canmeet industrial requirementsbasically.This defect detection method has achieved good practical application results in industrial production.