Method and system for detecting corrosion of train body equipment compartment of motor train unit based on deep learning

By performing grayscale processing and nonlinear transformation on sample images of the EMU equipment compartment and combining them with the EfficientNet network training model, the problems of manual dependence and insufficient image acquisition in existing technologies were solved, achieving more accurate corrosion detection.

CN120807513AActive Publication Date: 2025-10-17SOUTHWEST JIAOTONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511301066.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-10-17
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Existing technologies for corrosion detection in EMU equipment compartments rely on manual experience, and image acquisition does not meet training requirements, resulting in poor detection results.

Method used

By acquiring sample images of multiple categories of components, grayscale processing, image segmentation, splicing and nonlinear transformation are performed to establish training samples. The model is trained using the EfficientNet network until the training end conditions are met, forming a detection model for corrosion detection.

Benefits of technology

The accuracy and adaptability of the detection model are improved, the local detail loss and grayscale jump in image processing are reduced, and the effect of corrosion detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807513A_ABST
    Figure CN120807513A_ABST
Patent Text Reader

Abstract

The invention discloses a motor train unit body equipment compartment corrosion detection method and system based on deep learning, and relates to the technical field of corrosion detection.The method comprises the steps that sample images of multiple types of parts with different corrosion degrees are obtained, and gray level images of the sample images are obtained; dividing the grayscale image into a plurality of sub-images to obtain a first grayscale image in which the grayscale value of each pixel point in each sub-image is redistributed; splicing the first grey-scale maps to obtain a second grey-scale map, and readjusting the grey-scale value through a cumulative distribution function to obtain a third grey-scale map; carrying out nonlinear transformation on the gray value of the third gray-scale map to obtain a target gray-scale map, and establishing a training sample; and training the initial model by using the training sample until the initial model meets a preset training ending condition, determining the initial model meeting the training ending condition as a detection model, processing the collected image of the to-be-detected part by using the detection model, and finally obtaining a corrosion detection result of the to-be-detected area.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of corrosion detection, more particularly, it relates to a high-speed train body equipment cabin corrosion detection method and system based on deep learning. BACKGROUND

[0002] The main function of the equipment cabin of the Harmony high-speed train is to protect the equipment under the train and optimize the aerodynamic performance of the train. The main components of the skirt plate are composed of large hollow aluminum alloy profiles welded together, the bottom plate is composed of aluminum plate and honeycomb composite structure, and the skirt plate, bottom plate, end plate and equipment cabin framework are combined and connected to form a whole train module structure. According to the design requirements, the service life of the components of the equipment cabin of the Harmony high-speed train is planned to be 30 years, which is the same as the service life of the whole train. Since the components of the equipment cabin are structural safety components, their service life will directly affect the service life of the whole train. Therefore, it is necessary to detect and evaluate the state of the equipment cabin of the Harmony high-speed train in service after a long period of service to ensure the safe operation of the train during its service life.

[0003] The current corrosion detection method is to first take pictures of the detection area, and then observe and analyze the pictures through a stereomicroscope and other equipment to obtain the corrosion judgment result of the detection area. This method relies on human experience and requires observation and analysis personnel to have rich practical skills. In addition, the sample and equipment for shooting are required to be high. There is a detection method based on deep learning, which continuously identifies and learns corrosion features through a network model, so that the network model has the ability to detect whether the image is corroded, and then the network model is put into use. However, this method requires high training of the network model, which requires clear images and a large number of training samples. Since there are many components in the equipment cabin, and there are also many small parts such as screws and rivets, the images taken on site cannot meet the training requirements. Therefore, how to design a corrosion detection method for the equipment cabin of the high-speed train body based on deep learning is a problem we need to solve at present. SUMMARY

[0004] The present application relates to the technical field of corrosion detection, more particularly, it relates to a high-speed train body equipment cabin corrosion detection method and system based on deep learning.

