Computer image recognition method and system based on machine learning

By integrating convolutional neural networks with adaptive attention mechanisms, dynamic adversarial data augmentation and style transfer, and combining hierarchical transfer learning and uncertainty quantization, this approach addresses the shortcomings of existing technologies in multi-scale feature extraction and poor robustness, achieving high-precision and stable image recognition results applicable to fields such as medicine and remote sensing.

CN121305044APending Publication Date: 2026-01-09LIUPANSHUI VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511706760.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing computer image recognition technologies struggle to efficiently integrate multi-scale features at the feature extraction level, resulting in insufficient model robustness. They perform poorly, especially in complex scenarios, and are difficult to adapt to small sample scenarios. Furthermore, they lack uncertainty quantification modules, making it difficult to meet the decision-making needs of high-risk scenarios.

Method used

A multi-scale feature extraction network is constructed by integrating convolutional neural networks and adaptive attention mechanisms. Dynamic adversarial data augmentation and style transfer are used to generate augmented datasets. A hierarchical transfer learning framework and meta-learning are introduced to optimize parameters. Feature mapping is learned through a domain adaptive network. An uncertainty quantization module is introduced to output confidence index. A lightweight model is deployed on edge devices for incremental learning.

Benefits of technology

It improves image recognition accuracy and robustness, meets the decision-making needs of high-risk scenarios, achieves model stability and real-time performance in complex scenarios, and expands the scope of application of the technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121305044A_ABST
    Figure CN121305044A_ABST
Patent Text Reader

Abstract

The invention relates to the crossing field of image processing and artificial intelligence, and discloses a computer image recognition method and system based on machine learning, and the method comprises the steps: fusing a convolutional neural network with a self-adaptive attention mechanism, and constructing a multi-scale feature extraction network; a dynamic adversarial data enhancement strategy is adopted to process the input image to generate an adversarial sample, and the adversarial sample and the style migration image jointly form an enhanced data set; adopting a hierarchical transfer learning framework, initializing source domain pre-training model parameters based on meta learning, and learning a feature mapping relationship between a source domain and a target domain through a domain adaptive network; constructing a probability prediction model based on a variational auto-encoder and a Bayesian Transform, and outputting an image recognition result and a corresponding confidence index; carrying out incremental learning by adopting a federal learning algorithm based on differential privacy, and regularly issuing updated knowledge to the edge model; according to the invention, the image recognition performance and practicability are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing and artificial intelligence, in particular to a computer image recognition method and system based on machine learning. BACKGROUND

[0002] Computer image recognition technology has been widely used in medical diagnosis, remote sensing monitoring, intelligent security and other fields, but the existing methods still have many bottlenecks; in the aspect of feature extraction, traditional schemes mostly rely on single convolutional neural network or basic attention mechanism, which is difficult to efficiently fuse multi-scale features and capture the features of key image regions; the data enhancement strategy is mostly static combination, which does not form a dynamic adversarial and style transfer collaborative mechanism, and when facing complex scenes such as light mutation, occlusion and noise, the model robustness is obviously insufficient; in the small sample scene, the conventional transfer learning does not optimize the initialization parameters through meta-learning, and lacks effective domain adaptation network, which is difficult to reduce the feature distribution difference between the source domain and the target domain, and is prone to overfitting. At the same time, the existing methods generally do not introduce uncertainty quantification module, which cannot output prediction confidence, and is difficult to meet the decision-making needs of high-risk scenes such as medical treatment. SUMMARY

[0003] The purpose of the present application is to solve the above problems, and a computer image recognition method and system based on machine learning are designed.

[0004] The first aspect of the present application provides a computer image recognition method based on machine learning, which comprises the following steps: Fusing convolutional neural network and adaptive attention mechanism to construct a multi-scale feature extraction network; Using a dynamic adversarial data enhancement strategy to process the input image to generate adversarial samples, and together with the style transfer image to form an enhanced data set; Using a hierarchical transfer learning framework, initializing the source domain pre-training model parameters based on meta-learning, and learning the feature mapping relationship between the source domain and the target domain through the domain adaptation network; Introducing an uncertainty quantification module, constructing a probability prediction model based on variational autoencoder and Bayesian Transformer, and outputting the image recognition result and the corresponding confidence index; Deploying a lightweight sub-model obtained from the cloud global model through knowledge distillation on the edge device, aggregating the model updates of each edge device on the cloud, using a federated learning algorithm based on differential privacy for incremental learning, and periodically issuing the updated knowledge to the edge model.

