A machine vision-based synthetic latex online quality detection method and system

By employing a machine vision-based online quality inspection method, which utilizes U-Net image segmentation and convolutional feature extraction networks combined with a long short-term memory network, the accuracy problem of online detection of synthetic latex was solved, enabling real-time identification and early warning of foam, liquid phase, and flocculation anomalies.

CN122193228APending Publication Date: 2026-06-12RIZHAO KUMHO JINMA CHEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610464609.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-09
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing methods for detecting the quality of synthetic latex rely on manual observation and offline testing, making it difficult to achieve real-time online monitoring. Furthermore, existing image detection methods are susceptible to flow and disturbances, leading to inaccurate anomaly detection.

Method used

An online quality inspection method based on machine vision is adopted. By establishing an identification model and a judgment model, the foam interference area and the liquid phase detection area are distinguished. The U-Net image segmentation network, convolutional feature extraction network and long short-term memory network are combined to identify and analyze foam, liquid phase and flocculation anomalies.

Benefits of technology

It enables online detection of foam, liquid phase, and flocculation anomalies, reduces the impact of short-term disturbances, improves the accuracy and timeliness of anomaly identification, and ensures the stability of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122193228A_ABST
    Figure CN122193228A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of synthetic latex quality detection, and discloses a synthetic latex online quality detection method and system based on machine vision, which comprises the following steps: obtaining historical data, establishing an identification model and a judgment model; collecting image data of the synthetic latex and calling the identification model to perform identification, extracting foam interference area images and liquid phase detection area images, performing foam analysis on the foam interference area images to obtain foam analysis results; performing liquid phase analysis on the liquid phase detection area images to obtain liquid phase analysis results, calling the judgment model to perform flocculation analysis on the liquid phase detection area images to obtain flocculation analysis results; and judging the quality of the synthetic latex according to the foam analysis results, the liquid phase analysis results and the flocculation analysis results. The present application can realize online quality judgment in the flowing stage after the synthetic latex is discharged from the reactor, improve the accuracy of abnormal identification and the timeliness of online early warning, and is conducive to timely discovery of stability risks and reduction of abnormal batches flowing into subsequent processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of synthetic latex quality inspection technology, specifically to an online quality inspection method and system for synthetic latex based on machine vision. Background Technology

[0002] Synthetic latex is a liquid dispersion system formed by polymer particles dispersed in an aqueous phase. It is widely used in adhesives, coating materials, impregnated products, papermaking materials, and functional emulsions. Synthetic latex remains in a continuous flow state after exiting the reactor. Its apparent stability, liquid phase homogeneity, foaming state, and flocculation state directly affect the subsequent filtration, storage, transportation, and use. Abnormal foaming, localized foam accumulation, liquid phase heterogeneity, or persistent flocculation during the online flow stage often indicate that the current batch has apparent quality abnormalities or stability risks, thus requiring timely identification during production.

[0003] Current methods for quality testing of synthetic latex largely rely on manual sampling and observation, offline laboratory testing, or testing of single physicochemical indicators. Manual observation is heavily influenced by subjective experience and can only identify obvious anomalies that have already formed, making it unsuitable for real-time monitoring in continuous production processes. Offline testing suffers from detection lag and cannot promptly reflect changes in the flow state after the reactor stage. While single physicochemical indicators can reflect some properties, they lack direct characterization capabilities for online visible anomalies such as foam distribution, localized unevenness, and persistent flocculation processes, making it difficult to meet the rapid judgment requirements under continuous production conditions.

[0004] On the other hand, synthetic latex exhibits relatively stable image representation during its online flow phase. Foam regions, liquid phase regions, aggregated particles, and flocculated clusters all show identifiable differences in the images, providing a foundation for online detection using machine vision. However, existing image detection methods, if they directly perform uniform analysis on continuous images, are easily affected by overall liquid phase flow, local short-term disturbances, and foam region interference, making it difficult to distinguish between persistent flocculation and transient disturbances, thus reducing the accuracy of anomaly detection. Therefore, an online quality detection method is needed that can adapt to the online flow scenario of synthetic latex and distinguish between foam anomalies, liquid phase anomalies, and persistent flocculation anomalies. Summary of the Invention

[0005] In view of the above-mentioned problems, the present invention is proposed.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an online quality inspection method for synthetic latex based on machine vision, comprising: Step S1: Obtain historical data and build an identification model and a judgment model based on the historical data; Step S2: Collect image data of synthetic latex and call the recognition model for recognition. Based on the recognition results, extract the foam interference area image and the liquid phase detection area image from the image data. Perform foam analysis on the foam interference area image to obtain the foam analysis results. Step S3: Perform liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, call the judgment model to perform flocculation analysis on the liquid phase detection area image to obtain the flocculation analysis results; Step S4: Determine the quality of the synthetic latex based on the foam analysis results, liquid phase analysis results, and flocculation analysis results.

[0007] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the historical data includes historical image data, region annotation data, and status annotation data. The region annotation data performs region annotation on the historical image data, dividing the historical image data into historical foam interference area images and historical liquid phase detection area images. A recognition model was built and trained based on historical image data and region annotation data; A judgment model was established and trained based on historical liquid phase detection area images and status annotation data.

[0008] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the step of establishing and training a recognition model based on historical image data and region annotation data includes: A recognition model based on the U-Net image segmentation network is constructed. Historical image data is input into the recognition model, and the predicted segmentation result is obtained through forward computation. The predicted segmentation results are compared with the corresponding region annotation data to calculate the segmentation loss; The model parameters in the recognition model are iteratively updated based on the segmentation loss to obtain the trained recognition model.

[0009] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the step of establishing and training a judgment model based on historical liquid phase detection area images and state annotation data includes: The judgment model consists of a compensation component, a flocculation branch, a disturbance branch, and a joint judgment component. The compensation component calculates the mainstream migration direction and mainstream migration amplitude based on historical liquid phase detection area images; Based on the mainstream migration direction and mainstream migration amplitude, reverse position alignment is performed on subsequent historical liquid phase detection area images to form a historical migration compensation image sequence. Flocculation and perturbation branches are established, and both adopt a temporal analysis structure composed of a convolutional feature extraction network and a long short-term memory network. Input the historical migration compensation image sequence into the flocculation branch, obtain the historical flocculation prediction result through forward computation, and calculate the flocculation branch loss based on the historical flocculation prediction result and state labeling data. The flocculation branch is iteratively updated based on the loss of the flocculation branch to obtain the trained flocculation branch. The historical liquid phase detection area image is input into the disturbance branch, and the historical disturbance prediction result is obtained through forward calculation. The disturbance branch loss is calculated based on the historical disturbance prediction result and the state labeling data. The perturbation branch is iteratively updated based on the perturbation branch loss to obtain the trained perturbation branch; The compensation component, the trained flocculation branch, the trained disturbance branch, and the joint decision component are combined to form a decision model. The joint determination section uses historical flocculation prediction results as positive determination evidence and historical disturbance prediction results as negative suppression evidence to perform joint determination.

