Method and device for identifying lesions in gastroscopic images based on FCOS algorithm

Through the gastroscopy image lesion identification method based on the FCOS algorithm, multiple sets of training data and greedy algorithm compression models are used to solve the problem of low efficiency of gastroscopy image lesion identification, achieve high-precision and efficient gastroscopy image lesion identification, and reduce manual intervention. Improved diagnostic efficiency.

CN112767389BActive Publication Date: 2024-10-18ZIDONG INFORMATION TECH (SUZHOU) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110146823.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-03
Publication Date
2024-10-18
Estimated Expiration
2041-02-03

AI Technical Summary

Technical Problem

The detection efficiency of lesions in gastroscopy images is low and the existing target detection models are not suitable for gastric diagnosis scenarios and cannot achieve high accuracy and time performance at the same time.

Method used

A method for identifying lesions in gastroscopy pictures based on the FCOS algorithm is adopted. The first-order fully convolutional target detection FCOS model is trained hierarchically by obtaining multiple sets of training data, and a greedy algorithm is used to compress the model, and the compressed model structure is obtained for use in gastroscopy pictures. Lesion localization and classification.

Benefits of technology

It improves the time performance of lesion identification in gastroscopy pictures, while maintaining high accuracy, reducing manual participation, providing an efficient diagnostic reference, assisting doctors in their work, and improving diagnostic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112767389B_ABST
    Figure CN112767389B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for identifying lesions in gastroscopic images based on the FCOS algorithm, and belongs to the technical field of intelligent processing of medical images. The method comprises: obtaining multiple sets of training data, each set of training data comprising a gastroscopic image and the lesion category and lesion area of ​​the gastroscopic image; using multiple sets of training data to perform hierarchical training on the specified feature layers in the FCOS model, and obtaining the recognition accuracy corresponding to each trained layer; based on the greedy algorithm, the FCOS model is compressed according to the recognition accuracy to obtain the compressed model structure, and the compressed model structure is used to locate and classify the input gastroscopic images for lesion; it can solve the problem that the efficiency of manual gastric lesion recognition is low and the existing target detection model is not suitable for gastric diagnosis scenarios; it can improve the time performance of gastroscopic image lesion recognition, and at the same time have a higher level of accuracy. No human participation is required in the recognition process, thereby improving the diagnostic efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to a method and device for identifying lesions in gastroscopic images based on the FCOS algorithm, and belongs to the technical field of intelligent processing of medical images. [Background technology]

[0002] Gastric cancer is a malignant tumor originating from the gastric mucosal epithelium, and its incidence ranks first among all types of malignant tumors in my country. Due to its significant effect in diagnosing gastric cancer, gastroscopy has been recommended as the main diagnostic method for gastric cancer.

[0003] Specifically, gastroscopy can directly detect the diseased tissue area in the stomach so that medical personnel can make the corresponding diagnosis. Tissue biopsy can be performed under gastroscopy, which is important for the diagnosis of early gastric precancerous diseases or precancerous lesions and the differentiation of benign and malignant ulcers.

[0004] However, human factors such as inconsistent experience levels of doctors or special circumstances such as negligence will directly affect the final diagnosis of gastric cancer. At the same time, observing endoscopic images with the human eye will also consume a lot of time, resulting in low efficiency in lesion identification.

[0005] In addition, since most target detection algorithms cannot have good accuracy and time performance at the same time, they cannot be applied to the field of gastroscopy image lesion recognition, which has high requirements for accuracy and time performance. [Summary of the invention]

[0006] The present application provides a method for identifying lesions in gastroscopic images based on the FCOS algorithm, which can use a compressed network model to identify gastric lesions, and has good recognition accuracy and time performance, and can realize automatic diagnosis of gastroscopic images. The present application provides the following technical solutions:

[0007] In a first aspect, a method for identifying lesions in gastroscopic images based on the FCOS algorithm is provided, the method comprising:

[0008] Acquire multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and a lesion area of ​​the gastroscopic image;

[0009] Using the multiple sets of training data, hierarchically train the specified feature layers in the first-order full convolution target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer;

