Ink jet droplet form detection and image classification method and device based on machine learning
Through machine learning-based inkjet droplet morphology detection and image classification methods, the problems of poor inkjet printing quality and difficulty in judging droplet morphology in the prior art are solved, and the rapid and accurate detection and classification of droplet morphology are achieved, and the printing quality is optimized.
Patent Information
- Application Number
- CN202510056410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-13
Smart Images

Figure CN119987693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method and device for inkjet droplet morphology detection and image classification based on machine learning. Background Art
[0002] Inkjet printers are used in a variety of fields, including display technology, biomedicine, optoelectronic device manufacturing and research, to improve performance, reduce costs and achieve more innovation. In traditional inkjet printers, the minimum droplet size produced by piezoelectric or thermal methods is a few pL, and the printed droplet diameter is about 13μm. Although this droplet size is sufficient for tonal control of photographic image quality, it is not enough to meet the precision required for printable electronic applications. Super Inkjet (SIJ) technology, as a form of inkjet technology, can produce ultra-microscopic droplets that are only one thousandth the size of traditional droplets, thereby achieving ultra-precision printing at the submicron level.
[0003] Although SIJ technology is widely used in sensors, Micro LEDs, solar cells, flexible electronics, life sciences, microelectronic energy devices, biomedicine and other fields due to its convenience, flexibility and speed, the limited performance of electronic devices such as conductivity and luminescence due to poor printing quality is still an important problem that SIJ technology needs to overcome like other inkjet technologies. Printing droplets of different sizes with quantum dot ink causes uneven luminescence of electronic devices; if replaced with silver ink, it may cause open circuit or short circuit of components. The appearance of a large number of overspray droplets makes the substrate chaotic, increases the risk of adverse reactions between droplets, and makes subsequent experimental tests impossible. In addition, the coffee ring effect, which is common in inkjet printing results, can cause uneven droplets, greatly affecting the resolution and performance of the printed pattern, and thus affecting the accuracy of the experimental results. To this end, rapid identification and detection of large quantities of inkjet droplet types is an important step in evaluating the quality of printing results and in targeted control of inkjet droplet morphology.
[0004] At present, machine learning algorithms (such as decision trees, support vector machines, random forests, etc.) and their branches (deep learning) have been widely used to solve various traditional complex problems. In recent years, most of the printing research has focused on the jetting process, adjusting the morphology of droplets by controlling process parameters, etc., to achieve the purpose of controlling the quality of droplet deposition. Although the droplet jetting behavior will directly affect the final droplet deposition morphology to a large extent and is an important part of the overall jetting process, studying this process alone and ignoring the exploration of the final morphology may not be accurate and convincing enough for the final quality assessment. The main reason is that there are too many uncertain factors in the jetting, and it is difficult to completely control the variables; secondly, the process cannot predict problems such as coffee rings and shape deformation, and the overspray degree, irregularity, size, etc. of the final droplet results cannot be judged quickly and accurately. Therefore, it is necessary to quickly identify and detect the deposition morphology of batches of droplets as a subsequent supplement to the above content, so that the whole process of controlling and processing droplet morphology is more complete and systematic. Summary of the invention
[0005] In response to the above problems, the present invention proposes an inkjet droplet morphology detection and image classification method and device based on machine learning, which can realize the rapid identification and detection and classification of batch droplet deposition morphologies, making the whole process of controlling and processing droplet morphology more complete and systematic; it is helpful for subsequent adjustment of different experimental parameters and printing quality evaluation, and the experimenter can adjust the experimental parameters in time to achieve the expected printing effect.
[0006] On the one hand, the inkjet droplet morphology detection and image classification method based on machine learning has the following specific steps:
[0007] S1, acquiring inkjet droplet image dataset;
[0008] S2, performing image preprocessing on the acquired data set to obtain a preprocessed data set;
[0009] S3, inputting the preprocessed data set into a deep learning network, extracting inkjet droplet morphological features as uncertainty features of the preprocessed data set; calculating deterministic features of the preprocessed data set; clustering the preprocessed data set using a clustering algorithm based on the deterministic features and the uncertainty features to obtain a classified data set, and dividing the classified data set into a training set and a test set; the deterministic features include droplet irregularity, droplet discreteness, and droplet non-uniformity;
[0010] S4, using the training set to train several machine learning classification models respectively, scoring each classification model respectively, and selecting the classification model with the highest score as the best trained model;
[0011] S5, use the test set to test the trained best model to achieve inkjet droplet morphology detection and image classification.
[0012] Preferably, the image preprocessing includes image cropping, image segmentation, image denoising, grayscale processing and edge detection; the cropped image uses a Hough circle transform algorithm to identify the droplet morphology; and the image segmentation adopts an image segmentation method based on region growing.
[0013] Preferably, it is characterized in that the method for obtaining the droplet unevenness is specifically as follows:
[0014] For the inkjet droplet image in the preprocessed data set, edge information is obtained through edge detection, and the bounding box of the maximum contour is calculated to obtain the coordinates of the upper left corner, width and height, thereby obtaining the coordinates of the center points of the four bounding boxes. The center points of the two pairs of opposite sides of the bounding boxes are connected respectively, and the pixel points inside the edge of the grayscale image obtained by grayscale processing are divided into four equally divided areas: upper left, upper right, lower left and lower right. The grayscale average values of the four equally divided areas are calculated respectively; then the droplet unevenness is expressed as:
[0015] Une=Max(A)-Min(A)
[0016] A=[AVG(G(top left )),AVG(G(top right )),AVG(G(bottom left )),AVG(G(bottom right ))]
[0017] Among them, Une represents the droplet unevenness; Max() represents the maximum value in the set, Min() represents the minimum value in the set; A represents the set of four equally divided regions; AVG() represents the grayscale average of the region; G (top left ) represents the upper left corner area of the grayscale image; G(top right ) represents the upper right corner of the grayscale image; G(bottom left ) represents the lower left corner area of the grayscale image; G(bottom right ) represents the lower right corner area of the grayscale image.
[0018] Preferably, the method for obtaining the droplet irregularity is as follows:
[0019] In the inkjet droplet images of the preprocessed dataset, a standard circle is drawn based on Welzl's algorithm;
[0020] Calculate the droplet irregularity, the formula is expressed as:
[0021]
[0022] Where Dnu represents the droplet irregularity; NOP 1 Indicates the number of non-droplet pixels inside the standard circle; NOP 2 represents the number of droplet pixels outside the standard circle; N represents the total number of pixels inside the standard circle.
[0023] Preferably, the method for obtaining the droplet discreteness is as follows:
[0024] In the single droplet image of the preprocessed data set, the area with the largest area is taken as the main droplet, and the center of the circle is recorded as P. The rest of the area is the splash droplet, and the center point of the i area in the rest of the area is recorded as P. i , using the center of the main droplet P and the center of each splash droplet P i The average distance between the droplets measures the degree of splashing, and the droplet dispersion is expressed as:
[0025]
[0026] Where Dis represents the droplet dispersion; T represents the total number of droplets; (x(P), y(P)) represents the pixel coordinates of the center of the main droplet; (x(p i ),y(p i )) represents the pixel coordinates of the center point of the splash droplet.
[0027] Preferably, the training set is used to train several machine learning classification models respectively, each classification model is scored respectively, and the classification model with the highest score is selected as the trained best model, as follows:
[0028] S41, inputting the training set into each machine learning classification model respectively;
[0029] S42, using hyperparameter search to obtain the optimal parameters of each classification model;
[0030] S43, using K value cross validation to adjust the parameters of each classification model;
[0031] S44, using a number of evaluation indicators to evaluate each classification model, and obtaining a score value of each classification model under each evaluation indicator;
[0032] S45, the score values of each classification model under each evaluation index are calculated by weighted average method to obtain the comprehensive score value of each classification model, and the classification model with the highest comprehensive score value is selected as the trained best model.
[0033] Preferably, the score values of each classification model under each evaluation index are calculated by weighted average method to obtain the comprehensive score value of each classification model, which is as follows:
[0034] First, the score values of each classification model under each evaluation indicator are standardized;
[0035] Secondly, define the weight for each evaluation indicator; a positive weight indicates that the corresponding evaluation indicator has a positive impact on the comprehensive score, and a negative weight indicates that the corresponding evaluation indicator has a negative impact on the comprehensive score;
[0036] Finally, the weighted sum of all evaluation indicators of each classification model is calculated to obtain the comprehensive score of each classification model.
[0037] Preferably, the evaluation indicators include macro-average calculation, F1 value, ROC curve, PR curve, MCC value, Cohen_Kappa coefficient and logarithmic loss function.
[0038] Preferably, the machine learning classification models include six; the classification algorithms of each machine learning classification model are logistic regression, decision tree, random forest, support vector machine, K nearest neighbor and perceptron.
[0039] On the other hand, the inkjet droplet morphology detection and image classification device based on machine learning includes the following:
[0040] A data set acquisition module, used to acquire an inkjet droplet image data set;
[0041] An image processing module is used to perform image preprocessing on the acquired data set to obtain a preprocessed data set;
[0042] A feature extraction and clustering module is used to input the preprocessed data set into a deep learning network, extract the inkjet droplet morphological features as the uncertainty features of the preprocessed data set; calculate the deterministic features of the preprocessed data set; based on the deterministic features and the uncertainty features, use a clustering algorithm to cluster the preprocessed data set to obtain a classified data set, and divide the classified data set into a training set and a test set; the deterministic features include droplet irregularity, droplet discreteness, and droplet non-uniformity;
[0043] The classification model training and optimization module is used to train several machine learning classification models using the training set, score each classification model, and select the classification model with the highest score as the best trained model;
[0044] The classification model testing module is used to test the trained best model using the test set to achieve inkjet droplet morphology detection and image classification.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] (1) The present invention can judge the printing quality of a small amount or a specific droplet image multiple times in a short period of time based on information such as the discreteness and irregularity of the droplets, adjust the experimental parameters in time, and optimize the printing quality each time;
[0047] (2) The present invention can quickly detect the proportion of a large number of droplets through image processing and machine learning methods, obtain a print quality report after a complete experiment, and determine whether the expected printing effect is achieved;
[0048] (3) The image processing, droplet morphology definition and machine learning model selection of the present invention are applicable to various types of printing inks and printing systems, showing a wide range of adaptability and can be extended to multiple fields such as micro-displays and solar cells.
[0049] (4) The present invention obtains a single droplet through Hough circle transform, thereby ensuring the size of the image and avoiding interference with subsequent processing; the droplets in the image are distinguished from the background through image segmentation processing, making it easier to analyze and process the droplets;
[0050] (5) The present invention uses the Vgg16 convolutional network in deep learning to fully extract features from the original image, avoiding the defects of the traditional manual extraction method. The features extracted by the traditional manual extraction method have limited expressive power and may not show good performance. In addition, feature extraction and clustering algorithm are two separate processes, and the quality of feature extraction will directly affect the clustering effect.
[0051] (6) The UK-means algorithm used in the present invention is used for clustering, and the performance of the classification model is compared using 7 effectiveness indicators, which shows good clustering performance;
[0052] (7) The selection of the classification algorithm in the present invention is flexible, and the best classification model can be selected to ensure the classification requirements in different scenarios, and has a certain degree of versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The present invention is further described in detail below in conjunction with the accompanying drawings;
[0054] Figure 1 Flow chart of a method for inkjet droplet morphology detection and image classification based on machine learning according to an embodiment of the present invention;
[0055] Figure 2 A diagram of the printing preparation process steps of the inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0056] Figure 3 It is a basic working principle diagram of SIJ of the inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0057] Figure 4 This is an image processing flow chart of the inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0058] Figure 5 A schematic diagram of droplet morphology definition of an inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0059] Figure 6 A framework diagram of a deep learning model VGG16 for a method for inkjet droplet morphology detection and image classification based on machine learning according to an embodiment of the present invention;
[0060] Figure 7 A flow chart of a machine learning model-clustering algorithm of a method for inkjet droplet morphology detection and image classification based on machine learning according to an embodiment of the present invention;
[0061] Figure 8 The clustering model result of the inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0062] Fig. 9 A flow chart of selecting and training a machine learning model-classification algorithm for a method for inkjet droplet morphology detection and image classification based on machine learning according to an embodiment of the present invention;
[0063] Fig.10 It is a diagram of some batch droplet experiments of the inkjet droplet morphology detection and image classification method based on machine learning according to an embodiment of the present invention;
[0064] Fig.11 It is a structural block diagram of an inkjet droplet morphology detection and image classification device based on machine learning according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention is further described below through specific implementation modes.
[0066] See also Figure 1 As shown, the inkjet droplet morphology detection and image classification method based on machine learning is as follows:
[0067] S1, obtain inkjet droplet image dataset.
[0068] Dataset generation: Inkjet printed structures such as Figure 1 As shown, this embodiment uses an ultra-high resolution inkjet printer (SIJ-350) to obtain droplets. After setting the SIJ-350 software, the droplets are printed on the transparent glass substrate as expected. Finally, the finished product is placed under a metallographic microscope to observe and capture the droplet image. Figure 2The process steps for printing preparation are completed, and finally the image data set of this embodiment is obtained; the basic working principle diagram of SIJ is as follows Figure 3 shown.
[0069] S2, performing image preprocessing on the acquired data.
[0070] Image preprocessing flowchart see Figure 4 As shown, the details are as follows:
[0071] S21, input image: input the above-obtained dataset into the system.
[0072] S22, cropping images: using the Hough circle transform algorithm to identify and crop the droplets, and obtain batches of single droplet images.
[0073] S23, Image Segmentation: In order to analyze and process droplets more easily, it is necessary to distinguish the droplets in the image from the background. To this end, by comparing the effects of multiple segmentation methods, we finally use image segmentation based on region growing to process. This method merges pixels based on the similarity and connectivity between adjacent pixels to form a group of regions with similar features, namely, droplet parts.
[0074] S24, other processing steps: Due to external factors such as the adjustment of printing process parameters and the characteristics of the solution itself, the printed droplet morphology may contain splashes. Therefore, the use of image denoising means will help to better understand the image content in the future; in order to obtain the edge information of the image, this embodiment performs edge detection on the image; the subsequent definition of droplet non-uniformity based on the grayscale mean involves grayscale processing of the image.
[0075] S25, output image: The obtained image provides the basis for the subsequent droplet morphology definition and machine learning model training.
[0076] S3, input the preprocessed data set into the deep learning network, extract the inkjet droplet morphology characteristics as the uncertainty characteristics of the preprocessed data set; calculate the deterministic characteristics of the preprocessed data set; based on the deterministic characteristics and the uncertainty characteristics, use a clustering algorithm to cluster the preprocessed data set to obtain a classified data set, and divide the classified data set into a training set and a test set; the deterministic characteristics include droplet irregularity, droplet discreteness and droplet non-uniformity.
[0077] Definition of droplet morphology characteristics: Figure 5 As shown, a standard circle is drawn based on Welzl's algorithm, and the droplet irregularity, droplet dispersion and droplet non-uniformity are defined by pixel ratio and grayscale mean. The main definitions are as follows:
[0078] Definition of droplet irregularity:
[0079]
[0080] In the formula, NOP 1 is the number of non-droplet pixels inside the standard circle, NOP 2 is the number of droplet pixels outside the standard circle, and N is the total number of pixels inside the standard circle.
[0081] Definition of droplet dispersion:
[0082] There are also splashing droplets during the printing process. In order to describe the splashing and quantify its splashing degree, the area with the largest area is set as the main droplet, and the center of the circle is recorded as P. The rest of the area is the splashing droplet, and the center point of area i is recorded as P i , using the center of the main droplet P and the center of each splash droplet P i The average distance between the droplets measures the degree of splashing, and the droplet dispersion is defined as:
[0083]
[0084] Where T is the total number of droplets, (x(P), y(P)) is the pixel coordinate of the center of the main droplet, and (x(pi), y(pi)) is the pixel coordinate of the center of the splash droplet. When there is no splash, the total number of droplets is 1, and the calculated Dis is 0, which is consistent with the actual situation.
[0085] Definition of droplet heterogeneity:
[0086] After the grayscale processing of droplet images of different thicknesses, the pixel values will be different, so the unevenness of the droplets is simply defined. First, the edge detection operator is used to obtain the edge information, and the pixel points inside the edge of the grayscale image are divided into four parts. The grayscale average values of the four parts are calculated respectively, and then the difference between the maximum and minimum values is calculated. If the difference is too large, it means that the degree of unevenness may be greater. The formula for droplet unevenness is expressed as follows:
[0087] Une=Max(A)-Min(A)
[0088] A=[AVG(G(top left )),AVG(G(top right )),AVG(G(bottom left )),AVG(G(bottom right ))]
[0089] Among them, G(top left ) represents the upper left corner of the grayscale image, and so on. right ) represents the upper right corner of the grayscale image, G(bottom left ) represents the lower left corner of the grayscale image, G(bottomright ) represents the lower right corner of the grayscale image.
[0090] Selection of clustering model: Figure 6 As shown in the figure, the Vgg16 convolutional network in deep learning is used to fully extract features from the original image. In order to reduce the redundancy of features and avoid the impact of multicollinearity on the model, features with correlation coefficients greater than 0.3 are filtered out. In addition, preprocessing such as zero value filtering and outlier detection is also performed. These steps help improve the interpretability and generalization ability of the model and reduce the risk of overfitting in some cases.
[0091] Specifically, the specific steps for extracting features from deep neural networks are as follows: first, load and convert the image format, then use the nearest neighbor interpolation method to uniformly adjust the image to a fixed resolution (224×224 pixels) to adapt to the input size requirements of the model, and normalize the image and adjust the pixel value to make it meet the input specifications of the training model. Finally, the high-dimensional feature vector of the image is obtained through forward propagation. These features encode the semantic information of the input image in the high-dimensional space, including the shape, texture, and category characteristics of the object, which are obtained through layer-by-layer abstraction of deep convolutional layers and can effectively represent the high-level semantic structure of the image.
[0092] Combining deterministic and non-deterministic features, the deterministic features are the irregularity, unevenness and discreteness of the droplets, and the uncertain features are the features extracted by the above convolutional network. Figure 7 The UK-means algorithm steps shown in the figure complete clustering. The algorithm can automatically find the optimal number of clusters without any initialization and parameter selection, and has good clustering performance. The clustering results are shown in Figure 8 As shown, in this embodiment, the types of droplets are divided into 9 categories, which are roughly divided into uniform and regular, uniform and irregular, regular and uneven, uneven and irregular, micro-spray uniform and regular, micro-spray uniform and irregular, micro-spray regular and uneven, micro-spray uneven and irregular, and overspray droplets.
[0093] S4, using the training set to train several machine learning classification models respectively, scoring each classification model respectively, and selecting the classification model with the highest score as the best trained model.
[0094] Classification model selection and comparison: A variety of machine learning classification algorithms are used to classify droplet morphology, such as Fig. 9 The steps shown can be divided into 6 steps, as follows:
[0095] S41, input data: divide the data into a training set (70%) and a test set (30%). The training set is used for model training, and the test set is used for subsequent model testing.
[0096] S42, select multiple types of classification models: train and compare multiple classification algorithms, including logistic regression (LR), decision tree (DT), random forest (RF), support vector machine (SVM), K-nearest neighbors (KNN) and multilayer perception (MLP) algorithms.
[0097] S43, Model training and optimal parameters: Use hyperparameter search to obtain the optimal parameters of the model.
[0098] S44, K-value cross-validation: K-fold cross-validation is used to adjust the parameters of the model to optimize performance and avoid generalization errors of the model.
[0099] S45, evaluate model performance: evaluate the model based on confusion matrix (macro-average calculation), F1 value, ROC curve (Receiver Operating Characteristic Curve), PR curve (Precision-Recall), MCC (Matthews Correlation Coefficient) value, Cohen_Kappa coefficient and logarithmic loss function.
[0100] S46, select the best model: In order to find the best model, the weighted average method is used to calculate the comprehensive score. First, the results of each model on different evaluation indicators are standardized to ensure that each indicator is compared under the same dimension; secondly, a weight is defined for each evaluation indicator, where a positive value indicates that the indicator has a positive impact on the comprehensive score, and a negative value indicates a negative impact. Finally, the weighted sum of all evaluation indicators of each model is calculated to find the model with the highest comprehensive score, which is the best model. As shown in Table 1, this embodiment finally selects the SVM model as the best model.
[0101] Table 1 Model evaluation indicators
[0102]
[0103]
[0104] Among them, accuracy_macro represents the accuracy under macro averaging; precision_macro represents the precision under macro averaging; recall_macro represents the recall rate under macro averaging; f1_macro represents the F1 value under macro averaging; roc_auc_ovr represents the value of the ROC curve; pr_auc represents the value of the PR curve; mcc represents the MCC value; cohen_kappa represents the Cohen_Kappa coefficient; log_loss represents the logarithmic loss function value; Overall score represents the comprehensive score.
[0105] It should be noted that other combinations of classification models may be used in S52, and other combinations of model evaluation indicators may be used in S55 for model evaluation. The specific settings are made according to needs and are not limited in this embodiment.
[0106] S5, use the test set to test the trained best model to achieve inkjet droplet morphology detection and image classification.
[0107] Verification results: Fig.10 This is a partial batch droplet experiment diagram. The model was tested on the test set. The classification results are shown in Table 2, where categories 1 to 9 are uniform and regular, uniform and irregular, regular and uneven, uneven and irregular, micro-spray uniform and regular, micro-spray uniform and irregular, micro-spray regular and uneven, micro-spray uneven and irregular, and overspray droplets. If the experimenter cannot tolerate the splashing and deformation of the droplets, then the qualified droplets account for 10%, indicating that the overall printing quality is not good and needs to be reprinted. If the micro-spray droplets and unevenness can be tolerated and only the droplets are expected to be regular, the qualified droplets account for 81%, and the printing effect is good.
[0108] Table 2 Experimental verification results
[0109]
[0110] See also Fig.11 As shown, the present invention also discloses an inkjet droplet morphology detection and image classification device based on machine learning, comprising:
[0111] The data set acquisition module 1101 is used to acquire the inkjet droplet image data set.
[0112] The image processing module 1102 is used to perform image preprocessing on the acquired data set to obtain a preprocessed data set.
[0113] The feature extraction and clustering module 1103 is used to input the preprocessed data set into the deep learning network, extract the inkjet droplet morphology features as the uncertainty features of the preprocessed data set; calculate the deterministic features of the preprocessed data set; based on the deterministic features and the uncertainty features, use a clustering algorithm to cluster the preprocessed data set to obtain a classified data set, and divide the classified data set into a training set and a test set; the deterministic features include droplet irregularity, droplet discreteness and droplet non-uniformity.
[0114] The classification model training and optimization module 1104 is used to use the training set to train several machine learning classification models respectively, score each classification model respectively, and select the classification model with the highest score as the best trained model.
[0115] The classification model testing module 1105 is used to test the trained best model using a test set to achieve inkjet droplet morphology detection and image classification.
[0116] The specific implementation of the inkjet droplet morphology detection and image classification device based on machine learning is the same as the inkjet droplet morphology detection and image classification method based on machine learning, and will not be repeated in this embodiment.
[0117] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.
Claims
1. A method for inkjet droplet morphology detection and image classification based on machine learning, characterized in that: The steps include: S1, acquiring inkjet droplet image dataset; S2, performing image preprocessing on the acquired data set to obtain a preprocessed data set; S3, inputting the preprocessed data set into a deep learning network, extracting inkjet droplet morphological features as uncertainty features of the preprocessed data set; Compute deterministic features of the preprocessed dataset; Based on deterministic features and uncertain features, a clustering algorithm is used to cluster the preprocessed data set to obtain a classified data set, and the classified data set is divided into a training set and a test set; the deterministic features include droplet irregularity, droplet discreteness, and droplet non-uniformity; S4, using the training set to train several machine learning classification models respectively, scoring each classification model respectively, and selecting the classification model with the highest score as the best trained model; S5, use the test set to test the trained best model to achieve inkjet droplet morphology detection and image classification.
2. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 1, characterized in that: The image preprocessing includes image cropping, image segmentation, image denoising, grayscale processing and edge detection; the cropped image uses the Hough circle transform algorithm to identify the droplet morphology; The image segmentation adopts an image segmentation method based on region growing.
3. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 2, characterized in that: The method for obtaining the droplet non-uniformity is specifically as follows: For the inkjet droplet image in the preprocessed data set, edge information is obtained through edge detection, and the bounding box of the maximum contour is calculated to obtain the coordinates of the upper left corner, width and height, thereby obtaining the coordinates of the center points of the four bounding boxes. The center points of the two pairs of opposite sides of the bounding boxes are connected respectively, and the pixel points inside the edge of the grayscale image obtained by grayscale processing are divided into four equally divided areas: upper left, upper right, lower left and lower right. The grayscale average values of the four equally divided areas are calculated respectively; then the droplet unevenness is expressed as: Une=Max(A)-Min(A) A=[AVG(G(top left )),AVG(G(top right )),AVG(G(bottom left )),AVG(G(bottom right ))] Among them, Une represents the droplet unevenness; Max() represents the maximum value in the set, Min() represents the minimum value in the set; A represents the set of four equally divided regions; AVG() represents the grayscale average of the region; G (top left ) represents the upper left corner area of the grayscale image; G(top right ) represents the upper right corner of the grayscale image; G(bottom left ) represents the lower left corner area of the grayscale image; G(bottom righr ) represents the lower right corner area of the grayscale image.
4. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 1, characterized in that: The method for obtaining the droplet irregularity is specifically as follows: In the inkjet droplet images of the preprocessed dataset, a standard circle is drawn based on Welzl's algorithm; Calculate the droplet irregularity, the formula is expressed as: Wherein, Dnu represents the irregularity of the droplet; NOP1 represents the number of non-droplet pixels inside the standard circle; NOP2 represents the number of droplet pixels outside the standard circle; and N represents the total number of pixels inside the standard circle.
5. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 1, characterized in that: The method for obtaining the droplet discreteness is specifically as follows: In the single droplet image of the preprocessed data set, the area with the largest area is taken as the main droplet, and the center of the circle is recorded as P. The rest of the area is the splash droplet, and the center point of the i area in the rest of the area is recorded as P. i , using the center of the main droplet P and the center of each splash droplet P i The average distance between the droplets measures the degree of splashing, and the droplet dispersion is expressed as: Where Dis represents the droplet dispersion; T represents the total number of droplets; (x(P), y(P)) represents the pixel coordinates of the center of the main droplet; (x(p i ),y(p i )) represents the pixel coordinates of the center point of the splash droplet.
6. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 1, characterized in that: The training set is used to train several machine learning classification models respectively, and each classification model is scored respectively, and the classification model with the highest score is selected as the best trained model, as follows: S41, inputting the training set into each machine learning classification model respectively; S42, using hyperparameter search to obtain the optimal parameters of each classification model; S43, using K value cross validation to adjust the parameters of each classification model; S44, using a number of evaluation indicators to evaluate each classification model, and obtaining a score value of each classification model under each evaluation indicator; S45, the score values of each classification model under each evaluation index are calculated by weighted average method to obtain the comprehensive score value of each classification model, and the classification model with the highest comprehensive score value is selected as the trained best model.
7. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 6, characterized in that: The weighted average method is used to calculate the scores of each classification model under each evaluation index to obtain the comprehensive score of each classification model, which is as follows: First, the score values of each classification model under each evaluation indicator are standardized; Secondly, define weights for each evaluation indicator; a positive weight indicates that the corresponding evaluation indicator has a positive impact on the comprehensive score, and a negative weight indicates that the corresponding evaluation indicator has a negative impact on the comprehensive score; Finally, the weighted sum of all evaluation indicators of each classification model is calculated to obtain the comprehensive score of each classification model.
8. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 6, characterized in that: The evaluation indicators include macro-average calculation, F1 value, ROC curve, PR curve, MCC value, Cohen_Kappa coefficient and logarithmic loss function.
9. The method for inkjet droplet morphology detection and image classification based on machine learning according to claim 1, characterized in that: The machine learning classification models include six; the classification algorithms of each machine learning classification model are logistic regression, decision tree, random forest, support vector machine, K nearest neighbor and perceptron.
10. An inkjet droplet morphology detection and image classification device based on machine learning, comprising the following: A data set acquisition module, used to acquire an inkjet droplet image data set; An image processing module is used to perform image preprocessing on the acquired data set to obtain a preprocessed data set; A feature extraction and clustering module, used for inputting the preprocessed data set into a deep learning network, and extracting inkjet droplet morphological features as uncertainty features of the preprocessed data set; Compute deterministic features of the preprocessed dataset; Based on deterministic features and uncertain features, a clustering algorithm is used to cluster the preprocessed data set to obtain a classified data set, and the classified data set is divided into a training set and a test set; the deterministic features include droplet irregularity, droplet discreteness, and droplet non-uniformity; The classification model training and optimization module is used to train several machine learning classification models using the training set, score each classification model, and select the classification model with the highest score as the best trained model; The classification model testing module is used to test the trained best model using the test set to achieve inkjet droplet morphology detection and image classification.