[0005] The above technical purpose of the present application is achieved by the following technical scheme: In a first aspect, the present application provides a corrosion detection method for the equipment cabin of a high-speed train body based on deep learning, comprising the following specific steps: Obtain sample images of different corrosion degrees of multiple types of components, and obtain gray scale images of each sample image after gray scale processing; For each gray image, the gray image is divided into a plurality of sub-images, and the gray values of each pixel point in each sub-image are re-allocated to obtain a first gray image corresponding to each sub-image; Each first gray image is spliced by means of bilinear interpolation to obtain a second gray image of the same size as the gray image, and the gray values of each pixel point in the second gray image are re-adjusted by a cumulative distribution function to obtain a third gray image corresponding to the second gray image; The gray values of each pixel point in the third gray image are subjected to nonlinear transformation, and the gray mapping is performed by using the gray values subjected to nonlinear transformation to obtain a target gray image, and a training sample is established by using the target gray image; The initial model is trained by using the training sample until the initial model meets the preset training end condition, the initial model meeting the training end condition is determined as a detection model, and the detection model is used to process the collected image of the component to be detected to obtain the corrosion detection result of the detection area.

[0006] On the basis of the above technical scheme, the present application can also be improved as follows.

[0007] Further, before the above-mentioned each sample image is subjected to gray processing, the method further comprises: For a plurality of sample images of the same component with different corrosion degrees, the plurality of sample images are respectively subjected to image division; Each image block after image division is randomly combined to form a reconstructed image containing the complete structure image of the component, the reconstructed image is re-divided according to the corrosion degree, a new sample image is formed by the reconstructed image after re-division, and the gray image includes the sample image subjected to gray processing and the new sample image subjected to gray processing.

[0008] Further, the above-mentioned re-dividing the reconstructed image according to the corrosion degree is specifically: The reconstructed image is divided into a plurality of corrosion areas, and each corrosion area is given an initial weight, and the corrosion area at least includes a core area, a transition area and an edge area; The complexity index of each image block in the reconstructed image is calculated, and the initial weight of each corrosion area is corrected based on each complexity index; According to the updated weight of each corrosion area where each image block is located and the actual corrosion condition of each image block, a corrosion index of the reconstructed image is obtained, and the re-division of the corrosion degree of the reconstructed image is completed based on the preset range of the corrosion index of different corrosion degrees.

[0009] Further, the above-mentioned correcting the initial weight of each corrosion area is specifically: ; wherein: , ; Where, Represents the reconstructed image i The initial weight of the image block after correction, Represents the reconstructed image i The initial weight of the image block, represents the correction factor, Represents the first i The complexity index of the image block, represents the mean of the complexity index of all image blocks in the reconstructed image, represents the standard deviation of the complexity index, Indicates the number of image patches in the reconstructed image.

[0010] Furthermore, the corrosion index of the above reconstructed image is specifically: ; Where, represents the erosion index of the reconstructed image, Represents the reconstructed image i The initial weight of the image block after correction, Represents the reconstructed image i The degree of corrosion of the image block, Represents the first i The initial weight of the image block, Indicates the number of image patches in the reconstructed image.

[0011] Furthermore, the grayscale value of each pixel in the first grayscale image is expressed as: ; The grayscale value of each pixel in the second grayscale image is expressed as: ; In the above formula, Represents the first grayscale image k Medium pixel The gray value of Represents a sub-image k Medium pixel The gray value of Represents a sub-image k The middle pixel is i The number of pixels, Represents a sub-image k The total number of pixels in Represents the pixel point in the second grayscale image The gray value of respectively represent the pixel points the normalized distance of the pixel point in the horizontal direction and the vertical direction to its nearest neighbor point, respectively represent the pixel points the gray scale values of the four nearest neighbor points around the pixel point.

