High-performance polyvinyl alcohol film preparation method based on machine learning optimization

Through machine learning methods combined with YOLOv5 to improve the model and deep learning, we can identify the defect types and degrees of polyvinyl alcohol films, optimize equipment parameters, solve the film defect problem caused by unreasonable equipment parameter settings, and improve film performance.

CN119169385AInactive Publication Date: 2024-12-20SHANDONG SENGONG NEW MATERIAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411333893.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the parameters of the preparation equipment of polyvinyl alcohol films are unreasonable, resulting in defects such as stiff blocks, stripes and dead wrinkles of the film, affecting the performance of the film, and it is difficult to effectively identify and optimize the equipment parameters.

Method used

Using a machine learning-based approach, the YOLOv5 improved model combines the Swin-Transformer module and CA attention mechanism to obtain images of different types of film defects, identify defect types and degrees, and optimize equipment parameters according to the deep learning model, including extruder melting Temperature and traction speed.

Benefits of technology

It improves the accuracy of film defect identification and the accuracy of equipment parameters, reduces film defects, and improves the performance of polyvinyl alcohol films.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169385A_ABST
    Figure CN119169385A_ABST
Patent Text Reader

Abstract

The invention discloses a high-performance polyvinyl alcohol film preparation method based on machine learning optimization, and belongs to the technical field of production optimizing.The method comprises the steps that a plurality of prefabricated film images are obtained through a first image obtaining device, a second image obtaining device and a third image obtaining device; according to the method, after classification is carried out according to the source of an acquisition device of a pre-prepared film image, a YOLOv5 improved model in which a Swinin-Transform module and a CA attention mechanism are introduced is used for judging the existence of a corresponding defect according to each type of image, so that the recognition precision of each type of defect is improved; and according to the defect degree of each type of defects, the parameters of equipment are optimized through the pre-trained deep learning model, so that the film defects are reduced, and the performance of the prepared polyvinyl alcohol film is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of production optimization, and in particular to a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization. Background Art

[0002] Polyvinyl alcohol film is widely used in many industries due to its unique physical and chemical properties, and the performance of the prepared polyvinyl alcohol film is particularly important.

[0003] In the existing technologies for preparing high-performance polyvinyl alcohol films, most of them are optimized and improved on raw materials and ratios. In addition to the impact of raw material quality and ratio on the performance of polyvinyl alcohol films, the parameters of the preparation equipment also affect the performance of the final polyvinyl alcohol film. If the parameters of the equipment for preparing the film are set unreasonably, such as the melting temperature of the extruder, the pulling speed of the traction machine, etc., various defects will occur in the film, such as block defects, streak defects and dead wrinkle defects, etc. These defects will greatly reduce the performance of the film. Therefore, in order to prepare high-performance polyvinyl alcohol films, how to obtain appropriate equipment parameters has become a problem that needs to be solved urgently in the existing technology. Summary of the invention

[0004] The present invention is to solve the technical problems existing in the prior art. The present invention provides a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization, which specifically comprises the following steps: Acquire a plurality of pre-prepared film images respectively by a first image acquisition device, a second image acquisition device and a third image acquisition device, and classify the pre-prepared film images according to the acquisition device sources; Input the pre-prepared film images into the improved YOLOv5 model to detect whether the corresponding pre-prepared film images have defects one by one, and determine the defect type according to the type of the pre-prepared film image; Analyze the first defect level QC1 corresponding to the pre-prepared film image acquired by the first image acquisition device, the second defect level QC2 corresponding to the pre-prepared film image acquired by the second image acquisition device, and the third defect level QC3 corresponding to the pre-prepared film image acquired by the third image acquisition device; Obtaining equipment optimization parameters through a pre-trained deep learning model according to the first defect degree, the second defect degree, and the third defect degree; The YOLOv5 improved model is obtained by training a pre-trained YOLOv5s network model after structural modification with a large number of pre-collected polyvinyl alcohol film defect images; The specific modification methods of the pre-trained YOLOv5s network model after the structural modification include: Replace the C3 module of the last layer in the backbone network of the pre-trained YOLOv5 network model with the Swin-Transformer module for fusion; The CA attention mechanism module is connected after the SPPF module in the backbone network of the pre-trained YOLOv5 network model, and the CA attention mechanism module is connected after the final C3 module in the feature mixing layer of the pre-trained YOLOv5 network model.

