Real-time image recognition scratch detection system and method based on deformation network
Through an improved detection system based on deformed network, combined with deformed convolutional neural network and topological feature measurement function, the error detection and missed detection problems of detection systems in the existing technology on complex backgrounds and deformed objects are solved, and higher detection is achieved Accuracy and adaptability ensure the accuracy and reliability of the test results.
Patent Information
- Application Number
- CN202411095382.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-06
AI Technical Summary
The existing automated detection systems have mis-checking or mischecking when dealing with complex backgrounds and deformed objects, which is difficult to ensure the accuracy of the detection, and it is difficult to fully capture local topological changes in the image, and feature extraction is not accurate enough.
Using a real-time image recognition scratch detection system based on deformed network, through improved deformed convolutional neural network and topological feature measurement function, combined with adaptive threshold and regional growth methods, the threshold is dynamically adjusted and the scratch area is expanded, and the spatial transformation mechanism is used to optimize The spatial distribution of feature maps enables more accurate scratch detection.
It improves the accuracy and adaptability of detection, enhances the recognition ability of complex backgrounds and deformed objects, reduces the impact of noise and extreme values, and ensures the accuracy and reliability of detection results.
Smart Images

Figure CN119091193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of image recognition and computer vision, and in particular to a real-time image recognition scratch detection system and method based on a deformation network. Background Art
[0002] In the process of industrial production and quality control, the detection of surface scratches is an important part of ensuring product quality. With the development of computer vision and image recognition technology, in order to improve detection efficiency and consistency, traditional manual detection methods have gradually been replaced by automated detection systems. Early automated detection systems mainly used simple image processing methods, such as edge detection and template matching, to identify scratches. However, these methods showed obvious limitations when dealing with complex image backgrounds and scratches with variable shapes. With the advancement of computing power and algorithms, deep learning technology has been introduced into scratch detection, using a large amount of annotated data for training, which significantly improves the accuracy and efficiency of detection. Deep learning models are usually able to capture more complex features, which to a certain extent solves the shortcomings of traditional methods in dealing with complex backgrounds and variable shapes.
[0003] However, existing automated detection methods still have significant shortcomings when dealing with complex backgrounds and deformed objects. First, the fixed threshold method is more common in scratch area segmentation, but it is easily affected by image noise and local extreme values, resulting in false detection or missed detection, and it is difficult to ensure the accuracy of detection. Secondly, the traditional topological feature measurement method fails to fully consider the extreme changes in pixel values and multi-directional offset differences, making it difficult for existing systems to fully capture local topological changes in images. In addition, the flexibility and accuracy of existing convolutional neural networks in dealing with deformed objects still need to be improved. The convolution kernel is difficult to adaptively adjust its position and shape when facing complex deformations, resulting in inaccurate feature extraction. Summary of the invention
[0004] The present invention provides a real-time image recognition scratch detection system based on a deformation network to solve the problems of false detection or missed detection in existing automated detection technologies, difficulty in ensuring detection accuracy, difficulty in fully capturing local topological changes in images, and inaccurate feature extraction. This improves the detection capability of the system in complex scenes to achieve higher detection accuracy and adaptability.
[0005] The embodiment of the present invention discloses a real-time image recognition scratch detection method based on a deformation network, comprising the following steps:
[0006] S1: Obtain product images, preprocess the acquired product images, use the improved deformable convolutional neural network to extract the features of the preprocessed images, optimize the spatial distribution of detail features in the feature map through the spatial transformation mechanism, and obtain a comprehensive feature map;
[0007] S2: Use the improved topological feature measurement function to analyze the topological features of the comprehensive feature map, identify potential scratch areas, use the adaptive threshold and region growing method to dynamically adjust the threshold and expand the scratch area to obtain the final scratch detection results, display and record the scratch detection results, and generate a detection report.
[0008] As a specific implementation, step S1 includes:
[0009] Calculate deformation offset;
[0010] Use the deformation offset to adjust the position of the convolution kernel and calculate the initial feature map using the deformation convolution formula;
[0011] Calculate the weights of the dynamic convolution kernel;
[0012] Use the weight of the dynamic convolution kernel to perform a convolution operation on the initial feature map to obtain a dynamically adjusted feature map;
[0013] The different regions of the dynamically adjusted feature map are further adjusted and transformed through the spatial transformation mechanism to obtain a comprehensive feature map.
[0014] As a specific implementation, in step S1, “calculating the deformation offset” includes:
[0015] Perform convolution operation on the preprocessed image, use the convolution layer in the convolutional neural network to extract the preliminary feature map, and process the preliminary feature map through the ReLU activation function to obtain the activated feature map;
[0016] As a specific implementation, in step S1, "calculating the deformation offset" also includes: performing a convolution operation on the activated feature map using the convolution kernel used to generate the offset in the convolutional neural network to respectively generate a horizontal deformation offset and a vertical deformation offset, and combining the horizontal deformation offset and the vertical deformation offset to obtain the deformation offset.
[0017] As a specific implementation, in step S2, "using an improved topological feature measurement function to analyze the topological features of the comprehensive feature map" includes: using an improved topological feature measurement function combined with a logarithmic transformation of pixel values and multi-directional offset differences to analyze the comprehensive feature map.
[0018] As a specific implementation, step S2 further includes: introducing an adaptive threshold, where the adaptive threshold method dynamically adjusts the threshold according to the statistical characteristics of the image.
[0019] As a specific implementation, step S2 further includes: performing preliminary segmentation on the comprehensive feature map according to the improved topological feature metric function and the adaptive threshold to obtain a preliminary scratch area.
[0020] As a specific implementation, step S2 also includes: introducing a region growing method, which selects pixels of the preliminary segmented area as seed points based on the preliminary segmented area, examines the neighborhood pixels of each seed point, and determines whether the neighborhood pixels belong to the scratch area according to a preset similarity threshold.
[0021] As a specific implementation, step S2 also includes: using blockchain technology to store the final scratch area on the blockchain, and each test result will be recorded on the blockchain to form a complete test history and quality traceability report.
[0022] Another embodiment of the present invention discloses a real-time image recognition scratch detection system based on a deformation network, comprising:
[0023] Image acquisition module, which monitors and acquires the original image of the product surface in real time through the image acquisition device installed in the production line or quality control link;
[0024] The preprocessing module performs grayscale conversion, denoising, contrast enhancement, and edge detection on the original image acquired by the image acquisition module to obtain a preprocessed image;
[0025] The deformation network model module uses the improved deformation convolutional neural network to extract the detail features of the image preprocessed by the preprocessing module, optimizes the spatial distribution of the detail features in the feature map through the spatial transformation mechanism, and obtains a comprehensive feature map;
[0026] The scratch detection module uses an improved topological feature metric function to analyze the topological features of the comprehensive feature map of the deformation network model module, and uses adaptive threshold calculation, preliminary segmentation and region growing methods to obtain the final scratch area;
[0027] A display alarm module, used for marking the final scratch area of the scratch detection module, displaying the scratch detection information in real time and issuing visual, sound and / or tactile alarm signals;
[0028] The data integration module is respectively connected to the image acquisition module, the image acquisition module, the deformation network model module, the scratch detection module and the display alarm module. The data integration module is used to use blockchain technology to record and store the processing results and detection data of the image acquisition module, the image acquisition module, the deformation network model module, the scratch detection module and the display alarm module, and generate a detection report.
[0029] The technical solution of the embodiment of the present invention has at least the following beneficial effects:
[0030] 1. Through the improved deformation convolutional neural network, the system proposed in the embodiment of the present invention can show higher flexibility and accuracy when processing complex backgrounds and deformed objects. The introduction of the spatial transformation mechanism enhances the ability to capture local features, making the scratch detection results more accurate and stable, and comprehensively improving the performance and reliability of the scratch detection system.
[0031] 2. The topological feature measurement function is improved by combining the logarithmic transformation of pixel values and multi-directional offset differences, which reduces the impact of large pixel values on the measurement results and significantly enhances the robustness to noise and extreme value conditions, making the system more reliable when dealing with complex backgrounds and subtle scratches. At the same time, the multi-directional offset difference calculation comprehensively captures the local topological changes of pixels in the image, improves the detection accuracy and adaptability of scratch features, and enables the system to accurately identify potential scratch areas in various situations.
[0032] 3. The adaptive threshold method is introduced to dynamically adjust the threshold according to the statistical characteristics of the image (mean and standard deviation), which enhances the flexibility and adaptability of scratch area segmentation. Combined with the region growing method, the scratch area is gradually expanded according to the similarity of neighborhood pixels, ensuring that the system can still provide reliable detection results when dealing with complex and deformed scratches. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A structural diagram of a real-time image recognition scratch detection system based on a deformation network according to an embodiment of the present invention;
[0034] Figure 2 The flowchart of a real-time image recognition scratch detection method based on a deformation network according to another embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0036] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0037] The following is a detailed description of a specific scheme of a real-time image recognition scratch detection system based on a deformation network provided by the present invention in conjunction with the accompanying drawings.
[0038] See attached Figure 1 The embodiment of the present invention discloses a real-time image recognition scratch detection system based on a deformation network, which includes an image acquisition module, a preprocessing module, a deformation network model module, a scratch detection module, a display alarm module and a data integration module.
[0039] The image acquisition module monitors and acquires the original image of the product surface in real time through an image acquisition device installed in the production line or quality control link. Exemplarily, the image acquisition device is an industrial camera, and the image acquisition module is connected to the preprocessing module and the data integration module through data transmission.
[0040] The preprocessing module performs preprocessing operations such as grayscale, denoising, contrast enhancement, and edge detection on the original image to improve image quality and processing speed. The preprocessing module is connected to the deformation network model module and the data integration module through data transmission.
[0041] The deformation network model module uses the improved deformation convolutional neural network to extract the detail features of the preprocessed image, optimizes the spatial distribution of the detail features in the feature map through the spatial transformation mechanism, and obtains the comprehensive feature map. The deformation network model module is connected to the scratch detection module and the data integration module through data transmission.
[0042] The scratch detection module uses an improved topological feature measurement function to analyze the topological features of the comprehensive feature map, and adopts adaptive threshold calculation, preliminary segmentation, and region growing methods to obtain the final scratch area. The scratch detection module is connected to the display alarm module and the data integration module through data transmission.
[0043] The display alarm module marks the scratch area, displays the scratch detection information in real time and issues visual, audible and / or tactile alarm signals.
[0044] The data integration module is used to use blockchain technology to record and store the processing results and detection data of the image acquisition module, preprocessing module, deformation network model module, scratch detection module and display alarm module, generate detection reports, ensure the security and non-tamperability of the data, and provide comprehensive quality traceability functions.
[0045] Refer to the attached Figure 2 Another embodiment of the present invention discloses a real-time image recognition scratch detection method based on a deformation network, the method comprising the following steps:
[0046] S1: Obtain product images, preprocess the acquired product images, use the improved deformable convolutional neural network to extract the features of the preprocessed images, optimize the spatial distribution of detail features in the feature map through the spatial transformation mechanism, and obtain a comprehensive feature map.
[0047] Specifically, an image acquisition device is used to acquire product images. For example, the image acquisition device is an industrial camera. The industrial camera is installed in a production line or a quality control link to monitor and acquire images of the product surface in real time. The images acquired by the industrial camera are preprocessed, including grayscale, denoising, contrast enhancement, and edge detection. The above preprocessing operations are prior art and will not be described in detail here.
[0048] An improved deformable convolutional neural network is used to extract features from the preprocessed image. In order to enhance the recognition ability of traditional deformable convolutional neural network for complex backgrounds and scratches with variable shapes, deformation offset, multi-dimensional dynamic convolution kernel and spatial transformation mechanism are introduced. The improved deformable convolutional neural network can adaptively adjust the position and shape of the convolution kernel, more accurately capture the details and changes in the image, and improve the detection accuracy and robustness.
[0049] The process of feature extraction of the preprocessed image by the improved deformable convolutional neural network is as follows:
[0050] First, the deformation offset Δq is calculated, and a convolution operation is performed on the preprocessed image. The convolution layer in the convolutional neural network is used to extract the preliminary feature map. Then, the preliminary feature map is processed by the ReLU activation function to obtain the activated feature map. Convolutional neural networks and ReLU activation functions are prior art and will not be described in detail here. The convolution kernel used to generate the offset in the convolutional neural network performs a convolution operation on the activated feature map to generate the deformation offset Δq in the horizontal direction. x and the vertical deformation offset Δq y , the formula is as follows:
[0051]
[0052] in, Represents the activated feature map; and They are the activated feature maps In Location The deformation offset in the horizontal and vertical directions; They are the activated feature maps The row and column indices of the current pixel position in ; and are the convolution kernel weights for calculating the deformation offset in the horizontal and vertical directions respectively; p and w are the offsets of the convolution kernel for generating the offset in the horizontal and vertical directions respectively; is the radius of the convolution kernel that generates the offset; is the activated feature map at position The value of is the pixel position in the feature map after activation; σ is the standard deviation of the Gaussian distribution; is a Gaussian weight used to reduce the influence of pixels far from the center and increase the stability of the convolution operation.
[0053] The deformation offset in the horizontal direction and the deformation offset in the vertical direction are combined to obtain the deformation offset Δw=(Δq x , Δw y ), Δw is used to adjust the position of the convolution kernel in subsequent convolution operations so that the convolution kernel can better adapt to the geometric deformation in the image, thereby improving the accuracy and robustness of feature extraction.
[0054] That is, the improved deformation convolutional neural network formula introduces deformation offset and Gaussian function. The introduction of deformation offset enables the convolution kernel to dynamically adapt to the geometric deformation in the image, improves the recognition ability of complex backgrounds and deformed objects, and more accurately captures the characteristics of deformation or offset in the image; the introduction of Gaussian function assigns lower weights to pixels farther from the center of the convolution kernel, so that the convolution operation pays more attention to the pixels in the central area, reduces the influence of noise, and enhances the stability and accuracy of the convolution results.
[0055] Then, the deformation offset Δq is used to adjust the position of the convolution kernel so that the convolution kernel can more accurately capture the deformed or offset features in the image. The initial feature map F′ is calculated using the deformation convolution formula, which is:
[0056]
[0057] Among them, F′(i, j) is the value of the initial feature map at position (i, j); i, j are the position coordinates of the current pixel in the initial feature map; k is the radius of the convolution kernel; is the weight of the convolution kernel at position (m, n); m, n are the position coordinates of each element in the convolution kernel; I(i+m+Δw x , j+n+Δq y ) is the preprocessed image I at position (i+m+Δq x , j+n+Δq y ) value, where i+m+Δq x , j+n+Δq y is after the offset Δq x and Δw y After adjustment, the pixel positions of the preprocessed image participating in the convolution operation; Δq x is the horizontal deformation offset of the convolution kernel position; Δq y is the vertical deformation offset of the convolution kernel position, σ is the standard deviation of the Gaussian distribution, It is a Gaussian function that assigns lower weights to pixels farther from the center of the convolution kernel, so that the convolution operation pays more attention to the pixels in the central area, reduces the impact of noise, and enhances the stability and accuracy of the convolution result.
[0058] Next, perform multi-dimensional dynamic convolution kernel calculations and dynamically adjust the weights of the convolution kernels to enhance adaptability to different features and deformations. The calculation formula for the weights of the dynamic convolution kernels is:
[0059]
[0060] Among them, W dyn (u, v) is the weight of the dynamic convolution kernel at position (u, v); u and v are the index positions of the dynamic convolution kernel in the horizontal and vertical directions, respectively, indicating the position of the dynamic convolution kernel currently being calculated, in the range of [-k, k], where k is the radius of the convolution kernel; W0 is the basic convolution kernel weight, generated by a random initialization method; α t (u, v) are the dynamic coefficients of W0, calculated by convolutional neural network; is the number of dimensions in the multidimensional dynamic convolution kernel; and It is the multidimensional dynamic characteristic of the convolution kernel, which represents the periodic change characteristics of the convolution kernel in multiple dimensions, so that the convolution kernel can adapt to the feature changes in different directions and frequencies, improve the responsiveness of the convolution kernel to different image features, and improve the accuracy and robustness of feature extraction.
[0061] Afterwards, the weight W of the dynamic convolution kernel is used dyn The initial feature map F′ is convolved to obtain the dynamically adjusted feature map F″. The formula is as follows:
[0062]
[0063] Among them, F″(i, j) is the value of the dynamically adjusted feature map at position (i, j); F′(i+u, jj+v) is the value of the initial feature map at position (i+u, j+v).
[0064] Finally, the spatial transformation mechanism is used to further adjust and transform different regions of the dynamically adjusted feature map to obtain a comprehensive feature map. The comprehensive feature map can capture more details and features, further improving the accuracy and effect of detection. The formula for calculating the comprehensive feature map using the spatial transformation mechanism is:
[0065]
[0066] Wherein, F(x, y) is a comprehensive feature map; x, y are coordinate points in the comprehensive feature map; x′, y′ are coordinate points in the transformation window; Ω is the transformation window; T(x, y, x′, y′) is a transformation weight, which is a parameter optimized by the back propagation algorithm in the process of training the improved deformable convolutional neural network. The back propagation algorithm is a prior art and will not be described in detail here; The distance weight function can perform weighting according to the distance between the feature point and the center of the transformation window, so that the feature points with a closer distance have a greater impact on the transformation result. It can more accurately adjust the spatial distribution of the feature map and improve the ability to capture local features.
[0067] S2: Use the improved topological feature measurement function to analyze the topological features of the comprehensive feature map, identify potential scratch areas, use the adaptive threshold and region growing method to dynamically adjust the threshold and expand the scratch area to obtain the final scratch detection results, display and record the scratch detection results, and generate a detection report.
[0068] The comprehensive feature map is analyzed using an improved topological feature measurement function, which combines the logarithmic transformation of pixel values and the offset differences in multiple directions to reduce the impact of high pixel intensity on the measurement results. By calculating the offset differences in multiple directions, the local topological changes of pixels in the image can be fully captured, the detection accuracy and adaptability of scratch features can be improved, and stronger stability can be shown in complex backgrounds and with subtle scratches.
[0069] The improved topological feature measurement function formula is:
[0070]
[0071] Among them, D(g) is the improved topological feature metric function, which is the topological feature of the comprehensive feature map; M is the number of pixels of the feature map in the vertical direction (i.e., height); N is the number of pixels of the feature map in the horizontal direction (i.e., width); F(i, j) is the value of the comprehensive feature map at position (i, j); δ i ,δ j It is the horizontal and vertical offset of the pixel points of the comprehensive feature map.
[0072] Although the improved topological feature metric function D(g) can reflect the topological complexity of a certain area in the feature map, relying solely on the improved topological feature metric function D(g) for scratch area segmentation may be affected by image noise and local extreme values, resulting in false detection or missed detection problems. By introducing adaptive thresholds and region growing methods, the accuracy and flexibility of scratch area segmentation are increased. The adaptive threshold method dynamically adjusts the threshold according to the statistical characteristics of the image (such as mean and standard deviation) to adapt to the characteristics of different images, thereby more accurately segmenting the scratch area. Based on the preliminary segmentation, the region growing method selects pixels in the preliminary segmentation area as seed points, and gradually expands the scratch area according to the similarity of the neighboring pixels to ensure that the segmentation results are more complete and accurate. Through the combination of adaptive thresholds and region growing methods, the system proposed in the embodiment of the present invention can more effectively detect and mark scratches and improve the accuracy and reliability of detection.
[0073] The adaptive threshold calculation formula is as follows:
[0074] T=μ D +K·σ D
[0075] Where τ is the adaptive threshold; μ D is the mean of the improved topological feature metric function D(g); σ D is the standard deviation of the improved topological feature measurement function D(g); κ is the adjustment coefficient used to control the strictness of the threshold.
[0076] According to the improved topological feature metric function and adaptive threshold, the comprehensive feature map is preliminarily segmented to obtain the preliminary scratch area. In the preliminary segmented area, pixels are uniformly selected as seed points according to the preset interval value. Region growth examines the neighborhood pixels of each seed point and determines whether the neighborhood pixels belong to the scratch area according to the preset similarity threshold. The interval value and similarity threshold are set according to the specific implementation scenario.
[0077] If the similarity between the neighborhood pixel and the seed point is higher than the threshold, the pixel is classified into the scratch area, and the pixel is used as the new seed point, and the above process is repeated until no new pixel is added to the scratch area.
[0078] After the region growing algorithm is completed, the final scratch area is marked on the original image. The detected scratch area is circled with a rectangular box or a polygonal box and superimposed on the original image to form a marked image to ensure the visualization of the detection results.
[0079] Next, the marked image is displayed on the screen, and visual, audio and / or tactile feedback alarm signals are triggered to ensure that the operator is aware of the existence and location of the scratch in a timely manner. The visual alarm signal includes highlighting the marked image on the screen, which may be accompanied by flashing or color changes. The audio alarm signal plays a preset alarm sound, such as a beep or voice prompt, through a speaker to alert the operator. The tactile feedback signal provides vibration feedback through a vibration device (such as a handheld device or a wearable device) to alert the operator. The alarm signal can be set according to the specific implementation scenario.
[0080] Subsequently, the final scratch area is stored on the blockchain using blockchain technology to ensure data security and immutability. Each test result will be recorded on the blockchain to form a complete test history and quality traceability report. Among them, the test results specifically include the specific location of the scratch (pixel coordinates), the size of the scratch (area or length), the shape of the scratch (geometric features), the test time and date, the original image, the comprehensive feature map and the marked scratch image, which will help with subsequent data analysis and statistics and provide a reliable basis for quality control.
[0081] Finally, the system generates a detailed inspection report, which includes the specific location, size, shape and inspection time of the scratches, helping operators and quality control personnel to fully understand the surface quality of the product.
[0082] The order of the embodiments of the invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0084] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A real-time image recognition scratch detection method based on a deformation network, characterized in that: The following steps are involved: S1: Obtain product images, preprocess the acquired product images, use the improved deformable convolutional neural network to extract the features of the preprocessed images, optimize the spatial distribution of detail features in the feature map through the spatial transformation mechanism, and obtain a comprehensive feature map; S2: Use the improved topological feature measurement function to analyze the topological features of the comprehensive feature map, identify potential scratch areas, use the adaptive threshold and region growing method to dynamically adjust the threshold and expand the scratch area to obtain the final scratch detection results, display and record the scratch detection results, and generate a detection report.
2. The real-time image recognition scratch detection method based on deformation network as claimed in claim 1, characterized in that: Step S1 includes: Calculate deformation offset; Use the deformation offset to adjust the position of the convolution kernel and calculate the initial feature map using the deformation convolution formula; Calculate the weights of the dynamic convolution kernel; Use the weight of the dynamic convolution kernel to perform a convolution operation on the initial feature map to obtain a dynamically adjusted feature map; The different regions of the dynamically adjusted feature map are further adjusted and transformed through the spatial transformation mechanism to obtain a comprehensive feature map.
3. The real-time image recognition scratch detection method based on deformation network as claimed in claim 2, characterized in that: In step S1, "calculating deformation offset" includes: The preprocessed image is convolved, and the convolution layer in the convolutional neural network is used to extract the preliminary feature map. The preliminary feature map is processed by the ReLU activation function to obtain the activated feature map.
4. The real-time image recognition scratch detection method based on deformation network as claimed in claim 3, characterized in that: Step S1, "calculating the deformation offset" also includes: performing a convolution operation on the activated feature map using the convolution kernel used to generate the offset in the convolutional neural network to generate a horizontal deformation offset and a vertical deformation offset, respectively, and combining the horizontal deformation offset and the vertical deformation offset to obtain the deformation offset.
5. The real-time image recognition scratch detection method based on deformation network as claimed in claim 1, characterized in that: In step S2, "using the improved topological feature measurement function to analyze the topological features of the comprehensive feature map" includes: using the improved topological feature measurement function in combination with the logarithmic transformation of the pixel values and the offset differences in multiple directions to analyze the comprehensive feature map.
6. The real-time image recognition scratch detection method based on deformation network as claimed in claim 5, characterized in that: Step S2 also includes: introducing an adaptive threshold, where the adaptive threshold method dynamically adjusts the threshold according to the statistical characteristics of the image.
7. The real-time image recognition scratch detection method based on deformation network as claimed in claim 6, characterized in that: Step S2 also includes: performing preliminary segmentation on the comprehensive feature map according to the improved topological feature metric function and the adaptive threshold to obtain a preliminary scratch area.
8. The real-time image recognition scratch detection method based on deformation network as claimed in claim 7, characterized in that: Step S2 also includes: introducing a region growing method, which selects pixels of the preliminary segmented area as seed points based on the preliminary segmented area, examines the neighborhood pixels of each seed point, and determines whether the neighborhood pixels belong to the scratch area according to a preset similarity threshold.
9. The real-time image recognition scratch detection method based on deformation network as claimed in claim 1, characterized in that: Step S2 also includes: using blockchain technology to store the final scratch area on the blockchain, and each test result will be recorded on the blockchain to form a complete test history and quality traceability report.
10. A real-time image recognition scratch detection system based on a deformation network, characterized in that: include: Image acquisition module, which monitors and acquires the original image of the product surface in real time through the image acquisition device installed in the production line or quality control link; A preprocessing module, performing grayscale, denoising, contrast enhancement, and edge detection operations on the original image acquired by the image acquisition module to obtain a preprocessed image; The deformation network model module uses an improved deformation convolutional neural network to extract detail features of the image preprocessed by the preprocessing module, optimizes the spatial distribution of the detail features in the feature map through a spatial transformation mechanism, and obtains a comprehensive feature map; A scratch detection module, which uses an improved topological feature metric function to analyze the topological features of the comprehensive feature graph of the deformable network model module, and uses adaptive threshold calculation, preliminary segmentation and region growing methods to obtain the final scratch region; A display alarm module, used for marking the final scratch area of the scratch detection module, displaying the scratch detection information in real time and issuing visual, sound and / or tactile alarm signals; A data integration module is respectively connected to the image acquisition module, the image acquisition module, the deformation network model module, the scratch detection module and the display alarm module. The data integration module is used to use blockchain technology to record and store the processing results and detection data of the image acquisition module, the image acquisition module, the deformation network model module, the scratch detection module and the display alarm module to generate a detection report.
Citation Information
Cited By
Cell scratching device
CN119752608A