[0010] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the step of performing foam analysis on the image of the foam interference area to obtain the foam analysis results includes: The area of ​​the foam interference region is determined based on the recognition results, and the ratio between the area of ​​the foam interference region and the total area of ​​the image data is calculated to obtain the proportion of the foam area. Connectivity region extraction is performed on the foam interference area image to obtain multiple foam connected regions. The degree of foam aggregation is calculated based on the distribution location and mutual spacing of the multiple foam connected regions. The proportion of foam area and the degree of foam aggregation are used as the results of foam analysis, which are two numerical results.

[0011] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, wherein: performing liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results includes: The image of the liquid phase detection area is converted to grayscale to obtain a grayscale image; Calculate the average gray value of the grayscale image, and define the region where the difference between the gray value and the average gray value exceeds the gray difference threshold as the region of agglomerated particles; The proportion of agglomerated particle area is calculated based on the ratio between the total area of ​​the agglomerated particle region and the total area of ​​the liquid phase detection region image. The grayscale image is divided into multiple local analysis regions. The average grayscale value of each local analysis region is calculated. The dispersion between all local analysis regions is calculated to obtain the liquid phase homogeneity. The area ratio of agglomerated particles and the homogeneity of the liquid phase are used as the results of liquid phase analysis, which are two numerical results.

[0012] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the step of performing flocculation analysis on the liquid phase detection area image using a judgment model to obtain flocculation analysis results includes: The local analysis regions of the liquid phase detection area image at the current time and the liquid phase detection area image at the next time are obtained, and the local analysis regions are used as texture blocks. The texture block of the liquid phase detection area image at the current moment is used as a reference block, and block matching is performed with the texture block in the liquid phase detection area image at the next moment to find the matching block with the highest similarity to the reference block. Based on the positional difference between the reference block and the matching block, the candidate migration vector of the texture block is obtained; Based on the direction of each candidate migration vector, the directional distribution of the candidate migration vectors is statistically analyzed, and the directional interval with the highest degree of directional concentration is determined as the main directional interval. Candidate migration vectors whose directions fall within the main direction interval are retained as consistent migration vectors, and the mainstream migration direction is calculated based on the consistent migration vectors. The projection of each consistent migration vector onto the mainstream migration direction is taken as the directional projection displacement, and the mainstream migration amplitude is calculated based on the projection displacement of all directions. Based on the mainstream migration direction and mainstream migration amplitude, reverse position alignment is performed on the liquid phase detection area image at the next moment to obtain the migration compensation image at the next moment. Input the migration compensation image sequence into the flocculation branch to generate flocculation prediction results; The image of the liquid phase detection area is input into the perturbation branch to generate perturbation prediction results; The flocculation prediction results are used as positive evidence for judgment, and the perturbation prediction results are used as negative evidence for suppression; a joint judgment is then performed. When the flocculation prediction result reaches the flocculation judgment threshold and the disturbance prediction result is lower than the disturbance suppression threshold, it is judged to be in a flocculation state. When the disturbance prediction result reaches the disturbance suppression threshold, the flocculation state determination is suppressed. The flocculation analysis results are generated based on the joint judgment results. The flocculation analysis results are binary judgment results, including flocculation state and non-flocculation state.

[0013] As a preferred embodiment of the online quality inspection method for synthetic latex based on machine vision described in this invention, the step of judging the quality of synthetic latex based on foam analysis results, liquid phase analysis results, and flocculation analysis results includes: Set thresholds for foam area ratio, foam aggregation degree, aggregated particle area ratio, and liquid phase uniformity. When the flocculation analysis result indicates a flocculation state, the quality of the synthetic latex is directly determined to be abnormal, and an alarm is issued. When the flocculation analysis result is in a non-flocculation state, the foam analysis result and the liquid phase analysis result are compared with the corresponding threshold respectively; If both the foam analysis results and the liquid phase analysis results are within the threshold, then the quality of the synthetic latex is normal. If the proportion of foam area exceeds the foam area proportion threshold, it is judged as an abnormal foaming. If the degree of foam aggregation exceeds the foam aggregation threshold, it is judged as abnormal foam accumulation; If the area ratio of aggregated particles exceeds the threshold for the area ratio of aggregated particles, it is judged as an agglomeration anomaly. If the homogeneity of the liquid phase exceeds the threshold for homogeneity, it is judged as an abnormality.

[0014] A machine vision-based online quality inspection system for synthetic latex employing any of the methods described in this invention, comprising: a modeling module for acquiring historical data and establishing a recognition model and a judgment model based on the historical data; The first analysis module collects image data of synthetic latex and calls the recognition model for recognition. Based on the recognition results, it extracts images of the foam interference area and the liquid phase detection area from the image data, performs foam analysis on the foam interference area image, and obtains the foam analysis results. The second analysis module performs liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, and calls the judgment model to perform flocculation analysis on the liquid phase detection area image to obtain the flocculation analysis results. The output module determines the quality of the synthetic latex based on the results of foam analysis, liquid phase analysis, and flocculation analysis.

[0015] The beneficial effects of this invention are: This invention enables online quality judgment during the flow stage after the synthetic latex exits the reactor, distinguishing between foam abnormalities, liquid phase abnormalities, and persistent flocculation abnormalities, reducing the impact of short-term disturbances on the judgment results, improving the accuracy of abnormality identification and the timeliness of online early warning, and facilitating the timely detection of stability risks and reducing the inflow of abnormal batches into subsequent processes. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an overall flowchart of an online quality inspection method for synthetic latex based on machine vision, provided in Embodiment 1 of the present invention. Detailed Implementation

[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0019] Example 1, referring to Figure 1 As one embodiment of the present invention, a machine vision-based online quality inspection method for synthetic latex is provided, comprising: Step S1: Obtain historical data and establish an identification model and a judgment model based on the historical data.

[0020] Synthetic latex typically appears as a flowing liquid with a certain degree of milky whiteness. Under normal conditions, the image is relatively uniform overall, with continuous liquid phase regions and gentle local texture changes. When latex is abnormal, it often shows more obvious changes in appearance on the image, such as increased foam coverage, local coarsening of the liquid phase region, increased particle clusters, and uneven color distribution.

[0021] Synthetic latex typically appears as a continuous milky white or milky-gray liquid image during its flow phase after exiting the reactor, exhibiting a certain degree of turbidity and continuous flow. Under normal image conditions, the liquid phase region is relatively coherent, with relatively gentle brightness changes, fine and uniform local textures, and no large-area abrupt boundary changes. However, when foaming occurs during flow, the foam region will form a different appearance from the liquid phase detection area in the image, often appearing as a brighter region with denser edges, more fragmented local contours, and more irregular connectivity. In other words, within the same synthetic latex image, the liquid phase region and the foam region inherently exhibit significant differences in appearance.

[0022] Historical image data is acquired, and then region-labeled data and state-labeled data are generated based on manual annotation. Historical image data, region-labeled data, and state-labeled data constitute historical data. Historical image data is collected from the flow and transport stage of latex. On the one hand, at this stage, the latex has formed a stable and observable flowing liquid phase, and the image content can truly reflect the appearance state of the latex after the reactor. On the other hand, the flow and transport stage can continuously acquire historical image data and cover various changes such as normal state, foam disturbance state, abnormal liquid phase state, and flocculation formation state, which facilitates the formation of representative historical image data.

[0023] Region labeling data is used to divide different regions in historical image data, categorizing historical image data into historical foam interference area images and historical liquid phase detection area images. Historical foam interference area images mainly reflect flow disturbances, foaming states, and surface coverage states. They cannot stably represent the true appearance of the latex bulk liquid phase. Directly performing a unified analysis on historical image data can easily lead to foam edges, foam highlighting areas, and foam aggregation morphology being mistaken for liquid phase anomalies, thus affecting the accuracy of subsequent identification results.

[0024] State-labeled data is used to annotate the changing states of historical liquid phase detection area images over continuous time periods. This data includes stable state labeling data, perturbation state labeling data, and flocculation state labeling data. Specifically, stable state labeling data corresponds to image states where the liquid phase detection area is continuous, uniform, and without persistently enhancing clusters; perturbation state labeling data corresponds to image states where local anomalies appear briefly and then rapidly weaken or disappear; and flocculation state labeling data corresponds to image states where local clusters are persistently retained, continuously expanding, or continuously enhancing over continuous time periods. Through this state-labeled data, the decision-making model can learn the process characteristics of the evolution of the synthetic latex liquid phase region from a stable state to a flocculated state.

[0025] Furthermore, a recognition model is established based on historical image data and region annotation data. A recognition model based on the U-Net image segmentation network is constructed. The model receives historical image data as input and outputs the predicted segmentation result corresponding to the historical image data. In the region segmentation result, each historical image data corresponds to a region category, indicating whether the location belongs to a foam interference area or a liquid phase detection area. During training, historical image data is input into the U-Net image segmentation network, and the predicted segmentation result is obtained through forward computation.

[0026] After obtaining the predicted segmentation results, the predicted segmentation results are compared with the corresponding region annotation data, and the segmentation loss is calculated. The segmentation loss reflects the degree of difference between the predicted segmentation results and the region annotation data.

[0027] The segmentation loss is preferably calculated using a weighted combination of cross-entropy loss and Dice loss, expressed as: ; in, Indicates the segmentation loss; The weight coefficients representing the cross-entropy loss; Represents cross-entropy loss; This represents the Dice loss. The weight coefficients of the cross-entropy loss are determined by comparing the predicted segmentation results on historical image data. The weight coefficients of the cross-entropy loss are increased when pixel-level classification accuracy is given more importance, and decreased when the overall region overlap effect and class imbalance adaptability are given more importance.

[0028] Cross-entropy loss constrains the classification results of historical image data, enabling the recognition model to learn the basic category differences between foam interference areas and liquid detection areas. Dice loss strengthens the constraint on the degree of region overlap, allowing the recognition model to achieve more stable segmentation results at foam edge locations, liquid contour locations, and small foam areas. Combining cross-entropy loss and Dice loss can simultaneously ensure pixel classification accuracy and overall region overlap.

[0029] After calculating the segmentation loss, the model parameters in the U-Net image segmentation network are iteratively updated based on the segmentation loss. The optimal method for updating the model parameters is backpropagation combined with the Adam optimization algorithm.

[0030] Specifically, the gradients of the parameters of each layer are calculated based on the backpropagation of the segmentation loss along the network, and then the Adam optimization algorithm updates the model parameters according to the current gradient direction and historical gradient changes. The Adam optimization algorithm has good convergence stability in image segmentation training, and can reduce parameter oscillations while ensuring training efficiency, enabling the recognition model to converge quickly to a parameter state suitable for the image segmentation task of this invention.

[0031] The recognition model training process employs a multi-round iterative training approach. In each round, historical image data is input into the U-Net image segmentation network to obtain predicted segmentation results. The segmentation loss is calculated, and the model parameters are updated based on the segmentation loss. As the number of training rounds increases, the difference between the predicted segmentation results and the region-labeled data gradually decreases, and the recognition model's ability to segment foam interference areas and liquid phase detection areas gradually improves. When the segmentation loss decreases below a loss decrease threshold for several consecutive rounds of training, the training ends, and the trained recognition model is obtained.

[0032] Furthermore, a judgment model is established based on historical liquid phase detection area images and status annotation data.

[0033] The decision model consists of a compensation component, a flocculation branch, a disturbance branch, and a joint decision component. The compensation component eliminates the influence of overall liquid flow on continuous image position changes; the flocculation branch identifies flocculation changes in the liquid region that are persistent, expanding, or intensifying; the disturbance branch identifies short-lived, rapidly dissipating disturbances in the liquid region that lack continuous enhancement; and the joint decision component integrates the outputs of the flocculation and disturbance branches during model invocation to perform a joint decision.

[0034] First, the compensation section calculates the mainstream migration direction and amplitude based on the overall migration of liquid phase textures in continuous historical liquid phase detection area images. Since synthetic latex is in a continuous flow state after exiting the reactor, local textures and clusters in the liquid phase region will move with the overall fluid. If the liquid phase detection area images are directly judged temporally, the positional changes caused by the overall flow are easily misjudged as flocculation. Therefore, the compensation section first estimates the mainstream migration of the liquid phase region between consecutive frames, and then performs reverse position alignment on subsequent historical liquid phase detection area images based on the mainstream migration direction and amplitude, forming a historical migration compensation image sequence. After this processing, the positional shift caused by the overall liquid phase flow is weakened, and subsequent flocculation branches can more easily identify local anomalies that truly have continuously preserved and enhanced characteristics.

[0035] Secondly, when establishing the flocculation pathway, a temporal analysis structure composed of a convolutional feature extraction network and a long short-term memory network is adopted. The convolutional feature extraction network is suitable for extracting local texture features and cluster morphology features of each frame in the historical migration compensation image sequence, while the long short-term memory network is suitable for modeling the image change process within continuous time periods and can identify whether there is an evolutionary process of continuous retention, continuous expansion, and continuous enhancement of local clusters.

[0036] During the training of the flocculation branch, a sequence of historical migration-compensated images is input into the flocculation branch. A convolutional feature extraction network extracts local texture features and cluster morphology features from each frame. A long short-term memory network then performs temporal analysis on these continuous local texture features and cluster morphology features, outputting the historical flocculation prediction results corresponding to the flocculation state in the historical migration-compensated image sequence. Subsequently, the historical flocculation prediction results are compared with the corresponding flocculation state annotation data to calculate the flocculation branch loss, which is calculated using the binary cross-entropy loss function.

[0037] Based on the loss of the flocculation branch, backpropagation is used to calculate the gradient of the parameters of each layer of the flocculation branch, and then the Adam optimization algorithm is used to iteratively update the model parameters. When the decrease in the loss of the flocculation branch in several consecutive training rounds is lower than the loss threshold of the flocculation branch, it is considered that the flocculation branch has basically converged, and training is stopped.

[0038] The loss threshold for the flocculation branch is set based on the changes in the loss of the flocculation branch. For example, a convergence condition can be set if the loss decreases by less than 1% for five consecutive rounds of verification. To avoid too many training rounds, a maximum number of iteration rounds can also be set. Training will stop directly when the maximum number of iteration rounds is reached. The maximum number of iteration rounds can be set according to the scale of historical data, for example, 50 to 100 rounds.

[0039] Furthermore, when establishing the perturbation branch, a temporal analysis structure consisting of a convolutional feature extraction network and a long short-term memory network is also used. Although perturbations also manifest as temporal changes in continuous images, their patterns of change differ from flocculation. Perturbations are more characterized by short-term appearance, rapid dissipation, and a lack of continuous enhancement. The convolutional feature extraction network is used to extract the appearance features of local anomalies in historical liquid phase detection area images, while the long short-term memory network is used to analyze the changes of such local anomalies over continuous time periods.

[0040] During training of the perturbation branch, historical liquid phase detection area images are input into the perturbation branch. A convolutional feature extraction network extracts local anomaly appearance features from each frame of the image. A long short-term memory network then performs temporal analysis on these continuous local anomaly appearance features, outputting historical perturbation prediction results corresponding to the perturbation states in the historical liquid phase detection area image sequence. Subsequently, the historical perturbation prediction results are compared with the corresponding perturbation state annotation data to calculate the perturbation branch loss. The perturbation branch loss is also calculated using the binary cross-entropy loss function to constrain the consistency between the perturbation branch output and the actual perturbation state.

[0041] Based on the perturbation branch loss, the gradient of the parameters of each layer of the perturbation branch is calculated using backpropagation. Then, the Adam optimization algorithm is used to iteratively update the model parameters, allowing the perturbation branch to gradually learn the perturbation variation patterns of short-lived occurrence, rapid dissipation, and lack of continuous reinforcement. When the decrease in the perturbation branch loss in several consecutive training rounds is lower than the perturbation branch loss threshold, the perturbation branch is considered to have basically converged, and training is stopped.

[0042] The setting of the loss threshold for the disturbance branch is similar to that for the flocculation branch, and is also set according to the changes in the loss threshold of the disturbance branch. The maximum number of iterations can also be set at the same time.

[0043] Finally, the compensation component, the trained flocculation branch, the trained disturbance branch, and the joint decision component are combined to form a decision model.

[0044] The joint decision-making component does not independently perform feature learning; instead, it performs joint decision-making based on the outputs of the flocculation and perturbation branches when the decision model is invoked. Specifically, the joint decision-making component uses historical flocculation prediction results as positive decision evidence and historical perturbation prediction results as negative suppression evidence. When the historical flocculation prediction result reaches the flocculation decision threshold but the historical perturbation prediction result does not reach the perturbation suppression threshold, the current liquid phase detection zone is determined to be in a flocculation state. When the historical perturbation prediction result reaches the perturbation suppression threshold, the perturbation prediction result is used to weight and attenuate the flocculation prediction result, thus suppressing the historical flocculation prediction result. The perturbation suppression coefficient for weighted attenuation is determined based on historical data, selecting the coefficient that minimizes the misclassification rate of the flocculation state.

[0045] It should be noted that after the judgment model is trained, historical data is used to statistically analyze the flocculation identification results and perturbation suppression results under different thresholds. The threshold that optimizes the combined effect of flocculation identification accuracy and recall is set as the flocculation judgment threshold, and the threshold that optimizes the combined effect of perturbation suppression accuracy and flocculation false positive rate is set as the perturbation suppression threshold. In practice, both can be initially set to 0.5, and then adjusted based on historical data.

[0046] This enables the judgment model to distinguish between continuous anomalies in the liquid phase and short-term disturbances, reducing the risk of misjudging flow disturbances as flocculation.

[0047] Step S2: Collect image data of synthetic latex and call the recognition model for recognition. Based on the recognition results, extract the foam interference area image and the liquid phase detection area image from the image data. Perform foam analysis on the foam interference area image to obtain the foam analysis results.

[0048] During the online detection phase, image data of the synthetic latex is first acquired, and then a recognition model is invoked to perform region identification on the image data. The image data consists of continuous images of the synthetic latex during its flow and transfer phase after exiting the reactor. Since the synthetic latex has formed a stable liquid dispersion system at this stage, the images simultaneously contain foam regions and liquid phase regions, and these two types of regions differ in texture, edge morphology, and brightness distribution. Therefore, the recognition model can be invoked to segment and identify different regions in the images.

[0049] Image data is input into the recognition model, which then identifies the region to which each pixel in the image belongs and outputs the corresponding recognition results. The recognition results show which locations in the image belong to the foam interference area and which belong to the liquid phase detection area.

[0050] Based on the recognition results output by the recognition model, images of the foam interference area and the liquid phase detection area are extracted from the image data. The image data is then divided into regions according to the recognition results: pixel positions marked as foam interference areas are extracted from the image data to form foam interference area images; pixel positions marked as liquid phase detection areas are extracted from the image data to form liquid phase detection area images.

[0051] In the specific implementation, image mask extraction technology is used for processing. A foam interference region mask and a liquid phase detection region mask are constructed based on the recognition results. Then, the foam interference region mask is used to extract the image data, obtaining the foam interference region image; similarly, the liquid phase detection region mask is used to extract the image data, obtaining the liquid phase detection region image. For image locations not selected by the current mask, the values ​​can be directly set to zero or background, ensuring that the extracted image retains only the content of the corresponding area.

[0052] When the identification results contain isolated small regions or discontinuous region edges, morphological post-processing techniques are used to make simple corrections to the identification results. For example, connected component filtering, hole filling, or edge smoothing are performed before mask extraction. This method makes the regional boundaries of the foam interference area image and the liquid phase detection area image more continuous, which facilitates subsequent foam analysis, liquid phase analysis, and flocculation determination.

[0053] First, the image data is divided into foam interference area images and liquid phase detection area images using a recognition model, and then each is analyzed separately. This allows subsequent foam analysis to directly target the foam area, and subsequent liquid phase analysis and flocculation determination to focus on the actual liquid phase area, improving the relevance and stability of the online detection results.

[0054] Furthermore, based on the recognition results, images of the foam interference area and the liquid phase detection area are extracted from the image data. Foam analysis is then performed on the foam interference area image to obtain the foam analysis results.

