A method, apparatus, device, and medium for classifying medical radiographic images

CN122574535APending Publication Date: 2026-08-14HANGZHOU VOCATIONAL & TECHN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]然而,现有的跨域小样本方法在应对医学放射图像时仍面临挑战,其核心在于未能有效解决自然图像与医学放射图像之间的深层域偏移问题

Benefits of technology

本发明通过跨域协同训练+特征对齐训练解决深层域偏移导致的特征空间不匹配问题,具体而言:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122574535A_ABST
    Figure CN122574535A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for classifying medical radiological images. It relates to the field of image processing technology and addresses the problem of weak generalization ability in medical radiological image classification models due to domain offset. The method includes: obtaining source domain classification loss and augmentation classification loss corresponding to a source domain natural image dataset and an augmented image dataset; training a classification model to learn domain-invariant features between the source and target domains; constructing a support set and a query set based on the augmented image dataset; obtaining the similarity of features in the support set and query set at each scale level; training the classification model with the training objective of maximizing the similarity of samples of the same class and minimizing the similarity of samples of different classes, thereby constraining the classification model to achieve feature alignment at each scale level; and classifying the medical radiological image to be classified based on the trained classification model. This improves the generalization ability of the classification model without relying on the annotation of real medical images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and medium for classifying medical radiographic images. Background Technology

[0002] In recent years, deep learning has been widely used in disease recognition of medical radiographic images such as chest X-rays. However, due to the high dependence and cost of professional annotation of medical images on physician experience, the target domain typically only has a very small number of labeled samples. To overcome this data bottleneck, cross-domain few-shot learning has been introduced into this field. This involves pre-training a model using a massive amount of labeled natural images from the source domain, and then adapting it using a small number of samples from the target domain, thereby achieving accurate classification of medical radiographic images.

[0003] However, existing cross-domain few-sample methods still face challenges when dealing with medical radiographic images, primarily because they fail to effectively address the deep domain shift between natural images and medical radiographic images. Natural images and radiographic images such as chest X-rays differ significantly in texture features, grayscale distribution, and anatomical structures. Direct cross-domain transfer leads to feature space mismatch, resulting in a need to improve the classification accuracy of classification models in the target domain of medical radiographic images. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, device, and medium for classifying medical radiographic images to address the aforementioned technical problems.

[0005] The following technical solution is adopted in this specification: This specification provides a method for classifying medical radiographic images, including: Obtain the trained classification model; the training of the classification model includes: Cross-domain collaborative training phase: Obtain source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and the enhancement classification loss corresponding to the source domain natural image dataset and the enhancement image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement classification loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple class-labeled sample images obtained from the enhanced image dataset, a support set and a query set are constructed. The classification model extracts features of the sample images in the support set and the query set at multiple scale levels, and obtains the similarity between the features of the samples in the support set and the query set at each scale level. The network parameters of the classification model are trained with the training objective of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level. The trained classification model is used to classify the medical radiographic images to be classified, and the classification results are obtained.

[0006] Furthermore, before classifying the medical radiographic images to be classified based on the trained classification model, the method further includes: An initial support set is constructed based on a predetermined number of category-annotated medical radiology images from the target domain. Based on the category labels of each sample in the initial support set, text prompts are constructed, and a pre-trained text-to-image generation model is used to generate synthetic medical radiological images based on the text prompts. The synthetic medical radiographic images are fused with the initial support set to construct an inference-enhanced support set. The trained classification model is used to extract features of each category of samples in the inference enhancement support set at multiple scale levels; For samples of the same category, the features at each scale level are averaged to obtain the prototype feature vectors of each category at each scale level. The classification of the medical radiographic images to be classified based on the trained classification model to obtain the classification result specifically includes: Based on the similarity between the prototype feature vectors at each scale level and the features of the medical radiology image to be classified at each scale level, the classification result of the medical radiology image to be classified is obtained.

[0007] Furthermore, the classification result of the medical radiology image to be classified, obtained based on the similarity between the prototype feature vectors at each scale level and the features at each scale level, specifically includes: The trained classification model extracts features of the medical radiological images to be classified at multiple scale levels. The similarity between the features of the medical radiographic image to be classified at each scale level and the prototype feature vectors of each category at each scale level is calculated and used as the alignment score for each level. The alignment scores of each level are weighted and summed according to preset weights to obtain the total alignment score. The medical radiographic image to be classified is then classified into the category with the highest total alignment score.

[0008] Furthermore, the classification model uses ResNet10 as the feature encoder; the ResNet10 includes four sequentially connected encoding layers, namely the first encoding layer, the second encoding layer, the third encoding layer, and the fourth encoding layer; the multiple scale levels include the first scale level, the second scale level, the third scale level, and the fourth scale level with sequentially decreasing spatial resolution; The four coding layers correspond one-to-one with the multiple scale levels, wherein: The first coding layer outputs features at the first scale level, which has the highest spatial resolution and is used to extract image edge texture features. The second coding layer outputs features at the second scale level, where the spatial resolution is lower than that of the first scale level, and is used to extract local structural features of the image. The third coding layer outputs the features of the third scale level, the spatial resolution of which is lower than that of the second scale level, and is used to extract semantic features of image regions. The fourth coding layer outputs the features of the fourth scale level, which has the lowest spatial resolution and is used to extract global category features of the image.

[0009] Furthermore, obtaining the similarity between features of the support set and the query set at each scale level specifically includes: For each scale level, the Euclidean distance between the features of the query set samples and the features of the support set samples is obtained, and the Euclidean distance is transformed into a similarity probability distribution through the Softmax function; Based on the similarity probability distribution and the true category labels of the query set samples, a cross-entropy loss is constructed as the alignment loss in the feature alignment training stage; The network parameters of the classification model are optimized with the goal of minimizing the alignment loss, so as to maximize the similarity probability value of samples of the same class and minimize the similarity probability value of samples of different classes.