[0010] The FCOS model is compressed according to the recognition accuracy based on a greedy algorithm to obtain a compressed model structure, and the compressed model structure is used to locate and classify lesions in the input gastroscopy image.

[0011] Optionally, before using the multiple sets of training data to perform hierarchical training on a specified feature layer in a first-order fully convolutional object detection FCOS model, the method further includes:

[0012] Preprocessing the gastroscope images, and using the preprocessed gastroscope images to input into the FCOS model for training;

[0013] The preprocessing includes at least one of the following: scaling and cropping processing, de-averaging processing and normalization processing.

[0014] Optionally, the FCOS model includes a backbone network, a feature pyramid network connected to the backbone network, and a prediction network connected to the feature pyramid network; the using of the multiple sets of training data to perform hierarchical training on the designated feature layers in the first-order full convolution target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer includes:

[0015] The backbone network structure is kept unchanged, a feature map is selected and retained in the multi-layer feature maps corresponding to the feature pyramid network in turn, and position regression is performed on each pixel point in the bounding box.

[0016] Optionally, the multi-layer feature map includes a P3 layer, a P4 layer, a P5 layer, a P6 layer and a P7 layer; wherein the P3 layer is obtained by convolving the feature map C3 of the backbone network with a 1×1 convolution kernel; the P4 layer is obtained by convolving the feature map C4 of the backbone network with a 1×1 convolution kernel; the P5 layer is obtained by convolving the feature map C5 of the backbone network with a 1×1 convolution kernel; the P6 layer is obtained by passing the output result of the P5 layer through a convolution layer with a step size of 2; the P7 layer is obtained by passing the output result of the P6 layer through a convolution layer with a step size of 2.

[0017] Optionally, compressing the FCOS model based on the greedy algorithm according to the recognition accuracy to obtain a compressed model structure includes:

[0018] Based on the greedy algorithm, the separated layers are combined again to obtain a layer combination with a recognition accuracy greater than the expected accuracy, and a compressed model structure is obtained; the number of layers of the compressed model structure is less than the number of layers of the FCOS model before compression.

[0019] Optionally, the separated levels are combined again based on the greedy algorithm to obtain a level combination with a recognition accuracy greater than an expected accuracy, and to obtain a compressed model structure, including:

[0020] Arrange each trained layer in descending order according to recognition accuracy;

[0021] Select the best hierarchical structure as the basic hierarchical structure at the beginning, and take the recognition accuracy of this layer as the current optimal recognition accuracy;

[0022] According to the accuracy ranking table of hierarchical training, add the suboptimal hierarchical structure to the basic structure to form a hierarchical combination, train and record the recognition accuracy of this hierarchical combination;

[0023] If the recognition accuracy of this hierarchical combination is lower than the current optimal recognition accuracy, the compression process is stopped and the layer structure before the combination is used as the compression result;

[0024] If the recognition accuracy of this level combination is higher than the current optimal recognition accuracy, the next level is added again until adding levels no longer improves the recognition accuracy or all levels have been added.

[0025] Optionally, the loss function used in the training process is expressed by the following formula:

[0026]

[0027] Among them, p x,y is the pixel category output, is the category label, t x,y is the regression output of the pixel, is the regression label, L cls is the category error, calculated using focal loss, L reg is the regression error, calculated using IoU loss, N pos represents the number of positive samples, is an indicator, when is equal to 1 when , otherwise it is equal to 0.

[0028] Optionally, after compressing the FCOS model based on the greedy algorithm according to the recognition accuracy to obtain a compressed model structure, the method further includes:

[0029] Inputting the gastroscope images to be identified in the test set into the compressed model structure to obtain multiple prediction boxes;

[0030] The prediction box is screened using a non-maximum suppression algorithm to obtain a prediction result;

[0031] The compressed model structure is tested using the prediction results.

[0032] Optionally, the using the prediction result to test the compressed model structure includes:

[0033] Using the prediction results to calculate the average precision mean index, the recognition accuracy of the compressed model structure is obtained;

[0034] The prediction result is used to calculate the number of transmission frames per second to obtain the recognition speed of the compressed model structure.

[0035] In a second aspect, a gastroscopy image lesion recognition device based on the FCOS algorithm is provided, the device comprising:

