An online visual detection method for wear amount of a special-shaped steel die

CN122989688APending Publication Date: 2026-10-27JIANGYIN ANAJIE METAL NEW MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611270124.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

现有的异型钢模具磨损量在线视觉检测方法,采用单帧图像静态比对检测模具磨损,对于渐进均匀磨损,其磨损量小于表面粗糙度峰谷差,磨损信号被噪声完全淹没,导致严重漏检,同时固定阈值无法适应不同区域、不同批次粗糙度基线差异,易将正常粗糙度随机波动误判为磨损,造成误报,此外,缺乏时序演化分析手段,难以区分磨损的单向趋势与粗糙度的随机振荡,且基准图长期不更新导致系统性偏差,无法适应模具良性老化,最终影响检测准确性与可靠性,其实用性存在一定的局限性

Benefits of technology

[0014]1、通过对正常状态模具表面纹理建立隐向量特征记忆库,并将在线检测得到的纹理特征与正常纹理特征进行偏离度比较,将单帧图像中不易直接识别的微小纹理变化转换为可连续分析的特征偏离序列,从而提高对早期渐进磨损变化的感知能力,提高渐进均匀磨损的识别能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989688A_ABST
    Figure CN122989688A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of mold visual detection, and discloses an online visual detection method for wear amount of a special-shaped steel mold, which comprises the following steps: constructing a normal memory bank through deep embedding feature training and cross-condition reference collection, combining multi-scale texture coding to realize effective amplification of gradual wear signals, realizing accurate differentiation of wear directional drift and normal roughness random oscillation through time sequence evolution trend tracking and variation stability double checking, reducing the missing rate and the false alarm rate, realizing adaptive tracking and full life cycle management of mold benign aging through dynamic baseline sliding update and hierarchical closed-loop decision, and avoiding blind shutdown.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mold visual inspection technology, specifically to an online visual inspection method for the wear of irregularly shaped steel molds. Background Technology

[0002] During long-term continuous production, the working zone, diversion holes, welding chamber, and cavity fillets of irregular steel molds are continuously subjected to material flow friction, thermal cycling, and production loads. The mold surface will gradually wear down, especially in the early stages of long-term service. Wear usually manifests as slow changes in surface texture, micro-scratch density, and local morphology, without forming obvious contour loss, cracks, or dimensional abrupt changes. Therefore, when performing online visual inspection on irregular steel molds, it is necessary to identify such progressive wear changes from continuous inspection data. Existing online visual inspection methods for wear of irregular steel molds use static comparison of single-frame images to detect mold wear. For progressive uniform wear, the wear amount is less than the peak-to-valley difference of surface roughness, and the wear signal is completely drowned out by noise, leading to serious missed detections. At the same time, fixed thresholds cannot adapt to the differences in roughness baselines in different regions and batches, and are prone to misjudging normal random fluctuations in roughness as wear, resulting in false alarms. In addition, the lack of time-series evolution analysis means it is difficult to distinguish between the unidirectional trend of wear and the random oscillation of roughness, and the long-term lack of updating of the reference map leads to systematic bias, which cannot adapt to the benign aging of the mold, ultimately affecting the accuracy and reliability of the inspection. Its practicality has certain limitations. Summary of the Invention

[0003] This invention provides an online visual inspection method for the wear of irregularly shaped steel molds. It collects surface images of the irregularly shaped steel mold under normal conditions and establishes a normal texture feature benchmark. The online collected mold surface images are converted into deep texture features. Based on the temporal changes in feature deviations formed by continuous detection, progressive wear trends are identified. Simultaneously, joint verification using directional drift and variation stability reduces misjudgments caused by random changes in normal surface roughness and environmental interference. Furthermore, dynamic updates to the normal memory database adapt to normal texture changes during long-term mold service. This method solves the problems of difficulty in distinguishing between progressive uniform wear and random changes in normal surface roughness in existing visual inspection methods for irregularly shaped steel molds, insensitivity of single-frame detection to early minor wear changes, and misjudgments caused by benchmark mismatch during long-term inspection.

[0004] This invention provides the following technical solution: an online visual inspection method for wear amount of irregularly shaped steel molds, comprising: An industrial camera, telecentric lens and controllable light source are set up at the mold inspection station. The mold is moved to the inspection position by the positioning mechanism to collect images of the mold surface under normal conditions under different working conditions and establish a benchmark image library covering multiple inspection areas. A feature encoding model is trained based on a benchmark image library to extract latent vector features corresponding to the surface texture of a normal mold, and a normal texture feature memory library is constructed based on the latent vector features. During online inspection, image acquisition is triggered synchronously to obtain a standard reference image. Based on the standard reference image, photometric compensation parameters are determined, and the mold image is photometrically normalized. The normalized mold image is divided into multiple detection partitions and multi-scale image blocks. The corresponding latent vectors are obtained through the feature encoding model. Based on the feature offset relationship between the current latent vector and the normal texture feature memory, the temporal deviation curves corresponding to each detection partition are generated. Continuous trend analysis of time series deviation curves is performed, and directional drift characteristics that are different from random fluctuations are identified based on the degree of deviation, direction of change, and persistence. Based on the variation stability corresponding to the directional drift characteristics, a joint verification is performed. When the directional drift satisfies the continuous change condition and the stability constraint condition, it is determined that the corresponding detection zone has a progressive wear trend. By utilizing the latent vectors corresponding to samples with uncertain progressive wear trends, the normal texture feature memory is updated using a sliding window approach. Based on the results of directional drift strength and stability verification, the wear status of each detection zone is graded and the wear detection results are output.

[0005] Preferably, a benchmark image library covering multiple detection regions is established, specifically as follows: A high-resolution industrial camera and a low-distortion telecentric lens are mounted next to the mold opening and closing station using a shockproof mounting bracket, with the imaging optical axis of the industrial camera perpendicular to the surface of the mold to be inspected. A multi-angle controllable ring light source is arranged on the light-emitting side of the telecentric lens; The mold is pushed from the mold opening and closing station to the preset detection position by the servo positioning mechanism to detect the repeatability error of the servo positioning mechanism; If the repeated positioning error is less than or equal to the first threshold, the positioning accuracy is deemed to meet the requirements. If the repositioning error is greater than the first threshold, the servo positioning mechanism is adjusted and re-detected until the repositioning error is less than or equal to the first threshold. A standard grayscale reference plate is fixedly installed next to the ring light source; Before the production line officially starts operating, the first data acquisition operation is performed on the first shift, and the second data acquisition operation is performed on the second shift. The third data acquisition operation is performed under the first ambient temperature, and the fourth data acquisition operation is performed under the second ambient temperature. The fifth acquisition operation is performed under the brightness of the first light source, and the sixth acquisition operation is performed under the brightness of the second light source. The images acquired by the first, second, third, fourth, fifth, and sixth acquisition operations are combined to form a cross-condition image set; Perform region integrity determination on each frame of the cross-conditional image set; Quality assessment is performed on images with complete area coverage.

[0006] Preferably, a normal texture feature memory is constructed based on latent vector features, specifically as follows: Normal mold surface images are extracted from the initial benchmark image library that covers multiple detection areas, and the normal mold surface images are divided into large-scale image blocks and small-scale image blocks. The training sample set is obtained by combining large-scale and small-scale image patches. Construct a convolutional autoencoder network; Image patches from the training sample set are input into a convolutional autoencoder network. The encoder obtains the latent vectors, and the decoder obtains the reconstructed image patches. Calculate the reconstruction difference between the reconstructed image patch and the corresponding input image patch; Determine the relationship between the reconstructed difference value and the first reconstruction threshold; Repeat the training until all training batches converge, fix the network parameters of the encoder, and use the fixed encoder as the feature extractor. All normal samples in the initial benchmark image library covering multiple detection areas will be input into the feature extractor to obtain the latent vector corresponding to each normal sample. The latent vectors corresponding to all normal samples are aggregated to construct a normal memory bank; Calculate the distribution range of each latent vector in the normal memory; Determine the relationship between the distribution range and the preset boundary threshold.

