The proportion of natural sand replaced by steel slag sand affects the volumetric stability of steel slag mortar and steel slag concrete. However, the steel slag substitution rate detection method is inefficient and lacks representative sampling. Therefore, a deep learning-based steel slag sand substitution rate detection method is proposed. The technique adds a squeeze and excitation (SE) attention mechanism to the ConvNeXt model to improve the model's efficiency in extracting the color features of steel slag sand mix. Meanwhile, the model's accuracy is further enhanced by using the migration learning method. The experimental results show that SE can effectively help ConvNeXt acquire images' color features. The model's accuracy in predicting the replacement rate of steel slag sand is 87.99%, which is better than the original ConvNeXt network and other standard convolutional neural networks. After using the migration learning training method, the model predicts the steel slag sand substitution rate with 92.64% accuracy, improving accuracy by 4.65%. The SE attention mechanism and the migration learning training method can help the model acquire the critical features of the image better and effectively improve the model's accuracy. The method proposed in this paper can identify the steel slag sand substitution rate quickly and accurately and can be used for the detection of the steel slag sand substitution rate.