Training method, device and storage medium of image segmentation model

CN123016108APending Publication Date: 2026-10-30DALIAN UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611039260.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种图像分割模型的训练方法、设备及存储介质,用于解决图像分割时局部细节区域容易产生结构错位或形变不合理,使伪标签误差较大,影响模型的分割精度和泛化能力的问题

Benefits of technology

[0010]本实施例提供的图像分割模型的训练方法,通过获取对应有多个分类标签的第一样本图像和未对应有分类标签的第二样本图像,基于第一样本图像和第二样本图像确定用于标识体素点间的结构信息和语义信息的结构语义特征,而后基于第一样本图像对应的分类标签和结构语义特征,确定第二样本图像对应的伪分类标签;最后基于第二样本图像的预测分类标签以及多个伪分类标签对待训练分割模型进行训练,获得图像分割模型。由于结构语义特征能够同时标识体素点间的结构信息和语义信息,使得基于结构语义特征和第一样本图像对应的分类标签确定伪分类标签时能够有效区分结构相似或体积较小的解剖区域,提升伪标签的质量,进而提升模型的分割精度以及泛化能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016108A_ABST
    Figure CN123016108A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a training method and device of an image segmentation model and a storage medium. The method comprises: obtaining a first sample image and a second sample image; determining a structure and semantic feature for identifying structure information and semantic information between voxel points based on the first sample image and the second sample image, the structure and semantic feature being obtained by converting in a Euclidean space and a hyperbolic space; determining a pseudo classification label corresponding to the second sample image based on a classification label corresponding to the first sample image and the structure and semantic feature; and training a to-be-trained segmentation model based on a predicted classification label of the second sample image and a plurality of pseudo classification labels, to obtain an image segmentation model. The pseudo classification label is determined based on the structure and semantic feature capable of simultaneously identifying the structure information and the semantic information between the voxel points, which can effectively distinguish anatomical regions with similar structures or small volumes, improve the quality of the pseudo label, and further improve the segmentation accuracy and generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a training method, device and storage medium for an image segmentation model. Background Technology

[0002] Few-shot medical image segmentation (FMIS) has garnered significant attention in the field of medical image analysis. Due to the high cost and reliance on expert experience in medical image annotation, traditional segmentation methods that depend on large-scale labeled data are difficult to apply directly. Therefore, researchers have proposed various segmentation methods based on few-shot learning. Among these, registration-based few-shot medical image segmentation (RFMIS) has become an important approach because it can achieve supervised training by generating pseudo-labels through registration under conditions of scarce labeled data. Since the pseudo-labels are the only supervisory signal for the segmentation network, their quality directly determines the upper limit of the final segmentation model's performance.

[0003] However, existing RFMIS methods primarily rely on pixel-level similarity constraints for optimization when generating pseudo-labels during the registration process. While this achieves alignment in the overall structure, it easily leads to structural misalignment or unreasonable deformation in local detail areas, especially small-volume structures or regions with blurred boundaries, resulting in larger errors in the generated pseudo-labels. The initial error of the pseudo-labels, amplified during segmentation training, reinforces the deformation and misalignment during the registration stage, ultimately affecting the model's segmentation accuracy and generalization ability in complex medical scenarios. Summary of the Invention

[0004] This application provides a training method, device, and storage medium for an image segmentation model, which addresses the problem that local detail regions are prone to structural misalignment or unreasonable deformation during image segmentation, resulting in large pseudo-label errors and affecting the segmentation accuracy and generalization ability of the model.

[0005] In a first aspect, embodiments of this application provide a method for training an image segmentation model, the method comprising: Acquire a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label; Based on the first sample image and the second sample image, structural semantic features are determined to identify structural and semantic information between voxel points. These structural semantic features are obtained by transforming between Euclidean space and hyperbolic space. Based on the classification label corresponding to the first sample image and the structural semantic features, determine the pseudo-classification label corresponding to the second sample image; The image segmentation model is trained based on the predicted classification labels of the second sample image and the multiple pseudo-classification labels to obtain the image segmentation model.

[0006] Secondly, embodiments of this application provide a training apparatus for an image segmentation model, the apparatus comprising: The first acquisition module is used to acquire a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label. The first determining module is used to determine structural semantic features for identifying structural and semantic information between voxel points based on the first sample image and the second sample image. The structural semantic features are obtained by transforming between Euclidean space and hyperbolic space. The second determining module is used to determine the pseudo-classification label corresponding to the second sample image based on the classification label corresponding to the first sample image and the structural semantic features; The first training module is used to train the segmentation model to be trained based on the predicted classification label of the second sample image and the multiple pseudo-classification labels, so as to obtain the image segmentation model.

[0007] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-described method.

[0008] Fourthly, embodiments of this application provide a computer storage medium for storing a computer program that enables a computer to implement the above-described method when executed.

[0009] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, which, when executed by a processor, can implement the method described in the first aspect.

[0010] The image segmentation model training method provided in this embodiment acquires a first sample image with multiple classification labels and a second sample image without corresponding classification labels. Based on the first and second sample images, structural semantic features are determined to identify structural and semantic information between voxel points. Then, based on the classification label and structural semantic features corresponding to the first sample image, pseudo-classification labels corresponding to the second sample image are determined. Finally, the image segmentation model is trained based on the predicted classification labels of the second sample image and multiple pseudo-classification labels to obtain the image segmentation model. Since structural semantic features can simultaneously identify structural and semantic information between voxel points, determining pseudo-classification labels based on structural semantic features and the classification labels corresponding to the first sample image can effectively distinguish anatomical regions with similar structures or small volumes, improving the quality of pseudo-labels, thereby improving the segmentation accuracy and generalization ability of the model. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a training method for an image segmentation model provided as an exemplary embodiment of this application; Figure 2 A flowchart illustrating a method for determining structural semantic features provided in an exemplary embodiment of this application; Figure 3 A flowchart illustrating a training method for an image segmentation model provided as an exemplary embodiment of this application; Figure 4 A schematic diagram of the structure of a training device for an image segmentation model provided in an exemplary embodiment of this application; Figure 5 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0014] To facilitate understanding of the training method, device, and storage medium of the image segmentation model provided in the embodiments of this application, the relevant technologies are briefly described below: In recent years, few-shot medical image segmentation (FMIS) has received widespread attention in the field of medical image analysis. Due to the high cost and reliance on expert experience in medical image annotation, traditional segmentation methods that rely on large-scale labeled data are difficult to apply directly. Therefore, researchers have proposed various segmentation methods based on few-shot learning. Among them, registration-based few-shot medical image segmentation (RFMIS) has become an important technical approach.

[0015] Existing RFMIS methods typically employ the following implementation process: First, a dataset containing a small amount of labeled data and a large amount of unlabeled data is constructed. The labeled data includes medical images and their corresponding segmentation labels, while the unlabeled data only contains medical images. Second, a shared encoder is used to extract features from both the labeled and unlabeled images to obtain corresponding feature representations. Then, the features of the labeled and unlabeled images are fused and input into a registration network to predict the deformation field from the labeled to the unlabeled image. Based on this deformation field, the labels of the labeled images are spatially transformed to generate pseudo-labels for the unlabeled images. Finally, the unlabeled images and their pseudo-labels are input into a segmentation network for supervised training to obtain the final segmentation model.

[0016] However, in practical applications, existing methods have the following shortcomings: First, at the feature representation level, existing methods typically model features in Euclidean space, treating different anatomical structures as independent and parallel categories, lacking the ability to model the "coarse-to-fine" hierarchical relationships within medical anatomy. In real-world medical scenarios, anatomical structures naturally possess hierarchical organizational relationships; for example, large organs contain multiple substructures, and these substructures exhibit fine-grained differences. Due to the lack of effective representation of this hierarchical information, existing methods struggle to accurately distinguish between structurally similar or small anatomical regions.

[0017] Secondly, when generating pseudo-labels during the registration process, existing methods mainly rely on pixel-level similarity constraints for optimization. While this can achieve alignment in the overall structure, it easily leads to structural misalignment or unreasonable deformation in local detail areas, especially small-volume structures or areas with blurred boundaries, resulting in significant errors in the pseudo-labels. This error is further amplified during subsequent segmentation training, affecting the model's generalization ability.

[0018] Furthermore, in terms of feature fusion, existing methods typically rely on a single space (such as Euclidean space) for feature learning, lacking the synergistic utilization of the expressive power of different geometric spaces. This leads to a trade-off between capturing global structural relationships and local semantic details, making it difficult to simultaneously balance structural consistency and semantic discriminative ability.

[0019] Furthermore, in terms of training strategies, some existing methods employ phased training or alternating optimization strategies, which restricts the information transfer between the registration and segmentation tasks and fails to fully utilize the complementary relationship between the two. This not only increases training complexity but may also lead to instability in the optimization process, affecting the final model performance.

[0020] Therefore, this application proposes a training method for an image segmentation model to address the above-mentioned problems. By constructing structural semantic features that can represent the structural and semantic information between voxel points at the feature extraction level, the hierarchical relationship between anatomical structures is effectively expressed. Based on these structural semantic features, pseudo-labels are determined, which can effectively improve the quality of pseudo-labels, thereby improving the segmentation accuracy and generalization ability of the model.

[0021] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0022] Figure 1This is a flowchart illustrating a training method for an image segmentation model provided in an embodiment of this application. The execution entity of this method is an image segmentation model training device. The image segmentation model training device can be implemented as software or a combination of software and hardware. When the image segmentation model training device is implemented as hardware, it can specifically be various electronic devices capable of performing image segmentation model training operations, including but not limited to e-commerce platforms, servers, etc. When the image segmentation model training device is implemented as software, it can be installed in the aforementioned electronic devices. Figure 1 As shown, the training method for this image segmentation model may include: Step S101: Obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label.