[0007] Preferably, a standard reference image is obtained, and photometric compensation parameters are determined based on the standard reference image, specifically as follows: Detect the mold positioning signal output by the production line control system; If the mold arrival signal is invalid, wait for the mold arrival signal to become valid; If the mold positioning signal is valid, the positional deviation between the current mold position and the preset detection position is detected. Determine the relationship between the positional deviation and the first positional threshold. Start the timer and determine the relationship between the vibration amplitude of the mold and the vibration threshold within a preset stabilization time after the mold reaches the detection position. During the stable window period, the industrial camera is controlled to acquire standard grayscale reference board images, and the actual brightness values ​​of the reference board area are extracted from the standard grayscale reference board images. The actual brightness value is compared with the preset reference brightness value to determine the relationship between the brightness deviation between the actual brightness value and the preset reference brightness value and the brightness deviation threshold. During the stable window period, control the industrial camera to acquire images of the mold surface and obtain the original mold image; The original mold image is subjected to global brightness correction based on the photometric compensation coefficient to obtain a photometric normalized image; Calculate the global mean brightness of the photometrically normalized image; Determine the relationship between the global average brightness and the preset brightness range.

[0008] Preferably, the timing deviation curves corresponding to each detection partition are generated, specifically as follows: Obtain a standard reference image, determine the photometric normalized image in the photometric compensation parameters based on the standard reference image, and load a preset region of interest template; The photometric normalized image is divided into several detection zones; For each detection partition, multi-scale image block division is performed to obtain large-scale image blocks and small-scale image blocks; Large-scale image patches and small-scale image patches are sequentially input into the feature extractor in the normal texture feature memory constructed based on the latent vector features. The latent vector corresponding to each image patch is obtained through the feature extractor. For each detection partition, retrieve a set of reference latent vectors that correspond to the location of the detection partition and match its scale from the normal memory in the normal texture feature memory constructed based on the latent vector features; Calculate the deviation between the latent vector of each image block in the detection partition and the reference latent vector in the reference latent vector set, and obtain the maximum deviation and average deviation of the detection partition. Determine the relationship between the maximum deviation value and a preset multiple of the average deviation value; Store the distance value into the time-series data queue of the corresponding detection partition; Determine the relationship between the amount of data in the time-series data queue and the preset time-series length.

[0009] Preferably, a continuous trend analysis is performed on the time series deviation curve, specifically: Obtain the timing curve from the timing deviation curve corresponding to each detection partition, and divide the timing curve into several continuous timing segments according to the preset parsing length; For each time series segment, the direction of change between adjacent data points within that time series segment is obtained sequentially; The number of consecutive data points with the same direction of change within the time series is counted to obtain the duration of the same direction in the time series. Determine the relationship between the duration of the same direction and the first trend threshold; Determine the relationship between the cumulative offset and the second trend threshold; Obtain the partition identifier of the currently detected partition; Determine whether the partition identifier matches the preset high-frequency wear partition identifier; If the partition identifier matches the preset high-frequency wear partition identifier, then the first trend threshold is set to the first value, and the second trend threshold is set to the second value. If the partition identifier does not match the preset high-frequency wear partition identifier, the first trend threshold is set to the third value, and the second trend threshold is set to the fourth value. For time segments marked as suspected wear states, obtain the direction of change of their subsequent adjacent time segments; Determine whether the direction of change in subsequent adjacent time segments is consistent with the direction of change in the time segment of suspected wear state; If the direction of change is consistent, the suspected wear condition marker is maintained; If the direction of change is inconsistent, the suspected wear condition mark will be removed, and the surface roughness will be restored to normal.

[0010] Preferably, joint verification is performed based on the mutation stability corresponding to the directional drift characteristics, specifically as follows: Obtain the state markers of time segments in the continuous trend analysis of time series deviation curves; If the status marker is not a suspected wear state, then the time segment is determined to have passed the double check and maintained a normal roughness state; If the status is marked as suspected wear, then extract the local sequence of the time series curve corresponding to that time segment; Perform stability analysis on the local sequence; Obtain the status flags of the first and second channels for this time segment; Determine whether the status marker of the first channel is in a suspected wear state and whether the status marker of the second channel is a statistically significant unidirectional trend; If the status marker of the first channel is not a suspected wear state, or the status marker of the second channel is not a statistically significant unidirectional trend, then the double verification is deemed to have failed, and the time segment is marked as a normal roughness state. If the first channel status is marked as suspected wear and the second channel status is marked as statistically significant unidirectional trend, then the double verification is deemed to have passed, and the time segment is marked as wear confirmed.

[0011] Preferably, the normal texture feature memory is updated, specifically as follows: Obtain the dual verification results in the joint verification based on the variation stability corresponding to the directional drift feature, extract the latent vector of the sample marked as normal roughness state, and obtain the normal sample to be included in the database. Get the current cumulative production count of the mold; Determine the relationship between the cumulative mold production count and the preset update production threshold; Add the latent vectors of normal samples to be added to the normal memory; Obtain the storage duration of each historical sample latent vector in the normal memory, and remove the historical sample latent vectors whose storage duration exceeds the preset fade-out duration threshold from the normal memory; Determine the relationship between the total number of samples in the updated normal memory and the preset upper limit of the memory size; Based on the updated normal memory, the distribution range between each latent vector is recalculated to obtain the updated distribution boundary. Calculate the boundary change between the updated distribution boundary and the original distribution boundary; If the boundary change exceeds the preset boundary change threshold, it is determined that the reference has shifted abnormally, a reference abnormality alarm signal is output, and the current normal memory update is paused. If the boundary change is less than or equal to the preset boundary change threshold, the baseline mild adaptation is determined to be complete. The updated distribution boundary is then used as the new normal roughness distribution boundary. The cumulative production count of the mold is reset to zero, and the process waits for the next update trigger.

[0012] Preferably, the wear status of each detection zone is graded and determined, specifically as follows: Obtain the trend intensity level and stability confidence level of each detection zone; Determine whether the trend strength level is high and whether the stability confidence level is high; If the trend intensity level is high and the stability confidence level is high, then the detection zone is marked as wear confirmation state, a progressive uniform wear confirmation signal is output, and a mold repair suggestion command or a replacement suggestion command is generated. If the trend strength level is not high or the stability confidence level is not high, then determine whether the trend strength level is high and whether the stability confidence level is medium. If the trend strength level is high and the stability confidence level is medium, then the detection zone is marked as an observation zone, the subsequent detection interval of the detection zone is shortened, the sampling density of the detection zone is increased, the memory comparison range of the detection zone is expanded, and an instruction to strengthen product size sampling inspection is generated. If the trend strength level is not high or the stability confidence level is not medium, then determine whether the trend strength level is medium and whether the stability confidence level is medium. If the trend strength level is median and the stability confidence level is moderate, then the detection zone is marked as normal roughness state; If the trend strength level is not median or the stability confidence level is not moderate, then determine whether the trend strength level is low and whether the stability confidence level is low. If the trend intensity level is low and the stability confidence level is low, then the detection zone is marked as an environmental interference state, and inspection instructions for the light source system and inspection instructions for the positioning mechanism are generated. If the trend intensity level is not low or the stability confidence level is not low, then the detection zone is marked as an environmental interference state, and inspection instructions for the light source system and inspection instructions for the positioning mechanism are generated. The status markers, trend intensity levels, stability confidence levels, and corresponding generated instructions for each detection zone are stored in the historical trend database to update the mold's full lifecycle health record.

[0013] The present invention has the following beneficial effects:

[0014] 1. By establishing a latent vector feature memory library for the surface texture of a mold under normal conditions, and comparing the deviation between the texture features obtained from online detection and the normal texture features, the subtle texture changes that are not easily identified directly in a single frame image are converted into a feature deviation sequence that can be continuously analyzed, thereby improving the perception of early progressive wear changes and the recognition of progressive uniform wear.

[0015] 2. By performing directional drift analysis on the time-series deviation curves formed by continuous detection, and further verifying the variation stability of suspected wear time-series segments, the continuous directional changes are distinguished from the random oscillations caused by normal roughness. When both trend and stability conditions are met, progressive wear is confirmed, thereby reducing false alarms caused by random texture fluctuations and reducing misjudgments of wear caused by normal roughness.

[0016] 3. Set up corresponding inspection zones for inspection areas such as working zone, diversion hole, welding chamber and cavity fillet, and set corresponding trend judgment parameters according to the wear characteristics of different areas. This will enable the inspection process to adapt to the wear rate differences between different areas of the special steel mold, reduce missed or false detections caused by uniform judgment conditions, and improve the inspection adaptability of different inspection areas.

[0017] 4. Establish stable image acquisition conditions through telecentric imaging, positioning mechanism and standard grayscale reference plate, and determine photometric compensation parameters according to the brightness of the reference plate. Perform photometric normalization processing on the online acquired mold images to improve the photometric consistency between detection images at different times and reduce the impact of illumination and positioning changes on the detection results.

