Method and encoder for visual perception coding of medical images based on predictive coding
By employing biomimetic low-level receptive field encoding, multi-scale structural integration, and high-level semantic feature encoding, combined with prediction error-driven and task modulation, the stability problem of convolutional neural networks in medical image analysis under weak supervision and small sample scenarios is solved, achieving highly sensitive and interpretable image feature encoding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANFU JIANGXI LAB
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing medical image analysis methods based on convolutional neural networks or Transformers struggle to maintain stable performance in weakly supervised or small-sample scenarios, especially in medical images characterized by high dimensionality, strong noise, low contrast, and high annotation costs.
A predictive coding-based medical image visual perception coding method is adopted, which combines biomimetic low-level receptive field coding, multi-scale structural integration coding, high-level semantic feature coding and prediction error calculation with a task modulation network to achieve structured representation and adaptive coding of abnormal regions.
It improves the sensitivity and interpretability of medical image analysis, enhances the structural differentiation between lesions and normal tissues, adapts to different organ scales, and improves the analysis accuracy under small sample and weak supervision.
Smart Images

Figure CN122492842A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of coding technology, and in particular to a predictive coding-based medical image visual perception coding method and encoder. Background Technology
[0002] Medical images (CT, MRI, pathological slides, etc.) are characterized by high dimensionality, high noise, low contrast, and high annotation costs in clinical diagnosis. Existing methods based on convolutional neural networks or Transformers mainly rely on large-scale labeled data, making it difficult to maintain stable performance in weakly supervised or small-sample scenarios. Summary of the Invention
[0003] Therefore, this application provides a predictive coding-based method and encoder for medical image visual perception coding.
[0004] This application discloses a predictive coding-based method for medical image visual perception coding, which includes: Step 1: Perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features; Step 2: Perform multi-scale structural integration encoding on the low-level visual features to obtain mid-level structural features; Step 3: Encode the intermediate structural features into high-level semantic features to obtain high-level semantic features; Step 4: Based on the high-level semantic features, predict and encode the intermediate-level structural features and calculate the prediction error to obtain the initial prediction error; Step 5: Generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
[0005] Further, step 1 includes: Low-level features are extracted from the input medical image using learnable Gabor-type convolutional kernels, outputting low-level visual features, represented as follows: H, W, These represent the height, width, and number of feature channels of the low-level visual features in the input medical image, respectively; the low-level visual features can respond to tissue boundaries, texture changes, and lesion areas in the medical image. The learnable Gabor-type convolutional kernel is constructed based on a Gabor filter, the expression of which is:
[0006]
[0007] in, For Gabor filters, and For spatial coordinates, The standard deviation of the Gaussian envelope controls the size of the receptive field. The direction angle controls the directional selectivity of the filter; For wavelength, control frequency selectivity; and These are the rotated spatial coordinates.
[0008] Further, step 2 includes: A multi-scale convolutional structure is used to convolve low-level visual features to obtain mid-level visual features. The multi-scale convolutional structure uses multiple convolutional kernels with scales of 3, 5, and 7. The convolutional results of different scale kernels are fused through learnable weight parameters to achieve the integration of multi-scale features. Multiple convolutional kernels are used to simulate human V2 / V4 multi-scale integration. The 3×3 convolutional kernel is used to capture local edges and fine-grained textures, the 5×5 convolutional kernel is used to capture medium-scale structural units, and the 7×7 convolutional kernel is used to capture organ-level or mass contours. Medium-scale structural units are anatomical structural units with granularity between local details and organ-level contours.
[0009] Furthermore, the expression for the intermediate structural features is:
[0010] in, It is a mid-level structural feature. This represents the number of feature channels in the intermediate structure. Indicates the first Scaled convolution kernel; For learnable weight parameters, These are low-level visual features.
[0011] Further, step 3 includes: An attention mechanism is used to globally integrate intermediate structural features and extract high-level semantic features at the organ or object level. Its expression is as follows: SemanticTransformer is an attention mechanism. It is a mid-level structural feature. For high-level semantic features, The number of channels for high-level structural features is used, and high-level semantic encoding is globally integrated through an attention mechanism. The calculation process of the attention mechanism includes the generation of the query vector Q, key vector K, and value vector V, whose expressions are as follows:
[0012] in, , , All are learnable weight matrices based on the attention mechanism, and a prior bias term B for medical anatomical structure is introduced during the attention calculation process. The prior bias term B for medical anatomical structure integrates organ spatial topological relationships, anatomical symmetry, and fixed tissue arrangement to achieve the fusion of prior information on anatomical structure. Its calculation formula is as follows:
[0013] in, This is the self-attention output matrix, used to fuse sequence representations of global dependencies; Softmax activation function is used to normalize the attention score into a probability distribution; The vector dimension of the query / key is used to scale the dot product and stabilize the training gradient.
[0014] Further, step 4 includes: The predictor network predicts intermediate structural features based on high-level semantic features, thus obtaining the predicted intermediate structural features. , For the predicted intermediate structural features, The high-level semantic features are used for prediction; the predictor network is based on these high-level semantic features. Generate predicted intermediate structural features Predictive mapping network; The difference between the intermediate structural features and the predicted intermediate structural features is calculated to obtain the initial prediction error, i.e. The initial prediction error is used to characterize lesions and abnormal areas in medical images that deviate from the characteristics of normal tissue.
[0015] Further, step 5 includes: The TaskModulator network generates modulation parameters based on the medical image analysis task type, and its expression is as follows: ,in, For scaling parameters, For offset parameters, The TaskModulator is a conditional network that generates modulation parameters based on the task type. Its function is to adapt the same encoder to segmentation, classification, and detection tasks, thereby improving multi-task generalization ability and reducing the need for repeated training of multiple models. Multiple models refer to encoder models trained separately for different medical image analysis tasks. These multiple models include segmentation task models specifically for medical image segmentation, classification task models specifically for disease classification, and detection task models specifically for object detection. The initial prediction error is linearly modulated using scaling and offset parameters to obtain the modulated prediction error. This enables the encoder to adapt to different medical image analysis tasks.
[0016] Furthermore, the training process of the encoder is as follows: Med, a neural-inspired visual perception encoder VPE input medical image sample X i The segmentation task uses pixel-level annotation labels, while the classification task uses category labels. The pixel-level annotation labels are finely annotated images that assign category numbers to each pixel in the medical image. They serve as the supervision basis for training the segmentation task and are used to train the model to accurately identify and segment different anatomical structures or lesions. Forward propagation: computing low-level visual features Intermediate structural features High-level semantic features The predicted intermediate structural features are obtained. Based on the predicted intermediate structural features, the initial prediction error is calculated. Based on the initial prediction error, task modulation is performed to correct the initial prediction error and dynamically allocate learnable weight parameters to adapt to the different needs of segmentation and classification tasks, and finally output the task results. Calculate the loss:
[0017] in, For the total loss function, For mission losses, To predict the consistency loss, the consistency between the predicted intermediate structural features and the intermediate structural features is constrained. The weighting coefficients for predicting consistency loss are used to balance the contributions of task loss and prediction consistency loss. Backpropagation: Optimizing the parameters of the neurally inspired visual perception encoder Med-VPE based on gradient descent; Training termination conditions are: verification on the validation set, the total loss converges and no longer decreases for N consecutive iterations, the maximum number of training rounds is reached, or the prediction error converges; Output encoder model; The expression for predicting the consistency loss is:
[0018] Mission loss Different loss functions are designed based on the different task types, including segmentation tasks and classification tasks: segmentation tasks use a combination of Dice Loss and Binary Cross-Entropy Loss (BCE), while classification tasks use Focal Loss.
[0019] This application also discloses a predictive coding-based medical image visual perception encoder for implementing the predictive coding-based medical image visual perception coding method described above. It includes a biomimetic low-level receptive field coding module, a multi-scale structure integration coding module, and a high-level semantic feature coding module connected in sequence, as well as a predictive coding and error calculation module connected to both the high-level semantic feature coding module and the multi-scale structure integration coding module. It also includes a task modulation and feature adaptation module connected to the predictive coding and error calculation module and an external task input terminal, respectively. The biomimetic low-level receptive field encoding module is used to perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features. A multi-scale structural integration coding module is used to perform multi-scale structural integration coding on the low-level visual features to obtain mid-level structural features. The high-level semantic feature encoding module is used to encode the intermediate structural features into high-level semantic features to obtain high-level semantic features. The prediction encoding and error calculation module is used to predict and encode the intermediate structural features based on the high-level semantic features and calculate the prediction error to obtain the initial prediction error. The task modulation and feature adaptation module is used to generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
[0020] Furthermore, it also includes an encoder training module, which is connected to the biomimetic low-level receptive field encoding module, the multi-scale structure integration encoding module, the high-level semantic feature encoding module, the predictive encoding and error calculation module, and the task modulation and feature adaptation module; the encoder training module is used to train the neural-inspired visual perception encoder Med-VPE.
[0021] Due to the adoption of the above technical solution, this application has the following advantages: 1. This application does not simply superimpose existing feature extraction and attention mechanisms, but rather achieves a structured representation of abnormal regions in the error space through the synergistic effect of "prediction error driving + anatomical structure prior constraints + task modulation", thereby improving the sensitivity and interpretability of medical image analysis.
[0022] 2. This application highlights abnormal regions through a prediction error-driven mechanism, achieving highly sensitive and interpretable medical image feature encoding.
[0023] 3. This application can adapt to different organ scales and enhance the structural differentiation between lesions and normal tissues. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0025] Figure 1 This is a flowchart illustrating a predictive coding-based medical image visual perception coding method according to an embodiment of this application. Detailed Implementation
[0026] The present application will be further described in conjunction with the accompanying drawings and embodiments. The described embodiments are only some, not all, of the embodiments of the present application. All other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of the present application.
[0027] See Figure 1 This application provides an embodiment of a predictive coding-based medical image visual perception coding method, which includes: Step 1: Perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features; Step 2: Perform multi-scale structural integration encoding on the low-level visual features to obtain mid-level structural features; Step 3: Encode the intermediate structural features into high-level semantic features to obtain high-level semantic features; Step 4: Based on the high-level semantic features, predict and encode the intermediate-level structural features and calculate the prediction error to obtain the initial prediction error; Step 5: Generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
[0028] Optionally, step 1 includes: Low-level features are extracted from the input medical image using learnable Gabor-type convolutional kernels, outputting low-level visual features, represented as follows: H, W, These represent the height, width, and number of feature channels of the low-level visual features in the input medical image, respectively; the low-level visual features can respond to tissue boundaries, texture changes, and lesion areas in the medical image. The learnable Gabor-type convolutional kernel is constructed based on a Gabor filter, the expression of which is:
[0029]
[0030] in, For Gabor filters, and For spatial coordinates, The standard deviation of the Gaussian envelope controls the size of the receptive field. The direction angle controls the directional selectivity of the filter; For wavelength, control frequency selectivity; and These are the rotated spatial coordinates.
[0031] Optionally, step 2 includes: A multi-scale convolutional structure is used to convolve low-level visual features to obtain mid-level visual features. The multi-scale convolutional structure uses multiple convolutional kernels with scales of 3, 5, and 7. The convolutional results of different scale kernels are fused through learnable weight parameters to achieve the integration of multi-scale features. Multiple convolutional kernels are used to simulate human V2 / V4 multi-scale integration. The 3×3 convolutional kernel is used to capture local edges and fine-grained textures, the 5×5 convolutional kernel is used to capture medium-scale structural units, and the 7×7 convolutional kernel is used to capture organ-level or mass contours. Medium-scale structural units are anatomical structural units with granularity between local details and organ-level contours.
[0032] Optionally, the expression for the intermediate structural features is:
[0033] in, It is a mid-level structural feature. This represents the number of feature channels in the intermediate structure. Indicates the first Scaled convolution kernel; For learnable weight parameters, These are low-level visual features.
[0034] Optionally, step 3 includes: An attention mechanism is used to globally integrate intermediate structural features and extract high-level semantic features at the organ or object level. Its expression is as follows: SemanticTransformer is an attention mechanism. It is a mid-level structural feature. For high-level semantic features, The number of channels for high-level structural features is used, and high-level semantic encoding is globally integrated through an attention mechanism. The calculation process of the attention mechanism includes the generation of the query vector Q, key vector K, and value vector V, whose expressions are as follows:
[0035] in, , , All are learnable weight matrices based on the attention mechanism, and a prior bias term B for medical anatomical structure is introduced during the attention calculation process. The prior bias term B for medical anatomical structure integrates organ spatial topological relationships, anatomical symmetry, and fixed tissue arrangement to achieve the fusion of prior information on anatomical structure. Its calculation formula is as follows:
[0036] in, This is the self-attention output matrix, used to fuse sequence representations of global dependencies; Softmax activation function is used to normalize the attention score into a probability distribution; The vector dimension of the query / key is used to scale the dot product and stabilize the training gradient.
[0037] Optionally, step 4 includes: The predictor network predicts intermediate structural features based on high-level semantic features, thus obtaining the predicted intermediate structural features. , For the predicted intermediate structural features, The high-level semantic features are used for prediction; the predictor network is based on these high-level semantic features. Generate predicted intermediate structural features Predictive mapping network; The difference between the intermediate structural features and the predicted intermediate structural features is calculated to obtain the initial prediction error, i.e. The initial prediction error is used to characterize lesions and abnormal areas in medical images that deviate from the characteristics of normal tissue.
[0038] Optionally, step 5 includes: The TaskModulator network generates modulation parameters based on the medical image analysis task type, and its expression is as follows: ,in, For scaling parameters, For offset parameters, The TaskModulator is a conditional network that generates modulation parameters based on the task type. Its function is to adapt the same encoder to segmentation, classification, and detection tasks, thereby improving multi-task generalization ability and reducing the need for repeated training of multiple models. Multiple models refer to encoder models trained separately for different medical image analysis tasks. These multiple models include segmentation task models specifically for medical image segmentation, classification task models specifically for disease classification, and detection task models specifically for object detection. The initial prediction error is linearly modulated using scaling and offset parameters to obtain the modulated prediction error. This enables the encoder to adapt to different medical image analysis tasks.
[0039] Optionally, the training process of the encoder is as follows: Med, a neural-inspired visual perception encoder VPE input medical image sample X i The segmentation task uses pixel-level annotation labels, while the classification task uses category labels. The pixel-level annotation labels are finely annotated images that assign category numbers to each pixel in the medical image. They serve as the supervision basis for training the segmentation task and are used to train the model to accurately identify and segment different anatomical structures or lesions. Forward propagation: computing low-level visual features Intermediate structural features High-level semantic features The predicted intermediate structural features are obtained. Based on the predicted intermediate structural features, the initial prediction error is calculated. Based on the initial prediction error, task modulation is performed to correct the initial prediction error and dynamically allocate learnable weight parameters to adapt to the different needs of segmentation and classification tasks, and finally output the task results. Calculate the loss:
[0040] in, For the total loss function, For mission losses, To predict the consistency loss, the consistency between the predicted intermediate structural features and the intermediate structural features is constrained. The weighting coefficients for predicting consistency loss are used to balance the contributions of task loss and prediction consistency loss. Backpropagation: Optimizing the parameters of the neurally inspired visual perception encoder Med-VPE based on gradient descent; Training termination conditions are: verification on the validation set, the total loss converges and no longer decreases for N consecutive iterations, the maximum number of training rounds is reached, or the prediction error converges; Output encoder model; The expression for predicting the consistency loss is:
[0041] Mission loss Different loss functions are designed based on the different task types, including segmentation tasks and classification tasks: segmentation tasks use a combination of Dice Loss and Binary Cross-Entropy Loss (BCE), while classification tasks use Focal Loss.
[0042] This application also provides an embodiment of a predictive coding-based medical image visual perception encoder, used to implement the predictive coding-based medical image visual perception coding method described in the above embodiment. It includes a biomimetic low-level receptive field coding module, a multi-scale structure integration coding module, and a high-level semantic feature coding module connected in sequence, as well as a predictive coding and error calculation module connected to both the high-level semantic feature coding module and the multi-scale structure integration coding module. It also includes a task modulation and feature adaptation module connected to the predictive coding and error calculation module and an external task input terminal, respectively. The biomimetic low-level receptive field encoding module is used to perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features. A multi-scale structural integration coding module is used to perform multi-scale structural integration coding on the low-level visual features to obtain mid-level structural features. The high-level semantic feature encoding module is used to encode the intermediate structural features into high-level semantic features to obtain high-level semantic features. The prediction encoding and error calculation module is used to predict and encode the intermediate structural features based on the high-level semantic features and calculate the prediction error to obtain the initial prediction error. The task modulation and feature adaptation module is used to generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
[0043] Optionally, it also includes an encoder training module, which is connected to the biomimetic low-level receptive field encoding module, the multi-scale structure integration encoding module, the high-level semantic feature encoding module, the predictive encoding and error calculation module, and the task modulation and feature adaptation module; the encoder training module is used to train the neural-inspired visual perception encoder Med-VPE.
[0044] For ease of understanding, this application provides more specific embodiments: Example: Application of the method of this application in MRI brain tumor segmentation In one specific embodiment, the predictive coding-based medical image visual perception coding method described in this application is applied to the MRI brain tumor segmentation task, and the specific process is as follows: First, acquire brain magnetic resonance imaging (MRI) data, including at least one of T1-weighted, T2-weighted, or FLAIR sequences, with an input image size of 512×512 pixels.
[0045] Step 1: Input the MRI image into the biomimetic low-level receptive field coding module, and extract low-level visual features through learnable Gabor-type convolutional kernels to respond to changes in brain tissue boundaries, gray and white matter differences, and texture changes in tumor areas; Step 2: Input the low-level visual features into the multi-scale structure integration coding module, and use 3×3, 5×5 and 7×7 convolution kernels to extract and fuse multi-scale features, thereby capturing the local details, tumor boundaries and overall structural information of brain tumors; Step 3: Input the intermediate structural features into the high-level semantic feature encoding module. By introducing an attention mechanism based on prior anatomical structure, model the spatial distribution relationship of brain tissue and extract global semantic features of brain tumors and surrounding tissues. The a priori anatomical structures mentioned include the left-right symmetry of the brain, the compression relationship between the tumor and normal brain tissue, and the spatial topological constraints of different tissues. Step 4: The prediction network predicts intermediate structural features based on high-level semantic features, and calculates the difference between the prediction result and the actual intermediate structural features to obtain the prediction error; the prediction error is used to highlight the structural differences between brain tumor regions and normal brain tissue. Step 5: Based on the segmentation task type, generate modulation parameters through a task modulation network to scale and shift the prediction error, thereby enhancing the response of the tumor region and suppressing background noise, and obtaining the final visual perception coding result. Step 6: Input the modulated encoding result into the segmentation head and output the brain tumor segmentation result.
[0046] During the training phase, a brain tumor MRI dataset with pixel-level annotations was used for supervised training. The loss function adopted for the segmentation task was a weighted combination of Dice Loss and binary cross-entropy loss to improve the accuracy of segmentation boundaries and the consistency of the overall region.
[0047] Compared to traditional convolutional neural networks or Transformer methods, this embodiment, through a prediction error-driven mechanism, can better highlight the differences between brain tumor regions and normal brain tissue, maintaining high segmentation accuracy and stability even under conditions such as blurred tumor boundaries and small sample training. In the example experiment, the Dice coefficient of this method in the brain tumor segmentation task is improved by approximately 4.2% compared to the baseline model. Here, Dice Loss=1. Dice coefficient.
[0048] The Dice coefficient is a similarity metric specifically used for segmentation tasks, measuring the degree of overlap between the "predicted mask" and the "ground truth mask." It is commonly used in medical segmentation, small object segmentation, and scenarios with extreme imbalance between positive and negative samples. The Dice coefficient is calculated as follows:
[0049] In core scenarios such as tumor radiotherapy planning, medical imaging (CT / MRI / PET) segmentation, and tumor target delineation, the Dice coefficient is widely used to quantify the overlap between the tumor / organ at risk (OAR) segmentation region predicted by AI models and the clinical gold standard (hand-annotated by experts). Multiple authoritative PubMed publications and industry guidelines list it as a core evaluation indicator. However, clinical evaluation does not rely solely on the Dice coefficient; it typically combines it with Hausdorff distance (HD95, measuring boundary error) and sensitivity / specificity (a measure of the risk of missed / misdiagnosis, comprehensively validating the clinical applicability of tumor segmentation).
[0050] Dice: Dice similarity coefficient, with a value range of [0,1]. The closer to 1, the more consistent the segmentation result is with the ground truth annotation. 0 represents no overlap, and 1 represents complete overlap. |A|B|: Total number of intersection pixels, i.e., the number of pixels in the overlapping part between the tumor segmentation region predicted by the model (A) and the clinically labeled region (B), reflecting the common coverage area of the two. |A|: Total number of pixels in the model-predicted region, i.e., the sum of all pixels in the tumor / organ region segmented by AI. |B|: Total number of pixels in the ground truth labeled region, i.e., the sum of all pixels in the tumor / organ region manually labeled by experts (clinical gold standard). 2×|A|B|: Doubles the weight of the overlapping part. The core is to emphasize the importance of the "common coverage area" and avoid the underestimation of the overlap due to differences in the volume of a single region (such as prediction / labeling). |A|+|B|: The sum of the total number of pixels in the two regions, used as the normalization denominator to eliminate the influence of differences in the volume of different images / lesions and ensure that the score range is stable in [0,1].
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and not to limit them. Although this application has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of this application. Any modifications or equivalent substitutions that do not depart from the spirit and scope of this application should be covered within the protection scope of the claims of this application.
Claims
1. A method of perceptual coding of medical images based on predictive coding, characterized in that, include: Step 1: Perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features; Step 2: Perform multi-scale structural integration encoding on the low-level visual features to obtain mid-level structural features; Step 3: Encode the intermediate structural features into high-level semantic features to obtain high-level semantic features; Step 4: Based on the high-level semantic features, predict and encode the intermediate-level structural features and calculate the prediction error to obtain the initial prediction error; Step 5: Generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
2. The method of claim 1, wherein the method is a perceptual coding method for medical images based on predictive coding. Step 1 includes: The input medical image is extracted by a learnable Gabor type convolution kernel to output a low-level visual feature, which is represented as ; H, W, respectively represent the height, width of the input medical image and the number of feature channels of the low-level visual feature; the low-level visual feature can respond to the tissue boundary, texture change and lesion area in the medical image; The learnable Gabor-type convolutional kernel is constructed based on a Gabor filter, the expression of which is: wherein, is a Gabor filter, and is a spatial coordinate, is a Gaussian envelope standard deviation, controlling the receptive field size; is a directional angle, controlling the filter directional selectivity; is a wavelength, controlling the frequency selectivity; and is a rotated spatial coordinate.
3. The method of claim 1, wherein the method is a perceptual coding method for medical images based on predictive coding. Step 2 includes: A multi-scale convolutional structure is used to convolve low-level visual features to obtain mid-level visual features. The multi-scale convolutional structure uses multiple convolutional kernels with scales of 3, 5, and 7. The convolutional results of different scale kernels are fused through learnable weight parameters to achieve the integration of multi-scale features. Multiple convolutional kernels are used to simulate human V2 / V4 multi-scale integration. The 3×3 convolutional kernel is used to capture local edges and fine-grained textures, the 5×5 convolutional kernel is used to capture medium-scale structural units, and the 7×7 convolutional kernel is used to capture organ-level or mass contours. Medium-scale structural units are anatomical structural units with granularity between local details and organ-level contours.
4. The method of claim 3, wherein the method is a perceptual coding method for medical images based on predictive coding. The expression for intermediate structural features is: wherein, is a mid-level structure feature, is a number of feature channels of the mid-level structure, represents the i-th scale convolution kernel; is a learnable weight parameter, is a low-level visual feature.
5. The medical image visual perception coding method based on predictive coding according to claim 1, characterized in that, Step 3 includes: An attention mechanism is used to globally integrate intermediate structural features and extract high-level semantic features at the organ or object level. Its expression is as follows: SemanticTransformer is an attention mechanism. It is a mid-level structural feature. For high-level semantic features, The number of channels for high-level structural features is used, and high-level semantic encoding is globally integrated through an attention mechanism. The calculation process of the attention mechanism includes the generation of the query vector Q, key vector K, and value vector V, whose expressions are as follows: in, , , All are learnable weight matrices based on the attention mechanism, and a prior bias term B for medical anatomical structure is introduced during the attention calculation process. The prior bias term B for medical anatomical structure integrates organ spatial topological relationships, anatomical symmetry, and fixed tissue arrangement to achieve the fusion of prior information on anatomical structure. Its calculation formula is as follows: in, This is the self-attention output matrix, used to fuse sequence representations of global dependencies; Softmax activation function is used to normalize the attention score into a probability distribution; The vector dimension of the query / key is used to scale the dot product and stabilize the training gradient.
6. The medical image visual perception coding method based on predictive coding according to claim 1, characterized in that, Step 4 includes: The predictor network predicts intermediate structural features based on high-level semantic features, thus obtaining the predicted intermediate structural features. , For the predicted intermediate structural features, The high-level semantic features are used for prediction; the predictor network is based on these high-level semantic features. Generate predicted intermediate structural features Predictive mapping network; The difference between the intermediate structural features and the predicted intermediate structural features is calculated to obtain the initial prediction error, i.e. The initial prediction error is used to characterize lesions and abnormal areas in medical images that deviate from the characteristics of normal tissue.
7. The medical image visual perception coding method based on predictive coding according to claim 1, characterized in that, Step 5 includes: The TaskModulator network generates modulation parameters based on the medical image analysis task type, and its expression is as follows: ,in, For scaling parameters, For offset parameters, The TaskModulator is a conditional network that generates modulation parameters based on the task type. Its function is to adapt the same encoder to segmentation, classification, and detection tasks, thereby improving multi-task generalization ability and reducing the need for repeated training of multiple models. Multiple models refer to encoder models trained separately for different medical image analysis tasks. These multiple models include segmentation task models specifically for medical image segmentation, classification task models specifically for disease classification, and detection task models specifically for object detection. The initial prediction error is linearly modulated using scaling and offset parameters to obtain the modulated prediction error. This enables the encoder to adapt to different medical image analysis tasks.
8. The medical image visual perception coding method based on predictive coding according to claim 7, characterized in that, The training process of the encoder is as follows: Med, a neural-inspired visual perception encoder VPE input medical image sample X i The segmentation task uses pixel-level annotation labels, while the classification task uses category labels. The pixel-level annotation labels are finely labeled images that assign category numbers to each pixel in the medical image. They serve as the supervision basis for training the segmentation task and are used to train the model to accurately identify and segment different anatomical structures or lesions. Forward propagation: computing low-level visual features Intermediate structural features High-level semantic features The predicted intermediate structural features were obtained. Based on the predicted intermediate structural features, the initial prediction error is calculated. Based on the initial prediction error, task modulation is performed to correct the initial prediction error and dynamically allocate learnable weight parameters to adapt to the different needs of segmentation and classification tasks, and finally output the task results. Calculate the loss: in, For the total loss function, For mission losses, To predict the consistency loss, the consistency between the predicted intermediate structural features and the intermediate structural features is constrained. The weighting coefficients for predicting consistency loss are used to balance the contributions of task loss and prediction consistency loss. Backpropagation: Optimizing the parameters of the neurally inspired visual perception encoder Med-VPE based on gradient descent; Training termination conditions are: verification on the validation set, the total loss converges and no longer decreases for N consecutive iterations, the maximum number of training rounds is reached, or the prediction error converges; Output encoder model; The expression for predicting the consistency loss is: Mission loss Different loss functions are designed based on the different task types, including segmentation tasks and classification tasks: segmentation tasks use a combination of Dice Loss and Binary Cross-Entropy Loss (BCE), while classification tasks use Focal Loss.
9. A predictive coding-based medical image visual perception encoder, used to implement the predictive coding-based medical image visual perception encoding method according to any one of claims 1-8, characterized in that, It includes a biomimetic low-level receptive field coding module, a multi-scale structure integration coding module, and a high-level semantic feature coding module connected in sequence, as well as a prediction coding and error calculation module connected to both the high-level semantic feature coding module and the multi-scale structure integration coding module. It also includes a task modulation and feature adaptation module connected to the prediction coding and error calculation module and the external task input terminal, respectively. The biomimetic low-level receptive field encoding module is used to perform biomimetic low-level receptive field encoding on the input medical image to obtain low-level visual features. A multi-scale structural integration coding module is used to perform multi-scale structural integration coding on the low-level visual features to obtain mid-level structural features. The high-level semantic feature encoding module is used to encode the intermediate structural features into high-level semantic features to obtain high-level semantic features. The prediction encoding and error calculation module is used to predict and encode the intermediate structural features based on the high-level semantic features and calculate the prediction error to obtain the initial prediction error. The task modulation and feature adaptation module is used to generate modulation parameters according to the medical image analysis task type, and use the modulation parameters to modulate the initial prediction error to obtain the modulated prediction error, which is used as the final visual perception coding result.
10. The medical image visual perception encoder based on predictive coding according to claim 9, characterized in that, It also includes an encoder training module, which is connected to the biomimetic low-level receptive field encoding module, the multi-scale structure integration encoding module, the high-level semantic feature encoding module, the predictive encoding and error calculation module, and the task modulation and feature adaptation module; the encoder training module is used to train the neural-inspired visual perception encoder Med-VPE.