[0023] Step S102: Based on the first sample image and the second sample image, determine the structural semantic features used to identify the structural and semantic information between voxel points. The structural semantic features are obtained by transforming between Euclidean space and hyperbolic space.

[0024] Step S103: Based on the classification label and structural semantic features corresponding to the first sample image, determine the pseudo-classification label corresponding to the second sample image.

[0025] Step S104: Train the segmentation model to be trained based on the predicted classification label of the second sample image and multiple pseudo-classification labels to obtain the image segmentation model.

[0026] The specific implementation principles and effects of each of the above steps are explained in detail below: Step S101: Obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label.

[0027] In this embodiment, both the first sample image and the second sample image are medical images acquired for the same anatomical structure (e.g., the same organ, tissue, or lesion region). Medical images can be, but are not limited to, two-dimensional or three-dimensional imaging data such as computed tomography (CT) images, magnetic resonance imaging (MRI) images, positron emission tomography (PET) images, or ultrasound images. "Same anatomical structure" can mean that the anatomical regions contained in the two images have a corresponding relationship in an anatomical sense, such as both being the liver region, both being the left ventricle region, or both being the hippocampus region of the brain. The first sample image and the second sample image can originate from the same patient or from different patients. The "first sample image" is an labeled image with multiple classification labels; the "second sample image" is an unlabeled image without any classification labels. Here, "classification labels" can be semantic classification information for the Region of Interest (ROI) in the image, such as organ type (liver, kidney, heart), tissue type (tumor, blood vessel, normal tissue), or lesion grade (benign, malignant), etc. Each classification label is attached to the first sample image as a pixel-level mask, bounding box, or keypoint for supervised learning.

[0028] The acquisition of the first sample image can be achieved through methods including, but not limited to, the following two approaches: First, directly downloading labeled image data from publicly available medical image datasets, such as those from open-source datasets like TCGA (The Cancer Genome Atlas), LiTS (Liver Tumor Segmentation Challenge), or BraTS (Brain Tumor Segmentation Challenge); second, acquiring the original medical images locally and then having professional physicians manually annotate them using medical image annotation tools (such as ITK-SNAP or 3D Slicer), or using semi-automatic assisted annotation algorithms to generate classification labels and their corresponding spatial coordinate information. Regardless of the method used, the final first sample image will include complete, quality-verified classification labels.

[0029] The second sample image is an unlabeled image, which may come from the image archiving and communication system of a clinical medical institution (such as a cooperating hospital or imaging center). In practice, case images can be randomly selected from the system backend according to preset inclusion criteria (such as anatomical location, scanning protocol, image quality, etc.), and only the original voxel data of the selected images is retained, without reading or retaining any annotation information.

[0030] Optionally, after obtaining the first and second sample images, a dataset required for model training can be constructed. This dataset may include a small number of first sample images and their corresponding classification labels, and a large number of second sample images. After the dataset is constructed, preprocessing operations can be performed on all images. For example, the image size can be uniformly adjusted to a preset spatial resolution to eliminate size differences caused by different devices or scanning parameters; the image voxel intensity can be normalized, such as mapping grayscale values ​​to a distribution range with zero mean and unit variance, to reduce the interference of contrast differences on model training. In subsequent model training and evaluation, the dataset composed of preprocessed images can be used directly. The preprocessed images have good consistency in spatial scale and grayscale distribution, which can effectively reduce inter-domain differences and image redundancy interference, thereby improving the stability, convergence speed, and final segmentation accuracy of model training.

[0031] Step S102: Based on the first sample image and the second sample image, determine the structural semantic features used to identify the structural and semantic information between voxel points. The structural semantic features are obtained by transforming between Euclidean space and hyperbolic space.

[0032] After acquiring the first sample image and the second sample image, structural semantic features used to identify structural and semantic information between voxel points can be determined based on the first sample image and the second sample image.

[0033] In real-world medical settings, anatomical structures naturally exhibit hierarchical organizational relationships. For example, large organs contain multiple substructures, and these substructures differ in fine granularity (such as different tissue types, blood vessel distribution, or lesion subregions). This hierarchical relationship from the whole to the part is not only reflected at the anatomical level but also in the spatial arrangement and semantic attribution of image voxels.

[0034] In this embodiment, "semantic information" can refer to the high-level category attributes corresponding to voxel points, such as organ type (liver, kidney, heart), tissue category, or lesion grade. This type of information essentially belongs to the discrete category discrimination problem, which can be effectively modeled in Euclidean space through semantic feature extraction by convolutional neural networks. "Structural information" can refer to the spatial positional relationships and geometric topological constraints between voxel points in an image, such as the relative distance between adjacent voxels, local texture arrangement, organ boundary contours and shape structures. This type of information often contains complex hierarchical geometric relationships (such as a tree-like subordinate structure of "whole-part-subregion"), and has stronger expressive power in hyperbolic space because the exponential growth characteristic of hyperbolic space can naturally embed data with hierarchical structures, capturing the potential hierarchical geometric topological relationships between voxel points. Based on this, this application obtains structural semantic features that identify the structural and semantic information between voxel points by transforming between Euclidean space and hyperbolic space.

[0035] In practice, the first and second sample images can be input into a shared encoder with shared weights. This shared encoder can employ a convolutional neural network or a visual transformer architecture. The shared encoder can then extract features from the input images in Euclidean space, yielding first image features corresponding to the first sample image and second image features corresponding to the second sample image. These first and second image features encode high-level semantic discriminative information about voxel points, such as organ classification and tissue attributes.

[0036] After obtaining the first and second image features in Euclidean space, these image features can be mapped to hyperbolic space for processing. In some embodiments, the first and second image features can be concatenated, and then the concatenated feature vector can be projected onto a hyperbolic manifold using an exponential mapping function. Feature transformation and geometric relationship modeling are then performed in hyperbolic space to capture the natural hierarchical geometric topology between voxel points. After completing the feature update in hyperbolic space, the features in hyperbolic space can be mapped back to Euclidean space using a logarithmic mapping function to obtain structural-semantic features that integrate structural and semantic information.

[0037] In some embodiments, instead of concatenating the first and second image features, they can be independently projected into hyperbolic space using an exponential mapping function. Feature transformation and geometric structure modeling are then performed separately in hyperbolic space to obtain their respective hyperbolic features. Subsequently, logarithmic mapping functions are used to map these hyperbolic features back to Euclidean space, yielding the first and second enhanced features. Finally, the first and second enhanced features are fused along the feature channel dimension (e.g., through concatenation or weighted summation) to obtain structural semantic features. This approach preserves the geometric and topological independence of each image and is suitable for scenarios where the two images have significantly different shapes.

[0038] In other embodiments, the feature transformation in hyperbolic space described above can also be implemented using hyperbolic graph convolutional networks or hyperbolic attention mechanisms to better establish long-range hierarchical dependencies between voxels. After mapping back to Euclidean space, the original image features can be further added to the mapped features through residual connections to preserve the original semantic information and prevent information attenuation during the hyperbolic transformation process.

[0039] By transforming between Euclidean and hyperbolic spaces, structural semantic features can be obtained, enabling deep coupling between the category semantics and geometric topological position of voxel points. On one hand, the hierarchical geometric topological relationships extracted in hyperbolic space provide stable spatial anchors for small-volume or fuzzy-boundary structures, allowing the registration model to achieve correct matching based on geometric hierarchy constraints even when appearance similarity is insufficient, effectively reducing deformation misalignment. On the other hand, this feature carries both "semantic category" and "geometric position" information, guiding the model to prioritize matching voxel point pairs that are semantically consistent and topologically similar, rather than simply relying on grayscale similarity. Utilizing this structural semantic feature to obtain pseudo-labels can improve the quality of pseudo-label generation, providing a high-quality feature foundation for segmentation training in complex medical scenarios.

[0040] Step S103: Based on the classification label and structural semantic features corresponding to the first sample image, determine the pseudo-classification label corresponding to the second sample image.

[0041] In the embodiments of this application, "pseudo-classification label" can refer to an approximate label assigned to each voxel point or region of the second sample image after the existing classification label on the first sample image is transferred to the second sample image through the matching and mapping relationship in the feature space.

[0042] After obtaining the structural semantic features, these features can be used as the basis for registration to establish a correspondence between the first sample image and the second sample image, so as to obtain the pseudo-classification label corresponding to the second sample image.

[0043] In some embodiments, after obtaining the structural semantic features corresponding to the first and second sample images, the structural semantic features can be input into a registration decoder, which then predicts the deformation field. The "registration decoder" can be a neural network module that maps features to a spatial displacement field. Its input is the structural semantic feature map, and its output is a multi-channel displacement field with the same spatial resolution as the input image, where each channel corresponds to an offset in one spatial dimension. The "deformation field" can be a vector field describing the pixel-level mapping relationship between the spatial coordinate system of the first and second sample images. The value of each voxel in this vector field represents the displacement of the corresponding voxel in the first sample image in the x, y, and z directions.

[0044] After predicting the deformation field, spatial transformation can be performed on the classification label of the first sample image based on this deformation field. In practical applications, the classification label of the first sample image can be used as the source data to be transformed. Using the displacement vector indicated by the deformation field, the label is mapped from the spatial coordinate system of the first sample image to the spatial coordinate system of the second sample image through spatial interpolation (such as bilinear interpolation or nearest neighbor interpolation), generating the pseudo-classification label corresponding to the second sample image.

[0045] In some embodiments, explicit deformation field registration can be omitted, and pixel-level matching can be performed directly in the structural semantic feature space to generate pseudo-classification labels. After obtaining the structural semantic features corresponding to the first and second sample images, a similarity matrix between the features of each voxel in the two images can be calculated. The similarity metric can be Euclidean distance, cosine similarity, or geodesic distance in hyperbolic space. For each voxel in the second sample image, the voxel with the highest similarity in the first sample image can be selected from the similarity matrix, and the classification label corresponding to that voxel in the second sample image can be assigned to that voxel in the second sample image to generate the pseudo-classification label corresponding to the second sample image. In some embodiments, the K voxels with the highest similarity can also be selected for weighted voting, and the voting result can be used as the pseudo-classification label for that voxel.