[0005] Furthermore, the method for obtaining the pre-trained YOLOv5 network model is specifically as follows: training a YOLOv5 network on a coco large object detection dataset to obtain a pre-trained YOLOv5 network model.

[0006] Furthermore, the Swin-Transformer module includes: a normalization layer, a window multi-head attention module, a displacement window self-attention module and a multi-layer perceptron.

[0007] Furthermore, the first image acquisition device, the second image acquisition device and the third image acquisition device correspond to different device layouts, specifically: The light source device of the first image acquisition device is arranged below the film and the irradiation angle is perpendicular to the film, and the photography device of the first image acquisition device is arranged above the film and the shooting angle is perpendicular to the film; The light source device of the second image acquisition device is arranged below the film and the irradiation angle is directly opposite to the film, and the photography device of the second image acquisition device is arranged above the film and there is a preset angle between the photography angle and the film; The light source device and the photographing device of the third image acquisition device are arranged above the film in a "V" shape.

[0008] Furthermore, the classification is carried out according to the source of the acquisition device of the pre-prepared film image, specifically: If the pre-prepared film image passes through the first image acquisition device, the corresponding pre-prepared film image belongs to a dead block defect detection image; If the pre-prepared film image passes through the second image acquisition device, the corresponding pre-prepared film image belongs to the stripe defect detection image; If the pre-prepared film image passes through the third image acquisition device, the corresponding pre-prepared film image belongs to the dead wrinkle defect detection image.

[0009] Furthermore, the defect type is determined according to the type of the pre-prepared film image, specifically: If the pre-prepared film image is a block defect detection image, the defect type of the detected defect belongs to a block defect; If the pre-prepared film image is a live wrinkle defect detection image, the defect type of the detected defect belongs to a live wrinkle defect; If the pre-prepared film image is a dead wrinkle defect detection image, the defect type of the detected defect belongs to a dead wrinkle defect.

[0010] Furthermore, the specific calculation formulas for the first defect degree, the second defect degree and the third defect degree are respectively: k11 and k12 represent a preset first weight and a preset second weight for analyzing a first defect degree, respectively, and k11+k12=1, P1 represents the total number of defective pre-prepared film images acquired by the first image acquisition device, N1 represents the total number of pre-prepared film images acquired by the first image acquisition device, XS1 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the first image acquisition device, and S1 represents the total number of pixels of all pre-prepared film images acquired by the first image acquisition device; k21 and k22 represent the preset first weight and the preset second weight for analyzing the second defect degree, respectively, and k21+k22=1, P2 represents the total number of defective pre-prepared film images acquired by the second image acquisition device, N2 represents the total number of pre-prepared film images acquired by the second image acquisition device, XS2 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the second image acquisition device, and S2 represents the total number of pixels of all pre-prepared film images acquired by the second image acquisition device; k31 and k32 represent the preset first weight and the preset second weight for analyzing the third defect degree, respectively, and k31+k32=1, P3 represents the total number of defective pre-prepared film images acquired by the third image acquisition device, N3 represents the total number of pre-prepared film images acquired by the third image acquisition device, XS3 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the third image acquisition device, and S3 represents the total number of pixels of all pre-prepared film images acquired by the third image acquisition device.

[0011] Furthermore, the equipment optimization parameters include the optimized temperature of the melting zone of the extruder and the optimized traction speed of the traction device.

[0012] Furthermore, the specific modification method of the structurally modified pre-trained YOLOv5s network model also includes: replacing the coupled prediction head of the detection layer of the pre-trained YOLOv5 network model with a decoupling head.

[0013] Furthermore, the decoupling head first uses a 1×1 convolution to reduce the feature channels to 256, and then uses two 3×3 convolutions to act on the classification task and the regression task respectively.