[0018] 5. By screening recent samples that have been determined to be in a normal state through joint verification, and updating the normal texture feature memory using a sliding window method, the normal detection benchmark can adapt to the normal texture changes during the long-term service of the mold. At the same time, abnormal benchmark offsets are identified by the changes in feature distribution boundaries before and after the update, reducing systematic misjudgments caused by fixed historical benchmarks and reducing benchmark mismatch caused by long-term service.

[0019] 6. Classify and judge different detection areas according to trend strength and stability confidence. When wear is confirmed, output mold repair or replacement suggestions. When the trend is strong but the stability is insufficient, enter the observation state and increase the subsequent detection density. When the detection results are affected by environmental factors, output light source and positioning mechanism inspection prompts, thereby reducing blind shutdowns caused by single abnormalities and forming continuous archiving of mold detection results, realizing graded closed-loop processing of wear detection. Attached Figure Description

[0020] Figure 1 This is a flowchart of the online visual inspection method for wear of irregular steel molds according to the present invention.

[0021] Figure 2 This is a schematic diagram of the hardware structure of the detection system of the present invention.

[0022] Figure 3 This is a schematic diagram illustrating the feature encoding and normal memory construction of the present invention.

[0023] Figure 4 This is a schematic diagram of the timing deviation curve of the present invention.

[0024] Figure 5 This is a schematic diagram of the normal memory bank sliding update of the present invention. Detailed Implementation

[0025] Example 1: An online visual inspection method for wear measurement of irregularly shaped steel molds, comprising: An industrial camera, telecentric lens and controllable light source are set up at the mold inspection station. The mold is moved to the inspection position by the positioning mechanism to collect images of the mold surface under normal conditions under different working conditions and establish a benchmark image library covering multiple inspection areas. A feature encoding model is trained based on a benchmark image library to extract latent vector features corresponding to the surface texture of a normal mold, and a normal texture feature memory library is constructed based on the latent vector features. During online inspection, image acquisition is triggered synchronously to obtain a standard reference image. Based on the standard reference image, photometric compensation parameters are determined, and the mold image is photometrically normalized. The normalized mold image is divided into multiple detection partitions and multi-scale image blocks. The corresponding latent vectors are obtained through the feature encoding model. Based on the feature offset relationship between the current latent vector and the normal texture feature memory, the temporal deviation curves corresponding to each detection partition are generated. Continuous trend analysis of time series deviation curves is performed, and directional drift characteristics that are different from random fluctuations are identified based on the degree of deviation, direction of change, and persistence. Based on the variation stability corresponding to the directional drift characteristics, a joint verification is performed. When the directional drift satisfies the continuous change condition and the stability constraint condition, it is determined that the corresponding detection zone has a progressive wear trend. By utilizing the latent vectors corresponding to samples with uncertain progressive wear trends, the normal texture feature memory is updated using a sliding window approach. Based on the results of directional drift strength and stability verification, the wear status of each detection zone is graded and the wear detection results are output.

[0026] Example 2 is an improvement upon Example 1. This online visual inspection method for the wear of irregularly shaped steel molds establishes a reference image library covering multiple inspection areas, specifically as follows: A high-resolution industrial camera and a low-distortion telecentric lens are mounted next to the mold opening and closing station using a shockproof mounting bracket. The imaging optical axis of the industrial camera is perpendicular to the surface of the mold to be inspected. The imaging optical axis is the straight propagation direction defined by the optical center of the industrial camera lens. The pixel resolution of the industrial camera is matched with the magnification of the telecentric lens so that the physical size corresponding to a single pixel is less than or equal to a preset pixel equivalent threshold. That is, by selecting the combination of pixel resolution and lens magnification, the physical length represented by a single pixel in the object field of view of the imaging system does not exceed the preset accuracy requirement, thereby ensuring that the image spatial sampling accuracy meets the wear detection requirements. The preset pixel equivalent threshold is the upper limit value of the physical size corresponding to a single pixel set in advance. A multi-angle controllable ring light source is arranged on the light-emitting side of the telecentric lens. The optical axis of the ring light source coincides with the imaging optical axis of the industrial camera. The incident angle of the ring light source relative to the mold surface to be inspected is adjustable within a preset angle range. The optical axis of the ring light source is the central axis perpendicular to the light-emitting surface of the light source, defined by the geometric center of the ring light source. The preset angle range is the adjustable range of the incident angle of the ring light source relative to the mold surface to be inspected. The mold is pushed from the mold opening and closing station to the preset detection position by a servo positioning mechanism. The repeatability error of the servo positioning mechanism is detected. That is, the servo positioning mechanism is controlled to push the mold to the preset detection position. The actual stopping position of the mold is obtained through position sensor or visual positioning feedback. The deviation value between the actual stopping position and the preset detection position is calculated. The pushing operation is repeated multiple times, and the maximum value of each deviation value is taken as the repeatability error. The servo positioning mechanism is a precision motion execution device driven by a servo motor, which is used to push the mold from the mold opening and closing station to the preset detection position. The mold opening and closing station is the working position where the mold completes the opening or closing action. The preset detection position is a fixed spatial position that is pre-calibrated for visual inspection. If the repeatability error is less than or equal to the first threshold, the positioning accuracy is determined to meet the requirements. The first threshold is a preset value for determining whether the repeatability of the servo positioning mechanism meets the detection requirements. If the repositioning error is greater than the first threshold, the servo positioning mechanism is adjusted and re-detected until the repositioning error is less than or equal to the first threshold. A standard grayscale reference plate is fixedly installed next to the ring light source. The surface normal of the standard grayscale reference plate is parallel to the imaging optical axis of the industrial camera. The standard grayscale reference plate is an optical calibration plate with a standard reflectance grayscale value on its surface, which is used for subsequent photometric compensation. Its surface normal is a direction line that is perpendicular to the surface of the standard grayscale reference plate and points outward. Before the production line officially starts operation, the first data acquisition operation is performed during the first shift, and the second data acquisition operation is performed during the second shift. The first and second shifts are different shifts. The first shift is the first working shift of the production line, and the second shift is a different working shift. The first working shift refers to the first continuous working period of the day, such as 8:00 AM to 4:00 PM for the morning shift. The second shift is a different working period, such as 4:00 PM to midnight for the evening shift, or midnight to 8:00 AM for the night shift. The first data acquisition operation is the baseline image acquisition action performed during the first shift, and the second data acquisition operation is the baseline image acquisition action performed during the second shift. The third acquisition operation is performed under the first ambient temperature, and the fourth acquisition operation is performed under the second ambient temperature. The first and second ambient temperatures are different. The first ambient temperature refers to the first environmental temperature condition during the acquisition of the reference image, while the second ambient temperature is a different condition. The first environmental temperature condition during the acquisition of the reference image refers to the lower room temperature in the workshop when the equipment is turned on in the morning. The second ambient temperature is a different condition, such as the higher room temperature after continuous operation of the equipment in the afternoon, or the difference in room temperature between summer and winter. The third acquisition operation is the reference image acquisition action performed under the first ambient temperature, and the fourth acquisition operation is the reference image acquisition action performed under the second ambient temperature. The fifth acquisition operation is performed under the first light source brightness, and the sixth acquisition operation is performed under the second light source brightness. The first light source brightness is different from the second light source brightness. The first light source brightness is the first light source brightness condition during the acquisition of the reference image, and the second light source brightness is the second light source brightness condition that is different from the first light source brightness. The first light source brightness condition during the acquisition of the reference image refers to the ring light source being in the rated power full-brightness state. The second light source brightness is the second light source brightness condition that is different from the first light source brightness, such as the lower brightness state of the ring light source after long-term power attenuation, or the brightness state after the power is manually reduced. The fifth acquisition operation is the reference image acquisition action performed under the first light source brightness, and the sixth acquisition operation is the reference image acquisition action performed under the second light source brightness. The images acquired by the first, second, third, fourth, fifth, and sixth acquisition operations are combined to form a cross-condition image set; For each frame in the cross-condition image set, a region integrity determination is performed. That is, the acquired image is compared with a preset region of interest template to detect whether the pixel regions corresponding to the working zone, the flow divider, the welding chamber, and the rounded corners of each cavity are all within the image's field of view. If all of the above regions are within the image's field of view, it is determined that the image covers the working zone, the flow divider, the welding chamber, and the rounded corners of each cavity. If at least one of the above regions is not within the image's field of view, it is determined that the image does not cover at least one of the working zone, the flow divider, the welding chamber, and the rounded corners of each cavity. If the image covers the working zone, the flow divider, the welding chamber, and the rounded corners of each cavity, then the area is considered to be completely covered. If the image does not cover at least one of the following: working zone, flow channel, welding chamber, and rounded corners of each cavity, the area coverage is deemed incomplete and the image is re-acquired. Quality assessment is performed on images with complete region coverage: If the image sharpness is greater than the sharpness threshold and the image brightness is within the preset brightness range, the image is stored in the initial benchmark image library. Here, image sharpness is a quantitative indicator that characterizes the edge sharpness and detail resolution of an image, obtained by calculating the image gradient magnitude or edge contrast. The sharpness threshold is a preset value for determining whether an image meets the sharpness requirements of the training samples. Image brightness is a statistical measure of the grayscale value of the image pixels. The preset brightness range is the grayscale value range for determining whether the image exposure is normal. The initial benchmark image library is a data set that stores cross-condition benchmark images that have passed both the regional integrity judgment and the quality judgment. If the image sharpness is less than or equal to the sharpness threshold, or the image brightness exceeds the preset brightness range, the image will be discarded and re-acquired.