[0005] Optionally, in the first implementation manner of the first aspect of the present application, the fusion of convolutional neural network and adaptive attention mechanism to construct a multi-scale feature extraction network comprises: A dual-path basic structure of a multi-scale feature extraction network is built to obtain a main path and an auxiliary path, and an original image to be processed is input into the multi-scale feature extraction network; A ResNeXt architecture is deployed in the main path, the original image to be processed is split by a grouped convolution manner, layer-by-layer convolution operations are performed on the original image to generate multi-scale basic feature maps of different levels; A channel-spatial dual attention module is introduced in the auxiliary path, the importance weight of each feature channel is calculated and adjusted by a channel attention submodule, and then the key spatial region in the image is located and its feature expression is strengthened by a spatial attention submodule, and a feature map optimized by dual attention is output; The multi-scale basic feature map output by the main path and the optimized feature map output by the auxiliary path are element-level fused, and a feature pyramid attention mechanism is introduced, cross-level correlation and weight distribution are performed on the fused feature maps of different scales, and high-dimensional fusion features are formed.

[0006] Optionally, in the second implementation manner of the first aspect of the present application, the multi-scale basic feature map output by the main path and the optimized feature map output by the auxiliary path are element-level fused, and a feature pyramid attention mechanism is introduced, cross-level correlation and weight distribution are performed on the fused feature maps of different scales, and high-dimensional fusion features are formed, including: The fused feature maps of different scales are sorted and labeled by scale from large to small, spatial attention calculation is performed on the feature maps of each level, and attention weight maps with the same size as the feature maps are generated through convolution operation; The high-level feature map is adjusted to the same size as the low-level feature map through upsampling operation, and the low-level feature map is adjusted to the same size as the high-level feature map through downsampling operation; Cross-level feature maps after scale matching are executed mutual attention calculation, and the correlation weight between different levels of features is obtained by matrix multiplication; The spatial attention weight of each level is element-level multiplied with the cross-level mutual attention weight to obtain the comprehensive attention weight of the current level feature map; The feature map of the corresponding level is weighted and scaled by the comprehensive attention weight of each level, and all the cross-level feature maps after weighting processing are spliced in the channel dimension, the channel number is unified through 1x1 convolution, and high-dimensional fusion features are formed.

[0007] Optionally, in the third implementation manner of the first aspect of the present application, the input image is processed by a dynamic adversarial data enhancement strategy to generate adversarial samples, and the adversarial samples and the style transfer image jointly constitute an enhanced data set, including: The parameter configuration of the dynamic adversarial data enhancement strategy is initialized, including the initial step of the adversarial disturbance, the disturbance range threshold, and the target style library of style transfer; The projection gradient descent algorithm is adopted to generate the adversarial sample, the disturbance step is adaptively adjusted according to the noise level of the original image, and the gradient direction of the image pixel is adjusted; The original image is taken as input, a style image suitable for the scene is selected from the target style library, the texture and tone features of the target style image are transferred through the adversarial training of the generator and the discriminator, and a style transfer image is generated. The generated adversarial sample and style transfer image are obtained, and after processing, they are combined with the original image to obtain an enhanced data set.

[0008] Optionally, in the fourth implementation manner of the first aspect of the present application, the hierarchical transfer learning framework is adopted, the source domain pre-training model parameters are initialized based on meta-learning, and the feature mapping relationship between the source domain and the target domain is learned through the domain self-adaptive network, including: The images in the enhanced data set are preprocessed, including image normalization, size adjustment and label format conversion, to construct the source domain data set and the target domain data set; The pre-training optimization model parameters of the source domain data set are optimized by using the meta-learning algorithm, the construction of the source domain pre-training model is completed, and a pre-training model is obtained. The parameters of the pre-training model are taken as initial values and imported into the base model of the hierarchical transfer learning framework to construct an adversarial domain self-adaptive network, the domain self-adaptive features are generated by the generator, the discriminator is used to distinguish the domain to which the features belong, and the feature distribution difference between the source domain and the target domain is minimized through adversarial training.