[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention obtains a plurality of pre-prepared film images respectively through a first image acquisition device, a second image acquisition device and a third image acquisition device, and classifies the pre-prepared film images according to the acquisition device sources, and then uses the YOLOv5 improved model that introduces the Swin-Transformer module and the CA attention mechanism to judge the existence of corresponding defects according to each type of image, thereby improving the recognition accuracy of each type of defect, and optimizing the parameters of the equipment through a pre-trained deep learning model according to the defect degree of each type of defect, thereby reducing film defects and improving the performance of the prepared polyvinyl alcohol film; The present invention sets image acquisition devices of different equipment layouts according to different types of defects, and specifically judges defects on images acquired by different image acquisition devices, thereby avoiding identifying different defect types on the same image, thereby improving the recognition accuracy of each type, and further improving the accuracy of equipment optimization parameters; The present invention replaces the C3 module of the last layer in the backbone network of the YOLOv5 network model with a Swin-Transformer module. The self-attention mechanism of Swin-Transformer helps the model to better understand the image content. At the same time, through window division and hierarchical design, the receptive field of the model can be effectively expanded, so that the model can capture a wider range of context information and extract image features more efficiently. In addition, the window-based calculation strategy is used through the window multi-head attention module, which significantly reduces the amount of calculation and complexity, and improves the accuracy and efficiency of defect recognition. The present invention introduces a CA attention mechanism module to strengthen the model's attention to important features and improve the network's sensitivity to key information, thereby improving the performance of the model, thereby improving the accuracy of defect identification and further improving the accuracy of equipment optimization parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0016] Figure 1 is a flow chart of a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization of the present invention; Figure 2 It is a device layout diagram of a first image acquisition device in a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization of the present invention; Figure 3 It is a device layout diagram of a second image acquisition device in a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization of the present invention; Figure 4 It is a device layout diagram of a third image acquisition device in a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization of the present invention; Figure 5 It is a structural block diagram of a Swin-Transformer module in a high-performance polyvinyl alcohol film preparation method based on machine learning optimization of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0019] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0020] Embodiment 1 See also Figure 1 As shown, the present invention provides a method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization, which specifically includes the following steps: S1. Acquire a plurality of pre-prepared film images respectively through a first image acquisition device, a second image acquisition device and a third image acquisition device, and classify the pre-prepared film images according to the acquisition device sources.

[0021] In step S1, the first image acquisition device, the second image acquisition device and the third image acquisition device correspond to different device layouts, specifically: See also Figure 2 As shown, the light source device of the first image acquisition device is arranged below the film and the irradiation angle is perpendicular to the film, and the photographing device of the first image acquisition device is arranged above the film and the shooting angle is perpendicular to the film; See also Figure 3 As shown, the light source device of the second image acquisition device is arranged below the film and the irradiation angle is directly opposite to the film, and the photographing device of the second image acquisition device is arranged above the film and there is a preset angle between the photographing angle and the film; See also Figure 4 As shown, the light source device and the photographic device of the third image acquisition device are arranged above the film in a "V" shape.

[0022] In step S1, the classification is performed according to the source of the acquisition device of the pre-prepared film image, specifically: If the pre-prepared film image passes through the first image acquisition device, the corresponding pre-prepared film image belongs to a dead block defect detection image; If the pre-prepared film image passes through the second image acquisition device, the corresponding pre-prepared film image belongs to the stripe defect detection image; If the pre-prepared film image passes through the third image acquisition device, the corresponding pre-prepared film image belongs to the dead wrinkle defect detection image.

[0023] Due to improper preparation equipment parameters, defects such as stiff blocks, active wrinkles or dead wrinkles may appear in the polyvinyl alcohol film. These defects affect the performance of the polyvinyl alcohol film. Therefore, in order to optimize the equipment parameters and prepare high-performance polyvinyl alcohol film, it is necessary to first pre-prepare according to the original set equipment parameters and identify film defects through film images.