[0010] Furthermore, the step of performing style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the style of the target domain in medical radiology images specifically includes: The grayscale conversion, contrast enhancement, and Gaussian blur transformation are applied sequentially to each sample in the source domain natural image dataset to generate an enhanced image dataset. Among them, grayscale conversion is used to convert the multi-channel color information of natural images into single-channel grayscale information to simulate the single-channel characteristics of medical radiographic images; Contrast enhancement is used to enhance the grayscale contrast of an image to simulate the high-contrast style of medical radiographic images; Gaussian blur transformation is used to reduce the sharpness of an image to simulate the low-resolution characteristics of medical radiographic images.

[0011] Furthermore, in the cross-domain collaborative training phase, the classification model is trained using an alternating batch training method, specifically including: In each training batch, the source domain natural image dataset and the augmented image dataset are alternately input into the classification model to obtain the corresponding source domain classification loss and augmented classification loss respectively; The sum of the source domain classification loss and the augmentation classification loss is used as the total cross-domain collaborative training loss, and the network parameters of the classification model are optimized with the goal of minimizing the total cross-domain collaborative training loss.

[0012] This specification provides a medical radiographic image classification device, comprising: A classification model acquisition module is used to acquire a trained classification model; the training of the classification model includes: Cross-domain collaborative training phase: Obtain source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and the enhancement classification loss corresponding to the source domain natural image dataset and the enhancement image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement classification loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple class-labeled sample images obtained from the enhanced image dataset, a support set and a query set are constructed. The classification model extracts features of the sample images in the support set and the query set at multiple scale levels, and obtains the similarity between the features of the samples in the support set and the query set at each scale level. The network parameters of the classification model are trained with the training objective of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level. The classification module is used to classify the medical radiographic images to be classified based on the trained classification model and obtain the classification results.

[0013] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described medical radiographic image classification method.

[0014] This specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described medical radiographic image classification method.

[0015] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects: This invention addresses the feature space mismatch problem caused by deep domain offset through cross-domain collaborative training and feature alignment training. Specifically: In the cross-domain collaborative training phase, the source domain classification loss is used to constrain the classification model to learn the general category features of the source domain data, ensuring that the model has basic classification capabilities. The augmentation classification loss, on the other hand, applies constraints to the style-transformed augmentation dataset (the data ontology is still natural images, only simulating the style of medical radiographic images in the target domain), guiding the model to focus on core features that are strongly correlated with category attributes and are not affected by style differences, and filtering out domain-specific noise in terms of texture, grayscale, and structure between natural images and medical radiographic images (such as color texture in natural images and differences in grayscale distribution in medical images). This dual-loss collaborative optimization mechanism allows the classification model to achieve a balance between learning general features of the source domain and adapting to the style of the target domain, eliminating inter-domain interference features, strengthening cross-domain shared semantic features, and providing a robust feature foundation for the subsequent feature alignment training phase. The feature alignment training phase does not directly introduce real medical samples. Instead, it relies on generated pseudo-medical style images to construct support sets and query sets. Multi-scale feature alignment is performed in a feature space that is robust to style changes. In the process of multi-scale feature alignment, the optimization objective is to maximize the similarity of the same category and minimize the similarity of different categories. Through contrastive learning, the classification model is forced to learn to use multi-level features to accurately distinguish features of different categories. This multi-scale alignment method improves the model's ability to capture differential features and avoids the feature omission or misjudgment problems caused by single-scale feature alignment. This allows the classification model to better generalize after training to adapt to the classification task of real medical radiological images. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating a medical radiographic image classification method provided in this specification. Figure 2 This is a schematic diagram illustrating the training process of a classification model provided in this specification. Figure 3 This is a comparative diagram of a base class training strategy provided in this specification. Figure 3 (a) in the diagram is a schematic of the general base class training strategy. Figure 3 (b) in the diagram is a schematic diagram of the base class cross-domain collaborative training strategy; Figure 4This is a schematic diagram illustrating the alignment and comparison of meta-trained features provided in this specification. Figure 4 (a) in the diagram is a schematic diagram of the meta-training method for single-level feature extraction. Figure 4 (b) in the diagram is a schematic diagram of the meta-training method for multi-level feature extraction; Figure 5 A schematic diagram of multi-level feature alignment in a classification stage provided in this specification; Figure 6 This is a schematic diagram illustrating a domain-specific transformation effect provided in this specification. Figure 6 (a) in the image is the original image. Figure 6 (b) in the image is a grayscale converted image. Figure 6 (c) in the image is the contrast-enhanced image. Figure 6 (d) in the image is the Gaussian filtered image; Figure 7 This is a schematic diagram of a chest X-ray image for a disease, as provided in this instruction manual. Figure 7 (a) in the diagram is a schematic of atelectasis. Figure 7 (b) in the diagram is a schematic of cardiac hypertrophy. Figure 7 (c) in the diagram is a schematic of the fluid accumulation. Figure 7 (d) in the diagram is a schematic of the wetting process. Figure 7 (e) in the diagram is a schematic of the mass. Figure 7 (f) in the diagram is a schematic of a nodule. Figure 7 (g) in the diagram is a pneumothorax diagram; Figure 8 This is a comparative illustration of chest X-ray image generation effects provided in this specification. Figure 8 (a) in the image is a chest X-ray image generated by the FLUX.1 model. Figure 8 (b) in the image is a chest X-ray image generated by the SDXL model; Figure 9 This is a schematic diagram of a heatmap for identifying diseases via chest X-ray, provided in this specification. Figure 9 (a) in the image is the original image. Figure 9 (b) in the diagram is a heat map. Figure 9 (c) in the image is an overlay of the heatmap and the original image; Figure 10 This is a schematic diagram of the structure of a medical radiographic image classification device provided in this specification; Figure 11 This is a schematic diagram of a computer device provided for this specification. Detailed Implementation

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

