A cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing
Patent Information
- Application Number
- CN202610943235.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2046-06-29
AI Technical Summary
[0003]在多中心、多设备或多协议数据混合训练时,单一 LoRA 或统一SAM模型容易出现不同域特征相互干扰、少数域性能下降以及模型维护成本较高等问题
[0014] This invention provides a cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing. The method maps a standardized knee MRI input to a weighted, frozen base image encoder as a token sequence and adds positional encoding input to an attention module. This sequence is then combined with Query and Value projection matrices, injecting shared low-rank adaptation increments and domain-specific low-rank adaptation increments at the corresponding projection matrices to generate Query and Value features. The sample-level domain routing module calculates the reliability of data domain labels based on sample-level data domain labels and determines the domain routing gating weights. Based on the Query, Key, and Value features, segmentation is performed according to the domain routing gating weights to obtain multi-class segmentation results for bone and cartilage, and then outputs structured indicators. This addresses the shortcomings of existing human knee MRI segmentation methods in generalization scenarios involving small samples, multiple centers, cross-device operations, cross-scanning protocols, and cross-scanning positions.
Smart Images

Figure CN122473175B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of medical image processing, computer vision and artificial intelligence technology, and specifically relates to a cross-data domain knee cartilage MRI segmentation method based on sample-level domain routing. Background Technology
[0002] In real clinical and research applications, human knee MRI data often comes from multiple data sources. There are differences in signal intensity, noise level, resolution, and artifacts between different MRI equipment and magnetic field strengths; there are differences in voxel spacing, slice orientation, sequence parameters, and image contrast between different hospital centers and scanning protocols; and there are differences in joint space, cartilage compression morphology, relative position of bone, and soft tissue background distribution between different scanning positions.
[0003] When training with mixed data from multiple centers, devices, or protocols, a single LoRA or unified SAM model is prone to problems such as mutual interference between features from different domains, performance degradation in a few domains, and high model maintenance costs.
[0004] While existing methods may set LoRA branches in the Q and V projection layers of the image encoder, they typically do not address the multi-center, multi-device, multi-protocol, multi-position, and multi-signal state differences in human knee MRI by designing sample-level data domain label parsing, shared low-rank adaptation and domain-specific low-rank adaptation collaboration, domain similarity soft routing, low-rank subspace decoupling, visible category supervision, and unknown domain inference degradation mechanisms. Summary of the Invention
[0005] To address the aforementioned technical problems, the present invention provides a cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing. The main process for model forward segmentation and result output includes the following steps:
[0006] Acquire knee joint MRI body data, parse out multiple data domains based on a preset data domain library, and assign sample-level data domain labels; If the knee MRI volume data is a two-dimensional image, its original spatial orientation information and pixel spacing information are read. If it is three-dimensional volume data, its image data, affine matrix or spatial orientation matrix are read, the sagittal slice axis is determined, and two-dimensional sagittal slices are extracted along the sagittal slice axis. The corresponding preprocessing parameters are determined according to the sample-level data domain label. The above data is subjected to domain-aware preprocessing of image spatial information to obtain standardized knee MRI input. The standardized knee MRI input is mapped to a token sequence by a weight-frozen base image encoder and then input into the attention module after adding position encoding. This sequence is combined with the query projection matrix and the value projection matrix. Shared low-rank adaptation units inject shared low-rank adaptation increments at the corresponding projection matrix positions. At least two domain-specific low-rank adaptation units inject domain-specific low-rank adaptation increments at the corresponding projection matrix positions to generate query features and value features, respectively. At the same time, the sample-level domain routing module calculates the reliability of data domain labels based on sample-level data domain labels and determines the domain routing gating weights. Based on Query features, Key features, and Value features, segmentation is performed according to domain routing gating weights to obtain multi-class segmentation results for bone and cartilage, and then structured indicators are output.
[0007] Preferably, the sample-level data domain labels include hospital center sub-labels, scanning equipment manufacturer sub-labels, magnetic field strength sub-labels, MRI sequence sub-labels, scanning protocol sub-labels, scanning position sub-labels, pathological or joint effusion status sub-labels, and background signal status sub-labels.
[0008] Preferably, for the knee joint MRI body data with magnetic field strength sub-labels or MRI sequence sub-labels, intensity truncation and normalization are performed based on the intensity percentile statistics within the corresponding data domain to perform domain-aware preprocessing.
[0009] Preferably, for the knee joint MRI body data with scan position sub-labels, the spatial prior orientation of the bone and cartilage structures is determined based on the scan position sub-labels to perform domain-aware preprocessing.
[0010] Preferably, for the knee joint MRI body data with pathological or joint effusion state sub-labels and background signal state sub-labels, the corresponding state is written into the sample-level data domain label, and domain-aware preprocessing is performed based on the sample-level data domain label.
[0011] Preferably, if the number of samples reaches a preset threshold and the sample-level data domain labels are complete, an independent domain-specific low-rank adaptation unit is established. If the number of samples does not reach the preset threshold, the labels are missing, or the sample-level data domain labels are newly added, the sub-label similarity and data domain label reliability are calculated based on the hospital center sub-label, scanning equipment manufacturer sub-label, magnetic field strength sub-label, MRI sequence sub-label, scanning protocol sub-label, scanning position sub-label, pathology or joint effusion state sub-label, and background signal state sub-label. Based on the sub-label similarity and data domain label reliability, the data domain labels are routed to one or more similar domain-specific low-rank adaptation units.
[0012] Preferably, the sub-tag similarity is calculated by assigning weights based on the center, device, magnetic field strength, MRI sequence, scanning protocol, scanning position, and image signal status.
[0013] Preferably, the method includes: For the bone category, the domain routing gating weights focus on sharing low-rank adaptor units to maintain a stable cross-domain bone contour representation. For the thin-layer cartilage category, the domain routing gating weights simultaneously consider shared low-rank adaptation units and sequence, protocol, and position-related domain-specific low-rank adaptation units; For data domains with significant joint effusion or background high signal interference, the domain routing gating weights increase the contribution of the pathological or signal state branches to enhance the ability to distinguish cartilage from adjacent high signal regions.
[0014] This invention provides a cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing. The method maps a standardized knee MRI input to a weighted, frozen base image encoder as a token sequence and adds positional encoding input to an attention module. This sequence is then combined with Query and Value projection matrices, injecting shared low-rank adaptation increments and domain-specific low-rank adaptation increments at the corresponding projection matrices to generate Query and Value features. The sample-level domain routing module calculates the reliability of data domain labels based on sample-level data domain labels and determines the domain routing gating weights. Based on the Query, Key, and Value features, segmentation is performed according to the domain routing gating weights to obtain multi-class segmentation results for bone and cartilage, and then outputs structured indicators. This addresses the shortcomings of existing human knee MRI segmentation methods in generalization scenarios involving small samples, multiple centers, cross-device operations, cross-scanning protocols, and cross-scanning positions. Attached Figure Description
[0015] Figure 1 This is a flowchart of the forward segmentation process for a cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing. Figure 2 A diagram of a shared-domain-specific low-rank adaptation segmentation network structure; Figure 3 This is a schematic diagram of sample-level domain routing. Detailed Implementation
[0016] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0017] The “data domain” referred to in this invention refers to the data distribution formed by the differences in the acquisition source, imaging conditions or image state of human knee MRI, specifically including the hospital center domain, scanning equipment domain, magnetic field strength domain, MRI sequence domain, scanning protocol domain, scanning position domain, joint effusion or pathological state domain, background signal intensity domain and combinations thereof.
[0018] For example, the data field can be a Siemens 3T T2 sequence from a certain hospital, a GE 1.5T PD sequence from a certain hospital, a Philips 3T PD sequence from a certain hospital, supine knee MRI, standing knee MRI, knee MRI with high signal intensity and joint effusion, or knee MRI with high signal intensity in the background, etc.
[0019] To address the technical problems mentioned in the background section, this invention breaks down the technical problems into the following sub-problems: 1. How to adapt human knee joint MRI cartilage and bone segmentation tasks with small sample labeled data while freezing the main parameters of the basic segmentation model; 2. How to avoid feature capacity contention in a single LoRA parameter subspace during multi-center, multi-device, and multi-protocol training; 3. How to enable the model to learn both the common bone, cartilage and joint spatial structural features of human knee MRI, and the scale, morphology, signal distribution and imaging differences of specific hospital centers, specific equipment, specific scanning protocols, specific scanning positions or specific image signal states. 4. How to stably train a segmentation model when the number of samples in different data domains is unbalanced and some data domains have incomplete labeling; 5. How to output multi-class segmentation results of bone and cartilage to provide a basis for calculating structured indicators such as cartilage area, volume, and thickness.
[0020] like Figure 1 As shown in the figure, this embodiment of the invention provides a cross-data domain knee cartilage MRI segmentation method based on sample-level domain routing, which describes the model forward segmentation main process, model training process, and inference application process separately. S1 to S4 correspond to... Figure 1 The main forward segmentation process is shown; S5 to S7 describe further implementation methods for model training, validation selection, and inference based on this main process, explaining how the shared low-rank adaptor unit, domain-specific low-rank adaptor unit, and sample-level domain routing module are trained and used. The method includes the following steps: S1: Acquire knee joint MRI body data, parse out multiple data domains based on a preset data domain library, and assign sample-level data domain labels.
[0021] The data domain is determined by at least two of the following factors: hospital center, scanning equipment, magnetic field strength, MRI sequence, scanning protocol, scanning position, joint effusion, pathological condition, and background signal intensity.
[0022] The inclusion of at least two data domains in the training sample set is an essential technical feature of this invention. If a segmentation model is built only for a single data domain, the technical effect of mitigating cross-data domain feature interference through shared low-rank adaptors, domain-specific low-rank adaptors, and multi-data-domain hybrid training design cannot be demonstrated.
[0023] The sample-level data domain labels include sub-labels for hospital center, scanning equipment manufacturer, magnetic field strength, MRI sequence, scanning protocol, scanning position, pathology or joint effusion status, and background signal status. When some sub-labels are missing, the missing sub-labels are marked as "unknown," and the similar data domains of the sample can be determined by combining existing sub-labels, image intensity statistical features, and encoder shallow image features.
[0024] The knee joint MRI volume data can be two-dimensional or three-dimensional.
[0025] In this invention, the sample-level data domain label is not merely used to record the sample source, but rather serves as a sample-level domain descriptor participating in subsequent data processing, model branch establishment, training sampling, and inference routing. The sample-level data domain label can be used to determine preprocessing parameters, domain normalization strategies, domain-specific low-rank adaptation branches, training sampling weights, the loss function calculation range, and branch invocation methods during the inference phase.
[0026] S2, if the knee joint MRI volume data is two-dimensional, its original spatial orientation information and pixel spacing information are read; if it is three-dimensional, its image data, affine matrix, or spatial orientation matrix are read to determine the sagittal slice axis, and two-dimensional sagittal slices are extracted along the sagittal slice axis. Based on the sample-level data domain labels, the corresponding preprocessing parameters are determined, and domain-aware preprocessing is performed on the above data to obtain standardized knee joint MRI input. The aforementioned spatial orientation information, pixel spacing information, and slice order information are used to ensure that the two-dimensional slice segmentation results can be reconstructed into a three-dimensional segmentation mask according to the spatial order of the original MRI volume data, and are used for subsequent calculation of structured indicators such as cartilage area, volume, thickness, or ROI features.
[0027] Then, based on the sample-level data domain labels, the corresponding preprocessing parameters are determined, and the image is preprocessed, including intensity percentile truncation, normalization, size standardization, and channel conversion.
[0028] For example, for data domains with different magnetic field intensities or different MRI sequences, the intensity percentile statistics within the corresponding data domain are used for truncation and normalization. For instance, knee MRI body data with magnetic field intensity sub-labels or MRI sequence sub-labels are truncated to low and high percentiles before being mapped to a unified numerical range to reduce signal intensity differences caused by different devices and scanning protocols. For data domains with different scanning positions, the spatial prior orientation of the corresponding bone and cartilage structures in the knee MRI body data is determined based on the scanning position sub-label. For knee MRI body data with obvious joint effusion or background high signal states, and with pathological or joint effusion state sub-labels and background signal state sub-labels, the corresponding states are written into the sample-level data domain labels so that subsequent model branches can learn the distinguishing features between cartilage and adjacent high signal regions.
[0029] Based on the three-dimensional spatial mapping submatrix in the upper left corner of the affine matrix, the absolute values of the projections of the left and right anatomical directions onto each voxel axis are calculated, and the voxel axis containing the largest projection is determined as the sagittal slice axis.
[0030] S3: The standardized knee MRI input, preprocessed by S2, is divided into multiple image blocks. The patch embedding layer of the base image encoder, after weight freezing, is mapped to a token sequence. The position code is added to the token sequence and then input into the attention module of the base image encoder.
[0031] Let the token sequence after adding position encoding be X. In the attention module, based on the token sequence, it is combined with the Query projection matrix, the Key projection matrix (the Key projection matrix is frozen and will not change; the Key features are consistent with the Key projection matrix), and the Value projection matrix to generate Query, Key, and Value features, i.e. , , .
[0032] in, , and These represent the Query projection matrix, Key projection matrix, and Value projection matrix in the basic image encoder, respectively.
[0033] The shared low-rank adaptation unit injects shared low-rank adaptation increments at the corresponding projection matrix (e.g., at the Query projection matrix and the Value projection matrix) to learn cross-domain common anatomical features such as solid contours, cartilage attachment regions, joint spaces, and osteochondral adjacency relationships that exist in different knee joint MRI data domains.
[0034] One or more of at least two domain-specific low-rank adaptation units are injected with domain-specific low-rank adaptation increments at the corresponding projection matrices (e.g., the Query projection matrix and the Value projection matrix) to learn scale, morphology, signal distribution, or imaging differences under a specific data domain. These differences include annotation and reconstruction differences between different hospital centers, noise and resolution differences caused by different equipment or magnetic field strengths, tissue contrast differences caused by different MRI sequences or scanning protocols, differences in joint space and cartilage compression morphology caused by different scanning positions, and boundary confusion differences caused by joint effusion or high background signal states.
[0035] The final output includes the incremental Query features, Key features, and Value features.
[0036] Meanwhile, the sample-level domain routing module determines the domain routing gating weights based on sample-level data domain labels, data domain label reliability, and image features.
[0037] The domain routing gating weight is used to determine the contribution (data domain label reliability) of shared low-rank adaptors and one or more domain-specific low-rank adaptors in the current sample. When a sample has a clear and reliable data domain label, the domain routing gating weight can make the corresponding domain-specific low-rank adaptor make a higher contribution. When the data domain label of the sample is missing, has low reliability, or belongs to an unknown data domain, the domain routing gating weight can increase the contribution of shared low-rank adaptors or similar domain-specific low-rank adaptors.
[0038] The sample-level domain routing module determines the invocation method of shared low-rank adaptation units and domain-specific low-rank adaptation units based on sample-level data domain labels, data domain label reliability, and image features.
[0039] Assume the standardized knee MRI input is The token features obtained after patch embedding are: ,in Indicates the number of image patches, each This represents the embedding features of an image patch.
[0040] In the process of establishing at least two domain-specific low-rank adaptation units, this invention does not simply establish multiple LoRA branches based on hospital centers. Instead, it establishes a correspondence between data domains and at least two domain-specific low-rank adaptation units based on the combination of sub-labels of sample-level data domain labels. For data domains with a sample size reaching a preset threshold and complete domain labels, an independent domain-specific low-rank adaptation branch is established. For data domains with insufficient samples, missing labels, or newly added labels, they are routed to one or more similar domain-specific low-rank adaptation units based on the similarity of sub-labels for center, equipment, magnetic field strength, MRI sequence, scanning protocol, scanning position, and image signal status. The sub-label similarity can be calculated with weights assigned according to center, equipment, magnetic field strength, MRI sequence, scanning protocol, scanning position, and image signal status, thereby avoiding the neglect of intra-domain differences caused by coarse-grained branching based solely on hospital centers.
[0041] In one embodiment, the relationship between data domain labels and domain-specific branches includes both hard routing and soft routing. When an input sample has complete and reliable data domain labels, the domain-specific low-rank adaptation branch corresponding to that data domain is invoked. When an input sample lacks partial data domain labels or belongs to a newly added data domain, the routing weights of multiple candidate domain-specific branches are calculated based on its existing sub-labels and image features, and the multiple domain-specific low-rank adaptation increments are weighted and combined. Therefore, this invention can maintain a unified model structure in multi-center, multi-device, multi-scanning protocol, and unknown domain scenarios, while reducing feature competition between different data domains.
[0042] The improvements made to the domain-specific low-rank adaptors differ. The central domain-specific low-rank adaptor focuses on learning differences in annotation habits, image reconstruction parameters, and overall grayscale distribution among different hospitals; the device or magnetic field strength domain-specific low-rank adaptor focuses on learning differences in noise levels, spatial resolution, and artifact patterns; the MRI sequence or scanning protocol domain-specific low-rank adaptor focuses on learning differences in signal contrast relationships between cartilage, synovial fluid, and bone marrow; the scanning position domain-specific low-rank adaptor focuses on learning differences in joint space changes, cartilage compression morphology, and relative bone position; and the joint effusion or high-signal background domain-specific low-rank adaptor focuses on learning the distinguishing features between cartilage boundaries and adjacent high-signal regions. By mapping these different types of domain differences to different domain-specific branches, this design addresses issues 2 and 3, namely, avoiding capacity competition in multi-domain mixed training with a single low-rank adaptor subspace while preserving the expression of shared anatomical structures across domains.
[0043] This invention selects the Query projection matrix and Value projection matrix A low-rank adaptation increment is set at the location without changing the original weights of the frozen base image encoder. Query projection determines how the current image patch focuses on other image patches, influencing the model's retrieval relationships for cartilage boundaries, osteochondral adjacency regions, and high-signal regions of joint effusion; Value projection determines the aggregated image content representation, affecting the cartilage, bone, and background tissue features that the model ultimately passes to the segmentation decoder. Therefore, in and By introducing shared low-rank adaptation increments and domain-specific low-rank adaptation increments, we can simultaneously adjust cross-domain shared attention relationships and image content representation under specific data domains.
[0044] For algorithm layer l, its Query projection and Value projection are respectively represented as:
[0045]
[0046] in, For the first The input token features of each attention layer; and The Query projection matrix and Value projection matrix are frozen in the basic image encoder; and To adapt incremental changes for sharing low-rank; and For the first Low-rank adaptation increments corresponding to domain-specific low-rank adaptation branches; Indicates sample Call the first The routing weights of the domain-specific low-rank adaptation branches, and When the sample has complete and reliable data domain labels, Take the larger value at the corresponding data domain branch; when the sample lacks part of the data domain label or belongs to an unknown data domain. The low-rank adaptation increment is determined based on the similarity of data domain sub-labels and image features. This low-rank adaptation increment only works in conjunction with the original projection matrix during forward computation and does not change the original parameters of the base image encoder.
[0047] In one embodiment, the shared low-rank adaptation increment and the domain-specific low-rank adaptation increment are respectively represented as:
[0048]
[0049] in, and These represent the ranks of the shared low-rank adaptor and the domain-specific low-rank adaptor, respectively. and These represent the scaling factors for shared low-rank adaptors and domain-specific low-rank adaptors, respectively. , A low-rank matrix for sharing low-rank adaptor units; , For the first The low-rank matrix of the domain-specific low-rank adaptor unit. The above matrix is only used as trainable adaptor parameters, and the original weights of the base image encoder remain frozen.
[0050] To avoid repetitive feature learning by shared branches and domain-specific branches, this invention sets decoupling constraints on shared low-rank adaptation increments and domain-specific low-rank adaptation increments during the training phase. This causes shared low-rank adaptation units to be biased towards learning cross-domain stable bone and cartilage structures, while domain-specific low-rank adaptation units are biased towards learning differences in grayscale, noise, protocol, body position, or pathological states specific to a particular domain. In one embodiment, a penalty term can be set on the correlation between the shared low-rank matrix and the domain-specific low-rank matrix to reduce their overlap in the low-rank subspace, thereby alleviating capacity competition that occurs in multi-domain mixed training with a single LoRA or simple multiple LoRA branches.
[0051] Furthermore, this invention can set structure-sensitive gating under different anatomical structures or different categories of supervision. For the bone body category, the gating weights focus more on shared low-rank adaptors to maintain stable bone contour expression across domains; for the thin cartilage category, the gating weights consider both shared low-rank adaptors and sequence, protocol, and position-related domain-specific low-rank adaptors; for data domains with significant joint effusion or background high signal interference, the gating weights increase the contribution of pathological or signal state branches to enhance the ability to distinguish cartilage from adjacent high signal regions.
[0052] S4, the image encoder output features are input into the segmentation decoder to obtain multi-class segmentation results for bone and cartilage. The segmentation decoder upsamples and convolves the features output by the basic image encoder to generate pixel-level or voxel-level multi-class segmentation maps. In one embodiment, the segmentation categories include background, femur_bone, tibia_bone, patella_bone, femoral_cartilage, tibial_cartilage, and patellar_cartilage. The bone category serves as the anatomical context for cartilage segmentation, enabling the model to simultaneously learn bone boundaries and cartilage attachment areas, thereby improving the stability of thin-layer cartilage segmentation. This design addresses problem point 5 above, namely, by simultaneously outputting multi-class segmentation results for bone and cartilage, it provides an anatomical basis for subsequent calculation of structured indicators such as cartilage area, volume, and thickness. For three-dimensional MRI volume data, the segmentation results of multiple two-dimensional slices can be reconstructed into a three-dimensional segmentation mask according to the original spatial order, and further calculated structured indicators such as cartilage area, volume, and thickness. This design addresses problem point 5 above by further transforming the segmentation results into structured indicators such as cartilage area, volume, thickness, or ROI features.
[0053] S5, further, during the model training phase, the network is trained using a multi-data-domain hybrid approach. The training phase constructs a training sample set containing at least two data domains, retaining the sample-level data domain label for each training sample. Training batches are constructed using a domain-balanced batch method, ensuring each batch preferentially includes samples from at least two different data domains. When the number of samples in a particular data domain is small, the sampling weight is set based on the reciprocal of the square root of the number of samples in that domain, increasing the probability of a minority domain entering the training batch while avoiding excessive resampling of that domain. In each training batch, all samples invoke a shared low-rank adaptation unit; simultaneously, each sample invokes one or more domain-specific low-rank adaptation units based on its own data domain label. For samples from different data domains within the same batch, the domain-specific low-rank adaptation increments differ, but the shared low-rank adaptation increments are the same. In this way, the model simultaneously receives cross-domain shared structural supervision and domain-specific differential supervision in the same parameter update, thus forming a collaborative learning of shared features and domain-specific features. This design addresses problem point 4 above, namely, improving the stability of a minority data domain participating in training and validation evaluation when the number of samples in different data domains is unbalanced.
[0054] During training, the original weights of the base image encoder are frozen, and only the shared low-rank adaptor unit, domain-specific low-rank adaptor unit, sample-level domain routing module, and segmentation decoder are updated. Training losses include basic segmentation loss, domain-balanced segmentation loss, and low-rank subspace decoupling loss. The basic segmentation loss is obtained by weighting the Dice loss and cross-entropy loss, and is used to supervise the multi-class segmentation results of bone and cartilage. The domain-balanced segmentation loss calculates the segmentation loss separately for each data domain and then performs a weighted sum, ensuring that a few or difficult-to-separate domains are not overwhelmed by the gradients of the majority domains. The low-rank subspace decoupling loss reduces feature overlap between the shared low-rank adaptor increment and the domain-specific low-rank adaptor increment, enabling the shared branch to learn stable anatomical structures across domains, and the domain-specific branch to learn imaging differences in specific domains. This design addresses problem 1 above, namely, adapting knee MRI bone and cartilage segmentation tasks with small sample labeled data while freezing the main parameters of the base model.
[0055] For data domains with only partial structural annotations, this invention employs a visible category supervision method. Let the sample... The set of visible annotation categories is Then only for In this method, Dice loss and cross-entropy loss are calculated for each category. Unlabeled categories are not considered background or negative samples in the loss calculation. This approach allows different data domains to participate in mixed training even if their labeled categories are inconsistent, avoiding incorrect supervision introduced by forcibly unifying the label set. When some structures in the training data are unlabeled or the labeled categories in different data domains are not entirely consistent, the visible category supervision method addresses problem point 4 above, preventing unlabeled categories from being incorrectly used as background or negative samples in training, thereby improving the stability when partially labeled data domains participate in mixed training.
[0056] In one embodiment, the total training loss can be expressed as:
[0057] in, This represents the basic segmentation loss, which consists of Dice loss and cross-entropy loss. This represents the domain-weighted, balanced partitioning loss. This represents the decoupling constraint between shared low-rank adaptors and domain-specific low-rank adaptors; This represents the stability constraint of the sample-level domain routing weights; , , These are the weight coefficients for the corresponding loss terms. Through the above-mentioned joint optimization of multiple losses, this invention can simultaneously improve overall segmentation performance, minority domain segmentation performance, and unknown domain generalization ability in multi-center, multi-device, and multi-protocol data hybrid training.
[0058] S6. Further, in the model validation phase, model selection is based on data domain-based stratified validation. During validation, the training and validation sets are divided according to the patient or sample subject to avoid different slices from the same patient being included in both sets simultaneously. K-fold cross-validation is performed using data domain labels as stratified variables, ensuring that each fold of the training and validation sets includes data from different hospital centers, different equipment, different scanning protocols, different scanning positions, or different image signal states. When selecting a model, not only is the average Dice index of all validation samples calculated, but also the Dice index of each data domain, the worst-performing data domain Dice index, and the performance differences between different data domains are calculated separately. Models with higher average Dice and smaller inter-domain performance differences are prioritized to avoid models that optimize only most data domains while neglecting a few.
[0059] S7, further, in the inference application phase, the corresponding adaptation path is invoked and the segmentation mask and structured indicators are output based on the explicit data domain, similar data domain, or unknown data domain. For the knee MRI image to be segmented, spatial orientation resolution, sagittal slice extraction, intensity normalization, size standardization, and channel conversion, consistent with the training phase, are performed first. If the image to be processed has complete and reliable data domain labels, the corresponding domain-specific low-rank adaptation branch is invoked; if the image to be processed only has partial data domain labels, multiple similar domain-specific branches are invoked based on existing sub-labels and image features; if the image to be processed belongs to an unknown data domain, it degenerates to using only the shared low-rank adaptation branch, or uses a soft-domain routing method to combine multiple candidate domain-specific branches. The segmentation network outputs a two-dimensional slice-level segmentation mask or a three-dimensional volume data segmentation mask, and calculates structured indicators such as the area, volume, and thickness of the femoral cartilage, tibial cartilage, and patellar cartilage based on the segmentation mask.
[0060] This invention unifies sample-level data domain labeling with domain-aware preprocessing, shared-domain-specific low-rank adaptation, sample-level domain routing, multi-data-domain hybrid training, and unknown domain inference. Compared to simply setting ordinary LoRA branches in the Q-projection and V-projection layers, this invention further introduces domain-similar soft routing, shared / domain-specific low-rank subspace decoupling, structure-sensitive gating, and domain-balanced hybrid training mechanisms. This enables knee MRI samples from different hospital centers, different devices, different scanning protocols, different scanning positions, and different signal states to learn their differences within the same basic model, while preserving the shared knee joint anatomical structures across domains. This improves the stability and generalization ability of automatic segmentation of cartilage and bone in multi-center, multi-device, and multi-protocol knee MRI.
[0061] Example 1: Multicenter Human Knee Joint MRI Shared-Domain-Specific Low-Rank Adaptation Joint Training Input human knee MRI images and corresponding segmentation annotations from at least two hospital centers or scanning devices. The system first reads the 3D MRI volume data and its spatial orientation information, determines the sagittal slice axis, and converts the 3D MRI volume data into standardized 2D sagittal slices. Simultaneously, the system generates sample-level data domain labels for each sample, such as hospitalA_siemens3T_T2 or hospitalB_GE15T_PD. These sample-level data domain labels can be further subdivided into center sub-labels, device sub-labels, magnetic field strength sub-labels, MRI sequence sub-labels, and scanning protocol sub-labels.
[0062] The model uses the SAM ViT-B image encoder as the base image encoder, and its original parameters are frozen. Shared low-rank adaptation units and domain-specific low-rank adaptation units are set at the Query and Value projection matrices of the Transformer attention module. For samples from hospitalA_siemens3T_T2, the model calls both the shared low-rank adaptation unit and the corresponding domain-specific low-rank adaptation unit for hospitalA_siemens3T_T2; for samples from hospitalB_GE15T_PD, the model calls both the shared low-rank adaptation unit and the corresponding domain-specific low-rank adaptation unit for hospitalB_GE15T_PD. If a sample's data domain label is missing some sub-labels, the routing weights of multiple candidate domain-specific branches are calculated based on the existing sub-labels and image features.
[0063] The segmentation decoder outputs multi-class segmentation results. In one embodiment, the output classes include background, femur_bone, tibia_bone, patella_bone, femoral_cartilage, tibial_cartilage, and patellar_cartilage. If the data from a hospital center or a scanning protocol only labels some cartilage classes, then during training, the supervised loss is calculated only for the labeled classes, and unlabeled structures are not forcibly penalized as negative samples.
[0064] During training, human knee MRI images from different hospital centers, using different equipment, or employing different scanning protocols are input into the shared-domain-specific low-rank adaptation segmentation network. Training batches preferentially include samples from at least two different data domains. All samples utilize the shared low-rank adaptation unit, while samples from different data domains utilize their respective domain-specific low-rank adaptation units. The training loss employs a combination of Dice loss, cross-entropy loss, domain-balanced segmentation loss, low-rank subspace decoupling loss, and routing stability loss. This implementation demonstrates that the method can process different human knee MRI data domains within the same network framework and supports training scenarios with small samples and inconsistent annotation categories.
[0065] Example 2: Cross-device, cross-scanning protocol, or cross-image state extension In addition to different hospital centers, the domain-specific low-rank adaptation unit can be extended to different MRI equipment, different magnetic field strengths, different MRI sequences, different scanning protocols, different scanning positions, different joint effusion states, or different background signal intensity states. For each new data domain, whether to establish a new domain-specific low-rank adaptation branch can be determined based on the number of samples and the completeness of the data domain labels. For data domains with a sample count reaching a preset threshold and complete labels, a corresponding domain-specific low-rank adaptation branch is established; for data domains with insufficient samples or missing labels, the sample-level domain routing module maps them to one or more similar domain-specific low-rank adaptation branches.
[0066] For example, a data field may include: domain_1 = hospitalA_siemens3T_T2 domain_2 = hospitalB_GE15T_PD domain_3 = hospitalC_philips3T_T2 domain_4 = supine_T2 domain_5 = standing_PD domain_6 = T2_effusionHighSignal domain_7 = PD_highBackgroundSignal During training, each sample calls the corresponding domain-specific branch or multiple similar domain-specific branches based on its own data domain label. During inference, if the input image lacks a clear data domain label, only the shared low-rank adaptation branch can be used, or the combined weights of each domain-specific low-rank adaptation branch can be estimated through the soft domain routing module.
[0067] This invention provides a cross-data domain knee cartilage MRI segmentation method based on sample-level domain routing. It involves using a basic visual segmentation model, a shared low-rank adaptation module, and a domain-specific low-rank adaptation module to automatically segment the bone and cartilage structures in human knee MRI from different hospital centers, different MRI equipment, different magnetic field strengths, different MRI sequences, different scanning protocols, different scanning positions, and different image signal states.
[0068] Compared with the prior art, the present invention has at least the following beneficial effects: 1. This invention unifies data preprocessing, domain-specific branch establishment, low-rank adaptation path selection, multi-data-domain hybrid training, and unknown domain inference by using sample-level data domain labels. This allows data domain labels to no longer be used merely as training set partitioning or validation statistical fields, but to directly participate in model forward computation and parameter optimization.
[0069] 2. Compared to simply setting ordinary LoRA branches in the Q and V projection layers, this invention further introduces shared / domain-specific low-rank subspace decoupling, domain-similar soft routing, and structure-sensitive gating, enabling MRI samples from different hospital centers, different equipment, different scanning protocols, different scanning positions, and different signal states to learn their differences in the same basic model, while preserving the cross-domain common knee joint anatomical structure expression.
[0070] 3. Compared with direct mixed training, this invention adopts domain-balanced batch construction and data domain-weighted training loss, which can reduce gradient flooding of minority domain samples by majority domain samples and reduce the risk that the model only optimizes majority centers or majority protocols.
[0071] 4. Compared with a single LoRA medical image segmentation method, this invention divides the low-rank adaptation parameters into shared low-rank adaptation units and domain-specific low-rank adaptation units, and reduces the overlap of the low-rank subspaces of the two by decoupling constraints, which can alleviate the capacity competition caused by a single low-rank subspace simultaneously expressing multiple domain differences.
[0072] 5. This invention supports training scenarios where data domain labels are not completely consistent. For data domains with only partial structural labels, the supervised loss is calculated only for visible categories, and unlabeled categories are not used as negative samples in the loss calculation, thereby improving applicability under real medical data conditions.
[0073] 6. This invention supports reasoning for unknown data domains or data domains with partially missing labels. When the image to be processed lacks complete data domain labels, it can degenerate into a shared low-rank adaptation branch, or combine multiple candidate domain-specific branches using soft domain routing based on existing sub-labels and image features, thereby improving the model scalability in cross-center, cross-device, and cross-protocol scenarios.
[0074] 7. This invention simultaneously segments bone and cartilage structures. The bone category serves as the anatomical context for cartilage segmentation, which is beneficial for identifying thin-layer cartilage boundaries and can further support the calculation of structural indicators such as cartilage area, volume, and thickness.
Claims
1. A cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing, characterized in that, Includes the following steps: Acquire knee MRI volume data, parse out multiple data domains based on a preset data domain library, assign sample-level data domain labels, and obtain standardized knee MRI input based on the knee MRI volume data; The standardized knee MRI input is mapped to a token sequence by a weight-frozen base image encoder and then input into the attention module after adding position encoding. This sequence is combined with the query projection matrix and the value projection matrix. Shared low-rank adaptation units inject shared low-rank adaptation increments at the corresponding projection matrix, and at least two domain-specific low-rank adaptation units inject domain-specific low-rank adaptation increments at the corresponding projection matrix, generating query features and value features respectively. At the same time, the sample-level domain routing module calculates the reliability of data domain labels based on sample-level data domain labels and determines the domain routing gating weights. Based on Query features, Key features, and Value features, segmentation is performed according to domain routing gating weights to obtain multi-class segmentation results for bone and cartilage, and then structured indicators are output.
2. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 1, characterized in that, If the knee joint MRI volume data is a two-dimensional image, its original spatial orientation information and pixel spacing information are read. If it is three-dimensional volume data, its image data, affine matrix or spatial orientation matrix are read, the sagittal slice axis is determined, and two-dimensional sagittal slices are extracted along the sagittal slice axis. The corresponding preprocessing parameters are determined according to the sample-level data domain label, and the standardized knee joint MRI input is obtained based on the above data.
3. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 1, characterized in that, The sample-level data domain labels include hospital center sub-labels, scanning equipment manufacturer sub-labels, magnetic field strength sub-labels, MRI sequence sub-labels, scanning protocol sub-labels, scanning position sub-labels, pathological or joint effusion status sub-labels, and background signal status sub-labels.
4. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 3, characterized in that, For the knee joint MRI body data with magnetic field strength sub-labels or MRI sequence sub-labels, intensity truncation and normalization are performed based on the intensity percentile statistics within the corresponding data domain to perform domain-aware preprocessing.
5. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 3, characterized in that, For the knee joint MRI body data with scan position sub-labels, the spatial prior orientation of the bone and cartilage structures is determined based on the scan position sub-labels to perform domain-aware preprocessing.
6. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 3, characterized in that, For the knee joint MRI body data with pathological or joint effusion state sub-labels and background signal state sub-labels, the corresponding state is written into the sample-level data domain label, and domain-aware preprocessing is performed based on the sample-level data domain label.
7. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 3, characterized in that, If the number of samples reaches a preset threshold and the sample-level data domain labels are complete, an independent domain-specific low-rank adaptation unit is established. If the number of samples does not reach the preset threshold, the labels are missing, or the sample-level data domain labels are newly added, the sub-label similarity and data domain label reliability are calculated based on the hospital center sub-label, scanning equipment manufacturer sub-label, magnetic field strength sub-label, MRI sequence sub-label, scanning protocol sub-label, scanning position sub-label, pathology or joint effusion state sub-label, and background signal state sub-label. Based on the sub-label similarity and data domain label reliability, the data domain labels are routed to one or more similar domain-specific low-rank adaptation units.
8. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 7, characterized in that, The sub-label similarity is calculated by assigning weights to the center, equipment, magnetic field strength, MRI sequence, scanning protocol, scanning position, and image signal status.
9. The cross-data-domain knee cartilage MRI segmentation method based on sample-level domain routing as described in claim 3, characterized in that, The method includes: For the bone category, the domain routing gating weights focus on sharing low-rank adaptor units to maintain a stable cross-domain bone contour representation. For the thin-layer cartilage category, the domain routing gating weights simultaneously consider shared low-rank adaptation units and sequence, protocol, and position-related domain-specific low-rank adaptation units; For data domains with significant joint effusion or background high signal interference, the domain routing gating weights increase the contribution of the pathological or signal state branches to enhance the ability to distinguish cartilage from adjacent high signal regions.
Citation Information
Patent Citations
Brain tissue three-dimensional MRI image segmentation network and storage medium and processor thereof
CN118072142A
Histopathological image classification method based on multi-channel low-rank automatic encoder
CN118799629A