[0036] A data acquisition module, used to acquire multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and lesion area of ​​the gastroscopic image;

[0037] A hierarchical training module, used to perform hierarchical training on a specified feature layer in a first-order full convolutional target detection FCOS model using the multiple sets of training data to obtain a recognition accuracy corresponding to each trained layer;

[0038] The model compression module is used to compress the FCOS model according to the recognition accuracy based on a greedy algorithm to obtain a compressed model structure, and the compressed model structure is used to locate and classify lesions in the input gastroscopy image.

[0039] The beneficial effects of the present application include at least: obtaining multiple sets of training data, each set of training data includes gastroscope images and lesion categories and lesion areas of gastroscope images; using multiple sets of training data to perform hierarchical training on the specified feature layers in the first-order full convolution target detection FCOS model, and obtaining the recognition accuracy corresponding to each trained layer; based on the greedy algorithm, the FCOS model is compressed according to the recognition accuracy to obtain the compressed model structure, and the compressed model structure is used to locate and classify the input gastroscope images; it can solve the problem that the efficiency of manual gastric lesion recognition is low and the existing target detection model is not suitable for gastric diagnosis scenarios; the compressed model structure can improve the time performance of gastroscope image lesion recognition, and at the same time have a higher level of accuracy. In addition, no human participation is required in the recognition process, and while reducing human factors, it can provide doctors with efficient diagnostic references, assist doctors in their work, and improve diagnostic efficiency.

[0040] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings.

Brief Description of the Drawings

[0041] Figure 1 is a schematic diagram of the network structure of FCOS provided by an embodiment of the present application;

[0042] Figure 2 This is a flow chart of a method for identifying lesions in gastroscopic images based on the FCOS algorithm provided by an embodiment of the present application;

[0043] Figure 3 is a schematic diagram of a training process of a classification model provided by an embodiment of the present application;

[0044] Figure 4 is a schematic diagram of a compressed model structure provided by an embodiment of the present application;

[0045] Figure 5 It is a block diagram of a gastroscopy image lesion recognition device based on the FCOS algorithm provided in one embodiment of the present application. [Specific implementation method]

[0046] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.

[0047] First, several terms involved in this application are introduced.

[0048] Fully Convolutional One-Stage Object Detection (FCOS): It is a pixel-by-pixel object detection algorithm based on Fully Convolutional Networks (FCN). It implements an anchor-free and proposal-free solution, and proposes the idea of ​​center-ness. Its performance in terms of recall rate is close to or even exceeds that of mainstream anchor-based object detection algorithms.

[0049] FCOS does not rely on predefined anchor boxes or proposal regions. It is a pixel-by-pixel prediction method for object detection, similar to semantic segmentation. Almost all state-of-the-art object detection algorithms, such as RetinaNet, SSD, YOLOv3, etc., use pre-set anchor boxes, while FCOS is anchor-free. Because there is no need to predefine the anchor box sequence, FCOS completely avoids the complex calculations associated with the anchor boxes, such as the calculation of the overlapping area during training. Not only that, FCOS also avoids setting hyperparameters related to the anchor boxes, which usually have a certain impact on the final prediction results. When the post-processing method only uses Non-Maximum Suppression (NMS) and ResNet-50 as the base model, FCOS can achieve an accuracy of 44.7%, which is more accurate and efficient than previous single-stage object detection methods.

[0050] refer to Figure 1 The FCOS model shown is based on Figure 1It can be seen that the FCOS model includes a backbone network, a feature pyramid network connected to the backbone network, and a prediction network connected to the feature pyramid network. The backbone network is based on convolutional neural networks (CNN), and the backbone network includes multiple convolutional layers, including C3, C4, and C5 layers. The feature pyramid network includes multiple feature layers, corresponding to feature maps of different sizes, including P3, P4, P5, P6, and P7 layers. Each convolutional layer is mapped to a feature layer in the feature pyramid network. Figure 1 It can be seen that the C3 layer is mapped to the P3 layer of the feature pyramid, the C4 layer is mapped to the P4 layer of the feature pyramid, and the C5 layer is mapped to the P5 layer of the feature pyramid. Specifically, the P3 layer is obtained by convolving the feature map C3 of the backbone network with a 1×1 convolution kernel; the P4 layer is obtained by convolving the feature map C4 of the backbone network with a 1×1 convolution kernel; the P5 layer is obtained by convolving the feature map C5 of the backbone network with a 1×1 convolution kernel; the P6 layer is obtained by passing the output of the P5 layer through a convolution layer with a step size of 2; and the P7 layer is obtained by passing the output of the P6 layer through a convolution layer with a step size of 2.