[0018] The technical solution provided by this invention can be applied to medical image classification scenarios. Existing methods employ a traditional cross-domain few-shot learning paradigm. In this method, the feature encoder is trained on a base class with a limited support set, and the model learns to generalize across different categories. However, when this method is applied to medical images, especially chest X-rays, it is highly susceptible to domain shift. The feature representations learned from the base domain may not be adequately aligned with the target domain, resulting in poor performance when identifying diseases in the target domain. To address this limitation, a more advanced method is proposed: directly using the target domain's support set along with the base class data during meta-training. This method aims to reduce the domain gap by combining the target domain's support image with the base class data, enabling the model to leverage data from both domains to adjust its features. By incorporating the target domain's support set, the model learns to adapt to the medical domain while preserving base class knowledge. However, although this method improves feature alignment between the base and target domains, it still struggles to achieve optimal performance, especially when the available labeled data for the target domain is limited. This method may also fail to fully capture the underlying structure of the target data during testing, leading to unsatisfactory disease identification accuracy. To address the challenges of large domain differences and scarce target domain annotations in chest X-ray disease recognition under cross-domain, small-sample scenarios, this application proposes a Domain-Specific Generative Augmentation (DSGA) framework. This framework employs different augmentation strategies in the meta-training and meta-testing phases to progressively improve the model's cross-domain adaptability and generalization performance. Specifically: During the meta-training phase, DSGA introduces two key mechanisms. The first is transformation-based data augmentation, specifically including domain-specific operations such as grayscale conversion, contrast enhancement, and Gaussian blurring. These transformations can simulate common differences between the source and target domains, guiding the model to learn more robust cross-domain feature representations. The second is a multi-branch feature alignment mechanism, which utilizes multiple branches to extract features at different levels of abstraction and enhances the consistency of feature representations between the source and target domains by aligning these features. This mechanism helps the model capture both fine-grained and global features simultaneously, thereby improving performance on chest X-ray tasks with scarce annotations.

[0019] During the meta-testing phase, to address the issue of extremely limited support set samples in the target domain, DSGA employed a model-based generative augmentation strategy. This strategy synthesizes chest X-ray-like feature representations similar to the target category based on textual prompts, effectively expanding the limited target domain support set. The introduction of generated samples not only enriched the diversity of the support set but also significantly enhanced the model's ability to identify and generalize to unseen diseases.

[0020] In addition, DSGA has designed a cross-domain collaborative training strategy to further align the feature distributions of the base domain (source domain) and the target domain, thereby providing a stable training foundation for the above-mentioned enhancement mechanisms.

[0021] The medical radiographic image classification method of the present invention will now be described in detail with reference to the accompanying drawings.

[0022] Figure 1 This document provides a flowchart illustrating a cross-domain small-sample medical radiographic image classification method. Figure 1 As shown, the method includes: S101. Obtain the trained classification model; training the classification model includes: Cross-domain collaborative training phase: Obtain the source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset to simulate the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and enhancement classification loss corresponding to the source domain natural image dataset and the enhanced image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple labeled sample images obtained from the augmented image dataset, a support set and a query set are constructed. The features of the sample images in the support set and the query set at multiple scale levels are extracted by the classification model, and the similarity between the features of the samples in the support set and the query set at each scale level is obtained. The network parameters of the classification model are trained with the goal of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level.

[0023] For example, in the cross-domain collaborative training phase, the source domain classification loss constrains the classification model to learn the general category features of the source domain data, ensuring the model possesses basic classification capabilities. The augmentation classification loss, on the other hand, imposes constraints on the style-transformed augmented dataset, guiding the model to focus on core features strongly correlated with category attributes and unaffected by style differences, filtering out domain-specific noise in texture, grayscale, and structure between natural images and medical radiographic images. This dual-loss collaborative optimization mechanism achieves a balance between learning general features from the source domain and adapting to the target domain style, eliminating inter-domain interference features and strengthening cross-domain shared semantic features, providing a robust feature foundation for the subsequent feature alignment training phase. The feature alignment training phase does not directly introduce real medical samples; instead, it constructs support and query sets based on generated pseudo-medical style images, performing multi-scale feature alignment in a feature space robust to style changes. During multi-scale feature alignment, the optimization objective is to maximize similarity among similar categories and minimize similarity among dissimilar categories. Through contrastive learning, the classification model is forced to learn to utilize multi-level features to accurately distinguish features of different categories. This multi-scale alignment method improves the model's ability to capture differential features, avoids feature omissions or misjudgments caused by single-scale feature alignment, and enables the classification model to better generalize after training to adapt to the classification task of real medical radiological images.

[0024] S102. Based on the trained classification model, classify the medical radiographic images to be classified and obtain the classification results.

[0025] Based on the above embodiments, in S101 above, during classification model training, this application embodiment provides an implementation method for training a classification model: S201. Construct a Domain-Specific Generative Augmentation (DSGA) framework.

[0026] Figure 2 This is a flowchart illustrating the training process of a classification model provided in this specification, such as... Figure 2As shown, the DSGA framework comprises three key components: (a) Cross-domain collaborative training—employing transformation-based generative augmentation to generate chest X-ray-like images from natural images, and designing a shared feature encoder for joint training between the two domains. The parameters of the natural image encoding portion are frozen to preserve general semantic knowledge, while the parameters of the chest X-ray domain-oriented feature encoding layer are set to be learnable, thereby promoting feature alignment through weight sharing and selective fine-tuning; (b) Multi-branch meta-training feature alignment—applying multiple domain alignment losses at different feature levels of the shared encoder, comparing the intermediate representations of the frozen branch and the learnable branch respectively, ensuring comprehensive domain adaptation from low-level texture to high-level semantics; (c) Multi-branch meta-testing feature alignment—in the testing phase, dynamically synthesizing chest X-ray-like features using the learned representations, further releasing the adaptability of the learnable parameters, and enhancing few-sample classification performance through feature recalibration during meta-testing. The entire DSGA framework, through a collaborative mechanism of freezing general knowledge and fine-tuning domain-specific parameters, achieves efficient domain transfer from natural images to medical images, significantly improving recognition robustness under few-sample conditions.

[0027] S202, Problem Definition.