[0024] The stripe defect of PVA film usually refers to the wavy alternating light and dark lines on the surface of the film caused by unreasonable setting of molding process parameters during the manufacturing process, which means that the stripe defect presents a change in brightness on the surface of the film, rather than physical bumps. If the light directly penetrates the film to reach the camera in a backlighting and camera facing forward, for transparent or translucent films, the light distribution is relatively uniform, resulting in a weakened contrast of the stripe defect in the image and making it difficult to distinguish. If the camera and the light source are arranged in a V-shape on the same side of the film, for the situation where the stripe defect needs to rely on light changes to highlight the characteristics, the side angle illumination may not provide enough contrast to clearly display the characteristics of the stripe defect. When the light source is facing forward to illuminate the film, the camera is arranged on the other side of the film and shoots at a certain angle, the camera receives the light passing through the film from the other side of the film at a certain angle. For transparent or translucent PVA films, when the light passes through the film, different transmission and reflection modes will be formed at the stripe defect, thereby producing obvious light and dark contrast, making the stripe defect characteristics more obvious. Therefore, the pre-prepared film image obtained by the second image acquisition device in this scheme is used as a stripe defect detection image for detecting whether there is a stripe defect.

[0025] When the film is photographed with backlight (i.e., the light source device and the photographing device are respectively arranged on both sides of the film), the image can hardly identify the characteristic information of the dead wrinkle defect. The dead wrinkle is a fixed and non-deformed defect on the surface of the film. Although it appears as unevenness on the surface of the film, this unevenness usually extends along the surface of the film and does not form a significant height difference or depth difference. Therefore, when the light is irradiated in a backlight manner, the light will not be obviously refracted or scattered, because the surface of the dead wrinkle does not form a sufficiently large angle or depth to change the path of the light, so it is difficult to form an obvious contrast in the image, resulting in a weak display of the dead wrinkle characteristic information. When the light source device and the photographing device are arranged in a "V" shape on the same side of the film, the light can be scattered or reflected to different degrees according to the uneven dead wrinkle defect, thereby forming a higher contrast area in the image, making the dead wrinkle feature more obvious. Therefore, in this scheme, the pre-prepared film image obtained by the third image acquisition device in which the light source device and the photographing device are arranged in a "V" shape above the film is used as a dead wrinkle defect detection image for detecting whether there is a dead wrinkle defect.

[0026] Block defects usually appear as opaque or semi-transparent areas in the film, which block or scatter light, resulting in obvious dark areas or uneven light spots in the image. Therefore, it is easier to identify block defects by using an image acquisition device (i.e., backlight shooting) with a light source device and a photographic device respectively provided on both sides of the film. The recognition accuracy of block defects is higher. In order to detect block defects separately without being affected by stripe defects obtained in the same backlighting manner, this scheme uses a pre-prepared film image obtained by a first image acquisition device with a light source device provided below the film and an irradiation angle perpendicular to the film, and a photographic device provided above the film and a shooting angle perpendicular to the film as a block defect detection image.

[0027] S2. Input the pre-prepared film image into the improved YOLOv5 model to detect whether the corresponding pre-prepared film image has defects one by one, and determine the defect type according to the type of the pre-prepared film image.

[0028] In step S2, the YOLOv5 improved model is constructed in a manner that specifically includes the following steps: T1. Train the YOLOv5 network on the coco large-scale target detection dataset to obtain a pre-trained YOLOv5 network model; T2. Modify the structure of the pre-trained YOLOv5 network model; T3. The pre-trained YOLOv5s network model with modified structure is trained with a large number of pre-collected polyvinyl alcohol film defect images to obtain a YOLOv5 improved model. The polyvinyl alcohol film defect images include polyvinyl alcohol film block defect images, polyvinyl alcohol film stripe defect images and polyvinyl alcohol film dead wrinkle defect images.

[0029] This scheme uses the rich and diverse image data in the COCO dataset to obtain a pre-trained model with good generalization ability, because the pre-trained model has learned the basic features on a large amount of diverse data, avoiding the problem of overfitting when the model is directly trained on a limited polyvinyl alcohol film defect image dataset.