[0055] After completing the region identification of the image data, the area of ​​the foam interference region is first determined based on the identification results, and then the ratio between the area of ​​the foam interference region and the total area of ​​the image data is calculated to obtain the proportion of the foam area: ; in, Indicates the percentage of foam area; Indicates the area of ​​the foam interference zone; This represents the total area of ​​the image data.

[0056] The percentage of foam area reflects whether there are problems such as abnormal foaming, insufficient defoaming, or excessive transport disturbance in the synthetic latex during the current online flow stage. When the percentage of foam area is high, it indicates that a large area of ​​foam has formed during the flow of the synthetic latex, which usually corresponds to unstable flow and decreased appearance uniformity. In severe cases, it indicates that there is a significant online appearance quality abnormality in the current batch.

[0057] After obtaining the image of the foam interference region, connected component extraction is performed to obtain multiple foam connected regions. Connected component extraction is implemented using connected component labeling technology. First, the positions of the foam pixels in the foam interference region image are traversed, and spatially adjacent and continuously distributed foam pixels are grouped into the same connected region; sets of foam pixels that are not continuously connected are divided into different connected regions. Connectivity relationships can be determined according to connected component labeling rules, such as the four-neighborhood connection rule or the eight-neighborhood connection rule to determine whether pixels belong to the same region. After the traversal is complete, each connected region is assigned an independent region label, thus obtaining multiple separate foam connected regions.

[0058] The degree of foam aggregation is calculated based on the distribution and spacing of multiple connected foam regions, and is expressed as follows: ; in, Indicates the degree of foam aggregation; N represents the total number of connected foam regions; This represents the distance between the nth bubble connected region and its adjacent bubble connected regions.

[0059] The degree of foam aggregation is output in numerical form, reflecting whether there are local flow anomalies, local gas-liquid disturbance concentrations, or local foam accumulation problems in the current online flow stage of synthetic latex.

[0060] The greater the degree of foam aggregation, the more concentrated the foam is. When the degree of foam aggregation is large, it means that the foam is not uniformly dispersed, but rather aggregated in patches in local areas. This usually corresponds to uneven distribution of the current flow dynamics of synthetic latex and more prominent local appearance abnormalities, indicating that there is a more obvious process abnormality risk in the online stage of this batch.

[0061] The proportion of foam area and the degree of foam aggregation are used as the results of foam analysis. The foam analysis results are used to reflect the foam state of synthetic latex during the online detection stage and serve as one of the bases for subsequent quality judgment of synthetic latex.

[0062] Step S3: Perform liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, call the judgment model to perform flocculation analysis on the liquid phase detection area image, and obtain the flocculation analysis results.

[0063] In the liquid phase analysis stage, static appearance analysis is performed on the liquid phase detection area image to obtain the liquid phase analysis results and identify visible liquid phase anomalies that have formed in the liquid phase detection area image. Liquid phase analysis focuses on two types of issues: one is whether visible agglomerated particles have appeared in the liquid phase, and the other is whether there are obvious appearance inhomogeneities in the overall liquid phase.

[0064] A threshold segmentation combined with morphological processing method is used to extract particle regions from the liquid phase detection area image. The specific steps are as follows: The image of the liquid phase detection area is converted to grayscale to obtain a grayscale image; Calculate the average gray value of the grayscale image, and calculate the gray value difference between each pixel and the average gray value; When the grayscale difference is greater than the grayscale difference threshold, the corresponding pixel is determined as a candidate pixel for agglomeration particles. All candidate pixels for agglomeration particles are integrated to obtain the candidate region for agglomeration particles. Based on the quality of the candidate regions, morphological processing is performed on the candidate regions of agglomerates to remove isolated noise points, connect local broken regions, and smooth the region boundaries. After completing the morphological processing, connected region extraction is performed on the candidate regions of agglomerates, and each connected region is screened according to the preset area conditions. Connected regions whose areas meet the preset area conditions are identified as agglomerate regions.

[0065] The preset area conditions are determined based on historical data. The area of ​​the smallest aggregated particle in the historical data is used as the preset area conditions, and noise that is significantly smaller than the aggregated particle area is removed.

[0066] After extracting the particle regions, the total area of ​​all aggregated particle regions is calculated, and its ratio to the total area of ​​the liquid phase detection area is calculated to obtain the proportion of aggregated particle area. ; Among them, R c Indicates the area ratio of aggregated particles; A c A represents the total area of ​​the aggregated particle region; l This represents the area of ​​the liquid phase detection region in the image.

[0067] The percentage of agglomerated particle area is output as a ratio or percentage value, reflecting whether visible agglomeration anomalies have appeared in the synthetic latex in the liquid phase detection zone. When the percentage of agglomerated particle area is high, it indicates that obvious coarse particles or agglomerates have formed in the current synthetic latex, indicating a decrease in liquid phase stability and visible instability in the current batch, which directly affects subsequent filtration, storage, and use.

[0068] The uniformity of the liquid phase is calculated based on the grayscale or brightness distribution at different locations in the liquid phase detection area image.

[0069] The liquid phase detection area image is divided into m rows and n columns, forming a total of m×n local analysis regions, each with the same size. Then, the average gray value of each local analysis region is statistically analyzed, and the dispersion between all local analysis regions is calculated to obtain the liquid phase homogeneity, which is expressed as: ; Where U represents the homogeneity of the liquid phase; K represents the number of local analysis regions; and k represents the k-th local analysis region. This represents the average gray value of the k-th local analysis region; This represents the mean of the average gray values ​​across the entire local analysis area.

[0070] Liquid phase homogeneity is output numerically; a higher value indicates poorer apparent uniformity of the liquid phase. Liquid phase homogeneity reflects whether there are localized appearance inhomogeneities, uneven mixing, or abnormal contamination in the synthetic latex. When the liquid phase homogeneity is high, it indicates that there are significant differences in appearance between different areas of the current liquid phase detection zone, suggesting that the synthetic latex has a problem with uneven liquid phase state during the online flow stage, which may develop into aggregated particles.

[0071] The area ratio of agglomerated particles and the homogeneity of the liquid phase are used as the results of liquid phase analysis. The results are output numerically: the area ratio of agglomerated particles reflects the degree of visible agglomeration anomalies in the liquid phase, and the homogeneity reflects the degree of apparent uniformity anomalies in the liquid phase detection area. Both results are used together to determine the quality of the synthesized latex, allowing subsequent steps to simultaneously consider both the instability already formed in the liquid phase and the overall homogeneity of the liquid phase detection area.

[0072] Furthermore, the judgment model is invoked to perform flocculation analysis on the liquid phase detection area image.

