Gastrointestinal tract endoscope image lesion identification method and system based on data playback
By using data playback and knowledge distillation methods in the gastrointestinal endoscopic image lesion recognition model, the model does not forget the old category when facing new lesion categories, and the recognition performance is stable, which solves the problem of existing models in the face of the new lesion categories. Problems of performance deterioration in new categories.
Patent Information
- Application Number
- CN202411011177.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-02-21
AI Technical Summary
The existing gastrointestinal endoscopic image lesion recognition model will deteriorate when facing new lesion categories, and it will not be able to effectively identify new categories without forgetting the old ones.
Using data playback method, old gastrointestinal lesion samples and new gastrointestinal lesion samples are retrieved for joint training, and old categories are learned from the old model through knowledge distillation to achieve the continuous learning of the model and the stability of the recognition ability. .
It is realized that when facing new lesion categories, the model does not forget the old categories, and the recognition performance is stable, and can continuously identify new categories and maintain the ability to identify old categories.
Smart Images

Figure CN119494812A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for recognizing gastrointestinal tract endoscope image lesions based on data playback. Background Art
[0002] Currently, gastrointestinal endoscopic screening is a commonly used diagnostic technique for related gastrointestinal diseases. However, endoscopic screening technology requires skilled endoscopists to study. It is reported that about 20% of polyps are missed in patients undergoing gastrointestinal endoscopy. However, if polyps are not treated, they may develop into cancer. In addition, the sensitivity of endoscopists with rich clinical experience in judging high-grade malignant tumors of esophageal squamous mucosa can reach about 100%, while the sensitivity of endoscopists with limited experience for esophageal squamous cell carcinoma is only about 69%.
[0003] More importantly, there is a serious shortage of physicians currently engaged in gastrointestinal endoscopy. According to statistics in 2015, endoscopists accounted for only about 1.06% of all physicians. That is, the number of endoscopists per million people in my country is less than one-tenth of that in developed countries such as Japan. Therefore, with the help of deep learning methods, doctors can effectively assist in the diagnosis of gastrointestinal diseases, help improve their diagnostic level, reduce their burden, and improve the efficiency of medical resource utilization.
[0004] In recent years, with the great success of convolutional neural networks in natural image applications, more and more computer-aided diagnosis systems based on convolutional neural networks have been proposed for medical diagnosis of medical images, and their performance is better than traditional methods. Currently, well-known medical applications include prostate cancer segmentation, skin lesion analysis, breast tumor segmentation, etc. Inspired by the successful application of convolutional neural network related methods in other medical images, some computer-aided diagnosis systems based on convolutional neural networks are also used in gastrointestinal lesion analysis. Combined with the analysis and calculation of deep learning, it assists in the discovery of gastrointestinal diseases, thereby improving the efficiency and accuracy of diagnosis and reducing the rate of missed diagnosis. Therefore, computer-aided diagnosis technology is often called the "third eye" of doctors. Computer-aided diagnosis technology based on deep learning can comprehensively integrate a large amount of authoritative knowledge and experience of human medical experts. Its diagnostic level can reach or even exceed that of human experts, and it is highly reliable and will not be affected by subjective factors such as fatigue, negligence, and tension.
[0005] At present, although a computer-aided diagnosis system for gastrointestinal lesions is implemented with the help of deep learning methods to help doctors make clinical diagnoses. In fact, the number of categories of gastrointestinal lesions diagnosed clinically is increasing. However, the trained model cannot obtain satisfactory results when applied to new lesion categories. This is because the deep learning model is trained with a data set of lesion categories pre-designed. When encountering new categories, the distribution of the data is inconsistent, which causes the performance of the model for new gastrointestinal lesion categories to deteriorate. Therefore, the present invention mainly enables the model to continuously identify new categories without forgetting the old categories, so that it can play a greater application value in clinical practice. Summary of the invention
[0006] One of the purposes of the present invention is to provide a method for identifying lesions in gastrointestinal endoscopic images based on data playback. Based on the data playback technology, old gastrointestinal lesion samples are retrieved, and a gastrointestinal endoscopic image lesion recognition model is jointly trained based on new gastrointestinal lesion samples and old gastrointestinal lesion samples. The gastrointestinal endoscopic image lesion recognition model after joint training can be applied to the identification of gastrointestinal endoscopic image lesions of new lesion categories, and the recognition performance is stable.
[0007] The method for recognizing lesions in gastrointestinal endoscopic images based on data playback provided by an embodiment of the present invention includes:
[0008] When the gastrointestinal endoscopic image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning, old gastrointestinal lesion samples are retrieved based on data playback technology;
[0009] Based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, jointly training a gastrointestinal endoscopic image lesion recognition model;
[0010] Based on the jointly trained gastrointestinal endoscopy image lesion recognition model, lesion recognition is performed on the gastrointestinal endoscopy image to be identified, and the recognition result is output.
[0011] Preferably, the step of obtaining the new gastrointestinal lesion sample comprises:
[0012] Acquire a large collection of endoscopic images of gastrointestinal lesions;
[0013] Preprocessing each endoscopic image of gastrointestinal lesions;
[0014] The pre-processed gastrointestinal lesion endoscopic images are integrated to obtain the new gastrointestinal lesion samples.
[0015] Preferably, the preprocessing of each gastrointestinal lesion endoscopic image includes:
[0016] Each gastrointestinal lesion endoscopic image is subjected to at least the following processing steps: compressed sensing, denoising, and uniform cropping to an image of 224×224 size.
[0017] Preferably, the compressed sensing algorithm is:
[0018] x c,i =Φx i ;
[0019] Among them, x c,i is the measured value, x i Endoscopic image of gastrointestinal lesions, φ is the measurement matrix.
[0020] Preferably, the retrieving old gastrointestinal lesion samples based on data playback technology includes:
[0021] Retrieve old gastrointestinal lesion samples from the data playback buffer.
[0022] Preferably, after jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes:
[0023] Assume that the number of old gastrointestinal lesion samples in the buffer is V, there are b categories of old gastrointestinal lesion samples, and the number of sub-data samples in each category is V / b;
[0024] Suppose a new C-class data sample in the new gastrointestinal lesion sample is X c ;X c ={x c,1 ,…,x c,n}; where x c,n It represents the nth sample data in the data sample of category C, and n is the total number of sample data in the data sample of category C;
[0025] Calculate the feature mean μ of the new class:
[0026]
[0027] In the formula, Output data obtained by inputting the nth sample data in the data sample of category C into the gastrointestinal endoscope image lesion recognition model;
[0028] Then find k samples so that the feature mean μ is equal to the mean closest; however, since the specified buffer has a certain amount of memory, it can only store V samples. When adding new classes, the buffer may not be able to store samples of all categories, so some samples of each old class need to be deleted; j = [1, 2,, ... k], represents the jth sample among k samples; It represents the eigenvalue of the jth sample; the sample is a gastrointestinal lesion image, and one gastrointestinal lesion image is one sample; there are many samples under each sample category; because the memory size of the buffer is fixed, when samples of a new sample category come in, it is necessary to delete the old category samples stored in the buffer to make room for storing new category samples;
[0029] Therefore, the characteristic mean μ and the mean are calculated The difference p k After that, p k After sorting from small to large, simply delete the last item so that each sample category has only V / b samples in the buffer. The calculation formula is as follows:
[0030]
[0031] P=(p1,...,p V / b ); The difference p k , P is the set of all sample differences;
[0032] Select the first V / b number of samples in the sample sequence and store them in the buffer.
[0033] Preferably, when the gastrointestinal endoscopic image lesion recognition model is jointly trained based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the loss function used is:
[0034]
[0035] Where L1 is the classification loss function of the new category, L2 is the distillation loss function of the old category, and both L1 and L2 are cross entropy functions; c is in X c ={x c,1 ,…,x c,n}, c represents a category c; D represents a data set, g y It represents the logit output of the gastrointestinal endoscopy image lesion recognition model. Logit refers to the output of the model before Softmax. yi It means x c,i .
[0036] Preferably, after jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes:
[0037] Based on the model performance indicators, the performance of the gastrointestinal endoscopy image lesion recognition model after joint training was quantified;
[0038] Based on the performance quantification results, the gastrointestinal endoscopy image lesion recognition model was optimized after joint training.
[0039] Preferably, the model performance indicators include at least: accuracy, recall precision and F1 score.
[0040] The gastrointestinal endoscopic image lesion recognition system based on data playback provided by an embodiment of the present invention includes:
[0041] A data playback module, used to retrieve old gastrointestinal lesion samples based on data playback technology when the gastrointestinal endoscopic image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning;
[0042] A joint training module, used for jointly training a gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples;
[0043] The lesion recognition module is used to perform lesion recognition on the gastrointestinal endoscopic image to be identified based on the gastrointestinal endoscopic image lesion recognition model after joint training, and output the recognition result.
[0044] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0045] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0047] Figure 1 Schematic diagram of a method for identifying lesions in gastrointestinal endoscopy images based on data playback in an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a category increment process based on data playback and compressed sensing in an embodiment of the present invention;
[0049] Figure 3 A schematic diagram of a framework for a model to continuously learn new gastrointestinal lesions in an embodiment of the present invention;
[0050] Figure 4It is a confusion matrix diagram of the method for recognizing lesions in gastrointestinal endoscope images based on data playback in an embodiment of the present invention when two categories are incremented in the category incremental learning of the public data set Hyper-Kvasir;
[0051] Figure 5 Schematic diagram of a gastrointestinal endoscopic image lesion recognition system based on data playback in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0053] The embodiment of the present invention provides a method for recognizing lesions in gastrointestinal endoscopic images based on data playback, such as Figure 1 As shown, including:
[0054] S1. When the gastrointestinal endoscopy image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning, old gastrointestinal lesion samples are retrieved based on data playback technology;
[0055] S2. Jointly training a gastrointestinal endoscopy image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples;
[0056] S3. Based on the jointly trained gastrointestinal endoscopy image lesion recognition model, lesion recognition is performed on the gastrointestinal endoscopy image to be recognized, and the recognition result is output.
[0057] Category incremental learning (continuous learning) refers to the ability of the model to continuously learn new lesion categories of gastrointestinal endoscopy images. The category incremental learning mentioned in the present invention refers to continuous learning. The gastrointestinal endoscopy image lesion recognition model is a deep learning model. When the model starts to learn new categories, it will forget the old categories (the categories that have been trained), commonly known as "catastrophic forgetting". This is because when the model learns new categories, its model parameters will be updated to fit the parameters of the new categories, resulting in the model not being able to recognize the old categories well. In order to overcome this difficulty, the present invention adopts a method based on the playback of old data. Each time the model learns incrementally, it is jointly trained with the data of the new category, and the knowledge of the old category is learned from the old model using the knowledge distillation method, so that the model can continuously recognize new categories without forgetting the old categories. That is to solve the "catastrophic forgetting problem".
[0058] When the gastrointestinal endoscopic image lesion recognition model is to be incrementally learned using new gastrointestinal lesion samples, old gastrointestinal lesion samples are retrieved based on the data playback technology, and the gastrointestinal endoscopic image lesion recognition model is jointly trained based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples. Based on the jointly trained gastrointestinal endoscopic image lesion recognition model, lesions are recognized in the gastrointestinal endoscopic images to be recognized, and the recognition results are output. In this way, the jointly trained gastrointestinal endoscopic image lesion recognition model can be applied to the recognition of gastrointestinal endoscopic image lesions of new lesion categories, and the recognition performance is stable.
[0059] In one embodiment, the step of obtaining the new gastrointestinal lesion sample comprises:
[0060] Acquire a large collection of endoscopic images of gastrointestinal lesions;
[0061] Preprocessing each endoscopic image of gastrointestinal lesions;
[0062] Integrating the pre-processed endoscopic images of gastrointestinal lesions to obtain the new gastrointestinal lesion samples;
[0063] The preprocessing of each gastrointestinal lesion endoscopic image includes:
[0064] Each gastrointestinal lesion endoscopic image is subjected to at least the following processing steps: compressed sensing, denoising, and uniform cropping to an image of 224×224 size.
[0065] The algorithm of compressed sensing is:
[0066] x c,i =Φx i ;
[0067] Among them, x c,i is the measured value, x i Endoscopic image of gastrointestinal lesions, φ is the measurement matrix, and the measurement matrix is used to map the signal from high-dimensional space to low-dimensional space.
[0068] Compressed Sensing (CS) is a method that enables accurate reconstruction of signals when the sampling rate is much lower than the Nyquist sampling rate. This method uses the sparsity or low complexity of the signal to achieve efficient signal sampling and reconstruction, thereby achieving the goal of obtaining high-quality signals at low sampling rates. Compressed sensing usually involves three main components: sparse transformation, sparse representation, and measurement. Compressed sensing can greatly reduce the amount of data required for sampling, thereby achieving high-quality signal reconstruction while maintaining a low sampling rate. Therefore, the present invention first compresses and encodes the image through compressed sensing, converting it from a high-dimensional image to a low-dimensional measurement value. New gastrointestinal lesion samples will be stored in the buffer later. The use of compressed sensing also allows more old category samples to be stored in the limited space buffer for category incremental learning of the model, further improving the performance of the model.
[0069] In one embodiment, the method of retrieving old gastrointestinal lesion samples based on data playback technology includes:
[0070] Retrieving old gastrointestinal lesion samples from the data playback buffer;
[0071] After jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes:
[0072] Assume that the number of old gastrointestinal lesion samples in the buffer is V, the old gastrointestinal lesion samples are V, and there are b categories in total, and the number of sub-data samples in each category is V / b;
[0073] Suppose a data sample of a new class in the new gastrointestinal lesion sample is X c ;X c ={x c,1 ,…,x c,n};
[0074] Calculate the feature mean μ of the new class:
[0075]
[0076] In the formula, Output the features of each sample output of the current category for the classification model;
[0077] For the data sample of the new class, X c For each sample x in c,n The importance of is sorted from large to small to obtain the sample sequence; the sorting calculation formula is as follows:
[0078]
[0079] P←(p1,...,pV / b );
[0080] Select the first V / b number of samples in the sample sequence and store them in the buffer.
[0081] Assume that there is a series of non-overlapping training tasks B with different gastrointestinal lesion categories. 1 ,D 2 ,…,D B},in Represents the dataset used in the b-th category incremental learning.
[0082] In addition, data playback refers to the joint training of old gastrointestinal lesion category samples and new gastrointestinal lesions when the model performs incremental learning of categories, so as to realize the intelligent diagnosis of old and new gastrointestinal lesions by deep learning models. Therefore, a fixed-size buffer needs to be set in data playback to store samples V of previous categories. Therefore, during the training of task b, samples V stored in the buffer will be b The model is trained together. Therefore, after each training, the model is able to recognize all visible categories Y 总 =Y 1 ∪Y 2 ∪…∪Y b .
[0083] In one embodiment, after jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes:
[0084] Assume that the number of old gastrointestinal lesion samples in the buffer is V, there are b categories of old gastrointestinal lesion samples, and the number of sub-data samples in each category is V / b;
[0085] Suppose a new C-class data sample in the new gastrointestinal lesion sample is X c ;X c ={x c,1 ,…,x c,n}; where x c,n It represents the nth sample data in the data sample of category C, and n is the total number of sample data in the data sample of category C;
[0086] Calculate the feature mean μ of the new class:
[0087]
[0088] In the formula, Output data obtained by inputting the nth sample data in the data sample of category C into the gastrointestinal endoscope image lesion recognition model;
[0089] Then find k samples so that the feature mean μ is equal to the mean closest; however, since the specified buffer has a certain amount of memory, it can only store V samples. When adding new classes, the buffer may not be able to store samples of all categories, so some samples of each old class need to be deleted; j = [1, 2,, ... k], represents the jth sample among k samples; It represents the eigenvalue of the jth sample; the sample is a gastrointestinal lesion image, and one gastrointestinal lesion image is one sample; there are many samples under each sample category; because the memory size of the buffer is fixed, when samples of a new sample category come in, it is necessary to delete the old category samples stored in the buffer to make room for storing new category samples;
[0090] Therefore, the characteristic mean μ and the mean are calculated The difference p k After that, p k After sorting from small to large, simply delete the last item so that each sample category has only V / b samples in the buffer. The calculation formula is as follows:
[0091]
[0092] P=(p1,...,p V / b ); The difference p k , P is the set of all sample differences;
[0093] Select the first V / b number of samples in the sample sequence and store them in the buffer.
[0094] In one embodiment, when the gastrointestinal endoscopic image lesion recognition model is jointly trained based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the loss function used is:
[0095]
[0096]
[0097] Where L1 is the classification loss function of the new category, L2 is the distillation loss function of the old category, and both L1 and L2 are cross entropy functions; c is in X c ={x c,1 ,…,x c,n}, c represents a category c; D represents a data set, g y It represents the logit of the gastrointestinal endoscopy image lesion recognition model output. Logit refers to the output of the model before Softmax. i It means x c,i .
[0098] In one implementation, the process of category increment is implemented based on data playback combined with compressed sensing, with 2 category examples added each time. The specific process is as follows:
[0099] Step 1: Preprocess the initial dataset, such as data augmentation techniques, size normalization, etc.
[0100] Step 2: Initial training: training the classification model based on two existing different gastrointestinal lesion types (category 1 and category 2).
[0101] Step 3: Preset a buffer (Examplar) with a capacity of V, and use formulas (2) to (4) to select samples that can represent 2 categories and store them in the buffer. When 2 new categories (3 and 4) are needed, that is, the b-th incremental learning of categories, the previous 2 types of samples stored in the buffer are combined with the new category samples to retrain the classification model.
[0102] Step 4: Since the capacity of the buffer is fixed, when two different types of gastrointestinal lesions are added to the buffer, the samples of the two old categories stored in the buffer are first reduced, and then the samples that can represent the new two different gastrointestinal lesions are selected through formulas (2) to (4) and added to the buffer. Finally, the buffer contains samples of four different gastrointestinal lesions.
[0103] Step 5: When the model needs to continue to implement the b+1th incremental learning of categories, the model output layer (the fully connected layer is changed to the current visible total category). Repeat steps 2 and 3 until the model can recognize all visible categories Y 总 =Y 1 ∪Y 2 ∪…∪Y b ∪Y b+1 .like Figure 3 shown.
[0104] In one embodiment, after jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes:
[0105] Based on the model performance indicators, the performance of the gastrointestinal endoscopy image lesion recognition model after joint training was quantified;
[0106] Based on the performance quantification results, the gastrointestinal endoscopy image lesion recognition model after joint training was optimized;
[0107] The model performance indicators include at least: accuracy, recall rate, precision and F1 score.
[0108] Accuracy refers to the ratio of the number of samples correctly classified by the classifier to the total number of samples for a given test data set; recall refers to how many positive examples in the sample are predicted correctly, and it is only for the original sample; precision refers to how many of the samples predicted as positive are truly positive samples, and it is for the prediction results of the model. The F1 score refers to the weighted average of recall and precision.
[0109] The present invention uses the public dataset Hyper-Kvasir of gastrointestinal lesions to verify the current common class incremental learning method, and the classification model used is ViT. 2-class increment means that 2 classes are added each time the class incremental learning is performed, and 4-class increment is similar to 8-class increment. The compression rate used is 0.5, that is, the size of the original image is compressed to half of the original size, so that twice as many old class samples can be stored in the limited space buffer.
[0110] DER and FOSTER are the two mainstream category incremental learning methods. The last accuracy of category incremental learning is shown in Table 1. Table 1 shows that compared with DER and FOSTER, the data playback combined with compressed sensing method proposed in the present invention provides 4.84% and 7.90%, 1.47% and 9.10% and 2.82% and 0.53% in the category incremental learning of 2 categories of increments, 4 categories of increments and 8 categories of increments, respectively. It can make the model continue to learn new gastrointestinal lesion categories without forgetting the old gastrointestinal lesion categories to achieve better performance, and can prevent the model from forgetting the old categories.
[0111] Table 1 The last accuracy in category incremental learning.
[0112]
[0113] Table 2 shows the classification performance when there are 2 types of increments. It can be seen from the table that the method proposed in this invention is superior to other methods in terms of recall rate, precision rate and F1 score. Figure 4 The confusion matrix of the classification performance when the increment is 2 classes. Figure 4 It can be seen that after the method proposed by the present invention has continuously learned all categories, it can accurately diagnose most of the overall gastrointestinal lesion categories.
[0114] Table 2 Classification performance with 2-category increments.
[0115]
[0116] The embodiment of the present invention provides a gastrointestinal endoscopic image lesion recognition system based on data playback, such as Figure 5 As shown, including:
[0117] The data playback module 1 is used to retrieve old gastrointestinal lesion samples based on the data playback technology when the gastrointestinal endoscopic image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning;
[0118] A joint training module 2 is used to jointly train a gastrointestinal endoscopy image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples;
[0119] The lesion recognition module 3 is used to perform lesion recognition on the gastrointestinal endoscopic image to be recognized based on the gastrointestinal endoscopic image lesion recognition model after joint training, and output the recognition result.
[0120] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for identifying lesions in gastrointestinal endoscopic images based on data playback, characterized in that: include: When the gastrointestinal endoscopic image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning, old gastrointestinal lesion samples are retrieved based on data playback technology; Based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, jointly training a gastrointestinal endoscopic image lesion recognition model; Based on the jointly trained gastrointestinal endoscopy image lesion recognition model, lesion recognition is performed on the gastrointestinal endoscopy image to be identified, and the recognition result is output.
2. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 1, characterized in that: The steps of obtaining the new gastrointestinal lesion sample include: Acquire a large collection of endoscopic images of gastrointestinal lesions; Preprocessing each endoscopic image of gastrointestinal lesions; The pre-processed gastrointestinal lesion endoscopic images are integrated to obtain the new gastrointestinal lesion samples.
3. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 2, characterized in that: The preprocessing of each gastrointestinal lesion endoscopic image includes: Each gastrointestinal lesion endoscopic image is subjected to at least the following processing steps: compressed sensing, denoising, and uniform cropping to an image of 224×224 size.
4. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 3, characterized in that: The algorithm of compressed sensing is: x c,i =Φx i ; Among them, x c,i is the measured value, x i Endoscopic image of gastrointestinal lesions, φ is the measurement matrix.
5. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 2, characterized in that: The data playback technology is used to retrieve old gastrointestinal lesion samples, including: Retrieve old gastrointestinal lesion samples from the data playback buffer.
6. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 5, characterized in that: After jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes: Assume that the number of old gastrointestinal lesion samples in the buffer is V, there are b categories of old gastrointestinal lesion samples, and the number of sub-data samples in each category is V / b; Suppose a new C-class data sample in the new gastrointestinal lesion sample is X c ;X c ={x c,1 ,…,x c,n }; where x c,n It represents the nth sample data in the data sample of category C, and n is the total number of sample data in the data sample of category C; Calculate the feature mean μ of the new class: In the formula, Output data obtained by inputting the nth sample data in the data sample of category C into the gastrointestinal endoscope image lesion recognition model; Then find k samples so that the feature mean μ is equal to the mean closest; however, since the specified buffer has a certain amount of memory, it can only store V samples. When adding new classes, the buffer may not be able to store samples of all categories, so some samples of each old class need to be deleted; j = [1, 2,, ... k], represents the jth sample among k samples; It represents the eigenvalue of the jth sample; the sample is a gastrointestinal lesion image, and one gastrointestinal lesion image is one sample; there are many samples under each sample category; because the memory size of the buffer is fixed, when samples of a new sample category come in, it is necessary to delete the old category samples stored in the buffer to make room for storing new category samples; Therefore, the characteristic mean μ and the mean are calculated The difference p k After that, p k After sorting from small to large, simply delete the last item so that each sample category has only V / b samples in the buffer. The calculation formula is as follows: The difference p k , P is the set of all sample differences; Select the first V / b number of samples in the sample sequence and store them in the buffer.
7. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 4, characterized in that: When the gastrointestinal endoscopic image lesion recognition model is jointly trained based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the loss function used is: Where L1 is the classification loss function of the new category, L2 is the distillation loss function of the old category, and both L1 and L2 are cross entropy functions; c is in x c ={x c,1 ,…,x c,n }, c represents a category c; D represents a data set, g y It represents the logit of the gastrointestinal endoscopy image lesion recognition model output. Logit refers to the output of the model before Softmax. i It means x c,i .
8. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 1, characterized in that: After jointly training the gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples, the method further includes: Based on the model performance indicators, the performance of the gastrointestinal endoscopy image lesion recognition model after joint training was quantified; Based on the performance quantification results, the gastrointestinal endoscopy image lesion recognition model was optimized after joint training.
9. The method for recognizing lesions in gastrointestinal endoscopy images based on data playback according to claim 8, characterized in that: The model performance indicators include at least: accuracy, recall rate, precision and F1 score.
10. A gastrointestinal endoscopic image lesion recognition system based on data playback, characterized in that: include: A data playback module, used to retrieve old gastrointestinal lesion samples based on data playback technology when the gastrointestinal endoscopic image lesion recognition model is to use new gastrointestinal lesion samples for incremental learning; A joint training module, used for jointly training a gastrointestinal endoscopic image lesion recognition model based on the new gastrointestinal lesion samples and the old gastrointestinal lesion samples; The lesion recognition module is used to perform lesion recognition on the gastrointestinal endoscopic image to be identified based on the gastrointestinal endoscopic image lesion recognition model after joint training, and output the recognition result.