An interactive pathological section image segmentation method, device, equipment and medium
This pathological slide image segmentation method, which utilizes self-supervised comparative learning and user interaction, solves the problem of rapid tumor region localization in pathological slide image segmentation. It achieves fast and accurate pathological slide image segmentation, reduces user workload, and improves the interpretability of the segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE RIVER DELTA GUOZHI (SHANGHAI) INTELLIGENT MEDICAL TECH CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, the segmentation of pathological slide images is time-consuming and labor-intensive due to the heterogeneity and small size of tumor regions, making it difficult to quickly locate tumor regions. Furthermore, the supervised training that relies on a large amount of labeled data is limited.
A feature extraction model is constructed using self-supervised contrastive learning. By combining image patch similarity matrix and minimum cut algorithm with user interaction, semi-automatic pathological slide image segmentation is achieved. During the segmentation process, the annotation steps of adjacent non-cancerous regions and tumor regions are divided into two steps: first, the adjacent non-cancerous regions are annotated, and then the tumor regions are located with the help of similarity analysis.
Without the need for labeled data, it achieves rapid and accurate segmentation of pathological slide images, reduces user workload, improves the real-time performance and interpretability of segmentation, and overcomes the difficulty of limited data labeling.
Smart Images

Figure CN122391637A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an interactive method, apparatus, device, and medium for segmenting pathological slide images. Background Technology
[0002] Pathological slides are the gold standard for cancer diagnosis and prognosis, containing a wealth of valuable information. However, pathological slide images have extremely high resolution, making their interpretation time-consuming and labor-intensive. In recent years, with the development of deep learning technology, more and more researchers have developed deep learning-based algorithms for pathological slide image processing and analysis. Among these, pathological slide image segmentation aims to segment regions of interest (ROIs) within pathological slides, typically tumor regions, thereby enabling computer-aided medical intervention or providing prior knowledge for downstream tasks.
[0003] In related technologies, accurate image segmentation models are built through supervised training, relying on a large amount of diverse labeled data. However, in practical applications, the heterogeneity of tumors and the potentially small size of tumor regions make the interpretation of pathological slide images highly demanding of the annotator's expertise, and the annotation process is time-consuming and labor-intensive, making it difficult to quickly locate tumor regions. Therefore, the development of related industries and research has always been limited by the practical difficulty of having limited labeled data. Summary of the Invention
[0004] This invention provides an interactive pathological slide image segmentation method, apparatus, device, and medium. Based on self-supervised contrastive learning, it constructs an interactive semi-automatic pathological slide image segmentation mode, which can achieve fast and accurate segmentation of pathological slide images without the need for labeled data training by analyzing the similarity of image block features.
[0005] According to one aspect of the present invention, an interactive pathological slide image segmentation method is provided, the method comprising:
[0006] A pre-trained feature extraction model is used to extract features from multiple foreground image patches in a target pathological slide image to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning approach, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch;
[0007] In response to the adjacent normal image block annotation operation, a reference tumor image block is obtained by performing a similarity search on the unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks;
[0008] In response to the tumor image patch annotation operation, a directed graph is constructed based on the image patch similarity matrix, the foreground image patch, and the image patch identifier; wherein, the tumor image patch annotation operation is implemented based on the reference tumor image patch, the image patch identifier includes adjacent normal markers and tumor markers generated by the user performing image patch annotation operations on the display interface, and the directed graph is used to describe the directional relationship between the foreground image patches;
[0009] The directed graph is segmented using the minimum cut algorithm to obtain the target segmentation result.
[0010] According to another aspect of the present invention, an interactive pathological slide image segmentation apparatus is provided, the apparatus comprising:
[0011] A similarity matrix construction module is used to extract features from multiple foreground image patches in a target pathological slide image using a pre-trained feature extraction model to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning method, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch;
[0012] A reference image block determination module is used to respond to an adjacent normal image block annotation operation by performing a similarity search on unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block to obtain a reference tumor image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks;
[0013] A directed graph construction module is used to construct a directed graph based on the image patch similarity matrix, the foreground image patch, and the image patch identifier in response to the tumor image patch annotation operation; wherein, the tumor image patch annotation operation is implemented based on the reference tumor image patch, the image patch identifier includes the adjacent normal identifier and the tumor identifier generated by the user performing the image patch annotation operation on the display interface, and the directed graph is used to describe the directional relationship between the foreground image patches;
[0014] The directed graph segmentation module is used to segment the directed graph using the minimum cut algorithm to obtain the target segmentation result.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the interactive pathological slide image segmentation method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the interactive pathological slide image segmentation method according to any embodiment of the present invention.
[0018] The technical solution of this invention utilizes a pre-trained feature extraction model to extract features from multiple foreground image patches in a target pathological slide image and construct an image patch similarity matrix. The feature extraction model is constructed using a self-supervised contrastive learning approach, and the image patch similarity matrix characterizes the similarity between various foreground image patches. In response to the adjacent normal image patch annotation operation, a reference tumor image patch is obtained by performing a similarity search on unannotated image patches within the foreground image patch based on the annotated image patches. The annotated image patches include adjacent normal image patches and tumor image patches. In response to the tumor image patch annotation operation, a directed graph is constructed based on the image patch similarity matrix, foreground image patches, and image patch identifiers. The tumor image patch annotation operation is implemented based on the reference tumor image patch, and the image patch identifiers include adjacent normal identifiers and tumor identifiers generated by the user's image patch annotation operation on the display interface. The directed graph is used to describe the directional relationships between foreground image patches. The target segmentation result is obtained by segmenting the directed graph using a minimum cut algorithm. This technical solution constructs an interactive, semi-automatic pathological slide image segmentation mode based on self-supervised contrastive learning. It provides segmentation suggestions to users through similarity analysis of image patch features and continuously improves the segmentation results based on user input. This enables rapid and accurate segmentation of pathological slide images without the need for labeled data training, thus overcoming the difficulty of limited data labeling. Furthermore, considering the potential difficulty in quickly locating tumor regions in real-world scenarios due to their small size, this invention divides the labeling process of adjacent cancerous regions and tumor regions into two steps. First, the user labels easily identifiable adjacent cancerous regions. Then, image patch feature similarity analysis assists in locating the tumor region. This allows for the retrieval of heterogeneous tumor regions based on relatively regular adjacent cancerous regions, thus addressing the model's generalization requirements to a certain extent.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of an interactive pathological slide image segmentation method provided according to an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram illustrating the process of constructing an image patch similarity matrix according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of user interaction and image patch retrieval according to an embodiment of the present invention;
[0024] Figure 4A This is a schematic diagram of a directed graph construction provided by an embodiment of the present invention;
[0025] Figure 4B This is a schematic diagram of a segmentation result provided by an embodiment of the present invention;
[0026] Figure 5 This is a flowchart of another interactive pathological slide image segmentation method provided according to an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of the structure of an interactive pathological slide image segmentation device according to an embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram of the structure of an electronic device that implements an interactive pathological slide image segmentation method according to an embodiment of the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of an interactive pathological slide image segmentation method provided in Embodiment 1 of the present invention. This embodiment is applicable to the rapid and accurate segmentation of pathological slide images in a multi-round interactive mode. The method can be executed by an interactive pathological slide image segmentation device, which can be implemented in hardware and / or software and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:
[0033] S110, a pre-trained feature extraction model is used to extract features from multiple foreground image patches in the target pathological slide image to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning method, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch.
[0034] The feature extraction model can refer to a neural network model constructed using self-supervised contrastive learning, capable of extracting deep features from various image patches in a pathological slide image. These deep features represent the semantic features of local regions within the pathological slide image, thus laying the foundation for analyzing tissue distribution in the image. It should be noted that this invention, by leveraging a self-supervised contrastive learning framework, can train a highly generalizable feature extraction model using a large number of pathological slide images without additional annotation, demonstrating superior performance in related downstream tasks. The target pathological slide image can refer to a pathological slide image requiring image segmentation, where the purpose of image segmentation is to distinguish between adjacent non-cancerous regions and tumor regions within the pathological slide image. The foreground image can refer to a local image within the pathological slide image containing both adjacent non-cancerous and tumor regions. A foreground image patch can refer to a sub-image obtained by dividing the foreground image into data blocks.
[0035] In this embodiment, firstly, a target pathological slide image is acquired, and local images containing adjacent non-cancerous regions and tumor regions are extracted as foreground images. The foreground images are then divided into multiple foreground image blocks. Next, a pre-trained feature extraction model is used to extract features from these multiple foreground image blocks, and an image block similarity matrix is constructed based on the feature extraction results. Optionally, constructing an image block similarity matrix by extracting features from multiple foreground image blocks in the target pathological slide image using a pre-trained feature extraction model includes: determining the foreground image corresponding to the target pathological slide image; dividing the foreground image into multiple non-overlapping image blocks; inputting the foreground image blocks into the pre-trained feature extraction model for feature extraction; determining the image block features based on the output of the feature extraction model; determining the image block feature similarity between every two foreground image blocks; and constructing an image block similarity matrix based on the image block feature similarity.
[0036] For details, see Figure 2 First, threshold segmentation is used to extract the foreground image containing the tumor region from the target pathological slide image. The segmentation threshold distinguishes the foreground (adjacent area to the tumor) from the background (usually white area) in the pathological slide image. Then, the foreground image is divided into... Non-overlapping image blocks As a foreground image patch. Then each foreground image patch... The input is fed into a pre-trained feature extraction model E for feature extraction. Output depth features As image patch features. Next, a similarity measurement function is used. Calculate the feature similarity between any two foreground image patches. Then, an image patch similarity matrix is constructed using image patch feature similarity. For example, the image patch similarity matrix can be represented as... Furthermore, in order to ensure After obtaining the image patch feature similarity, it can be preprocessed, for example, the image patch similarity matrix can be represented as... ,in and This is a preset constant. It should be noted that, to ensure the accuracy of image patch feature similarity calculation, the selected similarity metric function needs to be consistent with the feature extraction model training process. For example, the similarity metric function can be constructed based on cosine similarity.
[0037] S120, in response to the adjacent normal image block annotation operation, a reference tumor image block is obtained by performing a similarity search on the unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks.
[0038] The adjacent tumor image patch annotation operation refers to the user's annotation of adjacent region image patches on the foreground image patch based on the current segmentation result. The reference tumor image patch refers to an image patch in the unannotated image patch that is most likely to belong to the tumor region, and can be used to assist the user in the tumor image patch annotation operation.
[0039] In this embodiment, initialization operations need to be performed before the interaction begins. Specifically, this may include initializing the similarity between adjacent to the tumor and the similarity between the tumor and the adjacent to each foreground image patch to zero, and initializing the set of adjacent to the tumor image patches. With tumor image patch set The current segmentation result is empty, and the initialization is also empty. Adjacent similarity is used to characterize the similarity between unlabeled image patches and adjacent image patches within labeled image patches, while tumor similarity is used to characterize the similarity between unlabeled image patches and tumor image patches within labeled image patches. It's understood that unlabeled image patches with lower adjacent similarity and higher tumor similarity are more likely to belong to a tumor region. The adjacent image patch set stores adjacent image patches from labeled image patches; that is, the image patches in the adjacent image patch set are user-labeled adjacent image patches. The tumor image patch set stores tumor image patches from labeled image patches; that is, the image patches in the tumor image patch set are user-labeled tumor image patches.
[0040] See Figure 3 The segmentation result after the initialization operation or the segmentation result generated in the previous round of interaction (i.e., Figure 3 The segmentation image (in the image) is displayed to the user as the current segmentation result through the display interface. The user selects one or more foreground image blocks based on the current segmentation result and adds adjacent image markers to achieve adjacent image block annotation. In response to the user's adjacent image block annotation operation, the foreground image block corresponding to the adjacent image marker is first added to the adjacent image block set. Then, based on the labeled image patches in the foreground image patch (i.e., the set of adjacent image patches) and tumor image patch collection (All image patches) perform similarity searches on unlabeled image patches in the foreground image patch, and identify multiple image patches that are most likely to belong to the tumor region as reference tumor image patches to recommend to the user.
[0041] In this embodiment, optionally, a reference tumor image block is obtained by performing a similarity search on unlabeled image blocks in a foreground image block based on labeled image blocks in a foreground image block. This includes: determining the adjacent normal similarity of the unlabeled image block based on the similarity between adjacent normal image blocks in the labeled image block and the unlabeled image block; determining the tumor similarity of the unlabeled image block based on the similarity between the tumor image block in the labeled image block and the unlabeled image block; sorting the adjacent normal similarity of the unlabeled image block in ascending order to obtain a first result, and sorting the tumor similarity of the unlabeled image block in descending order to obtain a second result; determining the reference tumor image block based on the unlabeled image blocks corresponding to the first first number of adjacent normal similarities in the first result and the unlabeled image blocks corresponding to the first second number of tumor similarities in the second result.
[0042] Specifically, for those not belonging to the adjacent image patch set and tumor image patch collection Unlabeled image patches Calculate the unlabeled image patches separately With adjacent image patch set The similarity between each adjacent normal image patch is calculated, and the sum of these similarities yields the unlabeled image patch. similarity to adjacent cancer cells In other words, adjacent similarity is used to represent the sum of similarities between an unlabeled image patch and image patches in the adjacent image patch set, and can be expressed as: Similarly, for images that do not belong to the adjacent normal image patch set... and tumor image patch collection Unlabeled image patches Calculate the unlabeled image patches separately With tumor image patch set The similarity between each tumor image patch is calculated, and the sum of the similarities is used to obtain the unlabeled image patch. Tumor similarity In other words, tumor similarity is used to represent the sum of similarities between unlabeled image patches and image patches in the tumor image patch set, and can be expressed as: .
[0043] After determining the adjacent-tumor similarity and tumor similarity of each unlabeled image patch, the adjacent-tumor similarity of the unlabeled image patches can be sorted in ascending order to obtain a first result. In the first result, the higher the ranking of the adjacent-tumor similarity, the greater the probability that the unlabeled image corresponding to it belongs to a tumor region. Then, the tumor similarity of the unlabeled image patches can be sorted in descending order to obtain a second result. In the second result, the higher the ranking of the tumor similarity, the greater the probability that the unlabeled image corresponding to it belongs to a tumor region. Subsequently, a first number of adjacent-tumor similarities from the first result and a second number of tumor similarities from the second result can be selected, and the unlabeled image patches corresponding to the selected adjacent-tumor and tumor similarities are determined as reference tumor image patches. The first and second numbers can be set according to actual needs, and can be set to the same or different values. Furthermore, since the selected adjacent-tumor and tumor similarities may correspond to the same image patch, i.e., there are identical image patches in the reference tumor image patch, image patch deduplication is required to avoid image patch redundancy. The number of reference tumor image blocks that do not require deduplication is equal to the sum of the first number and the second number, while the number of reference tumor image blocks that require deduplication is less than the sum of the first number and the second number.
[0044] It should be noted that during the initial interaction, due to the tumor image patch set Initialized to empty, the set of adjacent normal image patches is generated after the annotation operation of adjacent normal image patches is completed. There are labeled image patches, while the tumor image patch set... There are no labeled image patches in the image (i.e.) (Still empty), at this time no image patch is labeled. Actually a collection of adjacent normal images Other foreground image patches besides these. In this case, unlabeled image patches can be directly included. Tumor similarity Set to the same preset value (such as zero or other non-zero constant), and when sorting tumor similarity, you can use random sorting or not sort tumor similarity.
[0045] S130, in response to the tumor image block annotation operation, construct a directed graph based on the image block similarity matrix, the foreground image block, and the image block identifier; wherein, the tumor image block annotation operation is implemented based on the reference tumor image block, and the image block identifier includes the adjacent normal identifier and the tumor identifier generated by the user performing the image block annotation operation on the display interface.
[0046] Tumor image patch annotation refers to the user's annotation of tumor regions on foreground image patches based on the current segmentation result and reference tumor image patches. Image patch annotation specifically includes adjacent normal image patch annotation and tumor image patch annotation. Adjacent normal markers and tumor markers can be used to indicate adjacent normal image patches and tumor image patches annotated by the user, respectively. A directed graph can be described by nodes and directed edges; specifically, a directed graph can be used to describe the directional relationships between foreground image patches.
[0047] In this embodiment, as Figure 3 As shown, users can select one or more foreground image patches to add tumor markers based on the similarity search results (i.e., reference tumor image patches) and the current segmentation results displayed on the interface, thereby achieving tumor image patch annotation. In response to the tumor image patch annotation operation, the foreground image patch corresponding to the tumor marker is first added to the tumor image patch set. Then, a directed graph is constructed based on the image patch similarity matrix, foreground image patches, and image patch identifiers. Specifically, the directed graph can be represented as... , where point set Including source Exchange Point and all foreground image blocks Source Hehuidian Virtual points independent of the foreground image patch; edge set Based on the image patch similarity matrix and image patch identifier definition.
[0048] In this embodiment, optionally, a directed graph is constructed based on the image patch similarity matrix, the foreground image patch, and the image patch identifier, including: creating a source point as a tumor indicator point and creating a sink point as an adjacent normal indicator point; determining the point set of the directed graph based on the source point, sink point, and foreground image patch; determining the edge set of the directed graph based on the point set, the image patch similarity matrix, and the image patch identifier; wherein the edge set includes multiple directed edges; and constructing the directed graph based on the point set and the edge set.
[0049] For details, see Figure 4AFirst, a source point and a sink point are created as the tumor indicator point and the adjacent normal indicator point, respectively. The set of nodes consisting of the source point, the sink point, and the foreground image patch is determined as the point set of the directed graph. Then, multiple directed edges are determined based on the point set, the image patch similarity matrix, and the image patch identifier to form the edge set of the directed graph. Optionally, the edge set of the directed graph is determined based on the point set, the image patch similarity matrix, and the image patch identifier, including: establishing a first directed edge with the source point as the starting point and the tumor image patch corresponding to the tumor indicator as the ending point, and setting the weight of the first directed edge to positive infinity; establishing a second directed edge with the adjacent normal image patch corresponding to the adjacent normal indicator as the starting point and the sink point as the ending point, and setting the weight of the second directed edge to positive infinity; establishing a third directed edge between adjacent foreground image patches, and setting the weight of the third directed edge to the similarity of the image patch corresponding to the adjacent foreground image patch in the image patch similarity matrix.
[0050] like Figure 4A As shown, for image patches in the tumor image patch set Establish the edge from the source point to it. As the first directed edge, its weight is set to positive infinity; for image patches in the set of adjacent image patches. Establish its edge to the sink. As the second directed edge, its weight is set to positive infinity; for all adjacent foreground image patches Establish from point Time edge As the third directed edge, and with its weight set to After obtaining the vertex set and edge set of the directed graph, the directed graph can be constructed based on the nodes in the vertex set and the directed edges in the edge set.
[0051] S140: The target segmentation result is obtained by segmenting the directed graph using the minimum cut algorithm.
[0052] In this embodiment, after the directed graph is constructed, the minimum cut algorithm can be used to segment the directed graph to obtain the segmentation result under the current interaction scenario as the target segmentation result. The minimum cut algorithm is a core tool in graph theory used to solve the flow network segmentation problem. Its goal is to find a set of edges in a weighted graph that divides the graph into two non-empty subsets, such that the sum of the weights of the edges crossing the segmentation is minimized. Optionally, obtaining the target segmentation result by segmenting the directed graph using the minimum cut algorithm includes: segmenting the directed graph using the minimum cut algorithm to obtain a tumor region and an adjacent region; wherein the foreground image patch in the tumor region is connected to the source vertex, and the foreground image patch in the adjacent region is connected to the sink vertex; the target segmentation result is determined based on the tumor region and the adjacent region.
[0053] See Figure 4B In a directed graph The minimum cut algorithm is applied to divide the tumor into two parts. Points connected to the source point are considered as tumor region image patches, and points connected to the sink point are considered as adjacent tumor region image patches. This yields the target segmentation result, which is then displayed to the user through the interface. It should be noted that the segmentation line after applying the minimum cut algorithm may be an open segmentation line (e.g., ...). Figure 4B As shown in the figure, it could also be a closed dividing line (i.e., an enclosing line), depending on the actual dividing result.
[0054] Furthermore, users can determine whether the expected results have been achieved based on the target segmentation results displayed on the interface. If the expected results have been achieved, users can exit the display interface directly; if the expected results have not been achieved, the target segmentation result will be used as the current segmentation result, and steps S120-S140 will be repeated until the expected results are achieved.
[0055] This invention aims to develop an interactive pathological slide image segmentation method that does not require a supervised model. It primarily utilizes a similarity-based algorithm for deep features obtained from a self-supervised feature extraction model. During the process, multiple rounds of user annotation and similarity retrieval are employed to improve the segmentation results, thereby assisting users in segmenting tumor regions. The method achieves the following technical effects:
[0056] 1. Unsupervised and highly generalizable feature extraction: This invention relies solely on deep features extracted by a feature extraction model trained through self-supervised contrastive learning and the image patch identifiers input by the user for the segmentation of pathological slide images. Self-supervised contrastive learning is an unsupervised learning method, meaning it does not involve segmentation-annotated data throughout the entire process. This characteristic addresses the challenge of limited labeled data for pathological slide images, assisting professionals in analyzing pathological slides and accelerating the segmentation and labeling process. Furthermore, thanks to advancements in self-supervised learning technology, the feature extraction model can fully utilize the large amount of existing unlabeled data to obtain highly generalizable deep features, thereby ensuring retrieval and segmentation performance.
[0057] 2. Rapid Response Based on Similarity: This invention only requires time-consuming deep model inference when extracting features from the foreground image blocks corresponding to pathological slide images. In subsequent iterations, it relies solely on a pre-calculated image block similarity matrix for retrieval and segmentation. Therefore, this invention can respond quickly to user commands during interaction, thus exhibiting excellent real-time performance and ensuring a superior user experience.
[0058] 3. Simplified User Annotation: In the user interaction process of this invention, users only need to refer to the current segmentation results and search results to judge the image blocks in the pathological slide image. That is, the segmentation task can be completed by marking only a few locations on the display interface. This process does not require users to perform a lot of very precise annotation work, such as strictly drawing the boundaries of the tumor region. At the same time, it also retrieves possible tumor region image blocks based on user annotations to assist users in locating the tumor region. Therefore, this invention can achieve pathological slide image segmentation based on relatively coarse user annotations, reducing the workload of users in the process of segmenting tumor regions.
[0059] 4. Fully Integrating User Feedback: This invention can continuously optimize retrieval and segmentation results through user feedback. Specifically, the annotation operations performed by users on adjacent normal image blocks and tumor image blocks directly affect the retrieval of tumor region image blocks and the segmentation results obtained from minimum cut. This means that users can continuously improve the existing segmentation results, thereby gradually improving segmentation accuracy and effectively converting user feedback.
[0060] 5. Excellent Interpretability of Segmentation Results: The segmentation process of this invention combines the high generalization capabilities of deep learning models with user-interactive control over the segmentation results. While many deep learning models exhibit good segmentation performance, their "black box" nature makes it difficult to describe the reasoning behind their predictions, resulting in poor interpretability. In this invention, the deep learning model only provides a representation of the local image content of a pathological slide for optimizing similarity calculations between image patches. The actual segmentation process is controlled by the user based on their professional knowledge. Therefore, for professionals, the segmentation process of this invention is more controllable, the minimum cut-based segmentation algorithm is easier to explain, and user participation makes the segmentation results more reliable, thus improving the interpretability and reliability of the segmentation results.
[0061] The technical solution of this invention utilizes a pre-trained feature extraction model to extract features from multiple foreground image patches in a target pathological slide image and construct an image patch similarity matrix. The feature extraction model is constructed using a self-supervised contrastive learning approach, and the image patch similarity matrix characterizes the similarity between various foreground image patches. In response to the adjacent normal image patch annotation operation, a reference tumor image patch is obtained by performing a similarity search on unannotated image patches within the foreground image patch based on the annotated image patches. The annotated image patches include adjacent normal image patches and tumor image patches. In response to the tumor image patch annotation operation, a directed graph is constructed based on the image patch similarity matrix, foreground image patches, and image patch identifiers. The tumor image patch annotation operation is implemented based on the reference tumor image patch, and the image patch identifiers include adjacent normal identifiers and tumor identifiers generated by the user's image patch annotation operation on the display interface. The directed graph is used to describe the directional relationships between foreground image patches. The target segmentation result is obtained by segmenting the directed graph using a minimum cut algorithm. This technical solution constructs an interactive, semi-automatic pathological slide image segmentation mode based on self-supervised contrastive learning. It provides segmentation suggestions to users through similarity analysis of image patch features and continuously improves the segmentation results based on user input. This enables rapid and accurate segmentation of pathological slide images without the need for labeled data training, thus overcoming the difficulty of limited data labeling. Furthermore, considering the potential difficulty in quickly locating tumor regions in real-world scenarios due to their small size, this invention divides the labeling process of adjacent cancerous regions and tumor regions into two steps. First, the user labels easily identifiable adjacent cancerous regions. Then, image patch feature similarity analysis assists in locating the tumor region. This allows for the retrieval of heterogeneous tumor regions based on relatively regular adjacent cancerous regions, thus addressing the model's generalization requirements to a certain extent.
[0062] Example 2
[0063] Figure 5 This is a flowchart of an interactive pathological slide image segmentation method provided in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and optimized. Specifically, the optimization is as follows: before constructing an image patch similarity matrix by extracting features from multiple foreground image patches in the target pathological slide image using a pre-trained feature extraction model, the method further includes: constructing a training dataset based on multiple foreground image patches in the candidate pathological slide image; wherein, the training dataset includes multiple positive sample pairs and multiple negative sample pairs formed through data augmentation; training the neural network model using a self-supervised contrastive learning method based on the training dataset and the target loss function; wherein, the target loss function is constructed based on contrastive loss; and determining the neural network model that meets the preset training stopping condition as the feature extraction model.
[0064] like Figure 5 As shown, the method in this embodiment specifically includes the following steps:
[0065] S210, construct a training dataset based on multiple foreground image patches in candidate pathological slide images; wherein, the training dataset includes multiple positive sample pairs and multiple negative sample pairs formed through data augmentation.
[0066] Here, candidate pathological slide images can refer to pathological slide images that participate in the feature extraction model training process. For example, positive sample pairs in the training dataset can be different enhancement results of the same foreground image patch, and negative sample pairs can be enhancement results of different foreground image patches. The foreground image patch determination method for candidate pathological slide images can refer to the target pathological slide image.
[0067] S220, The neural network model is trained using a self-supervised contrastive learning approach based on the training dataset and the target loss function; wherein, the target loss function is constructed based on the contrastive loss.
[0068] In this embodiment, the target loss function can be constructed based on similarity measures such as cosine similarity, while requiring that the similarity between positive sample pairs in the training dataset is high and the similarity between negative sample pairs is low.
[0069] S230, the neural network model that meets the preset training stopping condition is determined as the feature extraction model.
[0070] The preset training stopping condition may include reaching a preset number of training iterations or meeting model accuracy requirements. In this embodiment, a self-supervised contrastive learning approach is used to train the neural network model based on a training dataset constructed using multiple foreground image patches from candidate pathological slide images and a target loss function constructed based on contrast loss. When the neural network model meets the preset training stopping condition, the model training process ends, and the neural network model at the end of training is determined as the feature extraction model.
[0071] S240: The feature extraction model is used to extract features from multiple foreground image patches in the target pathological slide image to construct an image patch similarity matrix. The feature extraction model is constructed using a self-supervised contrastive learning method, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch.
[0072] S250, in response to the adjacent normal image block annotation operation, performs a similarity search on the unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block to obtain a reference tumor image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks.
[0073] S260, in response to the tumor image block annotation operation, constructs a directed graph based on the image block similarity matrix, the foreground image block, and the image block identifier; wherein, the tumor image block annotation operation is implemented based on the reference tumor image block, and the image block identifier includes the adjacent normal identifier and the tumor identifier generated by the user performing the image block annotation operation on the display interface.
[0074] Directed graphs can be used to describe the directional relationships between foreground image patches.
[0075] S270: The target segmentation result is obtained by segmenting the directed graph using the minimum cut algorithm.
[0076] The specific implementation of S240-S270 can be referred to in the detailed description in Embodiment 1 above, and will not be repeated here.
[0077] The technical solution of this invention involves constructing a patch similarity matrix by extracting features from multiple foreground image patches in a target pathological slide image using a pre-trained feature extraction model. A training dataset is then constructed based on these foreground image patches in the candidate pathological slide image. This training dataset includes multiple pairs of positive and negative samples formed through data augmentation. A self-supervised contrastive learning approach is used to train the neural network model based on the training dataset and a target loss function. The target loss function is constructed based on contrastive loss. The neural network model that meets the preset training stopping condition is then identified as the feature extraction model. This technical solution employs a self-supervised contrastive learning approach to train a highly generalizable feature extraction model without the need for labeled data. Based on this model, an interactive, semi-automatic pathological slide image segmentation mode is constructed. Segmentation suggestions are provided to the user through similarity analysis of image patch features, and the segmentation results are continuously improved based on user input. This enables rapid and accurate segmentation of pathological slide images without the need for labeled data training, overcoming the difficulty of limited data labeling. Furthermore, considering the potential difficulty in quickly locating tumor regions in real-world scenarios due to their small size, this invention divides the labeling process of adjacent non-cancerous regions and tumor regions into two steps. First, the user labels easily identifiable adjacent non-cancerous regions. Then, image patch feature similarity analysis assists in locating the tumor region. This allows for the retrieval of heterogeneous tumor regions based on relatively regular adjacent non-cancerous regions, thus addressing the model's generalization requirements to a certain extent.
[0078] Example 3
[0079] Figure 6 This is a schematic diagram of an interactive pathological slide image segmentation device provided in Embodiment 3 of the present invention. This device can execute the interactive pathological slide image segmentation method provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects of the method. For example... Figure 6 As shown, the device includes:
[0080] The similarity matrix construction module 310 is used to extract features from multiple foreground image patches in the target pathological slide image using a pre-trained feature extraction model to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning method, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch;
[0081] The reference image block determination module 320 is used to respond to the adjacent normal image block annotation operation by performing a similarity search on the unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block to obtain a reference tumor image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks;
[0082] A directed graph construction module 330 is used to construct a directed graph based on the image block similarity matrix, the foreground image block, and the image block identifier in response to a tumor image block annotation operation; wherein, the tumor image block annotation operation is implemented based on the reference tumor image block, the image block identifier includes adjacent normal markers and tumor markers generated by the user performing image block annotation operations on the display interface, and the directed graph is used to describe the directional relationship between the foreground image blocks;
[0083] The directed graph segmentation module 340 is used to segment the directed graph using the minimum cut algorithm to obtain the target segmentation result.
[0084] Optionally, the similarity matrix construction module 310 is specifically used for:
[0085] Determine the foreground image corresponding to the target pathological slide image, and divide the foreground image into multiple foreground image blocks by non-overlapping image block division;
[0086] The foreground image patch is input into a pre-trained feature extraction model for feature extraction, and the image patch features are determined based on the output of the feature extraction model.
[0087] Determine the image block feature similarity between any two foreground image blocks, and construct an image block similarity matrix based on the image block feature similarity.
[0088] Optionally, the reference image block determination module 320 is specifically used for:
[0089] The similarity of the unlabeled image block to the adjacent normal image block is determined based on the similarity between the adjacent normal image block in the labeled image block and the unlabeled image block;
[0090] The tumor similarity of the unlabeled image block is determined based on the similarity between the tumor image block in the labeled image block and the unlabeled image block;
[0091] The first result is obtained by sorting the adjacent similarity of the unlabeled image patches in ascending order, and the second result is obtained by sorting the tumor similarity of the unlabeled image patches in descending order.
[0092] A reference tumor image block is determined based on the first number of unlabeled image blocks corresponding to the first number of adjacent similarities in the first result and the second number of unlabeled image blocks corresponding to the first number of tumor similarities in the second result.
[0093] Optionally, the directed graph construction module 330 is used for:
[0094] Create a source point as a tumor indicator and a sink point as an adjacent normal indicator;
[0095] The point set of the directed graph is determined based on the source point, the sink point, and the foreground image patch;
[0096] The edge set of the directed graph is determined based on the point set, the image patch similarity matrix, and the image patch identifier; wherein the edge set includes multiple directed edges;
[0097] Construct a directed graph based on the set of points and the set of edges.
[0098] Optionally, the directed graph construction module 330 is further configured to:
[0099] A first directed edge is established with the source point as the starting point and the tumor image block corresponding to the tumor identifier as the ending point, and the weight of the first directed edge is set to positive infinity.
[0100] A second directed edge is established with the adjacent image block corresponding to the adjacent normal marker as the starting point and the sink point as the ending point, and the weight of the second directed edge is set to positive infinity.
[0101] A third directed edge is established between adjacent foreground image patches, and the weight of the third directed edge is set to the image patch similarity with the adjacent foreground image patch in the image patch similarity matrix.
[0102] Optionally, the directed graph segmentation module 340 is specifically used for:
[0103] The directed graph is segmented using the minimum cut algorithm to obtain the tumor region and the adjacent region; wherein, the foreground image block in the tumor region is connected to the source point, and the foreground image block in the adjacent region is connected to the sink point;
[0104] The target segmentation result is determined based on the tumor region and the adjacent normal region.
[0105] Optionally, the apparatus further includes: a model training module, used for:
[0106] Before constructing an image patch similarity matrix by extracting features from multiple foreground image patches in a target pathological slide image using a pre-trained feature extraction model, a training dataset is constructed based on multiple foreground image patches in a candidate pathological slide image; wherein, the training dataset includes multiple positive sample pairs and multiple negative sample pairs formed through data augmentation;
[0107] The neural network model is trained using a self-supervised contrastive learning approach based on the training dataset and the target loss function; wherein the target loss function is constructed based on contrastive loss.
[0108] The neural network model that meets the preset training stopping condition is identified as the feature extraction model.
[0109] The interactive pathological slide image segmentation device provided in this embodiment of the invention can execute the interactive pathological slide image segmentation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0110] Example 4
[0111] Figure 7 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0112] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0114] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as interactive pathological slide image segmentation methods.
[0115] In some embodiments, the interactive pathological slide image segmentation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the interactive pathological slide image segmentation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the interactive pathological slide image segmentation method by any other suitable means (e.g., by means of firmware).
[0116] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0118] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0120] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0121] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0122] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0123] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An interactive pathological slide image segmentation method, characterized in that, The method includes: A pre-trained feature extraction model is used to extract features from multiple foreground image patches in a target pathological slide image to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning approach, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch; In response to the adjacent normal image block annotation operation, a reference tumor image block is obtained by performing a similarity search on the unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks; In response to the tumor image patch annotation operation, a directed graph is constructed based on the image patch similarity matrix, the foreground image patch, and the image patch identifier; wherein, the tumor image patch annotation operation is implemented based on the reference tumor image patch, the image patch identifier includes adjacent normal markers and tumor markers generated by the user performing image patch annotation operations on the display interface, and the directed graph is used to describe the directional relationship between the foreground image patches; The directed graph is segmented using the minimum cut algorithm to obtain the target segmentation result.
2. The method according to claim 1, characterized in that, A pre-trained feature extraction model is used to extract features from multiple foreground image patches in the target pathological slide image to construct an image patch similarity matrix, including: Determine the foreground image corresponding to the target pathological slide image, and divide the foreground image into multiple foreground image blocks by non-overlapping image block division; The foreground image patch is input into a pre-trained feature extraction model for feature extraction, and the image patch features are determined based on the output of the feature extraction model. Determine the image block feature similarity between any two foreground image blocks, and construct an image block similarity matrix based on the image block feature similarity.
3. The method according to claim 1, characterized in that, A reference tumor image block is obtained by performing a similarity search on the unlabeled image blocks in the foreground image block based on the labeled image blocks in the foreground image block, including: The similarity of the unlabeled image block to the adjacent normal image block is determined based on the similarity between the adjacent normal image block in the labeled image block and the unlabeled image block; The tumor similarity of the unlabeled image block is determined based on the similarity between the tumor image block in the labeled image block and the unlabeled image block; The first result is obtained by sorting the adjacent similarity of the unlabeled image patches in ascending order, and the second result is obtained by sorting the tumor similarity of the unlabeled image patches in descending order. A reference tumor image block is determined based on the first number of unlabeled image blocks corresponding to the first number of adjacent similarities in the first result and the second number of unlabeled image blocks corresponding to the first number of tumor similarities in the second result.
4. The method according to claim 1, characterized in that, Constructing a directed graph based on the image patch similarity matrix, the foreground image patch, and the image patch identifier, including: Create a source point as a tumor indicator and a sink point as an adjacent normal indicator; The point set of the directed graph is determined based on the source point, the sink point, and the foreground image patch; The edge set of the directed graph is determined based on the point set, the image patch similarity matrix, and the image patch identifier; wherein the edge set includes multiple directed edges; Construct a directed graph based on the set of points and the set of edges.
5. The method according to claim 4, characterized in that, Determining the edge set of the directed graph based on the point set, the image patch similarity matrix, and the image patch identifiers includes: A first directed edge is established with the source point as the starting point and the tumor image block corresponding to the tumor identifier as the ending point, and the weight of the first directed edge is set to positive infinity. A second directed edge is established with the adjacent image block corresponding to the adjacent normal marker as the starting point and the sink point as the ending point, and the weight of the second directed edge is set to positive infinity. A third directed edge is established between adjacent foreground image patches, and the weight of the third directed edge is set to the image patch similarity with the adjacent foreground image patch in the image patch similarity matrix.
6. The method according to claim 4 or 5, characterized in that, The directed graph is segmented using the minimum cut algorithm to obtain the target segmentation result, including: The directed graph is segmented using the minimum cut algorithm to obtain the tumor region and the adjacent region; wherein, the foreground image block in the tumor region is connected to the source point, and the foreground image block in the adjacent region is connected to the sink point; The target segmentation result is determined based on the tumor region and the adjacent normal region.
7. The method according to claim 1, characterized in that, Before constructing an image patch similarity matrix by extracting features from multiple foreground image patches in the target pathological slide image using a pre-trained feature extraction model, the following steps are also included: A training dataset is constructed based on multiple foreground image patches in candidate pathological slide images; wherein, the training dataset includes multiple positive sample pairs and multiple negative sample pairs formed through data augmentation; The neural network model is trained using a self-supervised contrastive learning approach based on the training dataset and the target loss function; wherein the target loss function is constructed based on contrastive loss. The neural network model that meets the preset training stopping condition is identified as the feature extraction model.
8. An interactive pathological slide image segmentation device, characterized in that, The device includes: A similarity matrix construction module is used to extract features from multiple foreground image patches in a target pathological slide image using a pre-trained feature extraction model to construct an image patch similarity matrix; wherein, the feature extraction model is constructed using a self-supervised contrastive learning method, and the image patch similarity matrix is used to characterize the similarity between each foreground image patch; A reference image block determination module is used to respond to an adjacent normal image block annotation operation by performing a similarity search on unannotated image blocks in the foreground image block based on the annotated image blocks in the foreground image block to obtain a reference tumor image block; wherein, the annotated image blocks include adjacent normal image blocks and tumor image blocks; A directed graph construction module is used to construct a directed graph based on the image patch similarity matrix, the foreground image patch, and the image patch identifier in response to the tumor image patch annotation operation; wherein, the tumor image patch annotation operation is implemented based on the reference tumor image patch, the image patch identifier includes the adjacent normal identifier and the tumor identifier generated by the user performing the image patch annotation operation on the display interface, and the directed graph is used to describe the directional relationship between the foreground image patches; The directed graph segmentation module is used to segment the directed graph using the minimum cut algorithm to obtain the target segmentation result.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the interactive pathological slide image segmentation method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the interactive pathological slide image segmentation method according to any one of claims 1-7.