[0073] Because synthetic latex causes overall migration of the liquid phase detection area image during its online flow phase, directly judging flocculation in continuous liquid phase detection area images could easily misjudge the positional changes caused by the overall liquid phase flow as the continued retention or enhancement of local clusters. Therefore, the judgment model first performs mainstream migration compensation on the continuous liquid phase detection area image using the compensation component, and then the subsequent branches analyze the compensation process.

[0074] Specifically, in the compensation part, the local analysis regions of the liquid phase detection area image at the current time and the liquid phase detection area image at the next time are obtained, and the local analysis regions are used as texture blocks.

[0075] Then, the texture block of the liquid phase detection area image at the current moment is used as a reference block, and block matching is performed with the texture block in the liquid phase detection area image at the next moment.

[0076] For each reference block, a similarity comparison is performed with the texture block in the liquid phase detection area image at the next time step. The similarity comparison is performed by summing the absolute values ​​of the gray-level differences. The absolute values ​​of the gray-level differences of corresponding pixel positions in the reference block and the texture block in the liquid phase detection area image at the next time step are calculated, and the absolute values ​​of the gray-level differences of all corresponding pixel positions are summed to obtain the difference value between the candidate matching block and the reference block. The smaller the difference value, the more similar the two are. The local analysis region with the highest similarity is determined as the matching block corresponding to the reference block.

[0077] Based on the positional difference between the reference block and the matching block, the candidate migration vector for the texture block is obtained. The candidate migration vector is represented by the difference between the center coordinates of the reference block and the center coordinates of the matching block: ; Where v represents the candidate migration vector; This represents the lateral displacement component of the reference block; This represents the longitudinal displacement component of the reference block; Indicates the x-coordinate of the center of the reference block; Indicates the center ordinate of the reference block; Indicates the x-coordinate of the center of the matching block; This represents the center coordinate of the matching block.

[0078] Subsequently, based on the direction of each candidate migration vector, the direction angle of the candidate migration vector is used: ; in, Indicates the direction angle of the candidate migration vector; This represents the arctangent function. The directional distribution of candidate migration vectors is statistically analyzed, and the directional interval with the highest degree of directional concentration is determined as the main directional interval.

[0079] Candidate migration vectors whose directions fall within the main direction interval are retained as consistent migration vectors, and the mainstream migration direction is calculated based on the consistent migration vectors: ; in, M represents the mainstream migration direction; M represents the number of consistent migration vectors; m represents the m-th consistent migration vector. This represents the weight of the m-th consistent migration vector. The weight is determined by the corresponding block matching difference value; the smaller the difference value, the greater the weight. This represents the direction angle of the m-th uniform migration vector; Represents the sine function; This represents the cosine function.

[0080] After obtaining the mainstream migration direction, the projection of each consistent migration vector onto the mainstream migration direction is taken as the directional projection displacement, and the mainstream migration amplitude is calculated based on all directional projection displacements. The directional projection displacement can be calculated using the following formula: ; in, This represents the directional projection displacement of the m-th uniform migration vector along the mainstream migration direction; This represents the horizontal displacement component of the m-th uniform migration vector; This represents the longitudinal displacement component of the m-th uniform migration vector.

[0081] The median value of the projected displacement in all directions is taken as the mainstream migration amplitude.

[0082] After obtaining the mainstream migration direction and amplitude, reverse position alignment is performed on the liquid phase detection area image at the next time step based on these parameters to obtain the migration compensation image at the next time step. The coordinates after reverse position alignment are represented as follows: ; in, This represents the x-coordinate after reverse alignment; x represents the ordinate after reverse alignment; x represents the x-coordinate before reverse alignment; y represents the ordinate before reverse alignment. This indicates the magnitude of the mainstream migration.

[0083] By repeatedly performing the above processing on the liquid phase detection area images at adjacent time points within a continuous time period, a migration-compensated image sequence can be formed. This migration-compensated image sequence is then input into the flocculation branch of the judgment model, which analyzes whether local clusters are persistently retained, continuously expanded, or continuously enhanced in the compensated continuous images. In this way, the deviation displacement generated by local abnormal regions is less likely to directly affect the overall compensation result, thus making the migration-compensated image sequence output by the compensation part more accurately reflect the true local changes after the main liquid phase flow is weakened.

[0084] Furthermore, after completing the compensation process, the flocculation and disturbance branches in the determination model continue to perform analysis on the liquid phase detection area image.

[0085] In the flocculation branch, the migration-compensated image sequence is first input into a convolutional feature extraction network to extract local texture features and cluster morphology features from the migration-compensated images at each time step. Then, the features from each time step are input into a Long Short-Term Memory (LSTM) network in chronological order, which performs temporal modeling of the changes in local clusters over consecutive time periods. Since the input is a migration-compensated image sequence after compensation processing, the LSM network focuses on analyzing whether local clusters are persistently retained, continuously expanded, or continuously enhanced over consecutive time periods. When local clusters persist across multiple consecutive time steps and their regional features show a gradual increasing trend, the flocculation branch outputs a higher flocculation prediction result.

[0086] In the perturbation branch, the liquid phase detection area image is input into a convolutional feature extraction network to extract local anomaly appearance features from the liquid phase detection area image at each time step. These local anomaly appearance features are then input into a long short-term memory network in chronological order to perform temporal modeling of the appearance and disappearance of local anomalies over continuous time periods. Since the perturbation branch directly deals with the liquid phase detection area image, its analysis focus is not on whether local clusters continuously enhance, but rather on whether local anomalies only exhibit short-term appearance, rapid dissipation, and non-continuous enhancement. When a local anomaly appears only at a few moments, then rapidly weakens or disappears without forming a continuous enhancement process, the perturbation branch will output a higher perturbation prediction result.

[0087] Both flocculation prediction results and perturbation prediction results are numerical results, generally ranging from 0 to 1. The larger the value of the flocculation prediction result, the more the judgment model tends to believe that there is flocculation in the current liquid phase detection area image sequence. The larger the value of the perturbation prediction result, the more the judgment model tends to believe that the anomaly in the current liquid phase detection area image sequence is more consistent with short-term perturbation than flocculation.

[0088] Furthermore, in the joint determination section, the flocculation prediction results are used as positive determination evidence, and the disturbance prediction results are used as negative suppression evidence, and a joint determination is performed.

[0089] Specifically, when the flocculation prediction result reaches the flocculation judgment threshold and the disturbance prediction result is lower than the disturbance suppression threshold, the flocculation state corresponding to the current liquid phase detection area image sequence is determined. When the disturbance prediction result reaches the disturbance suppression threshold, flocculation is suppressed. The flocculation prediction result is then weighted and attenuated using the disturbance prediction result: ; in, λ represents the flocculation prediction result after suppression; Q represents the flocculation prediction result; E represents the disturbance prediction result; λ represents the disturbance suppression coefficient.

[0090] In this way, the joint judgment part does not draw conclusions directly based solely on the output results of a single path in the flocculation branch, but simultaneously introduces reverse evidence from the disturbance branch to suppress misjudgments that may be caused by short-term disturbances, thereby improving the accuracy of flocculation analysis results.

[0091] The flocculation branch is responsible for extracting evidence of persistent anomalies, the perturbation branch is responsible for extracting evidence of short-term perturbations, and the joint decision-making component is responsible for outputting the final result based on the positive and negative relationship between the two. This enables the decision-making model not only to identify whether there are flocculation changes in the liquid phase detection zone, but also to distinguish whether the changes are only short-term perturbations, thus making the flocculation analysis results more consistent with the actual state of the synthetic latex in the online flow stage.

[0092] Step S4: Determine the quality of the synthetic latex based on the foam analysis results, liquid phase analysis results, and flocculation analysis results.

[0093] In the synthetic latex quality assessment stage, thresholds for foam area ratio, foam aggregation degree, aggregated particle area ratio, and liquid phase homogeneity are first set. These four thresholds are preferably determined jointly based on historical data from both normal and abnormal batches. First, online testing results from multiple batches of historical synthetic latex are collected. The distribution ranges of the four data points (foam area ratio, foam aggregation degree, aggregated particle area ratio, and liquid phase homogeneity) for normal batches are statistically analyzed. Then, the distribution of the four data points for abnormal batches is statistically analyzed to determine the thresholds that can distinguish between normal and abnormal states.

[0094] After setting the threshold, the system first determines whether the synthetic latex is in a flocculation state based on the flocculation analysis results. If the flocculation analysis result indicates a flocculation state, the synthetic latex quality is directly deemed abnormal, and an alarm is issued. Flocculation indicates a continuous flocculation process in the liquid phase. Continuous flocculation is not a typical apparent fluctuation but reflects an abnormality in liquid phase stability; therefore, it is treated as the highest priority abnormal condition.

[0095] When the flocculation analysis result is non-flocculated, the foam analysis result and liquid phase analysis result are then compared with the corresponding thresholds. If the foam area ratio, foam aggregation degree, aggregated particle area ratio, and liquid phase uniformity do not exceed the corresponding thresholds, the output synthetic latex quality is considered normal.

[0096] If the proportion of foam area exceeds the foam area proportion threshold, it is judged as an abnormal foaming.

[0097] For foaming anomalies, recording and continuous tracking are preferred. The current detection period should be marked as a foaming anomaly period, and the corresponding image and data should be saved for subsequent review or trend analysis. Foaming anomalies typically reflect excessive foaming, insufficient defoaming, or excessive local disturbances during the online flow phase. Although these are process anomalies requiring attention, they may not have developed into serious quality failures if not accompanied by flocculation or agglomeration anomalies; therefore, prioritizing recording is more reasonable.

[0098] If the degree of foam aggregation exceeds the foam aggregation threshold, it is judged as abnormal foam accumulation.

[0099] For abnormal foam accumulation, an alarm will be issued directly, along with a localized foam anomaly alert. Abnormal foam accumulation indicates that the foam is not uniformly dispersed but rather concentrated in patches in localized areas. This suggests uneven distribution of current flow dynamics or a high degree of localized disturbance concentration. The severity of this anomaly is significantly higher than that of ordinary foaming anomalies, and is sufficient to affect the online appearance quality assessment of this batch; therefore, timely warning is necessary.

[0100] If the area ratio of aggregated particles exceeds the threshold for aggregated particle area ratio, it is judged as an agglomeration anomaly.

[0101] For agglomeration anomalies, an alarm should be issued directly, along with an agglomeration anomaly notification. If the area ratio of agglomerated particles exceeds the threshold, it indicates that visible agglomerated particles or coarse particles have formed in the liquid phase, signifying that the synthetic latex has already experienced tangible instability. This type of anomaly is no longer a simple trend signal, but rather an established liquid phase quality anomaly, and should be treated directly as a priority anomaly.

[0102] If the homogeneity of the liquid phase exceeds the threshold for homogeneity, it is judged as an abnormality.

[0103] For non-uniformity anomalies, recording and continuous tracking are performed. When non-uniformity anomalies recur in multiple detection periods, the alert is escalated to an alarm. Exceeding the liquid phase homogeneity threshold reflects the presence of localized apparent non-uniformity, localized mixing non-uniformity, or localized contamination risk in the liquid phase. However, a single non-uniformity anomaly may not have resulted in significant instability; therefore, recording it first helps avoid excessive alarms. If the non-uniformity anomaly persists, it indicates that the anomaly is continuous, and issuing an alarm in this case is more in line with actual needs.

[0104] Example 2, in an exemplary embodiment, also provides an online quality inspection system for synthetic latex based on machine vision, including: The modeling module acquires historical data and builds recognition and judgment models based on the historical data.

[0105] The first analysis module collects image data of synthetic latex and calls the recognition model for recognition. Based on the recognition results, it extracts images of the foam interference area and the liquid phase detection area from the image data, performs foam analysis on the foam interference area image, and obtains the foam analysis results.

[0106] The second analysis module performs liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, and calls the judgment model to perform flocculation analysis on the liquid phase detection area image to obtain the flocculation analysis results.

[0107] The output module determines the quality of the synthetic latex based on the results of foam analysis, liquid phase analysis, and flocculation analysis.

[0108] If the above functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0109] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0110] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0111] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0112] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A machine vision-based online quality inspection method for synthetic latex, characterized in that, include: Step S1: Obtain historical data and build an identification model and a judgment model based on the historical data; Step S2: Collect image data of synthetic latex and call the recognition model for recognition. Based on the recognition results, extract the foam interference area image and the liquid phase detection area image from the image data. Perform foam analysis on the foam interference area image to obtain the foam analysis results. Step S3: Perform liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, call the judgment model to perform flocculation analysis on the liquid phase detection area image to obtain the flocculation analysis results; Step S4: Determine the quality of the synthetic latex based on the foam analysis results, liquid phase analysis results, and flocculation analysis results.

2. The online quality inspection method for synthetic latex based on machine vision as described in claim 1, characterized in that, The historical data includes historical image data, region annotation data, and status annotation data. The region annotation data performs region annotation on the historical image data, dividing the historical image data into historical foam interference area images and historical liquid phase detection area images. A recognition model was built and trained based on historical image data and region annotation data; A judgment model was established and trained based on historical liquid phase detection area images and status annotation data.

3. The online quality inspection method for synthetic latex based on machine vision as described in claim 2, characterized in that, The process of establishing and training a recognition model based on historical image data and region annotation data includes: A recognition model based on the U-Net image segmentation network is constructed. Historical image data is input into the recognition model, and the predicted segmentation result is obtained through forward computation. The predicted segmentation results are compared with the corresponding region annotation data to calculate the segmentation loss; The model parameters in the recognition model are iteratively updated based on the segmentation loss to obtain the trained recognition model.