[0012] Further, the gray scale value of each pixel point in the target gray scale map is represented as: ; wherein: ; In the formula, the original gray scale value is x the gray scale value in the target gray scale map after gray scale mapping, respectively represent the starting value and the ending value of the gray scale value in the target gray scale map, represents a constant factor in the nonlinear transformation, represents the proportion of the pixel points whose gray scale values do not exceed x , represents a nonlinear factor in the nonlinear transformation, represents the number of pixel points whose gray scale values are i , represents the total number of pixel points, represents the upper limit of the gray scale value.

[0013] In a second aspect, the application provides a high-speed train body equipment cabin corrosion detection system based on deep learning, which is applied to the high-speed train body equipment cabin corrosion detection method based on deep learning in any of the first aspect, and comprises: A first module is configured to obtain sample images of different corrosion degrees of multi-category components, and obtain gray scale images of each sample image after gray scale processing; A second module is configured to divide each gray scale image into a plurality of sub-images, and reassign the gray scale values of each pixel point in each sub-image, to obtain a first gray scale map corresponding to each sub-image; A third module is configured to splice each first gray scale map by a bilinear interpolation method, to obtain a second gray scale map with the same size as the gray scale image, and to readjust the gray scale values of each pixel point in the second gray scale map by a cumulative distribution function, to obtain a third gray scale map corresponding to the second gray scale map; A fourth module is configured to perform nonlinear transformation on the gray scale values of each pixel point in the third gray scale map, to perform gray scale mapping by using each gray scale value after the nonlinear transformation, to obtain a target gray scale map, and to establish a training sample by using the target gray scale map; A fifth module is configured to train the preset initial model by using the training samples until the initial model meets a preset training end condition, determine the initial model meeting the training end condition as a detection model, and process the collected image of the component to be detected by using the detection model to obtain the corrosion detection result of the detection region.

[0014] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of any one of the first aspect when executing the computer program.

[0015] In a fourth aspect, the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions cause a computer to execute the method of any one of the first aspect.

[0016] Compared with the prior art, the present application has at least the following beneficial effects: In the present application, first, the preset initial model is trained by using sample images of multiple categories of components with different corrosion degrees, and the sample images need to be processed by equalization before the model training; wherein the processing process can be gray processing, image segmentation, image splicing, gray value adjustment, nonlinear transformation of gray value and gray value mapping in sequence, so as to obtain the final target gray image; second, the initial model is trained by using the training samples established by the target gray image until the initial model meets the preset training end condition, so that the initial model meeting the training end condition is determined as the detection model; finally, the collected image of the component to be detected is processed by using the detection model, and finally the corrosion detection result of the detection region is obtained; the adaptive histogram equalization and local segmentation are combined, and the nonlinear transformation and linear interpolation are used for gray value adjustment and distribution for different regions after segmentation, which not only avoids the loss of local details caused by the processing of the whole image by the traditional histogram equalization, but also effectively reduces the gray level jump when the sub-blocks are combined.

[0017] In the present application, multiple sample images of the same component with different corrosion degrees are divided, and the reconstructed image containing the complete structure image of the component is formed by randomly combining the image blocks after the image division, since the reconstructed image is spliced by multiple images with different corrosion degrees, the initial model is trained by using the reconstructed image re-divided according to the corrosion degree, which can not only enrich the training samples, but also improve the detection ability of the initial model. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings: Figure 1 Method flow chart of the detection method in the embodiment of the present application; Figure 2 Connection schematic diagram of the detection system in the embodiment of the present application; Figure 3 Connection schematic diagram of the electronic device in the embodiment of the present application.

[0019] Figure 4 Display diagram of the EfficientNet-B0 network structure in the embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.

[0022] It should be noted that: similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0023] In the description of the embodiments of the present application, "a plurality of" represents at least 2.

[0024] Embodiment 1: Because there are many components in the equipment cabin, and there are also a large number of small volume parts such as screws, rivets, etc., the images taken on site cannot meet the requirements of training, this embodiment provides a high-speed train body equipment cabin corrosion detection method based on deep learning, as shown in Figure 1 The method comprises the following specific steps: S1, obtaining sample images of different corrosion degrees of multiple types of components, and obtaining gray images of each sample image after gray processing.

