Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 15, No. 2, 2025 22 Practice and Optimization of Image Recognition Technology for Higher Vocational Computer Application Majors Based on Deep Learning: Taking Industrial Product Defect Detection as an Example Lian Dan Zhejiang DongFang polytechnic, Wenzhou, Zhejiang, 325000, China Abstract: This article focuses on the field of computer application majors in higher vocational and technical colleges. It deeply expounds on the case applications of deep learning and related technologies in image recognition technology, centering around the actual enterprise requirements and technological requirements of industrial product defect detection. By building different deep learning models and related technologies, this article collects product image data in enterprise production, thus completing training, testing, and evaluation. Secondly, it compares the differences of each model in key indicators such as detection accuracy and recall rate, and combines with chart analysis to visually display the changes of the loss function and the accuracy improvement curve during the model training process. The design and analysis of the case can effectively enhance the practical operation and technical application abilities of higher vocational students in image recognition technology, and also provide case support for exchanges among industry practitioners. Keywords: Deep learning; Industrial product defect detection; Higher vocational computer application; Image recognition. 1. Introduction In the actual production process, quality is the lifeline of an enterprise. Therefore, every enterprise attaches great importance to product quality and constantly optimizes the methods of product quality inspection and evaluation, striving to control product quality with high quality and high efficiency to meet customer needs and improve the company's service quality and effect. The product quality inspection process has evolved from single manual inspection and auxiliary equipment inspection in the past to in depth inspection using image recognition technology[1]. The inspection methods in the past were costly and inefficient, and to a large extent, they have been phased out or replaced. Currently, the main inspection technology is to use artificial intelligence technology, which shows great advantages in the field of image recognition. It can automatically extract the features of images and achieve accurate recognition and classification of target objects. Applying deep learning to industrial product defect detection provides a new way to solve the disadvantages of traditional inspection methods[2]. 2. Introduction to the Basics of Deep Learning and Related Models 2.1. Basic Principles of Deep Learning Deep learning has a wide range of application fields. It is a machine learning method based on artificial neural networks. By constructing a multi layer neural network model, it enables the computer to automatically learn feature representations from a large amount of data. In image recognition tasks, neural networks can extract the key features of objects in images by learning a large number of image data, thus achieving the classification and recognition of image content[3]. 2.2. Common Deep Learning Image Recognition Models In the field of deep learning image recognition, common models have their own characteristics. LeNet is an early convolutional neural network successfully used for digit recognition. It adopts an architecture of convolutional layers, pooling layers, and fully connected layers. It has a simple structure and fast training speed, but its performance is limited when dealing with complex image tasks. AlexNet is an improvement based on LeNet. It increases the depth and width of the network and introduces innovative methods such as the ReLU activation function, improving the generalization ability and recognition accuracy, and providing important references for subsequent models[4]. VGGNet was proposed by the University of Oxford. It is characterized by small convolutional kernels and the stacking of multiple convolutional layers. It has a simple structure, is easy to implement, and has strong interpretability[5]. It performs well in fields such as image classification, but training consumes a large amount of computing resources and time. ResNet was designed to solve the problems of gradient vanishing and explosion. By using residual connections to alleviate gradient vanishing, it can be trained to a deeper level and has excellent performance in multiple computer vision tasks. It is a widely used deep learning model[6]. 3. Collection and Preprocessing of Industrial Product Defect Detection Datasets 3.1. Data Collection This study selected metal parts produced by a manufacturing enterprise as the detection objects. By installing high definition cameras on the production line, images of metal parts under different production batches and 23 production conditions were collected. To ensure the diversity and representativeness of the data, images containing normal products, surface scratches, holes, cracks, and other defect types were collected, with a total of 5,000 images. Among them, there were 2,500 images of normal products, and 500 images of each type of defective product. 3.2. Data Preprocessing The collected original images have problems such as uneven illumination and inconsistent sizes. Preprocessing is required to improve the image quality and facilitate the subsequent training and learning of the model. The specific preprocessing steps are as follows: Image Grayscaling: Convert color images to grayscale images to reduce the data dimension and computational complexity. The weighted average method is used to convert RGB images to grayscale images. The calculation formula is:: Gray=0.299R+0.587G+0.114B, where R, G, and B are the red, green, and blue channel values of the image, respectively. Image Denoising: Gaussian filtering is used to denoise the image, removing noise interference while retaining the edge and detail information of the image. The size of the Gaussian filter's convolution kernel is 5x5, and the standard deviation is 1.5. Image Normalization: Normalize the pixel values of the image to the interval [0, 1], so that the pixel values of different images have the same scale, facilitating the training and convergence of the model. The normalization formula is: where x represents the original pixel value, and xmin and xmax represent the minimum and maximum pixel values in the image, respectively. Image Enhancement: To increase the diversity of the data and improve the generalization ability of the model, image enhancement processing was carried out. Geometric transformation methods such as rotation, translation, scaling, and flipping, as well as gray scale transformation methods such as brightness adjustment and contrast enhancement were used. After data enhancement, the dataset was expanded to 10,000 images. 4. Building and Training of Image Recognition Models Based on Deep Learning 4.1. Model Building Based on the above introduced deep learning models, LeNet, AlexNet, VGGNet, and ResNet models were respectively built for industrial product defect detection. During the building process, the parameters of the models were appropriately adjusted according to the characteristics of industrial product images and the scale of the dataset. For example, for the LeNet model, the number of neurons in the convolutional layer and the fully connected layer was adjusted; for the AlexNet model, the Dropout probability and the size of the convolutional kernel were adjusted; for the VGGNet model, the appropriate number of network layers was selected; for the ResNet model, the number and structure of the residual blocks were determined. 4.2. Model Training The preprocessed dataset was used to train the built models. During the training process, the cross entropy loss function was used to measure the difference between the model's prediction results and the true labels. The stochastic gradient descent (SGD) algorithm was used as the optimizer, with a learning rate set to 0.001 and a momentum factor set to 0.9. The dataset was divided into a training set, a validation set, and a test set in the ratio of 70%:15%:15%. During the training process, after each epoch of training, validation was performed on the validation set. The parameters of the model were adjusted according to the loss and accuracy on the validation set to prevent overfitting. The training loss, validation loss, training accuracy, and validation accuracy of each epoch were recorded during the training process, and the loss function change curve and the accuracy improvement curve were drawn. 5. Experimental Results and Analysis 5.1. Comparison of Model Performance Indicators The trained LeNet、AlexNet、VGGNet and ResNet models were tested on the test set, and the detection accuracy, recall rate, and F1 value of each model were calculated. The results are shown in Table 1: | Model | Accuracy (%) | Recall Rate (%) | F1 value | model Accuracy (%) Recall Rate (%) F1 Score LeNet 78.5 75.3 76.8 AlexNet 85.2 82.1 83.6 VGGNet 88.4 86.7 87.5 ResNet 92.6 91.3 91.9 It can be seen from Table 1 that the ResNet model performs best in terms of detection accuracy, recall rate, and F1 value. This benefits from its unique residual connection structure, which can effectively alleviate the problem of gradient vanishing and enable the network to learn richer features. The performance of the VGGNet model is the second best. It improves the model's expressive ability through the stacking of multiple convolutional layers. The performance of the AlexNet model and the LeNet model is relatively low, mainly because their network structures are relatively simple. When dealing with complex industrial product defect detection tasks, it is difficult for them to learn sufficient features. 5.2. Analysis of the Model Training Process Figure 1 shows the change curves of the loss functions of the LeNet, AlexNet, VGGNet, and ResNet models during the training process. minmax minx xx xx norm    24 Figure 1. Change Curves of the Loss Function during Model Training It can be seen from Figure 1 that in the initial stage of training, the loss values of the four models all decrease rapidly with the increase of the training epoch. As the training progresses, the loss value of the ResNet model decreases the fastest, and it can maintain a relatively low loss value in the later stage of training, indicating that the ResNet model converges quickly and can fit the data better. The loss value of the LeNet model decreases relatively slowly, and it fluctuates in the later stage of training, indicating that the training effect of the LeNet model is relatively poor. Figure 2. Accuracy Improvement Curves during Model Training It can be seen from Figure 2 that the accuracy of the ResNet model improves the fastest. After 20 epochs of training, the accuracy reaches more than 90%. The accuracy improvement speeds of the VGGNet model and the AlexNet model are the second, and the accuracy improvement speed of the LeNet model is the slowest. This further proves the advantages of the ResNet model in industrial product defect detection tasks. 6. Conclusion This study applied deep learning technology to industrial product defect detection. It collected actual production data to build and train models such as LeNet, AlexNet, VGGNet, and ResNet, and compared and analyzed their performance indicators and training processes. It was found that the ResNet model performed best, providing an efficient solution for industrial product quality inspection and also enhancing the practical operation ability of higher vocational computer application majors. However, there are still some shortcomings in this study. In the future, research can be carried out from aspects such as optimizing model structure parameters, exploring advanced compression and acceleration technologies, introducing multi modal data, and strengthening school enterprise cooperation to improve the detection speed, accuracy, and robustness of the model, and to improve the technical solution, providing more reliable support for industrial product quality inspection. References [1] Wang Xingqiang. Research on Anti counterfeiting Image Recognition System Based on Artificial Intelligence [J]. China Brand and Anti counterfeiting, 2025, (05):5 7. [2] Wang Maozhen, Mao Changjun, Zheng Changyun, et al. Design of an Unsupervised Training Framework for Industrial Radiographic Inspection Image Recognition [J]. Electronic Design Engineering, 2025, 33(08): 22 26. DOI:10.14022/j.issn1674 6236.2025.08.005. [3] Zhang Junying, Lin Yanbing, Wang Yongjie, et al. Design and Application of an Intelligent Control System for Coal Mine Workers Based on AI Image Recognition [J]. Electronic Design Engineering, 2025, 33(08): 125 129. DOI:10.14022/j.issn1674 6236.2025.08.026. [4] Qi Zhenxing. Research on Optimization and Application of Image Recognition Algorithms Based on Deep Learning [J]. Science and Technology & Innovation, 2025, (07):229 232. DOI:10.15913/j.cnki.kjycx.2025.07.064. [5] Li Chaoyi, Zong Jingxiu. Research on Image Recognition Technology Based on Deep Learning [J]. China Strategic Emerging Industry, 2025, (11):57 60. [6] Hu Yaoyu, Wang Yuming, Liu Chenyu, et al. Design of a Commodity Intelligent Pricing System Based on Deep Learning and Image Recognition Technology [J]. Internet of Things Technologies, 2025,15(07):55 58. DOI:10.16667/j.issn.2095 1302.2025.07.011.