[0030] In step T2, the structure of the pre-trained YOLOv5 network model is modified as follows: Replace the C3 module of the last layer in the backbone network of the pre-trained YOLOv5 network model with the Swin-Transformer module for fusion; The CA attention mechanism module is connected after the SPPF module in the backbone network of the pre-trained YOLOv5 network model, and the CA attention mechanism module is connected after the final C3 module in the feature mixing layer of the pre-trained YOLOv5 network model; The coupled prediction head of the detection layer of the pre-trained YOLOv5 network model is replaced with a decoupled head.

[0031] The general YOLOv5 network model mainly includes the backbone network, feature mixing layer and detection layer.

[0032] The backbone network of a general YOLOv5 network model includes convolutional layers, C3 modules, and SPPF modules. The C3 module is a residual structure that divides the input into two branches, one of which is passed directly, and the other is processed by multiple CBL modules before being connected to the output of the former. The SPPF module is a spatial pyramid pooling with a fixed grid size, using a larger pooling kernel to replace multiple pooling kernels of different sizes.

[0033] See also Figure 5 As shown in FIG. 1 , the Swin-Transformer module includes a normalization layer, a window multi-head attention module, a displacement window self-attention module and a multi-layer perceptron. The normalization layer is used to normalize the feature map, the window multi-head attention module is used to perform window division and multi-head self-attention calculation, the displacement window self-attention module is used to perform segmentation and displacement operations to realize information interaction between different windows, and the multi-layer perceptron is used to divide the feature map into categories. In this scheme, the C3 module of the last layer in the backbone network of the YOLOv5 network model is replaced with the Swin-Transformer module. The self-attention mechanism of the Swin-Transformer helps the model to better understand the image content. At the same time, through window division and hierarchical design, the receptive field of the model can be effectively expanded, so that the model can capture a wider range of contextual information and extract image features more efficiently. In addition, the window multi-head attention module uses a window-based calculation strategy, which significantly reduces the amount of calculation and complexity. This scheme only replaces the last layer of the C3 module, and introduces a new mechanism without destroying the original network structure, thereby improving the performance while reducing the impact on the stability of the model.

[0034] CA is an efficient attention mechanism, including channel attention and spatial attention, which can simultaneously obtain channel information, direction perception and position perception. The principle and related calculation of CA attention mechanism are existing technologies and will not be repeated here. This solution introduces the CA attention mechanism module to strengthen the model's attention to important features and improve the network's sensitivity to key information, thereby improving the performance of the model.

[0035] The final C3 module in the feature mixing layer of the original YOLOv5 network model is the C3 module in the feature mixing layer connected to the detection layer. That is, this solution connects the CA attention mechanism module after the final C3 module in the feature mixing layer, which is equivalent to connecting the final C3 module with the CA attention mechanism module, and then connecting the CA attention mechanism module with the detection layer.

[0036] In the decoupling head of this scheme, a 1×1 convolution is first used to reduce the feature channels to 256, and then two 3×3 convolutions are used to act on the classification task and regression task of the model respectively.

[0037] The classification task of this scheme refers to binary classification prediction, which only requires the sigmoid activation function to output a probability value to indicate the possibility of the existence of a defect, and then determine whether a defect exists through a threshold; while the regression task is to predict and identify the position, size, and confidence of the defect in the image.

[0038] The detection layer of the general YOLOv5 network model adopts a coupled prediction head, which puts the classification task and the regression task in the same detection head, which easily leads to conflicts between the two tasks and thus reduces the detection accuracy and slows down the convergence speed of the model. Therefore, this solution replaces it with a decoupling head to separate the classification task and the regression task for prediction, thereby improving the detection accuracy and convergence speed of the model.

[0039] In step S2, the defect type is determined according to the type of the pre-prepared film image, specifically: If the pre-prepared film image is a block defect detection image, the defect type of the detected defect belongs to a block defect; If the pre-prepared film image is a live wrinkle defect detection image, the defect type of the detected defect belongs to a live wrinkle defect; If the pre-prepared film image is a dead wrinkle defect detection image, the defect type of the detected defect belongs to a dead wrinkle defect.

