Image area intelligent segmentation method and system for realizing colonoscope
By performing grayscale enhancement and contour recognition on colonoscopy images, enhancing training samples were constructed and the benchmark image segmentation network model was trained, which solved the robustness and applicability problems of small polyp segmentation and achieved a higher recognition accuracy.
Patent Information
- Application Number
- CN202510771865.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-19
AI Technical Summary
Existing image segmentation and recognition models lack robustness and applicability when identifying colorectal polyps, especially small polyps. They have difficulty accurately locating and segmenting boundaries and are prone to missing small contour boundaries.
After the colonoscopy images are preliminarily segmented using the benchmark image segmentation network model, they are converted into grayscale image blocks and grayscale enhancement is performed. The first contour recognition algorithm is used to identify closed contours, and enhanced training samples are constructed in a semi-supervised manner to train the benchmark image segmentation network model to improve the model's ability to segment small polyps.
The ability to accurately segment small polyps, background and polyp masses with blurred edges in colonoscopy images has been improved, significantly improving the recognition accuracy of the model.
Smart Images

Figure CN120672704A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular relates to a method and system for intelligently segmenting image areas of a colonoscope, a non-volatile computer-readable storage medium for implementing the method, a computer program product, and an electronic device. Background Art
[0002] Colorectal cancer is one of the three most common cancers worldwide and a common cause of cancer death. The gold standard for early colorectal cancer screening is the use of a colonoscopy to detect intestinal polyps. This not only clearly demonstrates the lesions but also allows for the treatment of certain intestinal diseases. Endoscopists can conduct a comprehensive examination of the entire colorectum under a visual lens, providing information on the location and contours of colorectal polyps. This allows doctors to remove polyps before they develop into colorectal cancer, effectively preventing the disease.
[0003] Traditional medical image segmentation and polyp detection require the operator to achieve a high degree of hand-eye coordination, and missed detections are still inevitable. With the rapid update of technologies such as image processing and artificial intelligence, computer-aided diagnosis combined with artificial intelligence technology can help identify lesions, thereby reducing the missed detection rate of polyps. Automatic polyp detection and segmentation methods generally include texture-based, color-based, shape-based, and model recognition and segmentation methods that integrate multiple information. For example, the Chinese invention patent application with application number CN2024115293263 proposes a colonoscopic polyp image segmentation method based on a hybrid model; the colonoscopic polyp image segmentation method with application number CN2022108589184 is a CNN and Transformer fusion method.
[0004] However, unlike conventional target image region segmentation and recognition, colorectal polyps vary greatly in size and shape. Furthermore, they closely resemble the surrounding normal mucosal tissue in color and texture. The boundaries between polyps, especially small ones, and the surrounding normal mucosal tissue are very fuzzy, posing a significant challenge for accurate location and identification. Existing image segmentation and recognition models can only produce preliminary results for very distinct polyp areas, but are prone to missing subtle boundaries, particularly those of small polyps. This results in insufficient robustness and applicability. Summary of the Invention
[0005] To solve the above technical problems, the present invention proposes a method and system for realizing intelligent segmentation of colonoscopy image areas, a non-volatile computer-readable storage medium, a computer program product, and an electronic device for realizing the method.
[0006] In a first aspect of the present invention, a method for intelligently segmenting a colonoscopy image region is proposed. The method comprises:
[0007] Performing image segmentation on the original colonoscopy image using a benchmark image segmentation network model to obtain a plurality of first segmented region image blocks;
[0008] For each first segmented region image block, convert it into a grayscale image block, and perform a grayscale enhancement operation on the target region in the grayscale image;
[0009] identifying, based on a first contour recognition algorithm, a closed contour in the grayscale image block after the grayscale enhancement operation is performed, to obtain a plurality of second segmented region image blocks, each of the second segmented region image blocks being defined by a closed contour;
[0010] Determining enhanced training samples based on the second segmented region image blocks;
[0011] Training the benchmark image segmentation network model using enhanced training samples;
[0012] When the training end condition is met, the trained benchmark image segmentation network model is used to perform regional intelligent segmentation of the colonoscopy image.
[0013] In the third aspect of the present invention, a non-volatile computer-readable storage medium is also provided for storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes all or part of the steps of the aforementioned method for realizing intelligent segmentation of image areas of a colonoscope.
[0014] In the fourth aspect of the present invention, a computer device is also proposed, which includes a processor and a memory, the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the computer device executes the aforementioned method for realizing intelligent segmentation of image areas of colonoscopy.
[0015] In a fifth aspect of the present invention, a computer program product is further proposed, which includes a computer program. When the computer program is executed, all or part of the steps of the aforementioned method for intelligent segmentation of image regions for colonoscopy are implemented.
[0016] The technical solution of the present application uses a reference image segmentation network model to perform image segmentation on the original colonoscopy image to obtain multiple first segmentation region image blocks, which are converted into grayscale image blocks to perform grayscale enhancement operations; closed contours are identified based on a first contour recognition algorithm to obtain multiple second segmentation region image blocks; enhanced training samples are determined based on the second segmentation region image blocks; the reference image segmentation network model is trained using the enhanced training samples; when the training end conditions are met, the trained reference image segmentation network model is used to perform intelligent regional segmentation of the colonoscopy image. The technical solution of the present invention performs contour recognition after grayscale enhancement to obtain enhanced training samples, which can improve the model's ability to accurately segment small polyps, backgrounds, and approximate polyp blocks with blurred edges in colonoscopy images. Further advantages of the present invention will be further reflected in detail in the specific embodiments section in conjunction with the drawings in the specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a flow chart of the main body of a method for realizing intelligent segmentation of a colonoscopy image region according to an embodiment of the present invention;
[0019] Figure 2 It is a flowchart of converting the segmented region image blocks into grayscale image blocks and performing grayscale scanning frame scanning;
[0020] Figure 3 It is a schematic diagram of the grayscale scanning frame scanning column by column;
[0021] Figure 4 It is a schematic diagram of the functional unit combination of a system for realizing intelligent segmentation of colonoscopy image regions according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In the specific implementation of this application, if the embodiments of the relevant technical solutions involve user-related data, when the embodiments of this application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0023] Before introducing the various embodiments of the present invention, the relevant prior art is first introduced to introduce the technical problems of the present invention and the starting point for improvement of the relevant technical solutions.
[0024] In recent years, with the rapid development of computer vision, deep learning technologies, particularly convolutional neural networks (CNNs), have achieved significant breakthroughs in image processing. Through multi-layer convolution and pooling operations, CNNs can automatically learn image features and effectively handle complex visual tasks, including image detection, classification, and segmentation.
[0025] Image detection, classification, and segmentation include methods based on thresholding, edge and texture information, region analysis, and mathematical morphology. These methods typically rely on predefined rules or features, such as pixel grayscale values, color information, and texture features. Threshold segmentation methods segment colonoscopy images into foreground (polyp) and background components by setting a fixed or adaptive threshold. Specifically, threshold-based segmentation methods divide pixels into different regions by setting a grayscale threshold within the image. This process relies on the grayscale value of each pixel and its relationship to the threshold, thereby achieving binary image segmentation. Edge detection methods use edge detection algorithms to identify edge information in the image and then perform segmentation based on this edge information. For texture-based polyp detection, most methods use different sets of texture features extracted from gray-level co-occurrence matrices (GLCMs), local binary patterns (LBPs), opponent color-local binary patterns (OC-LBPs), or wavelet transforms (WTs). Region-based methods divide the image into multiple regions and identify regions based on the similarity of color, texture, shape, and other features within the same region.
[0026] It can be seen that no matter which method is used, it is necessary to accurately collect the corresponding features (pixel grayscale value, color information and texture features) and determine the adaptation rules (threshold, edge value). Only when the corresponding features and the adaptation rules are relatively obvious, such as the edge contours of the foreground and background are relatively obvious, the edge contours of the target area (polyp area) are significant, and the target area can be clearly distinguished from other areas, can the above-mentioned related image recognition and segmentation methods play a better role.
[0027] However, for colonoscopy image recognition and segmentation, the target of segmentation and recognition is the polyp part in the color colonoscopy image. The appearance and shape characteristics of colon polyps are affected by many factors, including the distance between the colonoscope and the polyp, the intestinal preparation, and the differences between different polyps. Different from ordinary target image area segmentation and recognition, colorectal polyps vary greatly in size and shape. At the same time, colorectal polyps and the surrounding normal mucosal tissue are highly similar in color and texture. The boundary between polyps, especially small polyps, and the surrounding normal mucosal tissue is very fuzzy, which brings great challenges to accurate positioning and boundary determination. Existing image segmentation and recognition models can often only identify preliminary results for very obvious polyp blocks, but are prone to missing small contour boundaries, especially small polyp blocks with small contours. The robustness and applicability of image segmentation and recognition models are insufficient.
[0028] To this end, the technical solution of this application is proposed, which focuses on performing contour recognition after grayscale enhancement to obtain enhanced training samples, which can improve the model's ability to accurately segment small polyps, backgrounds, and fuzzy-edge approximate polyp masses in colonoscopy images.
[0029] See also Figure 1 , Figure 1 A main flow chart of a method for intelligently segmenting a colonoscopy image region according to an embodiment of the present invention is shown.
[0030] Figure 1 The main flow chart of the method embodiment shows five process sub-frames. For the convenience of subsequent description, Figure 1 The five process sub-boxes are marked as S110-S160 as follows (Figure Figure 1 Step numbers S110-S160 are omitted):
[0031] S110: performing image segmentation on the original colonoscopy image using a reference image segmentation network model to obtain a plurality of first segmented region image blocks;
[0032] S120: converting each first segmented region image block into a grayscale image block, and performing a grayscale enhancement operation on the target region in the grayscale image;
[0033] S130: identifying a closed contour in the grayscale image block after the grayscale enhancement operation based on a first contour recognition algorithm, to obtain a plurality of second segmented region image blocks, each of which is defined by a closed contour;
[0034] S140: Determine enhanced training samples based on the second segmented region image blocks;
[0035] S150: training the benchmark image segmentation network model using enhanced training samples;
[0036] S160: When the training end condition is met, the trained benchmark image segmentation network model is used to perform intelligent regional segmentation of the colonoscopy image.
[0037] Next, combine Figure 2-Figure 3 , the above steps S11-S160 are introduced separately.
[0038] Step S110: performing image segmentation on the original colonoscopy image using a reference image segmentation network model to obtain a plurality of first segmented region image blocks.
[0039] exist Figure 1In the method, before step S110, it also includes step S100: constructing a benchmark image segmentation network model library and a contour recognition algorithm library; the benchmark image segmentation network model library includes multiple benchmark image segmentation network models; the contour recognition algorithm library includes multiple contour recognition algorithms.
[0040] The reference image segmentation network model can be an image segmentation network model known in the prior art, that is, a known image segmentation network model based on features such as color, texture, and shape. These image segmentation network models can perform preliminary image segmentation on the original colonoscopy image, thereby identifying multiple basic target image blocks of polyps contained in the original colonoscopy image for those situations where the corresponding features and adaptation rules are relatively obvious, such as when the edge contours of the foreground and background are relatively obvious, the edge contours of the target area (polyp area) are significant, and the target area can be clearly distinguished from other areas.
[0041] It can be understood that each of the multiple basic target image blocks identified at this time is relatively rough and has a large range. Although it is very likely that the image block itself contains a large and obvious polyp area, there is a high possibility that there are other less obvious, small, and potential polyp areas with fuzzy edge contours in the image block. For these polyp areas, since the corresponding features and adaptation rules are relatively unclear, such as the edge contours of the foreground and background are not obvious, the edge contours of the target area (polyp area) are not significant, and the target area cannot be clearly distinguished from other areas, the existing benchmark image segmentation network model is likely to be unable to obtain distinction and recognition results because it has not been specifically trained.
[0042] To this end, the technical solution of the present invention is optimized from this perspective, and then the benchmark image segmentation network model is continued to be updated and trained.
[0043] Model training requires more targeted samples. Based on the sample labeling range, training methods can be categorized as unsupervised, semi-supervised, and fully supervised. Unsupervised training eliminates the need for manual labeling, but requires high sample accuracy, making it difficult to implement directly in the complex scenarios of polyp identification. Fully supervised training requires manual labeling of each sample image, which is labor-intensive and impacts training efficiency. Numerous benchmark image segmentation network models already exist that can initially segment polyps. Therefore, to fully leverage existing research, this embodiment employs a semi-supervised approach for targeted training.
[0044] Specifically, proceed to step S120: for each first segmented region image block, convert it into a grayscale image block, and perform a grayscale enhancement operation on the target region in the grayscale image.
[0045] See also Figure 2, Figure 2 It is a flowchart of converting the segmented region image blocks into grayscale image blocks and performing grayscale scanning frame scanning.
[0046] Specifically, for each first segmented region image block, convert it into a grayscale image block, and perform a grayscale enhancement operation on the target region in the grayscale image, specifically including:
[0047] Obtaining a resolution size M×N of each first segmented region image block, where M and N are both integers greater than 2;
[0048] Constructing an M×N grayscale matrix GM, where each element of the grayscale matrix is the grayscale value corresponding to each pixel position of the grayscale image block;
[0049] Build The grayscale scanning frame of different sizes scans the grayscale matrix GM row by row or column by column; ;
[0050] When the difference between adjacent row elements or column elements contained in adjacent grayscale scanning frames meets a preset condition, grayscale value adjustment is performed on the adjacent row elements or column elements.
[0051] The original colonoscopy image is an RGB three-channel color image. After being processed in step S110 , a plurality of color first segmented region image blocks are obtained.
[0052] Figure 2 A first segmented region image block is shown, and its resolution is schematically given as 10×12 (this value is merely schematic, used to introduce the principle of the embodiment, and the actual segmentation value is not limited thereto).
[0053] Then, it is converted into a grayscale image block. The size of the grayscale image block is still 10×12, and each pixel position has a grayscale value (0-255). Figure 2 The grayscale image blocks shown are also schematic, which gives the grayscale values of some positions. It can be understood that the values of these grayscale values are determined by the RGB-grayscale conversion formula. Figure 2 The partial grayscale values are clearly marked and do not affect the essence of the technical solution of this application.
[0054] Then, a 10×12 grayscale matrix GM is constructed, where each element of the grayscale matrix is the grayscale value corresponding to each pixel position of the grayscale image block;
[0055] Next, Figure 2 A 3×3 grayscale scanning frame is shown, and the grayscale matrix GM is scanned row by row or column by column.
[0056] During each scan, the grayscale scanning frame captures a 3×3 sub-matrix from the grayscale matrix, and each time two adjacent grayscale scanning frames are used to perform scanning and capturing, such as Figure 2 shown.
[0057] exist Figure 2 In FIG, the submatrix captured by the first grayscale scanning frame is shown as:
[0058] ;
[0059] The submatrix showing the capture of the second grayscale scan frame is:
[0060] ;
[0061] What needs to be explained here is that Figure 2 The grayscale matrix data scanned by the grayscale scanning box below is only for reference.
[0062] Next, when the difference between adjacent row elements or column elements contained in adjacent grayscale scanning frames meets a preset condition, grayscale value adjustment is performed on the adjacent row elements or column elements.
[0063] for Figure 2 In this case, the difference between the adjacent column elements contained in the adjacent grayscale scanning frame is judged to be whether it meets the preset conditions, that is, the following two columns are judged:
[0064] ;
[0065] Specifically, 3×3 judgments are required, that is, to judge whether the differences of (141, 140), (141, 139), (141, 118), (125, 140), (125, 139), (125, 118), (120, 140), (120, 139), (120, 118) meet the preset conditions.
[0066] Preferably, the preset condition may be: the difference range is between 5% and 15%.
[0067] The reason for presetting this condition is that the improvement of the technical solution of the present invention is to strengthen the identification of those potential polyp areas that are not very obvious, small, and have fuzzy edge contours. For these polyp areas, the corresponding features and adaptation rules are relatively not very obvious. For example, the edge contours of the foreground and background are not obvious, the edge contours of the target area (polyp area) are not obvious, and the target area cannot be clearly distinguished from other areas.
[0068] Although not obvious or clearly distinguishable, there are still differences in the grayscale values of these areas on a pixel basis, but the differences are not significant (if the differences were significant, they would have been identified directly in step S110). To characterize this "not significant" difference, practical calibration has shown that when the difference in pixel values (grayscale values) between two adjacent locations is between 5% and 15%, typical baseline image segmentation network models will miss or fail to identify edges or contours.
[0069] To this end, the improvement measure proposed in this embodiment is to perform a grayscale enhancement operation.
[0070] Specifically, when the difference between adjacent row elements or column elements contained in adjacent grayscale scanning frames meets a preset condition, grayscale value adjustment is performed on the adjacent row elements or column elements.
[0071] Assume that the first grayscale scanning frame is adjacent to the second grayscale scanning frame,
[0072] When the difference between an element GM1 in the rightmost column or bottom row of the first grayscale scanning frame and an element GM2 in the leftmost column or top row of the second grayscale scanning frame is between 5% and 15%, the value of one of the elements GM1 and GM2 is reduced or increased.
[0073] With the above Figure 2 For example, the difference ranges of (141, 140), (141, 139), (141, 118), (125, 140), (125, 139), (125, 118), (120, 140), (120, 139), and (120, 118) are as follows:
[0074] ;
[0075] Therefore, one of (125, 140), (125, 139), and (125, 118) needs to be adjusted. The purpose of the adjustment is to make the difference range of the adjusted elements greater than 15% so that the model can recognize the contour or edge, or less than 5%, that is, to ignore such small differences and reduce the amount of subsequent annotation.
[0076] For example, 125 can be adjusted to 100. Of course, other adjustments can be made as long as the above purpose is achieved.
[0077] After the above adjustment, a closed contour is identified in the grayscale image block after the grayscale enhancement operation based on the first contour recognition algorithm to obtain a plurality of second segmented region image blocks, each of which is defined by a closed contour; further, enhanced training samples are determined based on the second segmented region image blocks; and the baseline image segmentation network model is trained using the enhanced training samples;
[0078] When the training end condition is met, the trained benchmark image segmentation network model is used to perform regional intelligent segmentation of the colonoscopy image.
[0079] It can be understood that the closed contours in the grayscale image block after the grayscale enhancement operation are identified based on the first contour recognition algorithm, and the plurality of second segmented region image blocks obtained can be regarded as automatically labeled positive samples and serve as enhanced training samples;
[0080] Specifically, determining the enhanced training sample based on the second segmented region image block specifically includes: using the region image block corresponding to the second segmented region image block in the original colonoscopy image as the enhanced training sample.
[0081] In another aspect, the first contour recognition algorithm further identifies non-closed contours in the grayscale image block after the grayscale enhancement operation, labels the first segmented region image block containing the non-closed contour, and uses the labeled first segmented region image block containing the non-closed contour as the enhanced training sample. The labeling here only needs to be performed on the first segmented region image block containing the non-closed contour, that is, some samples are manually labeled as positive samples or negative samples, while most of the multiple second segmented region image blocks are already automatically labeled as positive samples, thereby achieving semi-supervised training sample construction.
[0082] Further, in Figure 2 Based on this, continue to see Figure 3 , Figure 3 A schematic diagram showing the grayscale scanning frame scanning column by column.
[0083] As mentioned above, the grayscale scanning frame captures a 3×3 sub-matrix from the grayscale matrix, and each time two grayscale scanning frames are used to scan and capture the sub-matrix. After the scanning is completed, the first grayscale scanning frame and the second grayscale scanning frame will continue to scan the grayscale matrix GM row by row or column by column.
[0084] Figure 3 The schematic diagram of column-by-column scanning is shown. The first grayscale scanning frame moves rightward from left to right, column by column, and correspondingly, the second grayscale scanning frame also moves rightward from left to right, column by column.
[0085] Repeat the above process until each column is compared with the adjacent column in terms of difference range and the grayscale value is adjusted accordingly.
[0086] exist Figure 2 and Figure 3 In the embodiment, the size of the grayscale scanning frame used is 3×3. Preferably, the size of the grayscale scanning frame can be determined based on actual scanning accuracy, processing performance of current electronic equipment, and experience.
[0087] Figure 2 and Figure 3 In the example, the size of the grayscale image block is 10×12. When a 3×3 grayscale scanning frame is used, in order to ensure that each column / row has a difference range comparison with the adjacent column / row and performs the corresponding grayscale value adjustment process, a necessary repeated scanning process will occur.
[0088] To reduce repeated scanning, it is preferred , 、 is a positive integer and ensures is an integer.
[0089] Based on the introduction of the method embodiment, see Figure 4 , Figure 4 It is a schematic diagram of the functional unit combination of a system for realizing intelligent segmentation of colonoscopy image regions according to an embodiment of the present invention.
[0090] Figure 4 The system shown includes a reference image segmentation network model library, a contour recognition algorithm library, a grayscale conversion unit, a training sample determination unit, a training unit, and a scheduling unit;
[0091] The reference image segmentation network model library includes multiple reference image segmentation network models; the contour recognition algorithm library includes multiple contour recognition algorithms;
[0092] The scheduling unit selects a reference image segmentation network model from the reference image segmentation network model library to perform image segmentation on the original colonoscopy image to obtain a plurality of first segmentation region image blocks;
[0093] For each first segmented region image block, the grayscale conversion unit converts it into a grayscale image block, and performs a grayscale enhancement operation on the target region in the grayscale image;
[0094] The scheduling unit selects a contour recognition algorithm from the contour recognition algorithm library to identify a closed contour in the grayscale image block after the grayscale enhancement operation is performed, to obtain a plurality of second segmented region image blocks, each of which is defined by a closed contour;
[0095] The training sample determining unit determines an enhanced training sample based on the second segmented region image block;
[0096] The training unit trains the benchmark image segmentation network model using enhanced training samples;
[0097] When the training end condition is met, the scheduling unit saves the trained reference image segmentation network model to the reference image segmentation network model library, and the scheduling unit uses the trained reference image segmentation network model to perform regional intelligent segmentation of the colonoscopy image;
[0098] Furthermore, the scheduling unit selects a different reference image segmentation network model from the reference image segmentation network model library each time;
[0099] and / or,
[0100] The scheduling unit selects a different contour recognition algorithm from the contour recognition algorithm library each time.
[0101] It can be understood that the relevant principles and steps of the system embodiment correspond to and are consistent with those of the method embodiment, so there is no need to repeat the description, and the two can be quoted and referenced to each other.
[0102] After the technical solution of this application is improved, the enhanced samples are obtained in a semi-supervised manner to conduct targeted re-training of the existing benchmark image segmentation network model, which can significantly improve the recognition accuracy of the existing benchmark image segmentation network model without adding additional hardware or software algorithm deployment.
[0103] In summary, by using a benchmark image segmentation network model to perform image segmentation on the original colonoscopy image, a plurality of first segmented region image blocks are obtained, which are converted into grayscale image blocks to perform grayscale enhancement operations; closed contours are identified based on a first contour recognition algorithm to obtain a plurality of second segmented region image blocks; enhanced training samples are determined based on the second segmented region image blocks; the benchmark image segmentation network model is trained using the enhanced training samples; and when the training end conditions are met, the trained benchmark image segmentation network model is used to perform regional intelligent segmentation of the colonoscopy image. The technical solution of the present invention performs contour recognition after grayscale enhancement to obtain enhanced training samples, which can improve the model's ability to accurately segment small polyps, background, and fuzzy-edge approximate polyp blocks in colonoscopy images.
[0104] For other technologies, principles, algorithms or models not elaborated in detail in this application, please refer to the existing technology.
[0105] In the preceding embodiments, the present invention provides multiple embodiments, each of which can constitute an independent technical solution and potentially contribute to the existing technology and solve corresponding technical problems. However, it should be noted that different embodiments can be combined with each other without violating logic; at the same time, each embodiment can solve at least one technical problem, but it is not required that each individual embodiment solve multiple or all technical problems.
[0106] The foregoing has shown and described the method embodiments and system of the present invention, but it is understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for intelligently segmenting image regions for colonoscopy, characterized in that: The method comprises: Performing image segmentation on the original colonoscopy image using a benchmark image segmentation network model to obtain a plurality of first segmented region image blocks; For each first segmented region image block, convert it into a grayscale image block, and perform a grayscale enhancement operation on the target region in the grayscale image; identifying, based on a first contour recognition algorithm, a closed contour in the grayscale image block after the grayscale enhancement operation is performed, to obtain a plurality of second segmented region image blocks, each of the second segmented region image blocks being defined by a closed contour; Determining enhanced training samples based on the second segmented region image blocks; Training the benchmark image segmentation network model using enhanced training samples; When the training end condition is met, the trained benchmark image segmentation network model is used to perform regional intelligent segmentation of the colonoscopy image.
2. The method for intelligently segmenting image regions for colonoscopy according to claim 1, wherein: For each first segmented region image block, convert it into a grayscale image block, and perform a grayscale enhancement operation on the target region in the grayscale image, specifically including: Obtaining a resolution size M×N of each first segmented region image block, where M and N are both integers greater than 2; Constructing an M×N grayscale matrix GM, where each element of the grayscale matrix is the grayscale value corresponding to each pixel position of the grayscale image block; Build Grayscale scanning frames of different sizes scan the grayscale matrix GM row by row or column by column; when the difference between adjacent row elements or column elements contained in adjacent grayscale scanning frames meets a preset condition, grayscale value adjustment is performed on the adjacent row elements or column elements.
3. The method for intelligently segmenting image regions for colonoscopy according to claim 1, wherein: The first contour recognition algorithm also identifies non-closed contours in the grayscale image block after the grayscale enhancement operation is performed, labels the first segmented area image block containing the non-closed contours, and uses the labeled first segmented area image block containing the non-closed contours as the enhanced training sample.
4. The method for intelligently segmenting image regions for colonoscopy according to claim 1, wherein: Determining enhanced training samples based on the second segmented region image blocks specifically includes: using region image blocks corresponding to the second segmented region image blocks in the original colonoscopy image as the enhanced training samples.
5. The method for intelligently segmenting image regions for colonoscopy according to claim 2, wherein: When the difference between adjacent row elements or column elements contained in adjacent grayscale scanning frames meets a preset condition, grayscale value adjustment is performed on the adjacent row elements or column elements, specifically including: Assume that the first grayscale scanning frame is adjacent to the second grayscale scanning frame, When the difference between an element GM1 in the rightmost column or bottom row of the first grayscale scanning frame and an element GM2 in the leftmost column or top row of the second grayscale scanning frame is between 5% and 15%, the value of one of the elements GM1 and GM2 is reduced or increased.
6. A system for intelligently segmenting image regions for colonoscopy, the system comprising a reference image segmentation network model library, a contour recognition algorithm library, a grayscale conversion unit, a training sample determination unit, a training unit, and a scheduling unit; Its characteristics are: The reference image segmentation network model library includes multiple reference image segmentation network models; the contour recognition algorithm library includes multiple contour recognition algorithms; The scheduling unit selects a reference image segmentation network model from the reference image segmentation network model library to perform image segmentation on the original colonoscopy image to obtain a plurality of first segmentation region image blocks; For each first segmented region image block, the grayscale conversion unit converts it into a grayscale image block, and performs a grayscale enhancement operation on the target region in the grayscale image; The scheduling unit selects a contour recognition algorithm from the contour recognition algorithm library to identify a closed contour in the grayscale image block after the grayscale enhancement operation is performed, to obtain a plurality of second segmented region image blocks, each of which is defined by a closed contour; The training sample determining unit determines an enhanced training sample based on the second segmented region image block; The training unit trains the benchmark image segmentation network model using enhanced training samples; When the training end condition is met, the scheduling unit uses the trained reference image segmentation network model to perform regional intelligent segmentation of the colonoscopy image.
7. The system for realizing intelligent segmentation of colonoscopy image regions according to claim 6, characterized in that: When the training end condition is met, the scheduling unit saves the trained reference image segmentation network model into the reference image segmentation network model library.
8. The system for realizing intelligent segmentation of image regions for colonoscopy according to claim 7, characterized in that: The scheduling unit selects a different reference image segmentation network model from the reference image segmentation network model library each time; and / or, The scheduling unit selects a different contour recognition algorithm from the contour recognition algorithm library each time.
9. A computer program product, characterized in that The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a computing device, a method for intelligently segmenting image regions for colonoscopy according to any one of claims 1 to 5 is implemented.