Image recognition method and system
Patent Information
- Application Number
- CN202310009782.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-01-04
AI Technical Summary
In existing technologies, image fidelity detection using federated learning is complex and has low accuracy, making it difficult to effectively utilize medical data for secure medical data analysis and simulation.
By training a target generative adversarial network (GAN) using a public dataset, and optimizing the image recognition method based on similarity and gradient-free optimization algorithms, the accuracy of reproducibility detection is improved while reducing detection complexity.
It improves the accuracy of image fidelity detection, reduces detection complexity, and enables efficient medical data analysis and simulation under data protection.
Smart Images

Figure CN116091891B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image recognition method and system. Background Technology
[0002] The healthcare industry is driving digital transformation, resulting in the systematic accumulation of vast amounts of medical data. However, the difficulty in accessing this data remains a major challenge for clinical research in various medical institutions. On the one hand, medical data involves patients' privacy information; on the other hand, the cumulative sample size of a single medical institution is limited, insufficient to support evidence-based research in modern medicine. Federated learning, on the other hand, can securely utilize and develop data resources, enabling secure statistical analysis, medical simulation, and prediction of medical data under data protection. This will bring creative changes to clinical diagnosis and treatment, drug development, health monitoring, and public health, continuously unlocking and releasing the value of data.
[0003] Existing technologies mainly employ methods such as blockchain combined with federated learning and federated learning fusion (e.g., using neural network vectors, collaborative mechanisms, etc.) to reconstruct and detect the fidelity of medical images in federated learning. The blockchain combined with federated learning method requires the fusion of federated learning and blockchain, which is relatively complex to implement. The image fidelity detection method fused with federated learning has low accuracy. Summary of the Invention
[0004] The image recognition method and system provided by this invention are used to solve the problems of complex implementation and low accuracy of image restoration detection using federated learning in the prior art. They can improve the accuracy of restoration detection of the original image and reduce the implementation complexity of image restoration detection using federated learning.
[0005] The present invention provides an image recognition method, comprising:
[0006] Based on the similarity between the target image and each image in the public dataset, the first image that is similar to the target image is determined. The target image is obtained by processing the original image based on federated learning.
[0007] The first image is input into the target generative adversarial network (GAN), and the target GAN is output as a recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0008] According to an image recognition method provided by the present invention, determining a first image similar to the target image among the images based on the similarity between the target image and each image in a public dataset includes:
[0009] Obtain the second image among all images that has the highest similarity to the target image;
[0010] The first image is obtained based on the second image.
[0011] According to an image recognition method provided by the present invention, the step of obtaining the first image based on the second image includes:
[0012] If the function used in the federated learning is a linear function, the second image is used as the first image;
[0013] When the function used in the federated learning is a nonlinear function, the second image is optimized based on a gradient-free optimization algorithm, and the optimized second image is used as the first image.
[0014] According to an image recognition method provided by the present invention, when the function used in the federated learning is a nonlinear function, the step of optimizing the second image based on a gradient-free optimization algorithm and using the optimized second image as the first image includes:
[0015] The second image is optimized based on the Bayesian optimization algorithm and / or the covariance matrix adaptive algorithm, and the optimized second image is used as the first image.
[0016] According to an image recognition method provided by the present invention, the method for acquiring the target image includes:
[0017] The original image is processed based on the federated learning to obtain a third image;
[0018] The third image is divided into blocks to obtain the fourth image;
[0019] The fourth image is then labeled to obtain the fifth image;
[0020] The fifth image is optimized using a seed optimization algorithm to obtain the target image.
[0021] According to an image recognition method provided by the present invention, the step of optimizing the fifth image based on a seed optimization algorithm to obtain the target image includes:
[0022] The fifth image is optimized using a global optimality optimization algorithm and a particle swarm optimization algorithm to obtain the target image.
[0023] The present invention also provides an image recognition system, comprising: a data acquisition module and an image recognition module;
[0024] The data acquisition module determines the first image that is similar to the target image among the images based on the similarity between the target image and each image in the public dataset. The target image is obtained by processing the original image based on federated learning.
[0025] The image recognition module is used to input the first image into the target generative adversarial network (GAN) and output the recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0026] The present invention also provides an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the image recognition method as described above.
[0027] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image recognition method as described above.
[0028] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image recognition method as described above.
[0029] The image recognition method and system provided by this invention utilizes a public dataset to train a GAN, and based on the output of the trained target GAN, identifies a first image similar to the target image after processing the original image using federated learning. By comparing this identification result with the original image, the system can achieve image restoration detection of the original image. Compared with existing image restoration detection methods that use neural network vectors for federated learning, this method improves the accuracy of image restoration detection for federated learning images. Compared with existing image restoration detection methods that use collaborative mechanisms for federated learning images, this method reduces the complexity of image restoration detection for federated learning images. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0031] Figure 1 This is one of the flowcharts illustrating the image recognition method provided by the present invention;
[0032] Figure 2 This is a schematic diagram of the lung image after being segmented according to the present invention;
[0033] Figure 3 This is the second flowchart illustrating the image recognition method provided by the present invention;
[0034] Figure 4This is a schematic diagram of the image recognition system provided by the present invention;
[0035] Figure 5 This is a schematic diagram of the physical structure of the electronic device provided by the present invention. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0037] Figure 1 This is one of the flowcharts illustrating the image recognition method provided by the present invention, such as... Figure 1 As shown, the method includes:
[0038] Step 110: Based on the similarity between the target image and each image in the public dataset, determine the first image among the images that is similar to the target image. The target image is obtained by processing the original image based on federated learning.
[0039] Step 120: Input the first image into the target generative adversarial network (GAN) and output the recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0040] It should be noted that the above method can be implemented by computer equipment.
[0041] Optionally, the target image can specifically refer to the image obtained after processing the original image using federated learning. The original image can specifically be a medical image of a patient, or more specifically, an image of the patient's lungs, eyes, etc. The public dataset can specifically be a collection of images with the same features as the original image. For example, when the original image is a lung image, the public dataset can be a lung image dataset; when the original image is an eye image, the public dataset can be an eye image dataset.
[0042] With data-related operating entities facing stricter regulations, the premise for enterprises and various institutions or individuals to reasonably and legally mine the value of data is to ensure data privacy protection. In the current era, data is regarded as an asset, and what is transferred among the participants is the right to use it. To achieve the transfer of usage rights while ensuring data ownership, it is necessary to ensure that the data is usable but not visible to each participant. The traditional model currently widely used involves at least one party leaving the data repository, which poses a risk of leakage.
[0043] Privacy-preserving computation refers to a set of technologies that enable data analysis and computation while protecting the data itself from external disclosure, achieving the goal of making the data "usable but not visible." It aims to transform and release the value of data while fully protecting data and privacy. Key technologies for privacy-preserving computation can be divided into three categories: federated learning, multi-party secure computation, and privacy-preserving computation technologies based on trusted hardware, represented by trusted execution environments.
[0044] The image recognition invention provided by this invention uses federated learning to process the original image in order to protect data security.
[0045] Optionally, the similarity can be specifically the cosine similarity between the target image and each image in the public dataset. By calculating the cosine similarity between the target image and each image in the public dataset, the first image similar to the target image is found.
[0046] The formula for calculating the cosine similarity is as follows:
[0047]
[0048] Where similarity represents cosine similarity, and A and B are the vector representations of the target image and any image in the public dataset, respectively, A = (a1, a2, ..., a...). n B = (b1, b2, ..., b) n ).
[0049] Specifically, the target image and any image in the public dataset are resized to the same size to obtain grayscale histograms of both images. The target image and any image in the public dataset are then divided into regions; for example, each region can be divided into 3 or 5 equal grayscale levels. The sum of the 3 or 5 values in each region is then calculated to obtain a value, which is used as the vector representation of both the target image and any image in the public dataset. The cosine similarity between these two vectors is calculated to determine the similarity between the target image and any image in the public dataset, thus finding the first image similar to the target image.
[0050] Optionally, the target generative adversarial network (GAN) can be specifically obtained by training a generative adversarial network (GAN) on a public dataset, specifically:
[0051] By using a Generative Adversarial Network (GAN) pre-trained on a public dataset as a prior model, the representation of the gradient of the real medical image (i.e., the original image) is found in the space of the GAN, thereby improving the quality of the recognition results of the reconstructed target image (e.g., medical image).
[0052] During the training process, when working together with the parties in federated learning to complete the training task of the Generative Adversarial Network (GAN), the terminal that plays a leading role in federated learning needs to train an additional adversarial network. The generator in this network is used to imitate samples in the public dataset, while the discriminator helps to improve the results of the reconstructed images. This continuously improves the degree of restoration between the images reconstructed by the generator, such as medical images, and the original images.
[0053] Compared with existing methods that rely solely on gradient information to reconstruct data, this invention utilizes a target generative adversarial network (GAN) learned from images in public datasets (e.g., medical images such as lung images and eye images) to compensate for the loss of gradient information in medical images during the gradient degradation process.
[0054] This generative adversarial network (GAN) can specifically include a generator neural network and a discriminator neural network:
[0055] minmaxV(D,G)=EX~pdata(x)[logD(x)]+EZ~pz(z)[log(1-D(G(z)))]
[0056] The objective function of a Generative Adversarial Network (GAN) is V(D,G). In the generator G(z) and discriminator D(x), E represents entropy, and X ~ pdata(x) represents the distribution of x from pdata, which is the "real data (i.e., the original image)". In the discriminator D(x), E represents the mathematical expectation of the real data x and the noise data Z. The real data distribution is approximated by fitting the noise data distribution pz(z). Taking the logarithm of the data does not change the relative relationship between the data. Due to the monotonicity of the log function, the log can be used to amplify the loss, which is convenient for calculation and optimization.
[0057] Optionally, the obtained first image is input into the target generative adversarial network (GAN), and the recognition result of the first image is output. Based on the recognition result and the original image, the restoration degree of the original image after federated learning can be detected. Specifically, the restoration degree of the original image can be determined according to the cosine similarity between the recognition result and the original image. The greater the cosine similarity between the two, the higher the restoration degree of the original image, and vice versa.
[0058] The image recognition method provided by this invention trains a GAN using a public dataset and outputs a recognition result for a first image similar to the target image after the original image has been processed using federated learning, based on the output of the trained target GAN. By comparing this recognition result with the original image, the method can achieve image restoration detection of the original image. Compared with the existing image restoration detection method that uses neural network vectors for federated learning, this method improves the accuracy of image restoration detection for images processed by federated learning. Compared with the existing image restoration detection method that uses a collaborative mechanism for federated learning, this method reduces the complexity of image restoration detection for images processed by federated learning.
[0059] Further, in one embodiment, determining a first image similar to the target image among the images based on the similarity between the target image and each image in the public dataset includes:
[0060] Obtain the second image among all images that has the highest similarity to the target image;
[0061] The first image is obtained based on the second image.
[0062] Optionally, the vector representations of the target image and each image in the public dataset are obtained, and the cosine similarity between each image in the public dataset and the target image is calculated. The image with the highest cosine similarity to the target image (i.e., the second image) is then found from among the images.
[0063] Based on the second image, a first image similar to the target image is obtained. This first image is the one whose gradient information is closest to that of the target image, and mining the gradient information of this first image helps to improve the quality of the reconstructed image.
[0064] For example, find a first image that is similar to the reconstructed medical image, use the distance between the transformation gradients of the training reconstructed medical image to generate the gradient changes of the reconstructed medical image and the observed medical image, and calculate the distance metric gradient matching loss.
[0065] The gradient matching loss is calculated using a distance metric, specifically through cosine similarity. Based on the grayscale histograms of the medical images and images in the public dataset, the images in the medical images and the public dataset are converted into vector representations. The cosine similarity between the medical images and each image in the public dataset is calculated using the cosine value between the two vectors.
[0066] Further, in one embodiment, obtaining the first image based on the second image includes:
[0067] If the function used in the federated learning is a linear function, the second image is used as the first image;
[0068] When the function used in the federated learning is a nonlinear function, the second image is optimized based on a gradient-free optimization algorithm, and the optimized second image is used as the first image.
[0069] Further, in one embodiment, when the function used in the federated learning is a nonlinear function, optimizing the second image based on a gradient-free optimization algorithm and using the optimized second image as the first image includes:
[0070] The second image is optimized based on the Bayesian optimization algorithm and / or the covariance matrix adaptive algorithm, and the optimized second image is used as the first image.
[0071] Optionally, if the function used in federated learning is a simple linear function, using the second image with the highest cosine similarity to the target image as the first image can significantly improve the quality of the reconstructed image. However, if the function used in federated learning is nonlinear, it often presents challenges. To address the issue of nonlinear functions in federated learning, a gradient-free optimization algorithm is needed to optimize the second image, and the optimized second image is then used as the first image similar to the target image.
[0072] This gradient-free optimization algorithm can specifically include Bayesian optimization and covariance matrix adaptive optimization. When optimizing the second image, both algorithms can be used in combination, or either one can be chosen for optimization. For example, Bayesian optimization can be used to optimize the second image. Bayesian optimization is a global computation optimization method that can handle random noise in black-box functions modeled by Gaussian processes, thereby improving the accuracy of image reconstruction detection in federated learning.
[0073] It should be noted that both the Bayesian optimization algorithm and the covariance matrix adaptive algorithm optimize the second image by using the gradient information of the second image.
[0074] The image recognition method provided by this invention finds the second image with the highest cosine similarity between each image in a public dataset and the target image, and finds the first image with the closest gradient information to the target image based on the second image. The first image is then input into the target GAN to obtain the recognition result of the first image. Based on the recognition result, the method compares it with the original image to achieve the restoration degree detection of the original image and improve the accuracy of the restoration degree detection of the original image.
[0075] Furthermore, in one embodiment, the method for acquiring the target image may specifically include:
[0076] The original image is processed based on the federated learning to obtain a third image;
[0077] The third image is divided into blocks to obtain the fourth image;
[0078] The fourth image is then labeled to obtain the fifth image;
[0079] The fifth image is optimized using a seed optimization algorithm to obtain the target image.
[0080] Optionally, the federated learning mechanism works as follows: client terminals download existing prediction models from a central server, train these models using local data, and upload updated prediction models to the cloud. During training, the prediction model updates from different client terminals are merged to optimize the model. Each client terminal then downloads the updated prediction model back to its local machine. This process is repeated continuously. Throughout this process, the client terminal's data remains locally stored, eliminating the risk of data leakage. Machine learning models collaboratively built using federated learning exhibit virtually no performance loss compared to those obtained through centralized training.
[0081] After processing the original image using federated learning, a third image is obtained. This third image is then divided into blocks to obtain a fourth image. Specifically, the third image is divided into several regions, i.e., the image is segmented into several image blocks. Each image block is treated as a view and used for subsequent tasks related to medical image reconstruction in the federated learning scenario. The segmentation rule can be random segmentation or segmentation based on the differences in organ locations and lesion areas in the patient's medical image. This invention does not impose a specific limitation on this.
[0082] For example, Figure 2 This is a schematic diagram of the lung image segmentation provided by the present invention, as shown below. Figure 2 As shown, the lung image is divided into 9 regions using a 3x3 grid. The reason for dividing the lung image into blocks is mainly because most organs are in similar locations, and only the areas with lesions show differences between individuals.
[0083] Optionally, the fourth image is labeled to obtain the fifth image, specifically:
[0084] To assess the accuracy of reconstructed medical images in federated learning, the first step is to attempt to recover the images' labels. Federated learning often uses deep learning models for joint modeling and learning. A label restoration method is employed to recover batch labels from the gradients of fully connected classification layers, thus restoring the labels of the medical images in federated learning. For example, in tasks such as medical image classification, samples in medical images can be recovered from batch gradients in Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs), as shown in the following equation.
[0085]
[0086] Where y1 is the label of the restored image after label restoration; index represents the index value of the data returned after sorting the data from smallest to largest; w is the batch average weight, a "synthetic" input batch initialized with random noise and optimized towards the ground truth; c is the number of color channels, b is the number of embedded features, a is the number of target classes, and N is the ground truth gradient of the Nth layer, traversing all layers. x is the fourth image, y is the intended label of the fourth image, and h is the batch size. The N() function strengthens the gradient of the synthetic data (for the original loss of the network with weights w) to match the provided gradient.
[0087] Optionally, the fifth image can be optimized. Specifically, a seed optimization algorithm can be used to optimize the fifth image to obtain the target image.
[0088] The optimization process for the fifth image based on this seed optimization algorithm is essentially a consistency regularization process for the fifth image. Because the label restoration process for the fourth image using RNN or CNN suffers from underfitting and overfitting—underfitting occurs when the model fails to fit the characteristics of the function well, while overfitting occurs when the function fits the model too well, leading to excessive focus on the details of each data point while neglecting the overall features of the data—consistency regularization can solve the overfitting and underfitting problems in the model.
[0089] This consistency regularization process specifically improves the quality of reconstructed medical images by simultaneously utilizing multiple seed optimization algorithms through co-optimization to optimize the input to match the target gradient. The co-optimization method uses the same loss hyperparameter but provides different random seeds for pixel-level initialization of the medical images. Each optimization loop finds a local minimum, assigning semantically correct medical image features across all levels. Consistency regularization (which ensures the model produces the same output distribution when the input is perturbed, i.e., small perturbations to the input should not change the model's output) is used to regularize all inputs simultaneously. By mixing information and feedback from all seeds in the group, the pixel mean of the medical images is improved.
[0090] An improvement is achieved by iteratively updating the input reconstructed medical image. Pixel-level random Gaussian noise is added in each update to increase diversity and further narrow the gap between the reconstructed medical image and the original image.
[0091] A simple consistency regularization method is to add noise during the training of the neural network if you need the RNN or CNN to be insensitive to noise, and then put the noise term into the loss function.
[0092] Further, in one embodiment, optimizing the fifth image based on the seed optimization algorithm to obtain the target image includes:
[0093] The fifth image is optimized using a global optimality optimization algorithm and a particle swarm optimization algorithm to obtain the target image.
[0094] Optionally, the seed optimization algorithm may specifically include a global optimality optimization algorithm and a particle swarm optimization algorithm. When optimizing the fifth image, both the global optimality optimization algorithm and the particle swarm optimization algorithm can be used in combination.
[0095] Federated learning has long been considered an important direction for efficiently solving artificial intelligence computing problems and protecting personal data due to its privacy protection strategy of keeping data within the local environment. However, with the increasing restrictions on data, methods that deduce user data from gradients and model parameters are emerging.
[0096] In many cases, basic information such as images can still be reconstructed using blurred data and parameters from machine learning processing. Gradient-sharing training schemes are not absolutely secure. Although they avoid direct access to user data by a central server, the server can still use gradient attacks to recover the user's local training data from the exchanged parameter gradients. The method involves first randomly generating virtual training data and using it to generate virtual gradients. Then, by repeatedly iterating through gradient descent with the optimization objective of narrowing the gap between the virtual and real gradients, the user's private data can be restored. This type of attack is called gradient leakage or gradient inversion.
[0097] To defend against such gradient attacks (gradient leakage or gradient inversion), some methods suggest that users add noise perturbations or perform lossy transformations on the gradient information before uploading, such as gradient processing, to better ensure information security.
[0098] This invention defends against gradient attacks (gradient leakage or gradient inversion) by adaptively training the target generative adversarial network (GAN). The specific process is as follows:
[0099] Adaptive attacks are attack methods designed to counter the proposed defense mechanisms, employing an attacker's prior knowledge of those mechanisms. The same transformations can be used during the optimization process for adaptive attacks. The attacker's goal is to reveal as much medical image information as possible from the degraded gradients. The attacker may or may not be aware of the client's underlying defense strategies. Adaptive attacks are launched by directly inputting this knowledge or by estimating defense parameters through observed gradients. Furthermore, assuming that knowledge extracted from public datasets (referring broadly to parameters, networks, etc., from defensive experience) can be leveraged to enhance and improve attacks, adaptive attacks are employed. This involves estimating changes (continuous monitoring and analysis are central to adaptive security architecture, referring to analyzing the differences in each attack, such as the different loss function curves used) and incorporating this information into the optimization process of federated learning for medical image reproducibility detection.
[0100] For example, Figure 3 This is a second schematic flowchart of the image recognition method provided by the present invention, as shown below. Figure 3 As shown, this method can specifically include:
[0101] Step 1: Input the medical image corresponding to the original image after federated learning processing;
[0102] Step 2: Divide the medical image into blocks;
[0103] Step 3: Perform label restoration on the segmented medical images;
[0104] Step 4: Perform consistency regularization on the labeled image;
[0105] Step 5: Find the second image with the highest similarity to the image after consistency regularization from all images in the public dataset;
[0106] Step 6: Determine whether the function used in federated learning is a linear function;
[0107] Step 7: If it is a linear function, then input the second image into the target generative adversarial network (GAN).
[0108] Step 8: If it is a nonlinear function, the second image is optimized based on the gradient information of the Bayesian optimization algorithm and / or the covariance adaptive algorithm to obtain the first image, and the first image is input into the target GAN.
[0109] Step 9: Perform adaptive attack training on the target GAN.
[0110] The image recognition method provided by this invention, through methods such as medical image segmentation, label restoration, regularization processing, deep mining of gradient information, target GAN generation, and adaptive attacks, achieves the judgment of the degree of reconstruction of medical images in federated learning. This reduces the manual intervention required in existing methods and improves the quality of medical image reconstruction in federated learning. It can still reconstruct high-quality medical images when faced with low-fidelity and noisy gradient information, thereby detecting the degree of reconstruction of medical images in federated learning. Even with gradient clipping or gradient sparsity processing to better ensure information security and obfuscate data representation, a certain degree of reconstruction effect is still achieved. Unlike existing methods that only rely on gradient information to reconstruct data, this method uses a generative adversarial network learned from a public dataset to compensate for the loss of medical image information during the gradient degradation process. By detecting the degree of reconstruction, the extent of leakage of medical image information in the federated learning scenario can be measured to promote a better joint defense learning mechanism.
[0111] The image recognition system provided by the present invention is described below. The image recognition system described below can be referred to in correspondence with the image recognition method described above.
[0112] Figure 4 This is a schematic diagram of the image recognition system provided by the present invention, such as... Figure 4 As shown, it includes:
[0113] Data acquisition module 410 and image recognition module 411;
[0114] The data acquisition module 410 determines the first image that is similar to the target image among the images based on the similarity between the target image and each image in the public dataset. The target image is obtained by processing the original image based on federated learning.
[0115] The image recognition module 411 is used to input the first image into the target generative adversarial network (GAN) and output the recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0116] The image recognition system provided by this invention trains a GAN using a public dataset and, based on the output of the trained target GAN, identifies the first image obtained after processing the original image using federated learning. By comparing this identification result with the original image, the system can detect the restoration degree of the original image. Compared with existing image restoration degree detection methods that use neural network vectors for federated learning, this system improves the accuracy of restoration degree detection for images undergoing federated learning. Compared with existing image restoration degree detection methods that use collaborative mechanisms for federated learning, this system reduces the complexity of image restoration degree detection for images undergoing federated learning.
[0117] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include a processor 510, a communication interface 511, a memory 512, and a bus 513, wherein the processor 510, the communication interface 511, and the memory 512 communicate with each other via the bus 513. The processor 510 can call logical instructions in the memory 512 to execute the following methods:
[0118] Based on the similarity between the target image and each image in the public dataset, the first image that is similar to the target image is determined. The target image is obtained by processing the original image based on federated learning.
[0119] The first image is input into the target generative adversarial network (GAN), and the target GAN is output as a recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0120] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a 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 power supply (which may be a personal computer, server, or network power supply, 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.
[0121] Furthermore, this invention discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when these instructions are executed by a computer, the computer can perform the image recognition methods provided in the above-described method embodiments, such as including:
[0122] Based on the similarity between the target image and each image in the public dataset, the first image that is similar to the target image is determined. The target image is obtained by processing the original image based on federated learning.
[0123] The first image is input into the target generative adversarial network (GAN), and the target GAN is output as a recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0124] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the image recognition methods provided in the above embodiments, including, for example:
[0125] Based on the similarity between the target image and each image in the public dataset, the first image that is similar to the target image is determined. The target image is obtained by processing the original image based on federated learning.
[0126] The first image is input into the target generative adversarial network (GAN), and the target GAN is output as a recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset.
[0127] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer power supply (which may be a personal computer, server, or network power supply, etc.) to execute the methods described in various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image recognition method, characterized in that, include: Based on the similarity between the target image and each image in the public dataset, obtain the second image that has the highest similarity to the target image among all images; Based on the second image, a first image is obtained, wherein the target image is obtained after processing the original image using federated learning; wherein, obtaining the first image based on the second image includes: if the function used in the federated learning is a linear function, using the second image as the first image; if the function used in the federated learning is a nonlinear function, optimizing the second image based on a Bayesian optimization algorithm and / or a covariance matrix adaptive algorithm, and using the optimized second image as the first image; The first image is input into the target generative adversarial network (GAN), and the recognition result of the first image is output. The target GAN is obtained by training the GAN based on the public dataset. The recognition result is compared with the original image to achieve the restoration degree detection of the original image.
2. The image recognition method according to claim 1, characterized in that, The method for acquiring the target image includes: The original image is processed based on the federated learning to obtain a third image; The third image is divided into blocks to obtain the fourth image; The fourth image is then labeled to obtain the fifth image; The fifth image is optimized using a seed optimization algorithm to obtain the target image.
3. The image recognition method according to claim 2, characterized in that, The optimization of the fifth image based on the seed optimization algorithm to obtain the target image includes: The fifth image is optimized using a global optimality optimization algorithm and a particle swarm optimization algorithm to obtain the target image.
4. An image recognition system, characterized in that, include: Data acquisition module and image recognition module; The data acquisition module is used to acquire the second image with the highest similarity to the target image among all images in the public dataset based on the similarity between the target image and each image in the public dataset, and to acquire the first image based on the second image. The target image is obtained by processing the original image based on federated learning. The step of acquiring the first image based on the second image includes: if the function used in the federated learning is a linear function, using the second image as the first image; if the function used in the federated learning is a nonlinear function, optimizing the second image based on a Bayesian optimization algorithm and / or a covariance matrix adaptive algorithm, and using the optimized second image as the first image. The image recognition module is used to input the first image into the target generative adversarial network (GAN) and output the recognition result of the first image. The target GAN is obtained by training the GAN based on the public dataset. The recognition result is compared with the original image to realize the restoration degree detection of the original image.
5. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the image recognition method according to any one of claims 1 to 3.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the image recognition method as described in any one of claims 1 to 3.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the image recognition method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
A reference human eye image restoration method based on aesthetic evaluation
CN109919830A
Image recognition system and method based on blockchain and federated learning
CN113033652A
