CN-121982413-A - Image classification transfer learning method and system based on cured PCA-PEDCC linear layer
Abstract
The invention relates to the field of computer vision and machine learning, in particular to an image classification transfer learning method and system based on a cured PCA-PEDCC linear layer, comprising the following steps of: according to the method, feature dimension reduction and category calibration are realized by solidifying the PCA-PEDCC linear layer, negative migration is effectively relieved by combining cross-domain feature calibration, classification accuracy in a small sample and cross-domain scene is improved compared with that of a traditional method, the solidified linear layer is not required to be updated, layered migration is reduced, fine tuning parameters are shortened, training time is shortened, model parameters are reduced, edge equipment and low hardware resource scenes can be adapted, deployment cost is reduced, meanwhile, a traditional linear layer design and full-parameter fine tuning mode is broken through, PCA and PEDCC are integrated and solidified, feature extraction and classification adaptation are considered, obvious technical differences are formed with the existing migration learning method, and repeated design is avoided.
Inventors
- LIAO HONGLONG
- CHEN JUNLI
- ZHU QIUYU
Assignees
- 上海大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260130
Claims (10)
- 1. The image classification transfer learning method based on the cured PCA-PEDCC linear layer is characterized by comprising the following steps of: s1, constructing a source domain preprocessing data set and a target domain preprocessing data set, wherein the source domain preprocessing data set and the target domain preprocessing data set are respectively acquired; S2, adding a PCA-PEDCC linear layer at the end of a pre-training backbone network, and performing source domain data training and then curing parameters, namely constructing the PCA-PEDCC linear layer, performing training and curing on the basis of the pre-training backbone network, and adding the PCA-PEDCC linear layer at the end of the network to form a complete source domain training model; S3, adopting a layered migration strategy for the backbone network, freezing a bottom layer, fine tuning a middle layer and thawing a top layer, wherein the backbone network layered migration and fine tuning take the model of the cured PCA-PEDCC linear layer in the step 2 as a migration base, and carrying out layered treatment on the backbone network to realize targeted migration; S4, through target domain feature distribution calibration and a small sample enhancement optimization model, the target domain feature calibration and the model are optimized to be further aligned with cross-domain features, a target domain feature calibration mechanism is added in the fine adjustment process, and classification accuracy is improved; S5, realizing target domain image classification reasoning based on the cured linear layer and the migrated backbone network, namely inputting the preprocessed target domain test set image into a model which is completed by training, extracting the characteristics of the backbone network, performing cured PCA-PEDCC linear layer dimension reduction and class calibration, outputting a classification result, and selecting the class with the highest probability as a final classification label.
- 2. The image classification transfer learning method based on the cured PCA-PEDCC linear layer, which is characterized by comprising the steps of uniformly preprocessing two types of data in S1, size normalization, random overturn/Gaussian blur data enhancement, and dividing a source domain training set/verification set and a target domain training set/test set.
- 3. The method for image classification and migration learning based on a cured PCA-PEDCC linear layer as claimed in claim 1, wherein the training model in S2 is PCA module training, PEDCC module training and linear layer curing.
- 4. The method for classifying, migrating and learning images based on a cured PCA-PEDCC linear layer according to claim 1, wherein the S3 layer is divided into a frozen backbone network bottom layer, the bottom layer is a front 1-8 layer, a fine tuning backbone network middle layer, the layer is a 9-16 layer and a unfreezing backbone network top layer, and the top layer is 17 layers or more.
- 5. The method for image classification and migration learning based on a cured PCA-PEDCC linear layer of claim 1, wherein the S4 cross-domain features are classified into feature distribution calibration and small sample enhancement calibration.
- 6. An image classification and migration learning system based on a cured PCA-PEDCC linear layer, which is applicable to any one of claims 1 to 5, and is characterized by comprising the following steps: the Q1, data acquisition and preprocessing module comprises image acquisition equipment and a storage unit, wherein software realizes functions of data reading, normalization, enhancement and division, supports unified preprocessing of image data of a source domain and a target domain, and outputs a standardized data set meeting the input requirement of a model; q2, PCA-PEDCC linear layer construction and curing module, namely carrying a PCA dimension reduction algorithm and a PEDCC class calibration algorithm, and supporting automatic construction, training and parameter curing of the linear layer; q3, a backbone network migration and fine tuning module, which integrates a plurality of pre-training backbone networks to support the selection of users according to the needs; q4, a characteristic calibration and model optimization module, namely realizing target domain characteristic distribution calibration and small sample enhancement calibration functions, automatically calculating cross-domain characteristic deviation and completing linear correction; Q5, a classification reasoning and result evaluation module, which supports batch/single Zhang Fenlei reasoning of the target domain image and outputs classification labels and probability distribution; Q6, the control and interaction module is used as a system core control unit to coordinate the modules to cooperatively work, a visual operation interface is provided, a user is supported to set training parameters, select a model framework, view training processes and classification results, a model file is supported to be stored, imported and deployed, and the edge equipment and the cloud platform are adapted.
- 7. The image classification transfer learning system based on the cured PCA-PEDCC linear layer of claim 6, wherein the built-in parameter optimizer in the Q2 can adaptively adjust the training iteration times and the learning rate according to the source domain data scale, and automatically lock the linear layer parameters after training is completed to generate a cured model file.
- 8. The image classification transfer learning system based on the cured PCA-PEDCC linear layer, as set forth in claim 6, is characterized in that a hierarchical transfer control unit is built in the Q3, different levels of a backbone network can be automatically frozen/thawed, differential learning rates are set, light fine adjustment is achieved, and a GPU acceleration unit is mounted, so that training efficiency is improved.
- 9. The image classification and migration learning system based on the cured PCA-PEDCC linear layer of claim 6, wherein optimization strategies such as early stop and regularization are built in the Q4, so that model overfitting and redundancy are avoided, and an optimal migration model is output.
- 10. The image classification transfer learning system based on the cured PCA-PEDCC linear layer is characterized in that an evaluation index calculation unit is built in the Q5, an evaluation report such as accuracy, F1 value, confusion matrix and the like is automatically generated, model performance is intuitively displayed, and a result visualization interface is provided to support retrospective analysis of classification error cases.
Description
Image classification transfer learning method and system based on cured PCA-PEDCC linear layer Technical Field The invention relates to the field of computer vision and machine learning, in particular to an image classification transfer learning method and system based on a cured PCA-PEDCC linear layer. Background In image classification tasks, deep convolutional neural networks typically require a large amount of labeling data to train. However, in practical applications, the target field often has limited data, so that transfer learning is widely used-i.e., a model to be pre-trained on a large source data set is applied to the target data set. The prior art migration learning method is mainly divided into two types, namely fine tuning part or all layers of a pre-training model and adding a new trainable classification layer for adaptation after the pre-training model. When the two types of images are utilized for image classification transfer learning, the traditional transfer learning mostly adopts a mode of fine adjustment of full parameters or simple freezing of a backbone network, negative transfer is easy to occur when the characteristic distribution difference between a source domain and a target domain is large, and most of linear classification layers are random initialization or simple full connection layers, so that cross-domain characteristics cannot be aligned effectively, and the classification precision of the target domain is insufficient. Therefore, an image classification transfer learning method and system based on a cured PCA-PEDCC linear layer are provided for the problems. Disclosure of Invention In order to overcome the defects of the prior art and solve at least one technical problem in the background art, the invention provides an image classification migration learning method and system based on a cured PCA-PEDCC linear layer. The technical scheme adopted for solving the technical problems is that the image classification transfer learning method based on the cured PCA-PEDCC linear layer comprises the following steps: s1, constructing a source domain preprocessing data set and a target domain preprocessing data set, wherein the source domain preprocessing data set and the target domain preprocessing data set are respectively acquired; S2, adding a PCA-PEDCC linear layer at the end of a pre-training backbone network, and performing source domain data training and then curing parameters, namely constructing the PCA-PEDCC linear layer, performing training and curing on the basis of the pre-training backbone network, and adding the PCA-PEDCC linear layer at the end of the network to form a complete source domain training model; S3, adopting a layered migration strategy for the backbone network, freezing a bottom layer, fine tuning a middle layer and thawing a top layer, wherein the backbone network layered migration and fine tuning take the model of the cured PCA-PEDCC linear layer in the step 2 as a migration base, and carrying out layered treatment on the backbone network to realize targeted migration; S4, through target domain feature distribution calibration and a small sample enhancement optimization model, the target domain feature calibration and the model are optimized to be further aligned with cross-domain features, a target domain feature calibration mechanism is added in the fine adjustment process, and classification accuracy is improved; S5, realizing target domain image classification reasoning based on the cured linear layer and the migrated backbone network, namely inputting the preprocessed target domain test set image into a model which is completed by training, extracting the characteristics of the backbone network, performing cured PCA-PEDCC linear layer dimension reduction and class calibration, outputting a classification result, and selecting the class with the highest probability as a final classification label. Preferably, in the step S1, unified preprocessing is carried out on the two types of data, size normalization, random overturn/Gaussian blur data enhancement are carried out, a source domain training set/verification set is divided, and a target domain training set/test set is divided. Preferably, the training model in S2 is PCA module training, PEDCC module training, and linear layer curing. Preferably, the step S3 is divided into a frozen backbone network bottom layer, wherein the bottom layer is a first 1-8 layer, a fine tuning backbone network middle layer, the middle layer is a 9-16 layer and a unfreezing backbone network top layer, and the top layer is 17 layers and above. Preferably, the cross-domain features in S4 are classified into feature distribution calibration and small sample enhancement calibration. An image classification transfer learning system based on a cured PCA-PEDCC linear layer, the system being adapted for use in any one of the above comprising the steps of: the Q1, data acquisition and preprocessing module comprises image acq