High-speed train body equipment cabin corrosion detection method and system based on deep learning

By performing grayscale processing and nonlinear transformation on images acquired for corrosion detection in the equipment compartment of high-speed trains, training samples were established, and a deep learning model was used for corrosion detection. This solved the problems of manual reliance and insufficient image acquisition in existing technologies, and achieved more efficient corrosion detection.

CN120807513BActive Publication Date: 2025-11-18SOUTHWEST JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

By acquiring sample images of different corrosion levels of various types of components, performing grayscale processing, image segmentation, stitching, and nonlinear transformation, training samples are established, and a deep learning model is used for corrosion detection.

Benefits of technology

It improves the accuracy and adaptability of the detection model, reduces the loss of local details and grayscale jumps in image processing, and enhances the effect of corrosion detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807513B_ABST
    Figure CN120807513B_ABST
Patent Text Reader

Abstract

The application discloses a high-speed train body equipment cabin corrosion detection method and system based on deep learning, and relates to the technical field of corrosion detection. The method comprises the following steps: acquiring sample images of different corrosion degrees of multiple categories of components to obtain a gray image of the sample images; dividing the gray image into multiple sub-images to obtain a first gray image in which the gray values of each pixel point in each sub-image are redistributed; splicing each first gray image to obtain a second gray image, and then adjusting the gray values by using a cumulative distribution function to obtain a third gray image; performing nonlinear transformation on the gray values of the third gray image to obtain a target gray image, and establishing a training sample; training an initial model by using the training sample until the initial model meets a preset training end condition; determining the initial model that meets the training end condition as a detection model; and processing a collected image of a component to be detected by using the detection model to finally obtain a corrosion detection result of a detection area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of corrosion detection technology, and more specifically, to a method and system for corrosion detection of equipment compartments in high-speed train bodies based on deep learning. Background Technology

[0002] The main function of the equipment compartment of the Harmony CRH380 EMU is to protect the equipment under the train and optimize the train's aerodynamic performance. Its main component, the skirt, is welded from large hollow aluminum alloy profiles, while the bottom plate is welded from aluminum plates and a honeycomb composite structure. The skirt, bottom plate, end plates, and equipment compartment frame are combined and connected to form the overall modular structure of the train. According to design requirements, the planned service life of the Harmony CRH380 EMU equipment compartment components is 30 years, the same as the lifespan of the entire train. Since the equipment compartment components are structural safety components, their lifespan directly affects the lifespan of the entire train. Therefore, after a long period of service on the line, it is necessary to inspect and evaluate the condition of the equipment compartment of the Harmony CRH380 EMU in service to ensure the safe operation of the train throughout its lifespan.

[0003] Current corrosion detection methods involve first photographing the area to be inspected, then observing and analyzing it using equipment such as a stereomicroscope to determine the corrosion status. This method relies heavily on human experience, requiring observers to have extensive practical skills, and also demands high-quality samples and equipment. Deep learning-based detection methods exist, where a network model continuously identifies and learns corrosion features, enabling it to detect corrosion in images before being deployed. However, this method places high demands on training the network model, requiring not only clear images but also a large number of training samples. Since the equipment compartment contains numerous components, including many small parts such as screws and rivets, on-site photographs are insufficient for training. Therefore, designing a deep learning-based corrosion detection method for the equipment compartment of a high-speed train is a problem we currently need to solve. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for corrosion detection in the equipment compartment of a high-speed train body based on deep learning, so as to solve the problems existing in the background art.

[0005] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0006] Firstly, this application provides a deep learning-based method for corrosion detection in the equipment compartment of a high-speed train body, including the following specific steps:

[0007] Acquire sample images of various types of components with different degrees of corrosion, and obtain grayscale images of each sample image after grayscale processing;

[0008] For each grayscale image, the grayscale image is divided into multiple sub-images, and the grayscale value of each pixel in each sub-image is redistributed to obtain the first grayscale image corresponding to each sub-image.

[0009] The first grayscale images are stitched together using bilinear interpolation to obtain a second grayscale image of the same size as the grayscale image. The grayscale values ​​of each pixel in the second grayscale image are then readjusted using the cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image.