[0028] In cross-domain small-sample chest X-ray disease identification, the goal is to classify diseases in chest X-ray images using a limited number of labeled samples in the target domain. Let the source domain be represented as... The target domain is represented as ,in and Image sets representing the source and target domains, respectively. and This represents the corresponding disease label. The challenge lies in how to utilize the source domain data. Generalize to the target domain with only a small number of labeled samples. Given a small support set. ,in It is the number of labeled samples, and the goal is to predict unseen query images. ∈ Disease labels The model uses a shared feature encoder. The loss function for domain adaptation is: Align features from two domains during training. ; in and These are the losses from the source domain and the target domain, respectively. It is a balance factor. Source domain loss. Defined as: ; For the target domain, the goal is to minimize the support set. and query set Alignment error between them. Alignment loss. for: ; in Let represent the squared Euclidean distance between feature vectors. Therefore, the global optimization combines domain adaptation loss and alignment loss: ; This formula ensures that the model can adapt to the target domain while minimizing classification error using limited labeled data.

[0029] S203, Cross-domain Collaborative Training.

[0030] In cross-domain, small-sample chest X-ray disease identification, a key challenge is bridging the domain gap between the source and target domains, especially when labeled data in the target domain is limited. To address this, Cross-Domain Collaborative Training (CDCT) is proposed. This method alternates between training on base class data and augmented base class data to enhance cross-domain generalization and minimize the domain gap. The motivation behind CDCT is to leverage both real and synthetic data to improve the model's ability to generalize to the target domain. Base Class It consists of labeled data from the source domain, while the enhanced base class This is achieved by applying transform-based enhancements to simulate chest X-ray style image generation. Transformations applied to the base class data include grayscale conversion, contrast enhancement, and blurring. These transformations help the model adapt to the image features of the target domain by mimicking the style of chest X-ray images. Specifically, the enhanced image... Generate using the following operations: ; in , and These represent the elements applied to the original image. The grayscale, contrast enhancement, and blur transformations are applied sequentially (stacked) to mimic the image style of a chest X-ray, improving the model's ability to generalize to the target domain.

[0031] Figure 3 This is a comparative diagram of a base class training strategy provided in this specification. Figure 3 (a) in the diagram is a schematic of the general base class training strategy. Figure 3 (b) in the diagram is a schematic of the base class cross-domain collaborative training strategy, as shown below. Figure 3 As shown in (a), Figure 3 As shown, in the general training method, the feature encoder Learning is done from available base class data. A feature encoder is trained on this data to capture generalizable features, but this approach does not explicitly address the domain gap between the source and target domains. The objective function for base class training is given by the cross-entropy loss: ; in It is the number of images in the base class dataset. and These represent the input image and its corresponding label, respectively. This general training method allows the model to learn useful features, but it does not explicitly address the domain shift between the source and target domains. Therefore, augmented data is used to align the style of the source domain images with the style of the target domain, reducing the domain gap and improving model performance. Feature encoder weight sharing between the two datasets ensures the consistency of feature representations. This helps the model align features between the two domains, bridging the domain gap. The objective function for the augmented data is also calculated using cross-entropy loss: ; in It increases the number of images in the base class dataset. and This represents the augmented image and its corresponding label. The total loss during the alternating training process is the sum of the cross-entropy losses from the base class and augmented base class data: ; in and These are the cross-entropy losses from the base class and augmented base class datasets, respectively. This alternating training approach ensures that the model learns from both real data and augmented data that simulates target domain image features, thus effectively improving performance even with very little labeled data in the target domain. By leveraging weight sharing between feature encoders and alternating between real and augmented datasets, CDCT significantly reduces domain disparity, improves chest X-ray disease identification in the target domain, and makes the model more robust to domain shifts.

[0032] S204, Branch element training feature alignment.

[0033] Cross-domain co-training leverages enhanced base class data to bridge domain gaps and enhance model generalization. Building upon this, multi-branch meta-training feature alignment further improves feature alignment by utilizing multiple feature extraction branches at different levels of abstraction. This extension allows the model to better capture multi-scale information, crucial for tasks such as chest X-ray disease recognition in cross-domain settings. Multi-branch meta-training feature alignment is a novel approach designed to improve cross-domain chest X-ray disease recognition, particularly when labeled data in the target domain is limited. This method extends the concept of feature alignment by using multiple branches during meta-learning to enhance feature extraction at various levels (low, medium, and high). The motivation behind this approach is to leverage enhanced base class data to model chest X-ray images, thereby improving the model's ability to generalize to the target domain. Figure 4 This is a schematic diagram illustrating the alignment and comparison of meta-trained features provided in this specification. Figure 4 (a) in the diagram is a schematic diagram of the meta-training method for single-level feature extraction. Figure 4 Figure (b) illustrates a meta-training method for multi-level feature extraction. This method utilizes multiple feature embeddings extracted from the support set, located at different levels (low, medium, and high). Each embedding is aligned within its respective level. Furthermore, chest X-ray style images are generated from the support set based on transformations, enhancing cross-domain feature alignment during meta-training and improving generalization ability.