[0040] S3, analyzing the first defect level QC1 corresponding to the pre-prepared film image acquired by the first image acquisition device, the second defect level QC2 corresponding to the pre-prepared film image acquired by the second image acquisition device, and the third defect level QC3 corresponding to the pre-prepared film image acquired by the third image acquisition device.

[0041] In step S3, the first defect degree corresponding to the pre-prepared film image acquired by the first image acquisition device is specifically calculated by the formula: Among them, k11 and k12 respectively represent the preset first weight and the preset second weight for analyzing the first defect degree, and k11+k12=1, P1 represents the total number of defective pre-prepared film images acquired by the first image acquisition device, that is, the total number of pre-prepared film images judged to have block defects, N1 represents the total number of pre-prepared film images acquired by the first image acquisition device, that is, the total number of block defect detection images, XS1 represents the total number of pixels of the defective area in all defective pre-prepared film images acquired by the first image acquisition device, that is, the total number of pixels occupied by the block defect area counted in all block defect detection images, and S1 represents the total number of pixels of all pre-prepared film images acquired by the first image acquisition device.

[0042] In step S3, the first defect degree corresponding to the pre-prepared film image acquired by the first image acquisition device is specifically calculated by the following formula: Among them, k21 and k22 respectively represent the preset first weight and the preset second weight for analyzing the second defect degree, and k21+k22=1, P2 represents the total number of defective pre-prepared film images acquired by the second image acquisition device, that is, the total number of pre-prepared film images judged to have stripe defects, N2 represents the total number of pre-prepared film images acquired by the second image acquisition device, that is, the total number of stripe defect detection images, XS2 represents the total number of pixels of the defective area in all defective pre-prepared film images acquired by the second image acquisition device, that is, the total number of pixels occupied by the stripe defect areas counted in all stripe defect detection images, and S2 represents the total number of pixels of all pre-prepared film images acquired by the second image acquisition device.

[0043] In step S3, the first defect degree corresponding to the pre-prepared film image acquired by the first image acquisition device is specifically calculated by the following formula: Among them, k31 and k32 respectively represent the preset first weight and the preset second weight for analyzing the third defect degree, and k31+k32=1, P3 represents the total number of defective pre-prepared film images acquired by the third image acquisition device, that is, the total number of pre-prepared film images judged to have dead wrinkle defects, N3 represents the total number of pre-prepared film images acquired by the third image acquisition device, that is, the total number of dead wrinkle defect detection images, XS3 represents the total number of pixels of the defective area in all defective pre-prepared film images acquired by the third image acquisition device, that is, the total number of pixels occupied by the dead wrinkle defect areas counted in all dead wrinkle defect detection images, and S3 represents the total number of pixels of all pre-prepared film images acquired by the third image acquisition device.

[0044] S4. Obtain equipment optimization parameters through a pre-trained deep learning model according to the first defect degree, the second defect degree, and the third defect degree.

[0045] The temperature of the extruder melting zone and the pulling speed of the pulling device are two important equipment parameters for preparing high-performance polyvinyl alcohol films: If the temperature of the melting zone of the extruder is too low, the PVA material will not be fully melted, forming unmelted particles, which will form rigid blocks in the film. If the temperature is too high, the material may be locally overheated, causing thermal degradation, which will also lead to the formation of rigid blocks. If the temperature is too low, the fluidity of the material will be affected, while if the temperature is too high, the material may decompose, both of which will lead to the formation of stripes. If the temperature is too high, the film may form dead wrinkles due to uneven shrinkage when cooling. If the temperature is too low, the film will have poor fluidity during extrusion and prone to dead wrinkles. If the pulling speed of the pulling device is too fast, the film will be stretched before it is completely cooled or solidified, which may cause stiff blocks on the film surface. If the pulling speed is too slow, the film may accumulate after the extrusion die, which is also not conducive to the uniformity of the film. If the pulling speed is too fast, the film will be subjected to excessive tension before cooling, resulting in irreversible dead wrinkles on the film surface. If the pulling speed is too slow, the film may relax during the cooling process, which may also cause dead wrinkles.