[0025] Among them, the multiple types of components can include screws, rivets, etc., and the corrosion degree can be divided into 3 categories, namely, mild corrosion, moderate corrosion and severe corrosion.

[0026] Optionally, before the gray processing of each sample image, the method can further comprise: S11, for multiple sample images of the same component with different corrosion degrees, the multiple sample images are respectively subjected to image division.

[0027] By splicing the sample images of the same component with different corrosion degrees to form a reconstructed image, and training the initial model using the reconstructed image, the model can learn deeper corrosion features, which can effectively improve the detection ability of the model.

[0028] S12, the reconstructed image containing the complete structure image of the component is formed by randomly combining each image block after image division, the reconstructed image is re-divided according to the corrosion degree, and a new sample image is formed by the reconstructed image after re-division. The gray scale image includes the sample image after gray scale processing and the new sample image after gray scale processing.

[0029] Optionally, the above-mentioned re-division of the reconstructed image according to the corrosion degree is specifically: S121, the reconstructed image is divided into multiple corrosion regions, and each corrosion region is given an initial weight, and the corrosion region at least includes a core region, a transition region and an edge region.

[0030] It should be noted that the division of the reconstructed image can be based on splicing, such as the reconstructed image being spliced by three image blocks, and the three images can be horizontal, vertical or annular, of course, the same for the same component; In order to make the subsequent operation more smoothly, when multiple sample images of the same component with different corrosion degrees are divided, the division is carried out according to the corrosion region, that is, each sample image is divided into three image blocks of core region, transition region and edge region, so that it is convenient for operation when splicing.

[0031] Further, the initial weight of each corrosion region can be given as: the core region is 0.5, the transition region is 0.3, and the edge region is 0.2; Then the three image blocks constituting the reconstructed image are given weights according to their positions, which are also 0.5, 0.3 and 0.2 respectively.

[0032] S122, the complexity index of each image block in the reconstructed image is calculated, and the initial weight of each corrosion region is corrected based on each complexity index.

[0033] Wherein, in the calculation of the complexity index of each image block, SATD (Sum of Absolute Transformed Differences) and macroblock difference are used, so as to calculate the complexity index reflecting the texture complexity of the image, which can be: 1, the image block can be divided into macroblocks with a size of 16x16, which is the basic unit for subsequent DCT transformation and complexity calculation; 2. Perform discrete cosine transform (DCT) on each macroblock. DCT is a commonly used image transformation method that can convert images from the spatial domain to the frequency domain for easy subsequent processing. 3. Calculate SATD. SATD (Sum of Absolute Transformed Differences) represents the sum of the absolute values ​​of the DCT transform differences between adjacent macroblocks. For each macroblock, calculate the absolute value of the difference between it and its adjacent macroblocks after DCT transform, and sum these difference values ​​to obtain the SATD value of the macroblock. 4. Count the grayscale variance within each macroblock as a measure of macroblock difference; the grayscale variance reflects the discrete degree of pixel values ​​within the macroblock, that is, the complexity of the texture; 5. Linearly fuse the SATD value with the macroblock difference; this can be achieved through weighted summation and other methods. The specific weights can be adjusted according to the actual situation. The purpose of the fusion is to comprehensively consider the two factors of SATD and macroblock difference to more comprehensively reflect the texture complexity of the sub-image; 6. Normalize the fused result to the interval [0, 1]. Normalization is to eliminate the differences in complexity values ​​between different sub-images to make the results more comparable. The normalization formula can be selected according to the actual situation, such as linear normalization, logarithmic normalization, etc.

[0034] The calculation of the complexity index of each image block is completed through the following steps 1-6. When the complexity index corrects the initial weight of each eroded area, the correction formula can be expressed as follows: ; in: , ; Where, Represents the first i The initial weight of the image block after correction, Represents the first i The initial weight of the image block, represents the correction factor, Represents the first i The complexity index of the image block, represents the mean of the complexity index of all image blocks in the reconstructed image, represents the standard deviation of the complexity index, Indicates the number of image patches in the reconstructed image.

[0035] S123, according to the updated weights of the corrosion areas of each image block and the actual corrosion conditions of each image block, the corrosion index of the reconstructed image is obtained, and based on the preset range of the corrosion index of different corrosion degrees, the corrosion degree of the reconstructed image is re-divided.

[0036] Optionally, the corrosion index of the reconstructed image is specifically: ; Where, represents the erosion index of the reconstructed image, Represents the first i The initial weight of the image block after correction, Represents the first i The corrosion degree of each image block is defined as follows: the corrosion degree is defined as follows: mild corrosion, moderate corrosion, and severe corrosion, with values ​​of 1, 2, and 3, respectively. Represents the first i The initial weight of the image block, Indicates the number of image patches in the reconstructed image.

[0037] Specifically, after the initial weights are corrected and updated, the corrosion index of the reconstructed image can be calculated using the corrected initial weights of each image block. Here, the preset range of corrosion indices for different corrosion degrees can be set according to the above content, such as the above-mentioned medium corrosion degree is light corrosion, moderate corrosion and severe corrosion; when the corrosion index of the reconstructed image is less than 0.8, the corrosion degree of the reconstructed image is reclassified as light corrosion; when the corrosion index of the reconstructed image is between 0.8-1.2, the corrosion degree of the reconstructed image is reclassified as moderate corrosion; when the corrosion index of the reconstructed image exceeds 1.2, the corrosion degree of the reconstructed image is reclassified as severe corrosion.

[0038] S2, for each grayscale image, divide the grayscale image into multiple sub-images, and redistribute the grayscale value of each pixel in each sub-image to obtain a first grayscale image corresponding to each sub-image.

[0039] Optionally, the grayscale value of each pixel in the first grayscale image is expressed as: ; Where, Represents the first grayscale image k Medium pixel The gray value of Represents a sub-image k Medium pixel The gray value of Represents a sub-image k The middle pixel isi the number of pixels, representing the total number of pixels in the sub-image k .

[0040] Wherein, the image is segmented and then gray mapping can effectively reduce the blocking effect and improve the local detail contrast of the image.

[0041] S3, the first gray map is spliced by bilinear interpolation to obtain a second gray map with the same size as the gray image, and the gray value of each pixel point in the second gray map is adjusted by the cumulative distribution function to obtain a third gray map corresponding to the second gray map.

[0042] Wherein, the use of bilinear interpolation when each sub-image is recombined can effectively avoid the blocking effect caused by inconsistent contrast between different sub-blocks due to the original adaptive histogram equalization.

[0043] Optionally, the gray value of each pixel point in the second gray map is represented as: ; In the above formula, represents the gray value of the pixel point in the second gray map, respectively represent the normalized distance of the pixel point from its nearest neighbor in the horizontal direction and the vertical direction, respectively represent the gray values of the four nearest neighbor points around the pixel point .

[0044] Further, the cumulative distribution function is used to remap the gray value of the image, which is the process of histogram equalization. Each calculated gray value is mapped to a new gray level range, so that the originally concentrated gray values in the image are uniformly distributed in the new range, thereby improving the contrast of the image. The cumulative distribution function can adjust the gray value distribution of the image and enhance the contrast of the image. The function formula can be represented as: ; In the formula, represents the proportion of pixel points with a gray value not exceeding x to the total number of pixel points, represents the number of pixel points with a gray value of i , and represents the total number of pixel points.

[0045] S4, the gray value of each pixel point in the third gray map is nonlinearly transformed, and the gray value after nonlinear transformation is used for gray mapping to obtain a target gray map, and a training sample is established through the target gray map.

[0046] wherein the principle formula when performing the nonlinear transformation can be expressed as: , in the formula Two change parameters are used to control the overall brightness of the image, which is selected according to actual use; therefore, the gray value of each pixel point in the above-mentioned target gray scale diagram is expressed as: wherein: , in the formula, represents the original gray value x , the gray value in the target gray scale diagram after the gray mapping, respectively represent the starting value and the ending value of the gray value in the target gray scale diagram, represents a constant factor in the nonlinear transformation, represents the proportion of the pixel points whose gray value does not exceed x , represents a nonlinear factor in the nonlinear transformation, represents the number of pixel points whose gray value is i , represents the total number of pixel points, represents the upper limit of the gray value.

[0047] wherein, respectively represent the starting value and the ending value of the gray value in the target gray scale diagram, that is, the minimum value and the maximum value, which are generally 0 and 255, and of course can be adjusted according to actual needs; the cumulative distribution function combined with the nonlinear transformation can enhance the contrast, maintain the details, and avoid the loss of details caused by the traditional histogram equalization.

[0048] S5, training the preset initial model by using the training sample until the initial model meets a preset training end condition, determining the initial model meeting the training end condition as a detection model, and processing the collected image of the to-be-detected component by using the detection model to obtain the corrosion detection result of the to-be-detected region.

[0049] wherein, since the training sample is a gray scale image, the collected image also needs to be converted into a gray scale image when being processed by the detection model; of course, each gray scale image in the above-mentioned training sample can also be converted into an rgb image, so that the collected image does not need to be processed in gray scale; and the training end condition can be the number of iterations or the loss function not exceeding a threshold value.

[0050] ​​Specifically, the initial model described above can be a model of an EfficientNet network structure. The EfficientNet-B0 network is composed of basic units such as a depth separable convolution, a Squeeze-and-Excitation (SE) network, a Swish activation function, batch normalization, and a pooling layer. The algorithm adjusts the depth, width, and resolution at different levels of the network through a compound scaling strategy to achieve lightweight and efficient overall model. The depth separable convolution effectively decomposes the standard convolution into a depth convolution and a point-wise convolution, reducing the number of parameters and computational load. In addition, a global average pooling method is used to reduce the dimension of the feature map to obtain the final output, as shown in Figure 4 Figure 4 The EfficientNet-B0 network structure is known from Figure 4 The baseline network of the EfficientNet network structure is divided into 9 parts in total. The first part is a normal convolution layer with a convolution kernel size of 3x3 and a stride of 2. The second to eighth parts are all repeated stacking of Mobile Inverted Bottleneck Convolution (MBConv). The ninth part is composed of a 1x1 normal convolution layer, an average pooling layer, and a fully connected layer.

[0051] Embodiment 2: The application provides a high-speed train body equipment cabin corrosion detection system based on deep learning, which is applied to the high-speed train body equipment cabin corrosion detection method based on deep learning in Embodiment 1, as shown in Figure 2 The system comprises: A first module is configured to obtain sample images of different corrosion degrees of multiple types of components, and obtain gray scale images of the sample images after gray scale processing; A second module is configured to divide each gray scale image into multiple sub-images, and reassign the gray scale values of each pixel point in each sub-image to obtain a first gray scale image corresponding to each sub-image; A third module is configured to splice the first gray scale images by a bilinear interpolation method to obtain a second gray scale image with the same size as the gray scale image, and reassign the gray scale values of each pixel point in the second gray scale image by a cumulative distribution function to obtain a third gray scale image corresponding to the second gray scale image; A fourth module is configured to perform nonlinear transformation on the gray scale values of each pixel point in the third gray scale image, perform gray scale mapping by using the nonlinear transformed gray scale values to obtain a target gray scale image, and establish a training sample by using the target gray scale image; ​The fifth module is configured to train the preset initial model by using the training samples until the initial model meets a preset training end condition, determine the initial model meeting the training end condition as a detection model, and process the collected image of the component to be detected by using the detection model to obtain the corrosion detection result of the detection area.