[0010] The gray values ​​of each pixel in the third grayscale image are subjected to nonlinear transformation. The gray values ​​after nonlinear transformation are used for grayscale mapping to obtain the target grayscale image. Training samples are then established using the target grayscale image.

[0011] The initial model is trained using training samples until it meets the preset training termination condition. The initial model that meets the training termination condition is determined as the detection model. The acquired image of the part to be detected is then processed using the detection model to obtain the corrosion detection result of the area to be detected.

[0012] Based on the above technical solution, the present invention can be further improved as follows.

[0013] Furthermore, before performing grayscale processing on the aforementioned sample images, the method further includes:

[0014] For multiple sample images of the same component with different degrees of corrosion, the multiple sample images are divided into images separately;

[0015] The image blocks after image segmentation are randomly combined to form a reconstructed image containing the complete structural image of the component. The degree of erosion is re-divided into the reconstructed image. A new sample image is formed by the re-divided reconstructed image. The grayscale image includes the grayscale processed sample image and the new grayscale processed sample image.

[0016] Furthermore, the above-mentioned re-classification of the degree of erosion in the reconstructed image is as follows:

[0017] The reconstructed image is divided into multiple erosion regions, and each erosion region is given an initial weight. The erosion region includes at least a core region, a transition region, and an edge region.

[0018] Calculate the complexity index of each image patch in the reconstructed image, and adjust the initial weights of each eroded region based on the complexity index.

[0019] Based on the updated weights of the erosion regions where each image block is located, and the actual erosion status of each image block, the erosion index of the reconstructed image is obtained. Based on the preset range of the erosion index for different degrees of erosion, the degree of erosion of the reconstructed image is reclassified.

[0020] Furthermore, the initial weights for each corrosion region are adjusted as follows:

[0021] ;

[0022] in:

[0023] , ;

[0024] In the formula, Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i Initial weights for each image patch, This represents the correction factor. Indicates the first digit in the reconstructed image i The complexity index of an image patch This represents the mean of the complexity exponents of all image patches in the reconstructed image. The standard deviation represents the complexity index. This indicates the number of image patches in the reconstructed image.

[0025] Furthermore, the erosion index of the reconstructed image is specifically as follows:

[0026] ;

[0027] In the formula, The erosion index represents the erosion index of the reconstructed image. Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i The degree of erosion of each image patch, Indicates the first digit in the reconstructed image i Initial weights for each image patch, This indicates the number of image patches in the reconstructed image.

[0028] Furthermore, the grayscale value of each pixel in the first grayscale image is represented as follows:

[0029] ;

[0030] The grayscale value of each pixel in the second grayscale image is represented as follows:

[0031] ;

[0032] In the above formula, Represents the first grayscale image k medium pixel grayscale value, Sub-image k medium pixel grayscale value, Sub-image k Medium pixels i The number of pixels, Sub-image k The total number of pixels in the image. Represents the pixels in the second grayscale image grayscale value, Representing pixels The normalized distances from its nearest neighbor in both the horizontal and vertical directions. Representing pixels The gray values ​​of the four nearest neighbors.

[0033] Furthermore, the grayscale value of each pixel in the above target grayscale image is represented as follows:

[0034] ;

[0035] in:

[0036] ;

[0037] In the formula, Indicates the original grayscale value x The grayscale value in the target grayscale image after grayscale mapping. These represent the starting and ending values ​​of the grayscale value in the target grayscale image, respectively. This represents the constant factor in the nonlinear transformation. Indicates that the grayscale value does not exceed x The proportion of pixels to the total number of pixels. This represents the nonlinear factor in a nonlinear transformation. Indicates grayscale value i The number of pixels, This represents the total number of pixels. This indicates the upper limit of the grayscale value.

[0038] Secondly, this application provides a deep learning-based corrosion detection system for the equipment compartment of a high-speed train body, applied to the deep learning-based corrosion detection method for the equipment compartment of a high-speed train body according to any one of the first aspects, including:

[0039] The first module is used to acquire sample images of different corrosion levels of various types of components, and to obtain grayscale images of each sample image after grayscale processing.

