Printer injection mold surface defect detection method based on visual detection
By integrating data quality, model stability, and material optical property indices, a comprehensive detection confidence level is generated, which solves the problems of misjudgment and missed detection in the detection of surface defects in printer injection molds, and realizes high-precision and high-reliability online detection.
Patent Information
- Application Number
- CN202610586076.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies for detecting surface defects in printer injection molds are prone to missed detections or false alarms when image quality fluctuates, model predictions are unstable, or material optical properties deviate from standards, making it difficult to meet the requirements for high-precision and high-reliability online detection.
By integrating data quality index, model stability index, and material optical property index, a comprehensive detection confidence level is generated. Based on multi-level threshold graded response, a quantifiable, traceable, and graded reliability detection method is constructed to quantitatively evaluate the detection results.
It significantly improves detection accuracy and robustness, overcomes misjudgment and missed detection caused by image quality fluctuations, inconsistent model predictions and material optical differences, and balances detection efficiency and quality control.
Smart Images

Figure CN122434890A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, specifically to a visual inspection-based method for detecting surface defects in printer injection molds. Background Technology
[0002] As precision forming tools, the surface quality of printer injection molds directly affects the assembly accuracy and appearance consistency of printer components. In recent years, automatic detection methods based on machine vision and deep learning have been gradually applied to the field of surface defect detection of injection molds. However, when image quality fluctuates, model prediction is unstable, or material optical properties deviate from the standard, the system is prone to missed detections or false alarms, making it difficult to meet the high-precision and high-reliability online detection requirements of printer injection molds. Therefore, constructing a quantitative evaluation method that can integrate imaging quality, model stability, and material optical properties and output a comprehensive detection confidence level can achieve quantifiable, traceable, and graded reliability assessment of detection results, significantly improving the reliability and compliance of surface defect detection of printer injection molds.
[0003] The prior art, disclosed in CN119600026B, discloses a surface defect detection method and apparatus based on machine vision. This technology includes: performing parameter analysis on the image quality parameters corresponding to a casting surface image to determine the image accuracy index of the casting surface image; if the image accuracy index of the casting surface image is not less than an accuracy index threshold; if the regional feature parameters are less than a preset regional standard feature threshold, then performing defect detection on the corresponding casting region image; if the regional feature parameters are not less than the preset regional standard feature threshold, then marking the corresponding casting region image as a defect image to be detected; and comparing the regional defect parameters with a preset surface defect standard index in a casting detection library. In this embodiment, the machine vision-based surface defect detection method divides the casting surface image into multiple regions and extracts features from each region, enabling more detailed analysis of the casting surface condition and improving detection accuracy.
[0004] However, the aforementioned existing technologies generally lack real-time quantitative evaluation of image acquisition quality, and do not incorporate the consistency of AI vision model output under repeated testing and input perturbation, as well as the differences in the optical properties of the mold material itself, into the comprehensive judgment of detection confidence. Therefore, when image quality fluctuates, model prediction is unstable, or the optical properties of the material deviate from the standard, it is easy to produce missed detections or false alarms, making it difficult to meet the high-precision and high-reliability online inspection requirements of printer injection molds.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this invention is to provide a vision-based inspection method for detecting surface defects in printer injection molds, thereby addressing the problems mentioned in the background section. This invention generates a comprehensive detection confidence level by fusing data quality indices, model stability indices, and material optical property indices, and then grades the response based on multi-level thresholds. This method overcomes misjudgments and missed detections caused by image quality fluctuations, model inconsistencies, and material optical differences, significantly improving detection accuracy and robustness while balancing efficiency and quality control.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A vision-based inspection method for detecting surface defects in printer injection molds includes the following steps: S1: Collect basic image quality parameters, including signal-to-noise ratio, sharpness, illumination uniformity, and motion blur; weight and fuse the basic image quality parameters with the signal-to-noise ratio reference value, sharpness reference value, and maximum motion blur tolerance value to generate a data quality index, which is used to quantify the physical fidelity of the acquired image; S2: Collect model stability feature data, including repeatability accuracy, mean prediction confidence, and feature vector stability; and weight and fuse the stability feature parameters with the maximum allowable value of repeatability accuracy to generate a model stability index; the model stability index is used to characterize the consistency of the output results of the AI visual detection model under repeated testing and input perturbation conditions; and generate a basic uncertainty index based on the data quality index and the model stability index. S3: Collect material optical characteristic parameters, including near-infrared reflection peak position variation, standard color difference, and fluorescence intensity ratio; combine the optical characteristic parameters with the maximum allowable threshold for near-infrared reflection peak position variation and the maximum allowable threshold for color difference to generate a material optical property index; the material optical property index is used to quantify the consistency between the mold material itself and the standard material. S4: Generate the final comprehensive detection confidence level based on the basic uncertainty index and the material optical property index; set a preset threshold, and output the detection result directly when the confidence level is higher than the high threshold; add a medium confidence level label and suggest random inspection when the confidence level is between the medium and high thresholds; trigger a re-inspection when the confidence level is between the low and medium thresholds; and alarm and stop the machine when the confidence level is lower than the low threshold.
[0008] Furthermore, the data quality index is calculated using the following formula: in: Signal-to-noise ratio; This is a reference value for the signal-to-noise ratio. For clarity; This is a reference value for image clarity. For uniformity of illumination; For motion blur; This represents the maximum tolerance value for motion blur. The signal-to-noise ratio (SNR) compliance coefficient; The resolution compliance factor; The motion blur quality retention coefficient; These are the weighting coefficients for the signal-to-noise ratio compliance coefficient, sharpness compliance coefficient, illumination uniformity, and motion blur quality retention coefficient, respectively. .
[0009] Furthermore, the system implements differentiated control strategies based on the different ranges of the data quality index: when the data quality index is in a high range, it indicates that the image quality meets the detection requirements, and the system performs defect judgment and outputs results normally; when the data quality index is in a medium range, the system outputs defect judgment results along with image quality prompts, suggesting that operators pay attention to the maintenance status of the imaging system; when the data quality index is in a low range, the system pauses the output of defect judgment results and automatically triggers corrective measures; when the data quality index is in the lowest range, the system stops detection and issues an alarm signal.
[0010] Furthermore, the model stability index is calculated using the following formula: in: For repeatability accuracy; This represents the maximum permissible value for repeatability accuracy. To predict the mean confidence level; For eigenvector stability; The repeatability compliance coefficient is used to quantify the degree to which the model's repeatability accuracy meets the standard relative to the maximum permissible repeatability error. These are: the repeatability qualification coefficient, the mean prediction confidence score, and the weighting coefficients for eigenvector stability, which satisfy... And α>β>γ>0.
[0011] Furthermore, the system periodically calculates the model stability index at preset time intervals and compares it with historical baselines. When the model stability index value remains above the high standard for several consecutive periods, it indicates that the model performance is stable, and the current version continues to run. When the model stability index value falls below the median standard for a single time, the system automatically records the event and increases the model evaluation frequency. When the model stability index value is below the median standard for three consecutive periods, it is determined that the model has drifted significantly. The system automatically sends a model update request to the cloud server, downloads the retrained new version of the model, and completes the version switch offline. When the model stability index value falls below the low standard, the system immediately suspends the use of the model, forces a rollback to the previous stable version, and issues a maintenance alarm.
[0012] Furthermore, a basic uncertainty index is generated based on the data quality index and the model stability index. This basic uncertainty index serves as a dynamic correction factor to adjust the defect detection judgment threshold and the sampling ratio. When the basic uncertainty index is lower than the first threshold, the original detection judgment threshold remains unchanged, and the standard sampling ratio is maintained. When the basic uncertainty index is between the first and second thresholds, the detection judgment threshold is linearly increased according to the index value, and the sampling ratio is increased proportionally. When the basic uncertainty index is higher than the second threshold, the system's adaptive calibration program is automatically triggered to recalibrate the image acquisition parameters and model inference parameters. After calibration, the basic uncertainty index is recalculated and the judgment is made again. The formula for calculating the basic uncertainty index is as follows: ,in It is the basic uncertainty index.
[0013] Furthermore, the optical property index of the material is calculated using the following formula: in: It is an index of the optical properties of materials; This represents the variation in the near-infrared reflectance peak position. This represents the maximum permissible threshold for near-infrared reflectance peak position variation. Standard color difference value This represents the maximum permissible threshold for color difference. The ratio of fluorescence intensity; This is the near-infrared offset normalization coefficient, used to quantify the normalization deviation of the measured near-infrared reflectance peak position change value relative to the maximum allowable offset; It is the color difference normalization coefficient, used to quantify the degree of normalization deviation of the measured color difference value relative to the maximum permissible color difference; The fluorescence deviation coefficient is used to quantify the absolute deviation between the measured fluorescence intensity ratio and the ideal value of 1; These are the weighting coefficients for the near-infrared shift normalization coefficient, the chromatic aberration normalization coefficient, and the fluorescence deviation coefficient, respectively, satisfying... ,and .
[0014] Furthermore, when mold materials experience batch fluctuations, formula changes, moisture aging, or residual mold release agents and oil stains, the material optical property index can identify material anomalies in advance, avoiding false or missed detections of defects caused by changes in the material itself. A higher material optical property index value indicates that the material is more consistent with the standard reference, and the detection system can output defect judgment results normally. A lower material optical property index value indicates that there is an anomaly in the material, and the system reduces the overall detection confidence level accordingly, triggering material batch verification and surface cleaning processes.
[0015] Furthermore, the overall detection confidence level is calculated using the following formula: in: To comprehensively test the confidence level.
[0016] Furthermore, the comprehensive detection confidence level serves as the final decision-making basis, and a tiered control strategy is implemented based on the range of the comprehensive detection confidence level value: when the comprehensive detection confidence level is above the high threshold, the defect judgment result is directly output without manual intervention; when the comprehensive detection confidence level is between the medium and high thresholds, the defect judgment result is output along with a medium confidence level label, and it is recommended to conduct proportional sampling inspection of the products in the same batch; when the comprehensive detection confidence level is between the low and medium thresholds, an automatic re-inspection procedure is triggered, and the result is only output if the two inspection results are consistent; when the confidence level is below the low threshold, the inspection is immediately stopped and an alarm is issued.
[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: by constructing a data quality index, a model stability index, and a material optical property index, and integrating them to generate a final comprehensive detection confidence level, a quantitative evaluation and dynamic graded response of the entire process of detecting surface defects in printer injection molds is achieved; it effectively overcomes the problems of misjudgment and missed detection caused by image quality fluctuations, inconsistent model predictions, and material optical differences in visual inspection, and significantly improves the accuracy and robustness of the detection results; at the same time, it automatically executes direct output, spot checks, re-inspections, or shutdown alarms based on multi-level thresholds, taking into account both detection efficiency and quality control requirements. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the overall process of the vision-based inspection method for detecting surface defects in printer injection molds according to the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0020] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0021] Example: Please see Figure 1 The present invention provides a technical solution: A vision-based inspection method for detecting surface defects in printer injection molds includes the following steps: S1: After image acquisition, collect basic image quality parameters in real time. These parameters include signal-to-noise ratio (SNR), sharpness, illumination uniformity, and motion blur. The SNR is obtained by selecting a window of interest in a defect-free, flat area on the mold surface, calculating the ratio of the mean gray level of the pixels within the window to the standard deviation of the gray level in the background area, and converting it to a decibel value through logarithmic transformation. Sharpness is obtained by applying the Laplacian operator to the image within the detection area and calculating the variance of the response value to characterize the sharpness of the image edges. Illumination uniformity is obtained by dividing the image into four quadrants, calculating the standard deviation of the gray level mean in each quadrant, and normalizing it by subtracting the ratio of this standard deviation to the maximum gray level. Motion blur is obtained by reading the displacement of the conveyor belt encoder during camera exposure, combining this with the pixel equivalent calibrated by the camera, and calculating the pixel distance the product moves during the exposure time. The data quality index is generated by weighting and fusing fundamental image quality parameters with signal-to-noise ratio reference values, sharpness reference values, and maximum tolerance for motion blur. The data quality index is calculated using the following formula: in: Signal-to-noise ratio; This is a reference value for the signal-to-noise ratio. For clarity; This is a reference value for image clarity. For uniformity of illumination; For motion blur; This represents the maximum tolerance value for motion blur. The signal-to-noise ratio (SNR) compliance coefficient is used to quantify the degree to which the measured image SNR meets the reference SNR. The sharpness compliance coefficient is used to quantify the degree to which the sharpness of the measured image meets the standard relative to the reference sharpness. This is the motion blur quality preservation coefficient, used to quantify the negative impact of motion blur on image quality; These are the weighting coefficients for the signal-to-noise ratio compliance coefficient, sharpness compliance coefficient, illumination uniformity, and motion blur quality retention coefficient, respectively. .
[0022] Based on the different ranges of the data quality index, the system implements differentiated hierarchical control strategies. When the data quality index is in a high range, it indicates that the image signal-to-noise ratio, sharpness, illumination uniformity, and motion blur control all meet the detection requirements. The system performs defect judgment and outputs detection results normally without additional intervention. When the data quality index is in a medium range, the system outputs image quality prompts along with the defect judgment results, suggesting that operators pay attention to the maintenance status of the imaging system, including but not limited to checking the cleanliness of the lens surface, the stability of the light source brightness, and the vibration of the conveyor belt, and can shorten the daily cleaning cycle. When the data quality index is in a low range, the system pauses the output of defect judgment results and automatically triggers preset corrective measures, including starting the automatic lens wiping device, adjusting the light source drive current to improve illumination uniformity, or reducing the conveyor belt speed to suppress motion blur. Detection results can be output again only after the index recovers to above the medium range. When the data quality index is in the lowest range, the system immediately stops the detection process and issues an audible and visual alarm signal, prompting operators to comprehensively check the camera focus status, lens optical integrity, light source module working status, and conveyor mechanical precision. Operation can only resume after the fault is rectified and recalibrated.
[0023] S2: In the initial stage of model deployment or after completing a preset number of detection batches, the system executes the model stability feature data acquisition process. The stability feature data includes repeatability accuracy, mean prediction confidence, and feature vector stability. The repeatability accuracy acquisition method is as follows: select at least three standard samples with typical defect types, input each sample into the model for detection thirty times consecutively, record the defect detection results output each time, calculate the detection rate of each sample, and then calculate the standard deviation of the detection rates of all samples. Take this standard deviation as the repeatability accuracy value. The mean prediction confidence is acquired as follows: during the above repeatability test, collect the probability value of the defect category output by the model for each correctly detected defect sample, calculate the average probability of all correctly detected samples, and take it as the mean prediction confidence. The feature vector stability acquisition method is as follows: select a typical defect image, copy it and add Gaussian noise of preset intensity, input the original image and the noisy image into the model respectively, extract the feature vectors output by the intermediate layer of the model, calculate the cosine similarity of the two feature vectors, and take it as the feature vector stability value.
[0024] The model stability index is generated by weighting and fusing stability feature parameters with the maximum allowable value of repeatability accuracy; the model stability index is calculated using the following formula: in: For repeatability accuracy; This represents the maximum permissible value for repeatability accuracy. To predict the mean confidence level; For eigenvector stability; The repeatability compliance coefficient is used to quantify the degree to which the model's repeatability accuracy meets the standard relative to the maximum permissible repeatability error. These are: the repeatability qualification coefficient, the mean prediction confidence score, and the weighting coefficients for eigenvector stability, which satisfy... And α>β>γ>0; the repeatability qualification coefficient directly reflects the consistency of the model output and is the most core indicator for measuring the stability of the model, so it is given the highest weight; the mean prediction confidence reflects the model's confidence in its own judgment and has an important impact on the credibility of the detection results, so it is given the second highest weight; the eigenvector stability characterizes the robustness of the model to input noise and is given the lowest weight as an auxiliary indicator.
[0025] The system periodically triggers the calculation process of the model stability index, using a preset time period or the number of test batches as a unit, and compares the currently calculated index value with a pre-established historical baseline. The historical baseline consists of the average stability index and its fluctuation range measured multiple times consecutively during the initial validation phase of the model. When the model stability index remains above the high standard for several consecutive periods, it indicates that the model performance has not degraded significantly, and the output consistency and robustness are within the credible range. The system can continue to run the current model version without intervention. When the model stability index falls below the median standard for a single instance, the system automatically records the event, its corresponding index value, timestamp, and batch information, and triggers a model evaluation frequency adjustment command to shorten the original evaluation cycle to half of the preset value in order to closely track the trend of model performance changes. When the model stability index falls below the median standard for three consecutive evaluation periods, the system determines that the model has drifted significantly and automatically sends a model update request to the cloud server. This request includes the current model version identifier, drift characteristic data, and device number. Upon response, the cloud server downloads the retrained or fine-tuned new version model. The system completes the version switch offline during idle periods on the detection line and records the switchover log. When the model stability index falls below the low threshold, the system immediately suspends the current model's access to the detection process, forces a rollback to the previous stable version, and issues a maintenance alarm, prompting operators to check the representativeness of the model's training data or the applicability of the algorithm architecture.
[0026] Based on the data quality index and model stability index, a basic uncertainty index is generated according to the square root rule. This index serves as a dynamic correction factor to adjust the defect detection threshold and sampling ratio in real time. When the basic uncertainty index is below the first threshold, it indicates that the detection process is in a low-uncertainty state. The system maintains the original detection threshold and standard sampling ratio, directly outputting the defect judgment result. When the basic uncertainty index is between the first and second thresholds, it indicates that the detection process has a moderate degree of uncertainty. The system increases the detection threshold using linear interpolation, making the threshold adjustment proportional to the basic uncertainty index. Simultaneously, it proportionally expands the sampling ratio, increasing it by the same factor as the index value to reduce the risk of false detection. When the basic uncertainty index is above the second threshold, the detection process is deemed unreliable. The system automatically triggers an adaptive calibration procedure, sequentially recalibrating the image acquisition parameters and the model inference parameters. After calibration, the basic uncertainty index is recalculated and compared with the threshold again. If it drops below the second threshold, detection resumes; if it remains above the second threshold, an alarm is continuously triggered, and manual intervention is recommended. The formula for calculating the basic uncertainty index is: ,in It is the basic uncertainty index.
[0027] S3: After each production change or after completing a preset number of testing batches, the system executes a material optical characteristic parameter acquisition process. The material optical characteristic parameters include near-infrared reflection peak position variation, standard color difference, and fluorescence intensity ratio. The near-infrared reflection peak position variation is acquired by measuring the reflectance spectrum of the mold surface using a near-infrared spectrometer, extracting the main peak wavelength, and calculating the absolute offset with the reference wavelength in the standard material library. The standard color difference is acquired by using a colorimeter or a calibrated color camera to obtain the CIELab color parameters of the mold surface and calculating the Euclidean distance with a standard sample. The fluorescence intensity ratio is acquired by exciting the mold surface with an ultraviolet LED, measuring the integrated intensity of the emission spectrum in a specified band, and calculating the ratio with the corresponding intensity of the standard material. The optical property index of a material is generated by combining optical characteristic parameters with the maximum allowable threshold for near-infrared reflection peak position variation and the maximum allowable threshold for color difference. The material optical property index is calculated using the following formula: in: It is an index of the optical properties of materials; This represents the variation in the near-infrared reflectance peak position. This represents the maximum permissible threshold for near-infrared reflectance peak position variation. Standard color difference value This represents the maximum permissible threshold for color difference. The ratio of fluorescence intensity; This is the near-infrared offset normalization coefficient, used to quantify the normalization deviation of the measured near-infrared reflectance peak position change value relative to the maximum allowable offset; It is the color difference normalization coefficient, used to quantify the degree of normalization deviation of the measured color difference value relative to the maximum permissible color difference; The fluorescence deviation coefficient is used to quantify the absolute deviation between the measured fluorescence intensity ratio and the ideal value of 1; These are the weighting coefficients for the near-infrared shift normalization coefficient, the chromatic aberration normalization coefficient, and the fluorescence deviation coefficient, respectively, satisfying... ,and The near-infrared offset normalization coefficient directly reflects the stability of the chemical composition of the material matrix and is the most core indicator for judging the consistency of materials, so it has the highest weight value. The color difference normalization coefficient affects the contrast between defects and background in visible light images and has a significant impact on the detection results, so it has a medium weight value. The fluorescence deviation coefficient mainly characterizes the presence of surface contaminants or trace additives. Its interference is relatively small and can be eliminated by cleaning, so it is given the lowest weight value.
[0028] The material optical property index is used for online monitoring of the optical consistency and surface cleanliness of injection mold materials for printers. When mold materials experience batch fluctuations, formula changes, moisture aging, or residual mold release agent or oil stains on the surface, the material optical property index can identify these anomalies in advance, avoiding false or missed detections of defects caused by changes in the material itself. The higher the index value, the more consistent the near-infrared reflectance spectrum, color, and fluorescence characteristics of the tested mold are with the standard reference, indicating that the material is in a normal and controllable state, and the detection system can output defect judgment results normally without additional intervention. Conversely, when the index value is low, it indicates that there is an anomaly in the material. The system accordingly lowers the overall detection confidence level and triggers the material batch verification process, including checking the material batch number, retesting the near-infrared spectrum and color difference; at the same time, the surface cleaning process is initiated, including automatic or manual removal of mold release agent residue, oil stains, and other contaminants. After the material anomaly is eliminated or the surface cleaning is completed, the system recalculates the material optical property index, and high-confidence detection can only resume after confirming that it has returned to the normal range.
[0029] S4: Generate the final comprehensive detection confidence level based on the fundamental uncertainty index and the material optical property index; the comprehensive detection confidence level is calculated using the following formula: in: To comprehensively test the confidence level.
[0030] The overall detection confidence level serves as the final decision-making basis. The system implements a hierarchical control strategy based on the range in which the value falls. Four thresholds are preset: high threshold, medium-high threshold, medium threshold, and low threshold, which divide the confidence level into four levels: high, medium-high, medium-low, and low. When the confidence level is above the high threshold, it indicates that the test result is highly reliable, and the system directly outputs the defect judgment result without manual intervention. When the confidence level is between the medium-high threshold and the high threshold, it indicates that the test result has medium reliability. The system outputs the defect judgment result with a medium confidence level label and suggests that the batch of products be sampled and checked according to a preset ratio. The sampling ratio increases linearly as the confidence level decreases. When the confidence level is between the medium threshold and the medium-high threshold, it indicates that the test result has low reliability. The system triggers an automatic re-inspection procedure: the current mold is sent back to the inspection station, images are collected again under the same conditions, and defect judgment is performed. The final judgment is only output when the two inspection results are consistent. If the two results are inconsistent, it is marked as requiring manual review. When the confidence level is below the medium threshold, it indicates that the test result is unreliable. The system immediately stops the inspection process of the current mold and issues an audible and visual alarm signal, prompting the operator to comprehensively check the imaging module, model status, and material batch consistency. Automatic inspection can only be resumed after the fault is eliminated and the confidence level recovers to above the medium-high threshold.
[0031] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0032] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0033] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0034] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for detecting surface defects in printer injection molds based on vision inspection, characterized in that, Includes the following steps: S1: Collect basic image quality parameters, including signal-to-noise ratio, sharpness, illumination uniformity, and motion blur; weight and fuse the basic image quality parameters with the signal-to-noise ratio reference value, sharpness reference value, and maximum motion blur tolerance value to generate a data quality index, which is used to quantify the physical fidelity of the acquired image; S2: Collect model stability feature data, including repeatability accuracy, mean prediction confidence, and feature vector stability; and weight and fuse the stability feature parameters with the maximum allowable value of repeatability accuracy to generate a model stability index; the model stability index is used to characterize the consistency of the output results of the AI visual detection model under repeated testing and input perturbation conditions; and generate a basic uncertainty index based on the data quality index and the model stability index. S3: Collect material optical characteristic parameters, including near-infrared reflection peak position variation, standard color difference, and fluorescence intensity ratio; combine the optical characteristic parameters with the maximum allowable threshold for near-infrared reflection peak position variation and the maximum allowable threshold for color difference to generate a material optical property index; the material optical property index is used to quantify the consistency between the mold material itself and the standard material. S4: Generate the final comprehensive test confidence level based on the fundamental uncertainty index and the material optical property index; Set a preset threshold. When the confidence level is higher than the high threshold, output the detection result directly. When it is between the medium and high thresholds, add a medium confidence label and suggest random sampling. When it is between the low and medium thresholds, trigger a re-inspection. When it is lower than the low threshold, alarm and stop the machine.
2. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 1, characterized in that: The data quality index is calculated using the following formula: in: Signal-to-noise ratio; This is a reference value for the signal-to-noise ratio. For clarity; This is a reference value for image clarity. For uniformity of illumination; For motion blur; This represents the maximum tolerance value for motion blur. The signal-to-noise ratio (SNR) compliance coefficient; The resolution compliance factor; The motion blur quality retention coefficient; These are the weighting coefficients for the signal-to-noise ratio compliance coefficient, sharpness compliance coefficient, illumination uniformity, and motion blur quality retention coefficient, respectively. .
3. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 2, characterized in that: Depending on the data quality index range, the system implements differentiated control strategies: when the data quality index is in a high range, it indicates that the image quality meets the detection requirements, and the system performs defect judgment and outputs results normally; when the data quality index is in a medium range, the system outputs defect judgment results along with image quality prompts, suggesting that operators pay attention to the maintenance status of the imaging system; when the data quality index is in a low range, the system pauses the output of defect judgment results and automatically triggers corrective measures; when the data quality index is in the lowest range, the system stops detection and issues an alarm signal.
4. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 1, characterized in that: The model stability index is calculated using the following formula: in: For repeatability accuracy; This represents the maximum permissible value for repeatability accuracy. To predict the mean confidence level; For eigenvector stability; The repeatability compliance coefficient is used to quantify the degree to which the model's repeatability accuracy meets the standard relative to the maximum permissible repeatability error. These are: the repeatability qualification coefficient, the mean prediction confidence score, and the weighting coefficients for eigenvector stability, which satisfy... And α>β>γ>0.
5. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 4, characterized in that: The system periodically calculates the model stability index at preset time intervals and compares it with historical baselines. When the model stability index remains above the high standard for several consecutive periods, it indicates that the model performance is stable, and the current version continues to run. When the model stability index falls below the median standard for a single time, the system automatically records the event and increases the model evaluation frequency. When the model stability index is below the median standard for three consecutive periods, it is determined that the model has drifted significantly. The system automatically sends a model update request to the cloud server, downloads the retrained new version of the model, and completes the version switch offline. When the model stability index falls below the low standard, the system immediately suspends the use of the model, forces a rollback to the previous stable version, and issues a maintenance alarm.
6. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 5, characterized in that: A basic uncertainty index is generated based on the data quality index and the model stability index. The basic uncertainty index serves as a dynamic correction factor to adjust the defect detection judgment threshold and the sampling ratio. When the basic uncertainty index is lower than the first threshold, the original detection judgment threshold remains unchanged, and the standard sampling ratio is maintained. When the basic uncertainty index is between the first threshold and the second threshold, the detection and judgment threshold is increased linearly according to the index value, and the sampling ratio is increased proportionally; when the basic uncertainty index is higher than the second threshold, the system's adaptive calibration program is automatically triggered to recalibrate the image acquisition parameters and model inference parameters. After calibration is completed, the basic uncertainty index is recalculated and the judgment is made again. The formula for calculating the fundamental uncertainty index is as follows: ,in It is the basic uncertainty index.
7. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 1, characterized in that: The optical property index of the material is calculated using the following formula: in: It is an index of the optical properties of materials; This represents the variation in the near-infrared reflectance peak position. This represents the maximum permissible threshold for near-infrared reflectance peak position variation. Standard color difference value This represents the maximum permissible threshold for color difference. The ratio of fluorescence intensity; This is the near-infrared offset normalization coefficient, used to quantify the normalization deviation of the measured near-infrared reflectance peak position change value relative to the maximum allowable offset; It is the color difference normalization coefficient, used to quantify the degree of normalization deviation of the measured color difference value relative to the maximum permissible color difference; The fluorescence deviation coefficient is used to quantify the absolute deviation between the measured fluorescence intensity ratio and the ideal value of 1; These are the weighting coefficients for the near-infrared shift normalization coefficient, the chromatic aberration normalization coefficient, and the fluorescence deviation coefficient, respectively, satisfying... ,and .
8. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 7, characterized in that: When mold materials experience batch fluctuations, formula changes, moisture aging, or residual mold release agents and oil stains, the material optical property index can identify material anomalies in advance, avoiding false or missed detections of defects caused by changes in the material itself; the higher the material optical property index value, the more consistent the material is with the standard reference, and the detection system can output defect judgment results normally. The lower the material's optical property index value, the more likely it is that the material is abnormal. Based on this, the system lowers the overall detection confidence level and triggers material batch review and surface cleaning processes.
9. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 8, characterized in that: The overall detection confidence level is calculated using the following formula: in: To comprehensively test the confidence level.
10. The method for detecting surface defects in printer injection molds based on vision inspection according to claim 9, characterized in that: The comprehensive detection confidence level serves as the final decision-making basis. A tiered control strategy is implemented based on the range of the comprehensive detection confidence level value: when the comprehensive detection confidence level is above the high threshold, the defect judgment result is directly output without manual intervention; when the comprehensive detection confidence level is between the medium and high thresholds, the defect judgment result is output along with a medium confidence level label, and it is recommended to conduct proportional sampling inspections of the batch of products; when the comprehensive detection confidence level is between the low and medium thresholds, an automatic re-inspection procedure is triggered, and output is only possible if the two inspection results are consistent; when the confidence level is below the low threshold, the inspection is immediately stopped and an alarm is issued.
Citation Information
Patent Citations
A surface defect detection method and device based on machine vision
CN119600026B