[0009] Optionally, in the fifth implementation manner of the first aspect of the present application, the uncertainty quantification module is introduced, a probability prediction model is constructed based on a variational autoencoder and a Bayesian Transformer, and an image recognition result and a corresponding confidence index are output, including: The variational autoencoder is trained by using the feature data of the source domain and the target domain, the input features are mapped to the latent variable space by the encoder, the probability distribution law of the features is learned, the features are reconstructed by the decoder, and the model parameters are iteratively optimized to minimize the reconstruction error; The Bayesian Transformer model is constructed, and the Markov chain Monte Carlo sampling method is used to estimate the posterior distribution of the parameters; The high-dimensional fusion features output by the multi-scale feature extraction network are input into the trained variational autoencoder to obtain the probability distribution representation of the features, and then input into the Bayesian Transformer model, and the cognitive uncertainty index and the accidental uncertainty index are respectively output through the prediction calculation of multiple groups of parameter samples.

[0010] The cognitive uncertainty index and the accidental uncertainty index are weighted and fused based on preset weight coefficients, the final prediction confidence is determined according to the fusion result, the category result of image recognition is output, and output information containing the recognition result and the confidence index is formed.

[0011] Optionally, in a sixth implementation manner of the first aspect of the present application, the lightweight sub-model obtained from the cloud global model through knowledge distillation is deployed on the edge device, the model updates of the edge devices are aggregated in the cloud, the federated learning algorithm based on differential privacy is used for incremental learning, and the updated knowledge is regularly issued to the edge model, including: The parameter updates of the edge devices are received by using the horizontal federated learning framework, the Laplace noise is added in the parameter aggregation process for differential privacy protection, the global parameter update amount is calculated by using the secure aggregation algorithm, the incremental learning of the global model is completed, and the updated model knowledge is issued to the edge devices for synchronous update of the edge model.

[0012] The second aspect of the present application provides a computer image recognition system based on machine learning, which comprises: A construction module is configured to fuse a convolutional neural network and an adaptive attention mechanism to construct a multi-scale feature extraction network. A processing module is configured to use a dynamic adversarial data enhancement strategy to process input images to generate adversarial samples, and to jointly form an enhanced data set with style transfer images. A mapping module is configured to use a hierarchical transfer learning framework to initialize source domain pre-training model parameters based on meta-learning, and to learn the feature mapping relationship between the source domain and the target domain through a domain adaptation network. An output module is configured to introduce an uncertainty quantification module, construct a probability prediction model based on a variational autoencoder and a Bayesian Transformer, and output image recognition results and corresponding confidence indicators. An update module is configured to deploy a lightweight sub-model obtained from a cloud global model through knowledge distillation on an edge device, aggregate model updates of the edge devices in the cloud, use a federated learning algorithm based on differential privacy for incremental learning, and regularly issue updated knowledge to the edge model.

[0013] The third aspect of the present application provides a computer image recognition device based on machine learning, which comprises a memory and at least one processor, the memory stores instructions, and the at least one processor calls the instructions in the memory to make the computer image recognition device based on machine learning execute the steps of the computer image recognition method based on machine learning.

[0014] The fourth aspect of the present application provides a computer readable storage medium, which stores instructions for implementing each step of the machine learning-based computer image recognition method according to any one of the above aspects when executed by a processor.

