Disclosure of Invention
In order to solve the technical problems that tongue diagnosis is time-consuming and labor-consuming and errors are easy to occur in manual tongue diagnosis, the invention provides a traditional Chinese medicine tongue image intelligent identification method and system based on medical image segmentation, and the specific technical scheme is as follows:
the invention provides a traditional Chinese medicine tongue image intelligent identification and treatment method based on medical image segmentation, which comprises the following steps:
Acquiring tongue images of a patient;
Extracting tongue body characteristics in the tongue body image, wherein the tongue body characteristics comprise tongue shape characteristic values, tongue fur color characteristic values and tongue body state characteristic values;
calculating the weight of each physique type corresponding to the tongue body characteristics by combining with a preset tongue diagnosis and differentiation model;
Calculating the weight of each viscera syndrome differentiation corresponding to the tongue body characteristics by combining the tongue diagnosis syndrome differentiation model;
and determining the constitution type and viscera syndrome differentiation of the patient according to the weight of each constitution type and the weight of each viscera syndrome differentiation.
According to the traditional Chinese medicine tongue image intelligent diagnosis and treatment method based on medical image segmentation, the tongue body image of a patient is subjected to feature extraction, the constitution type and viscera dialectical of the patient are automatically judged according to the tongue shape, tongue fur color and tongue quality state of the patient and the preset tongue diagnosis and treatment dialectical model, the condition of the patient is accurately distinguished and analyzed by combining a neural network model in the tongue diagnosis process, the influence of human errors on diagnosis results is avoided, and the intelligence and the accuracy of the tongue diagnosis process are improved.
In some embodiments, before the step of acquiring the tongue image of the patient, the method further comprises:
The constitution type, viscera syndrome differentiation and tongue body images of a plurality of patients are collected in advance;
Constructing a tongue image knowledge graph according to the constitution type, viscera syndrome differentiation and tongue body image corresponding to each patient;
And inputting the tongue image knowledge graph into a graph neural network model for training to obtain the tongue diagnosis and differentiation model.
According to the intelligent traditional Chinese medicine tongue image identifying and treating method based on medical image segmentation, the tongue image knowledge graph is established, the feature vector is extracted from the knowledge graph through the graph neural network, so that low latitude representation information of traditional Chinese medicine constitution identifying results such as constitution type, viscera syndrome differentiation and the like is constructed, graph expression relations among constitution type, viscera syndrome differentiation and tongue body images are extracted through a deep learning algorithm of the graph neural network, the effect of the traditional Chinese medicine constitution identifying results such as patient constitution type, viscera syndrome differentiation and the like is further determined, and the intellectualization, convenience and accuracy of tongue diagnosis process are improved.
In some embodiments, after the pre-collecting the constitution types, the viscera dialectical and the tongue images of the patients, before the inputting the tongue image knowledge graph into the graph neural network model to train to obtain the tongue diagnosis dialectical model, the method further comprises:
dividing a first tongue region image in the tongue image by adopting an image dividing algorithm;
Denoising the first tongue region image to obtain a second tongue region image;
Image segmentation is carried out on the second tongue region image through an edge detection algorithm to obtain a third tongue region image;
And constructing a tongue image knowledge graph according to the constitution type, viscera syndrome differentiation and the third tongue region image corresponding to each patient.
According to the intelligent traditional Chinese medicine tongue image identification method based on medical image segmentation, the tongue body image is preprocessed through the image segmentation algorithm, the denoising treatment and the edge detection algorithm, so that the processed tongue body region image is more characterized, and the identification speed and the identification accuracy of the identification process of the physique type and viscera identification of the patient according to the tongue body image are improved.
In some embodiments, the extracting the tongue feature in the tongue image specifically includes:
image segmentation is carried out on the tongue body image to obtain a tongue shape image, a tongue fur image and a tongue body image;
generating the tongue shape characteristic value, the tongue coating color characteristic value and the tongue state characteristic value according to the tongue shape image, the tongue coating image and the tongue image respectively;
and combining the tongue shape characteristic value, the tongue fur color characteristic value and the tongue state characteristic value to generate a multidimensional tongue characteristic vector serving as the tongue characteristic.
According to the traditional Chinese medicine tongue image intelligent identification method based on medical image segmentation, the tongue shape characteristic value, the tongue coating color characteristic value and the tongue state characteristic value are extracted respectively, and the tongue shape characteristic value, the tongue coating color characteristic value and the tongue state characteristic value are combined to generate the multidimensional tongue body characteristic vector which is used as the tongue body characteristic, so that the technical effect of judging the physique of a patient according to the multidimensional characteristics such as the tongue shape, the tongue coating color, the tongue state of the patient and the like is achieved.
In some embodiments, after determining the constitution type and the viscera syndrome differentiation of the patient according to the weight of each constitution type and the weight of each viscera syndrome differentiation, the method further comprises:
Constructing a symptom corresponding relation knowledge map in advance according to the tongue characteristics, symptom information and preset symptoms corresponding to each patient;
Receiving the symptom information of the patient;
and determining the symptoms of the patient according to the tongue features, the symptom information and the symptom correspondence knowledge graph.
The intelligent diagnosis and treatment method for the traditional Chinese medicine tongue image based on the medical image segmentation can intelligently judge the symptoms of the patient according to the symptom information, tongue body characteristics and physique types of the patient, evaluate the physical condition of the user at multiple angles, comprehensively analyze the symptoms of the patient by combining the symptom information and tongue body images of the patient, and improve the accuracy of judging the symptoms of the patient.
In some embodiments, after said determining the patient's symptoms, further comprising:
Judging whether the confidence coefficient of the symptom is larger than a preset confidence coefficient threshold value or not;
Judging that the symptom is suspected symptom when the confidence coefficient of the symptom is not more than the confidence coefficient threshold value;
outputting diagnostic questions corresponding to the suspected symptoms according to a preset question-answer database, wherein the corresponding relation between each suspected symptom and a plurality of diagnostic questions is preset in the question-answer database;
And receiving a question and answer result input by the patient, and determining the actual symptoms of the patient according to the question and answer result.
After judging the symptoms of the patient, the intelligent tongue image distinguishing and treating method based on the medical image provided by the invention outputs the diagnosis problem corresponding to the symptoms with the confidence degree not larger than the confidence degree threshold, determines the actual symptoms according to the question and answer result of the patient, dynamically adjusts the deviation of the diagnosis result of the symptoms according to the body condition fed back by the user, and improves the accuracy and the reliability of the intelligent tongue image distinguishing and treating method based on the medical image.
In some embodiments, after determining the actual symptom of the patient based on the question and answer result, the method further comprises:
Outputting medication advice, diet advice and exercise advice of the patient according to a preset diagnosis advice model, the physique type, the viscera syndrome differentiation and the actual symptoms, wherein the diagnosis advice model is generated by deep learning based on the physique type, the viscera syndrome differentiation, the actual symptoms, the medication advice, the diet advice and the exercise advice of a plurality of patients acquired in advance.
The intelligent tongue image distinguishing and treating method based on the medical image segmentation for traditional Chinese medicine provided by the invention can generate medication advice, diet advice and exercise advice of a patient in the intelligent tongue diagnosis process, perform deep learning according to the historical tongue diagnosis result, intelligently generate treatment schemes such as the medication advice, the diet advice and the exercise advice of the patient, and improve the intelligence and the accuracy of generating the treatment scheme according to the tongue diagnosis result of the patient.
In some embodiments, according to another aspect of the present invention, the present invention further provides a system for intelligent diagnosis and treatment of tongue images of traditional Chinese medicine based on medical image segmentation, including:
The acquisition module is used for acquiring tongue images of the patient;
The extracting module is connected with the acquiring module and used for extracting tongue body characteristics in the tongue body image, wherein the tongue body characteristics comprise tongue shape characteristic values, tongue fur color characteristic values and tongue body state characteristic values;
The first calculation module is connected with the extraction module and is used for calculating the weight of each physique type corresponding to the tongue body characteristics by combining with a preset tongue diagnosis and differentiation model;
the second calculation module is connected with the extraction module and is used for calculating the weight of each viscera syndrome differentiation corresponding to the tongue body characteristics by combining the tongue diagnosis syndrome differentiation model;
The judging module is respectively connected with the first calculating module and the second calculating module and is used for determining the constitution type and viscera syndrome differentiation of the patient according to the weight of each constitution type and the viscera syndrome differentiation weight.
In some embodiments, according to another aspect of the present invention, there is further provided an intelligent device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, where the processor is configured to execute the computer program stored in the memory, and implement the operations performed by the above-described method for intelligent recognition and treatment of a tongue image of traditional Chinese medicine based on segmentation of a medical image.
In some embodiments, according to another aspect of the present invention, there is further provided a storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the operations performed by the above-described method for intelligent recognition and treatment of a tongue image of traditional Chinese medicine based on medical image segmentation.
The invention provides a traditional Chinese medicine tongue image intelligent identification method and system based on medical image segmentation, which at least comprise the following technical effects:
(1) The tongue body image of the patient is subjected to feature extraction, the physique type and viscera syndrome differentiation of the patient are automatically judged according to the tongue shape, tongue fur color, tongue quality state and a preset tongue diagnosis syndrome differentiation model of the patient, the condition of the patient is accurately distinguished and analyzed by combining a neural network model in the tongue diagnosis process, the influence of artificial errors on the diagnosis result is avoided, and the intelligence and the accuracy of the tongue diagnosis process are improved;
(2) The tongue image knowledge graph is established, and feature vectors are extracted from the knowledge graph through the graph neural network, so that low latitude representation information of the traditional Chinese medicine constitution identification results such as constitution type, viscera syndrome differentiation and the like is constructed, graph expression relations among constitution type, viscera syndrome differentiation and tongue body images are extracted through a deep learning algorithm of the graph neural network, the effect of the traditional Chinese medicine constitution identification results such as patient constitution type, viscera syndrome differentiation and the like is further determined, and the intellectualization, convenience and accuracy of tongue diagnosis process are improved;
(3) Preprocessing the tongue image through an image segmentation algorithm, denoising processing and an edge detection algorithm, so that the processed tongue region image is more characterized, and the recognition speed and recognition accuracy of the recognition process of the physique type and viscera syndrome differentiation of the patient according to the tongue image are improved;
(4) The tongue characteristic value, the tongue coating color characteristic value and the tongue state characteristic value are respectively extracted, and the tongue characteristic value, the tongue coating color characteristic value and the tongue state characteristic value are combined to generate a multi-dimensional tongue characteristic vector which is used as the tongue characteristic, so that the technical effect of judging the physique of a patient according to the multi-dimensional characteristics of the tongue shape, the tongue coating color, the tongue state and the like of the patient is realized;
(5) The method can intelligently judge the symptoms of the patient according to the symptom information, tongue characteristics and physique types of the patient, evaluate the physical condition of the user at multiple angles, comprehensively analyze the symptoms of the patient by combining the symptom information and tongue images of the patient, and improve the accuracy of judging the symptoms of the patient;
(6) After judging the symptoms of the patient, outputting a diagnosis problem corresponding to the symptoms with the confidence coefficient not greater than the confidence coefficient threshold, determining actual symptoms according to the question and answer results of the patient, and dynamically adjusting the deviation of the diagnosis results of the symptoms according to the body condition fed back by the user, thereby improving the accuracy and the reliability of the intelligent tongue image distinguishing and treating method of the traditional Chinese medicine based on the medical image segmentation;
(7) In the intelligent tongue diagnosis process, medication advice, diet advice and exercise advice of the patient are generated, deep learning is conducted according to the historical tongue diagnosis result, treatment schemes such as the medication advice, the diet advice and the exercise advice of the patient are intelligently generated, and the intelligence and the accuracy of the treatment scheme generated according to the tongue diagnosis result of the patient are improved.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
For the sake of simplicity of the drawing, the parts relevant to the present invention are shown only schematically in the figures, which do not represent the actual structure thereof as a product. Additionally, in order to facilitate a concise understanding of the drawings, components having the same structure or function in some of the drawings are depicted schematically only one of them, or only one of them is labeled. Herein, "a" means not only "only this one" but also "more than one" case.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In addition, in the description of the present application, the terms "first," "second," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will explain the specific embodiments of the present invention with reference to the accompanying drawings. It is evident that the drawings in the following description are only examples of the invention, from which other drawings and other embodiments can be obtained by a person skilled in the art without inventive effort.
The traditional tongue diagnosis tool can only analyze viscera relation of tongue response based on tongue image expression, but can not analyze the main symptoms of a patient and the expression and meaning of tongue images according to tongue image, and most doctors can not effectively analyze the disease formation of the patient and the change after treatment according to tongue images in the diagnosis and differentiation process of the patient due to the thought difference of different doctor groups, and the different tongue image feedback symptoms are different, so that the diagnosis and treatment are only carried out by relying on subjective consciousness, the more comprehensive diagnosis is lacking, and the condition of the patient can not be accurately distinguished and analyzed, so that the invention discloses the traditional Chinese medicine tongue image intelligent diagnosis and treatment method based on the medical image segmentation.
In one embodiment of the present invention, as shown in fig. 1, the present invention provides a method for intelligently identifying and treating tongue images of traditional Chinese medicine based on medical image segmentation, comprising the steps of:
S200, acquiring tongue images of a patient.
Specifically, in the process of acquiring the tongue image of the patient, the tongue image of the patient can be acquired in real time through the camera, the tongue image uploaded by the patient can be received, the display content of the tongue image does not need to only contain the tongue part, the tongue image can also comprise the oral cavity image, part of the facial image and the environment image of the patient, and the tongue image is required to comprise clear tongue characteristics of the patient, so that the tongue characteristics can be conveniently segmented according to the tongue image.
S300, extracting tongue features in the tongue image.
Specifically, the tongue body features include tongue shape feature values, tongue coating color feature values and tongue state feature values, and the tongue shape, tongue coating color and tongue state are identified by U2NET, where the tongue shape includes a normal tongue, an obese large tongue, a thin tongue, a skew tongue, a stiff tongue, a cracked tongue, and the like, the tongue coating color includes a pale tongue, a red tongue, a dark tongue, a pale tongue, a dark tongue, a ecchymosis tongue, or any tongue color band, ecchymosis, and the like, and the tongue state includes a thin, thick, no, slippery, dry, greasy, dry, rotten, or stripped tongue, and the like, and any of the tongue body features corresponds to one feature value, for example, the normal tongue feature value is T1001, the obese large tongue feature value is T1004, the pale tongue feature value is T2001, the red tongue feature value is T2003, the thin coating feature value is T3001, the thick coating feature value is T3002, and the like.
S400, calculating the weight of each physique type corresponding to the tongue body characteristics by combining with a preset tongue diagnosis and differentiation model.
Specifically, the tongue diagnosis and differentiation model is generated by performing deep learning training according to the physique type, viscera syndrome differentiation and tongue body characteristics of the patient in the historical diagnosis data, and after the tongue body characteristics such as tongue shape characteristic values, tongue fur color characteristic values and tongue state characteristic values are input into the tongue diagnosis and differentiation model, the tongue diagnosis and differentiation model generates corresponding weights of the viscera syndrome differentiation, qi and blood syndrome differentiation, body fluid syndrome differentiation, six-barrenness syndrome differentiation and other syndrome differentiation directions.
S500, calculating the weight of each viscera syndrome differentiation corresponding to the tongue body characteristics by combining the tongue diagnosis and syndrome differentiation model.
Specifically, after the tongue body characteristics such as the tongue shape characteristic value, the tongue fur color characteristic value and the tongue body state characteristic value are input into the tongue diagnosis and differentiation model, the tongue diagnosis and differentiation model generates the corresponding weights of all physique types such as qi deficiency, mild and yang deficiency.
S600, determining the constitution type and viscera syndrome differentiation of the patient according to the weight of each constitution type and the weight of each viscera syndrome differentiation.
Specifically, a constitution type weight threshold and a viscera syndrome differentiation weight threshold are preset, when the weight is greater than the constitution type weight threshold, the constitution type is judged to be the constitution type of the patient, when the weight is greater than the viscera syndrome differentiation weight threshold, the viscera syndrome differentiation is judged to be the viscera syndrome differentiation of the patient, the constitution type and the viscera syndrome differentiation of the patient can be multiple, for example, the patient can be qi deficiency type and yang deficiency plastid type simultaneously.
According to the traditional Chinese medicine tongue image intelligent diagnosis and treatment method based on medical image segmentation, the tongue body image of a patient is subjected to feature extraction, the physique type and viscera dialectical of the patient are automatically judged according to the tongue shape, tongue fur color and tongue state of the patient and the preset tongue diagnosis and treatment model, the condition of the patient is accurately distinguished and analyzed by combining a neural network model in the tongue diagnosis process, the influence of artificial errors on diagnosis results is avoided, and the intelligence and the accuracy of the tongue diagnosis process are improved.
In one embodiment, as shown in fig. 2, before the step S200 of acquiring the tongue image of the patient, the method further includes:
S110, the constitution type, viscera syndrome differentiation and tongue body images of a plurality of patients are collected in advance.
S120, constructing a tongue image knowledge graph according to the constitution type, viscera syndrome differentiation and tongue body image corresponding to each patient.
Specifically, a tongue image knowledge graph is established in advance through Allegrograph software, and the tongue image knowledge graph stores the corresponding relation among the physique type, viscera syndrome differentiation and tongue body image of each patient, for example, the physique type corresponding to the pale red tongue and thin white fur of the patient is mild, the physique type corresponding to the pale red tongue, the pale white tongue, the pale tooth trace tongue and the pale fat tongue of the patient is qi deficiency, and the physique type corresponding to the pale purple fat tongue, the pale fat tooth trace tongue and the pale white tongue Bao Runtai of the patient is yang deficiency.
S130, inputting the tongue image knowledge graph into a graph neural network model for training to obtain a tongue diagnosis and differentiation model.
According to the traditional Chinese medicine tongue image intelligent identification and treatment method based on medical image segmentation, the tongue image knowledge graph is established, the feature vector is extracted from the knowledge graph through the graph neural network, so that low latitude characterization information of traditional Chinese medicine constitution identification results such as constitution type and viscera syndrome differentiation is constructed, graph expression relations among constitution type, viscera syndrome differentiation and tongue body images are extracted through a deep learning algorithm of the graph neural network, the effect of the traditional Chinese medicine constitution identification results such as patient constitution type and viscera syndrome differentiation is further determined, and intelligence, convenience and accuracy of tongue diagnosis process are improved.
In one embodiment, as shown in fig. 3, before the step S200 of acquiring the tongue image of the patient, the method further includes:
S110, the constitution type, viscera syndrome differentiation and tongue body images of a plurality of patients are collected in advance.
S121, dividing a first tongue region image in the tongue image by adopting an image dividing algorithm.
Specifically, the tongue image is subjected to image segmentation by an OpenCV image segmentation algorithm.
S122, denoising the first tongue region image to obtain a second tongue region image.
Specifically, denoising pretreatment is performed through wavelet transformation technology to obtain a second tongue region image.
S123, performing image segmentation on the second tongue region image through an edge detection algorithm to obtain a third tongue region image.
S124, constructing a tongue image knowledge graph according to the constitution type, viscera syndrome differentiation and third tongue region image corresponding to each patient.
Specifically, the steps S121 to 124 may be used for preprocessing the tongue image of the patient in the tongue image knowledge graph generation process, or may be applied to processing such as segmentation and denoising of the tongue image to be detected after the tongue image of the patient is acquired in the step S200 and before the tongue features in the tongue image are extracted in the step S300.
S130, inputting the tongue image knowledge graph into a graph neural network model for training to obtain a tongue diagnosis and differentiation model.
According to the intelligent traditional Chinese medicine tongue image identification method based on medical image segmentation, the tongue body image is preprocessed through the image segmentation algorithm, the denoising treatment and the edge detection algorithm, so that the processed tongue body region image is more characterized, and the identification speed and the identification accuracy of the identification process of the physique type and viscera identification of the patient according to the tongue body image are improved.
In one embodiment, in the executing process of extracting the tongue features in the tongue image in step S300, after the tongue shape, tongue coating color and tongue state are identified by the U2NET, a tongue shape feature value, a tongue coating color feature value and a tongue state feature value may be generated according to the tongue shape image, the tongue coating image and the tongue state image, respectively, and the tongue shape feature value, the tongue coating color feature value and the tongue state feature value are combined to generate a multi-dimensional tongue feature vector as the tongue feature to be input to the tongue diagnosis and differentiation model.
In one embodiment, as shown in fig. 4, step S600 further includes, after determining the constitution type and the viscera syndrome differentiation of the patient according to the weight of each constitution type and the weight of each viscera syndrome differentiation:
s710, constructing a symptom corresponding relation knowledge graph in advance according to tongue features, symptom information and preset symptoms corresponding to each patient.
Specifically, the correspondence between tongue body characteristics, symptom information and physique types of the patient are stored in the knowledge graph of the correspondence, for example, when the tongue body characteristics of the patient are pale tongue or white fat tender tongue, and the symptom information such as listlessness, pale complexion, less qi and lazy speaking, cough and asthma without force, dynamic sweat, weak pulse and the like is accompanied, the symptom of the patient is judged to be qi deficiency; when the tongue body of the patient is characterized by pale tongue or dry tongue and is accompanied with symptom information such as pale complexion, pale lip, dizziness, palpitation, insomnia, pale menstruation, delayed period or amenorrhea, thready and weak pulse, and the like, the symptom of the patient is judged to be blood deficiency.
S720 receives symptom information of the patient.
S730, determining the symptoms of the patient according to the tongue characteristics, the symptom information and the symptom correspondence knowledge graph.
The traditional Chinese medicine tongue image intelligent diagnosis and treatment method based on medical image segmentation provided by the embodiment can intelligently judge the symptoms of the patient according to the symptom information, tongue body characteristics and physique types of the patient, evaluate the physical condition of the user at multiple angles, comprehensively analyze the symptoms of the patient by combining the symptom information and tongue body images of the patient, and improve the accuracy of judging the symptoms of the patient.
In one embodiment, as shown in fig. 5, step S730 further includes, after determining the symptom of the patient according to the tongue feature, symptom information, the physique type of the patient, and the knowledge graph of the symptom correspondence relationship:
s810, judging whether the confidence coefficient of the symptom is larger than a preset confidence coefficient threshold value.
S820, judging the symptom as suspected symptom when the confidence coefficient of the symptom is not larger than the confidence coefficient threshold value.
Specifically, when the confidence level of the symptom is greater than the confidence level threshold, the symptom is judged as an actual symptom.
Illustratively, the confidence threshold is set to 95%, and when the confidence of the symptoms is lower than 95%, the confidence of the suspected symptoms is further determined by performing interactive questions and answers according to the question and answer database.
S830, outputting a diagnosis problem corresponding to the suspected symptom according to a preset question-answer database.
Specifically, the corresponding relation between each suspected symptom and a plurality of diagnosis questions is preset in the question-answer database.
S840 receives the question and answer result input by the patient and determines the actual symptoms of the patient based on the question and answer result.
For example, when the suspected symptoms of the patient are heart yin deficiency symptoms, whether the patient is palpitation, vexation, insomnia, dreaminess, dry mouth and throat, emaciation, flushing of cheeks or hot palms and soles, hot flushes and night sweats, red tongue with little coating and little body fluid, pulse thready and rapid and other diagnosis problems are set, and when the result of question and answer input by the user exceeds 80% of the questions and answers is yes, the heart yin deficiency symptoms are judged to be actual symptoms of the patient.
According to the intelligent diagnosis and treatment method for the traditional Chinese medicine tongue image based on the medical image segmentation, after the patient symptoms are judged, the diagnosis problem corresponding to the symptoms with the confidence coefficient not larger than the confidence coefficient threshold is output, the actual symptoms are determined according to the question and answer results of the patient, deviation of the diagnosis results of the symptoms is dynamically adjusted according to the body condition fed back by the user, and the accuracy and the reliability of the intelligent diagnosis and treatment method for the traditional Chinese medicine tongue image based on the medical image segmentation are improved.
In one embodiment, as shown in fig. 6, step S840 further includes, after receiving the question and answer result input by the patient and determining the actual symptom of the patient according to the question and answer result:
s900, outputting medication advice, diet advice and exercise advice of the patient according to a preset diagnosis advice model, constitution type, viscera syndrome differentiation and actual symptoms.
Specifically, the diagnosis advice model is generated by deep learning based on the constitution type, viscera syndrome differentiation, actual symptoms, medication advice, diet advice and exercise advice of a plurality of patients acquired in advance.
The traditional Chinese medicine tongue image intelligent identification and treatment method based on medical image segmentation provided by the embodiment can generate medication advice, diet advice and exercise advice of a patient in the intelligent tongue diagnosis process, perform deep learning according to the historical tongue diagnosis result, intelligently generate treatment schemes such as the medication advice, the diet advice and the exercise advice of the patient, and improve the intelligence and the accuracy of generating the treatment scheme according to the tongue diagnosis result of the patient.
In one embodiment, according to another aspect of the present invention, as shown in fig. 7, the present invention further provides a traditional Chinese medicine tongue image intelligent diagnosis and treatment system based on medical image segmentation, which includes an acquisition module 10, an extraction module 20, a first calculation module 30, a second calculation module 40 and a judgment module 50.
Wherein the acquisition module 10 is used for acquiring tongue images of a patient.
Specifically, in the process of acquiring the tongue image of the patient, the tongue image of the patient can be acquired in real time through the camera, the tongue image uploaded by the patient can be received, the display content of the tongue image does not need to only contain the tongue part, the tongue image can also comprise the oral cavity image, part of the facial image and the environment image of the patient, and the tongue image is required to comprise clear tongue characteristics of the patient, so that the tongue characteristics can be conveniently segmented according to the tongue image.
The extraction module 20 is connected to the acquisition module 10, and is used for extracting tongue features in tongue images.
Specifically, the tongue body features include tongue shape feature values, tongue coating color feature values and tongue state feature values, and the tongue shape, tongue coating color and tongue state are identified by U2NET, where the tongue shape includes a normal tongue, an obese large tongue, a thin tongue, a skew tongue, a stiff tongue, a cracked tongue, and the like, the tongue coating color includes a pale tongue, a red tongue, a dark tongue, a pale tongue, a dark tongue, a ecchymosis tongue, or any tongue color band, ecchymosis, and the like, and the tongue state includes a thin, thick, no, slippery, dry, greasy, dry, rotten, or stripped tongue, and the like, and any of the tongue body features corresponds to one feature value, for example, the normal tongue feature value is T1001, the obese large tongue feature value is T1004, the pale tongue feature value is T2001, the red tongue feature value is T2003, the thin coating feature value is T3001, the thick coating feature value is T3002, and the like.
The first calculating module 30 is connected to the extracting module 20, and is configured to calculate weights of various physique types corresponding to tongue features in combination with a preset tongue diagnosis and differentiation model.
Specifically, the tongue diagnosis and differentiation model is generated by performing deep learning training according to the physique type, viscera syndrome differentiation and tongue body characteristics of the patient in the historical diagnosis data, and after the tongue body characteristics such as tongue shape characteristic values, tongue fur color characteristic values and tongue state characteristic values are input into the tongue diagnosis and differentiation model, the tongue diagnosis and differentiation model generates corresponding weights of the viscera syndrome differentiation, qi and blood syndrome differentiation, body fluid syndrome differentiation, six-barrenness syndrome differentiation and other syndrome differentiation directions.
The second calculating module 40 is connected to the extracting module 20, and is used for calculating the weight of each viscera syndrome differentiation corresponding to the tongue body characteristics by combining with the tongue diagnosis syndrome differentiation model.
Specifically, after the tongue body characteristics such as the tongue shape characteristic value, the tongue fur color characteristic value and the tongue body state characteristic value are input into the tongue diagnosis and differentiation model, the tongue diagnosis and differentiation model generates the corresponding weights of all physique types such as qi deficiency, mild and yang deficiency.
The judging module 50 is connected to the first calculating module 30 and the second calculating module 40, respectively, and is configured to determine the constitution type and the viscera syndrome differentiation of the patient according to the weight of each constitution type and the weight of each viscera syndrome differentiation.
Specifically, a constitution type weight threshold and a viscera syndrome differentiation weight threshold are preset, when the weight is greater than the constitution type weight threshold, the constitution type is judged to be the constitution type of the patient, when the weight is greater than the viscera syndrome differentiation weight threshold, the viscera syndrome differentiation is judged to be the viscera syndrome differentiation of the patient, the constitution type and the viscera syndrome differentiation of the patient can be multiple, for example, the patient can be qi deficiency type and yang deficiency plastid type simultaneously.
According to the traditional Chinese medicine tongue image intelligent diagnosis and treatment system based on medical image segmentation, the tongue body image of a patient is subjected to feature extraction, the physique type and viscera syndrome differentiation of the patient are automatically judged according to the tongue shape, tongue fur color and tongue state of the patient and the preset tongue diagnosis and treatment model, the condition of the patient is accurately distinguished and analyzed by combining a neural network model in the tongue diagnosis process, the influence of artificial errors on diagnosis results is avoided, and the intelligence and the accuracy of the tongue diagnosis process are improved.
In one embodiment, as shown in fig. 8, the present invention further provides a smart device 100, including a processor 110, a memory 120, where the memory 120 is used to store a computer program 121; the processor 110 is configured to execute the computer program 121 stored in the memory 120, and implement the method for intelligent recognition and treatment of tongue images of traditional Chinese medicine based on medical image segmentation in the above-mentioned corresponding method embodiment.
In one embodiment, the present invention further provides a storage medium, where at least one instruction is stored, where the instruction is loaded and executed by the processor to implement the operations performed in the embodiment of the method for intelligent recognition of a tongue image in traditional Chinese medicine based on medical image segmentation, where the storage medium may be, for example, read-only memory (ROM), random-access memory (RAM), compact disc read-only (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the parts of a certain embodiment that are not described or depicted in detail may be referred to in the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed method and system for intelligent recognition and treatment of tongue images in traditional Chinese medicine based on medical image segmentation may be implemented in other ways. For example, the above-described embodiments of the method and system for intelligent recognition and treatment of tongue images in traditional Chinese medicine based on medical image segmentation are merely illustrative, for example, the division of the modules or units is merely a logic function division, and other division manners may be implemented in practice, for example, multiple units or modules may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the communications links shown or discussed may be through some interface, device or unit communications link or integrated circuit, whether electrical, mechanical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
It should be noted that the foregoing is only a preferred embodiment of the present invention, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.