[0027] This embodiment also provides a method for constructing a normal texture feature memory based on latent vector features, specifically: Normal mold surface images are extracted from the initial benchmark image library, which covers multiple detection areas. These images are then divided into large-scale and small-scale image blocks. Specifically, the images are segmented into two scales of local regions according to a preset pixel size. The large-scale image blocks have larger pixel sizes than the small-scale image blocks. The large-scale image blocks cover the overall shape of the cavity and are used to capture its overall features. The small-scale image blocks cover the details of micro-scratches and grain boundaries and are used to capture these features. Adjacent image blocks have a preset overlap width. A normal mold surface image refers to a mold surface image acquired when the mold is in a normal, unworn state within the initial benchmark image library. The preset pixel size is the number of pixels in the length and width of the image block, for example, 64 pixels by 64 pixels for a large-scale image block and 32 pixels by 32 pixels for a small-scale image block. The preset overlap width is the pixel width of the overlapping area between adjacent image blocks, for example, eight pixels. The training sample set is obtained by combining large-scale and small-scale image patches. Constructing a convolutional autoencoder network involves building a neural network structure that includes an encoder branch and a decoder branch. The encoder branch consists of convolutional layers and fully connected layers connected sequentially, while the decoder branch consists of deconvolutional layers and fully connected layers connected sequentially. The output of the encoder branch is connected to the input of the decoder branch to form an end-to-end image reconstruction network structure. The encoder is used to compress the input image patch into a latent vector, and the decoder is used to reconstruct the latent vector into an output image patch. Image patches from the training sample set are input into a convolutional autoencoder network. The encoder obtains latent vectors, and the decoder obtains reconstructed image patches. The latent vectors obtained by the encoder are: inputting the image patch into the encoder branch, passing through the feature extraction of the convolutional layer and the dimensionality compression of the fully connected layer, and obtaining the latent vector with a dimension lower than that of the input image patch at the output of the encoder branch; and obtaining the reconstructed image patch by the decoder. The latent vectors are input into the decoder branch, passing through the dimensionality expansion of the fully connected layer and the upsampling reconstruction of the deconvolutional layer, and obtaining the reconstructed image patch with the same size as the input image patch at the output of the decoder branch. The reconstruction difference value between the reconstructed image block and the corresponding input image block is calculated. That is, the gray values ​​of the reconstructed image block and the corresponding input image block are compared pixel by pixel, and the gray value deviation of each pixel position is accumulated to obtain the reconstruction difference value that characterizes the overall degree of difference between the reconstructed image block and the input image block. The relationship between the reconstructed difference value and a first reconstruction threshold is determined. The first reconstruction threshold is a pre-set reconstruction accuracy threshold used to determine whether the single-batch training of the convolutional autoencoder network has converged. If the reconstruction difference value is greater than the first reconstruction threshold, adjust the network parameters of the convolutional autoencoder network and retrain. If the reconstruction difference value is less than or equal to the first reconstruction threshold, the current training batch is considered to have converged. Repeat the training until all training batches converge, fix the network parameters of the encoder, and use the fixed encoder as the feature extractor. All normal samples in the initial benchmark image library covering multiple detection areas will be input into the feature extractor to obtain the latent vector corresponding to each normal sample. The latent vectors corresponding to all normal samples are aggregated to construct a normal memory bank; Calculate the distribution range between each latent vector in the normal memory bank, that is, compare all latent vectors in the normal memory bank pairwise, calculate the maximum distance value and the minimum distance value between each latent vector, and take the interval between the maximum distance value and the minimum distance value as the distribution range; The relationship between the distribution range and a preset boundary threshold is determined, where the preset boundary threshold is a pre-defined threshold used to determine whether the dispersion of the latent vector distribution in the normal memory exceeds the allowable range. If the distribution range is greater than the preset boundary threshold, the boundary abnormal latent vector is removed and the distribution range is recalculated. The boundary abnormal latent vector is a latent vector whose distance from other latent vectors in the memory is greater than the preset boundary threshold during the distribution range calculation. This latent vector deviates from the main body of the normal roughness distribution. If the distribution range is less than or equal to the preset boundary threshold, the normal memory is determined to be completed. The normal memory is used to characterize the distribution boundary of normal roughness in the deep feature space.

[0028] Example 3 is an improvement on Example 2. In this example, a standard reference image is acquired, and the photometric compensation parameters are determined based on the standard reference image. Specifically: The detection system detects the mold arrival signal output by the production line control system. Specifically, it reads the digital or analog signal output by the production line control system through the control unit where the industrial camera is located to obtain the mold arrival signal that indicates whether the mold has reached the detection area. The read mold arrival signal is compared with a preset valid signal state. If the mold arrival signal is consistent with the preset valid signal state, the mold arrival signal is determined to be valid. If the mold arrival signal is inconsistent with the preset valid signal state, the mold arrival signal is determined to be invalid. The preset valid signal is the signal state output by the production line control system that indicates that the mold has reached the detection position, such as a digital high-level state. If the mold arrival signal is invalid, wait for the mold arrival signal to become valid; If the mold is in position signal is valid, the position deviation between the current position of the mold and the preset detection position is detected. That is, the current position coordinates of the mold are read by the position encoder or grating ruler installed on the servo positioning mechanism, and the spatial distance between the current position coordinates of the mold and the preset detection position coordinates is calculated to obtain the position deviation. The preset detection position is a fixed spatial position that is pre-calibrated for visual inspection. The relationship between the positional deviation and the first positional threshold is determined, where the first positional threshold is a pre-set maximum allowable positional deviation value used to determine whether the mold has accurately reached the preset detection position. If the position deviation is greater than the first position threshold, the mold position is adjusted by the servo positioning mechanism and the position deviation is re-detected. The adjustment of the mold position by the servo positioning mechanism means that the control unit sends a position compensation command to the servo positioning mechanism, and the servo positioning mechanism drives the mold to move towards the preset detection position according to the position compensation command. After the movement is completed, the position deviation is re-detected until the position deviation is less than or equal to the first position threshold. If the position deviation is less than or equal to the first position threshold, it is determined that the mold has reached the detection position; A timer is started. Within a preset stabilization period after the mold reaches the detection position, the relationship between the mold vibration amplitude and the vibration threshold is determined. The preset stabilization period is a pre-set waiting time from the mold reaching the detection position to image acquisition, used to eliminate mechanical vibration. The mold vibration amplitude is the maximum displacement of the mold obtained by vibration sensor or visual displacement detection within the preset stabilization period after the mold reaches the detection position. The vibration threshold is a pre-set maximum allowable vibration amount used to determine whether the mold is in a stable state. If the vibration amplitude is greater than the vibration threshold, the preset stabilization time is extended and the vibration amplitude is re-detected. If the vibration amplitude is less than or equal to the vibration threshold, it is determined that the stable window period has been entered. During the stable window period, the industrial camera is controlled to acquire a standard grayscale reference plate image. The actual brightness value of the reference plate area is extracted from the standard grayscale reference plate image. That is, during the stable window period, the industrial camera is controlled to take pictures of the standard grayscale reference plate fixedly installed next to the light source system to acquire the standard grayscale reference plate image. The reference plate area is located in the standard grayscale reference plate image, and the arithmetic mean of the grayscale values ​​of all pixels in the located area is calculated to obtain the actual brightness value. The reference plate area is the pixel area where the reference plate is located in the standard grayscale reference plate image. The reference plate is the fixedly installed standard grayscale reference plate mentioned in the establishment of a reference image library covering multiple detection areas. Its surface has a standard reflectivity grayscale value. The actual brightness value is compared with a preset reference brightness value to determine the relationship between the brightness deviation and the brightness deviation threshold. The preset reference brightness value is the reference grayscale value corresponding to a standard grayscale reference board under standard lighting conditions. The brightness deviation between the actual brightness value and the preset reference brightness value is the absolute value of the difference between the two values. The brightness deviation threshold is a preset maximum allowable brightness difference value used to determine whether compensation is needed under the current lighting conditions. If the brightness deviation is greater than the brightness deviation threshold, the photometric compensation coefficient is calculated, which is to calculate the ratio between the preset reference brightness value and the actual brightness value to obtain the photometric compensation coefficient used to adjust the overall brightness of the image. If the brightness deviation is less than or equal to the brightness deviation threshold, then the photometric compensation coefficient is set as the reference coefficient. During the stable window period, the industrial camera is controlled to capture images of the mold surface to obtain the original mold image. That is, during the stable window period, the industrial camera is controlled to directly capture images of the mold surface without brightness correction. The original mold image is subjected to global brightness correction based on the photometric compensation coefficient to obtain a photometric normalized image. This involves multiplying the gray value of each pixel in the original mold image with the photometric compensation coefficient and using the result as the corrected pixel gray value. After all pixels are corrected, a photometric normalized image is obtained. Calculate the global brightness mean of the photometric normalized image, which is to perform an arithmetic mean of the gray values ​​of all pixels in the photometric normalized image to obtain the global brightness mean. Determine the relationship between the global average brightness and a preset brightness range, where the preset brightness range is a pre-defined range of grayscale values ​​used to determine whether the exposure of a photometrically normalized image is normal, including a lower limit and an upper limit: If the global average brightness exceeds the preset brightness range, the standard grayscale reference image will be re-acquired and the photometric compensation coefficient will be recalculated. If the global average brightness is within the preset brightness range, the photometric normalization preprocessing is considered complete, and the photometric normalized image is used for subsequent time-series comparison.