[0015] In the technical solution provided by the present application, the convolutional neural network and the adaptive attention mechanism are fused to construct a multi-scale feature extraction network; a dynamic adversarial data enhancement strategy is used to process input images to generate adversarial samples, which are combined with style transfer images to form an enhanced data set; a hierarchical transfer learning framework is used to initialize the source domain pre-training model parameters based on meta-learning, and to learn the feature mapping relationship between the source domain and the target domain through the domain adaptation network; an uncertainty quantification module is introduced to construct a probability prediction model based on the variational autoencoder and the Bayesian Transformer, and to output the image recognition result and the corresponding confidence index; a lightweight sub-model obtained from the cloud global model through knowledge distillation is deployed on the edge device, the model updates of each edge device are aggregated on the cloud, the federated learning algorithm based on differential privacy is used for incremental learning, and the updated knowledge is regularly issued to the edge model; the present application significantly improves the image recognition performance and practicability, the multi-scale feature extraction network strengthens the multi-scale feature correlation and key region capture, and improves the recognition accuracy; the dynamic adversarial data enhancement combined with the style transfer greatly enhances the robustness of the model in complex scenes; the hierarchical transfer learning framework optimizes the initialization parameters based on meta-learning, and cooperates with the domain adaptation network to effectively solve the small sample target domain adaptation and overfitting problem; the uncertainty quantification module outputs the confidence based on the variational autoencoder and the Bayesian Transformer, which meets the decision-making needs in high-risk scenarios; the edge device realizes lightweight deployment through knowledge distillation to ensure real-time performance, and the cloud aggregates updates based on the federated learning algorithm based on differential privacy, which takes into account model iteration and data security, and expands the technical application range as a whole, and can stably serve the core fields such as medical treatment and remote sensing. BRIEF DESCRIPTION OF DRAWINGS

[0016] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are intended to only illustrate preferred embodiments and are not considered limiting of the present application.

[0017] Figure 1 A flowchart of the machine learning-based computer image recognition method provided for the embodiments of the present application; Figure 2 A structural schematic diagram of the machine learning-based computer image recognition system provided for the embodiments of the present application; Figure 3 A structural schematic diagram of the machine learning-based computer image recognition device provided for the embodiments of the present application. DETAILED DESCRIPTION

[0018] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-mentioned drawings, if any, are used to distinguish between similar objects, and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that data so used can be interchanged, where appropriate, so that the embodiments described herein can be carried out in sequences other than those illustrated or described herein. Furthermore, the terms "comprise" or "have" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, article, or apparatus that comprises a list of steps or units not necessarily limited to those specifically listed, but can include additional steps or units not expressly listed or inherent to such process, method, article, or apparatus.

[0019] For the convenience of understanding, the specific flow of the embodiments of the present application is described below. Please refer to Figure 1 The flow chart of the computer image recognition method based on machine learning provided by the embodiments of the present application, which specifically comprises the following steps: Step 101, fuse convolutional neural network and adaptive attention mechanism to construct a multi-scale feature extraction network; In this embodiment, a dual-path basic structure of a multi-scale feature extraction network is built to obtain a main path and an auxiliary path, and an original image to be processed is input into the multi-scale feature extraction network; a ResNeXt architecture is deployed in the middle of the main path as a basic unit of a residual block, a grouping number is defined by introducing a cardinality parameter, and after the original image to be processed is converted into a feature map by an initial convolutional layer, the feature map enters a hierarchical structure composed of multiple residual blocks. A grouping convolution mechanism is used in each residual block, the channel dimension of the input feature map is uniformly split according to a preset grouping number, so that each group of channels independently passes through a convolution operation to extract local features, and then the outputs of each group are integrated by channel splicing to retain the multi-group feature information, while the feature distribution is optimized by combining batch normalization and ReLU activation function. With the deepening of the network level, the feature map size is gradually reduced by setting the convolution operation with a step of 2 or the pooling layer, while the channel number is proportionally increased, and after the convolution operation layer by layer, large-scale feature maps containing image detail information, medium-scale feature maps containing local semantics and small-scale feature maps containing global semantics are generated in turn, and finally a multi-scale basic feature map set covering different spatial resolutions and semantic levels is formed; a channel-spatial dual attention module is introduced in the auxiliary path, the importance weight of each feature channel is calculated and weighted by the channel attention submodule, and then the key spatial area in the image is located and its feature expression is strengthened by the spatial attention submodule, and the feature map optimized by the dual attention is output; the multi-scale basic feature maps output by the main path and the optimized feature maps output by the auxiliary path are fused at the element level, and a feature pyramid attention mechanism is introduced to associate and weight the different scale feature maps after fusion across levels, and a high-dimensional fusion feature is formed.

[0020] In this embodiment, the different scale feature maps after fusion are sorted and labeled by level according to the scale from large to small, the spatial attention calculation is performed on the feature maps of each level, and the attention weight map with the same size as the feature map is generated by convolution operation; the high-level feature map is adjusted to the same size as the low-level feature map by upsampling operation, and the low-level feature map is adjusted to the same size as the high-level feature map by downsampling operation; the cross-level feature maps after scale matching are subjected to mutual attention calculation, and the association weight between different levels of features is obtained by matrix multiplication; the spatial attention weight of each level is multiplied with the cross-level mutual attention weight at the element level to obtain the comprehensive attention weight of the current level feature map; the feature map of the corresponding level is weighted and scaled by the comprehensive attention weight of each level, and all the cross-level feature maps after weighting are spliced by channel dimension, and the channel number is unified by 1x1 convolution to form a high-dimensional fusion feature.

[0021] Step 102, using a dynamic adversarial data augmentation strategy to process the input image to generate adversarial samples, and together with the style transfer image to form an enhanced data set; In this embodiment, the parameter configuration of the dynamic adversarial data augmentation strategy is initialized, including the initial step of adversarial disturbance, the disturbance range threshold, and the target style library of style transfer; the projection gradient descent algorithm is used to generate adversarial samples, the disturbance step is adaptively adjusted according to the noise level of the original image, and the gradient direction of the image pixels is adjusted; the original image is taken as input, a style image suitable for the scene is selected from the target style library, the texture and tone features of the target style image are transferred through the adversarial training of the generator and the discriminator, and a style transfer image is generated; the generated adversarial samples and style transfer images are obtained, merged after processing, and an enhanced data set is obtained.

[0022] In this embodiment, when initializing the parameter configuration of the dynamic adversarial data augmentation strategy, the initial step of adversarial disturbance is first preset based on the scene type of the input image, the disturbance range threshold is determined according to the signal-to-noise ratio of the image, to ensure that the pixel value after disturbance does not exceed the reasonable pixel interval of the original image, and for the target style library of style transfer, it needs to be constructed according to the scene characteristics, for example, the medical scene contains image styles under different devices and different lighting conditions, and the remote sensing scene contains image styles under different seasons and different atmospheric conditions, and at least 50 typical style images are stored under each style category to ensure the diversity of style transfer. The loss function gradient of the original image under the current model is calculated to determine the gradient direction that can maximize the model classification error; then the noise level of the original image is analyzed by the noise detection module, if the noise level is high, the initial step is reduced by 30%-50%, if the noise level is low, the step is kept or slightly increased; then the pixels of the image are adjusted point by point along the gradient direction, after each adjustment, it is checked whether the pixel value exceeds the preset disturbance range threshold, if it exceeds, it is projected back to the threshold boundary, and the adjustment process is repeated for 3-10 rounds until the adversarial sample that meets the disturbance constraint is generated; When the original image is taken as input for style transfer, the content features of the original image are first extracted by the content feature extractor, and the style image suitable for the scene of the input image is selected from the target style library, and its style features are extracted by the style feature extractor; the generator receives the content features of the original image and the style features of the target style, generates fusion features through the cross-layer feature fusion module; the discriminator distinguishes the image output by the generator from the target style image, the generator optimizes the style similarity of the generated image through adversarial loss, and at the same time, the content consistency of the generated image and the original image is constrained through content loss, after 50-200 rounds of adversarial training, the style transfer image that retains the original content and has the texture and tone features of the target style is output; After obtaining the generated adversarial examples and style transfer images, the two types of images are first standardized, including unifying image size, adjusting pixel value distribution, and correcting possible edge distortion. Then, the augmented samples are assigned label information consistent with the original images to ensure the correspondence between the labels and the image content. Finally, the three types of images are merged according to a preset ratio, and the sample arrangement bias is eliminated by randomly shuffling the order. Finally, an augmented dataset containing diverse scene features is constructed.