[0040] The second module is used to divide each grayscale image into multiple sub-images and redistribute the grayscale value of each pixel in each sub-image to obtain the first grayscale image corresponding to each sub-image.

[0041] The third module is used to stitch together the first grayscale images using 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 using a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image.

[0042] The fourth module is used to perform non-linear transformation on the gray values ​​of each pixel in the third grayscale image, and then perform grayscale mapping using the gray values ​​after non-linear transformation to obtain the target grayscale image, and to establish training samples using the target grayscale image.

[0043] The fifth module is used to train a preset initial model using training samples until the initial model meets the preset training termination condition. The initial model that meets the training termination condition is determined as the detection model, and the acquired image of the part to be detected is processed using the detection model to obtain the corrosion detection result of the area to be detected.

[0044] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of any one of the first aspects.

[0045] Fourthly, this application provides a non-transitory computer-readable storage medium that stores computer instructions that cause a computer to perform any of the methods in the first aspect.

[0046] Compared with the prior art, the present invention has at least the following beneficial effects:

[0047] In this application, firstly, a pre-defined initial model is trained using sample images of multiple categories of components with different degrees of corrosion. Before model training, the sample images need to undergo an equalization process. This process includes grayscale processing, image segmentation, image stitching, grayscale adjustment, nonlinear transformation of grayscale values, and grayscale mapping, thereby obtaining the final target grayscale image. Secondly, the initial model is trained using training samples established from the target grayscale image until it meets a pre-defined training termination condition. The initial model that meets the training termination condition is then identified as the detection model. Finally, the detection model is used to process the acquired images of the components to be detected, ultimately obtaining the corrosion detection results for the region to be detected. By combining adaptive histogram equalization with local segmentation, nonlinear transformation and linear interpolation are used to adjust and distribute grayscale values ​​in different segmented regions. This not only avoids the loss of local details caused by traditional histogram equalization when processing the overall image but also effectively reduces grayscale jumps that occur when sub-blocks are recombined.

[0048] In this application, multiple sample images of the same component with different degrees of corrosion are divided, and the image blocks after image division are randomly combined to form a reconstructed image containing the complete structural image of the component. Since the reconstructed image is composed of multiple images with different degrees of corrosion, the initial model is trained using the reconstructed image with the new degree of corrosion. On the one hand, this can enrich the training samples, and on the other hand, it can improve the detection capability of the initial model. Attached Figure Description

[0049] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0050] Figure 1 This is a flowchart of the detection method in an embodiment of the present invention;

[0051] Figure 2 This is a schematic diagram of the connection of the detection system in an embodiment of the present invention;

[0052] Figure 3 This is a schematic diagram of the connection of an electronic device in an embodiment of the present invention.

[0053] Figure 4 This is a diagram illustrating the EfficientNet-B0 network structure in an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0056] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0057] In the description of the embodiments of the present invention, "multiple" means at least two.

[0058] Example 1: Due to the large number of components inside the equipment compartment, including many small parts such as screws and rivets, the images captured on-site are insufficient for training purposes. This example provides a deep learning-based corrosion detection method for the equipment compartment of a high-speed train body. Figure 1 As shown, the specific steps include the following:

[0059] S1: Obtain sample images of different corrosion levels in multiple types of components, and obtain grayscale images of each sample image after grayscale processing.

[0060] Among them, multi-category components can include screws, rivets, etc., and the degree of corrosion can be divided into three categories: light corrosion, moderate corrosion, and severe corrosion.

[0061] Optionally, before performing grayscale processing on the above sample images, the method may further include:

[0062] S11. For multiple sample images of the same component with different degrees of corrosion, the multiple sample images are divided into images respectively.

[0063] By stitching together sample images of the same component with different degrees of corrosion to form a reconstructed image, and using the reconstructed image to train the initial model, the model can learn deeper corrosion features, which can effectively improve the model's detection capability.

[0064] S12, using the random combination of the image blocks after image division to form a reconstructed image containing the complete structural image of the component, the degree of erosion of the reconstructed image is re-divided, and a new sample image is formed by the re-divided reconstructed image. The grayscale image includes the sample image after grayscale processing and the new sample image after grayscale processing.