[0046] Step S104: Train the segmentation model to be trained based on the predicted classification label of the second sample image and multiple pseudo-classification labels to obtain the image segmentation model.

[0047] After obtaining the pseudo-classification labels corresponding to the second sample image, the segmentation model to be trained can be obtained based on the predicted classification labels of the second sample image and multiple pseudo-classification labels. Here, the "predicted classification label" is the segmentation prediction result output after the second sample image is input into the segmentation model to be trained, while the "pseudo-classification label" serves as a supervision signal during the training process, used to guide the model to learn the mapping relationship from the image to the segmentation output.

[0048] In practice, the second sample image can be input into the segmentation model to be trained, and the segmentation decoder outputs the segmentation prediction result. The segmentation decoder can be a neural network module used to map the feature map into a pixel-level classification probability map. Its input is the feature map extracted from the second sample image by the encoder, and its output is a multi-channel probability map with the same spatial resolution as the input image. Each channel corresponds to the predicted probability of a semantic category, and the final predicted classification label of each voxel is determined by the category corresponding to the highest probability.

[0049] In some embodiments, the feature map output by the encoder can be directly input into a lightweight classification head, which can consist of convolutional layers and upsampling layers. This classification head is used to restore the low-resolution feature map output by the encoder to the spatial resolution of the input image and map it into a multi-channel probability map. The predicted classification label is obtained by taking the category corresponding to the highest probability.

[0050] After obtaining the segmentation prediction results, pseudo-classification labels can be used as supervision signals to train the segmentation model. In practice, a loss function value can be calculated between the segmentation prediction results and the pseudo-classification labels. This loss function can be cross-entropy loss, Dice loss, or a combination thereof. The network parameters of the segmentation model are updated through backpropagation based on the loss function value. After multiple rounds of iterative training until the model converges, the image segmentation model is obtained.

[0051] In some embodiments, a confidence-weighted loss optimization strategy can also be used to train the segmentation model. Specifically, during the generation of pseudo-classification labels, a confidence score for each voxel pseudo-label can be calculated. This confidence score can be determined based on the deformation smoothness or feature matching similarity during the registration process, and is used to measure the reliability of the pseudo-label at that voxel. When calculating the loss function, the loss value for each voxel can be multiplied by the corresponding confidence score to obtain a weighted loss value. Then, backpropagation is performed based on the weighted loss value to update the network parameters of the segmentation model.

[0052] In this embodiment, a first sample image with multiple classification labels and a second sample image without corresponding classification labels are acquired. Then, structural semantic features used to identify structural and semantic information between voxel points are determined based on the first and second sample images. Next, pseudo-classification labels corresponding to the second sample image are determined based on the classification labels and structural semantic features corresponding to the first sample image. Finally, the image segmentation model is trained based on the predicted classification labels of the second sample image and the multiple pseudo-classification labels to obtain the model. This application fully considers the naturally existing hierarchical structural relationships in medical anatomical images. Since feature modeling in Euclidean space can acquire semantic information, and hyperbolic space can capture the hierarchical geometric relationships of anatomical structures, structural semantic features that simultaneously identify structural and semantic information between voxel points can be obtained by transforming between the two spaces. Determining pseudo-classification labels based on these structural semantic features and the classification labels corresponding to the first sample image can effectively distinguish anatomical regions with similar structures or small volumes, significantly improving the quality of pseudo-labels, thereby improving the segmentation accuracy and generalization ability of the model.

[0053] Figure 2 This application provides a flowchart illustrating a method for determining structural semantic features according to an embodiment; based on the above embodiment, refer to the appendix. Figure 2 As shown, based on the first sample image and the second sample image, determining the structural semantic features used to identify the structural and semantic information between voxel points can include the following steps: Step S201: Determine the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space.

[0054] In some embodiments, a shared encoder can be used to extract features from the first sample image and the second sample image respectively, to obtain the first image features and the second image features in Euclidean space. The shared encoder can employ a convolutional neural network or a visual transformer architecture. When using a convolutional neural network, local features of the image can be extracted progressively through multiple layers of convolution and pooling operations; when using a visual transformer, global dependencies between image patches are modeled through a self-attention mechanism.

[0055] In other embodiments, the shared encoder may also be a multi-scale feature extraction network, which can simultaneously output feature maps at multiple scales, each corresponding to semantic information under different receptive fields. The first and second image features output at the end may be a specific scale among the above-mentioned multiple scale feature maps, or they may be the result of the fusion of multiple scale feature maps.

[0056] Alternatively, two encoders with identical structures but independent parameters can be used to extract features from the first and second sample images to obtain their respective Euclidean space image features. Each independent encoder can be adapted to the distribution characteristics of its respective input image. For example, the encoder corresponding to the first sample image can be optimized on labeled data to adapt to its labeled distribution, while the encoder corresponding to the second sample image can be adaptive on unlabeled data to capture its distribution characteristics.

[0057] Step S202: Fuse the first image features and the second image features to obtain fused image features.

[0058] After obtaining the first image features and the second image features, the first image features and the second image features can be fused to obtain fused image features.

[0059] In some embodiments, fusion can be achieved by stitching feature maps along the channel dimension, directly stitching the first image features and the second image features along the channel axis to obtain a fused feature map with double the number of channels.

[0060] In other embodiments, a weighted summation method can also be used, where learnable weight parameters are assigned to the first image feature and the second image feature respectively, and feature fusion is achieved through weighted averaging.

[0061] Step S203: Map the fused image features to hyperbolic space to obtain hyperbolic space features.

[0062] After obtaining the fused features, the fused image features can be mapped to hyperbolic space to obtain hyperbolic space features.

[0063] In some embodiments, the fused image features are represented in Euclidean space, and the fused features can be projected from Euclidean space to hyperbolic space using an exponential mapping function. Optionally, a Poincaré sphere model can be used as the implementation of hyperbolic space.

[0064] In practical applications, for the feature vector corresponding to each voxel in the fused image features, it can be projected onto a Poincaré sphere using an exponential mapping operation. The Poincaré sphere model is a hyperbolic space with negative constant curvature. Its geometric properties cause points in the space to separate exponentially with the depth of hierarchy, making it naturally suitable for representing hierarchical data. During the projection process, the feature vector of each voxel is mapped to a point on the hyperbolic manifold, forming a feature representation in the hyperbolic space.

[0065] After projecting all feature vectors onto the Poincaré sphere, the feature vector corresponding to each voxel in the fused image features acquires a new representation in hyperbolic space, thus obtaining preliminary hyperbolic space features corresponding to the fused image features. In this hyperbolic space, feature transformation operations can be further performed on the preliminary hyperbolic space features to strengthen the modeling of the geometric structural relationships between voxels. Optionally, the feature transformation can be implemented using a hyperbolic graph convolutional network or a hyperbolic attention mechanism to update the feature representation of each voxel under the geometric constraints of the hyperbolic space. After completing the feature transformation, the updated hyperbolic space features are obtained. These hyperbolic space features further incorporate hierarchical geometric topological information between voxels on top of the original semantic information, providing a rich feature foundation for subsequent mapping back to Euclidean space and pseudo-label generation.

[0066] In other embodiments, hyperbolic space features corresponding to the fused image features can also be obtained in other ways. For example, a hyperbolic embedding layer can be directly introduced into the output layer of the encoder, and the intermediate features extracted by the encoder can be directly mapped to the hyperbolic space through a learnable hyperbolic mapping function. The resulting features are the hyperbolic space features without the need for additional exponential mapping calculations. Alternatively, the fused image features can be nonlinearly transformed first to map the feature vectors to a distribution range more suitable for hyperbolic space representation before projection. Furthermore, the similarity matrix between the feature vectors of each voxel in the fused image features can be calculated, and the embedding vector for each voxel can be directly solved in the hyperbolic space using a graph embedding method, collectively forming the hyperbolic space features. In practical applications, the above methods can be flexibly selected according to specific task requirements, computational resources, and accuracy requirements.

[0067] Step S204: Map the hyperbolic space features back to Euclidean space to obtain the fusion weights and bias parameters corresponding to the fused image features. The fusion weights and bias parameters are used to identify the structural information between voxel points.

[0068] After obtaining the hyperbolic space features, the hyperbolic space features can be mapped back to Euclidean space to obtain the fusion weights and bias parameters corresponding to the fused image features.

[0069] Optionally, mapping hyperbolic space features back to Euclidean space to obtain fusion weights and bias parameters corresponding to the fused image features may include the following steps: mapping hyperbolic space features back to Euclidean space to obtain first mapped features; performing convolution processing on the first mapped features using a first convolution kernel to obtain fusion weights; and performing convolution processing on the first mapped features using a second convolution kernel to obtain bias parameters.

[0070] First, hyperbolic space features can be mapped back to Euclidean space. In some embodiments, a logarithmic mapping function can be used to project the features of each voxel in hyperbolic space from the hyperbolic manifold back to the tangent space of Euclidean space, obtaining the first mapped features in Euclidean space. In fact, this process is the inverse operation of the aforementioned exponential mapping. Through logarithmic mapping, hyperbolic space features carrying hierarchical geometric structure information can be losslessly restored to Euclidean space, so that registration and segmentation operations can be performed subsequently in Euclidean space.

[0071] In some embodiments, hyperbolic space features can also be mapped back to Euclidean space based on the geodesic distance matrix. First, the geodesic distance matrix is ​​obtained by calculating the geodesic distances between the features of each voxel in hyperbolic space. Then, the distance matrix is ​​reduced in dimensionality using a classical multidimensional scaling algorithm, solving for a new set of eigenvectors in Euclidean space, such that the Euclidean distances between the new eigenvectors approximate the original geodesic distances as closely as possible. The new eigenvectors corresponding to each voxel obtained after dimensionality reduction constitute the first mapped feature in Euclidean space.