[0052] Embodiment 3: The embodiment of the present application provides an electronic device, as shown in the figure, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of embodiment 1 when executing the computer program. Figure 3

[0053] Embodiment 4: The embodiment of the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions make the computer execute the method of embodiment 1.

[0054] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0055] The present application is described with reference to flowcharts and / or block diagrams according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device implemented in the flowcharts and / or block diagrams. Figure 1 The function specified in one flow or multiple flows and / or blocks Figure 1 The function specified in one flow or multiple flows and / or blocks

[0056] These computer program instructions can also be stored in a computer readable storage medium capable of guiding the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The function specified in one flow or multiple flows and / or blocks Figure 1 The function specified in one flow or multiple flows and / or blocks

[0057] ​These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operational steps are performed on the computer or other programmable data processing device to generate a computer implemented process, so that the instructions executed on the computer or other programmable data processing device provide a process for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or the functions specified in the block Figure 1 one block or multiple blocks.

[0058] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned facts and methods can be completed by programs instructing relevant hardware, and the programs involved or the programs mentioned can be stored in a computer-readable storage medium. When the program is executed, the following steps are included: at this time, the corresponding method steps are derived, and the storage medium can be ROM / RAM, a magnetic disc, an optical disc, etc.

[0059] The above specific embodiments further illustrate the purposes, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A deep learning-based corrosion detection method for EMU vehicle body equipment compartment, characterized in that: The specific steps include: Acquire sample images of components of multiple categories with different degrees of corrosion, and obtain grayscale images of each sample image after grayscale processing; For each of the grayscale images, the grayscale image is divided into a plurality of sub-images, and the grayscale value of each pixel in each sub-image is reallocated to obtain a first grayscale image corresponding to each of the sub-images; splicing the first grayscale images by bilinear interpolation to obtain a second grayscale image of the same size as the grayscale image, and re-adjusting the grayscale values ​​of each pixel in the second grayscale image by using a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image; Performing nonlinear transformation on the grayscale values ​​of each pixel in the third grayscale image, performing grayscale mapping using the grayscale values ​​after the nonlinear transformation to obtain a target grayscale image, and establishing a training sample based on the target grayscale image; The preset initial model is trained using the training samples until the initial model meets the preset training end conditions, the initial model that meets the training end conditions is determined as the detection model, and the collected images of the component to be inspected are processed using the detection model to obtain the corrosion detection results of the area to be inspected.

2. The deep learning-based corrosion detection method for EMU vehicle body equipment compartment according to claim 1 is characterized in that: Before grayscale processing is performed on each of the sample images, the method further includes: For a plurality of sample images of the same component with different corrosion degrees, the plurality of sample images are respectively divided into image segments; A reconstructed image containing the complete structural image of the component is formed by randomly combining the image blocks after image division, and the reconstructed image is re-divided according to the degree of corrosion. A new sample image is formed by the re-divided reconstructed image. The grayscale image includes the grayscale-processed sample image and the grayscale-processed new sample image.

3. The deep learning-based corrosion detection method for EMU vehicle body equipment compartment according to claim 2 is characterized in that: The reconstructed image is reclassified into different levels of corrosion, specifically: Dividing the reconstructed image into a plurality of erosion regions and assigning an initial weight to each erosion region, wherein the erosion region includes at least a core region, a transition region, and an edge region; Calculating the complexity index of each image block in the reconstructed image, and modifying the initial weight of each eroded area based on each complexity index; According to the updated weights of the corrosion areas of each image block and the actual corrosion conditions of each image block, the corrosion index of the reconstructed image is obtained, and based on the preset range of corrosion indices of different corrosion degrees, the corrosion degree of the reconstructed image is re-divided.