[0065] Optionally, the above-mentioned re-classification of the degree of erosion of the reconstructed image is as follows:

[0066] S121, the reconstructed image is divided into multiple erosion regions, and each erosion region is given an initial weight. The erosion region includes at least a core region, a transition region, and an edge region.

[0067] It should be noted that the division of the reconstructed image can be based on stitching. For example, the reconstructed image is composed of three image blocks, which can be horizontal, vertical, or circular. Of course, they should be the same for the same part. In order to make the previous and subsequent operations smoother, when dividing multiple sample images of the same part with different degrees of corrosion, they are divided according to the corrosion region. That is, each sample image is divided into three image blocks: core region, transition region, and edge region. This also facilitates the operation when stitching.

[0068] Furthermore, the initial weights for each eroded region can be given as follows: 0.5 for the core region, 0.3 for the transition region, and 0.2 for the edge region; then the three image blocks that constitute the reconstructed image are also given weights of 0.5, 0.3, and 0.2 according to their positions.

[0069] S122, calculate the complexity index of each image patch in the reconstructed image, and correct the initial weight of each eroded region based on each complexity index.

[0070] Specifically, the complexity index for each image patch is calculated based on SATD (Sum of Absolute Transformed Differences) and macroblock differences, thereby yielding a complexity index reflecting the texture complexity of the image. This index can be:

[0071] 1. Image blocks can be divided into macroblocks of size 16×16, which serve as the basic unit for subsequent DCT transformation and complexity calculation;

[0072] 2. Perform Discrete Cosine Transform (DCT) on each macroblock. DCT is a commonly used image transformation method that can convert an image from the spatial domain to the frequency domain, which facilitates subsequent processing.

[0073] 3. Calculate SATD. SATD (Sum of Absolute Transformed Differences) represents the sum of the absolute values ​​of the differences between adjacent macroblocks after DCT transformation. For each macroblock, calculate the absolute values ​​of the differences between it and its adjacent macroblocks after DCT transformation, and sum these differences to obtain the SATD value of the macroblock.

[0074] 4. Calculate the grayscale variance within each macroblock as a measure of macroblock difference; grayscale variance reflects the degree of dispersion of pixel values ​​within a macroblock, i.e., the complexity of the texture.

[0075] 5. Linearly fuse the SATD value and macroblock difference; this can be achieved through weighted summation, etc. 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 in order to more comprehensively reflect the texture complexity of the sub-image.

[0076] 6. Normalize the fused result to the [0, 1] interval. Normalization is to eliminate the difference in complexity values ​​between different sub-images and make the results more comparable. The normalization formula can be selected according to the actual situation, such as linear normalization, logarithmic normalization, etc.

[0077] The complexity index of each image patch is calculated through the following steps 1-6. When correcting the initial weights of each eroded region based on the complexity index, the correction formula can be expressed as follows: Specifically:

[0078] ;

[0079] in:

[0080] , ;

[0081] In the formula, Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i Initial weights for each image patch, This represents the correction factor. Indicates the first digit in the reconstructed image i The complexity index of an image patch This represents the mean of the complexity exponents of all image patches in the reconstructed image. The standard deviation represents the complexity index. This indicates the number of image patches in the reconstructed image.

[0082] S123. Based on the updated weights of the erosion regions where each image block is located and the actual erosion status of each image block, the erosion index of the reconstructed image is obtained, and the erosion degree of the reconstructed image is reclassified based on the preset range of the erosion index for different erosion degrees.

[0083] Optionally, the erosion index of the reconstructed image is as follows:

[0084] ;

[0085] In the formula, The erosion index represents the erosion index of the reconstructed image. Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i The degree of erosion of each image block is defined according to the three degrees of erosion mentioned above, namely, light erosion, medium erosion, and heavy erosion, which correspond to values ​​of 1, 2, and 3 respectively. Indicates the first digit in the reconstructed image i Initial weights for each image patch, This indicates the number of image patches in the reconstructed image.