[0072] Subsequently, the first mapping feature can be convolved using the first convolution kernel to obtain the fusion weights; the first mapping feature can then be convolved using the second convolution kernel to obtain the bias parameters. The fusion weights are used to weightedly combine the subsequent fusion image features and the first mapping feature, while the bias parameters are used to perform voxel-by-voxel offset correction on the weighted result.

[0073] In some embodiments, a lightweight network consisting of 3D convolutional layers, batch normalization layers, and a sigmoid activation function can be used to generate the fusion weights and bias parameters. In practical applications, the first mapping features can be input into this lightweight network. First, the spatial context is modeled by the 3D convolutional layers, extracting the feature response at each voxel location. Then, the data distribution is stabilized and the training process is accelerated by the batch normalization layers. Finally, the output values ​​are compressed to between 0 and 1 by the sigmoid activation function to obtain a spatial weight map, i.e., the fusion weights. For the generation of bias parameters, another set of convolutional operations can be applied in parallel to the first mapping features. The structure of this convolutional operation can be the same as that of the weight generation branch.

[0074] In some embodiments, global pooling combined with convolution can also be used to generate fusion weights and bias parameters. First, global average pooling is performed on the first mapping features to compress the spatial dimension into a global feature vector. Then, one-dimensional convolution or fully connected layers are used to generate fusion weights and bias parameters corresponding to the number of channels.

[0075] In other embodiments, after mapping hyperbolic space features back to Euclidean space through logarithmic mapping or geodesic distance matrix transformation, convolution operations can be omitted, and fusion weights and bias parameters can be obtained through other methods. For example, the similarity (e.g., cosine similarity) between the first mapped features and the features to be fused in the fusion image at each spatial location can be calculated, and the similarity value can be directly used as the fusion weight. The higher the similarity, the better the feature consistency at that location, and a higher fusion weight is assigned. The bias parameter can be set to zero or a constant preset based on experience. Alternatively, the fusion weights and bias parameters can be set as learnable scalars, using the same weights and bias values ​​uniformly across the entire feature map; or a fixed spatial weight distribution can be preset based on the prior location of the anatomical structure, for example, assigning a higher weight to the region where an organ is located, without any learning parameters. In practical applications, the above methods can be flexibly selected according to specific needs.

[0076] Step S205: Determine structural semantic features based on fusion weights, bias parameters, and fused image features.

[0077] After obtaining the fusion weights and bias parameters, the fused image features can be adjusted based on these fusion weights and bias parameters to obtain structural semantic features.

[0078] In some embodiments, determining structural semantic features based on fusion weights, bias parameters, and fused image features may include: calculating the product of the fused image features and the fusion weights; and summing the product with the bias parameters to obtain the structural semantic features.

[0079] Assuming the fusion weight is w, the bias parameter is bias, the fused image feature is x, and the structural semantic feature is fused, then the structural semantic feature can be obtained through the following formula: fused = bias + w × x Among them, the fused image feature x is the result of fusing the first image feature and the second image feature, which encodes the semantic information of voxel points in Euclidean space; the fusion weight w is a weight map with the same size as x space, and the value of each voxel point is between 0 and 1, which is used to control the degree of preservation of the original semantic information at that position after fusion; the bias parameter bias is a bias map with the same size as x space, which is used to perform voxel-by-voxel offset correction on the weighted features.

[0080] In practical applications, the multiplication and addition operations described above are performed on a voxel-by-voxel basis. For each spatial location in the feature map, the weight value of the corresponding location in the fusion weight map is multiplied by the feature vector at that location, and then the bias value of the corresponding location in the bias map is added to the product result to obtain the final feature vector of that location in the structural semantic features. Since the fusion weights and bias parameters are obtained by mapping from hyperbolic space back to Euclidean space, these weights and bias parameters carry the structural information between voxel points obtained from hyperbolic space. Therefore, through the above linear transformation, the fusion image features in the original Euclidean space can be modulated by the structural information in hyperbolic space, ultimately resulting in structural semantic features that simultaneously encode the semantic information (from Euclidean space) and structural information (from hyperbolic space) of voxel points.

[0081] In some embodiments, residual modulation can also be used to obtain structural semantic features. For example, the fused image features can be used as the base signal, and the fusion weights and bias parameters can be used as the modulation signals. After weighting and offset correction of the fused image features, they are then added to the original fused image features to obtain the structural semantic features, i.e.: fused = x + (w × x + bias) Where w×x+bias is a linear modulation term used to scale and translate the features of the fused image, and x is the fused image feature, which is added together to form a residual connection.

[0082] After obtaining the structural semantic features, these features can be used as input to the registration branch for subsequent deformation field prediction or feature matching to generate pseudo-classification labels corresponding to the second sample image.

[0083] In this embodiment, a fused image feature with semantic information is obtained by fusing the first and second image features in Euclidean space. The fused image feature is then mapped to hyperbolic space, capturing the natural hierarchical geometric topology between voxels based on the exponential growth characteristic of hyperbolic space. Fusion weights and bias parameters are generated accordingly, and these weights and parameters are used to modulate the fused image feature, resulting in a structural semantic feature that simultaneously encodes semantic and structural information. Based on this structural semantic feature, pseudo-labels are generated, transforming the generation of pseudo-labels from traditional pixel-level grayscale matching to pixel-level correspondence based on the dual consistency of geometric structure and semantic category. This makes the spatial distribution of pseudo-labels more consistent with real anatomical morphology, especially at organ boundaries, substructure junctions, and small-volume regions, where the accuracy and consistency of pseudo-labels are effectively improved. Ultimately, this enhances the segmentation accuracy and generalization ability of the segmentation model in complex medical scenarios.

[0084] Figure 3 A flowchart illustrating a training method for an image segmentation model provided as an exemplary embodiment of this application; based on steps S201~S205, refer to the appendix... Figure 3 As shown, the image segmentation model is trained based on the predicted classification labels and pseudo-classification labels of the second sample image to obtain the image segmentation model, which may include: Step S301: Determine the segmentation loss based on the pseudo-classification label and the predicted classification label.

[0085] In some embodiments, the segmentation loss may include the Dice loss, which can be obtained based on the Dice coefficient. The Dice coefficient is an index used to measure the similarity between two sets, with a value ranging from 0 to 1. The closer the value is to 1, the higher the degree of overlap between the two sets. In image segmentation tasks, the Dice coefficient can be used to measure the degree of overlap between the predicted segmentation result and the pseudo-classification label. It can be calculated as twice the area of ​​the intersection of the predicted result and the pseudo-label divided by the sum of their areas. The Dice loss can be defined as 1 minus the Dice coefficient; the smaller the value, the higher the similarity between the predicted result and the pseudo-label, and the better the segmentation effect.

[0086] In some embodiments, the segmentation loss can also be a combination of cross-entropy loss and Dice loss, i.e., the segmentation loss is the sum of the cross-entropy loss and the Dice loss. The cross-entropy loss is used to constrain the classification accuracy of each voxel, and the Dice loss is used to constrain the overlap of the overall segmented regions. The joint optimization of the two can balance pixel-level classification accuracy and region-level segmentation integrity, further improving the performance of the segmentation model.

[0087] Step S302: Identify the same category labels and different category labels in the predicted classification labels.

[0088] After obtaining the predicted classification labels, it is possible to identify labels of the same category and labels of different categories among the predicted classification labels.

[0089] In some embodiments, for each voxel in the second sample image, the predicted classification label can be the anatomical category number corresponding to that voxel, such as 0 for background, 1 for liver, 2 for kidney, etc. For any two voxels in the image, by comparing whether their corresponding predicted classification labels have the same category number, it can be identified whether they belong to the same or different category labels. If the category numbers of the two voxels are the same, they have the same category label; if the category numbers are different, they have different category labels.

[0090] In practical applications, all voxel points in the second sample image can be traversed, and their predicted classification labels can be compared pairwise to identify all voxel pairs with the same category label and all voxel pairs with different category labels. Since traversing all voxel pairs involves a large amount of computation, in some embodiments, pairwise comparisons can be performed only within a preset spatial neighborhood to reduce computational complexity.

[0091] In some embodiments, connected component analysis can also be used to identify same-category and different-category labels. After obtaining the predicted classification labels, connected component analysis can be performed on voxels with the same category number in the predicted classification label graph. Voxels that are spatially adjacent and have the same category number are grouped into the same connected region, and each connected region corresponds to an independent anatomical structure instance. Subsequently, any two voxels within the same connected region belong to the same category label; any two voxels between different connected regions, regardless of whether their category numbers are the same (e.g., different independent branches of the same organ), belong to different-category labels.

[0092] Step S303: Generate an adaptive contrastive loss in hyperbolic space based on pseudo-classification labels, labels of the same class, and labels of different classes.

[0093] In some embodiments, generating an adaptive contrastive loss in hyperbolic space based on pseudo-classification labels, labels of the same class, and labels of different classes may include: generating a same-label loss based on pseudo-classification labels and labels of the same class; generating a different-label loss based on pseudo-classification labels and labels of different classes; and weighting the same-label loss and the different-label loss based on a first adaptive weight corresponding to the same-label loss and a second adaptive weight corresponding to the different-label loss to obtain the adaptive contrastive loss.

[0094] In practice, voxel features corresponding to the same category labels identified in the preceding steps can be paired into positive sample pairs, while voxel features corresponding to different category labels can be paired into negative sample pairs. For example, if the predicted classification labels for voxels A and B are both "left lobe of the liver," then they form a positive sample pair; if the predicted classification label for voxel A is "left lobe of the liver" and the predicted classification label for voxel C is "right lobe of the liver," then they form a negative sample pair. The pseudo-classification labels serve as supervisory signals, driving voxel features to cluster or separate in hyperbolic space according to the category assignments indicated by the pseudo-classification labels.

