**5. Conclusions**

In this paper, DeepLabv3+ was selected as the semantic segmentation model, and ResNet-34 was used as the backbone network to establish an intelligent detection model of sorbite content based on deep learning. The metallographic images of high-carbon steel wire rods were manually labeled and cut as data sets. To solve the multi-distribution problem of the source and characteristics of the samples, this paper used the Dice loss and focal loss functions to design data perturbation processing to enhance the accuracy of the prediction results and the robustness of the model. Meanwhile, the uniformity of the samples was evaluated by separately predicting and analyzing the sorbite content in the slit region. The results show that the proposed method can realize the automatic statistics of sorbite content. The average pixel prediction accuracy was as high as 94.28%, and the average absolute error was only 4.17%. The composite application of the loss function and the enhancement of the data perturbation significantly improved the prediction accuracy and robust performance of the model. In this method, the detection of sorbite content in a single image only took 10 s, which was 99% faster than that of 10 min using the manual cut-off method. On the premise of ensuring detection accuracy, the detection efficiency was significantly improved and the labor intensity was reduced.

**Author Contributions:** Conceptualization, Z.Y. and X.Z.; methodology, Z.Y. and X.Z.; software, X.Z.; validation, G.H., F.X., and Q.Y.; investigation, X.Z.; resources, G.H., X.C., and Q.Y.; data curation, X.Z.; writing—original draft preparation, X.Z.; writing—review and editing, G.H., L.Q., X.C., and F.X.; supervision, Q.Y. and L.Q.; project administration, Z.Y.; funding acquisition, Z.Y. and X.Z.; All authors have read and agreed to the published version of the manuscript.

**Funding:** This project was supported by the Science and Technology Program of Jiangsu Provincial Administration for Market Regulation (grant no. KJ204115, KJ21125122, KJ2022062).

**Data Availability Statement:** The data presented in this study are available on request from the corresponding author.

**Acknowledgments:** Thanks to Baodong Feng, Xuebin Xu, Bo Liu, Linning Qian, and Jun Wan for the help with data calibration.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
