Centrifugal fan appearance quality detection method based on image recognition
By building a lightweight attention residual network model and introducing jackal optimization algorithm, the problems of low efficiency, high misjudgment rate and poor environmental adaptability in centrifugal fan appearance detection are solved, and efficient and accurate defect identification and automatic removal are achieved, which is suitable for real-time detection of industrial production lines.
Patent Information
- Application Number
- CN202510444743.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing centrifugal fan appearance detection methods have problems such as low detection efficiency, high misjudgment rate, poor adaptability to complex environments, large amount of parameters and insufficient real-time performance of deep learning models.
The lightweight attention residual network model is used to combine the Jackal Optimization algorithm, and through multi-angle image acquisition, image enhancement and data preprocessing, a lightweight network structure is built, and the attention mechanism is embedded. The Jackal Optimization algorithm is used to jointly optimize the model structure parameters and training hyperparameters to realize automatic and real-time detection of centrifugal fan defects.
It significantly improves the accuracy and real-time detection, reduces the consumption of computing resources, has the advantages of simplified deployment, high stability and adapts to complex industrial environments, and can accurately identify defects such as cracks, scratches, and fractures, and realizes automatic removal of unqualified products.
Smart Images

Figure CN120374538A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular, to a method for detecting the appearance quality of a centrifugal fan based on image recognition. Background Art
[0002] In recent years, with the rapid development of industrial automation and intelligent manufacturing, the level of equipment production and quality control has been continuously improved, and the requirements for product appearance quality inspection have become increasingly strict. In the manufacturing process of industrial products such as centrifugal fans, appearance quality inspection is an important link to ensure the reliability, stability and safety of products. Traditional centrifugal fan appearance detection mainly relies on manual inspection or automated detection systems based on simple image processing techniques. However, these methods often have deficiencies such as low detection efficiency, high misjudgment rate, and large influence of subjective factors, and are difficult to meet the requirements of high-precision and real-time detection on modern production lines. Due to the use of fixed algorithms and static models, traditional automated detection systems are difficult to sensitively identify subtle defects in images, and have poor stability under changing conditions such as illumination, noise, and product diversity, and cannot adapt to complex and changeable industrial environments.
[0003] At present, computer vision and deep learning technologies have made remarkable progress in the field of image recognition. Many researchers have tried to apply deep neural networks to product appearance detection. Although these methods have improved the degree of automation and accuracy of detection to a certain extent, they still face some key problems in practical applications. First, most of the existing deep learning models adopt relatively complex network structures with a large number of parameters, which are not easy to be deployed in edge devices or real-time detection systems. Second, traditional models lack an effective global search mechanism during the training process and often can only stay at the local optimal state, resulting in unstable recognition effects and insufficient generalization ability. In addition, the selection of model hyperparameters and the configuration of network structures mainly rely on empirical adjustment, lacking automated parameter optimization means, which restricts the overall performance and popularization of the detection system.
[0004] In the field of centrifugal fan appearance defect detection, the current technology usually adopts image classification and object detection methods based on convolutional neural networks to identify defects. However, these methods are easily affected by noise and image quality fluctuations when dealing with subtle defects (such as cracks, scratches and fractures), and the detection results are often not stable enough. In addition, the existing detection systems lack global joint optimization of network structures and training hyperparameters, resulting in high complexity and low real-time performance of the models in practical applications. To solve the above problems, some studies have begun to explore introducing swarm intelligence optimization algorithms into the parameter tuning of deep learning models. However, existing swarm intelligence algorithms such as genetic algorithms and particle swarm optimization algorithms still have defects such as slow convergence speed and easy to fall into local optima in terms of global search and local development.
[0005] Therefore, how to provide a method for detecting the appearance quality of centrifugal fans based on image recognition is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0006] An object of the present invention is to propose a method for detecting the appearance quality of centrifugal fans based on image recognition. The present invention makes full use of deep vision algorithms and swarm intelligence optimization techniques. By constructing a lightweight attention residual network model to extract the key features of the appearance defects of centrifugal fans, and using an improved jackal optimization algorithm to jointly optimize the model structure parameters and training hyperparameters, thereby realizing the automatic and real-time detection of centrifugal fan defects. This method not only greatly improves the accuracy and real-time performance of detection, but also reduces the consumption of computing resources, and has the advantages of simple deployment, high stability and adaptability to industrial complex environments.
[0007] A method for detecting the appearance quality of centrifugal fans based on image recognition according to an embodiment of the present invention includes the following steps:
[0008] S1. Collect multi-angle images of the centrifugal fan in the actual production environment to form an image data set, and preprocess the image data set;
[0009] S2. Perform image enhancement operations on the preprocessed image data set to generate a data enhancement image set;
[0010] S3. Based on the generated data enhancement image set, construct an attention residual lightweight network model to extract and encode the key features of the centrifugal fan defects in the image;
[0011] S4. Introduce the jackal optimization algorithm to jointly optimize the structure parameters and training hyperparameters of the attention residual lightweight network model to obtain the optimized network structure and parameters;
[0012] S5. Based on the optimized network structure and parameters, train the attention residual lightweight network model to obtain a trained defect recognition model;
[0013] S6. Input the test image of the centrifugal fan into the trained defect recognition model, and output the type and spatial position coordinates of the appearance defects in the test image;
[0014] S7. Classify and evaluate the defects according to the output defect type and spatial position coordinates, and judge the severity of the defects based on the type, area and location of the defects.
[0015] S8. Send the defect evaluation result to the production line linkage device. The production line linkage device includes an automatic rejection mechanism and a sorting control component, performs the automatic rejection operation of unqualified products, and stores the recognition and evaluation information at the same time.
[0016] Optionally, the multi-angle images specifically include the front, side, and inclined-angle images of the centrifugal fan under different rotation angles and lighting conditions, which are used to comprehensively cover the appearance area of the centrifugal fan to improve the integrity and accuracy of defect recognition.
[0017] Optionally, the preprocessing of the image dataset specifically includes image grayscale standardization, noise suppression, and size normalization, which are used to improve the image quality and unify the input format.
[0018] Optionally, the image enhancement operation on the image dataset specifically includes edge enhancement, contrast stretching, and pseudo-color transformation, which are used to highlight the features of potential defect areas in the image.
[0019] Optionally, S3 specifically includes:
[0020] S31. Perform tensor processing and size adaptation on the generated data-augmented image set, and uniformly adjust the image data into a tensor format with a fixed size and a unified number of channels as the standard input of the attention residual lightweight network model;
[0021] S32. Construct a lightweight convolutional feature extraction module, which adopts a depthwise separable convolution structure to perform local feature extraction with low computational complexity on the input image, forming a representation of texture, edge, and color gradient information at the basic level;
[0022] S33. On the basis of the output of the lightweight convolutional feature extraction module, build multiple residual connection units, and the residual connection units include a main path convolution and a bypass skip connection structure, which are used to fuse feature information at different levels;
[0023] S34. Embed a channel attention mechanism in each residual connection unit, and adjust the response ratio between feature channels by adjusting the weights of the feature response degrees of different channels;
[0024] S35. Introduce a coordinate attention module after some residual output layers to model the spatial position information of the image in the horizontal and vertical directions, and perform weighted processing on the spatial dimension of the feature map;
[0025] S36. Perform multi-scale integration on all residual output features fused with the attention mechanism, and connect them to the output layer of the attention residual lightweight network model to obtain the final feature encoding result.
[0026] Optionally, S4 specifically includes:
[0027] S41. Define the set Θ of adjustable parameters of the attention residual lightweight network model, and the set of adjustable parameters includes structural parameters and training hyperparameters;
[0028] S42. Construct an objective function \(F(\Theta)\) for optimizing structural parameters and training hyperparameters. The objective function comprehensively considers the recognition accuracy, the complexity of the attention residual lightweight network model, and the training convergence time:
[0029] \(F(\Theta)=\alpha\cdot Acc(\Theta)-\beta\cdot CP(\Theta)-\gamma\cdot T(\Theta)\);
[0030] where \(Acc(\Theta)\) represents the recognition accuracy, \(CP(\Theta)\) represents the complexity of the attention residual lightweight network model, \(T(\Theta)\) represents the training convergence time, and \(\alpha\), \(\beta\), \(\gamma\) are adjustable weight coefficients;
[0031] S43. Initialize all candidate parameter vectors \(\Theta\) in the population (0) , and set the initial step size \(\lambda_0\), attack coefficient \(\delta\), fusion coefficient \(\omega\), maximum number of iterations \(K\), and balance threshold \(D\) min ;
[0032] S44. In the exploration stage, simulate the searching behavior of jackals after discovering prey. Based on the current population individuals \(\Theta\) (k) and the current optimal individual calculate the exploration update vector for each individual
[0033]
[0034] where \(\lambda\) k represents the dynamic step size coefficient at the \(k\)-th iteration;
[0035] S45. In the encirclement stage, simulate the behavior of jackals gradually approaching the prey. Calculate the encirclement vector according to the exploration update vector and the current optimal solution
[0036]
[0037] where \(\mu\) is the encirclement intensity coefficient;
[0038] S46. In the balance stage, calculate the diversity index \(D\) of the current population. When \(D < D\) min , add random perturbations to the encirclement vector to obtain the balance update vector
[0039]
[0040] where \(\lambda\) b is the perturbation amplitude, and \(rand(-1, 1)\) represents a random number vector;
[0041] S47. In the collaborative information fusion stage, for each candidate individual Construct the neighborhood set N(i), and determine the normalized weights based on the fitness of each individual in the neighborhood The balanced update vector Is weighted and fused with the neighborhood information and updated to the collaborative parameter vector
[0042]
[0043] Among them, ω represents the global information fusion coefficient, Represents the parameter vector of the j-th individual in the neighborhood in the k-th iteration;
[0044] S48. In the attack stage, simulate the jackal's attack behavior, and finely adjust and update the collaborative parameter vector to obtain the final adjustable parameter set of the i-th individual in the (k + 1)-th iteration
[0045]
[0046] Among them, δ is the attack intensity coefficient;
[0047] S49. Calculate the objective function value for the adjustable parameter sets corresponding to all individuals in the current population in the (k + 1)-th iteration And select the individual with the largest objective function value among all candidate individuals, and set the adjustable parameter set as the new optimal parameter set
[0048] S410. When the number of iterations reaches the preset maximum value K, or the objective function value corresponding to the current optimal parameter set Meets the convergence condition, terminate the iteration, and use As the final optimization result, which is used to configure the structural parameters and training hyperparameters of the attention residual lightweight network model
[0049] Optionally, the specific steps of S5 are as follows:
[0050] S51. Load the optimal parameter set obtained by the jackal optimization algorithm, and initialize the attention residual lightweight network model, including the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module;
[0051] S52. Construct the training dataset, combine the enhanced images with the corresponding defect labels, divide them into the training set and the validation set, and perform batch division and data normalization preprocessing;
[0052] S53. Input the training dataset into the attention residual lightweight network model, and perform iterative training according to the set learning rate and batch size;
[0053] S54. During the training process, compare the output results of the attention residual lightweight network model with the true labels, evaluate the differences through a loss function, and perform backpropagation operations based on the differences to update the weights of the attention residual lightweight network model. Adopt an early stopping mechanism to control the number of training rounds;
[0054] S55. Use the validation set to evaluate the training results of each round, record the accuracy, recall rate, and loss changes in real time, and judge the generalization ability and stability of the attention residual lightweight network model during the training process;
[0055] S56. When the training of the attention residual lightweight network model meets the set accuracy standard or reaches the maximum number of training rounds, save the weights and structure configuration of the finally trained attention residual lightweight network model to obtain a defect recognition model that can be used for the centrifugal fan defect recognition task.
[0056] Optionally, the initialization of the attention residual lightweight network model specifically includes the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module, which are used to construct the basic framework and key parameter settings of the attention residual lightweight network model.
[0057] Optionally, S6 specifically includes:
[0058] S61. Collect and preprocess the images to be tested of the centrifugal fan, adjust the size and perform normalization on the images to be tested of the centrifugal fan, and the data format of the images to be tested meets the input requirements of the trained defect recognition model;
[0059] S62. Input the preprocessed images to be tested of the centrifugal fan into the trained defect recognition model, and the defect recognition model performs inference according to the optimal parameters obtained from the training;
[0060] S63. Perform image feature extraction and analysis in the defect recognition model, and use the feature representations learned during the training process to identify potential defect areas in the images to be tested of the centrifugal fan;
[0061] S64. Classify the defect types in the images to be tested of the centrifugal fan through the output layer of the defect recognition model to determine the types of defects;
[0062] S65. Locate the identified defects spatially and output the specific position coordinates of each defect area, including the position of the bounding box or the coordinates of the center point of the defect;
[0063] S66. Generate a final detection report based on the defect types and position coordinates output by the defect recognition model, provide detailed information on the defect types and spatial positions, and be used for further quality analysis or the control of the automated production line.
[0064] Optionally, the types of the defects specifically include cracks, scratches, and fractures, which are used to classify the appearance defects of the centrifugal fan and provide a basis for product quality determination and rejection of non-conforming products.
[0065] The beneficial effects of the present invention are as follows:
[0066] By combining the deep vision algorithm with the swarm intelligence optimization technology, the present invention realizes the automatic detection and classification of the appearance defects of the centrifugal fan, significantly improving the accuracy and real-time performance of the detection system. In traditional detection methods, there are problems such as low efficiency, high misjudgment rate, and insufficient environmental adaptability in manual detection or automated detection based on simple image processing. The present invention uses the attention residual lightweight network model to extract deep features of tiny defects in the image, and then jointly optimizes the model structure parameters and training hyperparameters through the improved jackal optimization algorithm, so that the model achieves a good balance between global search and local refinement, avoiding the risk of falling into local optima.
[0067] This method makes full use of the advantages of data augmentation technology, network hierarchical structure design, and attention mechanism, enabling the model to accurately identify defects such as cracks, scratches, and fractures in the appearance image of the centrifugal fan and precisely locate the types and spatial positions of the defects. The optimized model not only has a low number of parameters, facilitating efficient deployment on edge computing platforms, but also exhibits strong robustness and adaptability under different working conditions, effectively coping with practical problems such as light changes and noise interference in the production environment. At the same time, by introducing the balance stage and the collaborative information fusion mechanism, the jackal optimization algorithm of the present invention realizes the organic combination of diversity and synergy in population update, thereby enhancing the global search ability and further improving the optimization effect and training speed of the model.
[0068] The beneficial effects achieved by the present invention are as follows. First, by establishing a deep vision model based on the attention residual lightweight network, it is possible to achieve high-precision detection of the defects of the centrifugal fan while maintaining low computational resource consumption, reducing the problems of false detection and missed detection caused by traditional detection methods. Second, using the improved jackal optimization algorithm to jointly optimize the model structure parameters and training hyperparameters, the model performs excellently in both global search and local fine-tuning, thus achieving a double improvement in recognition accuracy and response speed. Third, the data augmentation and multi-stage optimization strategy adopted by the present invention significantly improves the adaptability of the model to the appearance defects of the centrifugal fan in complex industrial environments, enabling the detection system to play a stable and continuous role in the actual production process.
[0069] Generally speaking, the present invention not only solves the problems of low accuracy in appearance defect detection, insufficient real-time performance, and poor model generalization ability in the prior art, but also realizes the rapid and automatic detection and positioning of centrifugal fan defects through reasonable network design and optimization algorithm improvement, providing an efficient and reliable technical solution for industrial automation detection. This technical solution has significant application value in reducing production costs, improving product quality, and ensuring industrial production safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0071] Figure 1 is a flowchart of a method for detecting the appearance quality of a centrifugal fan based on image recognition proposed by the present invention;
[0072] Figure 2 is a schematic diagram of the working process of the jackal optimization algorithm for a method for detecting the appearance quality of a centrifugal fan based on image recognition proposed by the present invention;
[0073] Figure 3 is a schematic diagram of the hierarchical structure of the attention residual lightweight network model for a method for detecting the appearance quality of a centrifugal fan based on image recognition proposed by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0074] Now, the present invention will be further described in detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only showing the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0075] Referring to Figure 1 、 Figure 2 and Figure 3 , a method for detecting the appearance quality of a centrifugal fan based on image recognition includes the following steps:
[0076] S1. Collect multi-angle images of the centrifugal fan in the actual production environment to form an image data set, and preprocess the image data set;
[0077] S2. Perform image enhancement operations on the preprocessed image data set to generate a data enhancement image set;
[0078] S3. Based on the generated data enhancement image set, construct an attention residual lightweight network model to extract and encode the key features of the centrifugal fan defects in the images;
[0079] S4. Introduce the Jackal Optimization Algorithm to jointly optimize the structural parameters and training hyperparameters of the Attention Residual Lightweight Network Model, and obtain the optimized network structure and parameters.
[0080] S5. Based on the optimized network structure and parameters, train the Attention Residual Lightweight Network Model to obtain a trained defect recognition model.
[0081] S6. Input the test image of the centrifugal fan into the trained defect recognition model, and output the type and spatial position coordinates of the appearance defects in the test image.
[0082] S7. According to the output defect type and spatial position coordinates, classify and evaluate the defects, and judge the severity of the defects based on the type, area, and location of the defects.
[0083] S8. Send the defect evaluation result to the production line linkage device. The production line linkage device includes an automatic rejection mechanism and a sorting control component, performs the automatic rejection operation of unqualified products, and stores the recognition and evaluation information at the same time.
[0084] In the present invention, by constructing an Attention Residual Lightweight Network Model and introducing the Jackal Optimization Algorithm, the problems in the prior art of low detection accuracy of the appearance defects of centrifugal fans, parameter selection relying on manual experience, and low model deployment efficiency are solved. Through multi-angle image acquisition and image enhancement processing, the recognition ability of the model for complex defect morphologies is effectively improved; by constructing a lightweight network structure and embedding an attention mechanism, the extraction effect of the model for key region features is enhanced; combined with the Jackal Optimization Algorithm to jointly optimize the structural parameters and training hyperparameters, the model training efficiency and recognition accuracy are significantly improved. This method can not only accurately identify and locate the defect type and spatial position of the centrifugal fan, but also complete the automatic rejection of unqualified products through defect evaluation and the production line linkage device, and has the advantages of fast detection speed, high recognition accuracy, strong system stability, and adaptability to complex industrial sites, and can be widely applied to efficient and intelligent industrial quality inspection scenarios.
[0085] In this embodiment, the multi-angle images specifically include the front, side, and inclined angle images of the centrifugal fan at different rotation angles and illumination conditions, which are used to comprehensively cover the appearance area of the centrifugal fan to improve the integrity and accuracy of defect recognition.
[0086] In this embodiment, the preprocessing of the image dataset specifically includes image gray-scale standardization, noise suppression, and size normalization, which are used to improve the image quality and unify the input format.
[0087] In this embodiment, the image enhancement operation on the image dataset specifically includes edge enhancement, contrast stretching, and pseudo-color transformation, which are used to highlight the features of potential defect areas in the image.
[0088] In this embodiment, step S3 specifically includes:
[0089] S31. Perform tensorization processing and size adaptation on the generated data - enhanced image set, and uniformly adjust the image data into a tensor format with a fixed size and a unified number of channels as the standard input of the attention residual lightweight network model;
[0090] S32. Construct a lightweight convolutional feature extraction module. The lightweight convolutional feature extraction module adopts a depth - separable convolution structure to perform local feature extraction with low computational complexity on the input image, forming a representation of texture, edge, and color gradient information at the basic level;
[0091] S33. Based on the output of the lightweight convolutional feature extraction module, build multiple residual connection units. The residual connection units include a main - path convolution and a bypass skip - connection structure for fusing feature information at different levels;
[0092] S34. Embed a channel attention mechanism in each residual connection unit, and adjust the response ratio between feature channels by adjusting the weights of the feature response degrees of different channels;
[0093] S35. Introduce a coordinate attention module after some residual output layers to model the spatial position information of the image in the horizontal and vertical directions and perform weighted processing on the spatial dimension of the feature map;
[0094] S36. Perform multi - scale integration on all residual output features fused with the attention mechanism and connect them to the output layer of the attention residual lightweight network model to obtain the final feature encoding result.
[0095] The present invention realizes the efficient extraction and expression of key features in the appearance defect images of centrifugal fans by constructing a residual lightweight network structure with multiple attention mechanisms. By using depth - separable convolution to construct a lightweight feature extraction module, the computational complexity of the model is effectively reduced, and the deployment efficiency of the network on edge devices is improved; by introducing residual connection units to fuse multi - layer feature information, the model's perception ability for complex defect structures is enhanced; by embedding a channel attention mechanism in the residual module, the network can automatically adjust the weight distribution between feature channels according to the feature response; further introducing a coordinate attention mechanism to perform directional modeling and weighted processing on the spatial information of the feature map, the model's sensitivity to the spatial distribution of defects is improved. Finally, high - dimensional feature encoding is output through multi - scale integration, enabling the model to have stronger defect expression ability and discrimination ability. The overall network structure not only maintains the lightweight design of the model but also significantly improves the feature learning ability for multiple types of defects in centrifugal fan images, providing an accurate and compact deep - layer feature representation for subsequent defect recognition and localization.
[0096] In this embodiment, S4 specifically includes:
[0097] S41. Define the adjustable parameter set Θ of the attention residual lightweight network model, where the adjustable parameter set includes structural parameters and training hyperparameters;
[0098] S42. Construct the objective function F(Θ) for optimizing the structural parameters and training hyperparameters, and the objective function comprehensively considers the recognition accuracy, the complexity of the attention residual lightweight network model, and the training convergence time:
[0099] F(Θ) = α·Acc(Θ) - β·CP(Θ) - γ·T(Θ);
[0100] Where Acc(Θ) represents the recognition accuracy, CP(Θ) represents the complexity of the attention residual lightweight network model, T(Θ) represents the training convergence time, and α, β, and γ are adjustable weight coefficients;
[0101] S43. Initialize all candidate parameter vectors Θ in the population (0) , and set the initial step size λ0, attack coefficient δ, fusion coefficient ω, maximum number of iterations K, and balance threshold D min ;
[0102] S44. In the exploration stage, simulate the search behavior of jackals after discovering prey, and calculate the exploration update vector of each individual based on the current population individual Θ (k) and the current optimal individual Calculate the exploration update vector of each individual
[0103]
[0104] Where λ k represents the dynamic step size coefficient of the k-th iteration;
[0105] S45. In the encirclement stage, simulate the behavior of jackals gradually approaching prey, and calculate the encirclement vector according to the exploration update vector and the current optimal solution
[0106]
[0107] Where μ is the encirclement intensity coefficient;
[0108] S46. In the balance stage, calculate the diversity index D of the current population. When D < D min , add random perturbations to the encirclement vector to obtain the balance update vector
[0109]
[0110] Where λb is the perturbation amplitude, and rand(-1, 1) represents a random number vector;
[0111] S47. In the collaborative information fusion stage, for each candidate individual construct a neighborhood set N(i), and determine the normalized weight based on the fitness of each individual in the neighborhood Weightedly fuse the balance update vector with the neighborhood information and update it to the collaborative parameter vector
[0112]
[0113] where ω represents the global information fusion coefficient, represents the parameter vector of the j-th individual in the neighborhood in the k-th iteration;
[0114] S48. In the attack stage, simulate the jackal's attack behavior and finely adjust and update the collaborative parameter vector to obtain the final adjustable parameter set of the i-th individual in the (k + 1)-th iteration
[0115]
[0116] where δ is the attack intensity coefficient;
[0117] S49. Calculate the objective function value for the adjustable parameter sets corresponding to all individuals in the current population in the (k + 1)-th iteration and select the individual with the largest objective function value among all candidate individuals, and set the adjustable parameter set as the new optimal parameter set
[0118] S410. When the number of iterations reaches the preset maximum value K, or the objective function value corresponding to the current optimal parameter set satisfies the convergence condition, terminate the iteration, and use as the final optimization result to configure the structural parameters and training hyperparameters of the attention residual lightweight network model.
[0119] The present invention jointly optimizes the structural parameters and training hyperparameters of the attention residual lightweight network model by introducing an improved jackal optimization algorithm, significantly enhancing the adaptability and recognition performance of the model. Compared with traditional swarm intelligence algorithms, the present invention innovatively introduces a balance stage and a collaborative information fusion mechanism on the basis of the original jackal optimization algorithm. In the balance stage, the population diversity is dynamically evaluated. When the diversity is insufficient, a perturbation mechanism is introduced to avoid premature convergence of the population and enhance the global search ability. In the collaborative information fusion stage, a neighborhood weight model is constructed according to the individual fitness to achieve information sharing and co-evolution among multi-objective parameters, further improving the population update efficiency and the quality of the optimal solution. The objective function design comprehensively considers the model accuracy, complexity, and training time to ensure a balance between performance and efficiency. Through this joint optimization strategy, a model configuration suitable for a specific task scenario can be automatically obtained, reducing the manual parameter tuning cost and improving the network's ability to extract defect features of centrifugal fans and deployment adaptability. The purpose of this improved algorithm is to enhance the globality and robustness of the optimization, enabling the model to have a lightweight structure and fast training ability while ensuring high-precision recognition, and being suitable for the high-frequency deployment requirements in actual industrial detection systems.
[0120] In this embodiment, step S5 specifically includes:
[0121] S51. Load the optimal parameter set obtained by the jackal optimization algorithm and initialize the attention residual lightweight network model, including the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module;
[0122] S52. Construct a training data set, combine the enhanced images with the corresponding defect labels, divide them into a training set and a validation set, and perform batch division and data normalization preprocessing;
[0123] S53. Input the training data set into the attention residual lightweight network model and perform iterative training according to the set learning rate and batch size;
[0124] S54. During the training process, compare the output result of the attention residual lightweight network model with the true label, evaluate the difference through the loss function, and perform backpropagation operations to update the weights of the attention residual lightweight network model according to the difference, and adopt an early stopping mechanism to control the number of training rounds;
[0125] S55. Use the validation set to evaluate the training results of each round, record the changes in accuracy, recall rate, and loss in real time, and judge the generalization ability and stability of the attention residual lightweight network model during the training process;
[0126] S56. After the training of the attention residual lightweight network model meets the set accuracy standard or reaches the maximum number of training epochs, save the weights and structural configuration of the finally trained attention residual lightweight network model to obtain a defect recognition model that can be used for the centrifugal fan defect recognition task.
[0127] In the present invention, through systematic optimization and design of the structure and training process of the attention residual lightweight network model, the recognition accuracy and training efficiency of the model in the centrifugal fan defect recognition task are significantly improved. By loading the optimal structural parameters and training hyperparameters obtained by the jackal optimization algorithm, it is ensured that the network has a good basic configuration at the initialization stage, reducing the training instability problem caused by improper parameter selection. The constructed training dataset pairs enhanced images with defect labels, and combines normalization and batch processing strategies, effectively improving the balance of data distribution and the learning efficiency of the model. During the training process, the loss function feedback mechanism is used to achieve error backpropagation and update the network weights in real time, and at the same time, an early stopping mechanism is introduced to avoid overfitting. By dynamically monitoring the accuracy, recall rate, and loss changes through the validation set, it is ensured that the model has good generalization ability and convergence stability during the training process. The finally saved defect recognition model not only has high detection accuracy, but also has the advantages of small number of parameters, fast training speed, and easy deployment, and can be efficiently and reliably applied to the automatic detection task of centrifugal fan defects in industrial production lines. This method gives full play to the advantages of the combination of intelligent optimization and deep learning, providing an end-to-end and high-performance training process for the defect recognition model.
[0128] In this embodiment, the initialization of the attention residual lightweight network model specifically includes the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module, which are used to construct the basic framework and key parameter settings of the attention residual lightweight network model.
[0129] In this embodiment, the specific content of S6 includes:
[0130] S61. Collect and preprocess the test images of the centrifugal fan, adjust the size and normalize the test images of the centrifugal fan, and the data format of the test images meets the input requirements of the trained defect recognition model.
[0131] S62. Input the preprocessed test images of the centrifugal fan into the trained defect recognition model, and the defect recognition model performs inference according to the optimal parameters obtained by training.
[0132] S63. Perform image feature extraction and analysis in the defect recognition model, and use the feature representation learned during the training process to identify potential defect areas in the test images of the centrifugal fan.
[0133] S64. Classify the types of defects in the image to be measured of the centrifugal fan through the output layer of the defect recognition model to determine the types of defects;
[0134] S65. Perform spatial positioning on the identified defects and output the specific position coordinates of each defect area, including the position of the bounding box or the center point coordinates of the defect;
[0135] S66. Generate a final detection report based on the defect type and position coordinates output by the defect recognition model, providing detailed information on the defect type and spatial position for further quality analysis or control of the automated production line.
[0136] Through the construction of a complete defect recognition and inference process, the present invention realizes the efficient, accurate detection and visual analysis of appearance defects in the image to be measured of the centrifugal fan. By preprocessing the image to be measured, including size adjustment and normalization operations, the image format strictly corresponds to the input requirements of the trained defect recognition model, ensuring that the model can perform inference stably and accurately. During the model inference process, relying on the optimal parameters obtained in the previous training stage, the model can quickly extract multi-level features in the image, identify potential defect areas, and effectively classify the types of defects, covering typical defect types such as cracks, scratches, and fractures. At the same time, through the spatial positioning function output by the model, the specific position of each defect in the image can be accurately calibrated, including the bounding box or the center point coordinates, so as to realize the qualitative and quantitative analysis of the defects. Finally, the system can automatically generate a detection report including the defect type and spatial coordinates, which is convenient for the operator to consult and can also be used as the control basis for subsequent automatic rejection or quality grading. The method described in the present invention significantly improves the intelligent and information level of defect detection, realizes the full-process automation from image acquisition to result output, and has the remarkable advantages of high precision, fast response, and strong applicability, meeting the actual needs of the industrial production line for rapid feedback and closed-loop control of defect detection.
[0137] In this embodiment, the types of defects specifically include cracks, scratches, and fractures, which are used to classify the appearance defects of the centrifugal fan and provide a basis for product quality determination and rejection of non-conforming products.
[0138] Example 1:
[0139] To verify the feasibility of the present invention in implementation, the present invention is applied to a large centrifugal fan manufacturing factory with an annual output of hundreds of thousands of centrifugal fans, and the products are mainly used in occasions such as high-pressure ventilation and industrial dust removal. The traditional detection method mainly relies on manual visual inspection or simple image processing technology, often resulting in missed detection of fine scratches, misjudgment of cracks and fractures, and unqualified products flowing into the market, causing serious economic losses and quality risks to the enterprise. To address this problem, in this embodiment, we adopt the detection method of the present invention and establish an automated detection system on the production line. The system mainly consists of an industrial camera acquisition device, a preprocessing module, a defect recognition module based on an attention residual lightweight network model, a jackal optimization algorithm tuning module, and a data feedback and alarm module. The detection system is installed on the assembly line, and the station position is set in the quality inspection link after the final assembly of the product. The system can collect the appearance images of centrifugal fans in real time, preprocess the images, extract features, identify and locate defects, and finally link the detection results with the industrial control system to automatically reject unqualified products.
[0140] In practical applications, first, high-resolution industrial cameras are used to collect centrifugal fan images at different angles and under different lighting conditions. Through the preprocessing module, gray-scale normalization, denoising, and size unification are performed to form standardized image data. Then, the system uses data augmentation techniques to generate a large number of training images and combines them with manually labeled defect information (including cracks, scratches, fractures, etc.) to construct a complete training dataset. Subsequently, this dataset is input into the attention residual lightweight network model. After joint search and parameter fine-tuning by the jackal optimization algorithm, the best network structure and training parameters are obtained. During the training process, gradient optimization algorithms (such as Adam) are used, and an early stopping strategy is used to monitor the performance of the model on the validation set to ensure the efficiency and stability of the training process. After training is completed, the model is saved and deployed in on-site detection devices to achieve real-time identification of centrifugal fan appearance defects.
[0141] In actual detection applications, the system can accurately identify defects in the input centrifugal fan images. According to the on-site operation statistics of the system for a continuous week, the detection efficiency and accuracy are significantly better than traditional methods. According to statistics, the detection system can process approximately 300 centrifugal fan images per day, and the average detection time is shortened to 0.5 seconds per unit, while traditional manual detection requires approximately 10 seconds per unit. At the same time, the detection accuracy of the system reaches 98.7%, and the missed detection rate and misdetection rate are as low as 1.2% and 0.8% respectively, greatly reducing the risk of unqualified products flowing in. In addition, the system maintains high robustness and stability in the face of different lighting, noise, and product styles, effectively coping with the interference of complex industrial environments.
[0142] Table 1 Performance data table of the centrifugal fan appearance detection system
[0143]
[0144] According to the data in Table 1, through the comprehensive comparison of key indicators such as average detection time, detection accuracy, missed detection rate, false detection rate, and daily processing volume, the superiority and technical advantages of the present invention in practical applications can be clearly reflected. First of all, in terms of average detection time, the traditional manual detection takes 10 seconds for each device on average. Although the existing automated system has a certain improvement with an average detection time of 2.5 seconds, the method of the present invention significantly shortens the detection time to 0.5 seconds. This result shows that the lightweight attention residual network model constructed by the present invention, combined with an efficient image preprocessing and inference mechanism, can complete the feature extraction, defect recognition, and positioning operations of images in an extremely short time, meeting the actual requirements of "millisecond-level" detection response on industrial production lines. In terms of detection accuracy, the method of the present invention reaches 98.7%, which is significantly higher than 85.0% of traditional manual detection and 92.0% of the existing automated system. This shows that by jointly optimizing the network structure and training hyperparameters through the jackal optimization algorithm, the generalization ability and stability of the model in multi-type defect recognition tasks are significantly enhanced. Especially when identifying low-contrast defects such as microcracks and fuzzy scratches, the significant feature enhancement effect brought by the attention mechanism enables the model to more effectively distinguish defects from the background.
[0145] In terms of the missed detection rate, the method of the present invention is only 1.2%, which is much lower than 8.0% of manual detection and 5.0% of the automated system. This indicates that the system has strong anomaly detection capabilities, can identify most conventional and subtle defect types, and greatly reduces the risk of misjudging unqualified products as qualified products. In terms of the false detection rate, it also performs excellently, only 0.8%, which has obvious advantages compared with manual detection (7.0%) and other systems (3.0%), reflecting that the model has a high recognition accuracy for normal regions, with very few misjudgments, and improves the overall detection stability.
[0146] In terms of production efficiency, the method of the present invention can stably detect 300 centrifugal fan products per day, which is 3 times the efficiency of manual detection (100 units) and also an improvement over the existing automated system (250 units). This high processing volume effectively alleviates the bottleneck of the detection station without increasing the manpower, and at the same time saves a large amount of human resources for the enterprise, and is suitable for high-tempo and high-output production environments.
[0147] In summary, through the comparison of the above multi-dimensional data indicators, it can be seen that the detection method proposed by the present invention far exceeds the existing technical solutions in terms of accuracy, speed, stability, and robustness, and is particularly suitable for the requirements of high-precision and low-latency product defect detection in industrial scenarios. The high accuracy and high-throughput capabilities of the system not only improve the product quality control level but also provide reliable technical support for "terminal detection automation" in intelligent manufacturing.
[0148] As described above, it is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered within the protection scope of the present invention.
Claims
1. A method for detecting the appearance quality of a centrifugal fan based on image recognition, characterized in that, It includes the following steps: S1. Collect multi-angle images of the centrifugal fan in the actual production environment to form an image dataset, and preprocess the image dataset; S2. Perform image enhancement operations on the preprocessed image dataset to generate a data enhancement image set; S3. Based on the generated data enhancement image set, construct an attention residual lightweight network model to extract and encode the key features of the centrifugal fan defects in the images; S4. Introduce the jackal optimization algorithm to jointly optimize the structural parameters and training hyperparameters of the attention residual lightweight network model to obtain the optimized network structure and parameters; S5. Based on the optimized network structure and parameters, train the attention residual lightweight network model to obtain a trained defect recognition model; S6. Input the test image of the centrifugal fan into the trained defect recognition model, and output the type and spatial position coordinates of the appearance defects in the test image; S7. Classify and evaluate the defects according to the output defect type and spatial position coordinates, and judge the severity of the defects based on the type, area and location of the defects. S8. Send the defect evaluation result to the production line linkage device. The production line linkage device includes an automatic rejection mechanism and a sorting control component, performs the automatic rejection operation of unqualified products, and stores the recognition and evaluation information at the same time.
2. The method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, wherein, The multi-angle images specifically include the front, side and inclined angle images of the centrifugal fan at different rotation angles and lighting conditions, which are used to comprehensively cover the appearance area of the centrifugal fan to improve the integrity and accuracy of defect recognition.
3. The appearance quality detection method of a centrifugal fan based on image recognition according to claim 1, characterized in that, The preprocessing of the image dataset specifically includes image gray-scale standardization, noise suppression and size normalization, which are used to improve the image quality and unify the input format.
4. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, characterized in that, The image enhancement operation on the image dataset specifically includes edge enhancement, contrast stretching and pseudo-color transformation, which are used to highlight the features of potential defect areas in the images.
5. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, characterized in that, The specific content of S3 includes: S31. Perform tensor processing and size adaptation on the generated data enhancement image set, and uniformly adjust the image data to a tensor format with a fixed size and a unified number of channels as the standard input of the attention residual lightweight network model; S32. Construct a lightweight convolutional feature extraction module. The lightweight convolutional feature extraction module adopts a depthwise separable convolutional structure to perform local feature extraction with low computational complexity on the input image to form a basic-level representation of texture, edge and color gradient information; S33. On the basis of the output of the lightweight convolutional feature extraction module, build multiple residual connection units. The residual connection units include a main path convolution and a bypass skip connection structure, which are used to fuse feature information at different levels; S34. Embed a channel attention mechanism in each residual connection unit to adjust the response ratio between feature channels by adjusting the weight of the feature response degree of different channels; S35. Introduce a coordinate attention module after some residual output layers to model the spatial position information of the image in the horizontal and vertical directions, and perform weighted processing on the spatial dimension of the feature map. S36. Multiscale integrate all the residual output features with the fusion attention mechanism and connect them to the output layer of the attention residual lightweight network model to obtain the final feature encoding result.
6. The method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, wherein, The specific steps of S4 are as follows: S41. Define the set of adjustable parameters Θ of the attention residual lightweight network model, where the set of adjustable parameters includes structural parameters and training hyperparameters; S42. Construct an objective function F(Θ) for optimizing the structural parameters and training hyperparameters. The objective function comprehensively considers the recognition accuracy, the complexity of the attention residual lightweight network model, and the training convergence time: F(Θ) = α·Acc(Θ) - β·CP(Θ) - γ·T(Θ); where Acc(Θ) represents the recognition accuracy, CP(Θ) represents the complexity of the attention residual lightweight network model, T(Θ) represents the training convergence time, and α, β, and γ are adjustable weight coefficients; S43. Initialize all candidate parameter vectors Θ in the population (0) , and set the initial step size λ0, attack coefficient δ, fusion coefficient ω, maximum number of iterations K, and balance threshold D min ; S44. In the exploration stage, simulate the search behavior of a jackal after it discovers prey, and calculate the exploration update vector of each individual based on the current population individuals Θ (k) and the current optimal individual Among them, λ k represents the dynamic step size coefficient of the k-th iteration; S45. In the encirclement stage, simulate the behavior of jackals gradually approaching their prey, and calculate the encirclement vector based on the exploration update vector and the current optimal solution. where μ is the enclosure intensity coefficient; S46. During the equilibrium stage, calculate the diversity index D of the current population. When D < D min . Add a random perturbation to the surrounding vector to obtain the equilibrium update vector where λ b is the perturbation amplitude, and rand(-1, 1) represents a random number vector; S47. In the collaborative information fusion stage, for each candidate individual construct a neighborhood set N(i), and determine the normalized weight based on the fitness of each individual in the neighborhood The balanced update vector is weighted and fused with the neighborhood information to update it as the collaborative parameter vector where ω represents the global information fusion coefficient, represents the parameter vector of the j-th individual in the neighborhood in the k-th iteration; S48. In the attack phase, simulate the attacking behavior of a jackal, and finely tune and update the collaborative parameter vector to obtain the final adjustable parameter set of the $i$-th individual in the $(k + 1)$-th iteration where δ is the attack intensity coefficient; S49. For the set of adjustable parameters corresponding to all individuals in the current population in the (k + 1)-th iteration Calculate the objective function value And select the individual with the largest objective function value among all candidate individuals, and set the set of adjustable parameters as the new optimal parameter set S410. When the number of iterations reaches the preset maximum value K, or the objective function value corresponding to the current optimal parameter set satisfies the convergence condition, terminate the iteration and use as the final optimization result to configure the structural parameters and training hyperparameters of the attention residual lightweight network model.
7. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, characterized in that, The specific steps of S5 are as follows: S51. Load the optimal parameter set obtained by the jackal optimization algorithm and initialize the attention residual lightweight network model, including the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module; S52. Construct a training data set, combine the enhanced images with the corresponding defect labels, divide them into a training set and a validation set, and perform batch division and data normalization preprocessing; S53. Input the training data set into the attention residual lightweight network model and perform iterative training according to the set learning rate and batch size; S54. During the training process, compare the output result of the attention residual lightweight network model with the true label, evaluate the difference through the loss function, and perform backpropagation operations to update the weights of the attention residual lightweight network model according to the difference. Use the early stopping mechanism to control the number of training epochs; S55. Use the validation set to evaluate the training results of each epoch, record the changes in accuracy, recall, and loss in real time, and judge the generalization ability and stability of the attention residual lightweight network model during the training process; S56. When the training of the attention residual lightweight network model meets the set accuracy standard or reaches the maximum number of training epochs, save the weights and structural configuration of the finally trained attention residual lightweight network model to obtain a defect recognition model that can be used for the centrifugal fan defect recognition task.
8. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 7, characterized in that, The initialization of the attention residual lightweight network model specifically includes the hierarchical structure of the attention residual lightweight network model, the number of convolutional channels, and the position of the attention module, which are used to construct the basic framework and key parameter settings of the attention residual lightweight network model.
9. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 1, characterized in that, The specific steps of S6 are as follows: S61. Collect and preprocess the images to be tested of the centrifugal fan, adjust the size and normalize the images to be tested of the centrifugal fan, and the data format of the images to be tested meets the input requirements of the trained defect recognition model; S62. Input the preprocessed images to be tested of the centrifugal fan into the trained defect recognition model, and the defect recognition model performs inference according to the optimal parameters obtained by training. S63. Perform image feature extraction and analysis in the defect recognition model, and use the feature representation learned during the training process to identify potential defect areas in the test image of the centrifugal fan; S64. Classify the types of defects in the test image of the centrifugal fan through the output layer of the defect recognition model to determine the types of defects; S65. Perform spatial positioning on the identified defects and output the specific position coordinates of each defect area, including the position of the defect bounding box or the center point coordinates; S66. Generate a final inspection report based on the defect types and position coordinates output by the defect recognition model, providing detailed information on the defect types and spatial positions for further quality analysis or control of the automated production line.
10. A method for detecting the appearance quality of a centrifugal fan based on image recognition according to claim 9, characterized in that, The types of the defects specifically include cracks, scratches, and fractures, which are used to classify the appearance defects of the centrifugal fan and provide a basis for product quality determination and rejection of non-conforming products.