[0034] Support set S={ The query set Q = { is composed of labeled data from the enhanced base class.} This includes query images that also originate from augmented data. At each level... The feature extractor extracts each image from the support set and query set. Generate feature embeddings The goal is to align embeddings from the support set and query set at each level to improve the classification task. Each embedding is aligned at each level. Alignment is performed using an alignment loss function, which ensures that the embeddings of the support set and the query set are similar in the feature space. The alignment loss for each level is defined as follows: ; in and These represent the number of supporting samples and the number of query samples, respectively. These are images from the support set and query set. The Softmax function calculates the similarity between feature vectors, and the alignment loss encourages consistency in the embeddings of the support set and query set at each abstraction level. The ultimate goal of the training process is to minimize the total loss, which includes the alignment loss for each level l: ; in , , and These represent low, medium, and high-level alignment losses, respectively. This loss encourages the model to align feature embeddings from the support and query sets across multiple levels of abstraction, thereby improving performance on cross-domain tasks. By leveraging a multi-branch feature extractor, this method enhances cross-domain generalization by aligning features across multiple levels of abstraction, thus reducing the domain gap between the source and target domains. This is crucial for effective chest X-ray disease identification, especially in few-shot learning settings.

[0035] Based on the above embodiments, in S102, when classifying the medical radiographic images to be classified based on the trained classification model, this application embodiment provides an implementation method for training the classification model: This method is based on a model obtained by feature alignment through multi-branch meta-training and extends it to the meta-testing stage of chest X-ray disease classification. Figure 5 This specification provides a schematic diagram of multi-level feature alignment in a classification stage, such as... Figure 5 As shown, multiple feature embeddings are extracted from the support set and query set using the trained classification model, with each feature extractor operating at a different abstraction level. Specifically, the first training phase (cross-domain collaborative training phase) trains the entire network (including the classification head), enabling the model to learn domain-invariant features between the source domain natural image and the target domain medical radiology image. The second training phase (feature alignment training phase) trains only the encoder (four encoding layers of ResNet10), freezes the classification head, and achieves multi-level feature alignment by comparing the similarity between features at each level between the support set and the query set, aiming to maximize the similarity of samples of the same class and minimize the similarity of samples of different classes. In the final inference classification phase, the classification head is no longer used; instead, only the trained encoder is used to extract multi-level prototype feature vectors of each category from the medical radiology image to be classified and the inference enhancement support set. By calculating the weighted sum of the alignment scores at each level, the image to be classified is assigned to the category with the highest total score, thus completing the meta-test stage classification of chest X-ray diseases (such as atelectasis). For the support set, the feature extractor generates embeddings at four levels: low, middle (two layers), and high; each level produces a corresponding alignment score. The similarity between feature vectors is measured and features are aligned during meta-testing to improve the recognition of chest X-ray images for diseases such as atelectasis. The query set is also processed by a feature extractor, whose embeddings are compared with the embeddings of the support set to enhance overall classification performance.

[0036] This process starts from the support set In the beginning, among them Represents a chest X-ray image. This refers to the corresponding label. In this method, chest X-ray images are generated using the text prompt "a chest X-ray of disease {category}" to enhance the support set, where "{category}" corresponds to the disease category label. These simulated real chest X-ray images generated by the FLUX.1 model are combined with the original support set to form a more comprehensive support set. For each support image... The feature extractor generates embeddings at four levels. The goal of the meta-testing process is to align these embeddings at each level and build prototypes for each category in the support set. These prototypes are constructed by averaging the embeddings of the support set (including the generated images) at each level, thereby creating a representative feature vector for each category.

[0037] At each level Calculate the alignment score between the support set prototype embedding and the query set feature embedding. For the query set... Query images Using the same feature extractor, embeddings are generated for each query image at each level. The alignment score for each level is derived by calculating the similarity between the feature embeddings of the support set and the query set. The alignment score for each level is given by the following formula: ; in and These represent the number of supporting samples and the number of query samples, respectively. and It supports both images and query images. The Softmax function calculates the similarity and alignment score between feature vectors. The similarity between the embeddings of the support set (including generated images) and the query set at each level of abstraction is measured. The total alignment score is calculated for each level. The sum of the alignment fractions is defined as: ; This overall score helps determine the category of the query set by comparing the embedding similarity across all levels. Finally, the query image... The classification is based on a calculated alignment score. The classification decision is made by selecting the category with the highest similarity score; the query image is classified as the category that is most aligned with the support set embedding at each level.

[0038] Furthermore, this application provides an experimental verification process and results for the above method.

[0039] S301, Experiment Setup.

[0040] The Mini-ImageNet dataset is a widely recognized benchmark in the field of few-shot learning. This dataset contains 100 categories, with 600 RGB images per category. The standard split includes 64 training classes, 16 validation classes, and 20 test classes. Cross-domain chest X-ray disease recognition utilizes the Mini-ImageNet dataset to learn and adapt to the chest X-ray domain. A series of image processing techniques, including grayscale conversion, contrast enhancement, and Gaussian blur, are applied to achieve style transfer from natural images to chest X-ray images. Figure 6 This is a schematic diagram illustrating a domain-specific transformation effect provided in this specification, wherein... Figure 6 (a) is the original image. Figure 6 (b) is the image after grayscale conversion. Figure 6 (c) is the image after contrast enhancement. Figure 6 (d) is the image after Gaussian filtering. For example... Figure 6 As shown, from left to right, the original image and the results after the three transformations described above are presented. These transformations are used to effectively bridge the domain gap between the source domain (natural image) and the target domain (chest X-ray) in the proposed DSGA method.

[0041] The ChestX dataset is a widely used benchmark in chest X-ray image analysis, containing 108,948 frontal chest X-rays from 32,717 unique patients, covering eight common chest diseases. This study focuses on seven severe diseases, including atelectasis, cardiomegaly, effusion, infiltration, mass, nodule, and pneumothorax. Figure 7 This is a schematic diagram of a chest X-ray image for a disease, as provided in this instruction manual. Figure 7 (a) in the diagram is a schematic of atelectasis. Figure 7 (b) in the diagram is a schematic of cardiac hypertrophy. Figure 7 (c) in the diagram is a schematic of the fluid accumulation. Figure 7 (d) in the diagram is a schematic of the wetting process. Figure 7 (e) in the diagram is a schematic of the mass. Figure 7 (f) in the diagram is a schematic of a nodule. Figure 7 (g) in the diagram is a pneumothorax illustration. Figure 7 Each column represents a different category of chest disease, including atelectasis, cardiomegaly, effusion, infiltration, mass, nodule, and pneumothorax.

[0042] To ensure fair comparison, ResNet10 was used as the encoder in the experiments. Input images from both the source and target domains were resized to 224×224 to match the network's requirements. All experiments were performed using the PyTorch library. During pre-training, the model was co-trained between the source and generator domains, starting from scratch with a batch size of 64 and a total of 400 epochs. To enhance generalization, data augmentation techniques such as random cropping, random flipping, and color jitter were applied. Optimization employed stochastic gradient descent with a learning rate of 10. -3 The momentum is 0.9, and the weight decay is 5 × 10. -4 During the meta-training phase, the hyperparameters are set to ( , , , =(0.1,0.3,0.3,0.7). SGD is still the optimizer, where this step first uses 10... -3 The learning rate was used for fine-tuning for 30 epochs, followed by a second fine-tuning step lasting 1200 episodes with a learning rate of 10. -2 Momentum is 0.9, weight decay is 10. -3 Each batch size was set to 4, containing 4 episodes. These settings were designed to ensure stable training and effective adaptation to the target domain. For each evaluation (i.e., meta-test), 5-way 1-shot, 5-shot, 20-shot, and 30-shot were selected to evaluate the model's performance. The generated chest X-ray images were generated by the FLUX.1 generator, containing eight images per disease category. A total of 600 few-shot tasks (episodes) were randomly sampled from the ChestX dataset, and the mean accuracy and 95% confidence intervals across all shot settings are reported. Figure 8 This is a comparative illustration of chest X-ray image generation effects provided in this specification. Figure 8 (a) in the image is a chest X-ray image generated by the FLUX.1 model. Figure 8 (b) in the image is a chest X-ray image generated by the SDXL model.

[0043] S302, Model Comparison.

[0044] The proposed Domain-Specific Generative Augmentation (DSGA) method was compared with the performance of several state-of-the-art methods on the ChestX dataset.

[0045] Table 1

[0046] Table 1 shows the performance comparison between the proposed DSGA method and previous methods on the ChestX dataset. As can be seen from Table 1, DSGA consistently outperforms existing methods in all shot settings. MatchingNet and its extended version MatchingNet+FWT exhibit relatively low performance, with accuracies of only 22.40±0.7 and 21.26±0.31, respectively, in the 5-way 5-shot task. Similarly, MAML (Model-Agnostic Meta-Learning) and ProtoNet (Prototypical Networks) show moderate improvements in accuracy, with ProtoNet+FWT achieving 23.77±0.42 and 26.87±0.43 in the 5-way 5-shot and 5-way 20-shot tasks, respectively. However, none of these methods achieve the accuracy level achieved by DSGA. The fine-tuning approach achieved better results, with Fine-tune achieving scores of 25.97±0.41, 31.32±0.45, and 35.49±0.45 in the 5-way 5-shot, 5-way 20-shot, and 5-way 30-shot tasks, respectively. Among these, Bidirectional Similarity Refinement (BSR) showed particularly significant results, especially in higher shot settings, achieving a performance of 35.63±0.54 in the 5-way 20-shot task and 40.18±0.56 in the 5-way 30-shot task. Furthermore, methods such as STARTUP (Structure-aware Task-adaptive Updating) and NSAE (Neural Similarity-Aware Encoder) further improve upon these results. NSAE achieves scores of 27.30±0.45, 35.70±0.47, and 38.52±0.71 in 5-way 5-shot, 5-way 20-shot, and 5-way 30-shot, respectively. Compared to these methods, DSGA achieves scores of 24.89±0.66 in 5-way 1-shot, 28.24±0.64 in 5-way 5-shot, 36.12±0.65 in 5-way 20-shot, and 38.85±0.68 in 5-way 30-shot. These results highlight the effectiveness of DSGA in enhancing feature adaptation and generalization in cross-domain few-shot learning contexts, outperforming established methods in the field such as MAML, ProtoNet, and NSAE.

[0047] S303, Ablation Analysis.

[0048] S3031, The impact of cross-domain collaborative training.

[0049] Cross-Domain Collaborative Training (CDCT) plays a crucial role in addressing the domain shift challenge between the source and target domains. By sharing feature encoders across domains, CDCT allows the model to learn shared representations that generalize across both domains. This helps bridge the gap between the natural image distribution of the source domain and the medical image distribution of the target domain, which is often a major obstacle in few-shot learning scenarios. Table 2 shows the performance results of different components on the CXR dataset. As shown in Table 2 (row 2), the model's generalization ability to the target domain is improved after introducing CDCT. Specifically, a consistent increase in accuracy is observed across all shot sizes. For example, the accuracy of 5-way 1-shot increases from 21.23% to 22.35%, and the accuracy of 5-way 5-shot increases from 23.93% to 24.02%. These improvements indicate that CDCT not only facilitates better domain adaptation but also enhances the model's ability to handle few-shot scenarios, i.e., when target domain data is limited. Furthermore, the performance gains obtained in settings with higher sample numbers (such as 5-way 20-shot and 5-way 50-shot) further demonstrate the effectiveness of CDCT in improving its ability to generalize to unseen data in the target domain.

[0050] Table 2

[0051] S3032, The impact of multi-branch feature alignment.

[0052] Multi-Branch Meta-Training (MBMTr) and Meta-Testing (MBMTe) strategies significantly improve the cross-domain adaptability of models by applying feature alignment loss at multiple levels. In MBMTr, alignment is applied during meta-training to ensure good alignment of feature representations between the source and target domains. Similarly, MBMTe applies alignment during meta-testing, further refining the model's feature alignment to enhance generalization ability. The third row of Table 2 demonstrates the effectiveness of MBMTr and MBMTe, showing significant performance improvements across all evaluation tasks. For example, 5-way 1-shot accuracy increased from 22.35% to 23.45%, and 5-way 5-shot accuracy improved from 24.02% to 25.72%. The main advantage of MBMTr and MBMTe is that the model can learn domain-independent features that are robust to variations between the source and target domains. The multi-branch approach ensures that features from different layers are aligned, further enhancing the model's ability to identify subtle patterns in few-shot tasks. This alignment mechanism is crucial for cross-domain few-shot learning, as a lack of labeled data in the target domain often leads to poor model performance.

[0053] S3033, the impact of generative enhancement.

[0054] Generative Augmentation (GA) is another key component of our framework, leveraging the FLUX.1 model to generate synthetic images that resemble the distribution of the target domain data. This approach helps alleviate the problem of limited labeled data by augmenting the support set of the target domain with additional, realistic examples. Images generated by the FLUX.1 model were chosen because their quality surpasses that of the SDXL (Stable Diffusion Extra Large) model. GA generates chest X-ray-like images based on features learned from the source domain, which not only aids in domain adaptation but also improves the model's performance on few-shot tasks. As shown in row 4 of Table 2, GA significantly improves the model's performance, especially in lower-shot settings. For example, the accuracy of 5-way 1-shot increases from 22.35% to 23.12%, and the accuracy of 5-way 5-shot increases from 24.02% to 26.14%. The synthetic images generated by GA effectively fill the gaps left by sparse target domain data, providing the model with additional training samples that have similar features to real target images. This enhancement helps the model learn more robust and discriminative features, improving not only its performance on few-shot tasks but also its ability to handle unseen diseases and scenarios in the target domain. Finally, when all components (CDCT, MBMTr, MBMTe, and GA) are integrated, as shown in the last row of Table 2, the model achieves state-of-the-art performance across all metrics, with a 5-way 50-shot accuracy of 38.85%. This demonstrates the synergistic effect of the proposed components in improving cross-domain feature adaptation and generalization for disease identification on few-shot chest X-rays.

[0055] S3034, The impact of weighting coefficients.

[0056] Table 3

[0057] Table 4

[0058] Table 5

[0059] Tables 3, 4, and 5 illustrate the impact of different weight coefficients on the model's performance on the ChestX dataset. Table 3 analyzes the weight coefficients on the ChestX dataset, showing the recognition performance results of different weight coefficient combinations in the 5-way 1-shot and 5-way 5-shot tasks. Table 4 analyzes the weight coefficients on the ChestX dataset, showing the results of different weight coefficient combinations in the classification tasks of 5-way 1-shot and 5-way 5-shot. Table 5 analyzes the classification results of different weight coefficient combinations in the 5-way 1-shot and 5-way 5-shot tasks. The weight coefficients in this invention framework are related to the multi-branch feature alignment mechanism, specifically the parameters λ1 to λ4, which control the contributions of various feature layers during model training and testing. As shown in Table 3, changing the weight coefficients λ4 and λ3, representing the high-level and mid-level feature layers respectively, significantly affects the model's accuracy. The model achieves optimal performance when the weights are set to (λ4*, λ3*) = (0.7, 0.3), as highlighted in Table 3, with a 5-way 1-shot accuracy of 23.91% and a 5-way 5-shot accuracy of 27.14%. These results demonstrate that the balance between high-level and mid-level features plays a crucial role in the model's ability to effectively generalize across different domains. Further analysis, as shown in Table 4, incorporates the influence of low-level features through λ2. Optimal performance was observed when λ2 was set to 0.3 while maintaining the optimal values ​​for λ3 and λ4. At this point, the 5-way 1-shot accuracy reached 24.53%, and the 5-way 5-shot accuracy improved to 27.75%. This indicates that incorporating low-level features helps to further improve recognition accuracy, especially in the 5-way 5-shot task. Finally, Table 5 explores the influence of λ1, representing the lowest-level features. The combination (λ4*, λ3*, λ2*, λ1*) yielded the best results, achieving 24.89% 5-way 1-shot accuracy and 28.24% 5-way 5-shot accuracy. This result demonstrates that careful tuning of feature weights, particularly for low-level features, leads to further improvements in both 1-shot and 5-shot tasks. Therefore, λ4, λ3, λ2, λ1 = (0.1, 0.3, 0.3, 0.7) was chosen for multi-branch feature alignment. The results in these tables highlight the importance of aligning features across different layers and the significance of fine-tuning the weight coefficients to achieve optimal performance.

[0060] S304, Visual Analysis.

[0061] Figure 9 This is a schematic diagram of a heatmap visualization for chest X-ray disease identification provided in this specification, wherein... Figure 9 (a) is the original image. Figure 9 (b) is the corresponding heat map. Figure 9(c) is an overlay of the heatmap and the original image. This figure illustrates the crucial role of heatmap overlay in understanding the model's decision-making process in the context of medical image analysis: the first row shows the original chest X-ray image, presenting different disease states in the dataset; the second row shows the generated heatmap, highlighting the regions the model considers most important for disease classification, helping to identify abnormal patterns or signs of specific diseases; the third row overlays the heatmap onto the original X-ray image, visually indicating the image regions the model focuses on when making predictions, thus providing interpretability for the model's decisions. This heatmap overlay method not only provides an intuitive understanding of the model's decision-making process but also enhances the transparency and interpretability of deep learning models used for medical image classification. The visualization of attention to disease-related regions supports the model's robustness, ensuring it makes informed decisions based on relevant image features, thereby improving its credibility in clinical applications. The combination of heatmaps and chest X-ray recognition models highlights the potential to combine interpretability with performance, making this approach highly valuable for diagnosing chest diseases with greater accuracy and understanding. The results demonstrate the effectiveness of our proposed model in identifying key features required for disease identification and show its applicability to healthcare professionals in automated diagnostic and clinical settings.

[0062] The medical radiographic image classification device provided by the present invention is described below. The medical radiographic image classification device described below can be referred to in correspondence with the medical radiographic image classification method described above.

[0063] Figure 10 For an example, please refer to the structural schematic diagram of a medical radiographic image classification device provided by the present invention. Figure 10 As shown, the medical radiographic image classification device may include: A classification model acquisition module is used to acquire a trained classification model; the training of the classification model includes: Cross-domain collaborative training phase: Obtain source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and the enhancement classification loss corresponding to the source domain natural image dataset and the enhancement image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement classification loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple class-labeled sample images obtained from the enhanced image dataset, a support set and a query set are constructed. The classification model extracts features of the sample images in the support set and the query set at multiple scale levels, and obtains the similarity between the features of the samples in the support set and the query set at each scale level. The network parameters of the classification model are trained with the training objective of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level. The classification module is used to classify the medical radiographic images to be classified based on the trained classification model and obtain the classification results.

[0064] Specific limitations regarding the medical radiographic image classification device can be found in the above-mentioned limitations on medical radiographic image classification, and will not be repeated here. Each module in the aforementioned medical radiographic image classification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware within or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the corresponding operations of each module.

[0065] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The provided method for classifying medical radiographic images.

[0066] This instruction manual also provides Figure 11 The schematic diagram of the computer device shown is as follows: Figure 11 At the hardware level, the computer device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The provided method for classifying medical radiographic images.

[0067] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0068] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for classifying medical radiographic images, characterized in that, include: Obtain the trained classification model; The training of the classification model includes: Cross-domain collaborative training phase: Obtain source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and the enhancement classification loss corresponding to the source domain natural image dataset and the enhancement image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement classification loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple class-labeled sample images obtained from the enhanced image dataset, a support set and a query set are constructed. The classification model extracts features of the sample images in the support set and the query set at multiple scale levels, and obtains the similarity between the features of the samples in the support set and the query set at each scale level. The network parameters of the classification model are trained with the training objective of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level. The trained classification model is used to classify the medical radiographic images to be classified, and the classification results are obtained.