[0023] Step 103: Using a hierarchical transfer learning framework, the parameters of the pre-trained model in the source domain are initialized based on meta-learning, and the feature mapping relationship between the source domain and the target domain is learned through a domain adaptive network; In this embodiment, preprocessing operations are performed on the images in the augmented dataset, including image normalization, resizing, and label format conversion, to construct source domain datasets and target domain datasets. A meta-learning algorithm is used to pre-train and optimize the model parameters of the source domain dataset, completing the construction of the source domain pre-trained model and obtaining the pre-trained model. The parameters of the pre-trained model are used as initial values ​​and imported into the basic model of the hierarchical transfer learning framework to construct an adversarial domain adaptive network. Domain adaptive features are generated through a generator, and a discriminator is used to distinguish the domain to which the features belong. The feature distribution difference between the source domain and the target domain is minimized through adversarial training.

[0024] Step 104: Introduce the uncertainty quantification module, construct a probabilistic prediction model based on variational autoencoder and Bayesian Transformer, and output the image recognition results and corresponding confidence index. In this embodiment, a variational autoencoder is trained using feature data from the source and target domains. The encoder maps the input features to the latent variable space, learns the probability distribution of the features, and then reconstructs the features using a decoder. The model parameters are iteratively optimized to minimize the reconstruction error. A Bayesian Transformer model is constructed, and the posterior distribution of the parameters is estimated using the Markov chain Monte Carlo sampling method. The high-dimensional fusion features output from the multi-scale feature extraction network are input into the trained variational autoencoder to obtain the probability distribution representation of the features. This representation is then input into the Bayesian Transformer model, and prediction calculations are performed using multiple sets of parameter samples. Cognitive uncertainty and random uncertainty indices are output separately. Based on preset weight coefficients, the cognitive uncertainty and random uncertainty indices are weighted and fused. The final prediction confidence is determined based on the fusion result, and the image recognition category result is output, forming output information containing the recognition result and confidence index.

[0025] Step 105: Deploy lightweight sub-models obtained from the global model in the cloud through knowledge distillation on edge devices. The cloud aggregates model updates from each edge device, uses a differential privacy-based federated learning algorithm for incremental learning, and periodically distributes the updated knowledge to the edge models.

[0026] In this embodiment, a global complex model is trained on a cloud server. This model integrates all the functions of the construction module, processing module, mapping module, and output module. A large-scale aggregated dataset is used to fully train the model, ensuring its performance meets preset standards. A knowledge distillation algorithm is employed to transfer knowledge from the global model to a lightweight model. The output of the global model is used as a soft label, combined with the hard labels of the original data, to train the simplified lightweight model. Channel pruning and quantization compression are used to further optimize the model size, generating an edge-adapted model. The lightweight model is deployed to various edge devices. These devices use locally acquired image data to locally train the model, recording the model parameter updates and periodically uploading the encrypted parameter update information to the cloud server. The cloud server uses a horizontal federated learning framework to receive parameter updates from each edge device. Laplacian noise is added during parameter aggregation to achieve differential privacy protection. A secure aggregation algorithm is used to calculate the global parameter update, completing incremental learning of the global model. The updated model knowledge is then distributed to each edge device, achieving synchronous updates of the edge models.

[0027] Please see Figure 2 A schematic diagram of the structure of a machine learning-based computer image recognition system provided in this embodiment of the invention. The system includes: A building block is used to integrate convolutional neural networks and adaptive attention mechanisms to construct a multi-scale feature extraction network; The processing module is used to process the input image using a dynamic adversarial data augmentation strategy to generate adversarial examples, which together with the style transfer image constitute the augmentation dataset. The mapping module is used to adopt a hierarchical transfer learning framework, initialize the parameters of the source domain pre-trained model based on meta-learning, and learn the feature mapping relationship between the source domain and the target domain through a domain adaptive network. The output module is used to introduce the uncertainty quantification module, build a probabilistic prediction model based on variational autoencoder and Bayesian Transformer, and output the image recognition results and the corresponding confidence index. The update module is used to deploy lightweight sub-models obtained from the global model in the cloud through knowledge distillation on edge devices. The cloud aggregates model updates from various edge devices, uses a differential privacy-based federated learning algorithm for incremental learning, and periodically distributes the updated knowledge to the edge models.

[0028] Figure 3This is a schematic diagram of the structure of a machine learning-based computer image recognition device 300 provided in an embodiment of the present invention. The machine learning-based computer image recognition device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the machine learning-based computer image recognition device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the machine learning-based computer image recognition device 300 to implement the method provided in the above embodiment.

