Digestive system disease early warning method and device based on tongue picture, equipment and medium
By preprocessing and model training on the tongue image data, a tongue image disease warning model is generated, which solves the problem of insufficient speed and accuracy of tongue image diagnosis warning in the prior art, and achieves a fast and accurate Chinese medicine tongue image diagnosis warning.
Patent Information
- Application Number
- CN202411925780.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-27
AI Technical Summary
It is difficult to quickly and accurately diagnose and warning the tongue icon of traditional Chinese medicine in the existing technology. There are differences in doctor experience, environmental differences and schedule problems in offline medical treatment, which is difficult to meet the needs of rapid warning.
By obtaining tongue image data and corresponding digestive disease data, image preprocessing and segmentation processing are performed, the image data set to be trained, the model is trained and evaluation is performed, and a tongue image disease early warning model is generated, which is used to perform digestive system disease early warning analysis.
It realizes the rapid and accurate diagnosis and warning of tongue images in traditional Chinese medicine, improves the warning speed and accuracy, and meets the needs of rapid response.
Smart Images

Figure CN120048505A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of disease early warning, and in particular to a method, device, equipment and medium for early warning of digestive system diseases based on tongue images. Background Art
[0002] With the increasing trend of multidisciplinary integration, the intelligentization and modernization of traditional Chinese medicine is the only way forward. How to bring the advantages of traditional Chinese medicine into daily diagnosis and treatment is an important key. Among them, the tongue image of traditional Chinese medicine is a means of objectively reflecting the condition and understanding the development and changes of the condition. It can be used as a basis for judging the rise and fall of evil and righteousness, distinguishing the nature of evil, identifying the depth of the disease, and inferring the prognosis of the disease. Therefore, the tongue image of traditional Chinese medicine is most closely related to digestive system diseases, and thus has a good early warning effect.
[0003] The current diagnostic method for the connection between Chinese and Italian tongue images and digestive system diseases is mostly offline medical treatment. However, due to different doctors' experience, differences in patients' environments and scheduling of medical treatment, it is difficult to quickly diagnose patients' tongue images through offline medical treatment, and it is difficult to meet the needs of disease warning based on tongue images. There is an urgent need for a technical means to quickly and accurately perform Chinese medicine tongue image diagnosis and warning. Summary of the invention
[0004] In order to quickly and accurately perform TCM tongue diagnosis and early warning, the present application provides a digestive system disease early warning method, device, equipment and medium based on tongue image.
[0005] In the first aspect, the present application provides a digestive system disease early warning method based on tongue image, which adopts the following technical solution:
[0006] A digestive system disease early warning method based on tongue image, comprising:
[0007] Acquire tongue image data and digestive disease data corresponding to the tongue image data;
[0008] Performing image preprocessing on the tongue image data to generate first image data;
[0009] Segmenting the first image data to generate an image data set to be trained;
[0010] Acquire a model to be trained, and perform training processing on the model to be trained based on the image data set to be trained and the digestive disease data to generate a model to be evaluated;
[0011] Evaluate and select the model to be evaluated based on preset evaluation indicators to generate a tongue disease early warning model;
[0012] Digestive system disease early warning analysis is performed based on the tongue disease early warning model.
[0013] By adopting the above technical scheme, the tongue image data of existing patients and the digestive disease data corresponding to the tongue image data are collected, and all the tongue image data are preprocessed to obtain the first image data without interference. Then, the first image data is segmented to obtain the to-be-trained image data set that can be used to train the to-be-trained model. The to-be-trained model is trained and processed using the to-be-trained image data set and the corresponding digestive disease data to obtain the to-be-evaluated model. At this time, the model can also perform tongue image diagnosis and early warning, but the precision and accuracy cannot fully meet the required effect. Then, the to-be-evaluated model is evaluated and selected, and the to-be-evaluated model with the highest precision and accuracy is taken as the tongue image disease early warning model. The tongue image disease early warning model is used for early warning analysis. The tongue image disease early warning model is trained and evaluated and selected through a large amount of data, and the early warning speed and accuracy have been greatly improved, thereby realizing fast and accurate Chinese medicine tongue image diagnosis and early warning.
[0014] Optionally, the performing image preprocessing on the tongue image data to generate first image data includes:
[0015] Acquire image quality information and image quality requirements of the tongue image data;
[0016] Determining whether the tongue image data needs quality adjustment based on the image quality requirement and the image quality information;
[0017] If the tongue image data needs quality adjustment, performing a first preprocessing on the tongue image data to generate a quality processed image;
[0018] Obtain training identification requirement information;
[0019] Performing key extraction processing on the quality-processed image based on the training recognition requirement information to generate first image data;
[0020] If the tongue image data does not require quality adjustment, obtaining training recognition requirement information;
[0021] Based on the training recognition requirement information, key extraction processing is performed on the tongue image data to generate first image data.
[0022] Optionally, the segmenting the first image data to generate a to-be-trained image data set includes:
[0023] Performing uniform size adjustment on the first picture data to generate adjusted picture data;
[0024] Get cutting dimension standards;
[0025] Segmenting the adjusted image data based on the cutting dimension standard to generate a cut image;
[0026] Local feature annotation is performed on the cut images to generate a data set of images to be trained.
[0027] Optionally, the training process of the model to be trained based on the image data set to be trained and the digestive disease data to generate the model to be evaluated includes:
[0028] Combing and binding the image data set to be trained and the digestive disease data to generate related information;
[0029] Get tongue classification information;
[0030] Based on the tongue image classification information, a full connection is added on top of the model to be trained to perform tongue image classification, so as to generate a target model to be trained;
[0031] The target model to be trained is trained based on the training image data, the digestive disease data and the associated information to generate a model to be evaluated.
[0032] Optionally, the step of evaluating and selecting the model to be evaluated based on preset evaluation indicators to generate a tongue disease early warning model includes:
[0033] Obtaining a diagram to be tested, inputting the diagram to be tested into the model to be evaluated, and generating a test warning result;
[0034] Evaluate the test warning result based on the preset evaluation index to generate a warning evaluation result;
[0035] Based on the early warning evaluation results, the model to be evaluated is evaluated and selected to generate a tongue disease early warning model.
[0036] Optionally, the digestive system disease early warning analysis based on the tongue disease early warning model includes:
[0037] In response to a warning analysis instruction of a user, acquiring a target warning type and a target analysis image of the user;
[0038] Determining a target tongue disease warning model based on the target warning type;
[0039] Performing image preprocessing on the target analysis image to determine the key areas of the image;
[0040] Based on the target tongue image warning model and the key image area, a warning analysis is performed on the target analysis image to generate a digestive system disease warning analysis result.
[0041] Optionally, after generating the digestive system disease early warning analysis result, the method further includes:
[0042] Obtain disease warning level rules;
[0043] Performing a grade analysis on the digestive system disease early warning analysis result based on the disease early warning grade rule to generate a disease early warning grade;
[0044] Digestive system disease warning is performed based on the disease warning level.
[0045] In the second aspect, the present application provides a digestive system disease early warning device based on tongue image, which adopts the following technical solution:
[0046] A digestive system disease early warning device based on tongue image, comprising:
[0047] A tongue image data acquisition module, used to acquire tongue image data and digestive disease data corresponding to the tongue image data;
[0048] A first data generating module, used for performing image preprocessing on the tongue image data to generate first image data;
[0049] A training data set generation module, used for segmenting the first image data to generate a training image data set;
[0050] A model acquisition module to be trained, used to acquire the model to be trained, perform training processing on the model to be trained based on the image data set to be trained and the digestive disease data, and generate a model to be evaluated;
[0051] An early warning model generation module is used to evaluate and select the model to be evaluated based on preset evaluation indicators to generate a tongue disease early warning model;
[0052] The disease prediction and analysis module is used to perform early warning analysis of digestive system diseases based on the tongue disease early warning model.
[0053] By adopting the above technical scheme, the tongue image data of existing patients and the digestive disease data corresponding to the tongue image data are collected, and all the tongue image data are preprocessed to obtain the first image data without interference. Then, the first image data is segmented to obtain the to-be-trained image data set that can be used to train the to-be-trained model. The to-be-trained model is trained and processed using the to-be-trained image data set and the corresponding digestive disease data to obtain the to-be-evaluated model. At this time, the model can also perform tongue image diagnosis and early warning, but the precision and accuracy cannot fully meet the required effect. Then, the to-be-evaluated model is evaluated and selected, and the to-be-evaluated model with the highest precision and accuracy is taken as the tongue image disease early warning model. The tongue image disease early warning model is used for early warning analysis. The tongue image disease early warning model is trained and evaluated and selected through a large amount of data, and the early warning speed and accuracy have been greatly improved, thereby realizing fast and accurate Chinese medicine tongue image diagnosis and early warning.
[0054] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:
[0055] An electronic device comprises a processor, wherein the processor is coupled to a memory;
[0056] The processor is used to execute the computer program stored in the memory, so that the electronic device executes the computer program of the digestive system disease early warning method based on tongue image as described in any one of the first aspects.
[0057] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0058] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute the digestive system disease early warning method based on tongue image as described in any one of the first aspects.
[0059] In summary, this application includes the following beneficial technical effects:
[0060] The tongue image data of existing patients and the digestive disease data corresponding to the tongue image data are collected, and all the tongue image data are preprocessed to obtain the first image data without interference. The first image data is then segmented to obtain the to-be-trained image data set that can be used to train the to-be-trained model. The to-be-trained model is trained and processed using the to-be-trained image data set and the corresponding digestive disease data to obtain the to-be-evaluated model. At this time, the model can also perform tongue image diagnosis and early warning, but the precision and accuracy cannot fully meet the required effects. The to-be-evaluated model is then evaluated and selected, and the to-be-evaluated model with the highest precision and accuracy is taken as the tongue image disease early warning model. The tongue image disease early warning model is used for early warning analysis. The tongue image disease early warning model is trained and evaluated and selected through a large amount of data, and the early warning speed and accuracy have been greatly improved, thereby realizing fast and accurate Chinese medicine tongue image diagnosis and early warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of a digestive system disease early warning method based on tongue image provided in an embodiment of the present application.
[0062] Figure 2 It is a structural block diagram of a digestive system disease early warning device based on tongue image provided in an embodiment of the present application.
[0063] Figure 3 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The present application is further described in detail below in conjunction with the accompanying drawings.
[0065] The embodiment of the present application provides a digestive system disease early warning method based on tongue image, which can be executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a desktop computer, etc., but is not limited thereto.
[0066] Figure 1 A flowchart of a digestive system disease early warning method based on tongue image provided in an embodiment of the present application.
[0067] like Figure 1 As shown, the main process of the method is described as follows (steps S101 to S106):
[0068] Step S101, obtaining tongue image data and digestive disease data corresponding to the tongue image data.
[0069] In this embodiment, the tongue image data is image data containing a complete tongue, and the digestive disease data is digestive disease diagnosis result data. Both the tongue image data and the digestive disease data are accurate data that have been verified by tests, that is, the digestive disease data is an existing diagnosis result with pathological results. For example, the digestive disease data is gastroscopy detection data, and the detection result is gastric polyp. Then the tongue image of the patient is collected to obtain the tongue image data. It can also be that the doctor diagnoses the patient based on the tongue image data and believes that there is a risk of gastric polyp. After the examination, it is determined that the patient has gastric polyp, and the tongue image data and digestive disease data of the patient are recorded and used. Similarly, it is also necessary to set the tongue image data in a normal state. When the tongue image data is in a normal state, the digestive disease data is no disease. It should be noted that the tongue image data and the digestive disease data need to include tongue images of all situations and their corresponding digestive disease situations. The specific contents of the tongue image data and the digestive disease data are not specifically limited here.
[0070] Step S102, performing image preprocessing on the tongue image data to generate first image data.
[0071] For step S102, obtain the picture quality information and image quality requirements of the tongue image data; determine whether the tongue image data needs quality adjustment based on the image quality requirements and the picture quality information; if the tongue image data needs quality adjustment, perform a first preprocessing on the tongue image data to generate a quality processed picture; obtain training recognition requirement information; perform key extraction processing on the quality processed picture based on the training recognition requirement information to generate first picture data; if the tongue image data does not need quality adjustment, obtain training recognition requirement information; perform key extraction processing on the tongue image data based on the training recognition requirement information to generate first picture data.
[0072] In this embodiment, in order to improve the training accuracy of the model and the accuracy of the generated model, it is necessary to perform image preprocessing on the tongue image data to eliminate interference information in the image. First, when collecting tongue image images, the environment and equipment for collection have been standardized, but it is still impossible to ensure that the captured images completely meet the image quality requirements. It is necessary to extract quality information of the tongue image data to obtain image quality information, compare the image quality information with the image quality requirements, and check whether the image quality information meets the image quality requirements, that is, to determine whether the tongue image data needs quality adjustment. When the image quality information does not meet the image quality requirements, it is determined that the tongue image data needs quality adjustment. According to the image quality requirements, the tongue image data is first preprocessed, that is, the image quality of the tongue image data meets the image quality requirements. The tongue image data after the first preprocessing is used as the quality processed image, and then the quality processed image is key extracted according to the training recognition requirement information to obtain the first image data. When the image quality information meets the image quality requirements, it is determined that the tongue image data does not need quality adjustment. According to the training recognition requirement information, the tongue image data is key extracted to obtain the first image data.
[0073] When performing key extraction processing on the quality-processed image according to the training recognition requirement information, the preset model is used to identify and locate the tongue in the corresponding quality-processed image. After successful identification and positioning, the tongue is segmented and processed, and a picture of only the tongue part is output. The picture of only the tongue part is processed with uniform resolution to obtain the first picture data. The same processing method is used for the tongue picture data, that is, when performing key extraction processing on the tongue picture data according to the training recognition requirement information, the preset model is used to identify and locate the tongue in the corresponding quality-processed image. After successful identification and positioning, the tongue is segmented and processed, and a picture of only the tongue part is output to obtain the first picture data. It should be noted that the preset model can adopt a segmentation model (Segment Anything Model, SAM), and the specific preset model needs to be set according to actual needs, and is not specifically limited here.
[0074] Step S103, segmenting the first image data to generate an image data set to be trained.
[0075] For step S103, the first image data is resized uniformly to generate adjusted image data; a cutting dimension standard is obtained; the adjusted image data is segmented based on the cutting dimension standard to generate a cut image; and local features of the cut image are annotated to generate a data set of images to be trained.
[0076] In this embodiment, the resolution of only the local tongue image is unified. The resolution of the quality processed image and the tongue image data before being input into the preset model is about 5568*3712 pixels. The resolution of the first image data after segmentation and size uniformity adjustment by the preset model is about 755*674 pixels. The first image data table that has been size uniformly adjusted is used as the adjustment image data. Thereafter, the adjustment image data is segmented according to the cutting dimension standard to obtain a cut image. In order to clarify the specific position information of each part of the cut image, the cut image is locally feature labeled. The local feature labeling can be numerically labeled in a certain order, such as the first image in the upper left corner is labeled as 1, and then labeled in sequence according to a serpentine arrangement. It can also be directly labeled as upper left, upper middle, upper right, etc. It is sufficient to determine the corresponding cut image based on the labeled local feature data. The corresponding cut images of all the first image data are summed up to obtain the image data set to be trained.
[0077] Step S104, obtaining a model to be trained, training the model to be trained based on the image data set to be trained and the digestive disease data, and generating a model to be evaluated.
[0078] For step S104, the image data set to be trained and the digestive disease data are sorted and bound to generate related information; the tongue image classification information is obtained; based on the tongue image classification information, a full connection is added to the top of the model to be trained to perform tongue image classification and generate a target model to be trained; based on the training image data, digestive disease data and related information, the target model to be trained is trained to generate a model to be evaluated.
[0079] In this embodiment, after the above series of processing, the model to be trained is trained. During the training process, the cut images in the image data set to be trained need to be sorted and bound with the corresponding digestive disease data again, so that the cut images and the digestive disease data accurately correspond to each other, and the associated information is generated. When performing tongue image analysis, it is necessary to obtain the digestive system disease warning analysis results through the input tongue image, and the digestive system warning analysis results are mainly described in text and need to identify the specific disease type. Therefore, when training the model to be trained, a fully connected layer is added to the top of the model to be trained for tongue image classification to generate a target model to be trained. Then, the target model to be trained is trained through the training image data, digestive disease data and associated information to generate a model to be evaluated, wherein the model to be trained includes a residual network (Residual Network Network, ResNet) and ViT (Vision Transformer) represent the traditional convolutional neural network and the latest visual model based on the attention mechanism, specifically ResNet-18, ResNet-50, ViT-base and ViT-large. During training, the Resnet series network is generally trained for 5-10 rounds, and the Vit network is generally trained for 50-70 rounds. The training is stopped when the loss value does not decrease. The tongue image classification includes the negative and positive discrimination of diseases such as gastric polyps, intestinal polyps, early gastric / intestinal cancer or gastric / intestinal cancer. The classification is based on the reference endoscopic results and pathology. Since different types of tongue images correspond to different tongue image diseases, multiple models to be trained are set for training to obtain multiple models to be evaluated that can be selected, so as to select from the models to be evaluated, so that the accuracy of each warning model used in the early warning analysis is the highest, thereby improving the accuracy of disease warning.
[0080] Step S105, evaluating and selecting the model to be evaluated based on the preset evaluation index, and generating a tongue disease early warning model.
[0081] For step S105, obtain the diagram to be tested, input the diagram to be tested into the model to be evaluated, and generate a test warning result; evaluate the test warning result based on the preset evaluation index to generate a warning evaluation result; evaluate and select the model to be evaluated based on the warning evaluation result to generate a tongue disease warning model.
[0082] In this embodiment, according to the above-mentioned tongue image classification, each tongue image classification corresponds to four models to be evaluated. When making an evaluation selection, it is necessary to select a model that best suits the tongue image classification from the four models to be evaluated corresponding to each tongue image classification, and use the selected model to be evaluated as a tongue image disease warning model.
[0083] When selecting a tongue disease warning model, the examples to be tested are obtained for each tongue image classification. When the examples to be tested corresponding to the tongue image classification are obtained, the examples to be tested are input into the model to be evaluated. The model to be evaluated analyzes and processes the examples to be tested to generate a test warning result. The four test warning results generated by the four models to be evaluated are evaluated using preset evaluation indicators to generate four warning evaluation results. The model to be evaluated with the highest score or the most accurate score is selected from the four warning evaluation results as the tongue disease warning model. It should be noted that the preset evaluation indicators are indicator data set according to the warning requirements. The specific indicator data content needs to be set according to actual needs and is not specifically limited here.
[0084] Step S106, performing digestive system disease warning analysis based on the tongue disease warning model.
[0085] For step S106, in response to the user's warning analysis instruction, the user's target warning type and target analysis image are obtained; the target tongue disease warning model is determined based on the target warning type; the target analysis image is preprocessed to determine the key areas of the image; based on the target tongue warning model and the key areas of the image, a warning analysis is performed on the target analysis image to generate a digestive system disease warning analysis result.
[0086] In this embodiment, after obtaining the user's warning analysis instruction, the warning analysis instruction is analyzed and processed to obtain the target warning type and the target analysis image. According to the target warning type, matching and selection are performed among the seven tongue image disease warning models obtained above to obtain a tongue image disease warning model that matches the target warning type. The obtained tongue image disease warning model is used as the target tongue image disease warning model. Thereafter, the target analysis image is subjected to image preprocessing to determine the key areas of the image. The specific preprocessing method is the same as the processing method mentioned above when generating the first image data. Thereafter, the target tongue image warning model is used to perform warning analysis on the key areas of the image to obtain the warning analysis results of digestive system diseases.
[0087] In this embodiment, disease warning level rules are obtained; based on the disease warning level rules, the digestive system disease warning analysis results are graded and analyzed to generate disease warning levels; and digestive system disease warnings are performed based on the disease warning levels.
[0088] The disease warning level rules are evaluation rules set according to the actual pathological conditions of digestive system diseases. Different pathological conditions correspond to different warning levels. The digestive system disease warning analysis results obtained are matched with the disease warning level rules to obtain the disease warning level of the digestive system disease warning analysis results. The obtained disease warning level is sent to the patient's mobile terminal, and then the patient is warned of digestive system diseases.
[0089] Figure 2 A structural block diagram of a digestive system disease early warning device 200 based on tongue image provided in an embodiment of the application.
[0090] like Figure 2 As shown, the digestive system disease early warning device 200 based on tongue image mainly includes:
[0091] The tongue image data acquisition module 201 is used to acquire tongue image data and digestive disease data corresponding to the tongue image data;
[0092] The first data generating module 202 is used to perform image preprocessing on the tongue image data to generate first image data;
[0093] The module 203 for generating a data set to be trained is used to segment the first image data to generate a data set of images to be trained;
[0094] The model to be trained acquisition module 204 is used to acquire the model to be trained, perform training processing on the model to be trained based on the image data set to be trained and the digestive disease data to generate a model to be evaluated;
[0095] The early warning model generation module 205 is used to evaluate and select the model to be evaluated based on the preset evaluation index, and generate a tongue disease early warning model;
[0096] The disease prediction analysis module 206 is used to perform early warning analysis of digestive system diseases based on the tongue disease early warning model.
[0097] As an optional implementation manner of this embodiment, the first data generation module 202 is specifically used to obtain image quality information and image quality requirements of tongue image data; determine whether the tongue image data needs quality adjustment based on the image quality requirements and image quality information; if the tongue image data needs quality adjustment, perform a first preprocessing on the tongue image data to generate a quality processed image; obtain training recognition requirement information; perform key extraction processing on the quality processed image based on the training recognition requirement information to generate first image data; if the tongue image data does not need quality adjustment, obtain training recognition requirement information; perform key extraction processing on the tongue image data based on the training recognition requirement information to generate first image data.
[0098] As an optional implementation of this embodiment, the training data set generation module 203 is specifically used to uniformly adjust the size of the first image data to generate adjusted image data; obtain a cutting dimension standard; segment the adjusted image data based on the cutting dimension standard to generate a cut image; and perform local feature annotation on the cut image to generate a training image data set.
[0099] As an optional implementation of this embodiment, the model to be trained acquisition module 204 is specifically used to sort out and bind the image data set to be trained and the digestive disease data to generate related information; obtain tongue image classification information; add full connection on the top of the model to be trained based on the tongue image classification information to perform tongue image classification and generate a target model to be trained; train the target model to be trained based on the training image data, digestive disease data and related information to generate a model to be evaluated.
[0100] As an optional implementation of this embodiment, the early warning model generation module 205 is specifically used to obtain the legend to be tested, input the legend to be tested into the model to be evaluated, and generate a test early warning result; evaluate the test early warning result based on preset evaluation indicators to generate an early warning evaluation result; evaluate and select the model to be evaluated based on the early warning evaluation result to generate a tongue disease early warning model.
[0101] As an optional implementation of this embodiment, the disease prediction analysis module 206 is specifically used to respond to the user's warning analysis instructions, obtain the user's target warning type and target analysis image; determine the target tongue disease warning model based on the target warning type; perform image preprocessing on the target analysis image to determine the key areas of the image; perform warning analysis on the target analysis image based on the target tongue warning model and the key areas of the image, and generate a digestive system disease warning analysis result.
[0102] As an optional implementation of this embodiment, the digestive system disease early warning device 200 based on tongue image further includes:
[0103] A level rule acquisition module is used to obtain disease warning level rules;
[0104] An early warning level generation module is used to perform level analysis on the early warning analysis results of digestive system diseases based on the disease early warning level rules to generate a disease early warning level;
[0105] The systemic disease warning module is used to warn of digestive system diseases based on the disease warning level.
[0106] In one example, the module in any of the above devices can be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms.
[0107] For another example, when the modules in the device can be implemented in the form of a processing element scheduling program, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] Figure 3 This is a structural block diagram of an electronic device 300 provided in an embodiment of the present application.
[0110] like Figure 3 As shown, the electronic device 300 includes a processor 301 and a memory 302 , and may further include an information input / information output (I / O) interface 303 , one or more of a communication component 304 , and a communication bus 305 .
[0111] The processor 301 is used to control the overall operation of the electronic device 300 to complete all or part of the steps of the above-mentioned digestive system disease early warning method based on tongue image; the memory 302 is used to store various types of data to support the operation of the electronic device 300, and these data may include, for example, instructions for any application or method operated on the electronic device 300, and data related to the application. The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only Memory, PROM), read-only memory (Read-Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0112] The I / O interface 303 provides an interface between the processor 301 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 304 is used for wired or wireless communication between the electronic device 300 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 104 can include: Wi-Fi components, Bluetooth components, NFC components.
[0113] The electronic device 300 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the digestive system disease early warning method based on tongue image pictures given in the above embodiment.
[0114] The communication bus 305 may include a path to transmit information between the above components. The communication bus 305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 305 may be divided into an address bus, a data bus, a control bus, etc.
[0115] The electronic device 300 may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., and may also be servers, etc.
[0116] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned digestive system disease early warning method based on tongue image are implemented.
[0117] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0118] The terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus.
[0119] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.
Claims
1. A digestive system disease early warning method based on tongue image, characterized in that: include: Acquire tongue image data and digestive disease data corresponding to the tongue image data; Performing image preprocessing on the tongue image data to generate first image data; Segmenting the first image data to generate an image data set to be trained; Acquire a model to be trained, and perform training processing on the model to be trained based on the image data set to be trained and the digestive disease data to generate a model to be evaluated; Evaluate and select the model to be evaluated based on preset evaluation indicators to generate a tongue disease early warning model; Digestive system disease early warning analysis is performed based on the tongue disease early warning model.
2. The method according to claim 1, characterized in that The performing image preprocessing on the tongue image data to generate first image data comprises: Acquire image quality information and image quality requirements of the tongue image data; Determining whether the tongue image data needs quality adjustment based on the image quality requirement and the image quality information; If the tongue image data needs quality adjustment, performing a first preprocessing on the tongue image data to generate a quality processed image; Obtain training identification requirement information; Performing key extraction processing on the quality-processed image based on the training recognition requirement information to generate first image data; If the tongue image data does not require quality adjustment, obtaining training recognition requirement information; Based on the training recognition requirement information, key extraction processing is performed on the tongue image data to generate first image data.
3. The method according to claim 1, characterized in that The segmenting of the first picture data to generate a picture data set to be trained includes: Performing uniform size adjustment on the first picture data to generate adjusted picture data; Get cutting dimension standards; Segmenting the adjusted image data based on the cutting dimension standard to generate a cut image; Local feature annotation is performed on the cut images to generate a data set of images to be trained.
4. The method according to claim 1, characterized in that: The training process of the model to be trained based on the image data set to be trained and the digestive disease data to generate the model to be evaluated includes: Combing and binding the image data set to be trained and the digestive disease data to generate related information; Get tongue classification information; Based on the tongue image classification information, a full connection is added on top of the model to be trained to perform tongue image classification, so as to generate a target model to be trained; The target model to be trained is trained based on the training image data, the digestive disease data and the associated information to generate a model to be evaluated.
5. The method according to claim 4, characterized in that The step of evaluating and selecting the model to be evaluated based on the preset evaluation index to generate a tongue disease early warning model comprises: Obtaining a diagram to be tested, inputting the diagram to be tested into the model to be evaluated, and generating a test warning result; Evaluate the test warning result based on the preset evaluation index to generate a warning evaluation result; Based on the early warning evaluation results, the model to be evaluated is evaluated and selected to generate a tongue disease early warning model.
6. The method according to claim 5, characterized in that The digestive system disease early warning analysis based on the tongue disease early warning model includes: In response to a warning analysis instruction of a user, acquiring a target warning type and a target analysis image of the user; Determining a target tongue disease warning model based on the target warning type; Performing image preprocessing on the target analysis image to determine the key areas of the image; Based on the target tongue image warning model and the key image area, a warning analysis is performed on the target analysis image to generate a digestive system disease warning analysis result.
7. The method according to claim 6, characterized in that After generating the digestive system disease early warning analysis result, the method further includes: Obtain disease warning level rules; Performing a grade analysis on the digestive system disease early warning analysis result based on the disease early warning grade rule to generate a disease early warning grade; Digestive system disease warning is performed based on the disease warning level.
8. A digestive system disease early warning device based on tongue image, characterized in that: include: A tongue image data acquisition module, used to acquire tongue image data and digestive disease data corresponding to the tongue image data; A first data generating module, used for performing image preprocessing on the tongue image data to generate first image data; A training data set generation module, used for segmenting the first image data to generate a training image data set; A model acquisition module to be trained, used to acquire the model to be trained, perform training processing on the model to be trained based on the image data set to be trained and the digestive disease data, and generate a model to be evaluated; An early warning model generation module is used to evaluate and select the model to be evaluated based on preset evaluation indicators to generate a tongue disease early warning model; The disease prediction and analysis module is used to perform early warning analysis of digestive system diseases based on the tongue disease early warning model.
9. An electronic device, characterized in that: comprising a processor coupled to a memory; The processor is configured to execute a computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The method comprises a computer program or an instruction, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.