[0095] Subsequently, the feature vectors calculated by the model for each voxel location in the second sample image during the process of obtaining the predicted classification label can be projected into hyperbolic space. After the second sample image is input into the segmentation model, before outputting the predicted classification label, the model generates a feature vector for each voxel location in the intermediate layer to express its semantic information. This feature vector can be the voxel features output by the intermediate layer of the segmentation decoder. During feature mapping, these voxel features can be projected into the Poincaré sphere model through an exponential mapping function to obtain the representation of each voxel in hyperbolic space.

[0096] Then, the hyperbolic geodesic distance between the features of each voxel can be calculated in hyperbolic space. Taking the Poincaré sphere model with curvature c as an example, the hyperbolic distance between the feature vector z_i of voxel i and the feature vector z_j of voxel j can be calculated by the following formula: d_B(z_i,z_j)=(1 / √c)·arcosh(1+2c·||z_i-z_j||² / ((1-c·||z_i||²)·(1-c·||z_j||²))) Where z_i and z_j represent the eigenvectors of voxels i and j on the Poincaré sphere, respectively, c is the curvature parameter of the Poincaré sphere (c>0), ||z_i-z_j||² represents the squared distance between the two eigenvectors in Euclidean space, and arcosh is the inverse hyperbolic cosine function, used to convert the distance metric in hyperbolic space into a geodesic distance value.

[0097] In calculating the contrastive loss, the negative hyperbolic distance can be used as a similarity index; the smaller the distance, the more similar the two voxel features are in hyperbolic space. For positive sample pairs, the hyperbolic distance should be minimized; for negative sample pairs, the hyperbolic distance should be maximized.

[0098] To enhance the constraint effect, distance-aware weights can be introduced into the loss function. For positive sample pairs, a "pull" weight (w_pull) is used as the implementation of the first adaptive weight; for negative sample pairs, a "push" weight (w_push) is used as the implementation of the second adaptive weight.

[0099] For positive sample pairs, the formula for calculating the pull-in weight w_pull can be: w_pull_i,j=1-exp(-γ·d_B(z_i,z_j)) Where γ is a preset positive parameter. The meaning of this formula is: the farther the distance between two positive samples, the closer the closing weight is to 1, and the stronger the closing constraint; if the distance between two positive samples is already very close, the closing weight is close to 0, and the closing force is weakened.

[0100] For negative sample pairs, the formula for calculating the push weight w_push can be: w_push_i,j=exp(-δ·d_B(z_i,z_j)) Where δ is a preset positive parameter. The meaning of this formula is: the closer the distance between two negative samples, the closer the push weight is to 1, and the stronger the push constraint; if the distance between two negative samples is already far, the push weight is close to 0, and the push force is weakened.

[0101] In the same-label loss, the pseudo-classification label serves as a supervisory signal, causing voxel features corresponding to the same predicted classification label to converge towards the class center indicated by the pseudo-classification label in hyperbolic space. In the opposite-label loss, the pseudo-classification label can be used to constrain voxel features corresponding to different predicted classification labels to separate from each other in hyperbolic space. In other words, the pseudo-classification label provides a supervisory target for the aggregation and separation of voxel features in hyperbolic space.

[0102] Finally, the adaptive contrastive loss function can be expressed as: L_TSHCL=Σ_i∈Dlog(Σ_j∈DI_i,j•exp(w_pull_i,j / τ) / Σ_j∈Dexp((w_pull_i,j•I_i,j+w_push_i,j•(1-I_i,j)) / τ)) Where D is the set of all voxels in the image, i is the anchor voxel, j is any other voxel, I_i,j is an indicator function, which takes a value of 1 when voxel i and voxel j have the same predicted classification label, indicating that they are a positive sample pair; and takes a value of 0 when they have different predicted classification labels, indicating that they are a negative sample pair; w_pull_i,j is the first adaptive weight (i.e., the pull-in weight), w_push_i,j is the second adaptive weight (i.e., the push-out weight), and τ is the temperature coefficient. The numerator represents the summation of the weighted similarity of all positive samples at anchor i, corresponding to the contribution of the same-label loss; the denominator represents the summation of the weighted similarity of all voxels, where the positive sample part corresponds to the same-label loss, and the negative sample part corresponds to the different-label loss; the overall loss is calculated by taking the negative logarithm of the ratio of the total positive sample contribution to the total contribution of all samples for each anchor i, and then summing it over all anchors. The closer this ratio is to 1, the smaller the loss value.

[0103] By minimizing the adaptive contrastive loss function, voxels of the same type can be brought closer together in hyperbolic space, while voxels of different types can be moved further apart. The introduction of these distance-aware weights guides the model to obtain a more discriminative feature distribution in hyperbolic space, effectively improving the segmentation model's ability to distinguish between structurally similar or ambiguous regions.

[0104] In simple terms, the process of generating adaptive contrastive loss in hyperbolic space based on pseudo-classification labels, labels of the same class, and labels of different classes can be as follows: First, identify labels of the same class and labels of different classes based on the predicted classification labels. Form positive sample pairs with voxel features corresponding to labels of the same class and negative sample pairs with voxel features corresponding to labels of different classes. Then, project the voxel features into hyperbolic space and calculate the hyperbolic geodesic distance between each voxel pair. Next, introduce a closing weight (first adaptive weight) and a pushing weight (second adaptive weight) based on the hyperbolic distance, and dynamically adjust the two according to the initial distance. Finally, substitute the above weights into the contrastive loss function so that voxels of the same class move closer to each other in hyperbolic space and voxels of different classes move further apart, thus obtaining the adaptive contrastive loss in hyperbolic space.

[0105] Optionally, before determining the adaptive contrast loss, the method further includes: determining the initial hyperbolic distance between voxel points with the same category label; and increasing the first adaptive weight to reduce the distance between voxel points with the same category label if the initial hyperbolic distance is greater than a preset threshold.

[0106] For a positive sample pair consisting of voxel points with the same category label, if the initial hyperbolic distance is greater than the preset threshold, it means that voxels of the same category are far apart in the hyperbolic space. In this case, increasing the first adaptive weight can strengthen the closing constraint and reduce the distance between voxels with the same category label.

[0107] Optionally, before determining the adaptive contrast loss, the method further includes: determining the initial hyperbolic distance between voxel points of different category labels; and reducing the second adaptive weight to reduce the distance between voxel points of different category labels if the initial hyperbolic distance is greater than a preset threshold.

[0108] For negative sample pairs composed of voxel points of different categories, if the initial hyperbolic distance is greater than the preset threshold, it indicates that the heterogeneous voxels have been well separated in the hyperbolic space. At this time, the second adaptive weight can be reduced to weaken the pushing constraint and avoid excessive pushing that would cause distortion of the feature distribution.

[0109] The aforementioned dynamic adjustment mechanism can adaptively adjust the weights based on the actual distance between sample pairs, making the contrastive learning process more stable and efficient, and preventing over-optimization or insufficient constraints.

[0110] In other embodiments, an adaptive contrastive loss in hyperbolic space can also be generated based on a contrastive learning strategy using category centers. Simply put, after obtaining the predicted classification label, for each anatomical category, the center point (e.g., geodesic median) of all voxel features in that category can be calculated as the hyperbolic space category center for that category. The goal of contrastive learning can be that the features of each voxel move closer to the hyperbolic space center of its corresponding category while moving away from the hyperbolic space centers of other categories. In this case, the first and second adaptive weights can be category-level distance-aware weights. If the average distance from a voxel of a certain category to its own category center is large, the first adaptive weight of that category is increased; if the distance between two category centers is less than a preset threshold, the second adaptive weight between these two categories is increased. Finally, a contrastive loss function can be constructed using category centers as anchor points, causing voxels of the same type to cluster towards the category center and different category centers to separate from each other, resulting in a feature distribution with hierarchical structure and discriminative power.

[0111] In fact, the adaptive contrast loss described above is the adaptive contrast loss for the segmentation branch. In some embodiments, adaptive contrast loss can also be introduced in the registration stage. In a specific implementation, the voxel features corresponding to the first and second sample images can be projected into hyperbolic space, and positive and negative sample pairs across images can be constructed based on the classification label of the first sample image. At this point, voxels belonging to the same anatomical category in the first and second sample images can form positive sample pairs, and voxels belonging to different anatomical categories can form negative sample pairs. By calculating the geodesic distance between the positive and negative sample pairs in hyperbolic space and introducing distance-aware weights, an adaptive contrast loss for the registration stage is constructed. This adaptive contrast loss can be used to optimize the registration network, so that the registration process, in addition to the gray-level similarity constraint, is further constrained by the proximity of similar voxel features and the separation of dissimilar features in hyperbolic space, thereby further improving registration accuracy and pseudo-label quality.

[0112] Step S304: Determine the registration loss used to identify the degree of alignment between the first sample image and the second sample image.

[0113] In the registration branch, the registration loss can be determined to measure the alignment between the first sample image and the second sample image.

[0114] In some embodiments, the registration task loss may include normalized cross-correlation loss and deformation field smoothing loss. The normalized cross-correlation loss can be used to measure the local structural similarity between the first sample image and the second sample image. In practical applications, the first sample image can be spatially transformed based on the deformation field predicted by the registration network to obtain a deformed first sample image. Then, the normalized cross-correlation value between the deformed first sample image and the second sample image within a local window is calculated. The closer this value is to 1, the more similar the local structures of the two images are. The normalized cross-correlation loss can be defined as 1 minus the normalized cross-correlation value; the smaller the value, the higher the registration accuracy.

[0115] Deformation field smoothing loss can be used to constrain the spatial smoothness of the deformation field. In practical applications, the spatial gradient of the deformation field at each voxel location can be calculated, and the deformation field smoothing loss can be obtained by summing or averaging the gradient values ​​of all voxels. The smaller this loss, the smoother the spatial variation of the deformation field and the smaller the displacement difference between adjacent voxels. Introducing deformation field smoothing loss can prevent excessive distortion or discontinuity of the deformation field, ensuring that the registration results are anatomically plausible.

