Grain size detection method and system based on wavelet analysis and neural network
Through the combination of wavelet analysis and convolutional neural network, the wavelet time-frequency feature map of ultrasonic echo data is generated, which solves the accuracy and efficiency problems of traditional ultrasonic detection methods in grain size detection, and realizes the high temperature and high pressure environment High-precision online detection.
Patent Information
- Application Number
- CN202210418988.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-04-20
AI Technical Summary
Traditional ultrasonic non-destructive testing methods are easily subjectively affected in metal grain size detection, with low accuracy and low detection efficiency, and are especially not suitable for online testing in complex environments with high temperature and high pressure.
Using a method based on wavelet analysis and convolutional neural network, the wavelet time-frequency feature map is generated by obtaining ultrasonic echo data of metal samples, and the convolutional neural network model is used to train these feature maps to achieve grain size. high-precision detection.
It improves the accuracy and efficiency of grain size detection, can achieve accurate online inspection in high temperature and high pressure environment, and is suitable for the quality control of metal material molded parts in industrial production.
Smart Images

Figure CN114881938B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of nondestructive testing of metal structures, and in particular to a grain size testing method and system based on wavelet analysis and neural network. Background Art
[0002] The grain size (grain size) in polycrystalline metal materials is an important parameter for characterizing material properties, and has a significant impact on most mechanical properties such as tensile strength, yield stress, flow stress, and hardness. Conventional grain size characterization methods include metallographic observation and electron backscatter diffraction analysis, which have the advantages of intuitive test results and high accuracy. However, the observation process requires the destruction of the specimen, and the preparation of the destroyed specimen for observation is time-consuming; and the microscopic image can only be obtained at the selected position of the specimen and at room temperature, which limits its industrial application in online detection of complex environments such as high temperature and high pressure. Therefore, it is mostly used for measurement and analysis in laboratory environments.
[0003] As a non-destructive testing technology, ultrasonic testing technology can realize long-distance, non-contact, non-destructive and rapid detection of material grain size in high temperature and complex environment. It can not only be used for offline quality evaluation of parts, but also for online monitoring of material organization during manufacturing and processing. It has feasibility and good development prospects. The main grain size evaluation methods based on ultrasonic technology include sound velocity method, attenuation method, backscattering method and spectrum characteristic analysis method. Among them, the detection sensitivity of the sound velocity method is low; the backscattering method is limited by the single backscattering assumption, and the measurement accuracy of coarse-grained materials is low; the attenuation method and spectrum characteristic analysis method are not suitable for coarse-grained or strongly scattering materials, and the relationship model between ultrasonic attenuation and spectrum center frequency offset and grain size is affected by the scattering mechanism. The above traditional detection methods are affected by artificial prior knowledge, scattering mechanism and detection environment, which can easily lead to problems such as low detection accuracy and low detection efficiency. Summary of the invention
[0004] In order to solve the problems existing in the traditional ultrasonic nondestructive evaluation method of metal grain size, such as susceptibility to subjective influence, low accuracy, low detection efficiency, etc., the present application provides a grain size detection method and system based on wavelet analysis and neural network.
[0005] In a first aspect, the present application provides a method for detecting grain size, the steps comprising:
[0006] Obtaining a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph;
[0007] According to the wavelet time-frequency feature graph in the wavelet time-frequency feature graph set, the established convolutional neural network model is trained to obtain an optimized convolutional neural network model;
[0008] The wavelet time-frequency characteristic diagram to be tested is input into the optimized convolutional neural network model to obtain the grain size detection result.
[0009] Optionally, obtaining a wavelet time-frequency feature atlas corresponding to at least one metal sample specifically includes:
[0010] A plurality of detection points are arranged on the bottom surface of the at least one metal sample, wherein the detection points are evenly distributed on the bottom surface of the metal sample;
[0011] Collecting data from each of the detection points on the bottom surface of the at least one metal sample to obtain ultrasonic echo data;
[0012] Performing signal processing on the ultrasonic echo data to obtain ultrasonic detection data;
[0013] The ultrasonic detection data is subjected to wavelet time-frequency analysis to obtain the wavelet time-frequency feature atlas.
[0014] Optionally, the convolutional neural network model to be established is trained to obtain an optimized convolutional neural network model, including:
[0015] Segmenting the wavelet time-frequency feature atlas to obtain a training set, a test set, and a validation set;
[0016] Obtaining a test grain size range of a metal sample corresponding to the wavelet time-frequency feature atlas;
[0017] A convolutional neural network is constructed, a convolutional neural network model is established using the training set, the test set and the convolutional neural network, and the verification set and the test grain size range are input into the convolutional neural network model to obtain an optimized convolutional neural network model.
[0018] Optionally, the step of collecting data to obtain ultrasonic echo data includes:
[0019] Placing the laser emitting end of a pulse laser at the detection point on the bottom surface of the metal sample, and irradiating the detection point with a pulse laser using a pulse laser;
[0020] The detection end of the laser interferometer is placed on the side opposite to the bottom surface of the metal sample to receive and collect the ultrasonic echo data.
[0021] Optionally, the step of performing signal processing on the ultrasonic echo data to obtain ultrasonic detection data includes:
[0022] Performing differential processing on the ultrasonic echo data to obtain differential ultrasonic echo data;
[0023] De-noising the differential ultrasonic echo data using the preset wavelet threshold to remove high-frequency electrical noise and obtain de-noised ultrasonic echo data;
[0024] The first echo generated by the metal sample is used as a reference for normalization processing to obtain the ultrasonic detection data.
[0025] Optionally, the wavelet time-frequency analysis includes:
[0026] Performing continuous wavelet transform on the ultrasonic detection data using wavelet basis functions with different center frequencies or different bandwidths to obtain a number of wavelet time-frequency characteristic graphs;
[0027] The wavelet time-frequency feature graphs of all the detection points are aggregated to obtain the wavelet time-frequency feature graph set.
[0028] Optionally, in the wavelet time-frequency feature map set, each of the wavelet time-frequency feature maps has a detection point label and a metal sample label, the detection point label records the detection point information corresponding to the wavelet time-frequency feature map, and the metal sample label records the metal sample information corresponding to the wavelet time-frequency feature map.
[0029] In the second aspect, the present application provides a grain size detection system based on wavelet analysis and neural network, the structure of which includes: a wavelet time-frequency feature atlas acquisition unit, a convolutional neural network model establishment unit, and a grain size detection unit;
[0030] Wherein, the wavelet time-frequency feature atlas acquisition unit is configured to acquire a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph;
[0031] The convolutional neural network model building unit is configured to train the established convolutional neural network model according to the wavelet time-frequency feature graph in the wavelet time-frequency feature graph set to obtain an optimized convolutional neural network model;
[0032] The grain size detection unit is configured to input the wavelet time-frequency feature map to be tested into the optimized convolutional neural network model to obtain a grain size detection result.
[0033] Optionally, the wavelet time-frequency feature atlas acquisition unit includes: an ultrasonic echo data acquisition unit, a signal processing unit, and a wavelet time-frequency analysis unit;
[0034] Wherein, the ultrasonic echo data acquisition unit is configured to set a plurality of detection points on the bottom surface of the at least one metal sample, and the detection points are evenly distributed on the bottom surface of the metal sample; data is collected at each of the detection points on the bottom surface of the at least one metal sample to obtain ultrasonic echo data;
[0035] The signal processing unit is configured to perform signal processing on the ultrasonic echo data to obtain ultrasonic detection data;
[0036] The wavelet time-frequency analysis unit is configured to perform wavelet time-frequency analysis on the ultrasonic detection data to obtain the wavelet time-frequency feature atlas.
[0037] Optionally, the convolutional neural network model building unit includes: a wavelet time-frequency feature atlas segmentation unit, a test grain size range acquisition unit, and a convolutional neural network training unit; wherein the wavelet time-frequency feature atlas segmentation unit is configured to segment the wavelet time-frequency feature atlas to obtain a training set, a test set, and a validation set;
[0038] The test grain size range acquisition unit is configured to acquire the test grain size range of the metal sample corresponding to the wavelet time-frequency feature atlas;
[0039] The convolutional neural network training unit is configured to build a convolutional neural network, establish a convolutional neural network model using the training set, the test set and the convolutional neural network, input the verification set and the test grain size range into the convolutional neural network model, and obtain an optimized convolutional neural network model.
[0040] The beneficial effects of this application are as follows:
[0041] This application performs multiple wavelet transforms on the ultrasonic detection signals of metal samples, and uses the generated wavelet time-frequency feature maps as input data for the convolutional neural network model, which is more suitable for image recognition of the convolutional neural network and improves the detection accuracy of the convolutional neural network model for the grain size of metal structures.
[0042] Before training the convolutional neural network model, the ultrasonic detection data is transformed by wavelet basis functions with different center frequencies and bandwidths to generate different wavelet time-frequency feature maps, which solves the problem of too little sample data. A large number of wavelet time-frequency feature maps are input into the neural network model for training, which improves the generalization ability of the neural network model and avoids overfitting of the convolutional neural network model.
[0043] Using the trained convolutional neural network model for metal grain size detection can more accurately predict the grain size range of metal samples.
[0044] In summary, when the technical solution of the present application is applied to actual industrial production, the process parameters can be adjusted according to the grain size changes of the metal material during the product manufacturing process, thereby greatly improving the quality of the product molded parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0046] Figure 1 A flow chart of a grain size detection method based on wavelet analysis and neural network is provided for this application;
[0047] Figure 2 A wavelet time-frequency characteristic diagram of a grain size detection method based on wavelet analysis and neural network is provided for this application;
[0048] Figure 3 This application discloses a grain size detection method based on wavelet analysis and neural network with a wavelet time-frequency characteristic diagram of grain size detection results;
[0049] Figure 4 A training diagram of a convolutional neural network model for a grain size detection method based on wavelet analysis and neural network in this application;
[0050] Figure 5 The present invention provides a training loss and accuracy curve of a convolutional neural network model in a grain size detection method based on wavelet analysis and neural network. DETAILED DESCRIPTION
[0051] In order to explain how the present application realizes continuous monitoring of device configuration changes, some embodiments will now be described in detail. The embodiments described in the following embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.
[0052] In a first aspect, the present application provides a method for detecting metal grain size.
[0053] like Figure 1 As shown, the metal grain size detection method provided in the present application includes the following steps S100-S300:
[0054] S100, obtaining a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph.
[0055] Furthermore, the metal sample is a thin sheet with two parallel surfaces, one of which is set as a laser irradiation surface, and the other is set as an ultrasonic echo signal detection surface.
[0056] like Figure 2 As shown, the wavelet time-frequency characteristic diagram is a two-dimensional waveform diagram. In the wavelet time-frequency characteristic diagram, the horizontal axis is time and the vertical axis is frequency.
[0057] There are many ways to obtain the wavelet time-frequency atlas. In one implementation, this step specifically includes the following S110 to S140:
[0058] S110, setting a plurality of detection points on the bottom surface of at least one metal sample, wherein the detection points are evenly distributed on the bottom surface of the metal sample.
[0059] Furthermore, in actual situations, although the grain sizes of the various test points on the bottom surface of the metal sample are different, the metal grain sizes at the various test points are only slightly different, so this application assumes that the grain sizes of the various test points on the bottom surface of the metal sample are the same.
[0060] Technicians can set the number of inspection points based on the bottom surface size of the metal sample and the data volume required to optimize the convolutional neural network model.
[0061] S120, collecting data from each detection point on the bottom surface of at least one metal sample to obtain ultrasonic echo data.
[0062] Furthermore, when collecting data for each detection point on the bottom surface of at least one metal sample, first randomly select the first metal sample from the prepared metal sample pile, and collect data for all detection points on the bottom surface of the metal sample in turn. After the collection is completed, the metal sample is placed in the collected area, and the second metal sample is randomly selected from the prepared metal sample pile again, and the above operation is performed until all metal samples in the prepared metal sample pile are collected and placed in the collected area. The metal samples in the collected area need to be stored for a period of time to prepare for subsequent research work by technicians.
[0063] There are many ways to collect data. In one implementation, this step specifically includes the following S121 to S122:
[0064] S121, placing the laser emitting end of the pulse laser at the detection point on the bottom surface of the metal sample, and using the pulse laser to irradiate the detection point with pulse laser.
[0065] Furthermore, the pulse laser is a laser transmitter with a working time interval. The pulse laser is configured to point the laser emission end directly at the detection point on the bottom surface of the metal sample, and emit laser once at a fixed interval to irradiate the detection point on the bottom surface of the metal sample. The laser interferometer is a precision measuring instrument that measures displacement using the laser interference effect. The laser interferometer is configured to point the detection end directly at the corresponding point of the detection point on the corresponding surface of the bottom surface of the metal sample to collect the excited ultrasonic waves.
[0066] S122, placing the detection end of the laser interferometer on the side opposite to the bottom surface of the metal sample, and receiving and collecting ultrasonic echo data.
[0067] Furthermore, after receiving and collecting the ultrasonic echo data, the metal grain size detection method proposed in the present application also includes: converting the ultrasonic echo signal collected by the laser interferometer into ultrasonic echo data.
[0068] When the pulsed laser irradiates the monitoring point on the bottom surface of the metal sample, part of the laser will irradiate the surface of the metal sample, exciting the particles on the surface of the metal sample and forming an ultrasonic reflection signal. Another part of the laser will irradiate the inside of the metal sample, exciting the particles inside the metal sample and forming an internal microstructure ultrasonic scattering signal. The ultrasonic echo signal includes: ultrasonic reflection signal and internal microstructure ultrasonic scattering signal. The ultrasonic echo data is presented as two peaks in the wavelet time-frequency characteristic diagram, and the two peaks represent the ultrasonic reflection signal and the internal microstructure ultrasonic scattering signal respectively.
[0069] During data collection, after each data collection for a detection point is completed, an ultrasonic echo data will be generated, that is, one detection point corresponds to one ultrasonic echo data.
[0070] During pulse laser irradiation, keep the laser vertically irradiating the bottom surface of the metal sample for a certain period of time. After the pulse laser runs stably, point the signal receiving end of the laser interferometer directly at the corresponding point of the detection point on the corresponding surface of the bottom surface to collect signals.
[0071] S130, performing signal processing on the ultrasonic echo data to obtain ultrasonic detection data.
[0072] Furthermore, there are many ways to process the signal. In one implementation, the step specifically includes the following S131 to S133:
[0073] S131, performing differential processing on the ultrasonic echo data to obtain differential ultrasonic echo data.
[0074] Furthermore, the role of the difference is to reduce the irregular fluctuations between the data and make the fluctuation curve of the ultrasonic echo data more stable.
[0075] S132, using a preset wavelet threshold to perform denoising on the differential ultrasonic echo data to remove high-frequency electrical noise and obtain denoised ultrasonic echo data.
[0076] Furthermore, high-frequency electrical noise will be generated when pulsed lasers and laser interferometers are in operation. The high-frequency electrical noise will cause abnormal fluctuations in the generated wavelet time-frequency characteristic diagram, affecting the effect of image recognition. The role of denoising is to remove the high-frequency electrical noise and eliminate the abnormal fluctuations in the wavelet time-frequency characteristic diagram.
[0077] S133, performing normalization processing based on the first echo generated by the metal sample to obtain ultrasonic testing data.
[0078] Furthermore, during data collection, two ultrasonic echo signals are obtained, which are represented as two peaks on the wavelet time-frequency characteristic diagram. The metal grain size detection method proposed in this application uses the first echo as a reference and normalizes the denoised ultrasonic echo data.
[0079] When data have different orders of magnitude or units, it will affect the results of data analysis. In order to eliminate the impact caused by excessive differences in the orders of magnitude or units between data, the data needs to be normalized. The role of normalization is to reduce several groups of data with excessively large numerical differences to the same order of magnitude.
[0080] S140, performing wavelet time-frequency analysis on the ultrasonic detection data to obtain a wavelet time-frequency feature atlas.
[0081] Furthermore, there are many ways to perform wavelet time-frequency analysis. In one implementation, this step specifically includes the following steps S141 to S142:
[0082] S141, performing continuous wavelet transform on the ultrasonic detection data using wavelet basis functions with different center frequencies or different bandwidths to obtain a number of wavelet time-frequency characteristic graphs.
[0083] Furthermore, during wavelet time-frequency analysis, a wavelet time-frequency characteristic graph will be generated when a wavelet basis function of each center frequency and bandwidth is used to perform wavelet transform calculation on a piece of ultrasonic detection data. Therefore, the number of wavelet time-frequency characteristic graphs of a detection point on the bottom surface of each metal sample is the number of types of wavelet basis functions.
[0084] In a specific embodiment, the technician selected a metal sample, set ten preset detection points on its bottom surface, set ten center frequencies and ten bandwidths in wavelet time-frequency analysis, and combined one hundred wavelet basis functions. Each detection point uses a wavelet basis function to perform wavelet calculation, which will generate a wavelet time-frequency feature map. In this way, a metal sample will generate a thousand wavelet time-frequency feature maps after data acquisition, signal processing and wavelet time-frequency analysis. The conventional wavelet time-frequency analysis method of metal samples is often that one detection point of a metal sample corresponds to a wavelet time-frequency feature map. If there are ten detection points on a metal sample, ten wavelet time-frequency feature maps will be generated; in comparison, the number of wavelet time-frequency feature maps obtained by the wavelet time-frequency analysis method set in the present application is one hundred times that of the traditional method. The wavelet time-frequency analysis method set in the present application can exponentially increase the amount of data of the convolutional neural network model. Using the wavelet time-frequency feature map with a large amount of data as the input data of the convolutional neural network model can significantly improve the generalization ability of the convolutional neural network model.
[0085] S142, summarizing the wavelet time-frequency feature graphs of all detection points to obtain a wavelet time-frequency feature graph set.
[0086] Furthermore, in the wavelet time-frequency feature map set, each wavelet time-frequency feature map has a detection point label and a metal sample label. The detection point label records the detection point information corresponding to the wavelet time-frequency feature map, and the metal sample label records the metal sample information corresponding to the wavelet time-frequency feature map.
[0087] After obtaining the wavelet time-frequency feature atlas, the wavelet time-frequency feature atlas is also sorted on the computer display interface, and the wavelet time-frequency feature atlas is sorted into a regular arrangement according to the detection point labels and metal sample labels. Since the number of wavelet time-frequency feature graphs is huge, if they are not sorted, data confusion will occur, so the sorting of the wavelet time-frequency feature atlas is necessary. The sorted wavelet time-frequency feature atlas allows technicians to find the corresponding detection points and metal samples on the computer display interface according to the wavelet time-frequency feature graphs.
[0088] It should be noted that the first innovation of this application is that, in terms of wavelet time-frequency analysis, it utilizes the organic combination of wavelet analysis and convolutional neural network, and uses different wavelet basis functions to perform wavelet transform on ultrasonic detection data, so that the number of wavelet time-frequency feature maps is increased exponentially, which solves the problem of too little sample data for training the convolutional neural network model and improves the generalization ability of the neural network model.
[0089] S200, according to the wavelet time-frequency feature graph in the wavelet time-frequency feature graph set, the established convolutional neural network model is trained to obtain an optimized convolutional neural network model.
[0090] Furthermore, there are many ways to establish a convolutional neural network model. In one implementation, this step specifically includes the following S210 to S230:
[0091] S210, segmenting the wavelet time-frequency feature atlas to obtain a training set, a test set, and a validation set.
[0092] The ratio of the further training set to the test set can be 3:1, or can be formulated according to the needs. The training set, the test set, and the validation set do not have any intersection and are independent of each other, that is, the wavelet time-frequency feature map that has been used as a training set cannot be used as a test set or a validation set, the wavelet time-frequency feature map that has been used as a test set cannot be used as a training set or a validation set, and the wavelet time-frequency feature map that has been used as a validation set cannot be used as a training set or a test set.
[0093] It should be noted that the role of the training set is to enable the constructed convolutional neural network to perform image recognition training according to the wavelet time-frequency feature map of the training set, so as to form a convolutional neural network model with the ability to identify metal grain size.
[0094] It should be noted that the role of the test set is to enable the trained convolutional neural network model to continue grain size recognition training according to the wavelet time-frequency characteristic diagram of the test set, and to continuously judge and self-correct the grain size recognition results according to the test grain size range, and gradually improve the accuracy of grain size recognition of the convolutional neural network model during continuous correction.
[0095] It should be noted that the role of the validation set is to further train the convolutional neural network model and provide a test grain size range as a reference standard, so that the convolutional neural network model can continuously correct itself and improve the grain size recognition accuracy of the convolutional neural network model.
[0096] S220, obtaining the test grain size range of the metal sample corresponding to the wavelet time-frequency feature atlas.
[0097] Furthermore, the test grain size range is obtained by technicians based on the statistical evaluation of previous grain size test values of this metal. The test grain size range can provide a comparative reference for the image recognition training results of the convolutional neural network model.
[0098] S230, building a convolutional neural network, using the training set, the test set and the convolutional neural network to establish a convolutional neural network model, inputting the verification set and the test grain size range into the convolutional neural network model, and obtaining an optimized convolutional neural network model.
[0099] Furthermore, a common machine learning system on the market can be used to build a convolutional neural network. The process is to first design the network structure of the convolutional neural network according to the characteristics of the wavelet time-frequency feature map and determine the optimal convolutional neural network model. In order to improve the calculation speed, the input wavelet time-frequency feature image size is set to 64×64×3. The convolutional neural network is written as a separate module.
[0100] The process of training and testing a convolutional neural network to form a convolutional neural network model, such as Figure 4 As shown in the figure. The model is trained and tested in the environment of the machine learning system. The convolutional neural network model uses the VGGNet structure, which includes 6 convolutional layers (Convolutional Layer), 3 pooling layers (Maxpooling Layer) and a fully connected layer (Fully-connected Layer, FC). The first convolutional layer uses 32 3×3 convolution kernels to scan the entire area of the low-resolution image and perform convolution operations to form a feature map. Then, the Relu activation function is used to ensure that the size of the feature map remains unchanged, and the normalization layer (Batch Normalization, BN) is introduced to normalize each feature map using the mean and variance of the current value. Next, the pooling layer performs downsampling operations along the spatial dimensions (width, height) of the feature map to obtain a smaller feature map. After three periodic convolution-Relu-normalization-pooling operations, the output of the last pooling layer is connected to a Dropout layer to prevent overfitting problems caused by complex training data. Then a fully connected layer is added to identify and classify the feature map, and the prediction results are output through the Softmax classifier. The optimal convolutional neural network model is determined by adjusting the network parameters such as learning rate, number of trainings and Dropout value. The training set, test set and the designated metal sample test grain size range are then input into the convolutional neural network model as labels. After training and testing, an optimized convolutional neural network model with high prediction accuracy is obtained. The training loss and accuracy curves of the model are shown in the figure below. Figure 5 shown.
[0101] Before building a convolutional neural network, the metal grain size detection method proposed in this application also includes: measuring the average grain size of all metal samples collected in the collected area to obtain the actual grain size of this metal. The measurement method is: performing a metal metallographic grain size analysis on the metal sample, and using a measuring instrument to mark the size of the grains on the metal metallographic photo according to the scale. The role of the verification set is to enable the optimized convolutional neural network model to use the wavelet time-frequency feature map of the verification set for image recognition, output the detection grain size range of the verification set, and compare the actual grain size with the detection grain size range of the verification set. If the actual grain size is within the detection grain size range of the verification set, the optimized neural network model will be saved and the optimized convolutional neural network model will be marked as verified.
[0102] Comparing the actual grain size with the detection grain size range is performed by the technicians by manual comparison or by operating the instrument. During the comparison, the metal grain size detection method proposed in the present application also includes: the technicians evaluate the detection accuracy of the convolutional neural network model based on the comparison results of the detection grain size range of the metal sample and the actual grain size of the metal sample. If the actual grain size of the metal sample is included in the detection grain size range, and the technicians believe that the actual grain size is not at the boundary of the detection grain size range, and there is no influence of the equipment prediction error on the result, then the model accuracy is evaluated to be good; if the actual grain size of the metal sample is not included in the detection grain size range, or the actual grain size of the metal sample is at the boundary of the detection grain size range, then the model accuracy is evaluated to be poor, and the technicians need to determine whether to re-collect the ultrasonic detection data according to actual needs and re-establish the model to detect the detection grain size range of the metal sample.
[0103] It should be noted that the second innovation of the present application is that, in terms of the input of the convolutional neural network model, wavelet analysis is used to take the wavelet time-frequency feature map as the input of the convolutional neural network model. In the detection technology of metal grain size using convolutional neural networks, if the morphology picture of the metal surface is directly input into the convolutional neural network model for image recognition, then if the boundary of the metal grain is blurred in the picture, the convolutional neural network model cannot accurately identify the metal grain boundary, affecting the model's detection and calculation of the grain size of the metal sample. Therefore, the advantage of taking the wavelet time-frequency feature map as the input of the neural network model is that the characteristics of the input picture are more in line with the image recognition characteristics of the convolutional neural network model.
[0104] It should be noted that the third innovation of this application is that, in the application of convolutional neural network models, deep learning convolutional neural networks are applied to metal grain size detection. The original technology of applying convolutional neural networks to metal detection is mostly used for the detection of metal surface defects. Applying convolutional neural networks to metal grain size detection can improve detection accuracy.
[0105] S300, inputting the wavelet time-frequency characteristic graph to be tested into the optimized convolutional neural network model to obtain a grain size detection result.
[0106] Furthermore, in practical applications, data collection and signal processing are first performed on the material to be tested to obtain ultrasonic echo data, and then the wavelet basis function is set to perform wavelet time-frequency analysis to obtain a wavelet time-frequency feature map as the input of the optimized neural network model.
[0107] After obtaining the grain size test result: it also includes setting a label on the output grain size test result on the computer display interface, and the label records the information of the test point and metal sample to which this grain size test result belongs, so that the technician can find the test point and metal sample corresponding to the grain size test result according to the label on the computer display interface.
[0108] It is necessary to set labels on the grain size detection results. Since the amount of grain size detection results obtained in actual applications of this application is huge, if they are not labeled, it is easy for the grain size detection results to not correspond to the material to be tested. Therefore, setting labels on the wavelet time-frequency characteristic diagram of the output detection grain size can facilitate technical personnel to carry out other work.
[0109] The grain size test results can be expressed as a numerical range or as a wavelet time-frequency characteristic diagram with a numerical range, such as Figure 3 shown.
[0110] In the second aspect, the present application provides a metal grain size detection system, the structure of which includes: a wavelet time-frequency feature atlas acquisition unit, a convolutional neural network model establishment unit, and a grain size detection unit.
[0111] The wavelet time-frequency feature atlas acquisition unit is configured to acquire a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph. The wavelet time-frequency feature atlas acquisition unit also includes: an ultrasonic echo data acquisition unit, a signal processing unit, and a wavelet time-frequency analysis unit.
[0112] The ultrasonic echo data acquisition unit is configured to set a plurality of detection points on the bottom surface of at least one metal sample, and the detection points are evenly distributed on the bottom surface of the metal sample; data is collected at each detection point on the bottom surface of at least one metal sample to obtain ultrasonic echo data.
[0113] The signal processing unit is configured to perform signal processing on the ultrasonic echo data to obtain ultrasonic detection data.
[0114] The wavelet time-frequency analysis unit is configured to perform wavelet time-frequency analysis on the ultrasonic detection data to obtain a wavelet time-frequency feature atlas.
[0115] The convolutional neural network model building unit is configured to train the established convolutional neural network model according to the wavelet time-frequency feature map in the wavelet time-frequency feature map set to obtain an optimized convolutional neural network model. The convolutional neural network model building unit also includes: a wavelet time-frequency feature map set segmentation unit, a test grain size range acquisition unit, and a convolutional neural network training unit.
[0116] The wavelet time-frequency feature atlas segmentation unit is configured to segment the wavelet time-frequency feature atlas to obtain a training set, a test set and a validation set.
[0117] The test grain size range acquisition unit is configured to acquire the test grain size range of the metal sample corresponding to the wavelet time-frequency feature atlas.
[0118] The convolutional neural network training unit is configured to build a convolutional neural network, establish a convolutional neural network model using a training set, a test set and a convolutional neural network, input a verification set and a test grain size range into the convolutional neural network model, and obtain an optimized convolutional neural network model.
[0119] The grain size detection unit is configured to input the wavelet time-frequency characteristic diagram to be tested into the optimized convolutional neural network model to obtain the grain size detection result.
[0120] In a specific embodiment, the surface grain size of the metal object A needs to be measured.
[0121] The technicians first collect the ultrasonic echo signal of the metal object A to be tested, and use the laser transmitting probe of the pulse laser of the ultrasonic detection unit to irradiate a certain detection point on a detection surface of the metal object A with a pulse laser, and place the signal receiving end of the laser interferometer of the ultrasonic detection unit at the corresponding point of the detection point on the corresponding surface of the detection surface.
[0122] The collected ultrasonic echo signals are converted into ultrasonic echo data, and then signal processing is performed. Through steps such as differentiation, noise reduction and normalization, the ultrasonic echo data is optimized into ultrasonic detection data.
[0123] The ultrasonic detection data of the metal object A to be tested is subjected to wavelet transformation, and a fixed wavelet basis function is set to obtain a wavelet time-frequency characteristic map. The optimized convolutional neural network model corresponding to the metal material is selected, and the wavelet time-frequency characteristic map is input into the optimized convolutional neural network model to obtain the grain size range of the metal object A to be tested.
[0124] The metal object A has a wavelet time-frequency characteristic diagram with a detection grain size range, such as Figure 3 As shown, the grain size range of the metal test object A is (0,15).
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A grain size detection method based on wavelet analysis and neural network, characterized in that the steps include: Obtaining a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph; According to the wavelet time-frequency feature graph in the wavelet time-frequency feature graph set, the established convolutional neural network model is trained to obtain an optimized convolutional neural network model; Inputting the wavelet time-frequency characteristic graph to be tested into the optimized convolutional neural network model to obtain a grain size detection result; The step of obtaining a wavelet time-frequency feature atlas corresponding to at least one metal sample specifically includes: A plurality of detection points are arranged on the bottom surface of the at least one metal sample, wherein the detection points are evenly distributed on the bottom surface of the metal sample; Collecting data from each of the detection points on the bottom surface of the at least one metal sample to obtain ultrasonic echo data; Performing signal processing on the ultrasonic echo data to obtain ultrasonic detection data; Performing wavelet time-frequency analysis on the ultrasonic detection data to obtain the wavelet time-frequency feature atlas; The steps of obtaining ultrasonic detection data include: Performing differential processing on the ultrasonic echo data to obtain differential ultrasonic echo data; De-noising the differential ultrasonic echo data using a preset wavelet threshold to remove high-frequency electrical noise and obtain de-noised ultrasonic echo data; The first echo generated by the metal sample is used as a reference for normalization processing to obtain the ultrasonic detection data.
2. The method according to claim 1, characterized in that The convolutional neural network model to be established is trained to obtain an optimized convolutional neural network model, including: Segmenting the wavelet time-frequency feature atlas to obtain a training set, a test set, and a validation set; Obtaining a test grain size range of a metal sample corresponding to the wavelet time-frequency feature atlas; A convolutional neural network is constructed, a convolutional neural network model is established using the training set, the test set and the convolutional neural network, and the verification set and the test grain size range are input into the convolutional neural network model to obtain an optimized convolutional neural network model.
3. The method according to claim 1, characterized in that The step of collecting data to obtain ultrasonic echo data includes: Placing the laser emitting end of a pulse laser at the detection point on the bottom surface of the metal sample, and irradiating the detection point with a pulse laser using a pulse laser; The detection end of the laser interferometer is placed on the side opposite to the bottom surface of the metal sample to receive and collect the ultrasonic echo data.
4. The method according to claim 1, characterized in that The wavelet time-frequency analysis comprises: Performing continuous wavelet transform on the ultrasonic detection data using wavelet basis functions with different center frequencies or different bandwidths to obtain a number of wavelet time-frequency characteristic graphs; The wavelet time-frequency feature graphs of all the detection points are aggregated to obtain the wavelet time-frequency feature graph set.
5. The method according to claim 1, characterized in that In the wavelet time-frequency feature map set, each wavelet time-frequency feature map has a detection point label and a metal sample label. The detection point label records the detection point information corresponding to the wavelet time-frequency feature map, and the metal sample label records the metal sample information corresponding to the wavelet time-frequency feature map.
6. A grain size detection system based on wavelet analysis and neural network, characterized in that: include: Wavelet time-frequency feature atlas acquisition unit, convolutional neural network model building unit, grain size detection unit; Wherein, the wavelet time-frequency feature atlas acquisition unit is configured to acquire a wavelet time-frequency feature atlas corresponding to at least one metal sample; the wavelet time-frequency feature atlas is composed of a plurality of wavelet time-frequency feature graphs, and one metal sample corresponds to at least one wavelet time-frequency feature graph; The convolutional neural network model building unit is configured to train the established convolutional neural network model according to the wavelet time-frequency feature graph in the wavelet time-frequency feature graph set to obtain an optimized convolutional neural network model; The grain size detection unit is configured to input the wavelet time-frequency characteristic diagram to be tested into the optimized convolutional neural network model to obtain a grain size detection result; The wavelet time-frequency feature atlas acquisition unit is further configured to: A plurality of detection points are arranged on the bottom surface of the at least one metal sample, wherein the detection points are evenly distributed on the bottom surface of the metal sample; Collecting data from each of the detection points on the bottom surface of the at least one metal sample to obtain ultrasonic echo data; Performing differential processing on the ultrasonic echo data to obtain differential ultrasonic echo data; performing denoising processing on the differential ultrasonic echo data using a preset wavelet threshold to remove high-frequency electrical noise to obtain denoised ultrasonic echo data; performing normalization processing based on the first echo generated by the metal sample as a reference to obtain ultrasonic detection data; The ultrasonic detection data is subjected to wavelet time-frequency analysis to obtain the wavelet time-frequency feature atlas.
7. The system according to claim 6, characterized in that The wavelet time-frequency feature atlas acquisition unit includes: an ultrasonic echo data acquisition unit, a signal processing unit, and a wavelet time-frequency analysis unit; Wherein, the ultrasonic echo data acquisition unit is configured to set a plurality of detection points on the bottom surface of the at least one metal sample, and the detection points are evenly distributed on the bottom surface of the metal sample; data is collected at each of the detection points on the bottom surface of the at least one metal sample to obtain ultrasonic echo data; The signal processing unit is configured to perform signal processing on the ultrasonic echo data to obtain ultrasonic detection data; The wavelet time-frequency analysis unit is configured to perform wavelet time-frequency analysis on the ultrasonic detection data to obtain the wavelet time-frequency feature atlas.
8. The system according to claim 6, characterized in that The convolutional neural network model building unit includes: a wavelet time-frequency feature atlas segmentation unit, a test grain size range acquisition unit, and a convolutional neural network training unit; The wavelet time-frequency feature atlas segmentation unit is configured to segment the wavelet time-frequency feature atlas to obtain a training set, a test set and a validation set; The test grain size range acquisition unit is configured to acquire the test grain size range of the metal sample corresponding to the wavelet time-frequency feature atlas; The convolutional neural network training unit is configured to build a convolutional neural network, establish a convolutional neural network model using the training set, the test set and the convolutional neural network, input the verification set and the test grain size range into the convolutional neural network model, and obtain an optimized convolutional neural network model.
