## 3 The Proposed Model
### Loss Function
In the future, we will reduce the algorithm complexity to further lower the computational overhead in defect sample generation, and integrate the annotation algorithm to achieve automatic annotation of the generated defect samples, so as to better adapt to the industrial defect detection application scenarios. Formal analysis, Y.Y. and H.Z. ; Investigation, Y.Y. and H.Z. ; Resources, K.W. ; Writing--original draft, J.Y. ; Writing--review & editing, F.L., Y.Y. and H.Z. ; Supervision, Y.Y. and H.Z. All authors have read and agreed to the published version of the manuscript. This research was funded by the General Program of Chongqing Natural Science Foundation grant number No. CSTB2022 NSCQ-MSX0295. Data Availability Statement: Data sets generated during the current study are available from the corresponding author upon reasonable request. The DAGM2007 public dataset can be found at [[https://hchi.iwr.uni-heidelberg.de/content/weakly-supervised-learning-industrial-optical-inspection](https://hchi.iwr.uni-heidelberg.de/content/weakly-supervised-learning-industrial-optical-inspection)]([https://hchi.iwr.uni-heidelberg.de/content/weakly-supervised-learning-industrial-optical-inspection](https://hchi.iwr.uni-heidelberg.de/content/weakly-supervised-learning-industrial-optical-inspection)) (accessed on 20 December 2022). The authors declare no conflict of interest. ## References

* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Understanding the adoption of Industry 4.0 technologies in improving environmental sustainability. _Sustain. Oper. Comput._**2022**, \(3\), 203-217. [CrossRef]
* [PERSON] et al. (2022) [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON] Smart and Resilient Transformation of Manufacturing Firms. _Processes_**2022**, _10_, 2674. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON] UpSkill@ Mgmt 4.0-A digital tool for competence management: Conceptual model and a prototype. _Int. J. Ind. Eng. Manag._**2022**, _13_, 225-238. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON] Computer vision techniques in manufacturing. _IEEE Trans. Syst. Man Cybern. Syst._**2022**, _53_, 105-117. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON] State of the art in defect detection based on machine vision. _Int. J. Precis. Eng. Manuf. Green Technol._**2022**, \(9\), 661-691. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] A Systematic Review of Machine-Vision-Based Leather Surface Defect Inspection. _Electronics_**2022**, _11_, 2383. [CrossRef]
* [PERSON] and [PERSON] (2023) [PERSON]; [PERSON] Deep learning-based fabric defect detection: A review. _Text. Res. J._**2023**, _93_, 1485-1503. [CrossRef]
* [PERSON] et al. (2023) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] An industrial defect detection algorithm based on CPU-GPU parallel call. _Multimed. Tools Appl._**2023**. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON]; [PERSON] Review of industry workpiece classification and defect detection using deep learning. _Int. J. Adv. Comput. Sci. Appl._**2022**, _13_, 4. [CrossRef]
* [PERSON] et al. (2022) [PERSON]; [PERSON]; [PERSON] A review on modern defect detection models using DCNNs-Deep convolutional neural networks. _J. Adv. Res._**2022**, _35_, 33-48. [CrossRef]
* [PERSON] and [PERSON] (2022) [PERSON]; [PERSON] A survey of surface defect detection of industrial products based on a small number of labeled data. _arXiv_**2022**, arXiv:2203.05733. * [PERSON] et al. (2021) [PERSON]; [PERSON]; [PERSON]; [PERSON] Deep learning strategies for industrial surface defect detection systems. _arXiv_**2021**, arXiv:2109.11304. * [PERSON] (2022) [PERSON] A Survey of Surface Defect Detection Based on Deep Learning. In Proceedings of the 2022 7 th International Conference on Modern Management and Education Technology (MMET 2022), Xiamen, China, 23-25 September 2022; Atlantis Press: Amsterdam, The Netherlands, 2022; pp. 362-367.