[0116] During training, the normalized cross-correlation loss and the deformation field smoothing loss can be weighted and combined to obtain the final registration loss. By minimizing this registration loss to optimize the registration network, the registration result can maintain the similarity of the image appearance and meet the smoothness constraint of the deformation field, providing an accurate pixel-level correspondence for subsequent pseudo-label generation.

[0117] In some embodiments, the registration task loss may also include a confidence-weighted loss. During the registration process, the registration difficulty and reliability often differ across different regions. For example, registration is more difficult in image boundary regions or structurally complex regions, while registration is easier in the image center or structurally simple regions. Therefore, when calculating the normalized cross-correlation loss, different confidence weights can be assigned to different spatial locations to distinguish the degree of contribution of each region to the registration loss. The confidence score can be determined based on indicators such as local image quality, deformation field smoothness, or feature matching similarity.

[0118] In practice, the confidence score for each voxel location can be determined based on the local structural similarity between the deformed first and second sample images. Higher similarity indicates a more reliable registration result for that region, thus assigning a higher confidence weight; lower similarity indicates a lower reliability of the registration result, thus assigning a lower confidence weight. The normalized cross-correlation loss for each voxel location is multiplied by the corresponding confidence score and then summed to obtain the confidence-weighted registration loss. By introducing the confidence-weighted loss, the model can focus more on reliable regions with high registration quality during training, reducing the interference of unreliable regions on loss calculation, thereby improving the stability and accuracy of the registration network training.

[0119] Step S305: Train the segmentation model to be trained based on segmentation loss, adaptive contrast loss, and registration loss to obtain the image segmentation model.

[0120] After obtaining the segmentation loss, adaptive loss, and contrastive loss, the segmentation model to be trained can be jointly trained based on these three to obtain the image segmentation model.

[0121] During training, the segmentation loss, adaptive contrast loss, and registration loss of the registration branch can be calculated simultaneously. These three losses are then weighted and combined to obtain the total loss. Specifically, the segmentation loss constrains the consistency between the segmentation prediction result and the pseudo-classification label, guiding the model to learn accurate pixel-level classification. The adaptive contrast loss optimizes the distribution of voxel features in hyperbolic space, bringing similar voxels closer together and dissimilar voxels further apart, enhancing the discriminative power of the features. The registration loss constrains the deformation field predicted by the registration network, ensuring accurate alignment between the first and second sample images, providing high-quality pseudo-classification labels for the segmentation branch. After weighted summation of these three losses, the parameters of the segmentation model and registration network are updated through backpropagation. This process is repeated iteratively until the total loss converges, resulting in a trained image segmentation model.

[0122] In some embodiments, the segmentation model to be trained includes a shared encoder. In this case, determining the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space may include: inputting the first sample image and the second sample image into the shared encoder to determine the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space. Further, training the segmentation model to be trained based on segmentation loss, adaptive contrast loss, and registration loss to obtain an image segmentation model may include: determining the gradients generated by the segmentation loss, adaptive contrast loss, and registration loss on the shared encoder, respectively; aggregating the gradients to obtain aggregated gradients; and updating the parameters of the shared encoder according to the aggregated gradients to obtain the image segmentation model.

[0123] In some embodiments, the segmentation and registration branches can employ a shared encoder. Although the segmentation and registration tasks have different objectives, both rely on fundamental information such as anatomical structures, boundaries, shapes, and spatial locations in medical images. Therefore, many features extracted by the encoder front end can be shared. The segmentation loss can guide the encoder to learn stronger semantic discriminative abilities, while the registration loss can guide the encoder to retain better spatial correspondences. The aggregation of these two losses updates the shared encoder, essentially allowing the shared encoder to learn a shared anatomical representation that simultaneously incorporates semantic and spatial structural information.

[0124] Compared to using two independent encoders, a shared encoder can reduce the number of parameters while preventing the two branches from learning completely disjointed features, thus enhancing the information exchange between segmentation and registration. While using two independent encoders can reduce task interference, it also weakens the complementarity between the two tasks and increases model complexity. By designing a shared encoder, co-optimization of segmentation and registration can be achieved, allowing the two tasks to mutually promote each other during training, further improving the overall performance of the model in complex medical scenarios.

[0125] In the specific implementation process, the gradients generated by the registration loss, the segmentation loss, and the adaptive contrast loss can be calculated separately for the shared encoder. The three can be aggregated, and the parameters of the shared encoder can be updated using the aggregated gradients.

[0126] In some embodiments, the parameter update formula for the shared encoder may be: θ_se←θ_se-∇{θ_se}L_reg+∇{θ_se}L_seg+∇_{θ_se}L_acl) Where θ_se represents the parameters of the shared encoder, L_reg represents the registration loss (which may include normalized cross-correlation loss and deformation field smoothing loss), L_seg represents the segmentation loss (such as Dice loss and cross-entropy loss), and L_acl represents the adaptive contrastive loss. ∇{θ_se}L_reg, ∇{θ_se}L_seg, and ∇_{θ_se}L_acl represent the gradients of the registration loss, segmentation loss, and adaptive contrastive loss with respect to the shared encoder parameters, respectively. Summing these three values ​​allows for synchronous updates to the shared encoder parameters, enabling the shared encoder to simultaneously receive supervision signals from the registration task, segmentation task, and contrastive learning.

[0127] Through the gradient aggregation update method described above, the gradient of the registration task can guide the shared encoder to retain better spatial correspondence, the gradient of the segmentation task can guide the shared encoder to learn stronger semantic discrimination ability, and the gradient of the adaptive contrastive loss can guide the shared encoder to form a feature distribution with hierarchical structure in hyperbolic space. The three work together to optimize, enabling the shared encoder to learn a shared anatomical representation that simultaneously contains semantic information, spatial structure information, and hierarchical geometric information, thus achieving mutual promotion between segmentation and registration.

[0128] In some embodiments, an alternating iterative training strategy can also be used to achieve multi-task joint optimization. This involves dividing the training process into multiple rounds, with different tasks being optimized alternately in each round. In the segmentation training round, the parameters of the network modules related to the segmentation task in the model can be updated based solely on the segmentation loss and adaptive contrastive loss, enabling the model to learn semantic discriminative ability and form a discriminative feature distribution. In the registration training round, the parameters of the network modules related to the registration task in the model are updated based solely on the registration loss, enabling the model to learn spatial correspondences and improve cross-image alignment accuracy. The two task rounds are performed alternately until the model converges.

[0129] In this embodiment, the segmentation loss is first determined based on the pseudo-classification labels and the predicted classification labels. Then, same-class and different-class labels in the predicted classification labels are identified, and an adaptive contrast loss in hyperbolic space is generated based on the pseudo-classification labels, same-class labels, and different-class labels. Next, a registration loss is determined to identify the alignment degree between the first and second sample images. Finally, the segmentation model to be trained is trained based on the segmentation loss, adaptive contrast loss, and registration loss to obtain the image segmentation model. Specifically, the segmentation loss constrains the consistency between the segmentation prediction and the pseudo-label, the adaptive contrast loss optimizes the discriminative distribution of voxel features in hyperbolic space, and the registration loss constrains the accuracy of alignment across image spaces. Through joint training of these three losses, the model can simultaneously acquire accurate pixel-level classification ability, accurate spatial correspondence ability, and hierarchical feature representation ability during training. This allows the trained image segmentation model to effectively distinguish structurally similar or blurred-boundary anatomical regions even with only a small amount of labeled data, significantly improving segmentation accuracy and generalization ability in complex medical scenarios.

[0130] To more clearly illustrate the training method of the image segmentation model provided in the embodiments of this application, the training method of the image segmentation model is described in full below based on the foregoing embodiments. The complete training method of the image segmentation model may include the following steps: (1) Obtain the first sample image and the second sample image, wherein the first sample image and the second sample image are medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label.

[0131] (2) Input the first sample image and the second sample image into the shared encoder to determine the first image feature of the first sample image in Euclidean space and the second image feature of the second sample image in Euclidean space; fuse the first image feature and the second image feature to obtain the fused image feature, and map the fused image feature to hyperbolic space to obtain the hyperbolic space feature. Map the hyperbolic space feature back to Euclidean space to obtain the first mapped feature; perform convolution processing on the first mapped feature using the first convolution kernel to obtain the fusion weight; perform convolution processing on the first mapped feature using the second convolution kernel to obtain the bias parameter; determine the structural semantic feature based on the fusion weight, the bias parameter and the fused image feature.

[0132] (3) Based on the classification label and structural semantic features corresponding to the first sample image, determine the pseudo classification label corresponding to the second sample image.

[0133] (4) Determine the segmentation loss based on the pseudo-classification label and the predicted classification label.

[0134] (5) Identify same-category and different-category labels in the predicted classification labels; generate same-label loss based on pseudo-classification labels and same-category labels; generate different-label loss based on pseudo-classification labels and different-category labels. Determine the initial hyperbolic distance between voxel points of the same-category labels; if the initial hyperbolic distance is greater than a preset threshold, increase the first adaptive weight to reduce the distance between voxel points of the same-category labels; determine the initial hyperbolic distance between voxel points of different-category labels; if the initial hyperbolic distance is greater than a preset threshold, decrease the second adaptive weight to reduce the distance between voxel points of different-category labels. Based on the first adaptive weight corresponding to the same-label loss and the second adaptive weight corresponding to the different-label loss, weight the same-label loss and different-label loss to obtain the adaptive contrast loss.

[0135] (6) Determine the registration loss used to identify the alignment between the first sample image and the second sample image.

[0136] (7) Determine the gradients generated by the segmentation loss, adaptive contrast loss and registration loss on the shared encoder respectively; aggregate the gradients to obtain the aggregated gradient; update the parameters of the shared encoder according to the aggregated gradient to obtain the image segmentation model.

