Online quality detection and self-adaptive compensation system for precision stamping die based on machine vision
By using a machine vision-based online quality inspection system that combines image acquisition, feature fusion analysis, and adaptive compensation decision-making, the problem of insufficient capture of dimensional change trends in traditional inspection systems has been solved. This enables real-time and accurate compensation of stamping dies, improving the timeliness and adaptability of quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KUNSHAN SHIBAODE PRECISION MOULD CO LTD
- Filing Date
- 2025-12-03
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional online quality inspection systems cannot effectively capture the slow dimensional changes over time during the stamping process, resulting in delayed compensation and insufficient accuracy. Existing compensation mechanisms lack the use of historical data and cannot achieve forward-looking adjustments.
An online quality inspection system for precision stamping dies based on machine vision is adopted. Through image acquisition, feature fusion analysis, drift judgment and compensation decision modules, it realizes trend analysis and adaptive compensation of time series, generates adaptive compensation commands and drives the actuator to make real-time adjustments.
It enables coherent interpretation and proactive control of the dynamic process of product size changes, and can accurately identify and warn of micron-level size drift in its early stages, significantly improving the timeliness and accuracy of quality control and avoiding the cumulative effect of size drift.
Smart Images

Figure CN122244780A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, specifically to a machine vision-based online quality inspection and adaptive compensation system for precision stamping dies. Background Technology
[0002] In the field of precision stamping manufacturing, the long-term continuous operation of dies inevitably leads to gradual changes in product dimensions. These changes often begin with minute drifts at the micrometer level. If not detected and corrected in time, they will gradually accumulate and eventually cause products to exceed tolerances or even be scrapped in batches. Traditional online quality inspection systems mostly rely on static analysis of individual product images and make immediate acceptance judgments based on preset thresholds. While this method can identify obvious defects or dimensional deviations, it cannot effectively capture the slow trend of dimensional changes over time. Because the stamping process is affected by multiple factors such as die wear, temperature fluctuations, and changes in material properties, dimensional drift usually manifests as a continuous and gradual dynamic process. Static analysis can only provide snapshot information at discrete time points and lacks a coherent interpretation of the data sequence, making it difficult to provide early warnings in the early stages of drift.
[0003] Furthermore, existing compensation mechanisms often employ a delayed response model, triggering adjustments only after a deviation exceeds the allowable range. This passive approach not only fails to offset the ongoing drift process but may also introduce new fluctuations due to inappropriate compensation timing. More importantly, traditional systems typically treat detection, judgment, and compensation as relatively independent steps, failing to fully utilize the trend information inherent in historical data sequences to optimize decision-making. This results in insufficient intelligence and predictability throughout the quality control process. As manufacturing demands increasingly stringent product consistency requirements, developing a system capable of integrating spatiotemporal characteristics, tracking trends in real time, and achieving proactive compensation has become an urgent need. Summary of the Invention
[0004] The purpose of this invention is to provide an online quality inspection and adaptive compensation system for precision stamping dies based on machine vision, in order to solve the problems mentioned in the background art. The specific technical problems include how to apply time series trend analysis to feature fusion, drift determination and compensation decision-making, so as to solve the problem of compensation lag and insufficient accuracy caused by the lack of coherent interpretation of the dynamic process of dimensional change in traditional online inspection systems.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] This machine vision-based online quality inspection and adaptive compensation system for precision stamping dies includes an image acquisition module, a feature fusion analysis module, a drift determination module, a compensation decision module, and an execution drive module, wherein:
[0007] The image acquisition module includes an industrial camera, which is fixed above the stamping production line and aimed at the product conveying path. It uses the working rhythm of the stamping production line as a trigger signal to immediately acquire a product image after each stamping action is completed. By continuously repeating this process, the image sequence of the product is generated and stored in chronological order.
[0008] This image acquisition module continuously acquires product image sequences in chronological order by synchronously triggering the working cycle. Its effect is to provide a foundation of image data with strict temporal correlation for subsequent analysis, enabling the system to move away from isolated analysis of single images, thus creating the primary condition for achieving a coherent interpretation of the dynamic process of size changes.
[0009] The spatial analysis unit in the feature fusion analysis module performs spatial multi-scale feature extraction on each product image in the image sequence, generates feature maps of different scales through convolution operations, transforms and unfolds the feature maps into feature vectors, and concatenates the feature vectors into a unified feature representation as spatial multi-scale features.
[0010] The time analysis unit in the feature fusion analysis module arranges spatial multi-scale features in chronological order to form a time series and performs trend analysis. The trend analysis includes calculating the moving average and the slope of change. The moving average is used to smooth random fluctuations and reflect the basic level of feature changes, while the slope of change is used to quantify the rate and direction of feature value changes over time. The calculation of the slope of change involves differentiating the feature values at consecutive time points in the time series.
[0011] The fusion unit in the feature fusion analysis module fuses spatial multi-scale features with the trend analysis results of time series. It concatenates the vectors of spatial multi-scale features, the vectors of moving averages and the vectors of change slopes into a comprehensive feature vector, and assigns weight coefficients to the trend analysis results for weighted integration to generate fused feature information.
[0012] The core function of this feature fusion analysis module is to fuse spatial multi-scale features with the trend analysis results of time series (moving average and slope of change) to generate fused feature information. This not only provides instantaneous spatial information of product size, but more importantly, it embeds its historical change trend, enabling the feature representation to dynamically reflect the basic level and direction rate of size change, providing information support for the system to make forward-looking judgments and directly addressing the problem of compensating for lag.
[0013] The drift determination module identifies and determines whether a micrometer-level drift has occurred based on fused feature information, and generates drift parameters, specifically including:
[0014] Numerical indicators representing key dimensions of the product are extracted from the fused feature information. These numerical indicators are compared with preset nominal values to calculate the dimensional deviation. The dimensional deviation is continuously monitored. When the dimensional deviation exceeds the preset micron-level judgment threshold a preset number of times, a micron-level dimensional drift is determined to have occurred, and drift parameters including drift direction, drift amount, and drift duration are generated.
[0015] This drift determination module makes judgments based on fused feature information. Its effect is to determine whether the size deviation exceeds the threshold continuously, and to use the continuous and directional changes revealed by the trend analysis of the time series as the basis for determining micron-level drift. This avoids the false triggering of compensation due to a single random fluctuation, ensuring the reliability of the determination. At the same time, by confirming the duration of the drift, it achieves early and accurate capture of the dynamic process of continuous size change.
[0016] When the compensation decision module determines that a micrometer-level drift has occurred, it generates a corresponding adaptive compensation command based on the drift parameters and the results of time series trend analysis. When generating the adaptive compensation command, it calculates the basic amplitude of the compensation command based on the drift value and dynamically adjusts the basic amplitude based on the slope of change in the time series trend analysis. Specifically, the compensation amplitude is increased when the slope is positive, decreased when the slope is negative, and left unchanged when the slope is zero. The dynamic adjustment process specifically includes:
[0017] When the slope of change is positive and greater than zero, the basic amplitude is multiplied by a fixed coefficient greater than one to increase the compensation amplitude; when the slope of change is negative and less than zero, the basic amplitude is multiplied by a positive fractional fixed coefficient less than one to decrease the compensation amplitude.
[0018] When generating adaptive compensation instructions, the key effect of this compensation decision module is to directly use the slope of change obtained from the trend analysis of the time series as a key trend indicator to dynamically adjust the basic compensation range calculated based on the drift value. By intelligently increasing or decreasing the compensation range according to the positive or negative direction of the slope, the compensation behavior not only targets the current deviation, but also anticipates and counteracts the ongoing trend of change, thereby effectively solving the problem of insufficient compensation accuracy caused by the lack of coherent interpretation in traditional systems.
[0019] The execution drive module parses the adaptive compensation instructions to obtain direction, amplitude, and timing adjustment information, generates control signals, and converts them into physical quantity drive signals to drive the compensation actuator. This drives the compensation actuator to generate linear displacement and rotation angle to adjust the stamping parameters. The effect of this execution drive module is to accurately convert the adaptive compensation instructions generated by the compensation decision module, which incorporates trend analysis results, into the physical actions that drive the compensation actuator. By adjusting the stamping parameters, it ultimately transforms the system's forward-looking decisions, formed through a coherent interpretation of the dynamic process of dimensional changes, into real-time, precise corrective actions, thereby completing closed-loop control from detection and analysis to compensation.
[0020] Compared with the prior art, the beneficial effects of the present invention are:
[0021] This invention applies trend analysis of time series data to feature fusion, drift detection, and compensation decision-making, enabling the system to coherently interpret and proactively control the dynamic process of product size changes. This method overcomes the limitations of traditional online inspection systems that rely solely on single-point static analysis. It extracts key information characterizing change trends from continuous production image sequences, allowing for accurate identification and early warning in the early stages of micron-level size drift. Furthermore, the results of trend analysis are intelligently integrated into compensation decisions, enabling compensation actions not only to correct current deviations but also to dynamically and proactively adjust based on the rate and direction of change. This effectively suppresses the cumulative effect of drift, ultimately significantly improving the timeliness, accuracy, and adaptability of quality control, achieving a leap from passive detection to proactive maintenance. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall modules of the present invention;
[0023] Figure 2 This is a schematic diagram of the core process of applying the time series trend analysis of the present invention.
[0024] Figure 3 This is a schematic diagram of the feature fusion analysis module unit of the present invention.
[0025] In the diagram: 100, Image acquisition module; 200, Feature fusion analysis module; 201, Spatial analysis unit; 202, Spatial analysis unit; 203, Fusion unit; 300, Drift determination module; 400, Compensation decision module; 500, Execution drive module. Detailed Implementation
[0026] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] Next, please refer to Figure 1-2 The present invention provides a technical solution: an online quality inspection and adaptive compensation system for precision stamping dies based on machine vision, including an image acquisition module 100, a feature fusion analysis module 200, a drift determination module 300, a compensation decision module 400, and an execution drive module 500.
[0028] The industrial camera of the image acquisition module 100 is fixedly installed above the stamping production line, with its optical lens precisely aligned with the product conveying path to ensure the acquisition of complete stamped product images. The image acquisition action of this industrial camera is triggered and controlled by the working cycle signal of the stamping production line. Specifically, this working cycle signal is a synchronous electrical pulse signal or level transition signal generated immediately after each stamping action by the main control system of the stamping equipment. Upon receiving this trigger signal, the industrial camera immediately performs an image acquisition, capturing the product image currently within the camera's field of view. This process is strictly repeated after each stamping cycle, meaning that a new product image is acquired each time a stamping action is completed and the product is sent to the inspection station. Through this continuous acquisition method synchronized with the production cycle, the system generates a continuous sequence of product images in chronological order and stores each image along with its corresponding timestamp information in the system's storage unit, thereby achieving serialized and real-time image acquisition of the product status.
[0029] Please see Figure 3The spatial analysis unit 201 in the feature fusion analysis module 200 performs spatial multi-scale feature extraction on each product image in the image sequence. This extraction process generates feature maps of different scales through convolution operations. This convolution operation uses convolution kernels of different sizes to scan and calculate on the image. Small-sized convolution kernels focus on capturing the subtle edges, corners, and other local contour features of the product, while large-sized convolution kernels perceive the overall geometric shape and structural distribution features of the product, thereby achieving multi-scale information capture from local to global. After generating feature maps of different scales, all these multi-scale feature maps corresponding to each image are converted and unfolded into feature vectors. Subsequently, these feature vectors, which originate from the same image but represent information at different scales, are concatenated end-to-end in a predetermined order to finally form a high-dimensional, comprehensive, and unified feature representation of an image. This unified feature representation is the spatial multi-scale feature of the image, which completely encapsulates the spatial morphological information of the product at the current moment.
[0030] The time analysis unit 202 in the feature fusion analysis module 200 arranges the unified feature representations of multiple consecutive images in chronological order of image acquisition, forming a time-evolving feature sequence. Trend analysis is then performed on this time sequence by calculating the moving average and slope of specific feature values. The moving average is calculated by taking the arithmetic mean of feature values from multiple recent consecutive time points in the sequence to smooth random fluctuations and reflect the basic level and central trend of feature changes. The slope is calculated by differentiating the feature values from consecutive time points in the sequence to quantify the rate and direction of feature value change over time, i.e., to determine whether the feature change is upward, downward, or stable. Specifically, this difference operation calculates the difference between the feature value at a later time point and the feature value at a previous time point. The sign of this difference indicates the direction of feature value change, and its absolute value indicates the rate of change, thus quantifying the rate and direction of feature value change over time. By simultaneously acquiring the moving average and the slope of change, this trend analysis can clearly reveal the dynamic evolution and potential trends of product size characteristics over time.
[0031] The fusion unit 203 in the feature fusion analysis module 200 fuses the spatial multi-scale features with the trend analysis results of the time series to generate a fused feature information that simultaneously contains current spatial features and historical change trends, representing the product size change trend.
[0032] The fusion unit 203 fuses the spatial multi-scale features with the trend analysis results of the time series. This process treats the current spatial multi-scale features as a whole vector, and concatenates it with the moving average vector representing the historical average level and the slope vector representing the rate of change, combining them into a new, higher-dimensional comprehensive feature vector. This concatenation operation achieves a hard combination of the current instantaneous state and historical trend information at the data level. Then, a weighting coefficient is assigned to the trend analysis results. This weighting coefficient is used to adjust the influence of historical trend information on the final judgment in subsequent calculations, ensuring that the fusion process is not just a simple connection of data, but a weighted integration with a distinction between primary and secondary factors. Finally, based on this weighted integrated comprehensive feature vector, a new fused feature information that simultaneously contains the current spatial features and historical change trends is generated. This fused feature information is no longer a simple stacking of the original features, but a dynamic and comprehensive quality indicator that can characterize not only the current state of the product size, but also the trend and direction of its development.
[0033] The drift determination module 300 first extracts numerical indicators to characterize the key dimensions of the product from the fused feature information, and compares these numerical indicators with preset nominal values to calculate the dimensional deviation. Subsequently, it continuously monitors the dimensional deviation and compares it with a preset micron-level determination threshold. When the dimensional deviation exceeds the micron-level determination threshold a preset number of times, it determines that a micron-level dimensional drift has occurred. After determining that a drift has occurred, it generates drift parameters including the drift direction, drift amount, and drift duration.
[0034] When the compensation decision module 400 determines that a micrometer-level dimensional drift has occurred, it generates a corresponding adaptive compensation instruction based on the drift parameters and the trend analysis results of the time series, specifically including:
[0035] After receiving the micron-level drift determination result, the drift direction, drift amount and drift duration in the drift parameters are first obtained, and the trend analysis results of the time series are read, namely the moving average and its slope.
[0036] After calculating the basic amplitude of the compensation command based on the drift value, the basic amplitude is dynamically adjusted by combining the change slope obtained from the time trend analysis. The change slope is an algebraic value, whose positive or negative sign indicates the direction of change of the characteristic value, and whose absolute value indicates the rate of change of the characteristic value. The specific dynamic adjustment rules are as follows:
[0037] When the slope of change is positive and greater than zero, it indicates that the eigenvalue is trending upward, meaning the drift is accelerating. In this case, the basic amplitude is multiplied by a fixed coefficient greater than one, thereby increasing the compensation amplitude with certainty to achieve the effect of advance suppression. Conversely, when the slope of change is negative and less than zero, it indicates that the eigenvalue is trending downward. In this case, the basic amplitude is multiplied by a fixed positive fractional coefficient less than one, thereby decreasing the compensation amplitude with certainty to prevent over-adjustment. If the slope of change is zero, it indicates that the trend is stable, and the basic amplitude will not be adjusted. This adjustment mechanism ensures that the compensation amplitude is not only based on the current drift value but also incorporates the influence of the trend.
[0038] Finally, an adaptive compensation instruction is generated that simultaneously includes adjustments to direction, amplitude, and timing. This instruction is generated by fusing current drift characteristics and historical trends.
[0039] The execution drive module 500 first receives and parses the adaptive compensation command, obtaining the direction, amplitude, and timing adjustment information contained therein; then, it generates a corresponding control signal based on the command information and converts the control signal into a physical quantity drive signal that can drive the compensation actuator; the drive signal directly acts on the compensation actuator, causing it to produce precise actions such as linear displacement and rotation angle corresponding to the command requirements, thereby directly adjusting the key parameters in the stamping process and realizing closed-loop correction of the stamping parameters.
[0040] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A machine vision-based online quality inspection and adaptive compensation system for precision stamping dies, characterized in that, It includes an image acquisition module (100), a feature fusion analysis module (200), a drift determination module (300), a compensation decision module (400), and an execution drive module (500), wherein: The image acquisition module (100) is used to acquire image sequences of products on the stamping production line in real time; The feature fusion analysis module (200) extracts the spatial multi-scale features of the image sequence and performs time series trend analysis to generate fusion feature information characterizing the product size change trend; The drift determination module (300) identifies and determines whether a micron-level drift in size has occurred based on the fused feature information, and generates drift parameters. When the compensation decision module (400) determines that a micron-level drift in size has occurred, it generates a corresponding adaptive compensation instruction based on the drift parameters and the trend analysis results of the time series. The execution drive module (500) drives the compensation execution mechanism to perform actions based on the adaptive compensation command in order to adjust the stamping parameters.
2. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 1, characterized in that, The image acquisition module (100) includes an industrial camera, which is fixed above the stamping production line and aligned with the product conveying path. The camera is triggered by the working rhythm of the stamping production line and immediately acquires a product image after each stamping action is completed. The image sequence of the product is generated and stored in chronological order by continuously repeating this process.
3. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 1, characterized in that, The feature fusion analysis module (200) includes a spatial analysis unit (201). The spatial analysis unit (201) performs spatial multi-scale feature extraction on each product image in the image sequence, generates feature maps of different scales through convolution operation, converts and expands the feature maps into feature vectors, and splices the feature vectors into a unified feature representation as spatial multi-scale features.
4. The machine vision-based online quality inspection and adaptive compensation system for precision stamping dies according to claim 3, characterized in that, The feature fusion analysis module (200) includes a time analysis unit (202), which arranges the spatial multi-scale features in time order to form a time series and performs trend analysis. The trend analysis includes calculating the moving average and the slope of change, wherein the moving average is used to smooth random fluctuations and reflect the basic level of feature changes, and the slope of change is used to quantify the rate and direction of feature value changes over time.
5. The machine vision-based online quality inspection and adaptive compensation system for precision stamping dies according to claim 4, characterized in that, The feature fusion analysis module (200) includes a fusion unit (203), which fuses spatial multi-scale features with the trend analysis results of time series. It combines the vector of spatial multi-scale features with the vector of moving average and the vector of change slope to form a comprehensive feature vector, and assigns weight coefficients to the trend analysis results for weighted integration to generate fused feature information.
6. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 1, characterized in that, The process of generating the drift parameters specifically includes: Numerical indicators representing key dimensions of the product are extracted from the fused feature information. These numerical indicators are compared with preset nominal values to calculate the dimensional deviation. The dimensional deviation is continuously monitored. When the dimensional deviation exceeds the preset micron-level judgment threshold a preset number of times, a micron-level dimensional drift is determined to have occurred, and drift parameters including drift direction, drift amount, and drift duration are generated.
7. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 1, characterized in that, When generating adaptive compensation instructions, the compensation decision module (400) calculates the basic amplitude of the compensation instructions based on the drift value and dynamically adjusts the basic amplitude in combination with the slope of change in the trend analysis of the time series. When the slope of change is positive, the compensation amplitude is increased; when the slope of change is negative, the compensation amplitude is decreased; and when the slope of change is zero, the basic amplitude is not adjusted.
8. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 7, characterized in that, The dynamic adjustment process specifically includes: When the slope of change is positive and greater than zero, the basic amplitude is multiplied by a fixed coefficient greater than one to increase the compensation amplitude; when the slope of change is negative and less than zero, the basic amplitude is multiplied by a positive fractional fixed coefficient less than one to decrease the compensation amplitude.
9. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 1, characterized in that, The execution drive module (500) parses the adaptive compensation instruction to obtain direction, amplitude and timing adjustment information, generates control signals and converts them into physical quantity drive signals to drive the compensation actuator, and drives the compensation actuator to generate linear displacement and rotation angle to adjust the stamping parameters.
10. The online quality inspection and adaptive compensation system for precision stamping dies based on machine vision according to claim 5, characterized in that, The calculation of the slope of change involves differentiating the feature values of consecutive time points in the time series.