4. The online quality inspection method for synthetic latex based on machine vision as described in claim 3, characterized in that, The step of establishing and training a judgment model based on historical liquid phase detection area images and status annotation data includes: The judgment model consists of a compensation component, a flocculation branch, a disturbance branch, and a joint judgment component. The compensation component calculates the mainstream migration direction and mainstream migration amplitude based on historical liquid phase detection area images; Based on the mainstream migration direction and mainstream migration amplitude, reverse position alignment is performed on subsequent historical liquid phase detection area images to form a historical migration compensation image sequence. Flocculation and perturbation branches are established, and both adopt a temporal analysis structure composed of a convolutional feature extraction network and a long short-term memory network. Input the historical migration compensation image sequence into the flocculation branch, obtain the historical flocculation prediction result through forward computation, and calculate the flocculation branch loss based on the historical flocculation prediction result and state labeling data. The flocculation branch is iteratively updated based on the loss of the flocculation branch to obtain the trained flocculation branch. The historical liquid phase detection area image is input into the disturbance branch, and the historical disturbance prediction result is obtained through forward calculation. The disturbance branch loss is calculated based on the historical disturbance prediction result and the state labeling data. The perturbation branch is iteratively updated based on the perturbation branch loss to obtain the trained perturbation branch; The compensation component, the trained flocculation branch, the trained disturbance branch, and the joint decision component are combined to form a decision model. The joint determination section uses historical flocculation prediction results as positive determination evidence and historical disturbance prediction results as negative suppression evidence to perform joint determination.

5. The online quality inspection method for synthetic latex based on machine vision as described in claim 4, characterized in that, The foam analysis performed on the foam interference area image to obtain the foam analysis results include: The area of ​​the foam interference region is determined based on the recognition results, and the ratio between the area of ​​the foam interference region and the total area of ​​the image data is calculated to obtain the proportion of the foam area. Connectivity region extraction is performed on the foam interference area image to obtain multiple foam connected regions. The degree of foam aggregation is calculated based on the distribution location and mutual spacing of the multiple foam connected regions. The proportion of foam area and the degree of foam aggregation are used as the results of foam analysis, which are two numerical results.

6. The online quality inspection method for synthetic latex based on machine vision as described in claim 5, characterized in that, The liquid phase analysis performed on the liquid phase detection area image to obtain the liquid phase analysis results include: The image of the liquid phase detection area is converted to grayscale to obtain a grayscale image; Calculate the average gray value of the grayscale image, and define the region where the difference between the gray value and the average gray value exceeds the gray difference threshold as the region of agglomerated particles; The proportion of agglomerated particle area is calculated based on the ratio between the total area of ​​the agglomerated particle region and the total area of ​​the liquid phase detection region image. The grayscale image is divided into multiple local analysis regions. The average grayscale value of each local analysis region is calculated. The dispersion between all local analysis regions is calculated to obtain the liquid phase homogeneity. The area ratio of agglomerated particles and the homogeneity of the liquid phase are used as the results of liquid phase analysis, which are two numerical results.

7. The online quality inspection method for synthetic latex based on machine vision as described in claim 6, characterized in that, The flocculation analysis of the liquid phase detection area image using the judgment model to obtain the flocculation analysis results includes: The local analysis regions of the liquid phase detection area image at the current time and the liquid phase detection area image at the next time are obtained, and the local analysis regions are used as texture blocks. The texture block of the liquid phase detection area image at the current moment is used as a reference block, and block matching is performed with the texture block in the liquid phase detection area image at the next moment to find the matching block with the highest similarity to the reference block. Based on the positional difference between the reference block and the matching block, the candidate migration vector of the texture block is obtained; Based on the direction of each candidate migration vector, the directional distribution of the candidate migration vectors is statistically analyzed, and the directional interval with the highest degree of directional concentration is determined as the main directional interval. Candidate migration vectors whose directions fall within the main direction interval are retained as consistent migration vectors, and the mainstream migration direction is calculated based on the consistent migration vectors. The projection of each consistent migration vector onto the mainstream migration direction is taken as the directional projection displacement, and the mainstream migration amplitude is calculated based on the projection displacement of all directions. Based on the mainstream migration direction and mainstream migration amplitude, reverse position alignment is performed on the liquid phase detection area image at the next moment to obtain the migration compensation image at the next moment. Input the migration compensation image sequence into the flocculation branch to generate flocculation prediction results; The image of the liquid phase detection area is input into the perturbation branch to generate perturbation prediction results; The flocculation prediction results are used as positive evidence for judgment, and the perturbation prediction results are used as negative evidence for suppression; a joint judgment is then performed. When the flocculation prediction result reaches the flocculation judgment threshold and the disturbance prediction result is lower than the disturbance suppression threshold, it is judged to be in a flocculation state. When the disturbance prediction result reaches the disturbance suppression threshold, the flocculation state determination is suppressed. The flocculation analysis results are generated based on the joint judgment results. The flocculation analysis results are binary judgment results, including flocculation state and non-flocculation state.

8. The online quality inspection method for synthetic latex based on machine vision as described in claim 7, characterized in that, The determination of synthetic latex quality based on foam analysis results, liquid phase analysis results, and flocculation analysis results includes: Set thresholds for foam area ratio, foam aggregation degree, aggregated particle area ratio, and liquid phase uniformity. When the flocculation analysis result indicates a flocculation state, the quality of the synthetic latex is directly determined to be abnormal, and an alarm is issued. When the flocculation analysis result is in a non-flocculation state, the foam analysis result and the liquid phase analysis result are compared with the corresponding threshold respectively; If both the foam analysis results and the liquid phase analysis results are within the threshold, then the quality of the synthetic latex is normal. If the proportion of foam area exceeds the foam area proportion threshold, it is judged as an abnormal foaming. If the degree of foam aggregation exceeds the foam aggregation threshold, it is judged as abnormal foam accumulation; If the area ratio of aggregated particles exceeds the threshold for the area ratio of aggregated particles, it is judged as an agglomeration anomaly. If the homogeneity of the liquid phase exceeds the threshold for homogeneity, it is judged as an abnormality.

9. A machine vision-based online quality inspection system for synthetic latex, applied to the machine vision-based online quality inspection method for synthetic latex as described in any one of claims 1 to 8, characterized in that, include: The modeling module acquires historical data and builds recognition and judgment models based on the historical data. The first analysis module collects image data of synthetic latex and calls the recognition model for recognition. Based on the recognition results, it extracts images of the foam interference area and the liquid phase detection area from the image data, performs foam analysis on the foam interference area image, and obtains the foam analysis results. The second analysis module performs liquid phase analysis on the liquid phase detection area image to obtain the liquid phase analysis results, and calls the judgment model to perform flocculation analysis on the liquid phase detection area image to obtain the flocculation analysis results. The output module determines the quality of the synthetic latex based on the results of foam analysis, liquid phase analysis, and flocculation analysis.