[0029] This embodiment also provides the generation of time-series deviation curves corresponding to each detection partition, specifically: Obtain the standard reference image, determine the photometric normalized image in the photometric compensation parameters based on the standard reference image, and load the preset region of interest template. The preset region of interest template is a pre-stored pixel coordinate template used to define the spatial position of each detection zone on the mold surface. The pixel coordinate template includes the boundary coordinates of the working zone, the flow divider hole, the welding chamber, and the fillets of each cavity. The photometric normalized image is divided into several detection zones, including the working zone zone, the flow duct zone, the welding chamber zone, and the cavity fillet zone. For each detection partition, multi-scale image block division is performed, that is, each detection partition is divided into grids according to two preset pixel sizes to obtain large-scale image blocks and small-scale image blocks. The pixel size of the large-scale image block is larger than that of the small-scale image block. The large-scale image block covers the overall morphology area of ​​the cavity and is used to characterize the overall morphology and contour features of the cavity. The small-scale image block covers the micro-texture detail area and is used to characterize the micro-scratch density and grain boundary features. There is a preset overlap width between adjacent image blocks. The preset overlap width is the pixel width of the overlapping area between adjacent image blocks. This is used to avoid the loss of texture information at the partition boundary. The two preset pixel sizes are the number of pixels in length and width of the large-scale image block and the number of pixels in length and width of the small-scale image block, respectively. Large-scale image patches and small-scale image patches are sequentially input into the feature extractor in the normal texture feature memory constructed based on the latent vector features. The latent vector corresponding to each image patch is obtained through the feature extractor. For each detection partition, retrieve a set of reference latent vectors that correspond to the location of the detection partition and match its scale from the normal memory in the normal texture feature memory constructed based on the latent vector features; The deviation values ​​between the latent vectors of each image block in the detection partition and each reference latent vector in the reference latent vector set are calculated respectively. The maximum deviation value and the average deviation value of the detection partition are obtained. That is, the latent vector of a certain image block in the detection partition is calculated element by element with each reference latent vector in the reference latent vector set. The square root of the sum of the squares of the differences of each element is taken to obtain the deviation value between the image block and the reference latent vector. For a certain image block in the detection partition, the deviation value between it and all reference latent vectors in the reference latent vector set is calculated. The maximum value is selected as the maximum deviation value of the image block. The average deviation value of the image block is obtained by arithmetically averaging all the deviation values. The above operation is performed on all image blocks in the detection partition. The maximum deviation value and the average deviation value of the detection partition are obtained by summing them. The relationship between the maximum deviation value and the average deviation value is determined by a preset multiple, where the preset multiple is a pre-defined proportional coefficient used to determine whether the maximum deviation value belongs to an abnormal mutation. If the maximum deviation value is greater than a preset multiple of the average deviation value, the maximum deviation value is identified as the distance value of the detection partition, wherein the distance value of the detection partition is a single numerical indicator characterizing the degree of abnormality of the current texture state of the detection partition. If the maximum deviation is less than or equal to a preset multiple of the average deviation, the average deviation will be taken as the distance value of the detection zone. The distance value is stored in the time-series data queue of the corresponding detection partition. The time-series data queue is a data queue that stores the distance values ​​obtained from each detection of the detection partition in chronological order. Determine the relationship between the amount of data in the time series data queue and the preset time series length, where the preset time series length is the minimum number of data points required to construct the time series curve. If the data volume is less than the preset time length, the acquisition of the standard reference image is re-executed, and the photometric compensation parameters are determined based on the standard reference image to obtain the next frame of photometric normalized image; If the amount of data is greater than or equal to the preset time series length, the time series data queue is determined to constitute a time series curve. That is, when the amount of data in the time series data queue is greater than or equal to the preset time series length, the distance values ​​arranged in chronological order in the time series data queue are used as the vertical axis, and the corresponding detection time is used as the horizontal axis. The data points are connected in sequence to form a time series curve for trend analysis.

[0030] This embodiment also provides continuous trend analysis of the time series deviation curve, specifically: Obtain the timing curves from the timing deviation curves corresponding to each detection partition, and divide the timing curves into several continuous timing segments according to the preset parsing length. The preset parsing length is the number of data points that are pre-set to divide the timing curves into several continuous timing segments. For each time series segment, the direction of change between adjacent data points within that time series segment is obtained sequentially. That is, for two adjacent data points arranged in chronological order within the time series segment, the size relationship between the latter data point and the former data point is compared. If the latter data point is greater than the former data point, the direction of change is upward; if the latter data point is less than the former data point, the direction of change is downward; if the two are equal, the direction of change is flat. The number of consecutive data points with the same direction of change within a time series is counted to obtain the duration of the same direction of change within that time series. For example, if there are data points 1, 2, 3, 4, and 5, and the directions of change from 1 to 2, 3 to 4, and 4 to 5 are the same, then the directions of change between data points 3 and 4, and between data points 4 and 5 are the same and continuous, forming two consecutive pairs of adjacent data points with the same direction of change. Therefore, the duration of the same direction of change within that time series is 2. The relationship between the duration of the same direction and a first trend threshold is determined, wherein the first trend threshold is a pre-set minimum duration threshold for determining whether a time segment has directional drift. If the duration of the same direction is less than or equal to the first trend threshold, the change pattern of the time series segment is determined to be an undirected random oscillation, and the time series segment is marked as a normal roughness state. If the duration of the same direction is greater than the first trend threshold, then the cumulative offset of the distance value from the starting data point to the ending data point within the time segment is calculated. That is, the distance value of the starting data point and the distance value of the ending data point of the time segment are taken, and the absolute value of the difference between the two is calculated to obtain the cumulative offset. The relationship between the cumulative offset and the second trend threshold is determined, where the second trend threshold is a pre-set minimum cumulative offset threshold used to determine whether there is directional drift in the time series. If the cumulative offset is less than or equal to the second trend threshold, the change pattern of the time series segment is determined to be an undirected random oscillation, and the time series segment is marked as a normal roughness state. If the cumulative offset is greater than the second trend threshold, it is determined that there is directional drift in the time segment and the time segment is marked as a suspected wear state. Obtain the partition identifier of the current inspection zone. The partition identifier includes the working zone identifier, the flow diversion hole identifier, the welding chamber identifier, and the cavity fillet identifier. The partition identifier is obtained by loading a preset region of interest template. Each inspection zone in the template has a unique identifier code. Determining whether the zone identifier matches the preset high-frequency wear zone identifier means comparing the zone identifier of the current detection zone with the preset high-frequency wear zone identifier. If they match, they are considered to match; if they do not match, they are considered to not match. The preset high-frequency wear zone identifier is a pre-set detection zone label used to identify that the wear rate of the mold surface is higher than that of other areas. If the partition identifier matches the preset high-frequency wear partition identifier, then the first trend threshold is set to the first value, and the second trend threshold is set to the second value. If the partition identifier does not match the preset high-frequency wear partition identifier, the first trend threshold is set to the third value, and the second trend threshold is set to the fourth value. Among them, the third value is less than the first value, and the fourth value is less than the second value; For time segments marked as suspected wear states, obtain the change direction of their subsequent adjacent time segments, that is, obtain the next time segment immediately adjacent to the time segment on the time curve. For the adjacent data points arranged in chronological order within the subsequent adjacent time segments, compare the size relationship between the next data point and the previous data point in turn to determine the change direction of each pair of adjacent data points and count the dominant change direction within the subsequent adjacent time segments. Determine whether the direction of change in subsequent adjacent time segments is consistent with the direction of change in the time segment of suspected wear state; If the direction of change is consistent, the suspected wear condition marker is maintained; If the direction of change is inconsistent, the suspected wear condition mark will be removed, and the surface roughness will be restored to normal.