2. The medical radiographic image classification method according to claim 1, characterized in that, Before classifying the medical radiographic images to be classified based on the trained classification model, the following steps are also included: An initial support set is constructed based on a predetermined number of category-annotated medical radiology images from the target domain. Based on the category labels of each sample in the initial support set, text prompts are constructed, and a pre-trained text-to-image generation model is used to generate synthetic medical radiological images based on the text prompts. The synthetic medical radiographic images are fused with the initial support set to construct an inference-enhanced support set. The trained classification model is used to extract features of each category of samples in the inference enhancement support set at multiple scale levels; For samples of the same category, the features at each scale level are averaged to obtain the prototype feature vectors of each category at each scale level. The classification of the medical radiographic images to be classified based on the trained classification model to obtain the classification result specifically includes: Based on the similarity between the prototype feature vectors at each scale level and the features of the medical radiology image to be classified at each scale level, the classification result of the medical radiology image to be classified is obtained.

3. The medical radiographic image classification method according to claim 2, characterized in that, The classification result of the medical radiology image to be classified is obtained by comparing the similarity between the prototype feature vectors at each scale level and the features at each scale level. Specifically, this includes: The trained classification model extracts features of the medical radiological images to be classified at multiple scale levels. The similarity between the features of the medical radiographic image to be classified at each scale level and the prototype feature vectors of each category at each scale level is calculated and used as the alignment score for each level. The alignment scores of each level are weighted and summed according to preset weights to obtain the total alignment score. The medical radiographic image to be classified is then classified into the category with the highest total alignment score.