[0137] Based on the above steps, in practical applications, the complete training process for an image segmentation model can be as follows: First, a first sample image and a second sample image are acquired. Both the first and second sample images are medical images corresponding to the same anatomical structure, such as CT images of the liver region. The first sample image has multiple classification labels, while the second sample image does not. These medical images can be two-dimensional or three-dimensional medical images from CT, MRI, PET, or other modalities. Optionally, after acquiring the images, preprocessing operations can be performed on all images, such as size standardization and intensity normalization, to eliminate differences caused by different devices or scanning parameters.

[0138] Next, the first and second sample images can be input into a shared encoder to obtain the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space. The shared encoder can employ a convolutional neural network or a visual transformer architecture, extracting features from both images separately using an encoder with shared weights, mapping them to the same feature space. Then, the first and second image features are fused to obtain the fused image features. The fusion method can be channel-level concatenation or weighted fusion based on an attention mechanism.

[0139] After obtaining the fused image features, these features can be mapped to hyperbolic space. In practical applications, an exponential mapping function can be used to project the fused image features from Euclidean space to a Poincaré sphere model, leveraging the exponential growth property of hyperbolic space to capture the natural hierarchical geometric topology between voxels. After completing the feature transformation in hyperbolic space, a logarithmic mapping function is used to back-map the hyperbolic space features to Euclidean space, obtaining the first mapped features. Then, a first convolution kernel is used to convolve the first mapped features to obtain the fusion weights. A second convolution kernel is used to convolve the first mapped features to obtain the bias parameters. Finally, based on the fusion weights, bias parameters, and fused image features, the structural semantic features are determined. In practical applications, the product of the fused image features and the fusion weights can be calculated, and the product can be summed with the bias parameters to obtain the structural semantic features. These structural semantic features simultaneously encode the category semantic information and hierarchical geometric topological position information of the voxels.

[0140] Subsequently, based on the classification label and structural semantic features corresponding to the first sample image, a pseudo-classification label corresponding to the second sample image is determined. In some embodiments, the structural semantic features of the first sample image and the second sample image can be fused, and the fused features are input to a registration decoder. The registration decoder predicts a deformation field, and then performs a spatial transformation on the classification label of the first sample image based on the deformation field to generate a pseudo-classification label corresponding to the second sample image. In other embodiments, explicit deformation field registration can be avoided. Instead, pixel-level matching can be performed directly in the structural semantic feature space to calculate the similarity matrix between voxel features in the two images, and the label corresponding to the highest similarity is assigned to the second sample image.

[0141] After obtaining the pseudo-classification labels, the second sample image can be input into the segmentation model to be trained to obtain the predicted classification labels. Optionally, the segmentation model may include a segmentation decoder, which can input the second image features corresponding to the second sample image into the segmentation decoder to predict the classification labels, and then determine the segmentation loss based on the pseudo-classification labels and the obtained predicted classification labels. In some embodiments, the segmentation loss may include Dice loss and cross-entropy loss. Dice loss is used to measure the degree of overlap between the prediction result and the pseudo-label, and cross-entropy loss is used to constrain the classification accuracy of each voxel point. The weighted combination of the two yields the segmentation loss.

[0142] Next, the system identifies the same and different category labels in the predicted classification labels. For any two voxels in the second sample image, they can be compared to determine if they belong to the same category. If they match, they have the same category label; otherwise, they have different category labels. In practical applications, this can be done by iterating through all voxels in the image and comparing them pairwise, or by using connected component analysis to group spatially adjacent voxels with the same category label into the same connected region. This ensures that voxels within the same connected region have the same category label, while voxels between different connected regions have different category labels.

[0143] Subsequently, a same-label loss can be generated based on pseudo-classification labels and labels of the same category; a different-label loss can be generated based on pseudo-classification labels and labels of different categories. In specific implementation, voxel features corresponding to the same category labels can be used to form positive sample pairs, and voxel features corresponding to different category labels can be used to form negative sample pairs. The voxel features are projected into hyperbolic space to calculate the hyperbolic geodesic distance between each voxel pair, and distance-aware weights are introduced to construct the contrastive loss. Optionally, before determining the adaptive contrastive loss, the first and second adaptive weights can be dynamically adjusted: determine the initial hyperbolic distance between voxels with the same category label; if the initial hyperbolic distance is greater than a preset threshold, increase the first adaptive weight to strengthen the closing constraint; determine the initial hyperbolic distance between voxels with different category labels; if the initial hyperbolic distance is less than a preset threshold, increase the second adaptive weight to strengthen the pushing constraint. Then, based on the first adaptive weight corresponding to the same-label loss and the second adaptive weight corresponding to the different-label loss, the same-label loss and different-label loss are weighted to obtain the adaptive contrastive loss.

[0144] In some embodiments, the adaptive contrast loss may include an adaptive contrast loss for the registration branch and an adaptive contrast loss for the segmentation branch. The adaptive contrast loss for the segmentation branch is the contrast loss constructed based on the pseudo-classification label and the predicted classification label, which operates within the same image and optimizes the feature representation of the segmentation network through the aggregation and separation of voxel features in hyperbolic space. The adaptive contrast loss for the registration branch constructs positive and negative sample pairs across images based on the classification label of the first sample image. Voxels belonging to the same anatomical category in the first and second sample images form positive sample pairs, and voxels belonging to different anatomical categories form negative sample pairs. Geodesic distance is calculated in hyperbolic space, and distance-aware weights are introduced. This adaptive contrast loss can operate across images, optimizing the registration network by constraining the voxel features across images to be closer to similar features and separated from dissimilar features in hyperbolic space.

[0145] Next, a registration loss is determined to identify the alignment degree between the first and second sample images. The registration loss may include normalized cross-correlation loss and deformation field smoothing loss. Normalized cross-correlation loss measures the local structural similarity between the first and second sample images, while deformation field smoothing loss constrains the spatial smoothness of the deformation field, preventing excessive distortion or discontinuity.

[0146] After obtaining the segmentation loss, adaptive contrastive loss, and registration loss respectively, the segmentation model to be trained can be trained. In some embodiments, the gradients generated by the segmentation loss, adaptive contrastive loss, and registration loss on the shared encoder can be determined separately, and the three gradients can be aggregated to update the parameters of the shared encoder. Through gradient aggregation updates, the shared encoder can simultaneously receive supervision signals from the registration task, segmentation task, and contrastive learning, enabling the shared encoder to learn a shared anatomical representation that simultaneously contains semantic information, spatial structural information, and hierarchical geometric information.

[0147] Through multiple rounds of iterative training until the total loss converges, the final image segmentation model can be obtained.

[0148] The technical solution provided in this application can achieve the following effects: (1) Effectively enhances the ability to model hierarchical anatomical structures and improves the segmentation accuracy of small structures. By introducing hyperbolic space to model medical image features, and utilizing its natural geometric characteristics suitable for expressing tree-like hierarchical structures, the model can depict the hierarchical relationship from coarse to fine in anatomical structures. Compared with the traditional method of modeling only in Euclidean space, it can significantly enhance the ability to distinguish between different structures, especially in small-volume structures or regions with similar structures, reducing category confusion and thus effectively improving segmentation accuracy.

[0149] (2) Improve pseudo-label quality and enhance model robustness. By introducing a hyperbolic contrast learning mechanism during the registration process and optimizing the feature distribution through adaptive zooming and zooming strategies, the generated deformation field is made to better conform to anatomical structure constraints. The pseudo-labels generated as a result are improved in terms of structural consistency and boundary accuracy, reducing the negative impact of pseudo-label errors on subsequent segmentation training, thereby enhancing the overall robustness and generalization ability of the model.

[0150] (3) Achieve dual-space collaborative modeling and improve feature representation capability. By designing a hyperbolic hierarchical perception injection module, the hierarchical structural information in the hyperbolic space is effectively integrated into the Euclidean feature space, and structural prior information is introduced while retaining the original semantic details. This dual-space collaborative modeling method can simultaneously take into account global structural relationships and local semantic features, overcome the limitations of single-space modeling, and thus improve the overall feature representation capability.

[0151] (4) Enhance multi-task collaboration capabilities and improve training stability and efficiency. Through gradient aggregation optimization strategy, the gradients of the registration task and the segmentation task are fused together to update the parameters of the shared encoder, enabling the model to learn structural alignment information and semantic segmentation information simultaneously. Compared with traditional staged or alternating training methods, end-to-end joint optimization is achieved, reducing instability during training and improving training efficiency.

[0152] (5) Applicable to scenarios with few samples, reducing dependence on labeled data. By optimizing the quality of pseudo-label generation and feature representation capabilities, the model can still achieve high segmentation accuracy with only a small amount of labeled data. In practical applications, it can effectively reduce dependence on manually labeled data and improve the practicality of the method in real medical scenarios.

[0153] (6) It has good versatility and scalability. The hyperbolic space modeling mechanism, feature fusion method and gradient aggregation strategy proposed in this application can all be used as general modules and applied to other medical image analysis tasks (such as registration, classification, etc.) or other few-shot learning scenarios.

[0154] It should be noted that the above process is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application. Those skilled in the art can make appropriate adjustments or equivalent substitutions to the order of steps, parameter settings, algorithm selection, etc., without departing from the principles of this application, and such adjusted solutions should still fall within the scope of protection of this application.

[0155] Figure 4 A schematic diagram of a training apparatus for an image segmentation model provided in an exemplary embodiment of this application; see attached diagram. Figure 4 As shown, this embodiment provides a training device for an image segmentation model, which is used to perform the above-described... Figure 1 The training method for the image segmentation model shown may include: The first acquisition module 11 is used to acquire a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label.

[0156] The first determining module 12 is used to determine structural semantic features for identifying structural and semantic information between voxel points based on the first sample image and the second sample image. The structural semantic features are obtained by transforming between Euclidean space and hyperbolic space.

