A non-destructive sensing method and system for metal packaging based on digital manufacturing
Through digital manufacturing technology, using knocking sound data and physical image analysis, combined with neural network model, lossless perception of metal packaging is achieved, the problem of detecting internal defects is solved, and the reliability and efficiency of detection is improved.
Patent Information
- Application Number
- CN202311630978.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-11-29
AI Technical Summary
During metal packaging processing, it is difficult to effectively detect and identify small internal defects, resulting in defect expansion and unstable product quality.
The lossless perception method of metal packaging based on digital manufacturing is adopted. By tapping the sample sound data of the metal packaging to be tested, the Fourier transform is used to generate energy spectrum pictures, and combined with the analysis of the physical image, the weight parameters are adjusted using a neural network model, and the quality information data is output for judgment.
The detection of lossless-perceived metal packaging defects is realized, destructive detection is avoided, the reliability and efficiency of the inspection is improved, and qualified and unqualified metal packaging can be identified in a timely manner.
Smart Images

Figure CN117647581B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of metal packaging detection, and in particular to a non-destructive sensing method and system for metal packaging based on digital manufacturing. Background Art
[0002] Metal packaging may introduce defects such as cracks during processing. At the same time, changes in the external use environment may cause the expansion of small defects inside the metal packaging. In addition to strict process to ensure the occurrence of defects as little as possible, detection has become an important means for the reliable application of metal packaging. Therefore, it is very necessary to detect and identify metal packaging. Summary of the invention
[0003] The embodiments of the present invention provide a method and system for non-destructive sensing of metal packaging based on digital manufacturing, which at least solve the above-mentioned technical problems.
[0004] The present invention provides a non-destructive sensing method for metal packaging based on digital manufacturing, characterized in that the method comprises:
[0005] knocking the metal package to be tested, and sampling the sound data generated by the knocking vibration of the metal package to be tested;
[0006] Performing Fourier transform on the sound data to obtain corresponding spectrum energy data;
[0007] Based on the spectrum energy data, generating a corresponding energy spectrum image;
[0008] Obtaining a physical image of the metal package to be tested, and analyzing and obtaining the shape of the physical image;
[0009] Based on the shape of the metal package to be tested, corresponding weights are respectively assigned to the energy spectrum image and the physical image;
[0010] Based on the assigned weights, the weight parameters of the trained neural network model are adjusted accordingly;
[0011] The energy spectrum image and the physical image are used as inputs of the neural network model, and the quality information data characterizing the metal package to be tested is obtained as output;
[0012] The quality information data is compared with a quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
[0013] In one embodiment, the step of tapping the metal package to be tested and sampling the sound data generated by the tapping vibration of the metal package to be tested includes:
[0014] In the process of knocking the metal package to be tested, the vibration of the diaphragm is detected by the diaphragm device to obtain a corresponding voltage signal;
[0015] If the voltage signal is higher than a voltage threshold, the voltage signal is used as sound data.
[0016] In one embodiment, the step of obtaining a physical image of the metal package to be tested and analyzing the shape of the physical image includes:
[0017] Obtaining the minimum bounding rectangle of the physical image;
[0018] The shape of the physical object picture is determined based on the aspect ratio of the minimum circumscribed rectangle.
[0019] In one embodiment, obtaining the physical image of the metal package to be tested includes:
[0020] Binarizing the physical object image to obtain a binary image;
[0021] Acquire a continuous pixel region having the same pixel value in the binary image;
[0022] A physical image of the metal package to be tested is obtained according to the continuous pixel area.
[0023] In one embodiment, determining the shape of the physical image based on the aspect ratio of the minimum circumscribed rectangle includes:
[0024] Obtain the leftmost, rightmost, topmost and bottommost four pixels in the physical image;
[0025] The minimum circumscribed rectangle is drawn according to the four pixel points.
[0026] In one embodiment, the assigning of corresponding weights to the energy spectrum image and the physical image based on the shape of the metal package to be tested includes:
[0027] If the aspect ratio of the minimum bounding rectangle is greater than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to
[0028] If the aspect ratio of the minimum bounding rectangle is less than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to
[0029] In one embodiment, the preset threshold T is set to 1.5.
[0030] In one embodiment, the quality threshold is set to 1.35π.
[0031] In one embodiment, the specific structure of the neural network model includes:
[0032] An input layer, used for inputting the energy spectrum image and the physical object image;
[0033] Convolution layer: use the first convolution unit to extract features from the energy spectrum image to obtain time domain feature data, and use the second convolution unit to extract features from the physical image to obtain frequency domain feature data;
[0034] Fusion layer: fuses the time domain feature data and the frequency domain feature data to obtain the feature data of the metal package to be tested;
[0035] Fully connected layer: receives the characteristic data of the metal package to be tested;
[0036] Output layer: outputs the quality information data of the metal package to be tested.
[0037] On the other hand, the present application provides a non-destructive sensing system for metal packaging based on digital manufacturing, the system comprising:
[0038] A sampling module, used for knocking the metal package to be tested, and sampling the sound data generated by the knocking vibration of the metal package to be tested;
[0039] A transformation module, used for performing Fourier transformation on the sound data to obtain corresponding spectrum energy data;
[0040] A generating module, used for generating a corresponding energy spectrum image based on the spectrum energy data;
[0041] An analysis module, used to obtain a physical image of the metal package to be tested, and analyze the shape of the physical image;
[0042] An allocation module, configured to allocate corresponding weights to the energy spectrum image and the physical image respectively based on the shape of the metal package to be tested;
[0043] An adjustment module, for adjusting weight parameters of the trained neural network model accordingly based on the assigned weights;
[0044] An output module, used to use the energy spectrum image and the physical image as inputs of the neural network model, and output quality information data characterizing the metal package to be tested;
[0045] The determination module is used to compare the quality information data with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
[0046] In an embodiment of the present invention, the present application obtains the corresponding spectrum energy data by sampling the sound data of the metal package to be tested and Fourier transforming it, and generates the corresponding energy spectrum image from the spectrum energy data; then obtains the physical image of the metal package to be tested and analyzes it to obtain the shape of the physical image; based on the shape of the metal package to be tested, the energy spectrum image and the physical image are respectively assigned corresponding weights; based on the assigned weights, the weight parameters of the trained neural network model are correspondingly adjusted; the energy spectrum image and the physical image are used as inputs of the neural network model, and the quality information data representing the metal package to be tested is output; the quality information data is compared with the quality threshold, and if the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified. This process non-destructively perceives the defects of the metal package, does not require destructive detection, saves time and effort, and is a relatively reliable detection method. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0048] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0049] Figure 1 A schematic diagram of the implementation process of a non-destructive sensing method for metal packaging based on digital manufacturing according to an embodiment of the present invention;
[0050] Figure 2 This is a structural composition diagram of a metal packaging non-destructive sensing system based on digital manufacturing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0052] like Figure 1 As shown, the present invention provides a non-destructive sensing method for metal packaging based on digital manufacturing, the method comprising:
[0053] Step 101, knocking the metal package to be tested, and sampling the sound data generated by the knocking vibration of the metal package to be tested;
[0054] Step 102, performing Fourier transform on the sound data to obtain corresponding spectrum energy data;
[0055] Step 103, generating a corresponding energy spectrum image based on the spectrum energy data;
[0056] Step 104, obtaining a physical image of the metal package to be tested, and analyzing the shape of the physical image;
[0057] Step 105, assigning corresponding weights to the energy spectrum image and the physical image respectively based on the shape of the metal package to be tested;
[0058] Step 106, based on the assigned weights, correspondingly adjusting the weight parameters of the trained neural network model;
[0059] Step 107, using the energy spectrum image and the physical image as inputs of the neural network model, and outputting quality information data characterizing the metal package to be tested;
[0060] Step 108, compare the quality information data with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
[0061] In this embodiment, in step 101, since the knocking sounds of defective and non-defective metal packages are different, the sound data is collected as one of the factors for judging whether the metal package to be tested is qualified. The sound can be obtained by knocking, and the knocking method of the metal package to be tested can be knocking by a metal rod, and the knocking position is specifically the top corner of the metal package to be tested. The knocking generates vibration, and the generated vibration can be detected by the diaphragm device, and the diaphragm device outputs a corresponding voltage signal, and the voltage signal represents the sound data.
[0062] The method to set the tapping intensity and tapping frequency is as follows:
[0063] During the experimental stage, a fixed knocking frequency is set, and different knocking forces are used to obtain the signal-to-noise ratio and the deformation of the metal package. The force when the metal package deformation reaches the deformation threshold is taken as the maximum critical force Lmax; the force corresponding to the minimum threshold of the signal-to-noise ratio is taken as the minimum critical force Lmin; different forces generally start from a slight force and slowly increase upwards, and the force values during the knocking process are recorded; and the relationship between the knocking force and the signal-to-noise ratio is obtained;
[0064] Let (a,b) be the range of striking force at this fixed frequency;
[0065]
[0066]
[0067] Within the range of the knocking force, select n knocking forces (n≥3), set different knocking frequencies for each knocking force, and record the signal-to-noise ratio and deformation of the metal package at different knocking frequencies;
[0068] Obtain multiple curves of the relationship between the tapping frequency and the signal-to-noise ratio, and obtain multiple minimum frequency critical values according to the curves;
[0069] The data of tapping frequency and signal-to-noise ratio under different forces are integrated to obtain an integrated curve;
[0070] Obtain multiple relationship curves between striking frequency and metal deformation; obtain multiple maximum frequency critical values according to the curves;
[0071] The larger value among the multiple minimum frequency critical values is used as the minimum frequency threshold;
[0072] The smaller value among the multiple maximum frequency critical values is used as the maximum frequency threshold;
[0073] Substituting 85% of the maximum frequency critical values into the relationship curve between the tapping frequency and the signal-to-noise ratio to obtain multiple signal-to-noise ratios; selecting the frequency value and the intensity value corresponding to the maximum signal-to-noise ratio as the preset tapping frequency value and the preset tapping intensity value, respectively;
[0074] Acquire and record environmental noise, wherein the environmental noise includes experimental environmental noise and environmental noise acquired in real time;
[0075] Calculate the difference between the real-time environment noise and the experimental environment noise;
[0076] Allocate 60% of the difference to the frequency adjustment amount, and 40% to the beat force adjustment amount. Dynamically adjust the beat frequency according to the frequency allocation adjustment amount and the integration curve; dynamically adjust the beat force according to the force allocation adjustment amount and the force and signal-to-noise ratio curve.
[0077] Principle: In the experimental stage, the metal is first knocked at a fixed knocking frequency, and the signal-to-noise ratio and deformation of the metal package are recorded under different knocking forces. By observing the deformation, the deformation threshold of the metal package can be determined, that is, the critical force at which the metal package begins to deform significantly.
[0078] Similarly, at a fixed tapping frequency, the signal-to-noise ratios obtained under different tapping intensities are recorded. By analyzing the changing trend of the signal-to-noise ratio, the intensity at which the signal-to-noise ratio reaches the minimum value is selected as the intensity corresponding to the minimum threshold of the signal-to-noise ratio.
[0079] According to the obtained critical forces Lmax and Lmin, determine the range of striking force. Generally, the following formula is used to calculate the range:
[0080] a=(Lmax+Lmin) / 4+(Lmin / 2)
[0081] b=(Lmax+Lmin) / 4+(Lmax / 2)
[0082] Thus, the range (a, b) is the range of striking forces at a fixed frequency.
[0083] Select n different tapping forces within the tapping force range. For each tapping force, tap at different tapping frequencies and record the resulting signal-to-noise ratio and deformation of the metal package. By observing the results at different tapping frequencies, the effects of force and frequency on the signal-to-noise ratio and deformation can be analyzed.
[0084] According to the signal-to-noise ratio relationship curve, multiple minimum frequency thresholds are obtained, which represent the minimum frequency values at which the signal-to-noise ratio begins to decrease when the tapping frequency is too low under different forces. Then, the larger value among these minimum frequency thresholds is used as the minimum frequency threshold.
[0085] Next, the metal deformation relationship curve is used to obtain multiple maximum frequency critical values, which represent the maximum frequency values at which the metal deformation begins to become too large when the striking frequency is too high under different forces. Then, the smaller value among these maximum frequency critical values is used as the maximum frequency threshold.
[0086] In order to determine the most appropriate preset values of the tapping frequency and force, it is necessary to use the relationship curve between the tapping frequency and the signal-to-noise ratio. The specific method is to substitute 85% of the multiple maximum frequency critical values into the curve to obtain multiple signal-to-noise ratio values. Then, the largest one among these signal-to-noise ratio values is selected to obtain the corresponding frequency and force values as the preset value of the tapping frequency and the preset value of the tapping force.
[0087] Monitor the environmental noise in real time through sensors or other means and record it. Environmental noise can be divided into experimental environmental noise and real-time environmental noise, both of which will affect the processing process.
[0088] The real-time environmental noise is compared with the experimental environmental noise, and the difference between them is calculated. The difference represents the change of the real-time environmental noise relative to the experimental environmental noise.
[0089] 60% of the difference is allocated to the frequency adjustment amount, and 40% is allocated to the tapping force adjustment amount. This is to adjust the tapping frequency and force according to the changes in the actual environmental noise.
[0090] The tapping frequency is dynamically adjusted according to the amount allocated to the frequency adjustment and the integration curve. The integration curve can be established based on experimental data and experience to ensure the adaptability and stability of the tapping frequency under different environmental noises.
[0091] Dynamically adjust the tapping force based on the assigned tapping force adjustment amount and the force and signal-to-noise ratio curve. The force and signal-to-noise ratio curve can be derived based on experimental data and theoretical calculations to ensure optimal adjustment of the tapping force under different signal-to-noise ratios.
[0092] Effect: By experimentally recording the signal-to-noise ratio under different tapping forces, we can find the force corresponding to the minimum threshold of the signal-to-noise ratio, that is, the force most suitable for metal tapping. This can make the noise during the tapping process as low as possible and improve the clarity and accuracy of the signal.
[0093] Controlling deformation: By determining the deformation threshold of metal packaging, the deformation of metal packaging can be limited to an acceptable range. This can prevent the metal packaging from being damaged or deformed due to excessive force, thus ensuring the quality and stability of the product.
[0094] Tapping effect and performance improvement: Through multi-frequency tapping experiments, we can observe the results under different tapping frequencies and analyze the impact of force and frequency on signal-to-noise ratio and deformation. By optimizing the combination of tapping force and frequency, we can obtain better tapping effect and performance, and improve the quality and reliability of metal packaging.
[0095] Accurately select the knocking frequency and force: By recording the signal-to-noise ratio and deformation of the metal package at different knocking frequencies, multiple curves of the relationship between the knocking frequency and the signal-to-noise ratio, as well as multiple curves of the relationship between the knocking frequency and the metal deformation are obtained. Based on these curves, multiple minimum frequency thresholds and maximum frequency thresholds are obtained, and the knocking frequency and force range can be accurately selected.
[0096] Optimize signal-to-noise ratio and deformation control: By integrating the data of tapping frequency and signal-to-noise ratio under different forces, an integrated curve can be obtained. Under the premise of ensuring deformation control, the preset values of tapping frequency and force that optimize the signal-to-noise ratio can be selected. This helps reduce noise interference during metal processing and improves signal clarity and reliability.
[0097] Optimal metal deformation control: By obtaining multiple maximum frequency critical values and taking the smaller value as the maximum frequency threshold, it is possible to avoid excessive metal deformation caused by too high a frequency. This helps maintain the integrity and stability of metal packaging and achieve the best deformation effect during metal processing.
[0098] Improve processing efficiency and quality: By selecting the optimal knocking frequency and force preset values, more precise and efficient knocking operations can be achieved during metal processing. This will improve processing efficiency and ensure that the quality of metal parts meets the requirements.
[0099] Real-time environmental noise compensation: By acquiring and recording the experimental environmental noise and the real-time environmental noise, the difference between them can be calculated. A portion of the difference (60%) is allocated to the amount of frequency adjustment, which can dynamically compensate for the impact of real-time environmental noise on the tapping frequency. This helps to maintain the stability of the tapping frequency and reduce the interference of environmental noise on the processing process.
[0100] Dynamic adjustment of tapping frequency and force: Based on the frequency allocation adjustment amount and integration curve, the tapping frequency can be dynamically adjusted based on real-time monitoring to adapt to different environmental noise levels. Similarly, based on the force allocation adjustment amount and the force and signal-to-noise ratio curve, the tapping force can be dynamically adjusted to optimize the signal-to-noise ratio. This helps ensure that the tapping frequency and force during the processing are always in the best state, improving processing quality and efficiency.
[0101] Improved tapping effect and reduced errors: By dynamically adjusting the tapping frequency and force, it can more accurately adapt to real-time environmental noise changes and the relationship between force and signal-to-noise ratio. This will improve the tapping effect, reduce processing errors caused by environmental noise and force changes, and improve the accuracy and reliability of metal processing.
[0102] Improve product consistency and stability: By compensating for real-time environmental noise and dynamically adjusting the hammering parameters, product differences caused by environmental changes can be reduced. This helps improve product consistency and stability, allowing each processing process to maintain a consistent quality level.
[0103] In step 102, Fourier transform is a mathematical tool used to decompose any periodic function into a pile of sinusoidal functions, where a pile can be infinite. Thus, the generated spectrum energy data is composed of a pile of sinusoidal functions.
[0104] In step 103, after the spectrum energy data, the spectrum energy data is displayed on the coordinate axis, and the current coordinate axis is screenshoted to generate a corresponding energy spectrum image.
[0105] In step 104, the physical image of the metal package to be tested can be obtained by taking a photo. As the second factor for judging whether the metal package to be tested is qualified, the physical image needs to be preprocessed. The preprocessing is specifically as follows:
[0106] Binarization is performed on the image of the object to obtain a binary image. Binarization is an important technique in image processing, which refers to the process of converting a grayscale image into a binary image. In binarization, the grayscale value of each pixel is set to 0 or 255, making the entire image appear to be in black and white. A binary image has only two pixel values, one for the object and the other for the background. This technique helps to reduce the amount of data, highlight the outline of the target, and thus simplify the image processing and analysis process.
[0107] Continuous pixel areas with the same pixel values in the binary image are obtained to obtain a pre-processed physical image of the metal package to be tested.
[0108] Then locate the leftmost, rightmost, topmost, and bottommost pixels in the real image, draw four pixels, and generate the minimum enclosing rectangle.
[0109] Then, the minimum circumscribed rectangle aspect ratio is calculated to obtain the shape of the physical image. Generally, the metal package to be tested is a rectangle, and the shape of the physical image specifically includes a long rectangle and a wide rectangle.
[0110] In step 105, if the shape of the real object picture is a long rectangle, the knocking sound is relatively vague and the sound produced by each knocking varies greatly, which is easy to affect the prediction results of the subsequent neural network model. Therefore, it is necessary to reduce the weight parameter of the energy spectrum picture in the neural network model and increase the weight parameter of the real object picture in the neural network model. Specifically:
[0111] If the aspect ratio of the minimum bounding rectangle is greater than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to
[0112] If the aspect ratio of the minimum bounding rectangle is less than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to
[0113] The preset threshold T is set to 1.5.
[0114] In step 106, the neural network model includes:
[0115] Input layer, used to input energy spectrum images and physical object images;
[0116] Convolution layer: Use the first convolution unit to extract features from the energy spectrum image to obtain time domain feature data, and use the second convolution unit to extract features from the physical image to obtain frequency domain feature data;
[0117] Fusion layer: fuses the time domain feature data and the frequency domain feature data to obtain the feature data of the metal package to be tested;
[0118] Fully connected layer: receives the characteristic data of the metal package to be tested;
[0119] Output layer: Output the quality information data of the metal packaging to be tested.
[0120] Among them, the weight parameters are located in the fully connected layer. When the energy spectrum image and the real object image change, the weight parameters in the fully connected layer are modified accordingly, which in turn affects the output results of the neural network model.
[0121] In step 107, the energy spectrum image and the physical image are input into the input layer of the neural network model, and the quality information data representing the metal package to be tested is output from the output layer. The quality information data is specifically a quality score, and a higher score indicates a higher quality of the metal package.
[0122] In step 108, the quality information data is compared with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified. The quality threshold is set to 1.35π.
[0123] Thus, by sampling the sound data of the metal package to be tested and Fourier transforming it to obtain the corresponding spectrum energy data, the spectrum energy data is used to generate the corresponding energy spectrum image; then the physical image of the metal package to be tested is obtained and the shape of the physical image is analyzed; based on the shape of the metal package to be tested, the energy spectrum image and the physical image are respectively assigned corresponding weights; based on the assigned weights, the weight parameters of the trained neural network model are correspondingly adjusted; the energy spectrum image and the physical image are used as the input of the neural network model, and the quality information data representing the metal package to be tested is output; the quality information data is compared with the quality threshold, and if the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified. This process can sense the defects of the metal package without damage detection, saving time and effort, and is a relatively reliable detection method.
[0124] On the other hand, the present application provides a non-destructive sensing system for metal packaging based on digital manufacturing, the system comprising:
[0125] The sampling module 201 is used to knock the metal package to be tested and sample the sound data generated by the knocking vibration of the metal package to be tested;
[0126] The transformation module 202 is used to perform Fourier transformation on the sound data to obtain corresponding spectrum energy data;
[0127] A generating module 203, used to generate a corresponding energy spectrum image based on the spectrum energy data;
[0128] The analysis module 204 is used to obtain a physical image of the metal package to be tested and analyze the shape of the physical image;
[0129] An allocation module 205, configured to allocate corresponding weights to the energy spectrum image and the physical image respectively based on the shape of the metal package to be tested;
[0130] An adjustment module 206, for adjusting weight parameters of the trained neural network model accordingly based on the assigned weights;
[0131] An output module 207 is used to use the energy spectrum image and the physical image as inputs of the neural network model, and output quality information data representing the metal package to be tested;
[0132] The determination module 208 is used to compare the quality information data with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
[0133] In this embodiment, in the sampling module 201, the metal package to be tested can be knocked by a metal rod, and the knocking position is specifically the top corner of the metal package to be tested. The knocking generates vibration, and the generated vibration can be detected by the diaphragm device, and the diaphragm device outputs a corresponding voltage signal, and the voltage signal represents sound data.
[0134] In the transform module 202, Fourier transform is a mathematical tool used to decompose any periodic function into a pile of sinusoidal functions, where a pile can be infinite. Thus, the generated spectrum energy data is composed of a pile of sinusoidal functions.
[0135] In the generation module 203, after the spectrum energy data, the spectrum energy data is displayed on the coordinate axis, and the current coordinate axis is screenshoted to generate a corresponding energy spectrum image.
[0136] In the analysis module 204, the physical image of the metal package to be tested can be obtained by shooting. The physical image needs to be preprocessed. The preprocessing is specifically as follows:
[0137] Binarization is performed on the image of the object to obtain a binary image. Binarization is an important technique in image processing, which refers to the process of converting a grayscale image into a binary image. In binarization, the grayscale value of each pixel is set to 0 or 255, making the entire image appear to be in black and white. A binary image has only two pixel values, one for the object and the other for the background. This technique helps to reduce the amount of data, highlight the outline of the target, and thus simplify the image processing and analysis process.
[0138] Continuous pixel areas with the same pixel values in the binary image are obtained to obtain a pre-processed physical image of the metal package to be tested.
[0139] Then locate the leftmost, rightmost, topmost, and bottommost pixels in the real image, draw four pixels, and generate the minimum enclosing rectangle.
[0140] Then, the minimum circumscribed rectangle aspect ratio is calculated to obtain the shape of the physical image. Generally, the metal package to be tested is a rectangle, and the shape of the physical image specifically includes a long rectangle and a wide rectangle.
[0141] In the allocation module 205, if the shape of the real object picture is a long rectangle, the sound of knocking is relatively vague and the sound of each knocking varies greatly, which is easy to affect the prediction results of the subsequent neural network model. Therefore, it is necessary to reduce the weight parameter of the energy spectrum picture in the neural network model and increase the weight parameter of the real object picture in the neural network model. Specifically:
[0142] If the aspect ratio of the minimum circumscribed rectangle is greater than the preset threshold T, the weight of the energy spectrum image is set to x1 = 1 / (1 + T), and the weight of the physical image is set to x2 = T / (1 + T);
[0143] If the aspect ratio of the minimum circumscribed rectangle is less than the preset threshold T, the weight of the energy spectrum image is set to x1=T / (1+T), and the weight of the physical image is set to x2=1 / (1+T).
[0144] The preset threshold T is set to 1.5.
[0145] In the adjustment module 206, the neural network model includes:
[0146] Input layer, used to input energy spectrum images and physical object images;
[0147] Convolution layer: Use the first convolution unit to extract features from the energy spectrum image to obtain time domain feature data, and use the second convolution unit to extract features from the physical image to obtain frequency domain feature data;
[0148] Fusion layer: fuses the time domain feature data and the frequency domain feature data to obtain the feature data of the metal package to be tested;
[0149] Fully connected layer: receives the characteristic data of the metal package to be tested;
[0150] Output layer: Output the quality information data of the metal packaging to be tested.
[0151] Among them, the weight parameters are located in the fully connected layer. When the energy spectrum image and the real object image change, the weight parameters in the fully connected layer are modified accordingly, which in turn affects the output results of the neural network model.
[0152] In the output module 207, the energy spectrum image and the physical image are input into the input layer of the neural network model, and the quality information data representing the metal package to be tested is output from the output layer. The quality information data is specifically a quality score, and the higher the score, the higher the quality of the metal package.
[0153] In the determination module 208, the quality information data is compared with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified. The quality threshold is set to 1.35π.
[0154] Thus, by sampling the sound data of the metal package to be tested and Fourier transforming it to obtain the corresponding spectrum energy data, the spectrum energy data is used to generate the corresponding energy spectrum image; then the physical image of the metal package to be tested is obtained and the shape of the physical image is analyzed; based on the shape of the metal package to be tested, the energy spectrum image and the physical image are respectively assigned corresponding weights; based on the assigned weights, the weight parameters of the trained neural network model are correspondingly adjusted; the energy spectrum image and the physical image are used as the input of the neural network model, and the quality information data representing the metal package to be tested is output; the quality information data is compared with the quality threshold, and if the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified. This process can sense the defects of the metal package without damage detection, saving time and effort, and is a relatively reliable detection method.
[0155] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0156] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0157] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A non-destructive sensing method for metal packaging based on digital manufacturing, characterized in that: The method comprises: knocking the metal package to be tested, and sampling the sound data generated by the knocking vibration of the metal package to be tested; Performing Fourier transform on the sound data to obtain corresponding spectrum energy data; Based on the spectrum energy data, generating a corresponding energy spectrum image; Obtaining a physical image of the metal package to be tested, and analyzing and obtaining the shape of the physical image; The step of obtaining a physical image of the metal package to be tested and analyzing the shape of the physical image includes: Obtaining the minimum bounding rectangle of the physical image; Determining the shape of the physical image based on the aspect ratio of the minimum circumscribed rectangle; Based on the shape of the metal package to be tested, corresponding weights are respectively assigned to the energy spectrum image and the physical image; Wherein, the step of assigning corresponding weights to the energy spectrum image and the physical image based on the shape of the metal package to be tested includes: If the aspect ratio of the minimum bounding rectangle is greater than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to If the aspect ratio of the minimum bounding rectangle is less than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to Based on the assigned weights, the weight parameters of the trained neural network model are adjusted accordingly; The specific structure of the neural network model includes: An input layer, used for inputting the energy spectrum image and the physical object image; Convolution layer: use the first convolution unit to extract features from the energy spectrum image to obtain time domain feature data, and use the second convolution unit to extract features from the physical image to obtain frequency domain feature data; Fusion layer: fuses the time domain feature data and the frequency domain feature data to obtain the feature data of the metal package to be tested; Fully connected layer: receives the characteristic data of the metal package to be tested; Output layer: outputs the quality information data of the metal package to be tested; The energy spectrum image and the physical image are used as inputs of the neural network model, and the quality information data characterizing the metal package to be tested is obtained as output; The quality information data is compared with a quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
2. The method according to claim 1, characterized in that The step of striking the metal package to be tested and sampling the sound data generated by the striking vibration of the metal package to be tested comprises: When the metal package to be tested is struck, the vibration of the diaphragm is detected by the diaphragm device to obtain the corresponding voltage signal; If the voltage signal is higher than a voltage threshold, the voltage signal is used as sound data.
3. The method according to claim 1, characterized in that The obtaining of the physical image of the metal package to be tested comprises: Binarizing the physical object image to obtain a binary image; Acquire a continuous pixel region having the same pixel value in the binary image; A physical image of the metal package to be tested is obtained according to the continuous pixel area.
4. The method according to claim 3, characterized in that The determining the shape of the physical image based on the aspect ratio of the minimum circumscribed rectangle includes: Obtain the leftmost, rightmost, topmost and bottommost four pixels in the physical image; The minimum circumscribed rectangle is drawn according to the four pixel points.
5. The method according to claim 1, characterized in that The preset threshold T is set to 1.
5.
6. The method according to claim 1, characterized in that The quality threshold is set to 1.35π.
7. A non-destructive sensing system for metal packaging based on digital manufacturing, characterized in that: The system comprises: A sampling module, used for knocking the metal package to be tested, and sampling the sound data generated by the knocking vibration of the metal package to be tested; A transformation module, used for performing Fourier transformation on the sound data to obtain corresponding spectrum energy data; A generating module, used for generating a corresponding energy spectrum image based on the spectrum energy data; An analysis module, used to obtain a physical image of the metal package to be tested, and analyze the shape of the physical image; Wherein, obtaining a physical image of the metal package to be tested and analyzing the shape of the physical image includes: Generate the minimum enclosing rectangle based on the real picture; Then calculate the minimum circumscribed rectangle aspect ratio to get the shape of the real picture; An allocation module, configured to allocate corresponding weights to the energy spectrum image and the physical image respectively based on the shape of the metal package to be tested; Wherein, the step of assigning corresponding weights to the energy spectrum image and the physical image based on the shape of the metal package to be tested includes: If the aspect ratio of the minimum bounding rectangle is greater than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to If the aspect ratio of the minimum bounding rectangle is less than the preset threshold T, the weight of the energy spectrum image is set to The weight of the physical image is set to An adjustment module, for adjusting weight parameters of the trained neural network model accordingly based on the assigned weights; The specific structure of the neural network model includes: An input layer, used for inputting the energy spectrum image and the physical object image; Convolution layer: use the first convolution unit to extract features from the energy spectrum image to obtain time domain feature data, and use the second convolution unit to extract features from the physical image to obtain frequency domain feature data; Fusion layer: fuses the time domain feature data and the frequency domain feature data to obtain the feature data of the metal package to be tested; Fully connected layer: receives the characteristic data of the metal package to be tested; Output layer: outputs the quality information data of the metal package to be tested; An output module, used to use the energy spectrum image and the physical image as inputs of the neural network model, and output quality information data characterizing the metal package to be tested; The determination module is used to compare the quality information data with the quality threshold. If the quality information data is greater than the quality threshold, the metal package to be tested is determined to be qualified; if the quality information data is less than or equal to the quality threshold, the metal package to be tested is determined to be unqualified.
Citation Information
Patent Citations
Acoustics online nondestructive detection method based on convolutional neural network
CN109142547A
Electromagnetic target intelligent sensing identification method based on multi-feature heterogeneous fusion
CN114861705A
Method and apparatus for detecting surface quality of egg
CN1804620A