4. The medical radiographic image classification method according to claim 1, characterized in that, The classification model uses ResNet10 as the feature encoder; The ResNet10 includes four coding layers connected in sequence: a first coding layer, a second coding layer, a third coding layer, and a fourth coding layer; the multiple scale levels include a first scale level, a second scale level, a third scale level, and a fourth scale level with sequentially decreasing spatial resolution; The four coding layers correspond one-to-one with the multiple scale levels, wherein: The first coding layer outputs features at the first scale level, which has the highest spatial resolution and is used to extract image edge texture features. The second coding layer outputs features at the second scale level, where the spatial resolution is lower than that of the first scale level, and is used to extract local structural features of the image. The third coding layer outputs the features of the third scale level, the spatial resolution of which is lower than that of the second scale level, and is used to extract semantic features of image regions. The fourth coding layer outputs the features of the fourth scale level, which has the lowest spatial resolution and is used to extract global category features of the image.

5. The medical radiographic image classification method according to claim 1, characterized in that, The process of obtaining the similarity between features of the support set and the query set at each scale level specifically includes: For each scale level, the Euclidean distance between the features of the query set samples and the features of the support set samples is obtained, and the Euclidean distance is transformed into a similarity probability distribution through the Softmax function; Based on the similarity probability distribution and the true category labels of the query set samples, a cross-entropy loss is constructed as the alignment loss in the feature alignment training stage; The network parameters of the classification model are optimized with the goal of minimizing the alignment loss, so as to maximize the similarity probability value of samples of the same class and minimize the similarity probability value of samples of different classes.