[0051] The prediction network includes prediction layers corresponding to each feature layer in the feature pyramid network. Each prediction layer includes three branches: category branch, center-ness branch and regression branch.

[0052] The category branch uses C binary classifications and outputs a total of C prediction values. C is a positive integer.

[0053] The center-ness branch is used to suppress low-quality detection boxes predicted by positions that deviate from the center of the target. The center-ness branch predicts a value, which is the normalized distance between the current position and the center point of the object to be predicted, and the value is between [0,1].

[0054] The regression branch predicts 4 values ​​(l, t, r, b), where l represents the distance from a point in the target box to the left side of the box, t represents the distance from a point in the target box to the top of the box, r represents the distance from a point in the target box to the right side of the box, and b represents the distance from a point in the target box to the bottom of the box.

[0055] Greedy algorithm: It means that when solving a problem, it always makes the best choice at the moment. Greedy algorithms do not consider the overall optimality, and only make local optimal choices in a certain sense. When using greedy strategies, we should pay attention to the relationship between local optimality and global optimality. Choosing the current local optimality does not necessarily lead to the global optimality of the problem. When solving a problem using a greedy strategy, we should determine whether the problem has the greedy selection property, and then formulate a greedy strategy to achieve the optimal solution or a better solution to the problem. To determine whether a problem is suitable for solving with a greedy algorithm, we must prove that the greedy choice made at each step eventually leads to the overall optimal solution of the problem. The general process of the proof is: first examine an overall optimal solution to the problem, and prove that this optimal solution can be modified so that it starts with a greedy choice. After making a greedy choice, the original problem is simplified to a similar sub-problem of a smaller scale. Then use mathematical induction to prove that by making a greedy choice at each step, the overall optimal solution of the problem can be obtained.

[0056] Optionally, the present application takes the execution subject of each embodiment as an electronic device with image processing capability as an example for illustration. The electronic device may be a terminal or a server. The terminal may be a computer, a laptop computer, a tablet computer, a medical diagnostic device, etc. This embodiment does not limit the type of terminal and the type of electronic device.

[0057] In this application, Figure 1 In the FCOS model, P3, P4, P5, P6, and P7 in the FCOS model are first separated and trained separately, and then the model is compressed using the idea of ​​the greedy algorithm, and finally the compressed network model is obtained for the identification of gastric lesions.

[0058] Figure 2 This is a flow chart of a method for identifying lesions in gastroscopy images based on the FCOS algorithm provided by an embodiment of the present application. The method includes at least the following steps:

[0059] Step 201 , obtaining multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and a lesion area of ​​the gastroscopic image.

[0060] Before training, first prepare a data set and divide the data set into a training set and a test set. The training set includes multiple groups of training data for network training; the test set includes multiple groups of test data for network testing. For example: 600 gastroscopy images are labeled, and the lesion area and the corresponding lesion category of each gastroscopy image are marked with a rectangular frame. Then, 400 images are divided as a training set, including 200 gastric cancer categories and 200 gastric ulcer categories, and the remaining 200 images are used as a test set. In actual implementation, the division method of the training set and the test set can also be other division methods, which will not be repeated in this embodiment.

[0061] Optionally, the lesion category includes but is not limited to at least one of the following: gastric cancer, gastric ulcer, gastritis, gastric erosion, etc. In actual implementation, the lesion category may also include more or fewer categories, or each category may be further divided according to severity. This embodiment does not limit the setting method of the lesion category.

[0062] The lesion area is used to identify the location of the lesion in the gastroscopy image, and the lesion area is usually marked by a rectangular frame.