[0029] The machine learning-based computer image recognition device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The structure of the machine learning-based computer image recognition device shown does not constitute a limitation on the computer device provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0030] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the various steps of the machine learning-based computer image recognition method provided in the above embodiments.

[0031] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0032] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0033] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A computer image recognition method based on machine learning, characterized in that, The method includes the following steps: A multi-scale feature extraction network is constructed by integrating convolutional neural networks and adaptive attention mechanisms; A dynamic adversarial data augmentation strategy is used to process the input image to generate adversarial examples, which are then combined with style transfer images to form an augmentation dataset. A hierarchical transfer learning framework is adopted, which initializes the parameters of the source domain pre-trained model based on meta-learning, and learns the feature mapping relationship between the source domain and the target domain through a domain adaptive network. An uncertainty quantification module is introduced, and a probabilistic prediction model is constructed based on variational autoencoder and Bayesian Transformer to output image recognition results and corresponding confidence index. Deploy lightweight sub-models obtained from the global model in the cloud through knowledge distillation on edge devices. The cloud aggregates model updates from each edge device, uses a differential privacy-based federated learning algorithm for incremental learning, and periodically distributes the updated knowledge to the edge models.

2. The computer image recognition method based on machine learning as described in claim 1, characterized in that, The fusion of convolutional neural networks and adaptive attention mechanisms to construct a multi-scale feature extraction network includes: A dual-path basic structure for a multi-scale feature extraction network is constructed to obtain the main path and auxiliary path. The original image to be processed is then input into the multi-scale feature extraction network. The ResNeXt architecture is deployed in the main path. The original image to be processed is split by grouped convolution. The original image is then subjected to layer-by-layer convolution operation to generate multi-scale basic feature maps at different levels. A dual attention module is introduced into the auxiliary path. First, the importance weight of each feature channel is calculated and weighted by the channel attention submodule. Then, the key spatial regions in the image are located and their feature representation is enhanced by the spatial attention submodule. The output is a feature map optimized by dual attention. The multi-scale basic feature map output by the main path is fused with the optimized feature map output by the auxiliary path at the element level. At the same time, a feature pyramid attention mechanism is introduced to perform cross-level association and weight allocation on the fused feature maps of different scales, forming a high-dimensional fused feature.

3. The computer image recognition method based on machine learning as described in claim 2, characterized in that, The process involves element-wise fusion of the multi-scale basic feature map output by the main path and the optimized feature map output by the auxiliary path. Simultaneously, a feature pyramid attention mechanism is introduced to perform cross-level association and weight allocation on the fused feature maps of different scales, forming a high-dimensional fused feature, including: The fused feature maps of different scales are sorted from largest to smallest and labeled with levels. Spatial attention calculation is performed on the feature maps of each level, and an attention weight map with the same size as the feature map is generated through convolution operation. The high-level feature map is upsampled to the same size as the low-level feature map, and the low-level feature map is downsampled to the same size as the high-level feature map. Perform mutual attention calculation on the scale-matched cross-level feature maps, and obtain the association weights between features at different levels through matrix multiplication; The spatial attention weights of each level are multiplied element-wise with the cross-level mutual attention weights to obtain the comprehensive attention weights of the feature map at the current level. The feature maps of the corresponding levels are weighted and scaled using the comprehensive attention weights of each level. All weighted cross-level feature maps are then concatenated according to the channel dimension, and the number of channels is unified through 1×1 convolution to form high-dimensional fusion features.

4. The computer image recognition method based on machine learning as described in claim 1, characterized in that, The method employs a dynamic adversarial data augmentation strategy to process the input image, generating adversarial examples, which, together with the style transfer image, constitute an augmentation dataset, including: Initialize the parameter configuration of the dynamic adversarial data augmentation strategy, including the initial step size of the adversarial perturbation, the perturbation range threshold, and the target style library for style transfer; Adversarial examples are generated using the projection gradient descent algorithm. The perturbation step size is adaptively adjusted according to the noise level of the original image, and the gradient direction of the image pixels is adjusted. The original image is used as input. Style images that fit the scene are selected from the target style library. The texture and tone features of the target style image are transferred through adversarial training between the generator and the discriminator to generate a style transfer image. The generated adversarial examples and style transfer images are obtained, processed, and then merged with the original images to obtain the augmented dataset.

