To address the shortcomings of current surface defect detection algorithm with many parameters, slow detection rate and low accuracy, a defect detection algorithm based on DenseNet network is proposed to mitigate the effects of gradient disappearance and gradient explosion with its more aggressive dense connection mechanism, which also reduces the number of parameters to some extent. Meanwhile, the enhancement effect of SENet network on the effective features is utilized to optimize the network model and enhance the accuracy. Using the strip steel surface defect dataset released by Northeastern University as the base defect sample, the enhancement operation is performed on it. The accuracy of the present algorithm tested on this dataset is as high as 99.44%, which is higher than that of the unimproved DenseNet network, and in terms of computational speed, the present algorithm is only 1.9ms/frame, which obtains a significant improvement compared to the DenseNet network.