CN114998639B - Deep learning-based traditional Chinese medicine category identification method - Google Patents
Deep learning-based traditional Chinese medicine category identification method Download PDFInfo
- Publication number
- CN114998639B CN114998639B CN202210412607.5A CN202210412607A CN114998639B CN 114998639 B CN114998639 B CN 114998639B CN 202210412607 A CN202210412607 A CN 202210412607A CN 114998639 B CN114998639 B CN 114998639B
- Authority
- CN
- China
- Prior art keywords
- image
- chinese medicinal
- traditional chinese
- drugs
- training
- 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.)
- Active
Links
- 239000003814 drug Substances 0.000 title claims abstract description 89
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000013135 deep learning Methods 0.000 title claims abstract description 20
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000001914 filtration Methods 0.000 claims abstract description 5
- 230000002087 whitening effect Effects 0.000 claims abstract description 5
- 239000000463 material Substances 0.000 claims description 59
- 238000012549 training Methods 0.000 claims description 33
- 229940079593 drug Drugs 0.000 claims description 24
- 238000001514 detection method Methods 0.000 claims description 19
- 230000009193 crawling Effects 0.000 claims description 7
- 230000009471 action Effects 0.000 claims description 6
- 230000004927 fusion Effects 0.000 claims description 6
- 230000001939 inductive effect Effects 0.000 claims description 6
- 238000011176 pooling Methods 0.000 claims description 4
- 206010011224 Cough Diseases 0.000 claims description 3
- 206010062717 Increased upper airway secretion Diseases 0.000 claims description 3
- 208000004880 Polyuria Diseases 0.000 claims description 3
- XTXRWKRVRITETP-UHFFFAOYSA-N Vinyl acetate Chemical compound CC(=O)OC=C XTXRWKRVRITETP-UHFFFAOYSA-N 0.000 claims description 3
- 208000006673 asthma Diseases 0.000 claims description 3
- 230000035619 diuresis Effects 0.000 claims description 3
- 239000000428 dust Substances 0.000 claims description 3
- 239000000839 emulsion Substances 0.000 claims description 3
- 239000011521 glass Substances 0.000 claims description 3
- 208000026435 phlegm Diseases 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000010408 sweeping Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 claims description 3
- 230000002936 tranquilizing effect Effects 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims description 3
- 238000010792 warming Methods 0.000 claims description 3
- 125000003118 aryl group Chemical group 0.000 claims description 2
- 239000003212 astringent agent Substances 0.000 claims description 2
- 230000000694 effects Effects 0.000 claims description 2
- 230000002439 hemostatic effect Effects 0.000 claims description 2
- 239000008141 laxative Substances 0.000 claims description 2
- 230000001543 purgative effect Effects 0.000 claims description 2
- 230000003474 anti-emetic effect Effects 0.000 claims 1
- 239000002111 antiemetic agent Substances 0.000 claims 1
- 229940125683 antiemetic agent Drugs 0.000 claims 1
- 230000001256 tonic effect Effects 0.000 claims 1
- 229940125725 tranquilizer Drugs 0.000 claims 1
- 239000003204 tranquilizing agent Substances 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 4
- 230000001976 improved effect Effects 0.000 abstract description 3
- 238000013499 data model Methods 0.000 abstract description 2
- 238000011160 research Methods 0.000 abstract description 2
- 230000001737 promoting effect Effects 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 230000036541 health Effects 0.000 description 3
- 208000011580 syndromic disease Diseases 0.000 description 3
- 230000001914 calming effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 241000411851 herbal medicine Species 0.000 description 2
- 210000004185 liver Anatomy 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 210000002569 neuron Anatomy 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000002203 pretreatment Methods 0.000 description 2
- 230000001105 regulatory effect Effects 0.000 description 2
- 241000894007 species Species 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 206010047700 Vomiting Diseases 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000740 bleeding effect Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 230000017531 blood circulation Effects 0.000 description 1
- 210000005013 brain tissue Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003930 cognitive ability Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000029087 digestion Effects 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000000077 insect repellent Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 244000045947 parasite Species 0.000 description 1
- 230000001717 pathogenic effect Effects 0.000 description 1
- 239000000843 powder Substances 0.000 description 1
- 238000010926 purge Methods 0.000 description 1
- -1 slice Substances 0.000 description 1
- 238000004809 thin layer chromatography Methods 0.000 description 1
- 230000008673 vomiting Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/55—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Abstract
The invention discloses a Chinese medicinal herb class identification method based on deep learning, which comprises two parts of establishing a learning model and identifying Chinese medicinal herb decoction pieces. According to the invention, after the data set is enhanced by utilizing a web crawler and an offline acquisition mode, an identification data model is built by a convolutional neural network, a sample is processed before the traditional Chinese medicine decoction piece is identified and is continuously acquired, the acquired image is fused with the image based on the convolutional neural network by utilizing homomorphic filtering, the image is processed by ZCA whitening, then the characteristics are extracted by using a transducer, the image characteristics are imported into the convolutional neural network model for characteristic comparison, so that the types of sample traditional Chinese medicine are rapidly acquired, the factor quantity affecting the identification accuracy in the processing process is greatly discharged, the identification rate is improved, theoretical support can be provided for the research of a traditional Chinese medicine rapid identification method, and the method has a very profound significance for the modernization of the important traditional Chinese medicine.
Description
Technical Field
The invention relates to the technical field of Chinese herbal medicine identification, in particular to a Chinese herbal medicine category identification method based on deep learning.
Background
At present, the identification of the traditional Chinese medicine decoction pieces is basically judged by experts according to knowledge and experience or through picture comparison. People in the post epidemic age have high enthusiasm for preventing the traditional Chinese medicine health diseases, but most people are not professionals in the aspect, the resolution capability of traditional Chinese medicine decoction pieces is limited, the traditional Chinese medicine is of a plurality of types, the market is not completely standard, and a plurality of relevant people in charge of purchasing cannot completely and accurately identify the traditional Chinese medicine.
Today with advanced computer technology, deep learning and a large amount of data are combined, and category identification of Chinese medicinal decoction pieces can be easily realized by deployment in small programs, APP, websites and the like. The recognition of the traditional Chinese medicine decoction pieces can improve the cognitive ability of people on traditional Chinese medicine materials, broaden the knowledge in the aspect of health maintenance, so that the physical health condition is known better, and in short, the life quality of people can be improved. Meanwhile, the development of traditional Chinese medicine and modern computer technology is promoted, and the traditional Chinese medicine preparation method is inherited and innovated in traditional Chinese medicine and has very important significance for promoting the modernization of traditional Chinese medicine.
In the prior art, for example, the Chinese patent number is: CN105891172a, "a detection and identification method for different species and confusing traditional Chinese medicine materials or traditional Chinese medicine decoction pieces", comprising: ultraviolet rays are applied to detection of traditional Chinese medicinal materials, and ultraviolet rays are utilized to irradiate the cross section, powder, slice, solution extract or thin layer chromatography of the traditional Chinese medicinal materials or the traditional Chinese medicinal decoction pieces to develop the separated matters, so that the aim of identifying the true or false of the traditional Chinese medicinal materials or the traditional Chinese medicinal decoction pieces with different species and easily confused true or false of the traditional Chinese medicinal materials or the traditional Chinese medicinal decoction pieces is achieved through color change and color characteristics of fluorescence produced by irradiation.
However, in the prior art, the recognition of traditional Chinese medicinal materials is mostly realized by a physical/chemical characteristic extraction method, so that a pretreatment method is complicated, and excessive factors influencing the recognition accuracy in the treatment process lead to limited recognition rate, and due to the fact that traditional Chinese medicinal material data sources are lack, uneven, and complex in actual scene, the recognition of the traditional Chinese medicinal materials based on computer vision is less, uncertainty is caused, false detection rate is increased, and life safety of people is endangered.
Therefore, we propose a Chinese medicinal material class identification method based on deep learning so as to solve the problems set forth in the above.
Disclosure of Invention
The invention aims to provide a traditional Chinese medicine category identification method based on deep learning, which aims to solve the problems that the traditional Chinese medicine category identification is mostly realized through a physical/chemical characteristic extraction method, the pretreatment method is complex, the identification accuracy is influenced due to excessive factors in the treatment process, the identification rate is limited, and the traditional Chinese medicine category identification based on computer vision is less in development due to the fact that traditional Chinese medicine data resources are lack, uneven and complex in reality, and has uncertainty, increased false detection rate and harm to the life safety of people.
In order to achieve the above purpose, the present invention provides the following technical solutions: the Chinese medicinal material class identification method based on deep learning comprises two parts of establishing a learning model and identifying Chinese medicinal material decoction pieces, wherein the establishing of the learning model comprises the following steps of:
S10, classifying the Chinese medicinal decoction pieces: the functional classification method is adopted to mark the types of Chinese medicinal materials, and the analogy of different groups of action positions according to the intensity of the action among the similar medicaments is utilized according to the commonality of the same type of medicaments in aspects of medicament property, compatibility and contraindication.
S11, collecting a data set: performing multi-thread crawling on hundred-degree pictures on Scrapy frames by using a Python crawler, shooting and collecting traditional Chinese medicine data by using a high-definition camera in an off-line trade market, and annotating the collected traditional Chinese medicine data with labels according to the types of the traditional Chinese medicine in the step S10;
s12, preprocessing a data set: removing repeated data in RGB image data of the traditional Chinese medicinal materials according to the types of the traditional Chinese medicinal materials, dividing the data into a training set, a verification set and a test set according to the ratio of 6:2:2, carrying out data enhancement, and establishing a sample tag array by adopting a 2D one-hot coding tag;
s13, model training: selecting AlexNet, googLeNet, squeezeNet as a basic structure, initializing model parameters by using parameters obtained by training on an ImageNet dataset by using AlexNet, squeezeNet, googLeNet, and then performing fine tuning training;
the identification of the traditional Chinese medicinal decoction pieces comprises the following steps of:
S20, preparing a detection sample;
s21, acquiring and sorting a detection sample image;
S22, introducing the detection sample image obtained in the step S22 into the convolutional neural network model for convolutional processing.
Preferably, in step S10, the Chinese medicinal materials include exterior syndrome relieving medicine, heat clearing medicine, purgative medicine, wind dampness eliminating medicine, aromatic dampness eliminating medicine, diuresis promoting and dampness eliminating medicine, interior syndrome warming medicine, qi regulating medicine, digestion promoting medicine, insect repellent medicine, hemostatic medicine, blood activating medicine, phlegm eliminating and cough and asthma relieving medicine,
The drugs for tranquillizing, calming liver wind, inducing resuscitation, tonifying and astringing are 19 kinds of drugs for inducing vomiting.
Preferably, in step S12, the data enhancement is to randomly rotate the image of the Chinese medicinal material by 30 °, randomly translate the image of the Chinese medicinal material by 20% in the horizontal direction and the vertical direction, randomly shift the image by 0.2 in the shear-shift strength, set the amplitude of random scaling of the image to 0.2, and adjust all the images of the Chinese medicinal material to 150×150 pixels after the image is randomly and horizontally flipped.
Preferably, in step S13, the model training includes the steps of:
S130, sub-training set division based on Bagging method;
S131, training according to a characteristic fusion network training mode by utilizing each sub training set to obtain a plurality of weak classifiers;
S132, integrating each weak classifier into a strong classifier.
Preferably, in step S20, the step of preparing the detection sample includes sweeping fine dust on the surface of the decoction pieces of the traditional Chinese medicine with a brush, and fixing the decoction pieces of the traditional Chinese medicine on a glass slide with a vinyl acetate emulsion.
Preferably, in step S21, the acquiring the image of the detection sample and sorting include the following:
S220, adjusting the distance between the traditional Chinese medicine decoction pieces in the step S20 to the edge by using an electronic eyepiece;
S221, gradually adjusting the focal length towards the center and continuously shooting and collecting until the whole image is shot;
and S222, deleting the redundant image after unifying the resolution of the image acquired in the step S221 to 28×28 pixels.
Preferably, in step S22, the following steps are included:
s220, performing image fusion on the acquired image and a convolutional neural network;
S221, processing the image processed in the step S220 through ZCA whitening;
S222, extracting features by using a transducer;
S223, identifying through a Softmax classifier.
Preferably, in step S220, the degree of focusing of the image is determined by performing the detection of the rubber mat based on the convolutional neural network model, the obtained focus is converted into a binary image by determining a threshold, and the image is fused by a weighted average method after the binary image is obtained by taking out the small region and optimizing the mean filter of the guided filter.
Compared with the prior art, the invention has the beneficial effects that:
According to the invention, after the data set is enhanced by utilizing a web crawler and an offline acquisition mode, an identification data model is built by a convolutional neural network, a sample is processed before the traditional Chinese medicine decoction piece is identified and is continuously acquired, the acquired image is fused with the image based on the convolutional neural network by utilizing homomorphic filtering, the image is processed by ZCA whitening, then the characteristics are extracted by using a transducer, the image characteristics are imported into the convolutional neural network model for characteristic comparison, so that the types of sample traditional Chinese medicine are rapidly acquired, the factor quantity affecting the identification accuracy in the processing process is greatly discharged, the identification rate is improved, theoretical support can be provided for the research of a traditional Chinese medicine rapid identification method, and the method has a very profound significance for the modernization of the important traditional Chinese medicine.
Drawings
FIG. 1 is a flow chart of a method for identifying Chinese medicinal materials based on deep learning;
FIG. 2 is a Scrapy crawling flow chart of a Chinese medicinal material class identification method based on deep learning;
FIG. 3 is a schematic diagram of a standard neural network of a Chinese medicinal material class identification method based on deep learning.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-3, the present invention provides a technical solution: a Chinese medicinal material class identification method based on deep learning. Among them, convolutional neural network is a feedforward neural network, which includes convolutional calculation and has a deep structure, and thus is one of representative algorithms for deep learning. Along with the continuous progress of technology, people are inspired to create a neural network when researching human brain tissues. The neural network consists of a plurality of interrelated neurons, and can enhance or inhibit signals among different neurons by adjusting and transmitting weight coefficients x interrelated with each other.
Wherein, the establishment of the learning model comprises the following steps:
1. classification of traditional Chinese medicine decoction pieces: the types of Chinese medicinal materials are various and complex, the total number of the Chinese medicinal materials is about 8000 according to the statistics results of relevant practitioners in recent years, and 700 Chinese medicinal materials commonly used by people in daily life are also used. For better learning, researching and applying the traditional Chinese medicine materials.
Marking the types of Chinese medicinal materials by adopting a functional classification method, and according to the commonality of the same type of medicines in aspects of medicine property, compatibility and contraindication, utilizing the different grouping analogy of the action positions according to the intensity of the action among the similar medicines; the Chinese medicinal materials include 19 kinds of drugs for relieving exterior syndrome, clearing heat, purging, dispelling pathogenic wind and dampness, eliminating dampness, promoting diuresis and removing dampness, warming interior, regulating qi, resolving food stagnation, expelling parasite, stopping bleeding, promoting blood circulation, eliminating phlegm and relieving cough and asthma, tranquilizing, suppressing hyperactive liver and calming endogenous wind, inducing resuscitation, invigorating, and inducing astringents.
2. Collecting a data set: because the traditional Chinese medicinal materials are special medicinal materials in China, no open source traditional Chinese medicinal material data set exists on the network at present, the project uses a Python crawler to carry out multi-thread crawling on hundred-degree pictures on a Scrapy frame. Scrapy has the crawler framework with powerful functions, high crawling efficiency, more relevant expansion components, and strong configurable and expandable degree.
The method is based on a twist asynchronous processing frame, is a crawler frame realized by pure Python, has clear framework and low module coupling degree, can flexibly finish various requirements, and in short, scrapy is an application frame written for crawling website data and extracting the data, and a Scrapy crawling flow is shown in figure 2. And simultaneously, shooting and collecting traditional Chinese medicine data by using a high-definition camera in the downlink trading market, and annotating the collected traditional Chinese medicine data with labels according to the types of the traditional Chinese medicine.
3. Preprocessing a data set: removing repeated data in RGB image data of traditional Chinese medicinal materials according to the types of the traditional Chinese medicinal materials, dividing the data into a training set, a verification set and a test set according to the ratio of 6:2:2, performing data enhancement, and establishing a sample tag array by adopting a 2D one-hot coding tag; the data enhancement is to randomly rotate the Chinese medicinal material images by 30 degrees, randomly translate the Chinese medicinal material images by 20% in the horizontal direction and the vertical direction, set the random shear-shift strength to be 0.2, set the random scaling amplitude of the images to be 0.2, and adjust all the Chinese medicinal material images to 150×150 pixels after the images are randomly and horizontally turned.
4. Model training: a standard convolutional neural network is typically composed of an input layer, a convolutional layer, a pooling layer, a fully-connected layer, and an output layer, as shown in fig. 3. The first layer is an input layer with the size of 28x28, then the result obtained by the convolution layer with the size of 20x2424 is input into the pooling layer, and finally the result is output through the fourth layer of the full connection layer in the figure.
Using AlexNet, googLeNet, squeezeNet as a basic structure, using parameters obtained by training on an ImageNet dataset by using AlexNet, squeezeNet, googLeNet to initialize model parameters, and performing fine tuning training, wherein the fine tuning training content is specifically as follows: firstly, modifying the output node of a Softmax classifier in AlexNet, squeezeNet and GoogLeNet networks to be 98, initializing the parameters of the three networks by using parameters obtained by image Net training, and then fine-tuning AlexNet, squeezeNet and GoogLeNet networks by using Chinese medicinal material data to train a model with better effect. The network structure is then adjusted, and the underlying features are fused with the higher-level features by adding BN and feature connection layers (concatlayer), the modified network being referred to as AlexNet-fusion, squeezeNet-fusion, googLeNet-fusion. Finally, the network parameters obtained through training in the step 1) are assigned to the parameters AlexNet-fusion, squeezeNet-fusion, googLeNet-fusion, and then fine tuning is continued on the traditional Chinese medicine data set with a smaller learning rate.
The model training comprises the following steps:
1) Sub-training set division based on Bagging method;
2) Training to obtain a plurality of weak classifiers according to a characteristic fusion network training mode by utilizing each sub training set;
3) Each weak classifier is integrated into a strong classifier.
The identification of the Chinese medicinal decoction pieces comprises the following steps:
1. And (3) sample detection and tabletting: the preparation of the detection sample comprises the steps of sweeping fine dust on the surfaces of the traditional Chinese medicine decoction pieces by using a brush, and fixing the traditional Chinese medicine decoction pieces on a glass slide by using vinyl acetate emulsion.
2. Acquiring and sorting images of detection samples: firstly, adjusting the distance between the traditional Chinese medicine decoction pieces to the edge by using an electronic eyepiece, then gradually adjusting the focal length towards the center, continuously shooting and collecting until the whole image is shot, and finally deleting redundant images after the resolution of the collected image is unified to be 28 multiplied by 28 pixels.
3. And importing the obtained detection sample image into a convolutional neural network model for convolutional processing. The method comprises the following steps:
1) Image fusion is carried out on the acquired image and the convolutional neural network; and judging the focusing degree of the image by detecting the rubber mat based on the convolutional neural network model, converting the obtained focus into a binary drawing by determining a threshold value, and fusing the image by a weighted average method after taking out a small area and guiding and filtering to optimize the binary drawing of the mean filter.
2) The image is processed by ZCA whitening.
3) Features were extracted using a transducer, CNN and transducer. CNN is a hierarchical data representation, and a high-level feature representation depends on a low-level feature representation, so that features with higher-level semantic information are extracted stepwise from shallow depths. In addition, CNN also has certain translational invariance and translational invariance. The transducer can build a global dependency. The feature extraction of the transfomer enables better exploitation of large amounts of data, which is demonstrated on Natural Language (NLP) tasks, over large data sets, the transfomer exceeds the best classification network of the CNN structure.
4) Identification was performed by Softmax classifier.
Although the present invention has been described with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described, or equivalents may be substituted for elements thereof, and any modifications, equivalents, improvements and changes may be made without departing from the spirit and principles of the present invention.
Claims (7)
1. The Chinese medicinal material class identification method based on deep learning is characterized by comprising two parts of establishing a learning model and identifying Chinese medicinal material decoction pieces, wherein the establishing of the learning model comprises the following steps of:
S11, classifying the Chinese medicinal decoction pieces: marking the types of Chinese medicinal materials by adopting a functional classification method, and according to the commonality of the same type of medicines in aspects of medicine property, compatibility and contraindication, utilizing the different grouping analogy of the action positions according to the intensity of the action among the similar medicines;
s11, collecting a data set: performing multi-thread crawling on hundred-degree pictures on Scrapy frames by using a Python crawler, shooting and collecting traditional Chinese medicine data by using a high-definition camera in an off-line trade market, and annotating the collected traditional Chinese medicine data with labels according to the types of the traditional Chinese medicine in the step S10;
s12, preprocessing a data set: removing repeated data in RGB image data of the traditional Chinese medicinal materials according to the types of the traditional Chinese medicinal materials, dividing the data into a training set, a verification set and a test set according to the ratio of 6:2:2, carrying out data enhancement, and establishing a sample tag array by adopting a 2D one-hot coding tag;
S13, model training: the standard convolutional neural network consists of an input layer, a convolutional layer, a pooling layer, a full-connection layer and an output layer, wherein the first layer is the input layer with the size of 28x28, then the result is input into the pooling layer through the convolutional layer with the size of 20x2424, and the result is output through the full-connection layer in the fourth layer in the figure until the result is output finally;
Selecting AlexNet, googLeNet, squeezeNet as a basic structure, initializing model parameters by using parameters obtained by training on an ImageNet dataset by using AlexNet, squeezeNet, googLeNet, and then performing fine tuning training;
The content of the fine tuning training is specifically as follows: firstly, modifying the output node of a Softmax classifier in AlexNet, squeezeNet and GoogLeNet networks to be 98, initializing the parameters of the three networks by using parameters obtained by image Net training, and then fine-tuning AlexNet, squeezeNet and GoogLeNet networks by using Chinese medicinal material data to train a model with better effect;
Then, the network structure is adjusted, and the bottom layer features and the high layer features are fused by adding a BN layer and a feature connection layer (concatlayer), and the modified network is called AlexNet-fusion, squeezeNet-fusion, googLeNet-fusion;
Finally, assigning values to the network parameters obtained by training for AlexNet-fusion, squeezeNet-fusion, googLeNet-fusion, and then continuously fine-tuning on the traditional Chinese medicine data set with a smaller learning rate;
the identification of the traditional Chinese medicinal decoction pieces comprises the following steps of:
S20, preparing a detection sample;
s21, acquiring and sorting a detection sample image;
s22, introducing the detection sample image obtained in the step S21 into a convolutional neural network model for convolutional processing; the method comprises the following specific steps:
s220, performing image fusion on the acquired image and a convolutional neural network; determining the focusing degree of an image by detecting a rubber mat based on a convolutional neural network model, converting an obtained focus into a binary drawing by determining a threshold value, and fusing the image by a weighted average method after taking out a small area and guiding a filtering optimized mean filter binary drawing;
s221, processing the image through ZCA whitening;
S222, extracting a characteristic CNN and a transducer by utilizing the transducer, wherein the CNN is a layered data representation mode, and the transducer is used for establishing a global dependence;
S223, identifying through a Softmax classifier.
2. The method for identifying Chinese medicinal materials based on deep learning according to claim 1, wherein in step S10, the Chinese medicinal materials include 19 kinds of drugs selected from the group consisting of exterior-releasing drugs, heat-clearing drugs, purgative drugs, wind-damp dispelling drugs, aromatic damp-resolving drugs, diuresis-inducing and damp-excreting drugs, interior-warming drugs, qi-regulating drugs, digestion-promoting drugs, insect-expelling drugs, hemostatic drugs, blood-activating drugs, phlegm-resolving and cough-relieving and asthma-relieving drugs, tranquilizer, liver-calming and wind-extinguishing drugs, resuscitation-inducing drugs, tonic drugs, astringents and antiemetics.
3. The method for identifying Chinese medicinal materials based on deep learning according to claim 1, wherein in step S12, the data enhancement is to randomly rotate the Chinese medicinal material image by 30 °, randomly translate the Chinese medicinal material image by 20% in the horizontal direction and the vertical direction, randomly shift the Chinese medicinal material image by 0.2, randomly scale the Chinese medicinal material image by 0.2, and adjust all Chinese medicinal material images to 150×150 pixels after randomly horizontally turning the Chinese medicinal material image.
4. The deep learning-based recognition method of Chinese medicinal materials according to claim 1, wherein in step S13, the model training comprises the steps of:
S130, sub-training set division based on Bagging method;
S131, training according to a characteristic fusion network training mode by utilizing each sub training set to obtain a plurality of weak classifiers;
S132, integrating each weak classifier into a strong classifier.
5. The method for identifying Chinese medicinal materials based on deep learning according to claim 1, wherein in step S20, the detection sample is prepared by sweeping fine dust on the surface of the Chinese medicinal material decoction pieces with a brush, and the Chinese medicinal material decoction pieces are fixed on a glass slide with a vinyl acetate emulsion.
6. The method for identifying Chinese medicinal materials based on deep learning according to claim 5, wherein in step S21, the acquiring and sorting the detected sample image comprises the following steps:
S210, adjusting the distance between the traditional Chinese medicine decoction pieces in the step S20 to the edge by using an electronic eyepiece;
S211, gradually adjusting the focal length towards the center and continuously shooting and collecting until the whole image is shot;
and S212, deleting the redundant image after unifying the resolution of the image acquired in the step S211 to be 28 multiplied by 28 pixels.
7. The method for identifying Chinese medicinal materials based on deep learning according to claim 1, wherein in step S220, the degree of focusing of the image is determined by performing the detection of the rubber mat based on the convolutional neural network model, the obtained focus is converted into a binary image by determining a threshold, and the image is fused by a weighted average method after the binary image is obtained by taking out a small region and optimizing the binary image by a mean filter of guided filtering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210412607.5A CN114998639B (en) | 2022-04-19 | 2022-04-19 | Deep learning-based traditional Chinese medicine category identification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210412607.5A CN114998639B (en) | 2022-04-19 | 2022-04-19 | Deep learning-based traditional Chinese medicine category identification method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114998639A CN114998639A (en) | 2022-09-02 |
CN114998639B true CN114998639B (en) | 2024-04-26 |
Family
ID=83025847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210412607.5A Active CN114998639B (en) | 2022-04-19 | 2022-04-19 | Deep learning-based traditional Chinese medicine category identification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114998639B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117011612A (en) * | 2023-08-16 | 2023-11-07 | 海南省新超豪信息技术有限公司 | AI identification method for traditional Chinese medicinal materials |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107958257A (en) * | 2017-10-11 | 2018-04-24 | 华南理工大学 | A kind of Chinese traditional medicinal materials recognition method based on deep neural network |
CN109190643A (en) * | 2018-09-14 | 2019-01-11 | 华东交通大学 | Based on the recognition methods of convolutional neural networks Chinese medicine and electronic equipment |
CN109615010A (en) * | 2018-12-13 | 2019-04-12 | 济南大学 | Chinese traditional medicinal materials recognition method and system based on double scale convolutional neural networks |
CN111598126A (en) * | 2020-04-08 | 2020-08-28 | 天津大学 | Lightweight traditional Chinese medicinal material identification method |
CN113159044A (en) * | 2021-04-01 | 2021-07-23 | 中国公路工程咨询集团有限公司 | Deep learning-based road material identification method for convolutional neural network |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
NZ759804A (en) * | 2017-10-16 | 2022-04-29 | Illumina Inc | Deep learning-based techniques for training deep convolutional neural networks |
US20220068501A1 (en) * | 2020-09-01 | 2022-03-03 | Autonomous Healthcare, Inc. | System and method for tracking sensitive medications |
-
2022
- 2022-04-19 CN CN202210412607.5A patent/CN114998639B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107958257A (en) * | 2017-10-11 | 2018-04-24 | 华南理工大学 | A kind of Chinese traditional medicinal materials recognition method based on deep neural network |
CN109190643A (en) * | 2018-09-14 | 2019-01-11 | 华东交通大学 | Based on the recognition methods of convolutional neural networks Chinese medicine and electronic equipment |
CN109615010A (en) * | 2018-12-13 | 2019-04-12 | 济南大学 | Chinese traditional medicinal materials recognition method and system based on double scale convolutional neural networks |
CN111598126A (en) * | 2020-04-08 | 2020-08-28 | 天津大学 | Lightweight traditional Chinese medicinal material identification method |
CN113159044A (en) * | 2021-04-01 | 2021-07-23 | 中国公路工程咨询集团有限公司 | Deep learning-based road material identification method for convolutional neural network |
Non-Patent Citations (2)
Title |
---|
基于数据增强的卷积神经网络火灾识别;吴雪;宋晓茹;高嵩;陈超波;;科学技术与工程;20200128(03);全文 * |
基于深度卷积神经网络的储粮害虫图像识别;程曦;吴云志;张友华;乐毅;;中国农学通报;20180103(01);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114998639A (en) | 2022-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zhang et al. | Video saliency prediction based on spatial-temporal two-stream network | |
Li et al. | Image processing strategies based on saliency segmentation for object recognition under simulated prosthetic vision | |
CN108776774A (en) | A kind of human facial expression recognition method based on complexity categorization of perception algorithm | |
CN108595602A (en) | The question sentence file classification method combined with depth model based on shallow Model | |
CN106599800A (en) | Face micro-expression recognition method based on deep learning | |
CN108830818A (en) | A kind of quick multi-focus image fusing method | |
CN106779064A (en) | Deep neural network self-training method based on data characteristics | |
CN1700238A (en) | Method for dividing human body skin area from color digital images and video graphs | |
CN114998639B (en) | Deep learning-based traditional Chinese medicine category identification method | |
CN108921092A (en) | A kind of melanoma classification method based on convolutional neural networks model Two-level ensemble | |
Fan et al. | Image shadow removal using end-to-end deep convolutional neural networks | |
WO2023115682A1 (en) | Hyperspectral traditional chinese medicine identification method based on adaptive random block convolutional kernel network | |
CN106874929A (en) | A kind of pearl sorting technique based on deep learning | |
CN109446985A (en) | Multi-angle plants identification method based on vector neural network | |
CN108229571A (en) | Apple surface lesion image-recognizing method based on KPCA algorithms Yu depth belief network | |
CN114287878A (en) | Diabetic retinopathy focus image identification method based on attention model | |
CN112861994A (en) | Intelligent gastric ring cell cancer image classification system based on Unet migration learning | |
Dhalla et al. | Semantic segmentation of palpebral conjunctiva using predefined deep neural architectures for anemia detection | |
Vanaja et al. | Hand Gesture Recognition for Deaf and Dumb Using CNN Technique | |
Montalbo et al. | Classification of stenography using convolutional neural networks and canny edge detection algorithm | |
CN112233017A (en) | Sick face data enhancement method based on generation countermeasure network | |
Xia et al. | Retinal vessel segmentation via a coarse-to-fine convolutional neural network | |
CN110084796B (en) | Analysis method of complex texture CT image | |
CN115760810B (en) | Medical image segmentation apparatus, method and computer-readable storage medium | |
CN116840931A (en) | Infusion soft bag lamp inspection method based on hyperspectral imaging technology |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |