Nozzle part detection system based on machine vision and deep learning
By using a nozzle component inspection system based on machine vision and deep learning, the system automatically identifies the location and type of defects in nozzle components, solving the problem of low efficiency in traditional manual inspection and improving the quality and production efficiency of nozzle components.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGCHUN UNIV OF SCI & TECH
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional manual methods for inspecting nozzle parts for defects lack systematicity and precision, resulting in long inspection cycles, low efficiency, and difficulty in quickly selecting suitable personnel, thus affecting the quality of nozzle parts and production efficiency.
An inspection system based on machine vision and deep learning is adopted, including an image acquisition module, a deep learning defect recognition module, and a defect extraction module. The system automatically identifies the location and type of defects in nozzle parts through image processing and deep learning algorithms.
It improved the pass rate of nozzle parts, reduced the labor intensity of workers, reduced the labor costs of enterprises, improved production efficiency and the quality of nozzle parts, and extended the service life of engines.
Smart Images

Figure QLYQS_1 
Figure QLYQS_6 
Figure QLYQS_7
Abstract
Description
Technical Field
[0001] This invention belongs to the field of product quality inspection technology, specifically relating to a nozzle-type parts inspection system based on machine vision and deep learning. Background Technology
[0002] With the rapid development of high-precision manufacturing, nozzle micro-parts have become core foundational elements of high-end industrial equipment. Their design and manufacturing quality directly determine the overall performance, operational accuracy, and long-term reliability of the equipment. As a highly complex and precise power unit, the comprehensive performance and reliability of aero-engines largely depend on the design and manufacturing level of a large number of heterogeneously distributed micro-parts. Traditional nozzle part inspection relies heavily on the manual experience of inspectors. Distinguishing nozzle parts based solely on the inspector's visual perception and subjective judgment of defects lacks systematicity and precision, easily leading to mismatches between maintenance personnel skills and defect types. Traditional personnel inspection methods lack targeted matching logic, making it difficult to quickly and accurately select suitable personnel from a large pool, thus prolonging the defect handling cycle and severely impacting production efficiency and nozzle part quality. Therefore, this paper proposes a nozzle part inspection system based on machine vision and deep learning to address these issues. Summary of the Invention
[0003] The purpose of this invention is to overcome the problem of scratch defects at the orifice of nozzle-type parts and to provide a nozzle-type parts inspection system based on machine vision and deep learning. The system can automatically detect the location of defects through an algorithm that combines machine vision and deep learning. It is highly operable and can significantly improve the pass rate of nozzle parts.
[0004] The objective of this invention is achieved through the following technical solution:
[0005] This invention discloses a nozzle-type part inspection system based on machine vision and deep learning, comprising an image acquisition module, a deep learning defect recognition module, a defect extraction module, and a detection model.
[0006] The image acquisition module is the basic input, responsible for acquiring high-quality image data of the nozzle part to be inspected, providing raw materials for the subsequent deep learning defect recognition module. The defect extraction module preprocesses the acquired images, separating the target area that may have defects from the complex background, reducing the interference of redundant information on recognition. The deep learning defect recognition module relies on the detection model, inputting the target area features output by the defect extraction module into the model for analysis, matching, and classification, and finally determining whether there is a defect in the area and the type and level of the defect. The four modules are interconnected. The image acquisition module determines the upper limit of data quality, the defect extraction module is the bridge connecting the original image and intelligent recognition, the detection model is the core carrier of the defect recognition module, and the deep learning defect recognition module is the key execution unit for accurate defect judgment, together forming a complete defect detection process.
[0007] The image acquisition module consists of an industrial camera, dual telecentric lenses, an internal coaxial light source, an adjustable spherical integrating light source, and an image acquisition card; the image acquisition module can acquire images of nozzle parts, and the acquired images are defined as image a.
[0008] The deep learning defect recognition module is used to realize end-to-end processing and analysis from image to defect image; it includes two parts: lightweight channel model and improved change boundary perception. The deep learning defect recognition module can process image a acquired by the image acquisition module, identify scratches and defects in image a, prepare for the subsequent deep learning defect extraction module, and define the image processed by the deep learning defect recognition module as image b.
[0009] Lightweighting of the channel model uses parameter pruning and quantization to reduce redundant parameters that are not sensitive to performance, and lightweighting of the deep learning model is performed in convolutional and fully connected layers.
[0010] Improved Change Boundary Awareness (CBM) is achieved by using boundary information to identify changing regions, thereby enhancing the network model's ability to preserve boundary information of these regions. The CBM module utilizes a Simple Attention Module (SimAM) to capture changes in boundary regions within an image, subsequently extracting edge features through pooling, subtraction, and convolution. The CBM module can handle images with complex boundaries and changing regions. The SimAM module, a uniformly weighted attention module, can evaluate the importance of each neuron, thus better focusing the neural network's attention.
[0011] The defect extraction module can enhance the extraction of surface defects on nozzle-type parts. The defect extraction module includes image grayscale transformation, image filtering, image enhancement and skeleton extraction. The defect extraction module identifies image b and extracts the defects in image b, thus improving the identification of nozzle defects.
[0012] Image grayscale transformation: Using average grayscale to extract defect images can preserve as much information as possible while avoiding excessive computational overhead. Grayscale value calculation formula:
[0013] (1)
[0014] In the formula: Representing the row and column coordinates of pixels in an image, the RGB model represents colors through linear combinations of the three primary colors: red, green, and blue. Each color channel has a brightness value ranging from 0 to 255, corresponding to the color intensity of the pixel. Image grayscale conversion essentially reduces the three-dimensional RGB color space to a one-dimensional grayscale space through mapping, using a specific function. Generate the grayscale value corresponding to this pixel. . Let b represent the grayscale value of image b. The formula for calculating the grayscale value is shown in formula (2):
[0015] (2)
[0016] Image filtering can remove noise, smooth texture and retain the structural information of the target, providing a clearer and more stable image input for subsequent feature extraction and defect judgment. Bilateral filtering is used to extract defect images. Bilateral filtering is a compromise processing that combines the spatial information approximation and the value domain information approximation of the image. It considers both spatial information and gray value domain information to achieve the purpose of edge preservation and noise reduction. It has the characteristics of being simple, non-iterative and local. The bilateral filtering calculation formula is shown in formula (3):
[0017] (3)
[0018] In the formula These are the filtered pixel values. It is a normalized weight. It is a spatial domain kernel function that calculates the similarity of spatial domain information. It is a pixel value domain kernel function that calculates the similarity of value domain information. Bilateral filtering considers both the spatial factors and pixel value differences of the points to be processed, and can effectively preserve the edges and details of the image while smoothing noise. However, bilateral filtering has a relatively large computational cost, and the filtering effect depends on the parameter settings.
[0019] Image enhancement technology replaces the original pixel values with mapped pixel values and then performs histogram equalization. The equalized pixel values are obtained by mapping each pixel value in the original image to a new pixel value according to a certain function relationship, so that the equalized histogram is approximately a uniformly distributed histogram. The mapping function formula is shown in formula (4):
[0020] (4)
[0021] Where H(i) represents the mapped pixel value, CDF(i) represents the cumulative distribution function value of the i-th gray level, CDF(min) represents the cumulative distribution function value corresponding to the minimum gray level of the image, MxN represents the total number of pixels in the image, M is the number of rows in the image, N is the number of columns in the image, and L represents the total number of gray levels in the image. After replacing the original pixel values with the mapped pixel values, histogram equalization is completed.
[0022] The skeleton extraction module performs quantitative analysis of the geometric features of defects extracted from the skeleton to assess their impact on nozzle components. By performing topological reduction on the segmented target region, the defect shape is simplified into an equivalent structural ridge.
[0023] Before starting skeleton extraction, initialization is required. First, the image is binarized, with the target region marked as 1 and the background as 0. Second, morphological and other image processing is performed to ensure the target region is connected and the background region is continuous. Finally, distance transform and local maxima extraction are introduced.
[0024] The distance transformation assigns a value of 1 to each target pixel in the image and calculates the distance between it and the nearest background pixel, which is assigned a value of 0. The Euclidean distance formula between pixels is shown in formula (5):
[0025] (5)
[0026] In the formula This represents the distance from the corresponding pixel (x, y) to the nearest background pixel. This refers to the location of the background pixels. By using a distance transform, the shortest distance from each target pixel to the background pixel is calculated, so that the value of each target pixel in the image can be replaced with a distance value to the background.
[0027] Local maximum extraction (LME) is an effective method for identifying important feature points, edges, inflection points, and corners in an image. When processing curved areas, LME can highlight the curved regions, helping to preserve these important features and preventing the loss of relevant information in subsequent processing. During processing, a sliding window is used to progressively scan the target pixels of the image, searching for local maxima within each window. Commonly used window sizes are 3x3 and 5x5; the specific window size is chosen based on the application requirements.
[0028] The detection model employs an online incremental learning mechanism and consists of two parts: data preparation and data output. It dynamically updates the graph topology defect classification based on new detection samples and identifies and extracts different defect features.
[0029] Beneficial effects
[0030] This invention addresses nozzle component defect detection by employing an algorithm combining machine vision and deep learning. This algorithm effectively identifies the location of defects, offering high operability and significantly improving the pass rate of orifice defects. It solves the problem of missed defects during manual visual inspection. This reduces worker workload, decreases the number of inspectors, lowers labor costs, and increases production efficiency. It also improves the yield rate of nozzle components, bringing greater economic benefits to enterprises. Furthermore, by detecting orifice defects, the quality of nozzle components can be improved, effectively extending engine lifespan. The invention automatically detects surface defects on nozzle component orifices, marks the defect locations, and identifies the corresponding mark categories. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the specific embodiments described herein are merely illustrative and not intended to limit the invention. For a better understanding of the above technical solutions, the technical solutions of this invention will be described in detail below with reference to embodiments.
[0032] Example
[0033] This embodiment provides a nozzle-type part inspection system based on machine vision and deep learning, including an image acquisition module, a deep learning defect recognition module, a defect extraction module, and a detection model.
[0034] The image acquisition module consists of an industrial camera, dual telecentric lenses, an internal coaxial light source, an adjustable spherical integrating light source, and an image acquisition card. The industrial camera has a resolution of 25 megapixels and a square chip size, suitable for image acquisition of circular or round-hole objects. Using this industrial camera, it can capture fine details such as textures and defects on the surface of nozzle parts, providing high-precision image material for subsequent defect detection. The dual telecentric lenses have an optical magnification of 4X and a target area of 18.4, paired with a point light source with an illuminance of 2 million lux. Simultaneously, the spherical integrating light source achieves a 360-degree detection field of view. Based on the reflectivity of the nozzle part surface, the multi-band illumination combination is dynamically adjusted. The image acquisition card has the ability to process at least 8 camera signals in parallel.
[0035] Furthermore, the image acquisition module aims to acquire comprehensive and high-precision image information of the nozzle component surface, providing a rich and accurate data foundation for subsequent nozzle component quality inspection; its core functions include:
[0036] 360-degree image acquisition: Using an industrial camera, the surface of the nozzle parts can be captured from 360 degrees without any blind spots, ensuring that the surface condition of each part of the nozzle parts can be clearly recorded.
[0037] To adapt to the different types of scratch defects on nozzle parts, a dual telecentric lens, an internal coaxial light source, and a spherical integrating light source system are used. The exposure time and intensity of the light source are adjusted according to different defect types to effectively ensure that different defects on the nozzle parts can be clearly captured, ensuring the clarity and contrast of the image. In this embodiment, the illumination intensity of the spherical integrating light source is adjusted to 217 to better detect scratch defects.
[0038] Data acquisition and transmission: The image acquisition card supports parallel processing of at least 8 camera signals, quickly acquires image data captured by the camera, and efficiently transmits it to the subsequent processing module to meet real-time detection requirements;
[0039] The light source control system includes dual telecentric lenses, a spherical integrating light source, and a point light source. The light source controller controls the light source to emit initial illumination onto the surface of the nozzle component. The light source controller adjusts the illumination intensity and combination of the multi-band light source components to obtain the most suitable illumination conditions for the surface of the nozzle component.
[0040] The image acquisition card acts as a bridge connecting the camera array and the subsequent processing system. It is responsible for receiving signals from at least eight cameras. It possesses powerful parallel processing capabilities, enabling it to process data from multiple cameras simultaneously. It converts analog image signals acquired by the cameras into digital signals and performs preliminary data formatting and preprocessing so that subsequent modules can quickly read and process the image data. Specific processing steps include:
[0041] 1) Camera Initialization: When the system starts up, the high-resolution industrial camera array performs self-test and parameter initialization, including adjusting parameters such as camera focal length, aperture, and exposure time to ensure that the camera is in the best shooting condition.
[0042] 2) Light source adjustment: The light source controller controls the brightness of the spherical integrating light source and the inner coaxial light source to obtain the most suitable lighting conditions on the nozzle surface;
[0043] 3) Image acquisition: After the light source is adjusted, an industrial camera is used to take a picture of the nozzle orifice. The industrial camera then transmits the captured image signal to the image acquisition card.
[0044] 4) Data transmission and processing: The image acquisition card receives signals from the industrial camera, converts analog signals into digital signals, and performs preliminary preprocessing operations such as image denoising and contrast enhancement; the processed image data is transmitted to the deep learning defect detection module for subsequent analysis according to a specific data format and transmission protocol.
[0045] The deep learning defect recognition module is used to realize end-to-end processing and analysis from image to defect image. The defect extraction module can enhance and extract surface defects of nozzle-type parts. The defect extraction module includes image grayscale transformation, image filtering, image enhancement and skeleton extraction.
[0046] Lightweighting of the channel model uses parameter pruning and quantization to reduce redundant parameters that are not sensitive to performance, and lightweighting of the deep learning model is performed in convolutional and fully connected layers.
[0047] Improved Change Boundary Awareness (CBM) module identifies changing regions by using boundary information, thereby enhancing the network model's ability to preserve boundary information of changing regions. The CBM module utilizes the Simple Attention (SimAM) module to capture change information in boundary regions of images, and then extracts edge features through pooling, subtraction, and convolution. The CBM module can handle images with complex boundaries and changing regions. The SimAM module is a uniformly weighted attention module that can evaluate the importance of each neuron, thus better focusing the attention of the neural network.
[0048] The lightweight model uses parameter pruning and quantization to reduce redundant parameters that are not sensitive to performance, and fine-tunes the pruned network to make the model more compact; model training is to find the optimal precision and recall of the pre-trained model through multiple rounds of training; the regularized channel importance evaluation is shown in formula (6):
[0049] (6)
[0050] In the formula, L represents the loss function. This represents the model's prediction loss on input x and label y, where W is the model's trainable weight parameters. The regularization coefficient is . This represents the set of learnable parameters of the model. This represents the regularization function, used to constrain parameter complexity to avoid overfitting. Its goal is to ensure the model fits the task requirements on the training data. In the second term... middle, The scaling factor associated with each channel controls the importance of that channel. It is a sparsity penalty function for the scaling factor, namely L1 regularization, where γ represents the regularization coefficient, balancing the task loss with the strength of the sparsity constraint. By forcing some scaling factors to approach zero through L1 regularization, redundant channels are identified.
[0051] A learnable scaling factor γ is associated with each channel (the output channel of the convolutional layer and the neuron of the fully connected layer) and multiplied by the channel output. Then, by performing channel sparse regularization training on the model with L1 regularization, the scaling factor gamma can be determined. The loss function in channel sparse regularization training is shown in equation (7):
[0052] (7)
[0053] In the formula, This represents the total loss function after adding L1 regularization. This represents the task loss term, which measures the error between the model's predictions and the true labels. Represents the loss function. Represents a symbolic function.
[0054] Dataset creation involves using industrial cameras to capture defect images, performing data augmentation on the captured images, increasing the size of the dataset, and enhancing the sample size of the defect recognition module.
[0055] Data augmentation enhances model performance by performing a series of transformations on the original image to generate diverse new samples, thereby expanding the training dataset. Augmentation can be achieved through flipping, scaling, brightness changes, and rotation. Flipping generates new training samples by mirroring the image horizontally or vertically. Scaling changes modify the scale of the target object while maintaining the original image size, generating training samples at different scales, increasing data diversity, and improving the model's ability to detect targets at multiple scales. Brightness changes improve the model's robustness to changes in lighting and enhance its generalization ability in different environments. Rotation improves the model's robustness to changes in target angle and enhances its generalization ability from different perspectives, as the placement angle of parts can vary depending on production or shooting conditions.
[0056] Lightweighting involves reducing the model's weight through parameter pruning and quantization. Parameter pruning and quantization reduce redundant parameters that are insensitive to performance, ensuring stability across various settings and achieving good performance. This supports both de novo training and pre-trained models. Defect detection network initialization: By converting 32-bit floating-point weights to 8-bit integer representations, combined with the feature representation capabilities obtained through pre-training, model performance can be maintained while reducing storage and computational resource consumption. After initialization, the model performs detection tasks at high speed, aiming to achieve a high recall rate while maintaining high precision. The formulas for precision and recall are:
[0057] (8)
[0058] (9)
[0059] Where P is precision, R is recall, TP represents the number of defects correctly detected, FP represents the number of samples that are actually without defects but are misclassified as having that type of defect, and FN refers to the number of defects that actually exist but have not been detected.
[0060] Channel importance assessment: Importance assessment is a key step in the pruning process. Its essence is to quantify the contribution of parameters to model performance through mathematical methods. The L1 regularization constraint formula is shown in formula (10):
[0061] (10)
[0062] In the formula, L represents the loss function. This represents the model's prediction loss on input x and label y (such as cross-entropy loss, mean squared error, etc.). W is the model's trainable weight parameters. The regularization coefficient is . This represents the set of learnable parameters of the model. This represents the regularization function, used to constrain parameter complexity to avoid overfitting. Its goal is to ensure the model fits the task requirements on the training data. In the second term... middle, The scaling factor associated with each channel controls the importance of that channel. It is a sparsity penalty function for the scaling factor, namely L1 regularization, where γ represents the regularization coefficient, balancing the task loss with the strength of the sparsity constraint. By forcing some scaling factors to approach zero through L1 regularization, redundant channels are identified.
[0063] The boundary change perception module acquires the changed region through boundary information, which helps the network model retain the boundary information of the changed region.
[0064] The SimAM module is a uniformly weighted attention module that can evaluate the importance of each neuron, thereby better focusing the attention of the neural network.
[0065] Edge features are extracted using pooling, subtraction, and convolution. Average pooling helps smooth features, while subtraction involves subtracting the average pooled features from the original features, highlighting edge regions.
[0066] Features are enhanced using 1×1 convolutions and a sigmoid activation function to improve the contrast and salience of edge features;
[0067] The SimAM attention mechanism is used to perceive salient regions and obtain the final features.
[0068] Change boundary perception enhances the features of the boundary region through element-wise difference calculation and multiplication operations, thereby effectively improving the accuracy of boundary detection;
[0069] The defect extraction module can enhance the extraction of surface defects on nozzle-type parts. The defect extraction module includes image grayscale transformation, image filtering, image enhancement and skeleton extraction.
[0070] Image grayscale transformation: Using average grayscale to extract defect images can preserve as much information as possible in the image while avoiding excessive computational overhead. The grayscale calculation formula is shown in formula (11) below:
[0071] (11)
[0072] In the formula: Representing the row and column coordinates of pixels in an image, the RGB model represents colors through linear combinations of the three primary colors: red, green, and blue. Each color channel has a brightness value ranging from 0 to 255, corresponding to the color intensity of the pixel. Image grayscale conversion essentially involves mapping the three-dimensional RGB color space down to a one-dimensional grayscale space.
[0073] Image filtering: Image filtering removes noise, smooths textures, and preserves the structural information of the target, providing clearer and more stable image input for subsequent feature extraction and defect determination. Bilateral filtering is used to extract defects from images. Bilateral filtering is a compromise that combines spatial and value domain information approximation of an image, considering both spatial and grayscale value domain information to achieve edge-preserving noise reduction. It is simple, non-iterative, and local. The bilateral filtering calculation formula is as follows:
[0074] (12)
[0075] In the formula These are the filtered pixel values. It is a normalized weight. It is a spatial domain kernel function that calculates the similarity of spatial domain information. It is a pixel value domain kernel function that calculates the similarity of value domain information. Bilateral filtering considers both the spatial factors and pixel value differences of the points to be processed, and can effectively preserve the edges and details of the image while smoothing noise. However, bilateral filtering has a relatively large computational cost, and the filtering effect depends on the parameter settings.
[0076] Image enhancement techniques replace the original pixel values with mapped pixel values, then perform histogram equalization. The equalized pixel values are obtained by mapping each pixel value in the original image to a new pixel value according to a certain function, making the equalized histogram approximately a uniformly distributed histogram. The mapping function formula is as follows:
[0077] (13)
[0078] This represents the mapped pixel value. This represents the cumulative distribution function value of the i-th gray level. () represents the cumulative distribution function value corresponding to the smallest gray level in the image. M represents the total number of pixels in the image, N represents the number of rows in the image, L represents the total number of gray levels in the image. After replacing the original pixel values with the mapped pixel values, histogram equalization is completed.
[0079] The skeleton extraction module performs quantitative analysis of the geometric features of defects extracted from the skeleton to assess their impact on the rudder blades. By performing topological reduction on the segmented target region, the defect shape is simplified into an equivalent structural ridge.
[0080] Grayscale processing converts the RGB channels into single-channel luminance values, while the average grayscale method uses the arithmetic mean of the RGB three-channel luminance values as the grayscale value. The average method can more evenly retain information from all channels in a color image, ensuring that the overall brightness level of the image is not excessively biased towards any one channel. However, because the human eye has different sensitivities to different colors, the contrast or brightness performance of an image processed by the average grayscale method may not perfectly match human visual perception.
[0081] Image filtering can remove noise, smooth textures, and retain the structural information of the target, providing a clearer and more stable image input for subsequent feature extraction and defect determination.
[0082] Image enhancement is a way to intuitively understand the overall brightness distribution of an image and whether there are areas with strong contrast or uneven grayscale.
[0083] Global thresholding is a simple and easy-to-understand method for image segmentation, requiring relatively low computational resources and enabling image processing in a short time. In images with significant grayscale contrast, a suitable threshold can be directly selected using histogram analysis, and global thresholding can then be applied for image segmentation.
[0084] Defect segmentation and morphological processing are based on morphological operations to improve defect boundaries. Morphological operations can refine, fill, or remove noise from the target shape in a binary image, improve the morphological features of the defect region, effectively enhance the connectivity of the target region, smooth the contour edges, and ensure the accuracy of subsequent defect analysis.
[0085] The skeleton extraction process identifies the outer contour of the target area and gradually removes redundant pixels that do not meet the skeleton requirements. These two iterative processes are repeated to progressively refine the target region and remove unsuitable pixels, ultimately extracting the skeleton of the target region in the image. This ensures that the image refinement operation effectively preserves the core components of the target region.
[0086] The steps for defect extraction are as follows:
[0087] 1) Image grayscale processing; it can preserve the information in the image while avoiding excessive computational overhead;
[0088] 2) Image filtering processing; eliminates most of the background noise in the camera-captured images while preserving the flawed parts of the photos intact;
[0089] 3) Image enhancement; grayscale histograms are used to enhance the distinction between defective parts and background parts of the image;
[0090] 4) Global thresholding segmentation; In images with significant grayscale contrast, a suitable threshold can be directly selected by observing the histogram and then using the global thresholding segmentation method for image segmentation.
[0091] 5) Defect contour connection; Improve defect boundaries through morphological operations. Morphological operations can refine, fill or remove noise from the target shape in binary images, improve the morphological features of the defect area, effectively enhance the connectivity of the target area, smooth the contour edges, and ensure the accuracy of subsequent defect analysis.
[0092] 6) Skeleton extraction: By introducing distance transformation and local maxima, the skeleton of the target region in the image is extracted, ensuring that the image thinning operation can effectively preserve the core part of the target region.
[0093] The detection model module can detect surface defects at the orifice of nozzle-type parts. Specifically, it includes: a detection model that dynamically updates the topological defect classification based on new detection samples using an online incremental learning mechanism; and the identification and extraction of different defect features. Further, the specific operation steps of the detection model are as follows:
[0094] 1) Data preparation; collect new test sample data and organize it into a format that meets the model input requirements;
[0095] 2) Data output: The corresponding nozzle parts are inspected through the defect detection model, and the defects of the nozzle parts are selected by anchor frame selection for defect identification.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A nozzle-type part inspection system based on machine vision and deep learning, characterized in that, It includes an image acquisition module, a deep learning defect recognition module, a defect extraction module, and a detection model; The image acquisition module is the basic input terminal, responsible for acquiring high-quality image data of the nozzle part to be inspected, providing raw materials for the subsequent deep learning defect recognition module; the defect extraction module preprocesses the acquired images to separate the target areas that may have defects from the complex background, reducing the interference of redundant information on recognition; The deep learning defect recognition module relies on the detection model to input the target area features output by the defect extraction module into the model for analysis, matching, and classification. Finally, it determines whether there is a defect in the area and the type and level of the defect. The four are closely linked: the image acquisition module determines the upper limit of data quality, the defect extraction module is the bridge connecting the original image and intelligent recognition, the detection model is the core carrier of the defect recognition module, and the deep learning defect recognition module is the key execution unit for accurate defect judgment. Together, they constitute a complete defect detection process. The image acquisition module consists of an industrial camera, dual telecentric lenses, an internal coaxial light source, an adjustable spherical integral light source, and an image acquisition card; the image acquisition module can acquire images of nozzle parts, and the acquired images are defined as image a. The deep learning defect recognition module is used to realize end-to-end processing and analysis from image to defect image; it includes two parts: lightweight model and change boundary perception improvement. The deep learning defect recognition module can process image a acquired by the image acquisition module, identify scratches and defects in image a, prepare for the subsequent deep learning defect extraction module, and define the image processed by the deep learning defect recognition module as image b. The defect extraction module can enhance the extraction of surface defects on nozzle-type parts. The defect extraction module includes image grayscale transformation, image filtering, image enhancement and skeleton extraction. Defect extraction identifies defects in image b, thus improving the identification of nozzle defects. The detection model employs an online incremental learning mechanism and consists of two parts: data preparation and data output. It dynamically updates the graph topology defect classification based on new detection samples and identifies and extracts different defect features.
2. The nozzle-type part inspection system based on machine vision and deep learning as described in claim 1, characterized in that, The lightweighting of the deep learning defect identification module involves using parameter pruning and quantization to reduce redundant parameters that are not sensitive to performance. This lightweighting is performed on the deep learning model in the convolutional and fully connected layers. The improved change boundary awareness in the deep learning defect recognition module is that the change boundary awareness (CBM) module obtains the change region through boundary information, thereby promoting the network model to retain the boundary information of the change region. The CBM module uses the Simple Attention Module (SimAM) to capture the change information of the boundary region in the image, and then extracts edge features through pooling, subtraction and convolution. The CBM module can handle images with complex boundaries and varying regions; the SimAM module is a uniformly weighted attention module that evaluates the importance of each neuron, thereby better focusing the attention of the neural network.
3. The nozzle-type part inspection system based on machine vision and deep learning as described in claim 1, characterized in that, The specific methods for image grayscale transformation and image filtering in the defect extraction module are as follows: Image grayscale transformation uses average grayscale to extract defective images. The grayscale value calculation formula is as follows: (1) In the formula: Representing the row and column coordinates of pixels in an image, the RGB model represents color through a linear combination of the three primary colors: red, green, and blue. Each color channel has a brightness value ranging from 0 to 255, corresponding to the color intensity of the pixel. Image grayscale conversion essentially reduces the three-dimensional RGB color space to a one-dimensional grayscale space through mapping, using a specific function. Generate the grayscale value corresponding to this pixel. ; Let b represent the grayscale value of image b. The formula for calculating the grayscale value is shown in formula (2): (2) Image filtering is a process that removes noise, smooths textures, and preserves the structural information of the target after image filtering, providing a clearer and more stable image input for subsequent feature extraction and defect determination. Bilateral filtering is used to extract defects from the image. The bilateral filtering calculation formula is shown in formula (3): (3) In the formula These are the filtered pixel values. It is a normalized weight. It is a spatial domain kernel function that calculates the similarity of spatial domain information. It is a pixel value range kernel function that calculates the similarity of value range information.
4. The nozzle-type part inspection system based on machine vision and deep learning as described in claim 3, characterized in that, The image enhancement and skeleton extraction methods in the defect extraction module are as follows: Image enhancement technology replaces the original pixel values with mapped pixel values and then performs histogram equalization. The equalized pixel values are obtained by mapping each pixel value in the original image to a new pixel value according to a certain function relationship, so that the equalized histogram is approximately a uniformly distributed histogram. The mapping function formula is shown in formula (4): (4) in, Represents the mapped pixel value. Let represent the cumulative distribution function value of the i-th gray level, and CDF(min) represent the cumulative distribution function value corresponding to the minimum gray level in the image. M represents the total number of pixels in the image, N represents the number of rows in the image, and L represents the total number of gray levels in the image. After replacing the original pixel values with the mapped pixel values, histogram equalization is completed. The skeleton extraction module performs quantitative analysis of the geometric features of defects based on skeleton extraction to assess their impact on nozzle parts; by performing topological reduction on the segmented target region, the defect shape is simplified into an equivalent structural ridge. Before starting skeleton extraction, initialization work is required. First, the image is binarized, that is, the target region is marked as 1 and the background as 0. Second, morphological and other image processing is required to ensure that the target region is connected and the background region is continuous. Further, distance transformation and local maximum extraction are introduced. The distance transformation assigns a value of 1 to each target pixel in the image and calculates the distance between it and the nearest background pixel, which is assigned a value of 0. The Euclidean distance formula between pixels is shown in formula (5): (5) In the formula This represents the distance from the corresponding pixel (x, y) to the nearest background pixel. It is the position of the background pixel; by using distance transformation, the shortest distance from each target pixel to the background pixel is calculated, and a distance value between the target pixel and the background is obtained to replace the value of each target pixel in the image; Local maximum extraction is an effective method for identifying important feature points, edges, inflection points, and corners in an image. When processing curved areas, local maximum extraction can highlight the curved areas, thereby helping to preserve these important features and avoid losing relevant important feature information in subsequent processing. During the processing, a sliding window is set to gradually scan the target pixels of the image and find the local maximum value of the window within each window.
5. The nozzle-type part inspection system based on machine vision and deep learning as described in claim 1, characterized in that, The industrial camera in the image acquisition module has the following parameters: 25 million pixels resolution, square chip size, suitable for image acquisition of circular or round-hole objects; the dual telecentric lens has an optical magnification of 4X, a target surface of 18.4, and is equipped with a point light source with an illuminance of 2 million lux, while also using a spherical integrating light source to achieve a 360-degree detection field of view.
6. The nozzle-type part inspection system based on machine vision and deep learning as described in claim 1, characterized in that, The deep learning defect identification module comprises two parts: a lightweight model and an improved boundary awareness mechanism. Specifically: The lightweight model uses parameter pruning and quantization to reduce redundant parameters that are not sensitive to performance, and fine-tunes the pruned network to make the model more compact; model training is to find the optimal accuracy and recall of the pre-trained model through multiple rounds of training; the regularized channel importance evaluation is shown in formula (6): (6) In the formula, L represents the loss function. This represents the model's prediction loss on input x and label y, where W is the model's trainable weight parameters. The regularization coefficient is . This represents the set of learnable parameters of the model. This represents a regularization function used to constrain parameter complexity and avoid overfitting; in middle, The scaling factor associated with each channel controls the importance of that channel. It is a sparsity penalty function for the scaling factor, namely L1 regularization, where γ represents the regularization coefficient. It balances the task loss with the strength of the sparsity constraint. Through L1 regularization, some scaling factors are forced to approach zero, thereby identifying redundant channels. A learnable scaling factor γ is associated between the output channel of the convolutional layer and the neuron of the fully connected layer and multiplied by the output of the channel. The scaling factor gamma can be determined by performing channel sparse regularization training on the model with L1 regularization. The loss function in channel sparse regularization training is shown in Equation (7): (7) In the formula, This represents the total loss function after adding L1 regularization. This represents the task loss term, which measures the error between the model's predictions and the true labels. Represents the loss function. Represents a symbolic function; The change boundary perception module obtains the changed region through boundary information, which helps the network model retain the boundary information of the changed region.