[0063] Step 202: Use multiple sets of training data to perform hierarchical training on the designated feature layers in the FCOS model to obtain the recognition accuracy corresponding to each trained layer.

[0064] Optionally, since the gastroscope images in the training data may not meet the input standard of the FCOS model, before using multiple sets of training data to perform hierarchical training on the specified feature layer in the first-order full convolution target detection FCOS model, it also includes: preprocessing the gastroscope images, and the preprocessed gastroscope images are used to input the FCOS model for training; wherein the preprocessing includes at least one of the following: scaling and cropping processing, de-meaning processing and normalization processing.

[0065] Scaling and cropping are used to process input images into a uniform size.

[0066] De-meaning refers to subtracting the statistical mean of the corresponding dimension of the data from the RGB unreading of the image to eliminate the common parts and highlight the characteristics and differences between individuals.

[0067] Normalization processing refers to limiting the numerical value of the model input to [0, 1] to speed up the convergence of the model.

[0068] The FCOS model includes a backbone network, a feature pyramid network connected to the backbone network, and a prediction network connected to the feature pyramid network; multiple sets of training data are used to perform hierarchical training on the specified feature layers in the first-order fully convolutional target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer, including: keeping the backbone network structure unchanged, selecting and retaining a feature map in the multi-layer feature maps corresponding to the feature pyramid network in turn, and performing position regression on each pixel point in the bounding box.

[0069] Among them, the multi-layer feature map includes P3 layer, P4 layer, P5 layer, P6 layer and P7 layer; among them, the P3 layer is obtained by convolving the feature map C3 of the backbone network with a 1×1 convolution kernel; the P4 layer is obtained by convolving the feature map C4 of the backbone network with a 1×1 convolution kernel; the P5 layer is obtained by convolving the feature map C5 of the backbone network with a 1×1 convolution kernel; the P6 layer is obtained by passing the output result of the P5 layer through a convolution layer with a step size of 2; the P7 layer is obtained by passing the output result of the P6 layer through a convolution layer with a step size of 2.

[0070] In traditional FCOS, each level directly limits the regression range of the bounding box, and each position on the feature map calculates the regression target, l*, t*, r*, b*. If a pixel position satisfies max(l*, t*, r*, b*)>m i or max(l*, t*, r*, b*) <m i-1 , it will be set as a negative example and will not be used for the regression of the bounding box. Among them, m is the maximum regression distance of each level feature map, which is set to 0, 64, 12, 256, 512, +inf respectively. Since the overlapping of lesion sites in gastroscopy images rarely occurs, in this embodiment, the multi-level model of FCOS can be simplified, and each level structure of FCOS can be separated and trained separately. Specifically, the backbone CNN network structure is kept unchanged, and one feature map is selected to be retained in the 5 feature maps of P3, P4, P5, P6, and P7 in turn, and the restriction on the regression distance of the retained layer is released, so that each pixel point in the bounding box can be regressed.

[0071] For example: Reference Figure 3 The model structure shown here only retains the P4 layer. After training the model, a trained network model and the recognition accuracy corresponding to the network model are obtained.

[0072] The model training process includes: pre-processing the images in the training set and inputting them into the network model to obtain the prediction information of each pixel on the feature map, including category information and prediction box position; inputting the prediction information and lesion category into the loss function for training.

[0073] Optionally, the loss function used in the training process is expressed by the following formula:

[0074]

[0075] Among them, p x,y is the pixel category output, is the category label, t x,y is the regression output of the pixel, is the regression label, L cls is the category error, calculated using focal loss, Lreg is the regression error, calculated using IoU loss, N pos represents the number of positive samples, is an indicator, when is equal to 1 when , otherwise it is equal to 0.

[0076] Assume that in the training process of each group, the same hyperparameters are used, the batch size is 12, the initial learning rate is 0.002, and the restriction on the regression distance of the retention layer is released, so that each pixel point in the bounding box can be regressed. In other implementations, the corresponding hyperparameters for different groups of network training can also be different, and the batch size and initial learning rate can also be other values. This embodiment does not limit the values ​​of each parameter in the training process.

