Image attribute editing method and device, electronic equipment and storage medium

By determining the editing attributes and latent vectors in a generative adversarial network, and using an encoder and generator to generate the target edited image, the problem of inaccurate image attribute editing in existing technologies is solved, and higher editing accuracy is achieved.

CN116543211BActive Publication Date: 2026-04-21TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2023-05-06
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve precise attribute editing when using generative adversarial networks for image editing, leading to changes in other attributes.

Method used

By determining the editing attributes and the image of the object to be processed, the encoder extracts the latent vector to be edited, and determines the attribute editing vector in the set of editing vectors. The edited latent vector is calculated and input into the generator to generate the target edited image, ensuring that the attribute space of the editing vector and the latent vector are consistent.

Benefits of technology

It improves the accuracy of image attribute editing, reduces errors caused by spatial differences, and avoids changes to non-target attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543211B_ABST
    Figure CN116543211B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image attribute editing method and device, electronic equipment and storage medium. The attribute to be edited and the to-be-processed object image including a target object are determined, and the to-be-processed object image is input into a trained encoder to obtain a corresponding to-be-edited hidden vector. An attribute editing vector corresponding to the editing attribute is determined in an editing vector set, and the editing vector set includes at least one editing vector with a corresponding attribute, and each editing vector is determined by a sample hidden vector extracted from a real image through the encoder. The edited hidden vector is determined according to the attribute editing vector and the to-be-edited hidden vector, and the edited hidden vector is input into a trained generator to obtain a target editing image including a target object edited by the edited attribute. The present disclosure determines the editing vector set based on the hidden vector of the real image, so that the editing vector of the editing attribute and the hidden vector attribute space are consistent, and the accuracy of image attribute editing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an image attribute editing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In recent years, Generative Adversarial Networks (GANs) have experienced rapid development, particularly in the field of image generation, where they have yielded impressive results. GANs utilize a game-like learning process between the generator and discriminator to continuously improve the generator's output, achieving the goal of generating data from latent vectors that approximates the distribution of the training data. In image editing applications, a GAN can be used to first invert the real image into its latent space, then edit the latent vectors, and finally, the generator can produce an image with the desired edited effect. In this editing process, only by finding the precise edit vectors can accurate editing effects be achieved—that is, changing only the desired attribute without altering other attributes. Summary of the Invention

[0003] In view of this, this disclosure proposes an image attribute editing method, apparatus, electronic device, and storage medium, aiming to improve the accuracy of image editing using generative adversarial networks.

[0004] According to a first aspect of this disclosure, an image attribute editing method is provided, the method comprising:

[0005] Determine the editing attributes and the image of the object to be processed, wherein the image of the object to be processed includes the target object;

[0006] The image of the object to be processed is input into the trained encoder to obtain the corresponding hidden vector to be edited;

[0007] The attribute edit vector corresponding to the edit attribute is determined in the edit vector set, the edit vector set including at least one edit vector with a corresponding attribute, and each edit vector is determined by the sample latent vector extracted from the real image by the encoder;

[0008] The edited hidden vector is determined based on the attribute edit vector and the hidden vector to be edited;

[0009] The edited latent vectors are input into the trained generator to obtain a target edited image including the target object after it has been edited by the edited attributes.

[0010] In one possible implementation, the method further includes:

[0011] The set of edit vectors is determined based on the set of real images.

[0012] In one possible implementation, determining the set of edit vectors based on the set of real images includes:

[0013] Each real image in the set of real images is input into the encoder to obtain the corresponding sample latent vector;

[0014] The object attribute multi-classifier obtained from pre-training is used to predict the corresponding attribute classification probability for each real image.

[0015] The vector attribute set is determined based on the correspondence between each sample latent vector and the attribute classification probability;

[0016] The set of editable vectors is determined based on the set of vector attributes.

[0017] In one possible implementation, determining the edit vector set based on the vector attribute set includes:

[0018] A support vector machine is trained based on the set of vector attributes, and at least one edit vector and its corresponding attribute are determined based on the trained support vector machine.

[0019] The set of edit vectors is determined based on the edit vectors and their corresponding attributes.

[0020] In one possible implementation, determining the edited latent vector based on the attribute edit vector and the latent vector to be edited includes:

[0021] The edited hidden vector is obtained by summing the attribute edit vector and the hidden vector to be edited.

[0022] In one possible implementation, the generator generates at least two target editing images, one of which includes a target object at the same angle as the target object in the image to be processed, and the other includes a target object at a different angle from the target object in the image to be processed.

[0023] According to a second aspect of this disclosure, an image attribute editing apparatus, the apparatus comprising:

[0024] An information determination module is used to determine editing attributes and an image of an object to be processed, wherein the image of an object to be processed includes a target object;

[0025] The first vector determination module is used to input the image of the object to be processed into the trained encoder to obtain the corresponding hidden vector to be edited.

[0026] The second vector determination module is used to determine the attribute editing vector corresponding to the editing attribute in the editing vector set. The editing vector set includes at least one editing vector with a corresponding attribute. Each editing vector is determined by a sample latent vector extracted from a real image by an encoder.

[0027] The vector editing module is used to determine the edited hidden vector based on the attribute edit vector and the hidden vector to be edited;

[0028] The image rendering module is used to input the edited latent vectors into the trained generator to obtain a target edited image including the target object after being edited by the edited attributes.

[0029] In one possible implementation, the device further includes:

[0030] The set determination module is used to determine the set of edit vectors based on the set of real images.

[0031] In one possible implementation, the set determination module is further configured to:

[0032] Each real image in the set of real images is input into the encoder to obtain the corresponding sample latent vector;

[0033] The object attribute multi-classifier obtained from pre-training is used to predict the corresponding attribute classification probability for each real image.

[0034] The vector attribute set is determined based on the correspondence between each sample latent vector and the attribute classification probability;

[0035] The set of editable vectors is determined based on the set of vector attributes.

[0036] In one possible implementation, the set determination module is further configured to:

[0037] A support vector machine is trained based on the set of vector attributes, and at least one edit vector and its corresponding attribute are determined based on the trained support vector machine.

[0038] The set of edit vectors is determined based on the edit vectors and their corresponding attributes.

[0039] In one possible implementation, the vector editing module is further configured to:

[0040] The edited hidden vector is obtained by summing the attribute edit vector and the hidden vector to be edited.

[0041] In one possible implementation, the generator generates at least two target editing images, one of which includes a target object at the same angle as the target object in the image to be processed, and the other includes a target object at a different angle from the target object in the image to be processed.

[0042] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing instructions stored in the memory.

[0043] According to a fourth aspect of this disclosure, a non-volatile computer-readable storage medium is provided that stores computer program instructions thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.

[0044] According to a fifth aspect of this disclosure, a computer program product is provided, including computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.

[0045] In this embodiment, editing attributes and an image of the target object to be processed are determined. The image of the target object is input into a trained encoder to obtain the corresponding latent vector to be edited. Attribute editing vectors corresponding to the editing attributes are determined from an edit vector set. The edit vector set includes at least one edit vector with a corresponding attribute, and each edit vector is determined using sample latent vectors extracted from a real image by the encoder. Edited latent vectors are determined based on the attribute editing vectors and the latent vectors to be edited, and these edited latent vectors are input into a trained generator to obtain a target edited image including the target object after the edited attributes have been edited. This disclosure determines the edit vector set using the latent vectors of the real image, making the edit vectors of the editing attributes consistent with the latent vector attribute space, thus improving the accuracy of image attribute editing.

[0046] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0047] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0048] Figure 1 A flowchart illustrating an image attribute editing method according to an embodiment of the present disclosure is shown;

[0049] Figure 2 A schematic diagram illustrating an image attribute editing process according to an embodiment of the present disclosure is shown;

[0050] Figure 3 A schematic diagram illustrating an edit vector effect according to an embodiment of the present disclosure is shown;

[0051] Figure 4A schematic diagram illustrating an image attribute editing effect according to an embodiment of the present disclosure is shown.

[0052] Figure 5 A schematic diagram of an image attribute editing apparatus according to an embodiment of the present disclosure is shown;

[0053] Figure 6 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0054] Figure 7 A schematic diagram of another electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0055] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0056] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0057] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0058] The image attribute editing method of this disclosure can be executed by an electronic device such as a terminal device or a server, that is, the terminal device or server can be used as a first user terminal and / or a second client. The terminal device can be any fixed or mobile terminal such as user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, or wearable device. The server can be a single server or a server cluster consisting of multiple servers. Any electronic device can implement the image attribute editing method of this disclosure by having its processor call computer-readable instructions stored in its memory.

[0059] Figure 1 A flowchart illustrating an image attribute editing method according to an embodiment of the present disclosure is shown. Figure 1 As shown, an image attribute editing method according to an embodiment of this disclosure may include the following steps S10-S50.

[0060] Step S10: Determine the editing attributes and the image of the object to be processed.

[0061] In one possible implementation, an electronic device determines the image of the object to be edited and the editing attributes characterizing the type of editing required. The image of the object to be edited includes a target object, which can be acquired by capturing an image of the user. Optionally, the image of the object to be edited can be determined by capturing the target object using an image acquisition device connected to the electronic device, or by directly receiving an image of the target object acquired by another device. The editing attributes can be any attribute of the target object in the image to be edited, such as wearing glasses, increasing age, or changing facial expressions. The electronic device can also determine the editing attributes by receiving editing attributes transmitted from other devices or by receiving user-inputted editing attributes through human-computer interaction.

[0062] Optionally, to determine the image of the object to be processed, the electronic device can also extract the region where the target object is located through image processing methods such as object recognition and image cropping after receiving or acquiring the target object image, thus obtaining a preprocessed image of the object to be processed. The target object can be the whole or a part of an animal such as a person, cat, or dog.

[0063] Step S20: Input the image of the object to be processed into the trained encoder to obtain the corresponding hidden vector to be edited.

[0064] In one possible implementation, after determining the image of the object to be processed, the electronic device can directly input the image of the object to be processed into the trained encoder to extract features and obtain the corresponding latent vector to be edited. The latent vector to be edited is used to represent the feature information of the target object in the image of the object to be processed. Optionally, the encoder can be trained using two different types of training images, real images and generated images, including sample objects. This training process can be performed by cross-training using real images and generated images. The training process can be completed by the electronic device, or it can be completed by other devices and then directly used by the electronic device.

[0065] Step S30: Determine the attribute editing vector corresponding to the edit attribute in the edit vector set.

[0066] In one possible implementation, after determining the type of edit attribute to be edited on the target object, the electronic device can determine the attribute edit vector corresponding to the edit attribute from an edit vector set. The edit vector set includes at least one edit vector with a corresponding attribute, and each edit vector is determined by a sample latent vector extracted from a real image through an encoder. The edit vector set can be predetermined by the electronic device before executing the image attribute editing method, either by receiving an edit vector set sent by another device or by the electronic device determining it using the sample latent vector corresponding to the real image. Alternatively, the edit vector set can also be determined during the execution of the image attribute editing method, meaning the image attribute editing method also includes a process of determining the edit vector set based on a set of real images.

[0067] Optionally, the process by which the electronic device determines the edit vector set based on the set of real images can be as follows: Each real image in the set is input into an encoder to obtain a corresponding latent vector. Then, a pre-trained object attribute multi-classifier is used to predict the corresponding attribute classification probability for each real image. Next, a vector attribute set is determined based on the correspondence between each latent vector and the attribute classification probability. Finally, the edit vector set is determined based on the vector attribute set. This process can also be as follows: A support vector machine is trained based on the vector attribute set, and at least one edit vector and its corresponding attribute are determined based on the trained support vector machine. The edit vector set is then determined based on the edit vector and its corresponding attribute.

[0068] In other words, in this embodiment of the electronic device, multiple sample latent vectors obtained by encoder inversion of each real image in the real image set can be used as an inversion manifold. Then, each real image is input into a pre-trained object attribute multi-classifier to predict the real image and obtain the attribute classification probability corresponding to each real image, that is, the probability that the real image belongs to each attribute type. Further, based on the correspondence between real images and sample latent vectors in the inversion manifold, and the correspondence between real images and attribute classification probabilities, the correspondence between sample latent vectors and attribute classification probabilities can be obtained, and the set of vector attributes representing this correspondence can be determined. Further, a support vector machine is trained using the set of vector attributes as the training set to find hyperplanes that distinguish binary attributes, where each attribute corresponds to a hyperplane. Finally, the editing direction of each attribute is determined based on the normal vector of the hyperplane as the editing vector corresponding to the attribute represented by the hyperplane, and then the set of editing vectors is determined based on the editing vectors and the corresponding attributes. During the process of image attribute editing, the latent vector to be edited corresponding to the image moves along the corresponding editing direction to achieve the corresponding attribute change.

[0069] Step S40: Determine the edited hidden vector based on the attribute edit vector and the hidden vector to be edited.

[0070] In one possible implementation, after determining the attribute editing vector and the hidden vector to be edited, the electronic device can determine the edited hidden vector based on the attribute editing vector and the hidden vector to be edited. The edited hidden vector is the vector obtained by editing the hidden vector to be edited using the attribute editing vector, causing the hidden vector to be edited to move along the direction of the attribute editing vector. Optionally, the edited hidden vector can be obtained directly by calculating the sum of the attribute editing vector and the hidden vector to be edited.

[0071] Step S50: Input the edited latent vector into the trained generator to obtain a target edited image including the target object after being edited by the edited attribute.

[0072] In one possible implementation, the electronic device edits the latent vector to be edited based on the attribute edit vector to obtain the edited latent vector. This edited latent vector is then input into a trained generator, which generates the target edited image, which includes the target object whose attributes have been edited. The generator can be a generator within a generative adversarial network (GAN). For example, if the edit attribute is "wearing glasses," and the target object in the original image is not wearing glasses, the target object in the edited image will appear to be wearing glasses. If the edit attribute is "adding a smile," and the target object in the original image is not smiling, the target object in the edited image will have a smiling expression.

[0073] Furthermore, the generator can generate at least two target edit images, each containing a target object at a different angle, meaning it simultaneously outputs edited target object images from different angles. In the at least two target edit images, one contains a target object at the same angle as the target object in the image to be processed, while the other contains target objects at different angles.

[0074] Figure 2 A schematic diagram illustrating an image attribute editing process according to an embodiment of the present disclosure is shown. Figure 2 As shown, in this embodiment, the encoder first extracts the sample latent vectors of the real image to obtain the inverted manifold, and determines the set of edit vectors. When editing the image of the object to be processed, the encoder extracts the latent vector to be edited from the image of the object to be processed, and extracts the attribute edit vector from the set of edit vectors by the edit attributes. The latent vector to be edited is adjusted according to the attribute edit vector to obtain the corresponding edited latent vector, and the trained generator generates at least one target edited image of the target object with edited attributes based on the edited latent vector.

[0075] Figure 3A schematic diagram illustrating an edit vector effect according to an embodiment of the present disclosure is shown. Figure 3 As shown, in the original latent space W composed of latent vectors obtained from sampling, origin Determine the set of edit vectors and the inversion manifold W composed of the latent vectors of the samples obtained from the inversion of the real image. inversion Given a defined set of edit vectors, the points on the diagonal represent sampled latent vectors in the original latent space, and the entire region represents a two-dimensional linear space. Hotter clusters correspond to higher probability densities in the inverted manifold. The red arrows represent the edit directions from "without glasses" to "with glasses" found in the original latent space, while the blue arrows represent the directions from "without glasses" to "with glasses" found in the inverted manifold based on the real image. Therefore, the edit vector set determined by the original latent space exhibits some distortion compared to the edit vector set determined by the inverted manifold, which can be expressed as d(Δw) = Δw. inversion -Δw origin Where Δw inversion It is the edit vector, Δw, found in the inverted manifold to indicate the editing direction. origin These are edit vectors found in the original latent space, used to indicate the direction of editing. While edit vectors from the original latent space can effectively edit images sampled by the generator, using them to edit real images leads to inaccuracies. Edit vectors determined using the inverted manifold derived from the real image allow for more precise editing of the real image.

[0076] Figure 4 A schematic diagram illustrating an image attribute editing effect according to an embodiment of the present disclosure is shown. Figure 4 As shown, when performing at least one editing operation on an object image, such as adding glasses, adding a smile, or increasing age, it is clear that the editing results obtained by using the editing vector determined by the inverted manifold are better than those obtained by using the editing vector determined by the original latent space.

[0077] Based on the above technical features, the image attribute editing method of this disclosure determines the set of editing vectors based on the latent vectors of the real image, so that the space to which the editing vectors of the edited attributes belong is consistent with the space to which the latent vector attributes belong, thereby reducing the error caused by spatial differences during the image editing process, avoiding changes in other attributes that do not need to be edited during the editing process, and improving the accuracy of image attribute editing.

[0078] Figure 5 A schematic diagram of an image attribute editing apparatus according to an embodiment of the present disclosure is shown. Figure 5 As shown, the image attribute editing apparatus of this disclosure embodiment may include:

[0079] Information determination module 50 is used to determine editing attributes and the image of the object to be processed, wherein the image of the object to be processed includes a target object;

[0080] The first vector determination module 51 is used to input the image of the object to be processed into the trained encoder to obtain the corresponding hidden vector to be edited.

[0081] The second vector determination module 52 is used to determine the attribute editing vector corresponding to the editing attribute in the editing vector set. The editing vector set includes at least one editing vector with a corresponding attribute. Each editing vector is determined by a sample latent vector extracted from a real image by an encoder.

[0082] Vector editing module 53 is used to determine the edited hidden vector based on the attribute edit vector and the hidden vector to be edited;

[0083] The image rendering module 54 is used to input the edited latent vector into the trained generator to obtain a target edited image including the target object after being edited by the edited attribute.

[0084] In one possible implementation, the device further includes:

[0085] The set determination module is used to determine the set of edit vectors based on the set of real images.

[0086] In one possible implementation, the set determination module is further configured to:

[0087] Each real image in the set of real images is input into the encoder to obtain the corresponding sample latent vector;

[0088] The object attribute multi-classifier obtained from pre-training is used to predict the corresponding attribute classification probability for each real image.

[0089] The vector attribute set is determined based on the correspondence between each sample latent vector and the attribute classification probability;

[0090] The set of editable vectors is determined based on the set of vector attributes.

[0091] In one possible implementation, the set determination module is further configured to:

[0092] A support vector machine is trained based on the set of vector attributes, and at least one edit vector and its corresponding attribute are determined based on the trained support vector machine.

[0093] The set of edit vectors is determined based on the edit vectors and their corresponding attributes.

[0094] In one possible implementation, the vector editing module 53 is further configured to:

[0095] The edited hidden vector is obtained by summing the attribute edit vector and the hidden vector to be edited.

[0096] In one possible implementation, the generator generates at least two target editing images, one of which includes a target object at the same angle as the target object in the image to be processed, and the other includes a target object at a different angle from the target object in the image to be processed.

[0097] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0098] This disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method. The computer-readable storage medium can be volatile or non-volatile.

[0099] This disclosure also proposes an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0100] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.

[0101] Figure 6 A schematic diagram of an electronic device 800 according to an embodiment of the present disclosure is shown. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0102] Reference Figure 6 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.

[0103] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0104] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 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.

[0105] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0106] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may 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 may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0107] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0108] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0109] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0110] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 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) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0111] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0112] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method.

[0113] Figure 7 A schematic diagram of another electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server or a terminal device. (Refer to...) Figure 7 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0114] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0115] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.

[0116] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0117] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0118] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0119] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0120] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should 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-readable program instructions.

[0121] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0122] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0124] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. An image attribute editing method characterized by, The method includes: Determine the editing attributes and the image of the object to be processed, wherein the image of the object to be processed includes the target object; The image of the object to be processed is input into the trained encoder to obtain the corresponding hidden vector to be edited; The attribute edit vector corresponding to the edit attribute is determined in the edit vector set, the edit vector set including at least one edit vector with a corresponding attribute, and each edit vector is determined by the sample latent vector extracted from the real image by the encoder; The edited hidden vector is determined based on the attribute edit vector and the hidden vector to be edited; The edited latent vectors are input into the trained generator to obtain a target edited image including the target object after being edited by the edited attributes; The method further includes: Determine the set of edit vectors based on the set of real images; The step of determining the set of edit vectors based on the set of real images includes: Each real image in the set of real images is input into the encoder to obtain the corresponding sample latent vector; The object attribute multi-classifier obtained from pre-training is used to predict the corresponding attribute classification probability for each real image. The vector attribute set is determined based on the correspondence between each sample latent vector and the attribute classification probability; The set of editable vectors is determined based on the set of vector attributes.

2. The method of claim 1, wherein, The step of determining the edit vector set based on the vector attribute set includes: A support vector machine is trained based on the set of vector attributes, and at least one edit vector and its corresponding attribute are determined based on the trained support vector machine. The set of edit vectors is determined based on the edit vectors and their corresponding attributes.

3. The method according to claim 1 or 2, characterized in that, The step of determining the edited hidden vector based on the attribute edit vector and the hidden vector to be edited includes: The edited hidden vector is obtained by summing the attribute edit vector and the hidden vector to be edited.

4. The method according to claim 1 or 2, characterized in that, The generator generates at least two target editing images, one of which includes a target object at the same angle as the target object in the image to be processed, while the other includes a target object at a different angle than the target object in the image to be processed.

5. An image attribute editing apparatus characterized by comprising: The device includes: An information determination module is used to determine editing attributes and an image of an object to be processed, wherein the image of an object to be processed includes a target object; The first vector determination module is used to input the image of the object to be processed into the trained encoder to obtain the corresponding hidden vector to be edited. The second vector determination module is used to determine the attribute editing vector corresponding to the editing attribute in the editing vector set. The editing vector set includes at least one editing vector with a corresponding attribute. Each editing vector is determined by a sample latent vector extracted from a real image by an encoder. The set determination module is used to determine the set of edit vectors based on the set of real images; The set determination module is further used for: Each real image in the set of real images is input into the encoder to obtain the corresponding sample latent vector; The object attribute multi-classifier obtained from pre-training is used to predict the corresponding attribute classification probability for each real image. The vector attribute set is determined based on the correspondence between each sample latent vector and the attribute classification probability; The set of editable vectors is determined based on the set of vector attributes; The vector editing module is used to determine the edited hidden vector based on the attribute edit vector and the hidden vector to be edited; The image rendering module is used to input the edited latent vectors into the trained generator to obtain a target edited image including the target object after being edited by the edited attributes.

6. An electronic device, comprising: include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method of any one of claims 1 to 4 when executing instructions stored in the memory.

7. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Processing method of image generator and image generation method and device

    CN113822953A

  • Image enhancement method and device, electronic equipment and storage medium

    CN115439367A