[0031] This embodiment also provides a joint verification based on the mutation stability corresponding to the directional drift feature, specifically: Obtain the state markers of time segments in the continuous trend analysis of time series deviation curves; If the status marker is not a suspected wear state, then the time segment is determined to have passed the double check and maintained a normal roughness state; If the status is marked as suspected wear, then extract the local sequence of the time series curve corresponding to that time segment; Perform stability analysis on the local sequence: Calculate the fluctuation difference between adjacent data points in the local sequence. That is, for two adjacent data points arranged in chronological order in the local sequence, calculate the absolute value of the difference between the latter data point and the former data point to obtain the fluctuation difference between the adjacent data point pair. To obtain the maximum and minimum volatility difference, we select the maximum value from all calculated volatility differences as the maximum volatility difference and the minimum value as the minimum volatility difference. Calculate the volatility range between the maximum volatility difference and the minimum volatility difference, that is, calculate the absolute value of the difference between the maximum volatility difference and the minimum volatility difference to obtain the volatility range; If the fluctuation range is within the preset stable range, the fluctuation mode of the local sequence is determined to be random oscillation, and the state label of the time segment is corrected from suspected wear state to normal roughness state. The preset stable range is a pre-set allowable range of fluctuation range used to determine whether the fluctuation of the local sequence is in a random stable state, including upper and lower limits. If the fluctuation range exceeds the preset stable range, then perform variation characteristic analysis; The first channel state marker and the second channel state marker of the time series segment are obtained. The first channel state marker is the time series segment state marker output by the continuous change trend analysis of the time series deviation curve, including suspected wear state and normal roughness state. The second channel state marker is the state marker output by the variation feature analysis in the joint verification based on the variation stability corresponding to the directional drift feature, including statistically significant unidirectional trend and symmetric random oscillation. Determine whether the status marker of the first channel is in a suspected wear state and whether the status marker of the second channel is a statistically significant unidirectional trend; If the status marker of the first channel is not a suspected wear state, or the status marker of the second channel is not a statistically significant unidirectional trend, then the double verification is deemed to have failed, and the time segment is marked as a normal roughness state. If the first channel status is marked as suspected wear and the second channel status is marked as statistically significant unidirectional trend, then the double verification is deemed to have passed and the time segment is marked as wear confirmed. Perform variant feature analysis, specifically: Extract the continuously increasing subsequence and the continuously decreasing subsequence from the local sequence. The continuously increasing subsequence is the sequence of consecutive data points in the local sequence that are arranged in chronological order and whose adjacent data points increase sequentially. The continuously decreasing subsequence is the sequence of consecutive data points in the local sequence that are arranged in chronological order and whose adjacent data points decrease sequentially. Obtain the lengths of consecutively increasing subsequences and consecutively decreasing subsequences respectively. That is, count the number of data points contained in consecutively increasing subsequences to obtain their lengths, and count the number of data points contained in consecutively decreasing subsequences to obtain their lengths. Calculate the absolute value of the difference between the length of a consecutive increasing subsequence and the length of a consecutive decreasing subsequence; Determine the relationship between the absolute value of the difference and a preset asymmetric threshold, wherein the preset asymmetric threshold is a pre-set threshold used to determine whether the difference between the length of a continuously increasing subsequence and the length of a continuously decreasing subsequence is significant; If the absolute value of the difference is less than or equal to the preset asymmetry threshold, the variation mode of the local sequence is determined to be symmetric random oscillation, and the state label of the time segment is corrected from suspected wear state to normal roughness state. The variation mode is the feature category presented by the data change in the local sequence, including symmetric random oscillation and statistically significant unidirectional trend. If the absolute value of the difference is greater than the preset asymmetry threshold, the variation pattern of the local sequence is determined to be a statistically significant unidirectional trend.

[0032] Example 4 is an improvement on Example 3. In this example, the normal texture feature memory is updated, specifically as follows: Obtain the dual verification results in the joint verification based on the variation stability corresponding to the directional drift feature, extract the latent vector of the sample marked as normal roughness state, and obtain the normal sample to be included in the database. Get the current cumulative production count of the mold, which is the cumulative number of workpieces produced by the mold since the last normal memory update was completed; Determine the relationship between the cumulative mold production count and the preset update production threshold, where the preset update production threshold is a pre-set cumulative production value used to trigger a normal memory update operation: If the cumulative production count of the mold is less than the preset update production threshold, the current normal memory will remain unchanged. If the cumulative production count of the mold is greater than or equal to the preset update production threshold, then the normal memory bank update operation is performed. That is, the hidden vectors of the normal samples to be added to the normal memory bank are added, the storage duration of each historical sample hidden vector in the normal memory bank is obtained, the historical sample hidden vectors with a storage duration greater than the preset fade-out duration threshold are removed from the normal memory bank, the size relationship between the total number of samples after the update and the upper limit of the preset memory bank size is determined, and the historical sample hidden vectors exceeding the limit are removed in order of storage duration from long to short. The distribution range between each hidden vector in the normal memory bank after the update is recalculated to obtain the updated distribution boundary. Add the latent vectors of normal samples to be added to the normal memory; Obtain the storage duration of each historical sample latent vector in the normal memory, and remove historical sample latent vectors whose storage duration exceeds the preset fade-out duration threshold from the normal memory. The storage duration of each historical sample latent vector is the length of time that the historical sample latent vector has been stored in the normal memory, and the preset fade-out duration threshold is the maximum allowed storage duration that is preset to determine whether a historical sample latent vector should be removed from the normal memory. Determine the relationship between the total number of samples in the updated normal memory and the preset upper limit of the memory size, where the preset upper limit of the memory size is the maximum number of latent vectors allowed to be stored in the normal memory in a pre-defined manner: If the total number of samples exceeds the preset memory size limit, the hidden vectors of the excess historical samples are removed from the normal memory in descending order of storage duration until the total number of samples is less than or equal to the preset memory size limit. If the total number of samples is less than or equal to the preset upper limit of the memory size, the current normal memory size will be maintained. Based on the updated normal memory, the distribution range between each latent vector is recalculated to obtain the updated distribution boundary. That is, all latent vectors in the updated normal memory are compared pairwise to calculate the maximum and minimum distance values ​​between each latent vector. The interval between the maximum and minimum distance values ​​is taken as the updated distribution boundary. Calculate the boundary change between the updated distribution boundary and the original distribution boundary, that is, calculate the absolute value of the difference between the corresponding endpoint values ​​of the updated distribution boundary and the original distribution boundary, and take the maximum value of the endpoint difference as the boundary change. If the boundary change exceeds the preset boundary change threshold, the reference is determined to have an abnormal offset. A reference abnormality alarm signal is output and the current normal memory update is paused. The preset boundary change threshold is the maximum allowable boundary change that is preset to determine whether the reference has an abnormal offset after a normal memory update. The output reference abnormality alarm signal is the alarm information generated by the system when the boundary change exceeds the preset boundary change threshold to prompt the operator that the reference has an abnormal offset. This alarm information triggers the pause of the current normal memory update operation. If the boundary change is less than or equal to the preset boundary change threshold, the baseline mild adaptation is determined to be complete. The updated distribution boundary is then used as the new normal roughness distribution boundary. The cumulative production count of the mold is reset to zero, and the process waits for the next update trigger.