[0086] Specifically, after correcting and updating the initial weights, the erosion index of the reconstructed image can be calculated using the corrected initial weights of each image block. The preset range of the erosion index for different degrees of erosion can be set according to the above content, such as mild erosion, moderate erosion, and severe erosion. When the erosion index of the reconstructed image is less than 0.8, the erosion degree of the reconstructed image is reclassified as mild erosion; when the erosion index of the reconstructed image is between 0.8 and 1.2, the erosion degree of the reconstructed image is reclassified as moderate erosion; and when the erosion index of the reconstructed image exceeds 1.2, the erosion degree of the reconstructed image is reclassified as severe erosion.

[0087] 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 the first grayscale image corresponding to each sub-image.

[0088] Optionally, the grayscale value of each pixel in the first grayscale image above is represented as follows:

[0089] ;

[0090] In the formula, Represents the first grayscale image k medium pixel grayscale value, Sub-image k medium pixel grayscale value, Sub-image k Medium pixels i The number of pixels, Sub-image k The total number of pixels in the image.

[0091] Among these methods, segmenting the image and then performing grayscale mapping can effectively reduce block artifacts and improve the contrast of local details in the image.

[0092] S3. The first grayscale images are stitched together using bilinear interpolation to obtain a second grayscale image of the same size as the grayscale image. The grayscale values ​​of each pixel in the second grayscale image are then readjusted using the cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image.

[0093] In this process, bilinear interpolation is used when each sub-image is recombined, which can effectively avoid the block effect caused by the original adaptive histogram equalization due to the inconsistency in contrast between different sub-blocks.

[0094] Optionally, the grayscale value of each pixel in the second grayscale image above is represented as follows:

[0095] ;

[0096] In the above formula, Represents the pixels in the second grayscale image grayscale value, Representing pixels The normalized distances from its nearest neighbor in both the horizontal and vertical directions. Representing pixels The gray values ​​of the four nearest neighbors.

[0097] Furthermore, using the cumulative distribution function to remap the gray values ​​of an image is a process of histogram equalization, which maps each calculated gray value to a new gray level range, making the gray values ​​that were originally concentrated in certain ranges evenly distributed in the new range, thereby improving the image contrast. The cumulative distribution function can readjust the gray value distribution of an image and enhance its contrast; its function formula can be expressed as:

[0098] ;

[0099] In the formula, Indicates that the grayscale value does not exceed x The proportion of pixels to the total number of pixels. Indicates grayscale value i The number of pixels, This represents the total number of pixels.

[0100] S4. Perform a non-linear transformation on the gray values ​​of each pixel in the third grayscale image, and use the gray values ​​after the non-linear transformation to perform grayscale mapping to obtain the target grayscale image, and establish training samples through the target grayscale image.

[0101] The principle formula for performing nonlinear transformations can be expressed as follows: In this formula Two variable parameters are used to control the overall brightness of the image, and their selection depends on the specific circumstances in actual use; therefore, the grayscale values ​​of each pixel in the target grayscale image above are represented as follows:

[0102] ;

[0103] in:

[0104] ;

[0105] In the formula, Indicates the original grayscale value x The grayscale value in the target grayscale image after grayscale mapping. These represent the starting and ending values ​​of the grayscale value in the target grayscale image, respectively. This represents the constant factor in the nonlinear transformation. Indicates that the grayscale value does not exceed x The proportion of pixels to the total number of pixels. This represents the nonlinear factor in a nonlinear transformation. Indicates grayscale value i The number of pixels, This represents the total number of pixels. This indicates the upper limit of the grayscale value.

[0106] in, These represent the starting and ending values ​​of the grayscale value in the target grayscale image, which can be understood as the minimum and maximum values, typically 0 and 255, but can be adjusted according to actual conditions. The cumulative distribution function combined with nonlinear transformation can enhance contrast, preserve details, and avoid the loss of details caused by traditional histogram equalization.

[0107] S5. The initial model is trained using training samples until it meets the preset training termination condition. The initial model that meets the training termination condition is determined as the detection model. The acquired image of the part to be detected is processed using the detection model to obtain the corrosion detection result of the area to be detected.

[0108] Since the training samples are grayscale images, the acquired images also need to be converted to grayscale images when processed by the detection model. Alternatively, each grayscale image in the training samples can be converted to an RGB image, thus avoiding the need for grayscale processing of the acquired images. The training termination condition can be reaching the required number of iterations or the loss function not exceeding a threshold.