[0046] Therefore, in step S4, the equipment optimization parameters include the optimized temperature of the melting zone of the extruder and the optimized traction speed of the traction device.

[0047] The deep learning model of step S4 is trained using a large amount of historical extruder melting zone temperature, historical traction device traction speed, and corresponding historical first defect degree, historical second defect degree, and historical third defect degree as training data.

[0048] Embodiment 2 The present invention also provides an electronic device, including: a processor, a sending device, an input device, an output device and a memory. The processor can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in the embodiment of the present application. The memory can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM), and is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any of the above possible implementation methods.

[0049] Embodiment 3 The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a method as described in any possible implementation manner.

[0050] The beneficial effects of the present invention are: The present invention obtains a plurality of pre-prepared film images respectively through a first image acquisition device, a second image acquisition device and a third image acquisition device, and classifies the pre-prepared film images according to the acquisition device sources, and then uses the YOLOv5 improved model that introduces the Swin-Transformer module and the CA attention mechanism to judge the existence of corresponding defects according to each type of image, thereby improving the recognition accuracy of each type of defect, and optimizing the parameters of the equipment through a pre-trained deep learning model according to the defect degree of each type of defect, thereby reducing film defects and improving the performance of the prepared polyvinyl alcohol film; The present invention sets image acquisition devices of different equipment layouts according to different types of defects, and specifically judges defects on images acquired by different image acquisition devices, thereby avoiding identifying different defect types on the same image, thereby improving the recognition accuracy of each type, and further improving the accuracy of equipment optimization parameters; The present invention replaces the C3 module of the last layer in the backbone network of the YOLOv5 network model with a Swin-Transformer module. The self-attention mechanism of Swin-Transformer helps the model to better understand the image content. At the same time, through window division and hierarchical design, the receptive field of the model can be effectively expanded, so that the model can capture a wider range of context information and extract image features more efficiently. In addition, the window-based calculation strategy is used through the window multi-head attention module, which significantly reduces the amount of calculation and complexity, and improves the accuracy and efficiency of defect recognition. The present invention introduces a CA attention mechanism module to strengthen the model's attention to important features and improve the network's sensitivity to key information, thereby improving the performance of the model, thereby improving the accuracy of defect identification and further improving the accuracy of equipment optimization parameters.

[0051] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0052] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (RandomAccess Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0053] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for preparing high-performance polyvinyl alcohol film based on machine learning optimization, characterized in that: The following steps are involved: Acquire a plurality of pre-prepared film images respectively by a first image acquisition device, a second image acquisition device and a third image acquisition device, and classify the pre-prepared film images according to the acquisition device sources; Input the pre-prepared film images into the improved YOLOv5 model to detect whether the corresponding pre-prepared film images have defects one by one, and determine the defect type according to the type of the pre-prepared film image; Analyze the first defect level QC1 corresponding to the pre-prepared film image acquired by the first image acquisition device, the second defect level QC2 corresponding to the pre-prepared film image acquired by the second image acquisition device, and the third defect level QC3 corresponding to the pre-prepared film image acquired by the third image acquisition device; Obtaining equipment optimization parameters through a pre-trained deep learning model according to the first defect degree, the second defect degree, and the third defect degree; The YOLOv5 improved model is obtained by training a pre-trained YOLOv5s network model after structural modification with a large number of pre-collected polyvinyl alcohol film defect images; The specific modification methods of the pre-trained YOLOv5s network model after the structural modification include: Replace the C3 module of the last layer in the backbone network of the pre-trained YOLOv5 network model with the Swin-Transformer module for fusion; The CA attention mechanism module is connected after the SPPF module in the backbone network of the pre-trained YOLOv5 network model, and the CA attention mechanism module is connected after the final C3 module in the feature mixing layer of the pre-trained YOLOv5 network model.

2. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The method for obtaining the pre-trained YOLOv5 network model is specifically as follows: a YOLOv5 network is trained on a coco large object detection dataset to obtain a pre-trained YOLOv5 network model.

3. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The Swin-Transformer module includes: a normalization layer, a window multi-head attention module, a displacement window self-attention module and a multi-layer perceptron.

4. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The first image acquisition device, the second image acquisition device and the third image acquisition device correspond to different equipment layouts, specifically: The light source device of the first image acquisition device is arranged below the film and the irradiation angle is perpendicular to the film, and the photography device of the first image acquisition device is arranged above the film and the shooting angle is perpendicular to the film; The light source device of the second image acquisition device is arranged below the film and the irradiation angle is directly opposite to the film, and the photography device of the second image acquisition device is arranged above the film and there is a preset angle between the photography angle and the film; The light source device and the photographic device of the third image acquisition device are arranged above the film in a "V" shape.

5. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The classification is carried out according to the source of the acquisition device of the pre-prepared film image, specifically: If the pre-prepared film image passes through the first image acquisition device, the corresponding pre-prepared film image belongs to a dead block defect detection image; If the pre-prepared film image passes through the second image acquisition device, the corresponding pre-prepared film image belongs to the stripe defect detection image; If the pre-prepared film image passes through the third image acquisition device, the corresponding pre-prepared film image belongs to the dead wrinkle defect detection image.

6. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 5, characterized in that: The method of judging the defect type according to the type of the pre-prepared film image is specifically: If the pre-prepared film image is a block defect detection image, the defect type of the detected defect belongs to a block defect; If the pre-prepared film image is a live wrinkle defect detection image, the defect type of the detected defect belongs to a live wrinkle defect; If the pre-prepared film image is a dead wrinkle defect detection image, the defect type of the detected defect belongs to a dead wrinkle defect.

7. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The specific calculation formulas for the first defect degree, the second defect degree and the third defect degree are respectively: k11 and k12 represent a preset first weight and a preset second weight for analyzing a first defect degree, respectively, and k11+k12=1, P1 represents the total number of defective pre-prepared film images acquired by the first image acquisition device, N1 represents the total number of pre-prepared film images acquired by the first image acquisition device, XS1 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the first image acquisition device, and S1 represents the total number of pixels of all pre-prepared film images acquired by the first image acquisition device; k21 and k22 represent the preset first weight and the preset second weight for analyzing the second defect degree, respectively, and k21+k22=1, P2 represents the total number of defective pre-prepared film images acquired by the second image acquisition device, N2 represents the total number of pre-prepared film images acquired by the second image acquisition device, XS2 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the second image acquisition device, and S2 represents the total number of pixels of all pre-prepared film images acquired by the second image acquisition device; k31 and k32 represent the preset first weight and the preset second weight for analyzing the third defect degree, respectively, and k31+k32=1, P3 represents the total number of defective pre-prepared film images acquired by the third image acquisition device, N3 represents the total number of pre-prepared film images acquired by the third image acquisition device, XS3 represents the total number of pixels of defective areas in all defective pre-prepared film images acquired by the third image acquisition device, and S3 represents the total number of pixels of all pre-prepared film images acquired by the third image acquisition device.

8. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The equipment optimization parameters include the optimized temperature of the melting zone of the extruder and the optimized traction speed of the traction device.

9. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 1, characterized in that: The specific modification method of the structurally modified pre-trained YOLOv5s network model also includes: replacing the coupled prediction head of the detection layer of the pre-trained YOLOv5 network model with a decoupling head.

10. The method for preparing a high-performance polyvinyl alcohol film based on machine learning optimization according to claim 9, characterized in that: The decoupling head first uses a 1×1 convolution to reduce the feature channels to 256, and then uses two 3×3 convolutions to act on the classification task and regression task respectively.

Citation Information

Cited By

  • Method and system for intelligently collecting frosted granularity on surface of PET (Polyethylene Terephthalate) film

    CN119762916A