[0033] This embodiment also provides a graded determination of the wear state of each detection zone, specifically as follows: The trend intensity level and stability confidence level of each detection partition are obtained. The trend intensity level is a grading index characterizing the intensity of directional drift over a time series, including three levels: high, medium, and low. It is obtained by mapping the cumulative offset and the duration of the same direction to the corresponding trend thresholds through continuous trend analysis of the time series deviation curve. If the cumulative offset is greater than the second trend threshold and the duration of the same direction is greater than the first trend threshold, the trend intensity level is high. If both the cumulative offset and the duration of the same direction are near the corresponding threshold boundaries, the trend intensity level is medium. If the cumulative offset is less than or equal to the second trend threshold or the duration of the same direction is less than or equal to the first trend threshold, the trend intensity level is low. If the potential threshold is not met, the trend strength level is low. The stability confidence level is a graded index that characterizes the statistical significance of the variation pattern, including three levels: high, medium, and low. It is obtained by mapping the fluctuation range and the absolute value of the difference to the corresponding thresholds through joint verification of the variation stability based on the directional drift characteristics. If the fluctuation range exceeds the preset stability range and the absolute value of the difference is greater than the preset asymmetric threshold, the stability confidence level is high. If the fluctuation range and the absolute value of the difference partially meet the threshold conditions, the stability confidence level is medium. If the fluctuation range is within the preset stability range and the absolute value of the difference is less than or equal to the preset asymmetric threshold, the stability confidence level is low. Determine whether the trend strength level is high and whether the stability confidence level is high; If the trend intensity level is high and the stability confidence level is high, the detection zone is marked as wear confirmation state, and a progressive uniform wear confirmation signal is output. A mold repair suggestion command or a replacement suggestion command is generated. The progressive uniform wear confirmation signal is the status indicator signal generated by the system to confirm the existence of progressive uniform wear in the detection zone when the trend intensity level is high and the stability confidence level is high. This signal triggers the subsequent mold repair or replacement decision process, and the generated mold repair suggestion command or replacement suggestion command is the control command issued by the system to the operator in the wear confirmation state. The mold repair suggestion command is used to suggest repairing the mold, and the replacement suggestion command is used to suggest replacing the mold as a whole. The specific decision is determined based on the degree of wear and the mold's remaining life assessment results. If the trend strength level is not high or the stability confidence level is not high, then determine whether the trend strength level is high and whether the stability confidence level is medium. If the trend strength level is high and the stability confidence level is medium, then the detection partition is marked as observation state, the subsequent detection interval of the detection partition is shortened, the sampling density of the detection partition is increased, the memory comparison range of the detection partition is expanded, and a suggestion instruction to strengthen product size sampling inspection is generated. Here, expanding the memory comparison range of the detection partition means that, in the observation state, the reference latent vector set used for calculating the latent vector deviation of the detection partition is expanded from the default recent normal samples to normal samples over a larger time span, including latent vectors from more historical normal memory, in order to improve the comparison reliability. The suggestion instruction to strengthen product size sampling inspection is that the system issues a control instruction to the quality control unit to increase the control of the detection frequency and sample size of the product size produced by the corresponding mold. If the trend strength level is not high or the stability confidence level is not medium, then determine whether the trend strength level is medium and whether the stability confidence level is medium. If the trend strength level is median and the stability confidence level is moderate, then the detection zone is marked as normal roughness state; If the trend strength level is not median or the stability confidence level is not moderate, then determine whether the trend strength level is low and whether the stability confidence level is low. If the trend intensity level is low and the stability confidence level is low, then the detection zone is marked as an environmental interference state, and an inspection light source system instruction and an inspection positioning mechanism instruction are generated. These are the control instructions issued by the system to the maintenance personnel under the environmental interference state. The inspection light source system instruction is used to suggest the detection of the ring light source brightness stability, the standard grayscale reference plate position, and the light source aging condition. The inspection positioning mechanism instruction is used to suggest the detection of the servo positioning mechanism repeatability and the accuracy of the mold positioning signal. If the trend intensity level is not low or the stability confidence level is not low, then the detection zone is marked as an environmental interference state, and inspection instructions for the light source system and inspection instructions for the positioning mechanism are generated. The status markers, trend intensity levels, stability confidence levels, and corresponding generated instructions for each detection zone are stored in the historical trend database to update the mold's full life cycle health record. The mold's full life cycle health record is a database collection that records the detection data, status markers, trend changes, maintenance records, and decision instructions of the mold from its use to its scrapping, which is used to support the long-term tracking and predictive maintenance of the mold's health status.

[0034] In this embodiment, a normal memory bank is constructed by deep embedding feature training and cross-condition benchmark acquisition. Combined with multi-scale texture coding, the progressive wear signal is effectively amplified. By tracking the temporal evolution trend and verifying the stability of the variation, the directional drift of wear and the random oscillation of normal roughness are accurately distinguished, reducing the false alarm rate and the missed detection rate. Through dynamic baseline sliding update and hierarchical closed-loop decision-making, the benign aging of the mold is adaptively tracked and managed throughout its entire life cycle, avoiding blind shutdown.

Claims

1. An online visual inspection method for wear measurement of irregularly shaped steel molds, characterized in that: include: An industrial camera, telecentric lens and controllable light source are set up at the mold inspection station. The mold is moved to the inspection position by the positioning mechanism to collect images of the mold surface under normal conditions under different working conditions and establish a benchmark image library covering multiple inspection areas. A feature encoding model is trained based on a benchmark image library to extract latent vector features corresponding to the surface texture of a normal mold, and a normal texture feature memory library is constructed based on the latent vector features. During online inspection, image acquisition is triggered synchronously to obtain a standard reference image. Based on the standard reference image, photometric compensation parameters are determined, and the mold image is photometrically normalized. The normalized mold image is divided into multiple detection partitions and multi-scale image blocks. The corresponding latent vectors are obtained through the feature encoding model. Based on the feature offset relationship between the current latent vector and the normal texture feature memory, the temporal deviation curves corresponding to each detection partition are generated. Continuous trend analysis of time series deviation curves is performed, and directional drift characteristics that are different from random fluctuations are identified based on the degree of deviation, direction of change, and persistence. Based on the variation stability corresponding to the directional drift characteristics, a joint verification is performed. When the directional drift satisfies the continuous change condition and the stability constraint condition, it is determined that the corresponding detection zone has a progressive wear trend. By utilizing the latent vectors corresponding to samples with uncertain progressive wear trends, the normal texture feature memory is updated using a sliding window approach. Based on the results of directional drift strength and stability verification, the wear status of each detection zone is graded and the wear detection results are output.

2. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Establish a benchmark image library covering multiple detection regions, specifically as follows: A high-resolution industrial camera and a low-distortion telecentric lens are mounted next to the mold opening and closing station using a shockproof mounting bracket, with the imaging optical axis of the industrial camera perpendicular to the surface of the mold to be inspected. A multi-angle controllable ring light source is arranged on the light-emitting side of the telecentric lens; The mold is pushed from the mold opening and closing station to the preset detection position by the servo positioning mechanism to detect the repeatability error of the servo positioning mechanism; If the repeated positioning error is less than or equal to the first threshold, the positioning accuracy is deemed to meet the requirements. If the repositioning error is greater than the first threshold, the servo positioning mechanism is adjusted and re-detected until the repositioning error is less than or equal to the first threshold. A standard grayscale reference plate is fixedly installed next to the ring light source; Before the production line officially starts operating, the first data acquisition operation is performed on the first shift, and the second data acquisition operation is performed on the second shift. The third data acquisition operation is performed under the first ambient temperature, and the fourth data acquisition operation is performed under the second ambient temperature. The fifth acquisition operation is performed under the brightness of the first light source, and the sixth acquisition operation is performed under the brightness of the second light source. The images acquired by the first, second, third, fourth, fifth, and sixth acquisition operations are combined to form a cross-condition image set; Perform region integrity determination on each frame of the cross-conditional image set; Quality assessment is performed on images with complete area coverage.

3. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: A normal texture feature memory is constructed based on latent vector features, specifically as follows: Normal mold surface images are extracted from the initial benchmark image library that covers multiple detection areas, and the normal mold surface images are divided into large-scale image blocks and small-scale image blocks. The training sample set is obtained by combining large-scale and small-scale image patches. Construct a convolutional autoencoder network; Image patches from the training sample set are input into a convolutional autoencoder network. The encoder obtains the latent vectors, and the decoder obtains the reconstructed image patches. Calculate the reconstruction difference between the reconstructed image patch and the corresponding input image patch; Determine the relationship between the reconstructed difference value and the first reconstruction threshold; Repeat the training until all training batches converge, fix the network parameters of the encoder, and use the fixed encoder as the feature extractor. All normal samples in the initial benchmark image library covering multiple detection areas will be input into the feature extractor to obtain the latent vector corresponding to each normal sample. The latent vectors corresponding to all normal samples are aggregated to construct a normal memory bank; Calculate the distribution range of each latent vector in the normal memory; Determine the relationship between the distribution range and the preset boundary threshold.

4. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Obtain a standard reference image, and determine the photometric compensation parameters based on the standard reference image, specifically as follows: Detect the mold positioning signal output by the production line control system; If the mold arrival signal is invalid, wait for the mold arrival signal to become valid; If the mold positioning signal is valid, the positional deviation between the current mold position and the preset detection position is detected. Determine the relationship between the positional deviation and the first positional threshold. Start the timer and determine the relationship between the vibration amplitude of the mold and the vibration threshold within a preset stabilization time after the mold reaches the detection position. During the stable window period, the industrial camera is controlled to acquire standard grayscale reference board images, and the actual brightness values ​​of the reference board area are extracted from the standard grayscale reference board images. The actual brightness value is compared with the preset reference brightness value to determine the relationship between the brightness deviation between the actual brightness value and the preset reference brightness value and the brightness deviation threshold. During the stable window period, control the industrial camera to acquire images of the mold surface and obtain the original mold image; The original mold image is subjected to global brightness correction based on the photometric compensation coefficient to obtain a photometric normalized image; Calculate the global mean brightness of the photometrically normalized image; Determine the relationship between the global average brightness and the preset brightness range.

5. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Generate the time-series deviation curves for each detection partition, specifically as follows: Obtain a standard reference image, determine the photometric normalized image in the photometric compensation parameters based on the standard reference image, and load a preset region of interest template; The photometric normalized image is divided into several detection zones; For each detection partition, multi-scale image block division is performed to obtain large-scale image blocks and small-scale image blocks; Large-scale image patches and small-scale image patches are sequentially input into the feature extractor in the normal texture feature memory constructed based on the latent vector features. The latent vector corresponding to each image patch is obtained through the feature extractor. For each detection partition, retrieve a set of reference latent vectors that correspond to the location of the detection partition and match its scale from the normal memory in the normal texture feature memory constructed based on the latent vector features; Calculate the deviation between the latent vector of each image block in the detection partition and the reference latent vector in the reference latent vector set, and obtain the maximum deviation and average deviation of the detection partition. Determine the relationship between the maximum deviation value and a preset multiple of the average deviation value; Store the distance value into the time-series data queue of the corresponding detection partition; Determine the relationship between the amount of data in the time-series data queue and the preset time-series length.

6. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Continuous trend analysis of the time series deviation curve is performed, specifically as follows: Obtain the timing curve from the timing deviation curve corresponding to each detection partition, and divide the timing curve into several continuous timing segments according to the preset parsing length; For each time series segment, the direction of change between adjacent data points within that time series segment is obtained sequentially; The number of consecutive data points with the same direction of change within the time series is counted to obtain the duration of the same direction in the time series. Determine the relationship between the duration of the same direction and the first trend threshold; Determine the relationship between the cumulative offset and the second trend threshold; Obtain the partition identifier of the currently detected partition; Determine whether the partition identifier matches the preset high-frequency wear partition identifier; If the partition identifier matches the preset high-frequency wear partition identifier, then the first trend threshold is set to the first value, and the second trend threshold is set to the second value. If the partition identifier does not match the preset high-frequency wear partition identifier, the first trend threshold is set to the third value, and the second trend threshold is set to the fourth value. For time segments marked as suspected wear states, obtain the direction of change of their subsequent adjacent time segments; Determine whether the direction of change in subsequent adjacent time segments is consistent with the direction of change in the time segment of suspected wear state; If the direction of change is consistent, the suspected wear condition marker is maintained; If the direction of change is inconsistent, the suspected wear condition mark will be removed, and the surface roughness will be restored to normal.

7. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Joint verification is performed based on the mutation stability corresponding to the directional drift characteristics, specifically as follows: Obtain the state markers of time segments in the continuous trend analysis of time series deviation curves; If the status marker is not a suspected wear state, then the time segment is determined to have passed the double check and maintained a normal roughness state; If the status is marked as suspected wear, then extract the local sequence of the time series curve corresponding to that time segment; Perform stability analysis on the local sequence; Obtain the status flags of the first and second channels for this time segment; Determine whether the status marker of the first channel is in a suspected wear state and whether the status marker of the second channel is a statistically significant unidirectional trend; If the status marker of the first channel is not a suspected wear state, or the status marker of the second channel is not a statistically significant unidirectional trend, then the double verification is deemed to have failed, and the time segment is marked as a normal roughness state. If the first channel status is marked as suspected wear and the second channel status is marked as statistically significant unidirectional trend, then the double verification is deemed to have passed, and the time segment is marked as wear confirmed.

8. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: Update the normal texture feature memory, specifically: Obtain the dual verification results in the joint verification based on the variation stability corresponding to the directional drift feature, extract the latent vector of the sample marked as normal roughness state, and obtain the normal sample to be included in the database. Get the current cumulative production count of the mold; Determine the relationship between the cumulative mold production count and the preset update production threshold; Add the latent vectors of normal samples to be added to the normal memory; Obtain the storage duration of each historical sample latent vector in the normal memory, and remove the historical sample latent vectors whose storage duration exceeds the preset fade-out duration threshold from the normal memory; Determine the relationship between the total number of samples in the updated normal memory and the preset upper limit of the memory size; Based on the updated normal memory, the distribution range between each latent vector is recalculated to obtain the updated distribution boundary. Calculate the boundary change between the updated distribution boundary and the original distribution boundary; If the boundary change exceeds the preset boundary change threshold, it is determined that the reference has shifted abnormally, a reference abnormality alarm signal is output, and the current normal memory update is paused. If the boundary change is less than or equal to the preset boundary change threshold, the baseline mild adaptation is determined to be complete. The updated distribution boundary is then used as the new normal roughness distribution boundary. The cumulative production count of the mold is reset to zero, and the process waits for the next update trigger.

9. The online visual inspection method for wear of irregular steel molds according to claim 1, characterized in that: The wear condition of each detection zone is graded and determined as follows: Obtain the trend intensity level and stability confidence level of each detection zone; Determine whether the trend strength level is high and whether the stability confidence level is high; If the trend intensity level is high and the stability confidence level is high, then the detection zone is marked as wear confirmation state, a progressive uniform wear confirmation signal is output, and a mold repair suggestion command or a replacement suggestion command is generated. If the trend strength level is not high or the stability confidence level is not high, then determine whether the trend strength level is high and whether the stability confidence level is medium. If the trend strength level is high and the stability confidence level is medium, then the detection zone is marked as an observation zone, the subsequent detection interval of the detection zone is shortened, the sampling density of the detection zone is increased, the memory comparison range of the detection zone is expanded, and an instruction to strengthen product size sampling inspection is generated. If the trend strength level is not high or the stability confidence level is not medium, then determine whether the trend strength level is medium and whether the stability confidence level is medium. If the trend strength level is median and the stability confidence level is moderate, then the detection zone is marked as normal roughness state; If the trend strength level is not median or the stability confidence level is not moderate, then determine whether the trend strength level is low and whether the stability confidence level is low. If the trend intensity level is low and the stability confidence level is low, then the detection zone is marked as an environmental interference state, and inspection instructions for the light source system and inspection instructions for the positioning mechanism are generated. If the trend intensity level is not low or the stability confidence level is not low, then the detection zone is marked as an environmental interference state, and inspection instructions for the light source system and inspection instructions for the positioning mechanism are generated. The status markers, trend intensity levels, stability confidence levels, and corresponding generated instructions for each detection zone are stored in the historical trend database to update the mold's full lifecycle health record.