4. The deep learning-based corrosion detection method for EMU vehicle body equipment compartment according to claim 3 is characterized in that: The initial weights of each corrosion area are modified as follows: ; in: , ; Where, Represents the reconstructed image i The initial weight of the image block after correction, Represents the first i The initial weight of the image block, represents the correction factor, Represents the first i The complexity index of the image block, represents the mean of the complexity index of all image blocks in the reconstructed image, represents the standard deviation of the complexity index, Indicates the number of image patches in the reconstructed image.

5. The method for detecting corrosion in the EMU vehicle body equipment compartment based on deep learning according to claim 3 is characterized in that: The corrosion index of the reconstructed image is specifically: ; Where, represents the erosion index of the reconstructed image, Represents the first i The initial weight of the image block after correction, Represents the first i The degree of corrosion of the image block, Represents the first i The initial weight of the image block, Indicates the number of image patches in the reconstructed image.

6. The EMU vehicle body equipment compartment corrosion detection method based on deep learning according to claim 1 is characterized in that: The grayscale value of each pixel in the first grayscale image is expressed as: ; The grayscale value of each pixel in the second grayscale image is expressed as: ; In the above formula, Represents the first grayscale image k Medium pixel The gray value of Represents a sub-image k Medium pixel The gray value of Represents a sub-image k The middle pixel is i The number of pixels, Represents a sub-image k The total number of pixels in Represents the pixel point in the second grayscale image The gray value of Represents pixel points The normalized distance from its nearest neighbor in the horizontal and vertical directions, Represents pixel points Grayscale values ​​of the four nearest neighboring points.

7. The EMU vehicle body equipment compartment corrosion detection method based on deep learning according to claim 1 is characterized in that: The grayscale value of each pixel in the target grayscale image is expressed as: ; in: ; Where, Indicates the original grayscale value is x The grayscale value in the target grayscale image after grayscale mapping, Respectively represent the starting value and ending value of the grayscale value in the target grayscale image, represents the constant factor in the nonlinear transformation, Indicates that the grayscale value does not exceed x The ratio of pixels to the total pixels, represents the nonlinear factor in the nonlinear transformation, Indicates the gray value is i The number of pixels, Indicates the total number of pixels. Indicates the upper limit of the grayscale value.

8. A deep learning-based EMU vehicle body equipment compartment corrosion detection system, applied to the deep learning-based EMU vehicle body equipment compartment corrosion detection method according to any one of claims 1 to 7, characterized in that: include: The first module is used to obtain sample images of multiple categories of components with different corrosion degrees, and obtain grayscale images of each of the sample images after grayscale processing; The second module is configured to divide each grayscale image into a plurality of sub-images, and reallocate the grayscale value of each pixel in each sub-image to obtain a first grayscale image corresponding to each sub-image; A third module is configured to stitch the first grayscale images together by bilinear interpolation to obtain a second grayscale image of the same size as the grayscale image, and to readjust the grayscale values ​​of each pixel in the second grayscale image by a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image; A fourth module is configured to perform a nonlinear transformation on the grayscale values ​​of each pixel in the third grayscale image, perform grayscale mapping using the grayscale values ​​after the nonlinear transformation to obtain a target grayscale image, and establish a training sample using the target grayscale image; The fifth module is used to train the preset initial model using the training samples until the initial model meets the preset training end conditions, determine the initial model that meets the training end conditions as the detection model, and use the detection model to process the collected images of the components to be inspected to obtain the corrosion detection results of the area to be inspected.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for detecting corrosion in the EMU body equipment compartment based on deep learning as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions, which enable a computer to execute the EMU car body equipment compartment corrosion detection method based on deep learning as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Deep learning-based small hardware defect detection method, system and equipment

    CN113888461A

  • Steel material corrosion degree automatic detection method based on deep learning

    CN117197057A

  • Ceramic substrate surface defect detection method and system based on deep learning

    CN118429327A

  • Method and system for realizing panel defect detection based on image gray scale equalization

    CN119741292A

  • Image processing method and device, equipment, medium and program product

    CN120201134A