Bone marrow cell classification method, system and equipment based on semi-supervised domain adaptation and medium
By introducing wavelet transform-based high-frequency feature fusion and target domain distribution perturbation alignment modules into the feature extractor, the domain offset and class bias problems in bone marrow cell image classification are solved, improving the classification accuracy and model stability across hospital datasets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-19
AI Technical Summary
Existing semi-supervised domain adaptation methods suffer from domain shift and class bias in bone marrow cell image classification, leading to reduced classification accuracy. This is especially true when transferring datasets between different hospitals, where traditional feature extractors and source domain weighting mechanisms fail to effectively improve classification performance.
A high-frequency feature fusion module based on wavelet transform is added to the feature extractor, combined with a target domain distribution perturbation alignment module. High-frequency features are extracted through wavelet transform and aligned in the target domain, thereby enhancing the robustness of feature extraction and the stability of classification boundaries.
It improved the accuracy of bone marrow cell image classification, especially in the transfer between datasets from different hospitals, enhancing the clarity of fine-grained decision boundaries and the robustness of the classification model, with an average accuracy improvement of 2.3%.
Smart Images

Figure CN122067002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, system, device, and medium for bone marrow cell classification based on semi-supervised domain adaptation, belonging to the fields of image processing and computer vision. Background Technology
[0002] In recent years, deep learning-based bone marrow cell classification technology has developed rapidly, and different institutions have made progress in designing automated bone marrow cell classification methods at different levels. However, because bone marrow cell images are easily affected by various factors such as staining reagents and staining time, microscope type, acquisition lens, and shooting light, the classification accuracy of a cell classification model trained on Hospital A's dataset will be significantly reduced when directly applied to Hospital B. In practical applications, while acquiring images is relatively easy in hospitals, labeling each cell with a category is difficult and requires significant manpower and resources. Therefore, a semi-supervised domain adaptation model is needed to solve the domain shift problem in classification, requiring only partial labeling of the target domain image to better utilize the source domain image data and labels.
[0003] Among traditional semi-supervised domain adaptation methods, Pred&Guide (from the paper "Pred&Guide: Labeled Target Class Prediction for Guiding Semi-Supervised Domain Adaptation") shows good performance in bone marrow cell domain adaptation, improving classification accuracy by about 18%, but the classification effect still needs improvement. The main problem is:
[0004] (1) Pred&Guide uses a feature extractor from a traditional classification model to extract features. The extracted features have different focuses in different domains, causing domain shift. The feature extractor needs to be improved so that it can extract key local features of bone marrow cells, so that the source domain and target domain features have the same focus.
[0005] (2) Pred&Guide employs a source domain sample weighting (SEW) mechanism, which leverages the inconsistency in predictions of a few labeled target samples to guide the dynamic weighting of a large amount of source domain data. This approach achieves good results on general datasets. However, when applied to fine-grained datasets of bone marrow cell images, the small inter-class differences and large intra-class differences in the bone marrow cell dataset cause the classification decision boundaries between different bone marrow cell categories to collapse, resulting in significant class bias. Therefore, relying solely on source domain weighting is insufficient; it is necessary to impose distribution alignment constraints on the target domain data itself to improve classification performance. Summary of the Invention
[0006] In view of this, the present invention provides a bone marrow cell classification method, system, computer device, and storage medium based on semi-supervised domain adaptation. It extracts local features of bone marrow cell images by adding a high-frequency feature fusion module based on wavelet transform to the feature extractor. Simultaneously, it addresses the problem of blurred classification boundaries during domain migration by adding a target domain distribution perturbation alignment module to improve more accurate label propagation in the target domain, thereby enhancing the classification accuracy of bone marrow cell images in the target domain.
[0007] The first objective of this invention is to provide a bone marrow cell classification method based on semi-supervised domain adaptation.
[0008] A second objective of this invention is to provide a bone marrow cell classification system based on semi-supervised domain adaptation.
[0009] A third objective of this invention is to provide a computer device.
[0010] A fourth objective of this invention is to provide a storage medium.
[0011] The first objective of this invention can be achieved by adopting the following technical solution:
[0012] A bone marrow cell classification method based on semi-supervised domain adaptation, the method comprising:
[0013] Acquire and process a dataset, the dataset comprising a source domain dataset and a target domain dataset, the source domain dataset and the target domain dataset having the same cell categories;
[0014] A domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment is established. The domain adaptation classification network model is based on the Pred&Guide skeleton and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module.
[0015] Using the source domain dataset and the target domain dataset, the domain adaptation classification network model is trained to obtain the trained domain adaptation classification network model;
[0016] By inputting bone marrow cell images from the target domain dataset into a trained domain-adaptive classification network model, the predicted categories of the bone marrow cell images are obtained, thus achieving semi-supervised bone marrow cell image classification.
[0017] Furthermore, the Pred&Guide skeleton includes a feature extractor ResNet50 and a classifier C;
[0018] The improvement of the feature extractor by the high-frequency feature fusion module is the addition of a high-frequency fusion module based on wavelet transform to extract and fuse high-frequency features.
[0019] The target domain distribution perturbation and alignment module operates after the feature extractor extracts the source domain data and target domain data, perturbing the aligned and unaligned target features to the middle region of the target sub-distribution for distribution alignment.
[0020] Furthermore, the feature extractor ResNet50 includes five convolutional layers and a global pooling layer, and the classifier C includes a fully connected layer and a Softmax layer.
[0021] Furthermore, the high-frequency feature fusion module operates between two adjacent convolutional layer groups of the second to fourth convolutional layer groups of the ResNet50 feature extractor;
[0022] One of the second to fourth convolutional layer groups extracts image features, performs wavelet decomposition on the image features to generate four frequency domain components: LL, LH, HL, and HH. The three high-frequency components, LH, HL, and HH, are retained to form high-frequency features. Wavelet inverse pooling is performed on the high-frequency features, and the processed high-frequency features are fused with the original spatial domain features in the channel dimension as enhanced features input to the next convolutional layer group.
[0023] Furthermore, after the feature extractor extracts the source domain data and target domain data, the target domain distribution perturbation and alignment module perturbs the aligned and unaligned target features to the middle region of the target sub-distribution for distribution alignment. The specific process is as follows:
[0024] The labeled and unlabeled target domain image data are merged to obtain target domain data target_data, and the original features feature_t of the target domain data are obtained through a feature extractor.
[0025] An adversarial perturbation vector P is generated by the perturbation generator and added to the original target data target_data to obtain the perturbated input target_hat;
[0026] The perturbated input target_hat is passed through a feature extractor to calculate the perturbated feature P_feature:
[0027] Normalize the original feature_t and the perturbed feature P_feature to obtain clean_logit and P_logit, respectively;
[0028] The KL divergence loss is used to calculate the target domain consistency loss. Aligned and unaligned target domain sub-distributions are perturbed to the intermediate region. The loss function is defined as follows:
[0029] ;
[0030] in, Here, K represents the data distribution for the target domain, and K represents the corresponding category. This is the function for calculating KL divergence.
[0031] Furthermore, the step of inputting the bone marrow cell images from the target domain dataset into the trained domain adaptation classification network model to obtain the predicted category of the bone marrow cell images specifically involves:
[0032] The bone marrow cell images from the target domain dataset are input into the feature extractor of the trained domain-adaptive classification network model. The extracted features are then fed into the classifier to obtain the predicted category of the bone marrow cell images.
[0033] Furthermore, the acquisition and processing of the dataset specifically includes:
[0034] Bone marrow cell images were collected from two different institutions, and each cell was labeled with a fine-grained category of bone marrow cells. The bone marrow cell images from the two institutions were used as the source domain dataset and the target domain dataset, respectively. All image formats in the source domain dataset and the target domain dataset were unified to obtain the final dataset. The image format includes image file type and image size.
[0035] The second objective of this invention can be achieved by adopting the following technical solution:
[0036] A bone marrow cell classification system based on semi-supervised domain adaptation, the system comprising:
[0037] A dataset acquisition unit is used to acquire and process a dataset, wherein the dataset includes a source domain dataset and a target domain dataset, and the source domain dataset and the target domain dataset have the same cell category;
[0038] The model building unit is used to build a domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment. The domain adaptation classification network model is based on the Pred&Guide skeleton and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module.
[0039] The model training unit is used to train the domain adaptation classification network model using the source domain dataset and the target domain dataset, so as to obtain the trained domain adaptation classification network model.
[0040] The classification prediction unit is used to input bone marrow cell images from the target domain dataset into a trained domain-adaptive classification network model to obtain the predicted category of the bone marrow cell images, thus achieving semi-supervised bone marrow cell image classification.
[0041] The third objective of this invention can be achieved by adopting the following technical solution:
[0042] A computer device includes a processor and a memory for storing a processor-executable program, wherein when the processor executes the program stored in the memory, it implements the above-described bone marrow cell classification method.
[0043] The fourth objective of this invention can be achieved by adopting the following technical solution:
[0044] A storage medium storing a program that, when executed by a processor, implements the above-described bone marrow cell classification method.
[0045] The present invention has the following advantages over the prior art:
[0046] 1. This invention constructs a semi-supervised domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment. This model, based on the traditional domain adaptation classification network Pred&Guide, adds a high-frequency feature fusion module based on wavelet transform and a target domain distribution perturbation alignment module to enhance transferability. The high-frequency feature fusion module operates on the feature extraction part; the addition of high-frequency information allows the domain adaptation network to focus on high-frequency features with domain invariance, thereby improving domain adaptation accuracy. The target domain distribution perturbation alignment module enhances the network's robustness to the target domain feature distribution. By calculating the prediction consistency loss between the original features and the perturbated features, it brings the sub-distributions within the target domain closer during domain transfer. This intra-domain alignment method strengthens the fine-grained decision boundary, thereby improving classification performance.
[0047] 2. This invention introduces wavelet transform to extract high-frequency features in the high-frequency feature fusion module. Compared with Fourier transform, the high-frequency features extracted by wavelet transform can better capture contour details independent of color and texture. At the same time, the high-frequency features are fused with the original features, which not only utilizes the domain invariance of high-frequency features, but also retains the auxiliary classification role of low-frequency features. This avoids the classification model collapse problem caused by relying entirely on high-frequency features, and ensures the robustness of the model.
[0048] 3. This invention incorporates a target domain distribution perturbation alignment module. To address the issues of classification decision boundary collapse and class bias caused by the source domain weighting (SEW) mechanism of Pred&Guide on fine-grained data, this module applies perturbation consistency constraints to force the distribution alignment of the target domain data itself, effectively solving the model shift caused by class ambiguity. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0050] Figure 1 This diagram illustrates the training and application environment of the bone marrow cell classification method based on semi-supervised domain adaptation according to Embodiment 1 of the present invention.
[0051] Figure 2 This is a flowchart of a bone marrow cell classification method based on semi-supervised domain adaptation according to Embodiment 1 of the present invention.
[0052] Figure 3 This is a structural diagram of the domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment in Embodiment 1 of the present invention.
[0053] Figure 4 This is a structural block diagram of the bone marrow cell classification system based on semi-supervised domain adaptation according to Embodiment 2 of the present invention.
[0054] Figure 5 This is a structural block diagram of the computer device according to Embodiment 3 of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0056] Example 1:
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0058] The bone marrow cell classification method based on semi-supervised domain adaptation provided in this application has a training environment such as... Figure 1 As shown in Figure 101, it can be applied to, for example Figure 1In the application environment shown in 102, labeled source domain images and partially labeled target domain images are input into computer device 101. Computer device 101 first processes the dataset to obtain a training set. Then, computer device 101 trains a domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment using the training set, resulting in a trained domain adaptation classification network. The bone marrow cell image of the target domain to be tested is input into the trained domain adaptation classification network model in computer device 101 to obtain the cell category prediction result corresponding to the bone marrow cell image, thus achieving cell classification of the target domain. The computer device in 102 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be a standalone server or a server cluster composed of multiple servers.
[0059] like Figure 2 As shown, this embodiment provides a bone marrow cell classification method based on semi-supervised domain adaptation, including the following steps:
[0060] S201. Obtain the dataset and process it.
[0061] Furthermore, step S201 specifically includes:
[0062] S2011. Collect and label the dataset.
[0063] According to clinical laboratory standards, bone marrow smears stained with Wright's stain were collected from newly diagnosed leukemia patients and bone marrow transplant donors at two different hospitals. All smears were collected by the subjects themselves during their hospital examinations and were already included in the hospital's database. These were not collected from subjects specifically recruited for this study. All data were anonymized, did not contain the subjects' personal information, and no follow-up was conducted with the patients.
[0064] To construct a fine-grained classification dataset for bone marrow cells, individual cells were cropped from the original images, and each cropped bone marrow cell was labeled with its category. Based on the diagnostic criteria for acute leukemia and the developmental evolution of bone marrow cells, and taking into account the actual number of cells collected, a bone marrow cell dataset with 14 categories was finally constructed. Data from two different institutions (two different hospitals) were considered as two different domains, and were referred to as the source domain dataset and the target domain dataset, respectively.
[0065] S2012. Preprocess the dataset to obtain the preprocessed dataset.
[0066] Preprocessing of the dataset: Unify the image format of all bone marrow cells in the source and target domain datasets. This includes standardizing the image file type and image size; the image type is JPG, and the uniform image size is 224×224.
[0067] S202. Establish a domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment.
[0068] like Figure 3 As shown, the domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment is based on the traditional domain adaptation network Pred&Guide skeleton. The Pred&Guide skeleton can be divided into two parts: feature extractor ResNet50 and classifier C. The feature extractor ResNet50 includes five convolutional layers and a global pooling layer, and the classifier C includes a fully connected layer and a Softmax layer.
[0069] The domain-adaptive classification network model in this embodiment first improves the feature extractor by adding a high-frequency feature fusion module. The high-frequency feature fusion module operates between two adjacent convolutional layers in the second to fourth convolutional layer groups of ResNet50.
[0070] Specifically, taking the second convolutional layer group as an example, the feature map extracted by this layer is decomposed using wavelet decomposition to generate four frequency domain components: LL, LH, HL, and HH. Among them, the three high-frequency components LH, HL, and HH, which contain rich texture details, are retained, and wavelet inverse pooling is performed on them. Subsequently, the processed high-frequency features are fused with the original spatial domain features (features extracted by the previous convolutional layer group) in the channel dimension, and used as enhanced features input to the next convolutional group, thereby guiding the network to focus more on the local high-frequency detail information of the bone marrow image during the feature extraction stage.
[0071] Furthermore, the domain adaptation classification network model in this embodiment also incorporates a target domain distribution perturbation alignment module. This module operates after the feature extractor extracts the target domain features, perturbing the aligned and unaligned target features to the middle region of the target sub-distribution, thereby improving the more accurate label propagation of the target domain. The specific process is as follows:
[0072] (1) Merge labeled target domain image data and unlabeled target domain image data to obtain target domain data target_data, and obtain the original feature_t of the target domain data through a feature extractor;
[0073] (2) Generate an adversarial perturbation vector P through the perturbation generator and add it to the original target data target_data to obtain the perturbated input target_hat;
[0074] (3) The perturbated input target_hat is passed through a feature extractor to calculate the perturbated feature P_feature:
[0075] (4) Normalize the original feature_t and the perturbed feature P_feature to obtain clean_logit and P_logit respectively;
[0076] (5) Calculate the target domain consistency loss using KL divergence loss, perturbing the aligned and unaligned target domain sub-distributions to the intermediate region. The loss function is defined as:
[0077] ;
[0078] in, Here, K represents the data distribution for the target domain, and K represents the corresponding category. This is the function for calculating KL divergence.
[0079] S203. Using the source domain dataset and the target domain dataset, train the domain adaptation classification network model to obtain the trained domain adaptation classification network model.
[0080] The specific steps for training the domain adaptation classification network model in this embodiment are as follows:
[0081] (1) Model initialization: In the feature extractor Resnet50, the pre-trained parameters from ImageNet are imported, and the parameters of the remaining model structures are randomly initialized;
[0082] (2) Setting model parameters: The stochastic gradient descent algorithm is used for optimization, the weight decay coefficient is 1e-3; the initial learning factor is set to 0.001, and the learning rate is adjusted during training with a decay rate of 0.75; the momentum is set to 0.9, and the minimum batch size is set to 32.
[0083] (3) Load the data from the source domain dataset and the target domain dataset into the model.
[0084] (4) Preprocessing the training images: The images in the bone marrow cell dataset are preprocessed, specifically by performing online data augmentation on the source and target domain images through three methods: random vertical flipping, random rotation, and color perturbation.
[0085] (5) Train the model: Figure 2 The domain adaptation network is trained in three stages of iterative training:
[0086] In the first stage, some labels on the target domain data are temporarily ignored, and all of them are treated as unlabeled samples. In this stage, the preprocessed labeled source domain data and the unlabeled target domain data are fed into a feature extraction network to obtain the source domain image features. and target domain image features Subsequently, the source domain features with labels will be available. The data is fed into classifier C for classification, and cross-entropy loss is used. Constraining the classification by including unlabeled target domain features The data is fed into a classifier C for classification to obtain the predicted probability p, and the minimum entropy loss is applied. Constraints are applied; simultaneously, an adversarial perturbation vector P is generated by the perturbation generator and added to the original target domain data target_data to obtain the perturbated input target_hat. Then, the perturbed feature P_feature is extracted from this target_hat using a feature extractor, and then fed into a classifier along with the original target domain data to obtain clean_logit and P_logit, respectively. Loss calculation targets the consistency loss.
[0087] The second stage involves predicting the labeled target data. The model M trained in the first stage is used to predict a small number of labeled target domain data, and the label prediction accuracy for each category is calculated to obtain a class-aware accuracy vector A. The specific formula is as follows:
[0088] ;
[0089] In the third stage, the prediction accuracy of category k is obtained from the accuracy vector A in the previous stage. And calculate the corresponding maximum weight based on the category. and minimum weight The calculation formula is as follows:
[0090] ;
[0091] ;
[0092] in, It is the accuracy calculated from the prediction results of the k-th class of labeled target samples obtained in the previous step, while It is a hyperparameter.
[0093] Next, the features extracted from the source domain image will be... Stored in feature library S, and the labeled target samples are calculated. and all similar source samples Find the maximum cosine similarity among the values in that class. and minimum value Then, calculate the final weight for each source domain sample i:
[0094] ;
[0095] Starting from stage T1, we begin using the cross-entropy loss weighted after the source domain samples. replace Constraints are applied up to T2; after T2, the standard cross-entropy loss of the labeled target domain data is introduced. The sum of various losses in the network is calculated, and the network parameters are updated until the losses gradually decrease to convergence, ultimately resulting in a semi-supervised domain adaptation classification network model that performs well in classifying bone marrow cells in the target domain.
[0096] Specifically, the formulas for various loss functions are as follows:
[0097] ;
[0098] in, For the data distribution of the target domain, K represents the number of categories. This is the function for calculating KL divergence.
[0099] ;
[0100] Where N is the number of samples, and K represents the number of categories. The labels are real labels, and the vectors are one-hot vectors. Predict the probability that sample i belongs to class k.
[0101] ;
[0102] Where K represents the number of categories, The predicted probability is obtained by classifying the target domain data after it has been extracted by the feature extractor and then fed into the classifier C.
[0103] ;
[0104] in, The weights calculated for the current source domain samples. Let be the true label of the current source domain sample, which is a one-hot vector, and . The probability distribution predicted for the source domain samples.
[0105] In summary, the following minimax method is used to optimize the parameters of the feature extractor F and the classifier C:
[0106] ;
[0107] ;
[0108] Where L is the excluding The sum of all other losses, as expressed in the following formula:
[0109] ;
[0110] Where T1 represents the number of iterations to start weighting the source domain samples, and T2 represents the number of iterations to expose the labels of a few target domain samples to the model for training. The values of each weight are: Finally, the neural network is optimized based on the obtained loss function until it converges.
[0111] S204. Input the bone marrow cell images from the target domain dataset into the trained domain adaptation classification network model to obtain the predicted category of the bone marrow cell images, thus achieving semi-supervised bone marrow cell image classification.
[0112] In this embodiment, the target domain image of the input test set is processed by feature extractor F and then fed into classifier C to predict the category of bone marrow cell images. The specific steps are as follows:
[0113] (1) Read the bone marrow cell images in the target domain dataset.
[0114] (2) Input the bone marrow cell image into the trained domain adaptation classification network model for calculation. The image is processed by feature extractor F to extract features, and then sent to classifier C for classification to obtain the final predicted label, thereby realizing the category prediction of bone marrow cell images in the target domain dataset.
[0115] This embodiment conducts experiments on the target domain dataset. The trained domain adaptation classification network model is used to predict the class of bone marrow cell images in the target domain dataset, and the classification performance of the domain adaptation network model is quantitatively measured by the accuracy of the class prediction. The accuracy is calculated as the proportion of correctly predicted images in all target domain images, which can explicitly represent the network's prediction effect on bone marrow cell images in the target domain. To ensure the generality of the proposed network, datasets collected from two institutions were used as the source domain dataset and the target domain dataset, respectively, for experiments. The experimental results are shown in Table 1. As can be seen from Table 1, this embodiment performs better than other advanced algorithms. The datasets from the two institutions are referred to as BMC and PKG, respectively. In the table, BMC2PKG represents experiments using BMC as the source domain dataset and PKG as the target domain dataset; PKG2BMC represents experiments using PKG as the source domain dataset and BMC as the target domain dataset.
[0116] Comparing the experimental results, it was found that the network model proposed in this embodiment can be improved in both types of experiments, with an average accuracy improvement of about 2.3%.
[0117] Table 1. Domain-adapted bone marrow cell classification accuracy (%)
[0118]
[0119] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium.
[0120] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the order of execution of the described steps may be changed. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0121] Example 2:
[0122] like Figure 4 As shown, this embodiment provides a bone marrow cell classification system based on semi-supervised domain adaptation. The system includes a dataset acquisition unit 401, a model building unit 402, a model training unit 403, and a classification prediction unit. The specific functions of each unit are as follows:
[0123] Dataset acquisition unit 401 is used to acquire and process a dataset, wherein the dataset includes a source domain dataset and a target domain dataset, and the source domain dataset and the target domain dataset have the same cell category;
[0124] Model building unit 402 is used to build a domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment. The domain adaptation classification network model is based on the Pred&Guide skeleton and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module.
[0125] The model training unit 403 is used to train the domain adaptation classification network model using the source domain dataset and the target domain dataset to obtain the trained domain adaptation classification network model.
[0126] The classification prediction unit 404 is used to input the bone marrow cell images of the target domain dataset into the trained domain adaptation classification network model to obtain the predicted category of the bone marrow cell images, thereby achieving semi-supervised bone marrow cell image classification.
[0127] The specific implementation of each unit in this embodiment can be found in Embodiment 1 above, and will not be repeated here. It should be noted that the system provided in this embodiment is only illustrated by the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure can be divided into different functional units to complete all or part of the functions described above.
[0128] Example 3:
[0129] like Figure 5 As shown, this embodiment provides a computer device, which includes a processor 602, a memory, an input device 603, a display device 604, and a network interface 605 connected via a system bus 601. The processor 602 provides computing and control capabilities. The memory includes a non-volatile storage medium 606 and internal memory 607. The non-volatile storage medium 606 stores an operating system, computer programs, and a database. The internal memory 607 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium 606. When the computer program is executed by the processor 602, it implements the bone marrow cell classification method of Embodiment 1 described above, as follows:
[0130] A dataset is acquired and processed, comprising a source domain dataset and a target domain dataset, both containing the same cell categories. A domain-adaptive classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment is established. This model is based on the Pred&Guide framework and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module. The domain-adaptive classification network model is trained using the source and target domain datasets to obtain a trained model. Bone marrow cell images from the target domain dataset are input into the trained model to obtain the predicted categories of the bone marrow cell images, thus achieving semi-supervised bone marrow cell image classification.
[0131] Example 4:
[0132] This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, it implements the bone marrow cell classification method of Embodiment 1 above, as follows:
[0133] A dataset is acquired and processed, comprising a source domain dataset and a target domain dataset, both containing the same cell categories. A domain-adaptive classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment is established. This model is based on the Pred&Guide framework and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module. The domain-adaptive classification network model is trained using the source and target domain datasets to obtain a trained model. Bone marrow cell images from the target domain dataset are input into the trained model to obtain the predicted categories of the bone marrow cell images, thus achieving semi-supervised bone marrow cell image classification.
[0134] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0135] In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this embodiment, the computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0136] The computer-readable storage medium described above can be used to write computer programs for executing this embodiment in one or more programming languages or combinations thereof. These programming languages include object-oriented programming languages—such as Java, Python, and C++—and conventional procedural programming languages—such as C or similar programming languages. The program can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] In summary, this invention improves the classification accuracy of bone marrow cell images by adding a wavelet transform-based high-frequency feature fusion module to the feature extractor, while addressing the issues of classification decision boundary collapse and class bias caused by the Pred&Guide source domain weighting (SEW) mechanism on fine-grained data. Furthermore, it adds a target domain distribution perturbation alignment module to improve more accurate label propagation in the target domain.
[0138] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A bone marrow cell classification method based on semi-supervised domain adaptation, characterized in that, The method includes: Acquire and process a dataset, the dataset comprising a source domain dataset and a target domain dataset, the source domain dataset and the target domain dataset having the same cell categories; A domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment is established. The domain adaptation classification network model is based on the Pred&Guide skeleton and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module. Using the source domain dataset and the target domain dataset, the domain adaptation classification network model is trained to obtain the trained domain adaptation classification network model; By inputting bone marrow cell images from the target domain dataset into a trained domain-adaptive classification network model, the predicted categories of the bone marrow cell images are obtained, thus achieving semi-supervised bone marrow cell image classification.
2. The bone marrow cell classification method according to claim 1, characterized in that, The Pred&Guide skeleton includes a feature extractor ResNet50 and a classifier C; The improvement of the feature extractor by the high-frequency feature fusion module is the addition of a high-frequency fusion module based on wavelet transform to extract and fuse high-frequency features. The target domain distribution perturbation and alignment module operates after the feature extractor extracts the source domain data and target domain data, perturbing the aligned and unaligned target features to the middle region of the target sub-distribution for distribution alignment.
3. The bone marrow cell classification method according to claim 2, characterized in that, The feature extractor ResNet50 includes five groups of convolutional layers and a global pooling layer, and the classifier C includes a fully connected layer and a Softmax layer.
4. The bone marrow cell classification method according to claim 3, characterized in that, The high-frequency feature fusion module operates between two adjacent convolutional layer groups in the second to fourth convolutional layer groups of the ResNet50 feature extractor. One of the second to fourth convolutional layer groups extracts image features, performs wavelet decomposition on the image features to generate four frequency domain components: LL, LH, HL, and HH. The three high-frequency components, LH, HL, and HH, are retained to form high-frequency features. Wavelet inverse pooling is performed on the high-frequency features, and the processed high-frequency features are fused with the original spatial domain features in the channel dimension as enhanced features input to the next convolutional layer group.
5. The bone marrow cell classification method according to claim 2, characterized in that, The target domain distribution perturbation and alignment module operates after the feature extractor extracts the source domain data and target domain data, perturbing the aligned and unaligned target features to the middle region of the target sub-distribution for distribution alignment. The specific process is as follows: The labeled and unlabeled target domain image data are merged to obtain target domain data target_data, and the original features feature_t of the target domain data are obtained through a feature extractor. An adversarial perturbation vector P is generated by the perturbation generator and added to the original target data target_data to obtain the perturbated input target_hat; The perturbated input target_hat is passed through a feature extractor to calculate the perturbated feature P_feature: Normalize the original feature_t and the perturbed feature P_feature to obtain clean_logit and P_logit, respectively; The KL divergence loss is used to calculate the target domain consistency loss. Aligned and unaligned target domain sub-distributions are perturbed to the intermediate region. The loss function is defined as follows: ; in, Here, K represents the data distribution for the target domain, and K represents the corresponding category. This is the function for calculating KL divergence.
6. The bone marrow cell classification method according to claim 2, characterized in that, The step of inputting bone marrow cell images from the target domain dataset into a trained domain adaptation classification network model to obtain the predicted category of the bone marrow cell images is as follows: The bone marrow cell images from the target domain dataset are input into the feature extractor of the trained domain-adaptive classification network model. The extracted features are then fed into the classifier to obtain the predicted category of the bone marrow cell images.
7. The bone marrow cell classification method according to any one of claims 1-6, characterized in that, The process of acquiring and processing the dataset specifically includes: Bone marrow cell images were collected from two different institutions, and each cell was labeled with a fine-grained category of bone marrow cells. The bone marrow cell images from the two institutions were used as the source domain dataset and the target domain dataset, respectively. All image formats in the source domain dataset and the target domain dataset were unified to obtain the final dataset. The image format includes image file type and image size.
8. A bone marrow cell classification system based on semi-supervised domain adaptation, characterized in that, The system includes: A dataset acquisition unit is used to acquire and process a dataset, wherein the dataset includes a source domain dataset and a target domain dataset, and the source domain dataset and the target domain dataset have the same cell category; The model building unit is used to build a domain adaptation classification network model based on high-frequency feature fusion and target domain distribution perturbation alignment. The domain adaptation classification network model is based on the Pred&Guide skeleton and includes a high-frequency feature fusion module and a target domain distribution perturbation alignment module. The model training unit is used to train the domain adaptation classification network model using the source domain dataset and the target domain dataset, so as to obtain the trained domain adaptation classification network model. The classification prediction unit is used to input bone marrow cell images from the target domain dataset into a trained domain-adaptive classification network model to obtain the predicted category of the bone marrow cell images, thus achieving semi-supervised bone marrow cell image classification.
9. A computer device comprising a processor and a memory for storing a processor-executable program, characterized in that, When the processor executes the program stored in the memory, it implements the bone marrow cell classification method according to any one of claims 1-7.
10. A storage medium storing a program that, when executed by a processor, implements the bone marrow cell classification method according to any one of claims 1-7.