[0077] by Figure 3 Take this as an example to illustrate. During the training process, after the processed image is input into the model, the backbone network will perform multiple convolutions on the input image, extract the C4 feature map from it, and then use a 1*1 convolution kernel to perform convolution operation on C4 to obtain P4. P4 is finally processed by the Head part, which includes two branches. The first branch is used to output the category of each pixel and the distance value of this pixel from the boundary, and the second branch is used to output the location information of the predicted box. After obtaining the output, the error function is constructed with the real label, and the model is trained using the stochastic gradient descent algorithm. It is iterated repeatedly until the model converges, and the model parameters with the lowest error value are obtained and saved. Assume that the 5 groups of training results corresponding to the P3 layer, P4 layer, P5 layer, P6 layer, and P7 layer are shown in Table 1 below.

[0078] Table 1:

[0079] Preserve feature layer P3 P4 P5 P6 P7 MAP 0.34 0.40 0.21 0.45 0.0

[0080] Among them, MAP is based on Mean Average Precision, which is used to evaluate the recognition accuracy of the model.

[0081] Step 203, based on the greedy algorithm, the FCOS model is compressed according to the recognition accuracy to obtain a compressed model structure, and the compressed model structure is used to locate and classify the lesions of the input gastroscopy image.

[0082] Among them, lesion localization refers to outputting the location of the lesion in the gastroscopy image. For example, marking the location of the lesion by a rectangular frame. Lesion classification refers to outputting the type of lesion.

[0083] In one example, the FCOS model is compressed according to the recognition accuracy based on the greedy algorithm to obtain a compressed model structure, including: combining the separated layers again based on the greedy algorithm to obtain a layer combination with a recognition accuracy greater than the expected accuracy, and obtaining a compressed model structure; the number of layers of the compressed model structure is less than the number of layers of the FCOS model before compression.

[0084] Among them, based on the greedy algorithm, the separated levels are combined again to obtain a level combination with a recognition accuracy greater than the expected accuracy, and a compressed model structure is obtained, including: arranging each trained level in descending order according to the recognition accuracy; selecting the best level structure as the basic level structure at the beginning, and taking the recognition accuracy of this level as the current optimal recognition accuracy; according to the accuracy sorting table of the hierarchical training, adding a suboptimal level structure to the basic structure to form a level combination, training and recording the recognition accuracy of this level combination; if the recognition accuracy of this level combination is lower than the current optimal recognition accuracy, then stop the compression process and take the layer structure before the combination as the compression result; if the recognition accuracy of this level combination is higher than the current optimal recognition accuracy, then add the next level again until adding levels no longer improves the recognition accuracy or all levels are added.

[0085] For example: sort the recognition accuracy of the P3, P4, P5, P6, and P7 layers after separate training in descending order, then select the optimal P6 feature layer as the basic hierarchical structure at the beginning, and use 0.45 as the current optimal recognition accuracy. Next, add the suboptimal P4 feature layer to the basic model to form a hierarchical combination, and use the training set to repeatedly train this hierarchical combination until the model converges. The recognition accuracy of this combination is tested to be 0.495, which is greater than the current optimal recognition accuracy of 0.45. Therefore, continue to repeat this process until adding layers no longer improves the recognition accuracy or all layers have been added. Assume that the compressed model structure is referenced Figure 4 shown.

[0086] Optionally, after compressing the FCOS model according to the recognition accuracy based on the greedy algorithm to obtain the compressed model structure, the method further includes: inputting the gastroscopy images to be identified in the test set into the compressed model structure to obtain multiple prediction boxes; screening the prediction boxes using a non-maximum suppression algorithm to obtain prediction results; and testing the compressed model structure using the prediction results.

[0087] The predicted results are used to test the compressed model structure, including: using the predicted results to calculate the MAP index to obtain the recognition accuracy of the compressed model structure; using the predicted results to calculate the number of frames per second (Frames PerSecond, FPS) to obtain the recognition speed of the compressed model structure.