6. The medical radiographic image classification method according to claim 1, characterized in that, The process of performing style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the style of the target domain in medical radiology images specifically includes: The grayscale conversion, contrast enhancement, and Gaussian blur transformation are applied sequentially to each sample in the source domain natural image dataset to generate an enhanced image dataset. Among them, grayscale conversion is used to convert the multi-channel color information of natural images into single-channel grayscale information to simulate the single-channel characteristics of medical radiographic images; Contrast enhancement is used to enhance the grayscale contrast of an image to simulate the high-contrast style of medical radiographic images; Gaussian blur transformation is used to reduce the sharpness of an image to simulate the low-resolution characteristics of medical radiographic images.

7. The medical radiographic image classification method according to claim 1, characterized in that, In the cross-domain collaborative training phase, the classification model is trained using an alternating batch training method, specifically including: In each training batch, the source domain natural image dataset and the augmented image dataset are alternately input into the classification model to obtain the corresponding source domain classification loss and augmented classification loss respectively; The sum of the source domain classification loss and the augmentation classification loss is used as the total cross-domain collaborative training loss, and the network parameters of the classification model are optimized with the goal of minimizing the total cross-domain collaborative training loss.

8. A medical radiographic image classification device, characterized in that, include: The classification model acquisition module is used to acquire the trained classification model; The training of the classification model includes: Cross-domain collaborative training phase: Obtain source domain natural image dataset, perform style transformation on the source domain natural image dataset to generate an enhanced image dataset for simulating the target domain style of medical radiology images; based on the classification model, obtain the source domain classification loss and the enhancement classification loss corresponding to the source domain natural image dataset and the enhancement image dataset respectively, and train the network parameters of the classification model with the goal of minimizing the sum of the source domain classification loss and the enhancement classification loss, so that the classification model learns the domain-invariant features between the source domain and the target domain; Feature alignment training phase: Based on multiple class-labeled sample images obtained from the enhanced image dataset, a support set and a query set are constructed. The classification model extracts features of the sample images in the support set and the query set at multiple scale levels, and obtains the similarity between the features of the samples in the support set and the query set at each scale level. The network parameters of the classification model are trained with the training objective of maximizing the similarity of sample images of the same class and minimizing the similarity of sample images of different classes, so as to constrain the classification model to achieve feature alignment at each scale level. The classification module is used to classify the medical radiographic images to be classified based on the trained classification model and obtain the classification results.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the medical radiographic image classification method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the medical radiographic image classification method as described in any one of claims 1 to 7.