Process parameter adaptive optimization method and system based on real-time visual quality inspection
By using real-time visual quality inspection and adaptive optimization of process parameters, defects in injection molding production can be quickly identified and optimized. This solves the problems of long identification time and insufficient human experience in existing technologies, enabling rapid adjustment of process parameters and reducing defective product rate and technical costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-03-13
AI Technical Summary
In the current injection molding production process, the defect identification time is long and it is impossible to respond to dynamic changes in a timely manner, resulting in a high defect rate. In addition, the subjective nature of manual experience-based adjustments makes it difficult to adapt to the influence of various factors.
An adaptive optimization method for process parameters based on real-time visual quality inspection is adopted. Defect categories are identified through a primary classifier and a secondary classifier. Combined with the current process parameters of the injection molding equipment and the mold status parameters, the process parameters are optimized using an injection molding defect-process parameter mapping model to achieve rapid adjustment.
It improves the speed of defect identification and process parameter optimization, reduces the generation of defective products, adapts to production scenarios of different equipment models and material products, and reduces the cost of technology implementation.
Smart Images

Figure CN121650209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and injection molding production technology, and in particular to a method and system for adaptive optimization of process parameters based on real-time visual quality inspection. Background Technology
[0002] Injection molding is an important plastic processing method with advantages such as high production efficiency, good product precision, and strong adaptability, and is widely used in many industries such as automotive, electronics, and home appliances. However, the injection molding process is affected by many factors, including process parameters such as injection speed, injection pressure, holding pressure parameters, mold temperature, and melt temperature, as well as mold condition and raw material characteristics, which can easily lead to various defects in the product, such as short shots, flash, bubbles, weld lines, and color differences, seriously affecting product quality and production efficiency. Existing methods for optimizing injection molding process parameters mainly rely on manual experience for adjustment. Manual experience-based adjustments are highly subjective, require high operator skills, and have a slow response time, failing to respond promptly to dynamic changes in the production process, resulting in a high defect rate. With the development of artificial intelligence technology, AI-based automated optimization of injection molding process parameters has become a possible alternative to manual experience-based adjustments. However, when performing defect identification, existing methods usually need to calculate the probability of all defect categories at once, and then take the defect with the highest defect category probability as the defect identification result. As the number of defect categories increases, the identification time also increases. If the performance of the injection molding equipment is not high, it is difficult to support the real-time optimization of the injection molding equipment based on the defect category. Therefore, this problem needs to be solved. Summary of the Invention
[0003] To address the aforementioned technical problems, the purpose of this application is to provide a method and system for adaptive optimization of process parameters based on real-time visual quality inspection, aiming to solve the technical problems mentioned above.
[0004] In a first aspect, embodiments of this application provide a method for adaptive optimization of process parameters based on real-time visual quality inspection, the method comprising:
[0005] S1. Obtain visual images of injection molded products awaiting quality inspection transmitted in real time from the injection molding production line;
[0006] S2. Based on the visual image, the probability of each first-level defect category is calculated using a pre-trained first-level classifier, and the first-level defect category with the highest probability is determined.
[0007] S3. Determine whether the highest probability primary defect category has a corresponding secondary defect category;
[0008] S4. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5.
[0009] S5. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category;
[0010] S6. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier.
[0011] S7. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result;
[0012] S8. Collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment. Input the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results of the injection molding equipment into the pre-constructed injection molding defect-process parameter mapping model. Output the process parameter adjustment amount. Based on the process parameter adjustment amount, correct the current process parameters to obtain the optimized process parameters.
[0013] Furthermore, after the step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters, the method further includes:
[0014] The optimized process parameters are sent to the injection molding equipment for execution.
[0015] Furthermore, after the step of sending the optimized process parameters to the injection molding equipment for execution, the method further includes:
[0016] Visual quality inspection is performed on the injection molded products obtained after process parameter optimization, and feature vectors of the injection molded products after process parameter optimization are collected.
[0017] Calculate the similarity between the feature vector of the injection-molded product after process parameter optimization and the feature vector of the standard product;
[0018] If the similarity is greater than or equal to the preset qualified threshold, the current process parameter optimization scheme is recorded as the historical best scheme.
[0019] If the similarity is less than a preset acceptable threshold, an error message is output, visual quality inspection is stopped, and the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results are stored as test data. The injection molding defect-process parameter mapping model is then optimized to obtain an optimized injection molding defect-process parameter mapping model. The optimization includes modifying the architecture of the injection molding defect-process parameter mapping model and / or retraining the injection molding defect-process parameter mapping model.
[0020] The test data is input into the optimized injection molding defect-process parameter mapping model to obtain new optimized process parameters. The new optimized process parameters are then input into the digital twin model of injection molding product production to generate a simulated injection molding product. Feature vectors of the simulated injection molding product are extracted from the simulated injection molding product, and the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is calculated. If the similarity is greater than or equal to a preset acceptance threshold, visual quality inspection is restarted. If the similarity is less than the preset acceptance threshold, the injection molding defect-process parameter mapping model is further optimized until the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is greater than or equal to the preset acceptance threshold.
[0021] Furthermore, the construction steps of the injection molding defect-process parameter mapping model include:
[0022] Collect sample data; the steps of collecting sample data include: collecting defect categories, corresponding pre-optimization process parameters, mold state parameters, raw material characteristic parameters, and optimized process parameters during the injection molding process; the process parameters include injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature;
[0023] The process parameter adjustment amount is calculated based on the optimized process parameters and the process parameters before optimization.
[0024] Based on machine learning algorithms, the injection molding defect-process parameter mapping model is trained by taking the defect category, the process parameters before optimization, the mold state parameters, and the raw material characteristic parameters as inputs and the process parameter adjustment amount as output.
[0025] Furthermore, the machine learning algorithm is a neural network algorithm, and a cross-validation mechanism is introduced during the training process.
[0026] Furthermore, the step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters includes:
[0027] The optimized process parameters are obtained by adding the process parameter adjustment amount to the current process parameters.
[0028] Furthermore, both the first-level classifier and the second-level classifier employ a feature extraction backbone network + Softmax classification head architecture. The training steps for the first-level classifier and the second-level classifier include:
[0029] Collect a large number of defective images of injection molded products and label each sample with two levels of tags: first label the primary defect category, and for samples with secondary defect categories, further label the corresponding secondary defect category.
[0030] The first-level classifier to be trained is trained using defect image samples of injection molded products labeled with first-level defect category labels to obtain a trained first-level classifier.
[0031] The training of the secondary classifier is achieved by using defect image samples of injection molded products labeled with secondary defect category tags.
[0032] Secondly, embodiments of this application provide a process parameter adaptive optimization system based on real-time visual quality inspection, the system comprising:
[0033] The vision acquisition module is used to acquire visual images of injection-molded products awaiting quality inspection that are transmitted in real time on the injection molding production line.
[0034] The control module is configured to:
[0035] Sk1. Based on the visual image, calculate the probability of each first-level defect category using a pre-trained first-level classifier, and determine the first-level defect category with the highest probability.
[0036] Sk2. Determine whether the highest probability primary defect category has a corresponding secondary defect category;
[0037] Sk3. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5.
[0038] Sk4. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category;
[0039] Sk5. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier.
[0040] Sk6. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result;
[0041] The data acquisition module is used to collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment;
[0042] The control module is also configured to:
[0043] Sk7 receives and inputs the current process parameters, mold status parameters, raw material characteristic parameters, and final defect identification results of the injection molding equipment into a pre-constructed injection molding defect-process parameter mapping model, outputs the process parameter adjustment amount, and corrects the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters.
[0044] This application's embodiments categorize injection molded product defects into different levels, namely primary defect categories and secondary defect categories, with secondary defect categories being specific subcategories of primary defect categories. In determining the defect category, the primary defect category with the highest probability is first identified. Then, the probabilities of all secondary defect categories within the primary defect category with the highest probability are calculated. The secondary defect category with the highest probability is used as the final defect identification result. Since the defect identification result is obtained without calculating the probabilities of all defect categories, this application is more user-friendly for injection molding equipment with lower performance compared to existing methods for the same number of defect categories, resulting in faster identification speed and consequently faster parameter optimization. Furthermore, for equipment with the same configuration, this invention can support the identification of more defect categories. Further, this application collects the current process parameters, mold state parameters, and raw material characteristic parameters of the injection molding equipment. These parameters, along with the final defect identification results, are input into a pre-constructed injection molding defect-process parameter mapping model, outputting optimal process parameters. Compared to manual experience-based optimization, this application can respond promptly to changes in defects during production, quickly adjust process parameters, effectively reduce the continuous generation of defective products, and improve production efficiency. Furthermore, the injection molding defect-process parameter mapping model in this application incorporates mold state parameters and raw material characteristic parameters during the training process. It can learn the defect-parameter optimization rules under different mold wear levels and different raw material types, making it adaptable to different injection molding equipment and different material injection molding product production scenarios. There is no need to redevelop the optimization model for a single scenario, thus reducing the cost of technology implementation. Attached Figure Description
[0045] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the adaptive optimization method for process parameters based on real-time visual quality inspection provided in an embodiment of this application.
[0047] Figure 2This is a schematic diagram of the structure of the adaptive optimization system for process parameters based on real-time visual quality inspection provided in the embodiments of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any modules and all combinations of one or more associated listed items.
[0050] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0051] Please see Figure 1 This application provides an embodiment of a process parameter adaptive optimization method based on real-time visual quality inspection, the method comprising:
[0052] S1. Obtain visual images of injection molded products awaiting quality inspection transmitted in real time from the injection molding production line;
[0053] S2. Based on the visual image, the probability of each first-level defect category is calculated using a pre-trained first-level classifier, and the first-level defect category with the highest probability is determined.
[0054] S3. Determine whether the highest probability primary defect category has a corresponding secondary defect category;
[0055] S4. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5.
[0056] S5. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category;
[0057] S6. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier.
[0058] S7. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result;
[0059] S8. Collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment. Input the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results of the injection molding equipment into the pre-constructed injection molding defect-process parameter mapping model. Output the process parameter adjustment amount. Based on the process parameter adjustment amount, correct the current process parameters to obtain the optimized process parameters.
[0060] This application includes a vision acquisition module. In one embodiment, the vision acquisition module uses an industrial camera installed at the exit of the injection molding production line, and works with a ring light source to achieve omnidirectional illumination of the product, ensuring image clarity. The industrial camera transmits image data in real time via Ethernet. This application also includes a data acquisition module, which acquires process parameters such as injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature through the PLC interface of the injection molding equipment. It should be understood that the process parameters are user-input parameters. The data acquisition module also acquires state parameters such as mold wear and mold clearance through a mold state sensor. For example, the mold state sensor can be a laser displacement sensor used to detect mold clearance and mold wear. By emitting a high-precision laser beam to irradiate key parts of the mold such as the parting surface, guide pillars, and guide sleeves, and receiving the reflected beam to calculate distance changes, the mold clearance at the micron level can be accurately measured (measurement accuracy can reach 0.001mm). Long-term monitoring of data at the same location can quantify the cumulative amount of mold wear, adapting to dynamic wear tracking requirements. The raw material's melt index, density, and other raw material characteristic parameters are obtained through raw material testing equipment. Specifically, the melt index of the raw material is detected by a melt indexer. The density parameters of the raw material are measured using a density meter. This application also includes a control module for running a primary classifier, a secondary classifier, an injection molding defect-process parameter mapping model, and a parameter optimization program.
[0061] In step S1, an industrial camera acquires real-time visual images of the products awaiting quality inspection at the injection molding production line exit. The images are transmitted to the control module via Ethernet, with a transmission delay controlled within 100ms. This hardware configuration of industrial camera and Ethernet transmission enables real-time image acquisition and transmission, ensuring the real-time nature of subsequent defect detection and laying the foundation for rapid optimization of process parameters.
[0062] In step S2, the control module preprocesses the acquired visual image (including grayscale conversion, noise reduction, image enhancement, etc.), and then inputs the preprocessed image into a pre-trained first-level classifier to calculate the probability of each first-level defect category, and determines the first-level defect category with the highest probability. Assuming the calculated probabilities of the first-level defect categories are: missing material 30%, flash 60%, bubbles 5%, weld lines 3%, color difference 1%, and dark brown spots 1%, then the first-level defect category with the highest probability is determined to be flash. This step uses the classifier to calculate the probability of each first-level defect category, achieving preliminary localization of the first-level defect category.
[0063] In step S3, a pre-built defect category hierarchy table is invoked to determine whether the highest-probability first-level defect category has a corresponding second-level defect category. The defect category hierarchy table records first-level defect categories and their corresponding second-level defect categories, as shown in the table below.
[0064]
[0065] In step S6, different primary defect categories correspond to their own dedicated secondary classifiers, ensuring the classifiers' accuracy in identifying secondary defects under specific primary defect categories.
[0066] In step S7, the secondary classifier corresponding to the primary defect category with the highest probability is invoked, the image region corresponding to the primary defect category is extracted from the visual image, the image region is input into the secondary classifier, and the probability of each secondary defect category is calculated.
[0067] In step S8, the current process parameters of the injection molding equipment refer to the process parameters corresponding to the same moment the visual image is acquired. These process parameters include injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature. It should be understood that these process parameters are input by the user. The mold state parameters include mold wear and mold clearance; raw material characteristic parameters include melt flow index and density. The injection molding defect-process parameter mapping model is pre-built, and the construction method is described below and will not be repeated here. The input to the injection molding defect-process parameter mapping model also includes the final defect identification results. Multiple final defect identification results are included because in actual injection molding production, a single product may have multiple defects simultaneously. For example, a home appliance casing product may simultaneously exhibit both "edge flash" and "local color difference" defects. The causes of these two defects may be related or mutually influential, and the direction and magnitude of the corresponding process parameter adjustments need to be comprehensively considered. If only a single defect identification result is input, the process parameter adjustments may be incomplete, failing to simultaneously resolve multiple defects, and may even exacerbate other defects due to adjustments of a single parameter. Therefore, inputting multiple final defect identification results into the model simultaneously enables the model to comprehensively analyze the synergistic effects of various defects, output optimal process parameters that take into account the repair needs of multiple defects, ensure the comprehensiveness and effectiveness of process parameter adjustments, and further improve the product quality pass rate.
[0068] This application's embodiments categorize injection molded product defects into different levels, namely primary defect categories and secondary defect categories, with secondary defect categories being specific subcategories of primary defect categories. In determining the defect category, the primary defect category with the highest probability is first identified. Then, the probabilities of all secondary defect categories within the primary defect category with the highest probability are calculated. The secondary defect category with the highest probability is used as the final defect identification result. Since the defect identification result is obtained without calculating the probabilities of all defect categories, this application is more user-friendly for injection molding equipment with lower performance compared to existing methods for the same number of defect categories, resulting in faster identification speed and consequently faster parameter optimization. Furthermore, for equipment with the same configuration, this invention can support the identification of more defect categories. Further, this application collects the current process parameters, mold state parameters, and raw material characteristic parameters of the injection molding equipment. These parameters, along with the final defect identification results, are input into a pre-constructed injection molding defect-process parameter mapping model, outputting optimal process parameters. Compared to manual experience-based optimization, this application can respond promptly to changes in defects during production, quickly adjust process parameters, effectively reduce the continuous generation of defective products, and improve production efficiency. Furthermore, the injection molding defect-process parameter mapping model in this application incorporates mold state parameters and raw material characteristic parameters during the training process. It can learn the defect-parameter optimization rules under different mold wear levels and different raw material types, making it adaptable to different injection molding equipment and different material injection molding product production scenarios. There is no need to redevelop the optimization model for a single scenario, thus reducing the cost of technology implementation.
[0069] In one embodiment, after the step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters, the method further includes:
[0070] The optimized process parameters are sent to the injection molding equipment for execution.
[0071] In this embodiment, the optimized process parameters are sent to the injection molding equipment for execution to reduce the generation of defective products.
[0072] In one embodiment, after the step of sending the optimized process parameters to the injection molding equipment for execution, the method further includes:
[0073] Visual quality inspection is performed on the injection molded products obtained after process parameter optimization, and feature vectors of the injection molded products after process parameter optimization are collected.
[0074] Calculate the similarity between the feature vector of the injection-molded product after process parameter optimization and the feature vector of the standard product;
[0075] If the similarity is greater than or equal to the preset qualified threshold, the current process parameter optimization scheme is recorded as the historical best scheme.
[0076] If the similarity is less than a preset acceptable threshold, an error message is output, visual quality inspection is stopped, and the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results are stored as test data. The injection molding defect-process parameter mapping model is then optimized to obtain an optimized injection molding defect-process parameter mapping model. The optimization includes modifying the architecture of the injection molding defect-process parameter mapping model and / or retraining the injection molding defect-process parameter mapping model.
[0077] The test data is input into the optimized injection molding defect-process parameter mapping model to obtain new optimized process parameters. The new optimized process parameters are then input into the digital twin model of injection molding product production to generate a simulated injection molding product. Feature vectors of the simulated injection molding product are extracted from the simulated injection molding product, and the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is calculated. If the similarity is greater than or equal to a preset acceptance threshold, visual quality inspection is restarted. If the similarity is less than the preset acceptance threshold, the injection molding defect-process parameter mapping model is further optimized until the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is greater than or equal to the preset acceptance threshold.
[0078] In this embodiment, a convolutional neural network can be used to collect the feature vector of the injection-molded product after process parameter optimization. The standard product refers to a qualified product. The similarity between the feature vector of the injection-molded product after process parameter optimization and the feature vector of the standard product is calculated, specifically according to the following formula:
[0079] ;
[0080] in, The product feature vector represents the optimized process parameters. This represents a pre-calibrated standard product feature vector. and These are the magnitudes of the two vectors; the calculated cosine similarity value ranges from [0,1]. The closer the value is to 1, the higher the feature fit between the product with optimized process parameters and the standard product.
[0081] The method for constructing the digital twin model of the injection molded product production includes:
[0082] Step 1: First, integrate the core data from the entire injection molding production process to form the model's data support system. The integrated data types include: injection molding process parameters (injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature, etc.), mold 3D design (cavity structure parameters, mold closing trajectory parameters, etc.), raw material characteristic parameters (melt index, density, etc.), and standard product feature benchmark data (appearance contour parameters, dimensional accuracy thresholds, defect judgment criteria, etc.). Second, a data transmission channel is established using the OPC UA industrial communication protocol to achieve real-time data interaction between the model and physical injection molding equipment, mold status sensors, and raw material detection equipment, ensuring accurate synchronization of physical production data to the digital model. Simultaneously, interfaces for importing test data and inputting optimized process parameters are reserved to ensure smooth data flow between the model and subsequent parameter optimization stages.
[0083] Step 2: Build a digital modeling module for core production processes. Based on professional 3D modeling tools such as SolidWorks and Unity, digitally replicate the core elements of injection molding production. This includes the construction of 3D digital models of various components of the injection molding equipment (barrel, screw, nozzle, etc.), the overall structure of the mold (cavity, core, guide pillars, guide sleeves, etc.), and the entire process flow of raw materials from melting, filling, holding pressure to cooling. Embed a dedicated physics engine for injection molding on the 3D model, incorporating multi-physics coupling calculation logic such as melt flow simulation algorithms, heat conduction coupling algorithms, and stress-strain analysis algorithms. Based on the input process parameters, it can accurately simulate the flow pattern of raw materials in the mold cavity under different working conditions, temperature field changes, cooling and solidification processes, as well as the appearance, dimensions, and potential defects of the final molded product. A product feature extraction submodule is built synchronously. This module adopts the same feature extraction algorithm as physical visual quality inspection. It can automatically extract feature vectors from simulated digital products. The feature dimensions and quantification standards are consistent with the feature vectors of physical products to ensure the effectiveness of subsequent similarity comparison. The extracted feature information includes appearance contour quantification parameters, dimensional accuracy data, potential defect types and location coordinates, etc.
[0084] Step 3: Configure parameter interaction and simulation verification logic. First, set the model's input and output rules, clarifying the import format and triggering conditions for optimized process parameters to ensure they can be directly imported into the model and automatically trigger the simulated production process. Second, integrate a similarity calculation submodule into the model. This submodule can call the simulated product feature vector and the preset standard product feature vector to calculate cosine similarity, with the calculation logic consistent with the physical visual quality inspection process. Finally, configure the iterative optimization interaction interface. When the similarity calculation result is less than the preset acceptable threshold, the model can receive new optimized process parameters and restart simulated production; repeat the above simulation-comparison process until the similarity between the simulated product feature vector and the standard product feature vector is greater than or equal to the preset acceptable threshold, forming a simulation verification capability adapted to the physical production closed loop.
[0085] The error messages include images of the injection-molded product obtained after process parameter optimization and images of a standard product. Operators can adjust the process parameters based on experience using these images and their feedback. Furthermore, model training can stop when the training accuracy reaches a preset requirement, the accuracy converges and no longer improves, or the preset number of training iterations is reached.
[0086] This application embodiment performs visual quality inspection on injection-molded products obtained after process parameter optimization, collects the feature vector of the optimized injection-molded product, and calculates the similarity between the feature vector of the optimized injection-molded product and the feature vector of the standard product to determine whether the optimized injection-molded product is qualified. When the similarity is less than a preset threshold, i.e., when the optimized injection-molded product is detected as unqualified, an error message is output and visual quality inspection is stopped, thus avoiding continued production of unqualified products. The error message includes an image of the injection-molded product obtained after process parameter optimization and an image of the standard product. Workers can adjust the process parameters based on experience using the images of the optimized injection-molded product and the standard product, enabling production without stopping the machine. Furthermore, the injection-molding defect-process parameter mapping model is optimized by modifying the architecture of the model and / or retraining it, thereby generating better process parameters. By introducing a digital twin model of injection molding product production, the newly optimized process parameters are virtually simulated before actual production. The feature vectors of the simulated injection molded product are extracted and compared with standard products. Visual quality inspection is only restarted when the simulation results meet the standards, which greatly reduces the number of physical mold trials and material waste.
[0087] In one embodiment, the steps for constructing the injection molding defect-process parameter mapping model include:
[0088] Collect sample data; the steps of collecting sample data include: collecting defect categories, corresponding pre-optimization process parameters, mold state parameters, raw material characteristic parameters, and optimized process parameters during the injection molding process; the process parameters include injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature;
[0089] The process parameter adjustment amount is calculated based on the optimized process parameters and the process parameters before optimization.
[0090] Based on machine learning algorithms, the injection molding defect-process parameter mapping model is trained by taking the defect category, the process parameters before optimization, the mold state parameters, and the raw material characteristic parameters as inputs and the process parameter adjustment amount as output.
[0091] In one embodiment, the machine learning algorithm is a neural network algorithm, and a cross-validation mechanism is introduced during the training process.
[0092] In this embodiment, the corresponding pre-optimization process parameters refer to the process parameters captured at the same moment in the visual image acquisition, while the optimized process parameters refer to the process parameters adjusted to avoid the same defects in subsequent products. In one embodiment, specifically, during model training, a neural network algorithm (such as MLP, multilayer perceptron) is selected as the machine learning algorithm. The defect category, pre-optimization process parameters, mold state parameters, and raw material characteristic parameters are used as input features, and the adjustment amount of each process parameter is used as the output label to train the sample data. A 5-fold cross-validation mechanism is used during training, randomly dividing the sample data into 5 parts, with 4 parts used as the training set and 1 part as the validation set. Training is completed 5 times, ultimately obtaining the injection molding defect-process parameter mapping model. This embodiment of the invention effectively improves the model's prediction accuracy and generalization ability.
[0093] In one embodiment, the step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters includes:
[0094] The optimized process parameters are obtained by adding the process parameter adjustment amount to the current process parameters.
[0095] In this embodiment, the current process parameters are added to the process parameter adjustment amount to obtain the optimized process parameters. Specifically, the optimized process parameters = current process parameters + process parameter adjustment amount. For example, for injection speed, if the current injection speed is A and the injection speed adjustment amount is B, then the optimized injection speed = A + B; if the current injection speed is A and the injection speed adjustment amount is -B, then the optimized injection speed = AB. For injection pressure, if the current injection pressure is C and the injection pressure adjustment amount is D, then the optimized injection pressure = C + D.
[0096] This application embodiment adjusts the current process parameters by adding the process parameter adjustment amount to the current process parameters, thereby achieving precise optimization of process parameters, reducing the generation of defective products, and improving production efficiency.
[0097] In one embodiment, both the primary classifier and the secondary classifier employ a feature extraction backbone network + Softmax classification head architecture. The training steps for the primary and secondary classifiers include:
[0098] Collect a large number of defective images of injection molded products and label each sample with two levels of tags: first label the primary defect category, and for samples with secondary defect categories, further label the corresponding secondary defect category.
[0099] The first-level classifier to be trained is trained using defect image samples of injection molded products labeled with first-level defect category labels to obtain a trained first-level classifier.
[0100] The training of the secondary classifier is achieved by using defect image samples of injection molded products labeled with secondary defect category tags.
[0101] In this embodiment, both the first-level classifier and the second-level classifier are trained based on a deep learning architecture combined with labeled samples. The specific training steps include: (1) Training data preparation: Collect a large number of defective image samples of injection molded products, and label each sample with two levels of labels - first label the first-level defect category labels (such as missing material, flash, black and brown spots, etc.), and for samples with second-level defect categories, further label the corresponding second-level defect category labels (such as labeling flash samples with "edge flash" and "hole flash", etc.); at the same time, preprocess the image samples, including grayscale, noise reduction, image enhancement, size normalization (uniformly adjusted to 224×224 pixels), etc., to improve the sample quality; finally, divide the preprocessed image samples into training set and validation set in a ratio of 8:2. First-level classifier training: The first-level classifier is constructed using the architecture of "feature extraction backbone network + Softmax classification head". The feature extraction backbone network uses ResNet-18 (deep residual network), which has strong feature extraction capabilities and high computational efficiency, and can accurately extract common and differential features of different first-level defect categories. The Softmax classification head is used to map the extracted features to the probability distribution of each first-level defect category. During training, the cross-entropy loss function is used as the optimization objective, and the stochastic gradient descent (SGD) optimizer is used for parameter updates. The initial learning rate is set to 0.001, and the learning rate decays to 0.1 every 10 epochs. The number of training epochs is set to 50. After each epoch of training, the accuracy of the classifier is evaluated using the validation set. When the accuracy of the validation set no longer improves for 5 consecutive epochs, training is stopped, the optimal model parameters are saved, and the training of the first-level classifier is completed. Secondary classifier training: The secondary classifier uses the same "ResNet-18 + Softmax classifier head" architecture as the primary classifier, but separate secondary classifiers are trained for different primary defect categories (e.g., a secondary classifier for edge defects, a secondary classifier for missing material defects, etc.) to ensure the classifier's accuracy in recognizing secondary defects under specific primary categories. During training, all secondary defect samples corresponding to the primary defect category are selected from the labeled samples (e.g., when training the edge defect secondary classifier, only samples labeled as edge defects are selected). The cross-entropy loss function is used as the optimization objective, and the SGD optimizer is employed. The initial learning rate is 0.001, and the learning rate decays to 0.1 every 8 epochs. The number of training epochs is set to 40. The classification accuracy is monitored in real time using the validation set. The training stop condition is the same as for the primary classifier. Finally, the optimal secondary classifier parameters for each primary defect category are saved.In addition, data augmentation techniques (including random flipping, random cropping, brightness and contrast adjustment, etc.) are introduced during training to expand the diversity of training data and avoid model overfitting. At the same time, stratified sampling is used when dividing the training set and validation set to ensure that the sample ratio of each defect category in the training set and validation set is consistent, thereby improving the model's generalization ability. After training, a test set (separated from the sample library, accounting for 10% of the total samples) is used to perform the final performance evaluation of the two-level classifier. For example, the accuracy of the first-level classifier is required to be no less than 95%, and the accuracy of the second-level classifier is required to be no less than 93%. If the requirements are not met, the network parameters are readjusted or samples are added and the training is repeated until the performance requirements are met.
[0102] like Figure 2 As shown in the embodiments of this application, an adaptive optimization system for process parameters based on real-time visual quality inspection is also provided. The system includes:
[0103] Visual acquisition module 1 is used to acquire visual images of injection molded products to be inspected in real time on the injection molding production line.
[0104] Control module 2, the control module is configured as follows:
[0105] Sk1. Based on the visual image, calculate the probability of each first-level defect category using a pre-trained first-level classifier, and determine the first-level defect category with the highest probability.
[0106] Sk2. Determine whether the highest probability primary defect category has a corresponding secondary defect category;
[0107] Sk3. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5.
[0108] Sk4. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category;
[0109] Sk5. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier.
[0110] Sk6. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result;
[0111] Data acquisition module 3 is used to collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment;
[0112] The control module 2 is further configured to:
[0113] Sk7 receives and inputs the current process parameters, mold status parameters, raw material characteristic parameters, and final defect identification results of the injection molding equipment into a pre-constructed injection molding defect-process parameter mapping model, outputs the process parameter adjustment amount, and corrects the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters.
[0114] The above-mentioned adaptive optimization of process parameters based on real-time visual quality inspection is applicable to the system of the present invention, therefore, it will not be described in detail again.
[0115] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0116] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0117] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for adaptive optimization of process parameters based on real-time visual quality inspection, characterized in that, The method includes: S1. Obtain visual images of injection molded products awaiting quality inspection transmitted in real time from the injection molding production line; S2. Based on the visual image, the probability of each first-level defect category is calculated using a pre-trained first-level classifier, and the first-level defect category with the highest probability is determined. S3. Determine whether the highest probability primary defect category has a corresponding secondary defect category; S4. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5. S5. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category; S6. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier. S7. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result; S8. Collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment. Input the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results of the injection molding equipment into the pre-constructed injection molding defect-process parameter mapping model. Output the process parameter adjustment amount. Based on the process parameter adjustment amount, correct the current process parameters to obtain the optimized process parameters.
2. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 1, after the step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters, the method further includes: The optimized process parameters are sent to the injection molding equipment for execution.
3. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 2, characterized in that, After the step of sending the optimized process parameters to the injection molding equipment for execution, the method further includes: Visual quality inspection is performed on the injection molded products obtained after process parameter optimization, and feature vectors of the injection molded products after process parameter optimization are collected. Calculate the similarity between the feature vector of the injection-molded product after process parameter optimization and the feature vector of the standard product; If the similarity is greater than or equal to the preset qualified threshold, the current process parameter optimization scheme is recorded as the historical best scheme. If the similarity is less than a preset acceptable threshold, an error message is output, visual quality inspection is stopped, and the current process parameters, mold status parameters, raw material characteristic parameters, and the final defect identification results are stored as test data. The injection molding defect-process parameter mapping model is then optimized to obtain an optimized injection molding defect-process parameter mapping model. The optimization includes modifying the architecture of the injection molding defect-process parameter mapping model and / or retraining the injection molding defect-process parameter mapping model. The test data is input into the optimized injection molding defect-process parameter mapping model to obtain new optimized process parameters. The new optimized process parameters are then input into the digital twin model of injection molding product production to generate a simulated injection molding product. Feature vectors of the simulated injection molding product are extracted from the simulated injection molding product, and the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is calculated. If the similarity is greater than or equal to a preset acceptance threshold, visual quality inspection is restarted. If the similarity is less than the preset acceptance threshold, the injection molding defect-process parameter mapping model is further optimized until the similarity between the feature vectors of the simulated injection molding product and the feature vectors of the standard product is greater than or equal to the preset acceptance threshold.
4. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 1, characterized in that, The steps for constructing the injection molding defect-process parameter mapping model include: Collect sample data; the steps of collecting sample data include: collecting defect categories, corresponding pre-optimization process parameters, mold state parameters, raw material characteristic parameters, and optimized process parameters during the injection molding process; the process parameters include injection speed, injection pressure, holding pressure, holding time, mold temperature, and melt temperature; The process parameter adjustment amount is calculated based on the optimized process parameters and the process parameters before optimization. Based on machine learning algorithms, the injection molding defect-process parameter mapping model is trained by taking the defect category, the process parameters before optimization, the mold state parameters, and the raw material characteristic parameters as inputs and the process parameter adjustment amount as output.
5. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 4, characterized in that, The machine learning algorithm is a neural network algorithm, and a cross-validation mechanism is introduced during the training process.
6. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 1, characterized in that, The step of correcting the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters includes: The optimized process parameters are obtained by adding the process parameter adjustment amount to the current process parameters.
7. The adaptive optimization method for process parameters based on real-time visual quality inspection according to claim 1, characterized in that, Both the primary classifier and the secondary classifier employ a feature extraction backbone network + Softmax classification head architecture. The training steps for the primary classifier and the secondary classifier include: Collect a large number of defective images of injection molded products and label each sample with two levels of tags: first label the primary defect category, and for samples with secondary defect categories, further label the corresponding secondary defect category. The first-level classifier to be trained is trained using defect image samples of injection molded products labeled with first-level defect category labels to obtain a trained first-level classifier. The training of the secondary classifier is achieved by using defect image samples of injection molded products labeled with secondary defect category tags.
8. A process parameter adaptive optimization system based on real-time visual quality inspection, characterized in that, The system includes: The vision acquisition module is used to acquire visual images of injection-molded products awaiting quality inspection that are transmitted in real time on the injection molding production line. The control module is configured to: Sk1. Based on the visual image, calculate the probability of each first-level defect category using a pre-trained first-level classifier, and determine the first-level defect category with the highest probability. Sk2. Determine whether the highest probability primary defect category has a corresponding secondary defect category; Sk3. If not, take the highest probability first-level defect category as the final defect identification result and jump to step S8. If yes, execute step S5. Sk4. Take the secondary defect category corresponding to the primary defect category with the highest probability as the target secondary defect category; wherein, the secondary defect category is a specific category of the primary defect category; Sk5. Call the pre-trained secondary classifier corresponding to the primary defect category with the highest probability as the target secondary classifier. Sk6. Based on the visual image, the probability of each target secondary defect category is calculated using the target secondary classifier, and the target secondary defect category with the highest probability is taken as the final defect identification result; The data acquisition module is used to collect the current process parameters, mold status parameters, and raw material characteristic parameters of the injection molding equipment; The control module is also configured to: Sk7 receives and inputs the current process parameters, mold status parameters, raw material characteristic parameters, and final defect identification results of the injection molding equipment into a pre-constructed injection molding defect-process parameter mapping model, outputs the process parameter adjustment amount, and corrects the current process parameters based on the process parameter adjustment amount to obtain optimized process parameters.