[0088] Refer to the comparison results of the compressed model and the uncompressed model in terms of speed and accuracy shown in Table 2 below. According to Table 2, it can be seen that the compressed model has achieved almost the same recognition accuracy as the uncompressed model, and in terms of model speed, the uncompressed model can only process 4.6 gastroscopy images per second, while the compressed model can process 10 gastroscopy images, which is twice as fast as the uncompressed model. It can be seen that the present invention improves the time performance of gastroscopy image lesion recognition while retaining the original accuracy level.

[0089] Table 2:

[0090] Uncompressed Model Compression Model MAP 0.501 0.495 FPS 4.6 10

[0091] In summary, the gastroscope image lesion recognition method based on the FCOS algorithm provided in this embodiment obtains multiple sets of training data, each set of training data includes gastroscope images and lesion categories and lesion areas of gastroscope images; uses multiple sets of training data to perform hierarchical training on the specified feature layers in the first-order full convolution target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer; based on the greedy algorithm, the FCOS model is compressed according to the recognition accuracy to obtain the compressed model structure, and the compressed model structure is used to locate and classify the input gastroscope images; it can solve the problem that the efficiency of manual gastric lesion recognition is low and the existing target detection model is not suitable for gastric diagnosis scenarios; the compressed model structure can improve the time performance of gastroscope image lesion recognition, and at the same time have a higher level of accuracy. In addition, no human participation is required in the recognition process, and while reducing human factors, it can provide doctors with efficient diagnostic references, assist doctors in their work, and improve diagnostic efficiency.

[0092] Figure 5 This is a block diagram of a gastroscope image lesion recognition device based on the FCOS algorithm provided in one embodiment of the present application. The device comprises at least the following modules: a data acquisition module 510 , a hierarchical training module 520 and a model compression module 530 .

[0093] The data acquisition module 510 is used to acquire multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and a lesion area of ​​the gastroscopic image;

[0094] A hierarchical training module 520 is used to perform hierarchical training on a designated feature layer in a first-order full convolutional object detection FCOS model using the multiple sets of training data to obtain a recognition accuracy corresponding to each trained layer;

[0095] The model compression module 530 is used to compress the FCOS model according to the recognition accuracy based on the greedy algorithm to obtain a compressed model structure, and the compressed model structure is used to locate and classify the input gastroscopy image.

[0096] For relevant details, refer to the above method embodiment.

[0097] It should be noted that: the lesion recognition device for gastroscopic images based on the FCOS algorithm provided in the above embodiment only uses the division of the above functional modules as an example when performing lesion recognition in gastroscopic images based on the FCOS algorithm. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the lesion recognition device for gastroscopic images based on the FCOS algorithm is divided into different functional modules to complete all or part of the functions described above. In addition, the lesion recognition device for gastroscopic images based on the FCOS algorithm provided in the above embodiment and the lesion recognition method embodiment for gastroscopic images based on the FCOS algorithm belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0098] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the gastroscopic image lesion recognition method based on the FCOS algorithm of the above method embodiment.

[0099] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the gastroscopic image lesion recognition method based on the FCOS algorithm of the above method embodiment.

[0100] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0101] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for identifying lesions in gastroscopic images based on the FCOS algorithm, characterized in that: The method comprises: Acquire multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and a lesion area of ​​the gastroscopic image; Using the multiple sets of training data, hierarchically train the specified feature layers in the first-order full convolution target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer; Based on the greedy algorithm, the FCOS model is compressed according to the recognition accuracy to obtain a compressed model structure, and the compressed model structure is used to locate and classify the input gastroscopy image; The FCOS model includes a backbone network, a feature pyramid network connected to the backbone network, and a prediction network connected to the feature pyramid network; the multiple sets of training data are used to perform hierarchical training on the designated feature layers in the first-order full convolution target detection FCOS model to obtain the recognition accuracy corresponding to each trained layer, including keeping the backbone network structure unchanged, selecting and retaining a feature map in the multi-layer feature maps corresponding to the feature pyramid network in turn, and performing position regression on each pixel point in the bounding box; The method comprises: compressing the FCOS model according to the recognition accuracy based on the greedy algorithm to obtain a compressed model structure, comprising combining the separated layers again based on the greedy algorithm to obtain a layer combination with a recognition accuracy greater than an expected accuracy, and obtaining a compressed model structure; the number of layers of the compressed model structure is less than the number of layers of the FCOS model before compression; The separated layers are combined again based on the greedy algorithm to obtain a layer combination with a recognition accuracy greater than the expected accuracy, and a compressed model structure is obtained, including: arranging each trained layer in descending order according to the recognition accuracy; selecting an optimal layer structure as the basic layer structure at the beginning, and taking the recognition accuracy of this layer as the current optimal recognition accuracy; adding a suboptimal layer structure to the basic layer structure according to the accuracy sorting table of the layered training to form a layer combination, training and recording the recognition accuracy of this layer combination; if the recognition accuracy of this layer combination is lower than the current optimal recognition accuracy, stopping the compression process and taking the layer structure before the combination as the compression result; if the recognition accuracy of this layer combination is higher than the current optimal recognition accuracy, adding the next layer again until adding layers no longer improves the recognition accuracy or all layers are added.

