Thin-layer chromatography concentration prediction method and device based on machine learning and storage medium
Through machine learning technology, the convolutional neural network model is used to automatically identify and analyze thin layer chromatography images, which solves the problem that thin layer chromatography analysis method in the existing technology is difficult to achieve quantitative analysis of large-scale compound concentrations, and realizes automated compound concentration prediction and simplified Process and improve predictive performance.
Patent Information
- Application Number
- CN202411070073.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, thin layer chromatography analysis is difficult to achieve quantitative analysis of large-scale compound concentrations, and traditional machine learning methods require feature engineering and feature selection, and the process is complex and inconvenient for automation.
Using machine learning-based thin layer chromatography concentration prediction method, the spot position in the thin layer chromatography image is automatically identified through the Grounded-SAM model, and the image data is trained and predicted using the convolutional neural network model to achieve automatic prediction of compound concentration and avoid Artificial circle selection and feature selection steps are carried out.
It realizes automated prediction of compound concentrations, improves prediction performance, simplifies the process, is suitable for large-scale analysis, and saves costs.
Smart Images

Figure CN118968253A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of quantitative analysis of thin layer chromatography results, and in particular relates to a method, device and storage medium for predicting thin layer chromatography concentration based on machine learning. Background Art
[0002] In chemical synthesis research, rapid and accurate quantitative analysis is an important means to improve the efficiency of synthetic route optimization. Thin layer chromatography (TLC) analysis can infer the type of compound in the solution based on the ratio shift value, but it is limited by the color discrimination ability of the naked eye and cannot quantitatively analyze the concentration of the compound at the same time. The improvement measures in the prior art are: 1. Combining thin layer chromatography analysis with traditional machine learning methods, such as the Chinese invention patent with patent publication number CN114171133A, which discloses "a method for predicting ratio shift values based on machine learning". When building a machine learning model, it is necessary to calculate a variety of carefully designed and selected molecular descriptors and molecular fingerprints. The traditional machine learning methods involved in this method require feature engineering and feature selection. 2. Use machine vision solutions to help thin layer chromatography achieve quantitative analysis. For example, the Chinese invention patent with patent publication number CN118091009A discloses a "quantitative analysis method of chlorophyll based on thin layer chromatography quantitative analysis system". Its analysis method first requires manual spot selection, automatic identification and generation of candidate frames, and then identification of spot areas through opencv. Finally, a scatter plot is established based on spot area and concentration to automatically fit and generate a standard curve. This method is too complicated and is not convenient for large-scale automated quantitative analysis.
[0003] Therefore, a new TLC concentration prediction method is needed to solve the above technical problems. Summary of the invention
[0004] The purpose of the present invention is to provide a thin layer chromatography concentration prediction method based on machine learning, which is used to solve the technical problems that the prior art cannot analyze thin layer chromatography concentration in large quantities and the traditional machine learning method requires feature engineering and feature selection.
[0005] The technical solution of the present invention to solve the technical problem is: A thin layer chromatography concentration prediction method based on machine learning comprises the following steps: S1: Collect a set number of thin layer chromatography result images of compounds with gradient concentrations, and transfer the result images to the Grounded-SAM model; the Grounded-SAM model automatically identifies the position of each spot on the silica gel plate in the result image, obtains the center position of each spot, and cuts out a square spot image centered on the spot; the square spot image data and the corresponding concentration data are divided into a training set, a validation set, and a test set for training, validation, and testing of the convolutional neural network model; S2: Use the training set and the validation set to train and validate the convolutional neural network to obtain the trained and validated convolutional neural network model; use the test set to test the trained and validated convolutional neural network model to obtain the corresponding prediction results; calculate the determination coefficient and the root mean square error according to the prediction results and the known concentration data in the test set, and determine whether the values of the determination coefficient and the root mean square error meet the corresponding set values. If so, stop the training of the convolutional neural network model, save the convolutional neural network model, and execute step S3; if not, adjust the hyperparameters of the convolutional neural network model, and retrain, validate and test the convolutional neural network model; S3: The thin layer chromatography result image of the unknown concentration compound is sequentially passed into the Grounded-SAM model and the trained convolutional neural network model to obtain the concentration prediction value of the compound.
[0006] Preferably, the Grounded-SAM model in step S1 adopts a high-resolution Grounded-SAM model.
[0007] Preferably, in step S2.1, the data ratio of the training set, the validation set and the test set is 8:1:1.
[0008] Preferably, the convolutional neural network includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a second maximum pooling layer, a first fully connected layer, a second fully connected layer and an output layer connected in sequence.
[0009] Preferably, the first convolution layer uses a 3×3 convolution kernel and 32 channels; the second convolution layer uses a 3×3 convolution kernel and 64 channels; the third convolution layer uses a 3×3 convolution kernel and 128 channels; the first maximum pooling layer, the second maximum pooling layer, and the third maximum pooling layer use a 2×2 window.
[0010] Preferably, the setting value of the determination coefficient in step S2 is greater than 0.90; and the setting value of the root mean square error is less than 0.005 mol / L.
[0011] Preferably, the calculation formulas for the coefficient of determination and the root mean square error are: = ; ; in, is the determination coefficient; N is the total number of concentration data; i is the sample number of the test set; is the predicted value; is the true value; is the average value; is the root mean square error.
[0012] A device for realizing a thin layer chromatography concentration prediction method based on machine learning, comprising: An acquisition module, used for acquiring a set number of images of thin layer chromatography results of compounds with gradient concentrations; The silicone plate image processing module uses the Grounded-SAM model to automatically identify the position of each spot on the silicone plate in the result image, obtain the center position of each spot, and cut out a square spot image centered on the spot; The spot image processing module divides the square spot image data and its corresponding concentration data into a training set, a validation set and a test set for training, validation and testing of the convolutional neural network model; The convolutional neural network training module is used to train the convolutional neural network model and predict the concentration value of compounds with unknown concentrations.
[0013] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the device where the computer-readable storage medium is located executes the prediction method.
[0014] The beneficial effects of the present invention are as follows: by collecting a set number of thin layer chromatography result images of compounds with gradient concentrations, the result images are passed into the Grounded-SAM model; the Grounded-SAM model automatically identifies the position of each spot on the silica gel plate in the result image, obtains the center position of each spot, and cuts out a square spot image centered on the spot; and realizes automatic positioning of the spot position. The square spot image data and its corresponding concentration data are divided into a training set, a validation set, and a test set for training, validation, and testing of the convolutional neural network model; the convolutional neural network model is tested on the test set to obtain the corresponding prediction results; the determination coefficient and the root mean square error are calculated based on the prediction results and the known concentration data. When the values of the determination coefficient and the root mean square error reach the corresponding set values, the current convolutional neural network model is saved to establish a direct mapping relationship between the spot image and the concentration of the detected compound. The thin layer chromatography result images of compounds of unknown concentration are passed into the Grounded-SAM model and the trained convolutional neural network model in turn to obtain the concentration prediction value of the compound. This method does not require manual selection of spot images, and the convolutional neural network model does not require feature engineering and feature selection. It can realize the concentration prediction of large quantities of compounds, saving costs while improving prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of a thin layer chromatography concentration prediction method based on machine learning of the present invention; Figure 2It is a structural diagram of the convolutional neural network model; Figure 3 This is a result diagram of the convolutional neural network model on the test set, taking methyl 4-methoxybenzoate as an example. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0017] Embodiment 1: like Figure 1 As shown, the present invention discloses a thin layer chromatography concentration prediction method based on machine learning, comprising the following steps: S1: Collect a set number of thin layer chromatography result images of compounds with gradient concentrations, and transfer the result images to the Grounded-SAM model; the Grounded-SAM model automatically identifies the position of each spot on the silica gel plate in the result image, obtains the center position of each spot, and cuts out a square spot image centered on the spot; the square spot image data and the corresponding concentration data are divided into a training set, a validation set, and a test set for training, validation, and testing of the convolutional neural network model; Among them, the Grounded-SAM model adopts a high-resolution Grounded-SAM model; the data ratio of the training set, the validation set and the test set is 8:1:1. The convolutional neural network includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a second maximum pooling layer, a first fully connected layer, a second fully connected layer and an output layer connected in sequence. The first convolutional layer adopts a 3×3 convolution kernel and 32 channels; the second convolutional layer adopts a 3×3 convolution kernel and 64 channels; the third convolutional layer adopts a 3×3 convolution kernel and 128 channels; the first maximum pooling layer, the second maximum pooling layer, and the third maximum pooling layer adopt a 2×2 window.
[0018] S2: Use the training set and the validation set to train and validate the convolutional neural network to obtain the trained and validated convolutional neural network model; use the test set to test the trained and validated convolutional neural network model to obtain the corresponding prediction results; calculate the determination coefficient and the root mean square error according to the prediction results and the known concentration data in the test set, and judge whether the values of the determination coefficient and the root mean square error meet the corresponding set values. In the actual training process, the set value of the determination coefficient is greater than 0.90; the set value of the root mean square error is less than 0.005 mol / L; if so, stop the training of the convolutional neural network model, save the convolutional neural network model, and execute step S3; if not, adjust the hyperparameters of the convolutional neural network model, and retrain, validate and test the convolutional neural network model; The calculation formulas of the determination coefficient and the root mean square error are: = ; ; in, is the determination coefficient; N is the total number of concentration data; i is the sample number of the test set; is the predicted value; is the true value; is the average value; is the root mean square error.
[0019] S3: The thin layer chromatography result image of the unknown concentration compound is sequentially passed into the Grounded-SAM model and the trained convolutional neural network model to obtain the concentration prediction value of the compound.
[0020] In the actual application process, taking methyl 4-methoxybenzoate as an example, the specific steps of the method are: Collect n grayscale images of thin layer chromatography results of compounds with gradient concentrations, and the gradient concentration is generally 0.001-0.05mol / L; the Grounded-SAM model processes the thin layer chromatography result images accordingly, including the two hyperparameters that control the sensitivity and accuracy of the Grounded model in detection are set as: box_threshold=0.3, text_threshold = 0.3; the prompt word is set as: text_prompt="circle"; the SAM model is selected as the high-resolution version vit_h, and the model automatically identifies and captures each spot in the image; the final output square spot image is generally 224*224 pixels in size. Figure 2As shown in the figure, the input data dimension of the convolutional neural network model is (n, 1, 224, 224) (n samples, single channel, each image size is 224*224 pixels), after the first convolution layer (3×3 convolution kernel, 32 channels), the data dimension is (n, 32, 224, 224), after the maximum pooling operation (2×2 pooling window), the data dimension is (n, 32, 112, 112), after the second convolution layer (3×3 convolution kernel, 64 channels), the data dimension is (n, 64, 112, 112), after the second maximum After the pooling operation (2×2 pooling window), the data dimension is (n, 64, 56, 56), after the third convolution layer (3×3 convolution kernel, 128 channels), the data dimension is (n, 128, 56, 56), after the third maximum pooling operation (2×2 pooling window), the data dimension is (n, 128, 28, 28), after the first fully connected layer, the data dimension is (n, 100352), after the second fully connected layer, the data dimension is (n, 128), and the final output data dimension is (n, 1), that is, the concentration prediction value of n compound samples. The determination coefficient and root mean square error are calculated based on the concentration prediction values of these n compound samples and the known concentration data of the corresponding samples, as shown in Figure 3 As shown, the coefficient of determination R 2 The root mean square error (RMSE) is 0.962 and 0.00277, which means that the convolutional neural network model meets the prediction performance standard and can be used for the concentration prediction of unknown concentration compounds in the next step.
[0021] Embodiment 2: A device for realizing a thin layer chromatography concentration prediction method based on machine learning, comprising: An acquisition module, used for acquiring a set number of images of thin layer chromatography results of compounds with gradient concentrations; The silicone plate image processing module uses the Grounded-SAM model to automatically identify the position of each spot on the silicone plate in the result image, obtain the center position of each spot, and cut out a square spot image centered on the spot; The spot image processing module divides the square spot image data and its corresponding concentration data into a training set, a validation set and a test set for training, validating and testing the convolutional neural network model. The convolutional neural network model is tested on the test set to obtain the corresponding prediction results. The convolutional neural network training module is used to train the convolutional neural network model and predict the concentration value of compounds with unknown concentrations.
[0022] Embodiment 3: A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the device where the computer-readable storage medium is located executes the prediction method.
[0023] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.
Claims
1. A thin layer chromatography concentration prediction method based on machine learning, characterized in that: The following steps are involved: S1: Collect a set number of thin layer chromatography result images of compounds with gradient concentrations, and transfer the result images to the Grounded-SAM model; the Grounded-SAM model automatically identifies the position of each spot on the silica gel plate in the result image, obtains the center position of each spot, and cuts out a square spot image centered on the spot; the square spot image data and the corresponding concentration data are divided into a training set, a validation set, and a test set for training, validation, and testing of the convolutional neural network model; S2: Use the training set and the validation set to train and validate the convolutional neural network to obtain the trained and validated convolutional neural network model; use the test set to test the trained and validated convolutional neural network model to obtain the corresponding prediction results; calculate the determination coefficient and the root mean square error according to the prediction results and the known concentration data in the test set, and determine whether the values of the determination coefficient and the root mean square error meet the corresponding set values. If so, stop the training of the convolutional neural network model, save the convolutional neural network model, and execute step S3; if not, adjust the hyperparameters of the convolutional neural network model, and retrain, validate and test the convolutional neural network model; S3: The thin layer chromatography result image of the unknown concentration compound is sequentially passed into the Grounded-SAM model and the trained convolutional neural network model to obtain the concentration prediction value of the compound.
2. The method for predicting thin layer chromatography concentration based on machine learning according to claim 1, characterized in that: The Grounded-SAM model in step S1 adopts a high-resolution Grounded-SAM model.
3. The method for predicting thin layer chromatography concentration based on machine learning according to claim 1, characterized in that: The data ratio of the training set, the validation set and the test set in step S1 is 8:1:
1.
4. The method for predicting thin layer chromatography concentration based on machine learning according to claim 1, characterized in that: The convolutional neural network includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a second maximum pooling layer, a first fully connected layer, a second fully connected layer and an output layer, which are connected in sequence.
5. The method for predicting thin layer chromatography concentration based on machine learning according to claim 4, characterized in that: The first convolution layer uses a 3×3 convolution kernel and 32 channels; the second convolution layer uses a 3×3 convolution kernel and 64 channels; the third convolution layer uses a 3×3 convolution kernel and 128 channels; the first maximum pooling layer, the second maximum pooling layer, and the third maximum pooling layer use a 2×2 window.
6. The method for predicting thin layer chromatography concentration based on machine learning according to claim 1, characterized in that: The setting value of the determination coefficient in step S2 is greater than 0.90; the setting value of the root mean square error is less than 0.005 mol / L.
7. The method for predicting thin layer chromatography concentration based on machine learning according to claim 6, characterized in that: The calculation formulas of the determination coefficient and the root mean square error are: = ; ; in, is the determination coefficient; N is the total number of concentration data; i is the sample number of the test set; is the predicted value; is the true value; is the average value; is the root mean square error.
8. A device for implementing the thin layer chromatography concentration prediction method based on machine learning according to any one of claims 1 to 7, characterized in that: include: An acquisition module, used for acquiring a set number of images of thin layer chromatography results of compounds with gradient concentrations; The silicone plate image processing module uses the Grounded-SAM model to automatically identify the position of each spot on the silicone plate in the result image, obtain the center position of each spot, and cut out a square spot image centered on the spot; The spot image processing module divides the square spot image data and its corresponding concentration data into a training set, a validation set and a test set for training, validation and testing of the convolutional neural network model; The convolutional neural network training and prediction module is used to train the convolutional neural network model and predict the concentration value of compounds with unknown concentrations.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the device where the computer-readable storage medium is located executes the design method according to any one of claims 1 to 7.