[0109] Specifically, the initial model mentioned above can be a model of the EfficientNet network structure. The EfficientNet-B0 network consists of basic units such as depthwise separable convolutions, squeeze-and-excitation (SE) networks, Swish activation functions, batch normalization, and pooling layers. This algorithm uses a composite scaling strategy to uniformly adjust the depth, width, and resolution at different layers of the network to achieve a lightweight and efficient overall model. Depthwise separable convolutions effectively decompose standard convolutions into depthwise convolutions and pointwise convolutions, reducing the number of parameters and computational load. Furthermore, global average pooling is used to reduce the dimensionality of the feature maps, resulting in the final output, such as... Figure 4 As shown, Figure 4 The network architecture is EfficientNet-B0, consisting of... Figure 4 As can be seen, the baseline network of EfficientNet is divided into a total of 9 parts. The first part is a regular convolutional layer with a kernel size of 3×3 and a stride of 2. The second to eighth parts are repeated stacks of Mobile Inverted Bottleneck Convolution (MBConv). The ninth part consists of a 1×1 regular convolutional layer, an average pooling layer and a fully connected layer.

[0110] Example 2: This application provides a deep learning-based corrosion detection system for the equipment compartment of a high-speed train body, applied to the deep learning-based corrosion detection method for the equipment compartment of a high-speed train body in Example 1, such as... Figure 2 As shown, it includes:

[0111] The first module is used to acquire sample images of different corrosion levels of various types of components, and to obtain grayscale images of each sample image after grayscale processing.

[0112] The second module is used to divide each grayscale image into multiple sub-images and redistribute the grayscale value of each pixel in each sub-image to obtain the first grayscale image corresponding to each sub-image.

[0113] The third module is used to stitch together the first grayscale images using 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 using a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image.

[0114] The fourth module is used to perform non-linear transformation on the gray values ​​of each pixel in the third grayscale image, and then perform grayscale mapping using the gray values ​​after non-linear transformation to obtain the target grayscale image, and to establish training samples using the target grayscale image.

[0115] The fifth module is used to train a preset initial model using training samples until the initial model meets the preset training termination condition. The initial model that meets the training termination condition is determined as the detection model, and the acquired image of the part to be detected is processed using the detection model to obtain the corrosion detection result of the area to be detected.

[0116] Example 3: This application provides an electronic device, such as... Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method of Embodiment 1.

[0117] Example 4: This application provides a non-transitory computer-readable storage medium that stores computer instructions that cause a computer to execute the method of Example 1.

[0118] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0122] Those skilled in the art will understand that all or part of the steps in the above facts and methods can be implemented by a program instructing related hardware. The program or the program described therein can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: at this time, the corresponding method steps are introduced. The storage medium can be ROM / RAM, magnetic disk, optical disk, etc.

