Due to the complexity and variety of textures on Strip steel, it is very difficult to detect defects on rigid surfaces. This paper proposes a metal surface defect classification method based on an improved bat algorithm to optimize BP neural network. First, this paper uses the Local Binary Pattern(LBP) algorithm to extract features from six types of defect images including inclusion, patches, crazing, pitted, rolled-in, and scratches, and build a feature sample library with the extracted feature values. Then, the WG-BA-BP network is used to classify the defect images with different characteristics. The weighted experience factor added by the network can control the flight speed of the bat according to the number of iterations and the change of the fitness function. And the gamma distribution is added in the process of calculating loudness, which enhances the local searchability. The BP network optimized by this method has higher accuracy. Finally, to verify the effectiveness of the method, this article introduces the five evaluation indicators of accuracy, precision, sensitivity, specificity, and F1 value under the multi-class model. To prove that this algorithm is more feasible and effective compared with other swarm intelligence algorithms. The best prediction performance of WG-BA-BP is 0.010905, and the accuracy rate can reach 0.9737.