[0157] The second determining module 13 is used to determine the pseudo-classification label corresponding to the second sample image based on the classification label and structural semantic features corresponding to the first sample image.

[0158] The first training module 14 is used to train the segmentation model to be trained based on the predicted classification labels and multiple pseudo-classification labels of the second sample image, so as to obtain the image segmentation model.

[0159] In some instances, when the first determining module 12 determines structural semantic features for identifying structural and semantic information between voxel points based on the first sample image and the second sample image, the first determining module 12 is used to: determine the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space; fuse the first image features and the second image features to obtain fused image features; map the fused image features to hyperbolic space to obtain hyperbolic space features; map the hyperbolic space features back to Euclidean space to obtain fusion weights and bias parameters corresponding to the fused image features, the fusion weights and bias parameters being used to identify structural information between voxel points; and determine structural semantic features based on the fusion weights, bias parameters, and fused image features.

[0160] In some instances, when the first determining module 12 maps hyperbolic space features back to Euclidean space to obtain fusion weights and bias parameters corresponding to the fused image features, the first determining module 12 is used to perform: mapping hyperbolic space features back to Euclidean space to obtain first mapped features; performing convolution processing on the first mapped features using a first convolution kernel to obtain fusion weights; and performing convolution processing on the first mapped features using a second convolution kernel to obtain bias parameters.

[0161] In some instances, when the first training module 14 trains the segmentation model to be trained based on the predicted classification labels and pseudo-classification labels of the second sample image to obtain an image segmentation model, the first training module 14 is used to perform the following: determine the segmentation loss based on the pseudo-classification labels and the predicted classification labels; identify the same category labels and different category labels in the predicted classification labels; generate an adaptive contrast loss in hyperbolic space based on the pseudo-classification labels, the same category labels, and the different category labels; determine the registration loss used to identify the degree of alignment between the first sample image and the second sample image; and train the segmentation model to be trained based on the segmentation loss, the adaptive contrast loss, and the registration loss to obtain the image segmentation model.

[0162] In some instances, when the first training module 14 generates an adaptive contrastive loss in hyperbolic space based on pseudo-classification labels, same-class labels, and different-class labels, the first training module 14 is used to perform the following: generating a same-label loss based on pseudo-classification labels and same-class labels; generating a different-label loss based on pseudo-classification labels and different-class labels; and weighting the same-label loss and different-label loss based on the first adaptive weight corresponding to the same-label loss and the second adaptive weight corresponding to the different-label loss to obtain the adaptive contrastive loss.

[0163] In some instances, the first training module 14 is also used to perform: determining the initial hyperbolic distance between voxels with the same class label; and increasing the first adaptive weight to reduce the distance between voxels with the same class label if the initial hyperbolic distance is greater than a preset threshold.

[0164] In some instances, the first training module 14 is also used to perform: determining the initial hyperbolic distance between voxel points of different class labels; and reducing the second adaptive weights to reduce the distance between voxel points of different class labels if the initial hyperbolic distance is greater than a preset threshold.

[0165] In some instances, the segmentation model to be trained includes a shared encoder. When the first determining module 12 determines the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space, the first determining module 12 performs the following: inputting the first sample image and the second sample image into the shared encoder to determine the first image features of the first sample image in Euclidean space and the second image features of the second sample image in Euclidean space. When the first training module 14 trains the segmentation model to be trained based on the segmentation loss, adaptive contrast loss, and registration loss to obtain an image segmentation model, the first training module 14 performs the following: determining the gradients generated by the segmentation loss, adaptive contrast loss, and registration loss on the shared encoder, respectively; aggregating the gradients to obtain the aggregated gradient; and updating the parameters of the shared encoder according to the aggregated gradient to obtain the image segmentation model.

[0166] The training device for the image segmentation model in this embodiment can also execute the aforementioned embodiments. Figures 1-3 The description of the embodiments shown is for reference only, and will not be elaborated upon here.

[0167] like Figure 5 As shown, this embodiment provides an electronic device, which can refer to a complete set of hardware and software infrastructure supporting software operation, data processing, and task execution. It can provide computing resources, storage, communication, and a runtime environment for applications (such as large model inference, scientific simulations, and web services). This electronic device is used to perform the above-described tasks. Figure 1 The training method for the image segmentation model shown can be implemented in practice by an electronic device that may include a memory 24 and a processor 25.

[0168] Memory 24 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.

[0169] The processor 25, coupled to the memory 24, is used to execute a computer program in the memory 24 for: acquiring a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label; determining structural semantic features based on the first sample image and the second sample image to identify structural and semantic information between voxel points, the structural semantic features being obtained by transforming between Euclidean space and hyperbolic space; determining pseudo-classification labels corresponding to the second sample image based on the classification labels and structural semantic features corresponding to the first sample image; and training the segmentation model to be trained based on the predicted classification labels of the second sample image and the multiple pseudo-classification labels to obtain an image segmentation model.

[0170] Furthermore, such as Figure 5 As shown, the electronic device also includes other components such as a communication component 26, a display 27, a power supply component 28, and an audio component 29. Figure 5 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 5 The components shown. Additionally... Figure 5 The components within the center frame are optional, not mandatory, and their specific requirements depend on the product form of the work node. In this embodiment, the work node can be a terminal device such as a desktop computer, laptop computer, smartphone, or Internet of Things (IoT) device, or a server-side device such as a conventional server, cloud server, or server array. If the work node in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 5 The components within the center frame; if the working node in this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include... Figure 5 The component within the center frame.

[0171] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0172] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0173] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0174] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0175] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0176] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.

[0177] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.

[0178] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0179] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A training method for an image segmentation model, characterized in that, include: Acquire a first sample image and a second sample image, wherein the first sample image and the second sample image are both medical images corresponding to the same anatomical structure, the first sample image has multiple classification labels, and the second sample image does not have a corresponding classification label; Based on the first sample image and the second sample image, structural semantic features are determined to identify structural and semantic information between voxel points. These structural semantic features are obtained by transforming between Euclidean space and hyperbolic space. Based on the classification label corresponding to the first sample image and the structural semantic features, determine the pseudo-classification label corresponding to the second sample image; The image segmentation model is trained based on the predicted classification labels of the second sample image and the multiple pseudo-classification labels to obtain the image segmentation model.

2. The method according to claim 1, characterized in that, Based on the first sample image and the second sample image, structural semantic features for identifying structural and semantic information between voxel points are determined, including: Determine the first image feature of the first sample image in Euclidean space and the second image feature of the second sample image in Euclidean space; The first image features and the second image features are fused to obtain fused image features; The fused image features are mapped onto hyperbolic space to obtain hyperbolic space features; The hyperbolic space features are mapped back to Euclidean space to obtain fusion weights and bias parameters corresponding to the fused image features. The fusion weights and bias parameters are used to identify the structural information between voxel points. The structural semantic features are determined based on the fusion weights, the bias parameters, and the fused image features.

3. The method according to claim 2, characterized in that, Mapping the hyperbolic space features back to Euclidean space yields fusion weights and bias parameters corresponding to the fused image features, including: Mapping the hyperbolic space features back to Euclidean space yields the first mapped features; The first mapping feature is convolved using the first convolution kernel to obtain the fusion weights; The first mapped features are convolved using a second convolution kernel to obtain bias parameters.

4. The method according to claim 2, characterized in that, The image segmentation model is trained based on the predicted classification label and the pseudo-classification label of the second sample image to obtain the image segmentation model, including: The segmentation loss is determined based on the pseudo-classification label and the predicted classification label; Identify the same category labels and different category labels in the predicted classification labels; Based on the pseudo-classification labels, the same category labels, and the different category labels, an adaptive contrastive loss is generated in hyperbolic space; Determine the registration loss used to identify the alignment degree between the first sample image and the second sample image; The image segmentation model is obtained by training the segmentation model based on the segmentation loss, the adaptive contrast loss, and the registration loss.

5. The method according to claim 4, characterized in that, Based on the pseudo-classification labels, the same-class labels, and the different-class labels, an adaptive contrastive loss in hyperbolic space is generated, including: Based on the pseudo-classification labels and labels of the same category, generate the same-label loss; Based on the pseudo-classification labels and different category labels, generate heterolabel loss; Based on the first adaptive weight corresponding to the same-label loss and the second adaptive weight corresponding to the different-label loss, the same-label loss and different-label loss are weighted to obtain the adaptive contrast loss.

6. The method according to claim 5, characterized in that, The method further includes: Determine the initial hyperbolic distance between voxel points with the same category label; If the initial hyperbolic distance is greater than a preset threshold, the first adaptive weight is increased to reduce the distance between voxel points with the same category label.

7. The method according to claim 5, characterized in that, The method further includes: Determine the initial hyperbolic distance between voxel points of different label categories; If the initial hyperbolic distance is greater than a preset threshold, the second adaptive weight is reduced to reduce the distance between voxel points of different category labels.

8. The method according to claim 7, characterized in that, The segmentation model to be trained includes a shared encoder; Determining the first image feature of the first sample image in Euclidean space and the second image feature of the second sample image in Euclidean space includes: The first sample image and the second sample image are input into a shared encoder to determine the first image feature of the first sample image in Euclidean space and the second image feature of the second sample image in Euclidean space. The image segmentation model is trained based on the segmentation loss, the adaptive contrast loss, and the registration loss to obtain an image segmentation model, including: Determine the gradients generated by the segmentation loss, the adaptive contrast loss, and the registration loss for the shared encoder, respectively. The gradients are aggregated to obtain the aggregated gradient; The parameters of the shared encoder are updated based on the aggregated gradient to obtain an image segmentation model.

9. An electronic device, characterized in that, include: The system includes a memory, a processor, and a communication interface; wherein the memory stores executable code that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 8.

10. A computer storage medium, characterized in that, Used to store a computer program that, when executed by a computer, implements the method of any one of claims 1-8.