CN117011612A - AI identification method for traditional Chinese medicinal materials - Google Patents

AI identification method for traditional Chinese medicinal materials Download PDF

Info

Publication number
CN117011612A
CN117011612A CN202311033619.8A CN202311033619A CN117011612A CN 117011612 A CN117011612 A CN 117011612A CN 202311033619 A CN202311033619 A CN 202311033619A CN 117011612 A CN117011612 A CN 117011612A
Authority
CN
China
Prior art keywords
data
model
chinese medicinal
image
traditional chinese
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311033619.8A
Other languages
Chinese (zh)
Inventor
展新
许文超
许玉仁
赵瑞娇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainan Xinchao Hao Information Technology Co ltd
Original Assignee
Hainan Xinchao Hao Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainan Xinchao Hao Information Technology Co ltd filed Critical Hainan Xinchao Hao Information Technology Co ltd
Priority to CN202311033619.8A priority Critical patent/CN117011612A/en
Publication of CN117011612A publication Critical patent/CN117011612A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/096Transfer learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/098Distributed learning, e.g. federated learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/0985Hyperparameter optimisation; Meta-learning; Learning-to-learn
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • G06V10/945User interactive design; Environments; Toolboxes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Multimedia (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention aims to provide an innovative Chinese medicinal material AI identification method based on a deep learning technology. The method is characterized in that a large amount of Chinese medicinal material image data are collected, and deep learning models such as Convolutional Neural Networks (CNNs) are adopted for training and optimizing. In the identification process, a user can obtain a quick and accurate Chinese medicinal material identification result by taking a picture of the Chinese medicinal material or inputting a characteristic description. The method also integrates the characteristics of multi-mode information, such as smell, texture and the like, and improves the comprehensiveness and accuracy of identification. Meanwhile, by means of an attention mechanism and a transfer learning technology, the identification capability of the model on similar traditional Chinese medicinal materials is improved. The method is deployed in the cloud, supports mobile equipment application, realizes personalized recommendation and multi-language support, and provides convenient and intelligent Chinese medicinal material identification service for users.

Description

AI identification method for traditional Chinese medicinal materials
Technical Field
The invention relates to the field of AI identification, in particular to a Chinese medicinal material AI identification method.
Background
In the last decades, the identification of traditional Chinese medicinal materials has been dependent on traditional manual methods, such as plant characterization and chemical analysis, which require specialized Chinese medicinal knowledge and experience. However, this approach is time consuming and error prone, limiting the large scale application and production of traditional Chinese medicinal materials.
With the rapid development of artificial intelligence technology, especially the rising of deep learning technology, chinese medicinal material AI identification becomes possible gradually. Advanced feature representation can be learned from a large number of Chinese medicinal material images by using a deep learning model such as a Convolutional Neural Network (CNN) and the like, so that automatic identification is realized. Along with the expansion of the data set and the improvement of the computing power, the accuracy and the efficiency of the identification of the Chinese medicinal materials AI are continuously improved.
In addition, traditional Chinese medicine identification application based on mobile equipment also appears, so that a user can shoot traditional Chinese medicine images through equipment such as a mobile phone and the like, and related information can be obtained. The development of the technology brings convenience to cognition, purchase and application of traditional Chinese medicinal materials, and promotes digital upgrading of the traditional Chinese medicinal industry.
The traditional Chinese medicinal material AI identification method has some defects. Firstly, the traditional method mainly relies on a manually designed feature extraction and classification algorithm, and is difficult to capture advanced features of complex Chinese medicinal material images, so that the recognition accuracy is limited. Secondly, the traditional method has higher requirements on the marking and quality of the data, and needs professional staff to carry out fine marking and processing, thereby increasing the processing cost and time consumption. In addition, the traditional method has poor generalization capability on new or different sources of traditional Chinese medicinal material data, and may not perform well on unseen data. Meanwhile, the traditional method is difficult to adapt to the shape and illumination change in the traditional Chinese medicine image, so that the identification result is unstable. Finally, traditional methods require guidance and assistance from specialized chinese medical knowledge, and have high thresholds for non-professionals to use and apply. These deficiencies limit the effect and feasibility of the traditional Chinese medicine AI identification method in large-scale and practical application.
Disclosure of Invention
1. Technical problem to be solved
The invention aims to provide an AI (advanced identification) method for Chinese medicinal materials, which aims to solve the problems in the prior art:
the traditional Chinese medicinal material AI identification method has some defects. Firstly, the traditional method mainly relies on a manually designed feature extraction and classification algorithm, and is difficult to capture advanced features of complex Chinese medicinal material images, so that the recognition accuracy is limited. Secondly, the traditional method has higher requirements on the marking and quality of the data, and needs professional staff to carry out fine marking and processing, thereby increasing the processing cost and time consumption. In addition, the traditional method has poor generalization capability on new or different sources of traditional Chinese medicinal material data, and may not perform well on unseen data. Meanwhile, the traditional method is difficult to adapt to the shape and illumination change in the traditional Chinese medicine image, so that the identification result is unstable. Finally, traditional methods require guidance and assistance from specialized chinese medical knowledge, and have high thresholds for non-professionals to use and apply. These deficiencies limit the effect and feasibility of the traditional Chinese medicine AI identification method in large-scale and practical application.
2. Technical proposal
An AI identification method of Chinese medicinal materials comprises the following steps of;
SI. data collection and preprocessing; collecting images and related information of a large number of Chinese medicinal materials, and organizing the images and the related information into a data set;
preprocessing the data set, including image size unification, noise removal and image enhancement operation, so as to obtain a preprocessed image;
s2, extracting features; performing feature extraction on the preprocessed image by using a convolutional neural network deep learning model to obtain extracted image features;
by training on a large scale of the dataset, CNN learns advanced feature representation of the chinese herbal images;
s3, training a traditional Chinese medicine classification model; taking the extracted image features as input to construct a traditional Chinese medicine classification model;
model training is carried out on the data set, and model parameters are adjusted through an optimization algorithm including a gradient descent method, so that different traditional Chinese medicinal materials can be accurately distinguished;
s4, evaluating and optimizing a model; performing model evaluation by using a part of data which is not used in the training process to obtain an evaluation result;
performing model optimization according to the evaluation result, and adjusting the architecture, super parameters and training strategy of the model to obtain a trained model;
s5, deployment and application; the trained model is deployed into practical application, namely a mobile application, a website and other systems integrated into the medical field;
after deployment, the AI model automatically recognizes and gives corresponding Chinese medicinal material information by inputting Chinese medicinal material images.
Preferably, the S1 data collection includes the steps of:
s1-1, firstly, clearly determining which types of data and the scale and range of the data need to be collected;
determining the characteristics and the labels of the data according to specific tasks and problems;
s1-2, searching a proper data source according to data requirements;
the data sources are from public data sets, open data platforms and third party data providers, and comprise self-collected data and are obtained through data sharing with related institutions and partners;
s1-3, acquiring data samples meeting the requirements according to the data source;
the data acquisition mode is manual acquisition, including through web crawler or manual input and automatic acquisition, such as sensor data and log data.
Preferably, the S1 data preprocessing further includes the following steps:
s1-4, detecting and processing missing values in the data, and processing the missing values by filling the mean value, the median value and using an interpolation method;
detecting and processing abnormal values, and cleaning data by cutting off, replacing and deleting the abnormal values;
s1-5, selecting the most representative characteristic, and removing redundant and irrelevant characteristics;
scaling the value ranges of different features to the same scale;
converting the non-numeric features to numeric, including binary representation using one-hot encoding;
data normalization:
the data is converted into the distribution with the mean value of 0 and the variance of 1, so that the model is easier to learn and converge;
scaling the data to a specific range, including [0,1] and [ -1,1], preventing certain features from having excessive impact on the model;
s1-6, dividing a data set into a training set, a verification set and a test set, and using the training set, the verification set and the test set for training, tuning and evaluating the model;
noise, rotation and overturn transformation are added to the data, more samples are generated, and the robustness and generalization capability of the model are improved;
the data unbalance problem is processed, so that the number of samples in different categories is relatively balanced.
Preferably, the calculation formula of the S2 convolutional neural network includes the following:
convolution operation: assuming that an input image is I, a convolution kernel is K, and an output feature map is O; the sizes of the input image and the convolution kernel are W multiplied by H and F multiplied by F respectively, the step length is S, and the filling is P; the convolution operation is calculated as follows:
O(i,j)=∑[I*K(i,j)]
wherein, O (I, j) is a certain pixel value on the output feature map, i×k (I, j) represents a result of corresponding multiplication and then addition of the input image I and the element of the convolution kernel K at the position (I, j); the operation moves on the whole image, the step length is S, and the whole image is traversed;
pooling operation: the pooling operation is used for reducing the size and parameter quantity of the feature map, and the common pooling operation is maximum pooling and average pooling; assuming that the input feature map is I, the pooling kernel size is p×p, and the step size is S, the pooling operation is calculated as follows:
O(i,j)=pool(I(i*S:i*S+P,j*S:j*S+P))
where O (i, j) is a pixel value on the output feature map, pool represents a pooling operation, typically taking the maximum and average values within a block region.
Preferably, the S3 gradient descent method calculation formula includes the following:
assume a loss function J (θ), where θ represents a vector of model parameters, including weights and biases, and the update rule for the gradient descent method is:
wherein: θ: a vector representing current model parameters;
alpha: the learning rate, also called step length and learning step length, is a super parameter of the gradient descent method, and controls the updated step length; the adjustment is needed according to specific problems, and too large can cause oscillation and instability, and too small can cause slow convergence speed;
a gradient vector representing the loss function J (θ) with respect to the parameter θ, i.e., a vector composed of the partial derivatives of the loss function for each parameter; the gradient vector indicates the steepest descent direction of the loss function at the current parameter.
Preferably, the S3 traditional Chinese medicine classification model utilizes a data enhancement technology to extend and train the data set, increases the diversity of the images, and generates more training samples through rotation, turnover, scaling and translation transformation;
the traditional Chinese medicine classification model adopts a transfer learning method aiming at a traditional Chinese medicine identification task;
performing fine adjustment to adapt to traditional Chinese medicine data on the basis of a pre-trained universal image recognition model;
the traditional Chinese medicine classification model has other characteristics including smell and texture besides image information;
the multi-mode information is fused into the model, so that the recognition accuracy of the traditional Chinese medicinal materials is improved, and the model is more similar to a human recognition mode.
Preferably, the S4 Chinese medicinal material classification model introduces an attention mechanism, and the attention mechanism is introduced to enable the model to pay attention to the area most relevant to Chinese medicinal material identification in the image;
the traditional Chinese medicine classification model traditional Chinese medicine identification is related to the fields of traditional Chinese medicine and botanic, and knowledge in the fields of traditional Chinese medicine and botanic is introduced into the training of the model to perform joint learning;
the prior knowledge of the traditional Chinese medicine literature of the traditional Chinese medicine is incorporated into the model, and the model is guided and restrained.
Preferably, the S5 deployment and application design a friendly real-time interactive interface, so that a user can quickly acquire the identification result and related information of the traditional Chinese medicinal materials by taking the pictures of the traditional Chinese medicinal materials and inputting key features;
combining image recognition and natural language processing technologies;
developing mobile equipment application, embedding the Chinese medicinal material identification function into mobile phones and tablet mobile equipment, so that a user can identify and inquire Chinese medicinal materials at any time and any place;
multi-language support is added to the deployment and application.
Preferably, the S5 deployment and application utilizes the latest hardware acceleration techniques, including the reasoning speed of GPU and TPU optimization models;
providing personalized Chinese herbal medicine recommendations based on historical query records and preferences of users;
the model is deployed at the cloud for multi-terminal access and sharing, so that a plurality of users share the traditional Chinese medicine identification service, and the model is continuously optimized and updated through data sharing and cooperation;
the deployment and application provide an interpretable presentation of the recognition results of the Chinese medicinal materials, and the interpretation model comprises making recognition decisions.
Preferably, the natural language processing technology application comprises the following steps:
s5-1-1, cleaning and preprocessing an original text, including removing special characters, punctuation marks and HTML labels, converting the original text into a lower case form, and eliminating case-case differences to obtain a preprocessed text;
s5-1-2, splitting the preprocessed text into sequences of words and subwords to form words and marks;
s5-1-3, reducing the vocabulary into an original form, including reducing the verb into the original basic form;
removing common but non-actual disjunctive words including "a," "an," "the";
s5-1-4, identifying entities in the text, including person names, place names and organization names;
s5-1-5, generating a grammar tree and a dependency tree by analyzing the grammar structure of the preprocessed text;
s5-1-6, understanding semantic meaning of the preprocessed text, wherein the semantic meaning comprises word sense disambiguation, reference resolution and emotion analysis;
s5-1-7, extracting useful information from the preprocessed text, wherein the useful information comprises events, relations and facts;
s5-1-8, classifying the preprocessed text, including emotion classification and theme classification;
s5-1-9, translating the text from one language to another language;
s5-1-10, generating natural language texts, including text abstracts and dialogue generation;
s5-1-11, establishing a language model by using a deep learning technology.
Drawings
FIG. 1 is a schematic overall flow chart of the present invention;
FIG. 2 is a partial flow chart of the present invention.
Detailed Description
Examples: referring to fig. 1 and 2, a Chinese medicinal material AI identification method includes the following steps;
SI. data collection and preprocessing; collecting images and related information of a large number of Chinese medicinal materials, and organizing the images and the related information into a data set;
preprocessing data, including image size unification, noise removal and image enhancement operations, so as to provide clean data for subsequent steps;
s2, extracting features; performing feature extraction on the preprocessed image by using a convolutional neural network (Convolutional Neural Network, CNN) deep learning model;
by training on a large-scale data set, the CNN learns advanced characteristic representation of the traditional Chinese medicine images, so that the subsequent classification task is easier and more accurate;
s3, training a traditional Chinese medicine classification model; taking the extracted image features as input, and constructing a traditional Chinese medicine classification model;
model training is carried out on the marked data set, and model parameters are adjusted through an optimization algorithm (comprising a gradient descent method), so that different traditional Chinese medicinal materials can be accurately distinguished;
s4, evaluating and optimizing a model; performing model evaluation by using a part of data which is not used in the training process so as to measure the performance of the model on unknown data;
model optimization is carried out according to the evaluation result, and the framework, super parameters and training strategies of the model may need to be adjusted to improve the accuracy and generalization capability of the model;
s5, deployment and application; the trained model is deployed into practical application, which is a mobile application, a website and other systems integrated into the medical field;
after deployment, the AI model automatically recognizes and gives corresponding Chinese medicinal material information by inputting Chinese medicinal material images.
Specifically, the image size unification includes the following steps:
(1) Image collection: different sized image datasets are collected, and the images may come from different sources or acquisition devices.
(2) Image reading: an image file is read using an image processing library (e.g., openCV) and the image is represented as a matrix of pixels.
(3) Selecting a target size: the target size is determined, i.e. the uniform size to which all images are desired to be resized. This is typically determined by the input requirements of the model.
(4) And (3) image adjustment: for each image, it is adjusted to the target size using interpolation or the like. Common interpolation methods include nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, and the like. Bilinear interpolation is a common method of adjusting the image size by calculating a weighted average between pixels.
(5) And (3) data storage: and saving the adjusted image in a new data set for subsequent model training and testing.
Specifically, the noise removal includes the steps of:
(1) Noise type analysis: the type of noise first needs to be analyzed, and common noise includes gaussian noise, pretzel noise, poisson noise, and the like. Different types of noise may require different processing methods.
(2) Image preprocessing: before removing noise, image preprocessing is performed, including operations such as graying and image enhancement. This helps to reduce the effect of noise on subsequent processing.
(3) And (3) filtering operation: the image is subjected to a filtering operation using a filter to remove noise. Common filtering methods include: and (5) average value filtering: the value of the current pixel is replaced by the average value of surrounding pixels, which is suitable for light noise.
Median filtering: the median value of surrounding pixels is used for replacing the value of the current pixel, and the method is suitable for relatively serious noises such as salt and pepper noise.
Gaussian filtering: the pixels are weighted averaged using gaussian kernel, which is suitable for gaussian noise.
(4) Parameter adjustment: according to the noise type and the image characteristics, the parameters of the filter are adjusted so as to obtain a better denoising effect. Parameters such as size, weight, etc. of the filter may affect the denoising effect.
According to the actual situation, other denoising methods, such as wavelet denoising, non-local mean denoising and the like, can be tried to obtain better denoising effect.
(5) And (3) denoising effect evaluation: and carrying out quality evaluation on the denoised image, wherein evaluation indexes such as Mean Square Error (MSE), peak signal to noise ratio (PSNR) and the like can be used to ensure that the denoising effect meets the requirements.
Specifically, the image enhancement includes the steps of:
(1) Image reading: an image file is read using an image processing library (e.g., openCV) and the image is represented as a matrix of pixels.
(2) Graying: if the image is a color image, it can be converted into a gray scale image. The gray scale image contains only luminance information, which helps to simplify the processing and reduce the computational complexity.
(3) Enhancement operation: a series of enhancement operations are performed, and the applicable operations can be selected as needed, for example:
contrast enhancement: the contrast of the image is adjusted, so that the brightness difference in the image is more obvious.
Brightness adjustment: the brightness of the image is adjusted to lighten or darken the image as a whole.
Sharpening: edges and details of the image are enhanced, so that the image is clearer.
Noise addition: and proper noise is added to the image, so that the image condition in the real scene is simulated, and the robustness of the model is improved.
Rotation and flipping: and the image is rotated, horizontally flipped or vertically flipped, so that the diversity and generalization capability of the data are improved.
(4) Parameter adjustment: according to the actual situation, the parameters of the enhancement operation are adjusted to obtain better enhancement effect.
(5) And (3) data preservation: the enhanced images are saved to a new dataset for subsequent model training and testing.
S1, data collection comprises the following steps:
s1-1, firstly, clearly determining which types of data and the scale and range of the data need to be collected;
determining the characteristics and the labels of the data according to specific tasks and problems;
s1-2, searching a proper data source according to data requirements;
the data sources come from public data sets, open data platforms and third party data providers, including self-collected data and obtained through data sharing with related institutions and partners;
s1-3, collecting data samples meeting the requirements according to a data source;
the data acquisition mode is manual acquisition, including through web crawler or manual input and automatic acquisition, such as sensor data and log data.
S1, preprocessing data, wherein the preprocessing of the S1 comprises the following steps:
s1-4, detecting and processing missing values in the data, and processing the missing values by filling the mean value, the median value and using an interpolation method;
detecting and processing abnormal values, and cleaning data by cutting off, replacing and deleting the abnormal values;
s1-5, selecting the most representative features, removing redundant and irrelevant features, reducing the dimension of a feature space, and improving the efficiency and generalization capability of the model;
scaling the value ranges of different features to the same scale, so as to avoid overlarge influence of certain features on model training;
converting the non-numeric features to numeric, including binary representation using one-hot encoding;
data normalization:
the data is converted into the distribution with the mean value of 0 and the variance of 1, so that the model is easier to learn and converge;
scaling the data to a specific range, including [0,1] and [ -1,1], preventing certain features from having excessive impact on the model;
s1-6, dividing a data set into a training set, a verification set and a test set for training, tuning and evaluating a model;
noise, rotation and overturn transformation are added to the data, more samples are generated, and the robustness and generalization capability of the model are improved;
the problem of unbalance of data is processed, so that the number of samples of different categories is relatively balanced, and the model is prevented from excessively paying attention to the category with a large number.
The calculation formula of the S2 convolutional neural network is as follows:
convolution operation: assuming that an input image is I, a convolution kernel (filter) is K, and an output feature map is O; the sizes of the input image and the convolution kernel are W×H and F×F respectively, the step size (stride) is S, and the padding (padding) is P; the convolution operation is calculated as follows:
O(i,j)=∑[I*K(i,j)]
wherein, O (I, j) is a certain pixel value on the output feature map, i×k (I, j) represents a result of corresponding multiplication and then addition of the input image I and the element of the convolution kernel K at the position (I, j); the operation moves on the whole image, the step length is S, and the whole image is traversed;
pooling operation: pooling operations for reducing the size and parameter amount of feature graphs, common Pooling operations are maximum Pooling (MaxPooling) and Average Pooling (Average Pooling); assuming that the input feature map is I, the pooling kernel size is p×p, and the step size is S, the pooling operation calculation includes:
O(i,j)=pool(I(i*S:i*S+P,j*S:j*S+P))
where O (i, j) is a pixel value on the output feature map, pool represents a pooling operation, typically taking the maximum and average values within a block region.
The S3 gradient descent method calculation formula comprises the following steps:
assuming a loss function J (θ), where θ represents a vector of model parameters (including weights and biases), the update rule for the gradient descent method is:
wherein: θ: a vector representing current model parameters;
alpha: the learning rate, also called step length and learning step length, is a super parameter of the gradient descent method, and controls the updated step length; the adjustment is needed according to specific problems, and too large can cause oscillation and instability, and too small can cause slow convergence speed;
a gradient vector representing the loss function J (θ) with respect to the parameter θ, i.e., a vector composed of the partial derivatives of the loss function for each parameter; the gradient vector indicates the steepest descent direction of the loss function at the current parameter.
S3, the traditional Chinese medicine classification model expands a training data set by utilizing a data enhancement technology, increases the diversity of images, generates more training samples by rotation, overturning, scaling and translation transformation, and improves the generalization capability of the model;
aiming at the Chinese medicinal material identification task, the Chinese medicinal material classification model adopts a transfer learning method; on the basis of a pre-trained general image recognition model, fine-tuning is performed to adapt to traditional Chinese medicine data, so that training time is saved, and recognition accuracy is improved;
besides image information, the Chinese medicinal material classification model also has other characteristics including smell and texture; the multi-mode information is fused into the model, so that the recognition accuracy of the traditional Chinese medicinal materials is improved, and the model is more similar to a human recognition mode.
S4, the traditional Chinese medicine classification model introduces an attention mechanism, and the model can pay attention to the area most relevant to traditional Chinese medicine identification in the image by introducing the attention mechanism, so that the grabbing and the utilization of key features are effectively improved;
the traditional Chinese medicine classification model is related to the fields of traditional Chinese medicine and botanic, knowledge in the fields is introduced into model training, and combined learning is carried out, so that the expertise and accuracy of the model are improved;
the traditional Chinese medicine classification model has long history and rich traditional Chinese medicine literature, and the prior knowledge is incorporated into the model to guide and restrict the model, so that the interpretability and the trust degree of the model are improved.
S5, deploying and applying a friendly real-time interactive interface, so that a user can quickly acquire the identification result and related information of the traditional Chinese medicinal materials by taking pictures of the traditional Chinese medicinal materials and inputting key features; combining image recognition and natural language processing technology, providing more convenient user experience;
developing mobile equipment application, embedding the Chinese medicinal material identification function into mobile phones and tablet mobile equipment, so that a user can identify and inquire Chinese medicinal materials at any time and any place, and popularization and application of the Chinese medicinal materials are promoted;
the multi-language support is added for deployment and application, so that users in different areas and language backgrounds can easily use the Chinese herbal medicine recognition service.
S5, deploying and applying high-performance hardware acceleration: the latest hardware acceleration technology, including GPU and TPU, is utilized to optimize the reasoning speed of the model, so that the recognition and response time of the traditional Chinese medicinal materials are faster;
based on historical query records and preferences of users, personalized Chinese herbal medicine recommendations are provided, so that the users are helped to better know and select Chinese herbal medicines suitable for themselves;
the model is deployed at the cloud for multi-terminal access and sharing, so that a plurality of users share the traditional Chinese medicine identification service, and meanwhile, the model is continuously optimized and updated through data sharing and cooperation, so that the identification accuracy is improved;
the deployment and application provide the interpretable display of the Chinese medicinal material recognition result, and the interpretation model comprises the recognition decision, so that the user is helped to understand the recognition process, and the trust degree of the user on the model is increased.
The natural language processing technology application comprises the following steps:
s5-1-1, cleaning and preprocessing an original text, including removing special characters, punctuation marks and HTML labels, converting the original text into a lower case form, and eliminating case-case differences to obtain a preprocessed text;
s5-1-2, splitting the preprocessed text into sequences of words and subwords to form words and marks;
s5-1-3, reducing the vocabulary into an original form, including reducing the verb into the original basic form;
removing common but non-actual disjunctive words including "a," "an," "the";
s5-1-4, identifying entities in the text, including person names, place names and organization names;
s5-1-5, generating a grammar tree and a dependency tree by analyzing the grammar structure of the preprocessed text;
s5-1-6, understanding semantic meaning of the preprocessed text, including word sense disambiguation, reference resolution and emotion analysis;
s5-1-7, extracting useful information from the preprocessed text, wherein the useful information comprises events, relations and facts;
s5-1-8, classifying the preprocessed text, including emotion classification and theme classification;
s5-1-9, translating the text from one language to another language;
s5-1-10, generating natural language texts, including text abstracts and dialogue generation;
s5-1-11, establishing a language model by using a deep learning technology.
The foregoing has shown and described the basic principles, principal features and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the above-described embodiments, and that the above-described embodiments and descriptions are only preferred embodiments of the present invention, and are not intended to limit the invention, and that various changes and modifications may be made therein without departing from the spirit and scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (10)

1. An AI identification method for Chinese medicinal materials is characterized in that: the Chinese medicinal material AI identification method comprises the following steps:
s1, data collection and pretreatment: collecting images and related information of a large number of Chinese medicinal materials, and organizing the images and the related information into a data set;
preprocessing the data set, including image size unification, noise removal and image enhancement operation, so as to obtain a preprocessed image;
s2, feature extraction: performing feature extraction on the preprocessed image by using a convolutional neural network deep learning model to obtain extracted image features;
by training on a large scale of the dataset, CNN learns advanced feature representation of the chinese herbal images;
s3, training a traditional Chinese medicine classification model: taking the extracted image features as input to construct a traditional Chinese medicine classification model;
model training is carried out on the data set, and model parameters are adjusted through an optimization algorithm including a gradient descent method, so that different traditional Chinese medicinal materials can be accurately distinguished;
s4, model evaluation and optimization: performing model evaluation by using a part of data which is not used in the training process to obtain an evaluation result;
performing model optimization according to the evaluation result, and adjusting the architecture, super parameters and training strategy of the model to obtain a trained model;
s5, deployment and application: the trained model is deployed into practical application, namely a mobile application, a website and other systems integrated into the medical field;
after deployment, the AI model automatically recognizes and gives corresponding Chinese medicinal material information by inputting Chinese medicinal material images.
2. The AI-recognition method of claim 1, wherein the S1 data collection includes the steps of:
s1-1, firstly, clearly determining which types of data and the scale and range of the data need to be collected;
determining the characteristics and the labels of the data according to specific tasks and problems;
s1-3, searching a proper data source according to data requirements;
the data sources are from public data sets, open data platforms and third party data providers, and comprise self-collected data and are obtained through data sharing with related institutions and partners;
collecting data samples meeting the requirements according to the data source;
the data acquisition mode is manual acquisition, including through web crawler or manual input and automatic acquisition, such as sensor data and log data.
3. The AI-recognition method of claim 1, wherein the S1 data preprocessing further comprises the steps of:
s1-4, detecting and processing missing values in the data, and processing the missing values by filling the mean value, the median value and using an interpolation method;
detecting and processing abnormal values, and cleaning data by cutting off, replacing and deleting the abnormal values;
s1-5, selecting the most representative characteristic, and removing redundant and irrelevant characteristics;
scaling the value ranges of different features to the same scale;
converting the non-numeric features to numeric, including binary representation using one-hot encoding;
data normalization:
the data is converted into the distribution with the mean value of 0 and the variance of 1, so that the model is easier to learn and converge;
scaling the data to a specific range, including [0,1] and [ -1,1], preventing certain features from having excessive impact on the model;
s1-6, dividing a data set into a training set, a verification set and a test set, and using the training set, the verification set and the test set for training, tuning and evaluating the model;
noise, rotation and overturn transformation are added to the data, more samples are generated, and the robustness and generalization capability of the model are improved;
the data unbalance problem is processed, so that the number of samples in different categories is relatively balanced.
4. The AI-recognition method of claim 1, wherein the S2 convolutional neural network calculation formula comprises the following:
convolution operation: assuming that an input image is I, a convolution kernel is K, and an output feature map is O; the sizes of the input image and the convolution kernel are W multiplied by H and F multiplied by F respectively, the step length is S, and the filling is P; the convolution operation calculation includes the following:
O(i,j)=∑[I*K(i,j)]
wherein, O (I, j) is a certain pixel value on the output feature map, i×k (I, j) represents a result of corresponding multiplication and then addition of the input image I and the element of the convolution kernel K at the position (I, j); the operation moves on the whole image, the step length is S, and the whole image is traversed;
pooling operation: the pooling operation is used for reducing the size and parameter quantity of the feature map, and the common pooling operation is maximum pooling and average pooling; assuming that the input feature map is I, the pooling kernel size is p×p, and the step size is S, the pooling operation is calculated as follows:
O(i,j)=pool(I(i*S:i*S+P,j*S:j*S+P))
where O (i, j) is a pixel value on the output feature map, pool represents a pooling operation, typically taking the maximum and average values within a block region.
5. The method for identifying AI of Chinese medicinal materials according to claim 1, wherein the S3 gradient descent method has the following calculation formula:
assume a loss function J (θ), where θ represents a vector of model parameters, including weights and biases, and the update rule for the gradient descent method is:
wherein: θ: a vector representing current model parameters;
alpha: the learning rate, also called step length and learning step length, is a super parameter of the gradient descent method, and controls the updated step length; the adjustment is needed according to specific problems, and too large can cause oscillation and instability, and too small can cause slow convergence speed;
a gradient vector representing the loss function J (θ) with respect to the parameter θ, i.e., a vector composed of the partial derivatives of the loss function for each parameter; the gradient vector indicates the steepest descent direction of the loss function at the current parameter.
6. The AI-recognition method of claim 1, wherein the S3 classification model of the chinese-medicinal material uses data enhancement techniques to extend the training data set, increase the diversity of the image, and generate more training samples by rotation, inversion, scaling, translation transformation;
the traditional Chinese medicine classification model adopts a transfer learning method aiming at a traditional Chinese medicine identification task;
performing fine adjustment to adapt to traditional Chinese medicine data on the basis of a pre-trained universal image recognition model;
the traditional Chinese medicine classification model has other characteristics including smell and texture besides image information;
the multi-mode information is fused into the model, so that the recognition accuracy of the traditional Chinese medicinal materials is improved, and the model is more similar to a human recognition mode.
7. The method for identifying AI of Chinese medicinal materials according to claim 1, wherein the S4 Chinese medicinal material classification model introduces an attention mechanism by which the model can focus on the region of the image most relevant to Chinese medicinal material identification;
the traditional Chinese medicine classification model traditional Chinese medicine identification is related to the fields of traditional Chinese medicine and botanic, and knowledge in the fields of traditional Chinese medicine and botanic is introduced into the training of the model to perform joint learning;
the prior knowledge of the traditional Chinese medicine literature of the traditional Chinese medicine is incorporated into the model, and the model is guided and restrained.
8. The AI-recognition method of Chinese herbal medicines according to claim 1, wherein the step S5 of deploying and applying designs a friendly real-time interactive interface, so that a user can quickly acquire recognition results and related information of the Chinese herbal medicines by taking pictures of the Chinese herbal medicines and inputting key features;
combining image recognition and natural language processing technologies;
developing mobile equipment application, embedding the Chinese medicinal material identification function into mobile phones and tablet mobile equipment, so that a user can identify and inquire Chinese medicinal materials at any time and any place;
multi-language support is added to the deployment and application.
9. The method for identifying AI of Chinese medicinal materials according to claim 1, wherein the deploying and applying of S5 utilizes the latest hardware acceleration technique including the reasoning speed of GPU and TPU optimization model;
providing personalized Chinese herbal medicine recommendations based on historical query records and preferences of users;
the model is deployed at the cloud for multi-terminal access and sharing, so that a plurality of users share the traditional Chinese medicine identification service, and the model is continuously optimized and updated through data sharing and cooperation;
the deployment and application provide an interpretable presentation of the recognition results of the Chinese medicinal materials, and the interpretation model comprises making recognition decisions.
10. The AI-recognition method of claim 8, wherein the natural language processing technique comprises the steps of:
s5-1-1, cleaning and preprocessing an original text, including removing special characters, punctuation marks and HTML labels, converting the original text into a lower case form, and eliminating case-case differences to obtain a preprocessed text;
s5-1-2, splitting the preprocessed text into sequences of words and subwords to form words and marks;
s5-1-3, reducing the vocabulary into an original form, including reducing the verb into the original basic form;
removing common but non-actual disjunctive words including "a," "an," "the";
s5-1-4, identifying entities in the text, including person names, place names and organization names;
s5-1-5, generating a grammar tree and a dependency tree by analyzing the grammar structure of the preprocessed text;
s5-1-6, understanding semantic meaning of the preprocessed text, wherein the semantic meaning comprises word sense disambiguation, reference resolution and emotion analysis;
s5-1-7, extracting useful information from the preprocessed text, wherein the useful information comprises events, relations and facts;
s5-1-8, classifying the preprocessed text, including emotion classification and theme classification;
s5-1-9, translating the text from one language to another language;
s5-1-10, generating natural language texts, including text abstracts and dialogue generation;
s5-1-11, establishing a language model by using a deep learning technology.
CN202311033619.8A 2023-08-16 2023-08-16 AI identification method for traditional Chinese medicinal materials Pending CN117011612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311033619.8A CN117011612A (en) 2023-08-16 2023-08-16 AI identification method for traditional Chinese medicinal materials

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311033619.8A CN117011612A (en) 2023-08-16 2023-08-16 AI identification method for traditional Chinese medicinal materials

Publications (1)

Publication Number Publication Date
CN117011612A true CN117011612A (en) 2023-11-07

Family

ID=88565394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311033619.8A Pending CN117011612A (en) 2023-08-16 2023-08-16 AI identification method for traditional Chinese medicinal materials

Country Status (1)

Country Link
CN (1) CN117011612A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108226053A (en) * 2017-12-22 2018-06-29 南京中医药大学 Unstructured feature differentiation method based on multi-element intelligent fusion
CN110307871A (en) * 2019-07-11 2019-10-08 河南中医药大学第一附属医院 A method of quickly detection The Quality of Sliced Herbal Medicine is merged using electronics sense organ
CN110705296A (en) * 2019-09-12 2020-01-17 华中科技大学 Chinese natural language processing tool system based on machine learning and deep learning
CN111581953A (en) * 2019-01-30 2020-08-25 武汉慧人信息科技有限公司 Method for automatically analyzing grammar phenomenon of English text
CN111783667A (en) * 2020-07-02 2020-10-16 南阳理工学院 Traditional Chinese medicine identification system and use method thereof
WO2021217935A1 (en) * 2020-04-29 2021-11-04 深圳壹账通智能科技有限公司 Method for training question generation model, question generation method, and related device
CN114519353A (en) * 2022-02-22 2022-05-20 平安科技(深圳)有限公司 Model training method, emotion message generation device, emotion message generation equipment and emotion message generation medium
CN114998639A (en) * 2022-04-19 2022-09-02 安徽农业大学 Chinese medicinal material class identification method based on deep learning
CN115457366A (en) * 2022-09-15 2022-12-09 河北金叶子药业有限公司 Chinese herbal medicine multi-label recognition model based on graph convolution neural network
CN115953671A (en) * 2023-01-07 2023-04-11 昆明理工大学 Traditional Chinese medicine identification method based on CNN and Transformer

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108226053A (en) * 2017-12-22 2018-06-29 南京中医药大学 Unstructured feature differentiation method based on multi-element intelligent fusion
CN111581953A (en) * 2019-01-30 2020-08-25 武汉慧人信息科技有限公司 Method for automatically analyzing grammar phenomenon of English text
CN110307871A (en) * 2019-07-11 2019-10-08 河南中医药大学第一附属医院 A method of quickly detection The Quality of Sliced Herbal Medicine is merged using electronics sense organ
CN110705296A (en) * 2019-09-12 2020-01-17 华中科技大学 Chinese natural language processing tool system based on machine learning and deep learning
WO2021217935A1 (en) * 2020-04-29 2021-11-04 深圳壹账通智能科技有限公司 Method for training question generation model, question generation method, and related device
CN111783667A (en) * 2020-07-02 2020-10-16 南阳理工学院 Traditional Chinese medicine identification system and use method thereof
CN114519353A (en) * 2022-02-22 2022-05-20 平安科技(深圳)有限公司 Model training method, emotion message generation device, emotion message generation equipment and emotion message generation medium
CN114998639A (en) * 2022-04-19 2022-09-02 安徽农业大学 Chinese medicinal material class identification method based on deep learning
CN115457366A (en) * 2022-09-15 2022-12-09 河北金叶子药业有限公司 Chinese herbal medicine multi-label recognition model based on graph convolution neural network
CN115953671A (en) * 2023-01-07 2023-04-11 昆明理工大学 Traditional Chinese medicine identification method based on CNN and Transformer

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
王永康;胡继礼;阚红星;: "基于多任务学习模型的中药饮片识别", 现代中药研究与实践, no. 02, 28 April 2020 (2020-04-28) *
谭超群: "基于人工智能技术的中药饮片"形色"数字化表征探讨", 中国优秀硕士学位论文全文数据库医药卫生辑, 15 January 2022 (2022-01-15) *
陈岩: "基于改进卷积神经网络的中药饮片识别", 中国优秀硕士学位论文全文数据库医药卫生辑, 15 February 2023 (2023-02-15) *

Similar Documents

Publication Publication Date Title
CN110399929B (en) Fundus image classification method, fundus image classification apparatus, and computer-readable storage medium
CN111160533B (en) Neural network acceleration method based on cross-resolution knowledge distillation
CN109993102B (en) Similar face retrieval method, device and storage medium
CN111340738B (en) Image rain removing method based on multi-scale progressive fusion
CN111079601A (en) Video content description method, system and device based on multi-mode attention mechanism
CN112150493B (en) Semantic guidance-based screen area detection method in natural scene
WO2023070447A1 (en) Model training method, image processing method, computing processing device, and non-transitory computer readable medium
CN111680706A (en) Double-channel output contour detection method based on coding and decoding structure
CN109710804B (en) Teaching video image knowledge point dimension reduction analysis method
CN111582397A (en) CNN-RNN image emotion analysis method based on attention mechanism
CN117033609B (en) Text visual question-answering method, device, computer equipment and storage medium
CN112668486A (en) Method, device and carrier for identifying facial expressions of pre-activated residual depth separable convolutional network
CN112883931A (en) Real-time true and false motion judgment method based on long and short term memory network
CN115858847A (en) Combined query image retrieval method based on cross-modal attention retention
CN110287981B (en) Significance detection method and system based on biological heuristic characterization learning
CN117746078A (en) Object detection method and system based on user-defined category
CN116740362B (en) Attention-based lightweight asymmetric scene semantic segmentation method and system
CN112883930A (en) Real-time true and false motion judgment method based on full-connection network
CN117726809A (en) Small sample semantic segmentation method based on information interaction enhancement
CN117115505A (en) Emotion enhancement continuous training method combining knowledge distillation and contrast learning
CN116798041A (en) Image recognition method and device and electronic equipment
CN116229073A (en) Remote sensing image segmentation method and device based on improved ERFNet network
CN115019367A (en) Genetic disease face recognition device and method
CN117011612A (en) AI identification method for traditional Chinese medicinal materials
CN116958615A (en) Picture identification method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination