Image processing methods, apparatus, equipment, media and program products
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]本公开提供一种图像处理方法、装置、设备、介质及程序产品,以至少解决现有对图像模糊化处理或者扭曲处理造成图像的真实度较低的问题
Smart Images

Figure CN115423679B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, device, medium, and program product. Background Technology
[0002] To protect privacy information in images, most current practices involve blurring or distorting key features in the image. While this can protect privacy, it reduces the image's realism and the usability of the image data. Summary of the Invention
[0003] This disclosure provides an image processing method, apparatus, device, medium, and program product to at least solve the problem of low image realism caused by existing image blurring or distortion processing. The technical solution of this disclosure is as follows:
[0004] This disclosure provides an image processing method, including:
[0005] Acquire multiple raw images;
[0006] Key features are extracted from each of the original images to obtain first key feature data corresponding to each original image, wherein each first key feature data is data of at least one key feature extracted from each original image;
[0007] The data of the same key feature in the multiple first key feature data corresponding to the multiple original images are exchanged to generate second key feature data corresponding to each original image;
[0008] Replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain a candidate image corresponding to each original image;
[0009] Each candidate image is processed into a virtual image to obtain a target image corresponding to each candidate image.
[0010] Optionally, the step of extracting key features from each of the original images to obtain first key feature data corresponding to each of the original images includes:
[0011] Perform a set region detection on each of the original images to obtain a set region image corresponding to each of the original images;
[0012] Key features are extracted from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
[0013] Optionally, the step of exchanging the data of the same key features among the multiple first key feature data corresponding to the multiple original images to generate second key feature data corresponding to each original image includes:
[0014] The data of the same key feature in the multiple first key feature data corresponding to the multiple original images are combined to obtain the third key feature data corresponding to each key feature;
[0015] Using a preset random algorithm, the third key feature data corresponding to each key feature is randomly swapped to obtain the second key feature data corresponding to each original image.
[0016] Optionally, after performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, the method further includes:
[0017] Each of the original images is labeled to obtain an identifier for each original image;
[0018] Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image;
[0019] Based on the correspondence, the target image corresponding to each candidate image is used to replace the set region image of each original image to obtain a new image corresponding to each original image.
[0020] Optionally, the step of performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image includes:
[0021] Each candidate image is input into a preset adversarial neural network, and the adversarial neural network performs virtual image processing on each candidate image to obtain a target image corresponding to each candidate image.
[0022] Optionally, after performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, the method further includes:
[0023] Using the target image, the image processing model to be trained is trained to obtain the trained image processing model.
[0024] This disclosure also provides an image processing apparatus, including:
[0025] The acquisition module is used to acquire multiple raw images;
[0026] An extraction module is used to extract key features from each of the original images to obtain first key feature data corresponding to each of the original images, wherein each of the first key feature data is data of at least one key feature extracted from each of the original images;
[0027] The exchange module is used to exchange data of the same key feature among the multiple first key feature data corresponding to the multiple original images to generate second key feature data corresponding to each original image.
[0028] The replacement module is used to replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain a candidate image corresponding to each original image.
[0029] The image processing module is used to perform virtual image processing on each of the candidate images to obtain a target image corresponding to each of the candidate images.
[0030] Optionally, when the extraction module extracts key features from each of the original images to obtain the first key feature data corresponding to each original image, it is used to:
[0031] Perform a set region detection on each of the original images to obtain a set region image corresponding to each of the original images;
[0032] Key features are extracted from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
[0033] Optionally, when the exchange module exchanges data of the same key feature among multiple first key feature data corresponding to the multiple original images to generate second key feature data corresponding to each original image, it is used to:
[0034] The data of the same key feature in the multiple first key feature data corresponding to the multiple original images are combined to obtain the third key feature data corresponding to each key feature;
[0035] Using a preset random algorithm, the third key feature data corresponding to each key feature is randomly swapped to obtain the second key feature data corresponding to each original image.
[0036] Alternatively, it can also be used for:
[0037] Each of the original images is labeled to obtain an identifier for each original image;
[0038] Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image;
[0039] Based on the correspondence, the target image corresponding to each candidate image is used to replace the set region image of each original image to obtain a new image corresponding to each original image.
[0040] Optionally, when the image processing module performs virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, it is used to:
[0041] Each candidate image is input into a preset adversarial neural network, and the adversarial neural network performs virtual image processing on each candidate image to obtain a target image corresponding to each candidate image.
[0042] Optionally, after performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, the image processing module may further be used to:
[0043] Using the target image, the image processing model to be trained is trained to obtain the trained image processing model.
[0044] This disclosure also provides an electronic device, including:
[0045] processor;
[0046] Memory used to store the processor's executable instructions;
[0047] The processor is configured to execute the instructions to implement the steps in the above method.
[0048] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the steps of the above-described method.
[0049] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method described above.
[0050] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0051] In some embodiments of this disclosure, multiple original images are acquired, and key features are extracted from each original image to obtain first key feature data corresponding to each original image. Data with the same key features in the multiple first key feature data corresponding to multiple original images are exchanged to generate second key feature data corresponding to each original image. The first key feature data corresponding to each original image is replaced with the corresponding second key feature data to obtain candidate images corresponding to each original image. The candidate images are not real images, thereby protecting the privacy of information in the images. The key features in the candidate images are real image features, which to a certain extent ensures the authenticity of the images and improves the usability of the image data. The candidate images are then virtualized to further protect the privacy of image information.
[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0053] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0054] Figure 1 A schematic flowchart of an image processing method provided for an exemplary embodiment of this disclosure;
[0055] Figure 2 A schematic flowchart of another image processing method provided as an exemplary embodiment of this disclosure;
[0056] Figure 3 A schematic flowchart of another image processing method provided as an exemplary embodiment of this disclosure;
[0057] Figure 4 A structural block diagram of an image processing apparatus provided for an exemplary embodiment of this disclosure;
[0058] Figure 5 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation
[0059] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0060] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0061] Most existing facial recognition methods utilize the following two approaches:
[0062] Method 1: Blur or occlude key areas in the image. Blur methods include performing encryption or other operations on pixels to change their values, thus achieving blurring. However, performing various mathematical operations on pixels is complex and time-consuming. Alternatively, key areas can be occluded. While this protects image privacy, it reduces image realism, making it difficult to visually distinguish fake images, thus lowering image fidelity and usability. Using blurred or occluded images for model training will reduce model accuracy.
[0063] Method 2: Distort key areas in the image. This method detects and identifies key areas in the image, and then deforms these areas. The deformation process is controlled by parameters; greater distortion results in higher privacy protection. However, this method relies on parameters to balance privacy protection and data usability, making it difficult to achieve a satisfactory balance. Furthermore, the distorted image is visually difficult to distinguish from fake images, reducing image realism and data usability. Similarly, using the distorted image for model training will decrease the model's training accuracy.
[0064] Therefore, how to protect the privacy of information in images while ensuring their authenticity has become a crucial issue.
[0065] To address the aforementioned technical problems, in some embodiments of this disclosure, multiple original images are acquired, and key features are extracted from each original image to obtain first key feature data corresponding to each original image. Data with the same key features among the multiple first key feature data corresponding to the multiple original images are exchanged to generate second key feature data corresponding to each original image. The first key feature data corresponding to each original image is then replaced with the corresponding second key feature data to obtain candidate images corresponding to each original image. These candidate images are not real images, thus protecting the privacy of information in the images. The key features in the candidate images are real image features, ensuring the authenticity of the images to a certain extent and improving the usability of the image data. Furthermore, the candidate images are virtualized to further protect the privacy of image information.
[0066] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0067] Figure 1 This is a schematic flowchart illustrating an image processing method provided as an exemplary embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0068] S101: Acquire multiple raw images;
[0069] S102: Extract key features from each original image to obtain the first key feature data corresponding to each original image, wherein each first key feature data is the data of at least one key feature extracted from each original image;
[0070] S103: Exchange the data of the same key feature in the multiple first key feature data corresponding to multiple original images to generate the second key feature data corresponding to each original image;
[0071] S104: Replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain the candidate image corresponding to each original image;
[0072] S105: Perform virtual image processing on each candidate image to obtain the target image corresponding to each candidate image.
[0073] In this embodiment, the above-mentioned image processing method is an image processing device. The image processing device can be one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0074] It should be noted that electronic devices can be any electronic product that can interact with users, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.
[0075] Electronic devices may include network devices and / or user devices. Among them, network devices include, but are not limited to, single network electronic devices, groups of electronic devices consisting of multiple network electronic devices, or cloud computing-based clouds consisting of a large number of hosts or network electronic devices.
[0076] The networks in which electronic devices are located include, but are not limited to: wide area networks (WANs), metropolitan area networks (MANs), local area networks (LANs), and virtual private networks (VPNs).
[0077] It should be noted that the original image refers to either a video or a picture. A video can be multiple videos or a single video; when there are multiple videos, each video can contain multiple different pictures; when there is a single video, each image video includes multiple pictures.
[0078] In this embodiment of the disclosure, multiple original images may exist in one original image or multiple original images. Specifically, one original image may include multiple images; each of the multiple original images may include one image, or each of the multiple original images may include multiple images, or a portion of the multiple original images may include one image, while the remaining portion may include multiple images.
[0079] It should be noted that virtualized image processing refers to the virtualization of real images to obtain non-real images that are visually indistinguishable to the human eye. This application does not limit the method of virtualized image processing; virtualized image processing algorithms or models can be used to obtain non-real images. In one possible implementation, a generative adversarial neural network can be used to perform virtualized image processing on the second key feature data of this application to obtain third key feature data corresponding to multiple original images.
[0080] In this embodiment, multiple original images are acquired, and key features are extracted from each original image to obtain first key feature data corresponding to each original image. Data with the same key features in the multiple first key feature data corresponding to multiple original images are exchanged to generate second key feature data corresponding to each original image. The first key feature data corresponding to each original image is replaced with the corresponding second key feature data to obtain candidate images corresponding to each original image. The candidate images are not real images, thereby protecting the privacy of information in the images. The key features in the candidate images are real image features, which to a certain extent ensures the authenticity of the images and improves the usability of the image data. The candidate images are then virtualized to further protect the privacy of image information.
[0081] The image processing method of this application embodiment is described below in conjunction with the application scenarios. It should be noted that the image processing method of this application embodiment is not limited to the following application scenarios.
[0082] In the above embodiments, key features are extracted from each original image to obtain the first key feature data corresponding to each original image. These key feature extraction methods include, but are not limited to, the following:
[0083] One method for extracting key features involves detecting a defined region in each original image to obtain a defined region image corresponding to each original image; then extracting key features from the defined region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
[0084] The second method for extracting key features involves directly extracting key features from multiple original images to obtain the first key feature data corresponding to each original image.
[0085] It should be noted that each first key feature data is data of at least one key feature extracted from each original image.
[0086] In the above-mentioned key feature extraction method one, a set region extraction model is used to extract set regions from multiple original images to obtain multiple set region images; a key feature detection model is used to detect key features in each of the multiple set region images to obtain the first key feature data corresponding to each original image.
[0087] In the second key feature extraction method described above, key features are directly extracted from multiple original images to obtain the first key feature data corresponding to each original image.
[0088] In the above embodiments, the data of the same key feature in the multiple first key feature data corresponding to multiple original images are exchanged to generate second key feature data corresponding to each original image. One possible approach is to combine the data of the same key feature in the multiple first key feature data corresponding to multiple original images to obtain third key feature data corresponding to each key feature; then, using a preset random algorithm, the third key feature data corresponding to each key feature is randomly exchanged to obtain the second key feature data corresponding to each original image. By using a random algorithm to randomly exchange the third key feature data corresponding to each key feature, the second key feature data corresponding to the original image is not a real feature, thus protecting the privacy of image information.
[0089] It should be noted that each third key feature data is data of the same key feature from multiple original images, and the random algorithm can also be a pre-defined preset rule.
[0090] Through the above implementation method, since multiple first key feature data corresponding to multiple original images are exchanged to form second key feature data corresponding to each original image, multiple original images have undergone key feature image exchange, thus protecting the privacy of image information. In addition, since real key features are used for exchange, the authenticity of subsequent images can be better guaranteed.
[0091] In some embodiments, the first key feature data corresponding to each original image is replaced with the corresponding second key feature data to obtain a candidate image corresponding to each original image. The candidate image is not a real image, thereby protecting the privacy of the image, while the key features in the candidate image are real features, which to a certain extent ensures the authenticity of the image and improves the usability of the image data.
[0092] In the above embodiments, each candidate image undergoes virtual image processing to obtain a target image corresponding to each candidate image. One possible approach is to input each candidate image into a preset adversarial neural network, and then perform virtual image processing on each candidate image through the adversarial neural network to obtain a target image corresponding to each candidate image.
[0093] It's important to note that each candidate image is input into an existing Generative Adversarial Network (GAN). GANs address the problem of generative models in machine learning; given some unlabeled real data, GANs can generate a model whose generated data distribution is consistent with the real data. Furthermore, GANs do not require complex techniques like MCMC or variational Bayes; they only need to run backpropagation or gradient descent algorithms within a corresponding multilayer perceptron. The two models are trained simultaneously through an adversarial process. The generator learns to create seemingly realistic images, while the discriminator learns to distinguish between real and fake images. During training, the generator gradually becomes better at creating seemingly realistic images, while the discriminator becomes better at distinguishing them. The process reaches equilibrium when the discriminator can no longer differentiate between real and fake images.
[0094] In some embodiments of this disclosure, each original image is labeled to obtain an identifier for each original image; a modulo operation is performed on each original image and its identifier to obtain a correspondence between each original image and the target image corresponding to each candidate image; based on the correspondence, a designated region image of each original image is replaced using the target image corresponding to each candidate image to obtain a new image corresponding to each original image. It should be noted that the identifier can be an image number, and this disclosure does not limit the type of modulo operation; modulo operation, for example, hash modulo operation, is used.
[0095] For example, each original image is labeled to obtain an image number for each original image; a modulo operation is performed on any original image and its identifier. If the result is 2, then the original image corresponds to the target image with the sequence number 2. The above modulo operation process is repeated to obtain the correspondence between each original image and the target image corresponding to each candidate image; the target image corresponding to each candidate image is used to replace the set area image of each original image to obtain a new image corresponding to each original image.
[0096] After obtaining multiple target images, these images can be used for model training. One possible approach is to use the target images to train the image processing model to be trained, thus obtaining the trained image processing model.
[0097] Based on the description of the above embodiments, Figure 2 A schematic flowchart of another image processing method provided as an exemplary embodiment of this disclosure. For example... Figure 2 As shown, the method includes:
[0098] S201: Acquire multiple raw images;
[0099] S202: Perform a set region detection on each original image to obtain the set region image corresponding to each original image;
[0100] S203: Extract key features from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image;
[0101] S204: Exchange the data of the same key feature in the multiple first key feature data corresponding to multiple original images to generate the second key feature data corresponding to each original image;
[0102] S205: Replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain the candidate image corresponding to each original image;
[0103] S206: Perform virtual image processing on each candidate image to obtain the target image corresponding to each candidate image.
[0104] In this embodiment, the above-mentioned image processing method is an image processing device. The image processing device can be one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0105] It should be noted that electronic devices can be any electronic product that can interact with users, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.
[0106] Electronic devices may include network devices and / or user devices. Among them, network devices include, but are not limited to, single network electronic devices, groups of electronic devices consisting of multiple network electronic devices, or cloud computing-based clouds consisting of a large number of hosts or network electronic devices.
[0107] The networks in which electronic devices are located include, but are not limited to: wide area networks (WANs), metropolitan area networks (MANs), local area networks (LANs), and virtual private networks (VPNs).
[0108] In this embodiment, the implementation of each step in the above embodiments can be found in the description of the foregoing embodiments, and will not be repeated here.
[0109] Based on the description of the above embodiments, Figure 3 A schematic flowchart of another image processing method provided as an exemplary embodiment of this disclosure. For example... Figure 3 As shown, after replacing multiple first key feature data corresponding to multiple original images with third key feature data to obtain multiple target images, the method further includes:
[0110] S301: Acquire multiple raw images;
[0111] S302: Extract key features from multiple original images to obtain multiple first key feature data corresponding to the multiple original images;
[0112] S303: Combine the data of the same key feature in the multiple first key feature data corresponding to multiple original images to obtain the third key feature data corresponding to each key feature;
[0113] S304: Using a preset random algorithm, the third key feature data corresponding to each key feature is randomly swapped to obtain the second key feature data corresponding to each original image;
[0114] S305: Replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain the candidate image corresponding to each original image;
[0115] S306: Perform virtual image processing on each candidate image to obtain the target image corresponding to each candidate image;
[0116] S307: Label each original image to obtain the identifier for each original image;
[0117] S308: Perform modulo calculation on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image;
[0118] S309: Based on the correspondence, replace the designated region image of each original image with the target image corresponding to each candidate image to obtain a new image corresponding to each original image.
[0119] In this embodiment, the above-mentioned image processing method is an image processing device. The image processing device can be one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0120] It should be noted that electronic devices can be any electronic product that can interact with users, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.
[0121] Electronic devices may include network devices and / or user devices. Among them, network devices include, but are not limited to, single network electronic devices, groups of electronic devices consisting of multiple network electronic devices, or cloud computing-based clouds consisting of a large number of hosts or network electronic devices.
[0122] The networks in which electronic devices are located include, but are not limited to: wide area networks (WANs), metropolitan area networks (MANs), local area networks (LANs), and virtual private networks (VPNs).
[0123] In this embodiment, the implementation of each step in the above embodiments can be found in the description of the foregoing embodiments, and will not be repeated here.
[0124] In the above-described method embodiments of this disclosure, multiple original images are acquired, and key features are extracted from each original image to obtain first key feature data corresponding to each original image. Data with the same key features in the multiple first key feature data corresponding to multiple original images are exchanged to generate second key feature data corresponding to each original image. The first key feature data corresponding to each original image is replaced with the corresponding second key feature data to obtain candidate images corresponding to each original image. The candidate images are not real images, thereby protecting the privacy of information in the images. The key features in the candidate images are real image features, which to a certain extent ensures the authenticity of the images and improves the usability of the image data. The candidate images are then virtualized to further protect the privacy of image information.
[0125] Figure 4 This is a structural block diagram of an image processing apparatus 40 provided for an exemplary embodiment of the present disclosure. (See diagram below.) Figure 4 As shown, the image processing device 40 includes: an acquisition module 41, an extraction module 42, an exchange module 43, a replacement module 44, and an image processing module 45.
[0126] Among them, the acquisition module 41 is used to acquire multiple original images;
[0127] Extraction module 42 is used to extract key features from each original image to obtain first key feature data corresponding to each original image, wherein each first key feature data is data of at least one key feature extracted from each original image;
[0128] The exchange module 43 is used to exchange the data of the same key feature in the multiple first key feature data corresponding to multiple original images to generate the second key feature data corresponding to each original image.
[0129] Replacement module 44 is used to replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain the candidate image corresponding to each original image;
[0130] The image processing module 45 is used to perform virtual image processing on each candidate image to obtain the target image corresponding to each candidate image.
[0131] Optionally, when the extraction module 42 extracts key features from each original image to obtain the first key feature data corresponding to each original image, it is used to:
[0132] Perform region detection on each original image to obtain the corresponding region image for each original image;
[0133] Key features are extracted from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
[0134] Optionally, when the exchange module 43 exchanges the data of the same key feature in the multiple first key feature data corresponding to multiple original images to generate the second key feature data corresponding to each original image, it is used to:
[0135] The data of the same key feature in the multiple first key feature data corresponding to multiple original images are combined to obtain the third key feature data corresponding to each key feature;
[0136] Using a pre-defined random algorithm, the third key feature data corresponding to each key feature is randomly swapped to obtain the second key feature data corresponding to each original image.
[0137] Optionally, after performing virtual image processing on each candidate image to obtain the target image corresponding to each candidate image, the image processing module 45 can also be used for:
[0138] Each original image is labeled to obtain an identifier for each original image;
[0139] Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image;
[0140] Based on the correspondence, the target image corresponding to each candidate image is used to replace the designated region image of each original image, resulting in a new image corresponding to each original image.
[0141] Optionally, when the image processing module 45 performs virtual image processing on each candidate image to obtain the target image corresponding to each candidate image, it is used to:
[0142] Each candidate image is input into a pre-defined adversarial neural network. The adversarial neural network performs virtual image processing on each candidate image to obtain the target image corresponding to each candidate image.
[0143] Optionally, after performing virtual image processing on each candidate image to obtain the target image corresponding to each candidate image, the image processing module 45 can also be used for:
[0144] The target image is used to train the image processing model to be trained, resulting in a trained image processing model.
[0145] Figure 5 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this disclosure. For example... Figure 5 As shown, the electronic device includes a memory 501 and a processor 502. Additionally, the electronic device also includes necessary components such as a power supply unit 503, a communication unit 504, and a display screen 505.
[0146] Memory 501 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used for operation on the electronic device.
[0147] The memory 501 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0148] Communication component 504 is used for data transmission with other devices.
[0149] The processor 502 is executable computer instructions stored in the memory 501 to: acquire multiple original images; extract key features from each original image to obtain first key feature data corresponding to each original image, wherein each first key feature data is data of at least one key feature extracted from each original image; exchange data of the same key feature in the multiple first key feature data corresponding to the multiple original images to generate second key feature data corresponding to each original image; replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain a candidate image corresponding to each original image; and perform virtual image processing on each candidate image to obtain a target image corresponding to each candidate image.
[0150] Optionally, when the processor 502 extracts key features from each original image to obtain the first key feature data corresponding to each original image, it performs the following: performs a set region detection on each original image to obtain a set region image corresponding to each original image; and performs key feature extraction on the set region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
[0151] Optionally, when the processor 502 exchanges the data of the same key feature in the multiple first key feature data corresponding to multiple original images to generate the second key feature data corresponding to each original image, it is used to: combine the data of the same key feature in the multiple first key feature data corresponding to multiple original images to obtain the third key feature data corresponding to each key feature; and use a preset random algorithm to randomly exchange the third key feature data corresponding to each key feature to obtain the second key feature data corresponding to each original image.
[0152] Alternatively, the processor 502 can also be used for:
[0153] Each original image is labeled to obtain an identifier for each original image;
[0154] Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image;
[0155] Based on the correspondence, the target image corresponding to each candidate image is used to replace the designated region image of each original image, resulting in a new image corresponding to each original image.
[0156] Optionally, when processing each candidate image using virtualized image processing to obtain a target image corresponding to each candidate image, the processor 502 is used to:
[0157] Each candidate image is input into a pre-defined adversarial neural network. The adversarial neural network performs virtual image processing on each candidate image to obtain the target image corresponding to each candidate image.
[0158] Optionally, after processing each candidate image using virtualized image processing to obtain the target image corresponding to each candidate image, the processor 502 can also be used for:
[0159] The target image is used to train the image processing model to be trained, resulting in a trained image processing model.
[0160] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores a computer program, and the computer program is executed by one or more processors, it causes one or more processors to perform... Figure 1 Each step in the method embodiment.
[0161] Accordingly, embodiments of this application also provide a computer program product, which includes a computer program / instructions, and the computer program / instructions are executed by a processor. Figure 1 Each step in the method embodiment.
[0162] The above Figure 5 The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0163] The above Figure 5The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.
[0164] The above Figure 5 The display screen includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions, but also the duration and pressure associated with the touch or swipe operation.
[0165] The aforementioned electronic devices also include audio components.
[0166] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0167] In the embodiments of the apparatus, device, storage medium, and program products disclosed herein, multiple original images are acquired, key features are extracted from each original image to obtain first key feature data corresponding to each original image; data with the same key features in the multiple first key feature data corresponding to multiple original images are exchanged to generate second key feature data corresponding to each original image; the first key feature data corresponding to each original image is replaced with the corresponding second key feature data to obtain candidate images corresponding to each original image. The candidate images are not real images, thereby protecting the privacy of information in the images, while the key features in the candidate images are real image features, which to a certain extent ensures the authenticity of the images and improves the usability of the image data; the candidate images are then virtualized to further protect the privacy of image information.
[0168] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0169] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0170] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0171] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0172] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0173] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0174] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0175] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0176] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that, include: Acquire multiple raw images; Key features are extracted from each of the original images to obtain first key feature data corresponding to each original image, wherein each first key feature data is data of at least one key feature extracted from each original image; The data of the same key feature in the multiple first key feature data corresponding to the multiple original images are combined to obtain the third key feature data corresponding to each key feature. Then, the third key feature data corresponding to each key feature is randomly replaced by a preset random algorithm to generate the second key feature data corresponding to each original image. Replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain a candidate image corresponding to each original image; Each candidate image is subjected to virtual image processing to obtain a target image corresponding to each candidate image; The method further includes: Each of the original images is labeled to obtain an identifier for each original image; Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image; Based on the correspondence, the target image corresponding to each candidate image is used to replace the set region image of each original image to obtain a new image corresponding to each original image.
2. The method according to claim 1, characterized in that, The step of extracting key features from each of the original images to obtain the first key feature data corresponding to each original image includes: Perform a set region detection on each of the original images to obtain a set region image corresponding to each of the original images; Key features are extracted from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
3. The method according to claim 1, characterized in that, The step of performing virtual image processing on each candidate image to obtain a target image corresponding to each candidate image includes: Each candidate image is input into a preset adversarial neural network, and the adversarial neural network performs virtual image processing on each candidate image to obtain a target image corresponding to each candidate image.
4. The method according to claim 1, characterized in that, After performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, the method further includes: Using the target image, the image processing model to be trained is trained to obtain the trained image processing model.
5. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire multiple raw images; An extraction module is used to extract key features from each of the original images to obtain first key feature data corresponding to each of the original images, wherein each of the first key feature data is data of at least one key feature extracted from each of the original images; The exchange module is used to combine the data of the same key feature in the multiple first key feature data corresponding to the multiple original images to obtain the third key feature data corresponding to each key feature, and use a preset random algorithm to randomly replace the third key feature data corresponding to each key feature to generate the second key feature data corresponding to each original image. The replacement module is used to replace the first key feature data corresponding to each original image with the corresponding second key feature data to obtain a candidate image corresponding to each original image. The image processing module is used to perform virtual image processing on each of the candidate images to obtain a target image corresponding to each of the candidate images; Each of the original images is labeled to obtain an identifier for each original image; Modulo calculation is performed on each original image and its identifier to obtain the correspondence between each original image and the target image corresponding to each candidate image; Based on the correspondence, the target image corresponding to each candidate image is used to replace the set region image of each original image to obtain a new image corresponding to each original image.
6. The apparatus according to claim 5, characterized in that, When the extraction module extracts key features from each of the original images to obtain the first key feature data corresponding to each original image, it is used to: Perform a set region detection on each of the original images to obtain a set region image corresponding to each of the original images; Key features are extracted from the designated region image corresponding to each original image to obtain the first key feature data corresponding to each original image.
7. The apparatus according to claim 5, characterized in that, When the image processing module performs virtual image processing on each candidate image to obtain a target image corresponding to each candidate image, it is used to: Each candidate image is input into a preset adversarial neural network, and the adversarial neural network performs virtual image processing on each candidate image to obtain a target image corresponding to each candidate image.
8. The apparatus according to claim 5, characterized in that, After performing virtualized image processing on each candidate image to obtain a target image corresponding to each candidate image, the image processing module is further configured to: Using the target image, the image processing model to be trained is trained to obtain the trained image processing model.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the steps of the method as described in any one of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform each step of the method as described in any one of claims 1-4.
11. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Image processing method, image processing device, storage medium and electronic equipment
CN113761988A
Image processing method and device, electronic equipment and storage medium
CN113963400A