5. The computer image recognition method based on machine learning as described in claim 1, characterized in that, The hierarchical transfer learning framework is adopted, which initializes the pre-trained model parameters of the source domain based on meta-learning, and learns the feature mapping relationship between the source domain and the target domain through a domain adaptive network, including: Preprocessing operations are performed on the images in the augmented dataset, including image normalization, resizing, and label format conversion, to construct the source domain dataset and the target domain dataset; The meta-learning algorithm is used to pre-train and optimize the model parameters on the source domain dataset, thereby completing the construction of the source domain pre-trained model and obtaining the pre-trained model. The parameters of the pre-trained model are used as initial values ​​and imported into the base model of the hierarchical transfer learning framework to construct an adversarial domain adaptive network. The generator generates domain adaptive features, the discriminator distinguishes the domain to which the features belong, and the adversarial training minimizes the feature distribution difference between the source domain and the target domain.

6. The computer image recognition method based on machine learning as described in claim 1, characterized in that, The introduced uncertainty quantification module constructs a probabilistic prediction model based on a variational autoencoder and a Bayesian Transformer, outputting image recognition results and corresponding confidence indices, including: A variational autoencoder is trained using feature data from the source and target domains. The encoder maps the input features to the latent variable space, learns the probability distribution of the features, and then reconstructs the features through the decoder. The model parameters are iteratively optimized to minimize the reconstruction error. A Bayesian Transformer model is constructed, and the posterior distribution of the parameters is estimated using the Markov chain Monte Carlo sampling method. The high-dimensional fusion features output by the multi-scale feature extraction network are input into the trained variational autoencoder to obtain the probability distribution representation of the features. Then, the features are input into the Bayesian Transformer model, and prediction calculations are performed through multiple sets of parameter samples to output cognitive uncertainty index and accidental uncertainty index respectively. Based on preset weighting coefficients, cognitive uncertainty indicators and accidental uncertainty indicators are weighted and fused. The final prediction confidence is determined according to the fusion result, and the image recognition category result is output, forming output information that includes recognition results and confidence indicators.

7. The computer image recognition method based on machine learning as described in claim 1, characterized in that, The process involves deploying lightweight sub-models obtained from the global model in the cloud through knowledge distillation on edge devices, aggregating model updates from each edge device in the cloud, performing incremental learning using a differential privacy-based federated learning algorithm, and periodically distributing the updated knowledge to the edge models, including: A horizontal federated learning framework is adopted to receive parameter updates from each edge device. Laplacian noise is added during the parameter aggregation process for differential privacy protection. The global parameter update is calculated through a secure aggregation algorithm to complete the incremental learning of the global model. The updated model knowledge is then distributed to each edge device for synchronous updating of the edge model.

8. A computer image recognition system based on machine learning, characterized in that, The system includes: A building block is used to integrate convolutional neural networks and adaptive attention mechanisms to construct a multi-scale feature extraction network; The processing module is used to process the input image using a dynamic adversarial data augmentation strategy to generate adversarial examples, which together with the style transfer image constitute the augmentation dataset. The mapping module is used to adopt a hierarchical transfer learning framework, initialize the parameters of the source domain pre-trained model based on meta-learning, and learn the feature mapping relationship between the source domain and the target domain through a domain adaptive network. The output module is used to introduce the uncertainty quantification module, build a probabilistic prediction model based on variational autoencoder and Bayesian Transformer, and output the image recognition results and the corresponding confidence index. The update module is used to deploy lightweight sub-models obtained from the global model in the cloud through knowledge distillation on edge devices. The cloud aggregates model updates from various edge devices, uses a differential privacy-based federated learning algorithm for incremental learning, and periodically distributes the updated knowledge to the edge models.

9. A computer image recognition device based on machine learning, characterized in that, The machine learning-based computer image recognition device includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the machine learning-based computer image recognition device to perform the various steps of the machine learning-based computer image recognition method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the steps of the machine learning-based computer image recognition method as described in any one of claims 1-7.

Citation Information

Cited By

  • Lightweight real-time image recognition system and method for intelligent terminal

    CN122019202A