2. The method according to claim 1, characterized in that Before using the multiple sets of training data to perform hierarchical training on the designated feature layers in the first-order full convolution target detection FCOS model, the method further includes: Preprocessing the gastroscope images, and using the preprocessed gastroscope images to input into the FCOS model for training; The preprocessing includes at least one of the following: scaling and cropping processing, de-averaging processing and normalization processing.

3. The method according to claim 2, characterized in that The multi-layer feature map includes a P3 layer, a P4 layer, a P5 layer, a P6 layer and a P7 layer; wherein the P3 layer is obtained by convolving the feature map C3 of the backbone network with a 1×1 convolution kernel; the P4 layer is obtained by convolving the feature map C4 of the backbone network with a 1×1 convolution kernel; the P5 layer is obtained by convolving the feature map C5 of the backbone network with a 1×1 convolution kernel; the P6 layer is obtained by passing the output result of the P5 layer through a convolution layer with a step size of 2; the P7 layer is obtained by passing the output result of the P6 layer through a convolution layer with a step size of 2.

4. The method according to claim 1, characterized in that: The loss function used in the training process is expressed by the following formula: Among them, p x,y is the pixel category output, c * x,y is the category label, t x,y is the regression output of the pixel, t * x,y is the regression label, L cls is the category error, calculated using focal loss FocalLoss, L reg is the regression error, calculated using IoU loss, N pos represents the number of positive samples, is an indicator, when is equal to 1 when , otherwise it is equal to 0.

5. The method according to claim 1, characterized in that After the FCOS model is compressed based on the greedy algorithm according to the recognition accuracy to obtain the compressed model structure, the method further includes: Inputting the gastroscope images to be identified in the test set into the compressed model structure to obtain multiple prediction boxes; The prediction box is screened using a non-maximum suppression algorithm to obtain a prediction result; The compressed model structure is tested using the prediction results.

6. The method according to claim 5, characterized in that The using the prediction result to test the compressed model structure includes: Using the prediction results to calculate the average precision mean index, the recognition accuracy of the compressed model structure is obtained; The prediction result is used to calculate the number of transmission frames per second to obtain the recognition speed of the compressed model structure.

7. A gastroscope image lesion recognition device based on FCOS algorithm for use in the method according to any one of claims 1 to 6, characterized in that: The device comprises: A data acquisition module, used to acquire multiple sets of training data, each set of training data includes a gastroscopic image and a lesion category and lesion area of ​​the gastroscopic image; A hierarchical training module is used to perform hierarchical training on a specified feature layer in a first-order full convolution target detection FCOS model using the multiple sets of training data to obtain a recognition accuracy corresponding to each trained layer; The model compression module is used to compress the FCOS model according to the recognition accuracy based on a greedy algorithm to obtain a compressed model structure, and the compressed model structure is used to locate and classify lesions in the input gastroscopy image.

Citation Information

Patent Citations

  • Face detection method based on optimized full convolution neural network

    CN109034119A

  • Deep learning atrial septal defect detection method and device

    CN111915557A

  • Automated lesion detection, segmentation, and longitudinal identification

    US20200085382A1

  • Target Re-Identification

    US20200218888A1

  • Object identification method, system and device, and storage medium

    WO2019201187A1