[0123] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A deep learning-based method for corrosion detection in the equipment compartment of a high-speed train body, characterized in that, The specific steps include the following: Acquire sample images of various types of components with different degrees of corrosion, and obtain grayscale images of each sample image after grayscale processing; For each grayscale image, the grayscale image is divided into multiple sub-images, and the grayscale value of each pixel in each sub-image is redistributed to obtain the first grayscale image corresponding to each sub-image; The first grayscale images are stitched together using bilinear interpolation to obtain a second grayscale image of the same size as the grayscale image. The grayscale values ​​of each pixel in the second grayscale image are then readjusted using a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image. The gray values ​​of each pixel in the third grayscale image are subjected to nonlinear transformation, and grayscale mapping is performed using the gray values ​​after nonlinear transformation to obtain the target grayscale image. Training samples are then established using the target grayscale image. The training samples are used to train the preset initial model until the initial model meets the preset training termination condition. The initial model that meets the training termination condition is determined as the detection model. The detection model is then used to process the acquired image of the component to be detected to obtain the corrosion detection result of the area to be detected. Before performing grayscale processing on each of the sample images, the method further includes: For multiple sample images of the same component with different degrees of corrosion, the multiple sample images are divided into images respectively; The image blocks after image segmentation are randomly combined to form a reconstructed image containing the complete structural image of the component. The degree of erosion is re-divided into the reconstructed image. A new sample image is formed by the re-divided reconstructed image. The grayscale image includes the grayscale processed sample image and the new grayscale processed sample image. The reconstructed image is then reclassified according to the degree of erosion, specifically as follows: The reconstructed image is divided into multiple erosion regions, and each erosion region is given an initial weight. The erosion regions include at least a core region, a transition region, and an edge region. Calculate the complexity index of each image patch in the reconstructed image, and correct the initial weight of each eroded region based on the complexity index. Based on the updated weights of the erosion regions where each image block is located, and the actual erosion status of each image block, the erosion index of the reconstructed image is obtained, and based on the preset range of the erosion index for different degrees of erosion, the degree of erosion of the reconstructed image is reclassified. The initial weights of each eroded region are adjusted as follows: ; in: , ; In the formula, Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i Initial weights for each image patch, This represents the correction factor. Indicates the first digit in the reconstructed image i The complexity index of an image patch This represents the mean of the complexity exponents of all image patches in the reconstructed image. The standard deviation represents the complexity index. Indicates the number of image patches in the reconstructed image; The erosion index of the reconstructed image is specifically: ; In the formula, The erosion index represents the erosion index of the reconstructed image. Indicates the first digit in the reconstructed image i Initial weights after correction of each image patch Indicates the first digit in the reconstructed image i The degree of erosion of each image patch, Indicates the first digit in the reconstructed image i Initial weights for each image patch, This indicates the number of image patches in the reconstructed image.

2. The method for corrosion detection of EMU car body equipment compartment based on deep learning according to claim 1, characterized in that, The grayscale value of each pixel in the first grayscale image is represented as follows: ; The grayscale values ​​of each pixel in the second grayscale image are represented as follows: ; In the above formula, Represents the first grayscale image k medium pixel grayscale value, Sub-image k medium pixel grayscale value, Sub-image k Medium pixels i The number of pixels, Sub-image k The total number of pixels in the image. Represents the pixels in the second grayscale image grayscale value, Representing pixels The normalized distances from its nearest neighbor in both the horizontal and vertical directions. Representing pixels The gray values ​​of the four nearest neighbors.

3. The method for corrosion detection of EMU car body equipment compartment based on deep learning according to claim 1, characterized in that, The grayscale value of each pixel in the target grayscale image is represented as follows: ; in: ; In the formula, Indicates the original grayscale value x The grayscale value in the target grayscale image after grayscale mapping. These represent the starting and ending values ​​of the grayscale value in the target grayscale image, respectively. This represents the constant factor in the nonlinear transformation. Indicates that the grayscale value does not exceed x The proportion of pixels to the total number of pixels. This represents the nonlinear factor in a nonlinear transformation. Indicates grayscale value i The number of pixels, This represents the total number of pixels. This indicates the upper limit of the grayscale value.

4. A deep learning-based corrosion detection system for the equipment compartment of a high-speed train body, applied to the deep learning-based corrosion detection method for the equipment compartment of a high-speed train body as described in any one of claims 1-3, characterized in that, include: The first module is used to acquire sample images of different corrosion levels of multiple types of components, and to obtain grayscale images of each sample image after grayscale processing. The second module is used to divide each 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. The third module is used to stitch together the first grayscale images using 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 using a cumulative distribution function to obtain a third grayscale image corresponding to the second grayscale image. The fourth module is used to perform nonlinear transformation on the gray values ​​of each pixel in the third grayscale image, perform grayscale mapping using the gray values ​​after nonlinear transformation to obtain the target grayscale image, and establish training samples using the target grayscale image. The fifth module is used to train a preset initial model using the training samples until the initial model meets a preset training termination condition. The initial model that meets the training termination condition is determined as the detection model, and the detection model is used to process the acquired image of the component to be detected to obtain the corrosion detection result of the area to be detected.

5. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the deep learning-based corrosion detection method for the equipment compartment of a high-speed train body as described in any one of claims 1-3.

6. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the deep learning-based corrosion detection method for the equipment compartment of a high-speed train body as described in any one of claims 1-3.

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