Method, device, electronic device and storage medium for generating paired images

By obtaining the user's images to be matched and gender tendency information, and using the style transfer model to generate style-like images, the problem of lack of personalization of couple avatar selection in the prior art is solved, and a richer image selection experience is achieved.

CN112464009BInactive Publication Date: 2024-11-15BAIDU (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011286919.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-17
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing couple avatar generation methods cannot meet the obvious differentiation needs of users. They usually rely on grouped or split images and lack personalized choices.

Method used

By obtaining the incoming images to be paired and gender propensity information sent by the user, the preset style transfer model generates style-like images, and determines the paired images based on gender propensity, providing personalized choices that are not limited to existing images.

Benefits of technology

It provides users with more differentiated and obvious paired image selections, meets users' diverse and personalized needs and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112464009B_ABST
    Figure CN112464009B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and computer-readable storage medium for generating paired images, and relates to the field of artificial intelligence, and specifically to the fields of artificial intelligence such as computer vision and deep learning technology. One implementation of the method is: after obtaining the image to be paired and the paired gender orientation information input by the user, a preset style transfer model is used to generate a candidate image corresponding to the image to be paired, and then the candidate image whose style difference with the image to be paired is less than a preset degree is determined as a style-similar image, and finally the target gender orientation is determined according to the paired gender orientation information, and the style-similar image consistent with the target gender orientation is determined as the paired image. This implementation provides a paired image generation method that is not limited to selecting paired images from existing images, and provides users with more obviously differentiated paired image options.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, specifically to artificial intelligence fields such as computer vision and deep learning technology, and in particular to methods, devices, electronic devices and computer-readable storage media for generating paired images. Background Art

[0002] Currently, Internet platforms and social software allow users to set corresponding avatars according to their preferences. Especially among the new generation of young couples, they usually want to choose related avatars as couple avatars to indicate the relationship between the users.

[0003] In the prior art, the selection of couple avatars is usually based on groups or pairs of avatars found on an Internet platform, or a single image is split into two parts for use by both men and women. However, the existing couple avatars cannot meet the significantly differentiated user needs. Summary of the invention

[0004] The present application provides a method, an apparatus, an electronic device, and a storage medium for generating a pairing image.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a pairing image, which obtains an image to be paired and pairing gender tendency information input by a user; generates a candidate image corresponding to the image to be paired using a preset style transfer model; determines a candidate image whose style difference with the image to be paired is less than a preset degree as a style-similar image; determines a target gender tendency based on the pairing gender tendency information, and determines a style-similar image consistent with the target gender tendency as a pairing image.

[0006] In a second aspect, an embodiment of the present application provides a device for generating a pairing image, comprising: an image to be paired acquisition unit, configured to acquire an image to be paired and pairing gender tendency information input by a user; a candidate image generation unit, configured to generate a candidate image corresponding to the image to be paired using a preset style transfer model; a candidate image screening unit, configured to determine a candidate image whose style difference with the image to be paired is less than a preset degree as a style-similar image; a pairing image determination unit, configured to determine a target gender tendency based on the pairing gender tendency information, and determine a style-similar image consistent with the target gender tendency as a pairing image.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for generating a pairing image described in any implementation manner.

[0008] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, including: the computer instructions are used to cause the computer to execute the method for generating a pairing image described in any implementation manner.

[0009] After obtaining the preprocessed face image to be recognized, the image to be paired and the pairing gender orientation information input by the user, the present application uses a preset style transfer model to generate a candidate image corresponding to the image to be paired, and then determines the candidate image whose style difference with the image to be paired is less than a preset degree as a style-similar image, and finally determines the target gender orientation according to the pairing gender orientation information, and determines the style-similar image consistent with the target gender orientation as the pairing image, thereby providing a pairing image generation method that is not restricted to selecting pairing images from existing images, and providing users with more obviously differentiated pairing image options.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0012] Figure 1 is an exemplary system architecture in which embodiments of the present application may be applied;

[0013] Figure 2 is a flowchart of an embodiment of a method for generating a paired image according to the present application;

[0014] Figure 3 is a flowchart of another embodiment of a method for generating a paired image according to the present application;

[0015] Figure 4 is a schematic diagram of an image to be paired input by a user in an application scenario for generating a paired image according to the present application;

[0016] Figure 5-1 and Figure 5-2 is a schematic diagram of candidate images in an application scenario for generating paired images according to the present application;

[0017] Figure 6 is a structural schematic diagram of an embodiment of a device for generating a pairing image according to the present application;

[0018] Figure 7It is a block diagram of an electronic device suitable for implementing the method for generating a pairing image according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method, apparatus, electronic device, and computer-readable storage medium for generating a pairing image of the present application can be applied.

[0022] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a neural network 104, and a server 105. The neural network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The neural network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0023] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the neural network 104 to achieve the purpose of sending the image to be paired and the paired gender preference information. The terminal devices 101, 102, 103 can be installed with various applications related to paired images, such as image search applications, avatar generation applications, etc.

[0024] Terminal devices 101, 102, 103 can be hardware or software. In the case of hardware, it can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, sending images to be paired and pairing gender preference information, etc.), or it can be implemented as a single software or software module. No specific limitation is made here.

[0025] The server 105 may be a server that provides various services, such as a server that provides paired images for the terminal devices 101, 102, and 103. For example, after obtaining the image to be paired and the paired gender orientation information input by the user, a preset style transfer model is used to generate a candidate image corresponding to the image to be paired, and then the candidate image whose style difference with the image to be paired is less than a preset degree is determined as a style-similar image, and finally the target gender orientation is determined according to the paired gender orientation information, and the style-similar image consistent with the target gender orientation is determined as the paired image.

[0026] It should be noted that the method for generating a pairing image provided in the embodiments of the present application is generally executed by the server 105 , and accordingly, the device for generating a pairing image is generally disposed in the server 105 .

[0027] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules for providing distributed services, or it can be implemented as a single software or software module. No specific limitation is made here.

[0028] In addition, the method for generating a pairing image may also be executed by the terminal devices 101, 102, 103, and accordingly, the apparatus for generating a pairing image may also be provided in the terminal devices 101, 102, 103. In this case, the exemplary system architecture 100 may also not include the server 105 and the neural network 104.

[0029] It should be understood that Figure 1 The number of terminal devices, neural networks and servers in the embodiment is only for illustration. Any number of terminal devices, neural networks and servers may be provided according to the implementation requirements.

[0030] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for generating a pairing image according to the present application. The method for generating a pairing image comprises the following steps:

[0031] Step 201, obtaining the image to be paired and the pairing gender classification tendency information input by the user.

[0032] In this embodiment, the execution subject (eg Figure 1 The server 105 shown in FIG. 105 ) is typically accessed from a non-local human-computer interaction device (eg, Figure 1 The terminal devices 101, 102, 103 shown in the figure are used to obtain the image to be paired and the paired gender classification tendency information, which is not limited in this application.

[0033] The images to be paired are usually uploaded by users, and are used by the execution subject to perform pairing according to the contents in the images to be paired, so as to obtain paired images with similar styles and corresponding contents and paired gender classification tendency information.

[0034] It should be understood that the images to be paired usually record different contents according to user needs in different application scenarios. For example, in the application scenario of generating couple avatars, the images to be paired may record face images, landscape images, cartoon images, etc.

[0035] In addition, the gender classification tendency information can be sent to the above-mentioned execution body for corresponding processing based on the user's selection, or it can be determined according to the matching rules pre-set in the above-mentioned execution body according to different application scenarios after the above-mentioned execution body obtains the image to be paired and classifies the image to be paired by gender. For example, when the application scenario is a matching generation scenario for couple portraits, the rule can be pre-determined as a gender classification that is different from the gender classification result in the image to be paired as the gender classification tendency information. For example, when the gender classification result in the image to be paired is male, the pairing gender classification tendency information is determined to be inclined towards female.

[0036] Step 202: Generate a candidate image corresponding to the image to be paired using a preset style transfer model.

[0037] In this embodiment, after the image to be paired input by the user in the above step 201 is obtained, the image to be paired is input into a preset style transfer model, and a plurality of candidate images having styles different from the image to be paired are generated through processing by the preset style transfer model.

[0038] Among them, the style information of the image to be paired can be obtained by analyzing the style classification model stored locally in the above-mentioned execution subject, or it can be analyzed by a style classification model stored in other non-local places and then corresponding style annotation is performed. The above-mentioned execution subject can determine the style information of the image to be paired through the style annotation, or the user can annotate the image to be paired in advance and send it to the above-mentioned execution subject along with the image to be paired.

[0039] Generally speaking, style classification includes but is not limited to sketches, real scenes, cartoons, simple drawings, etc.

[0040] It should be understood that the preset style transfer model is usually obtained by training the original neural network model determined by a deep learning method based on a generative adversarial neural network model or its variants with a pre-constructed image data set with certain style information, so that the preset style transfer model can be used to generate style transfer for the input original image to obtain an output image whose entity content is similar to the original image, but the corresponding style belongs to other style categories in the above-mentioned determined style information.

[0041] In addition, the preset style transfer model can generate different numbers of output images whose entity content is similar to the original image but whose style is different, namely, candidate images, for the image to be paired according to different training rules. Preferably, the number of candidate images generated by the preset style transfer model is determined according to the number of types of style information. For example, when the number of style information for implementing style classification of the image to be paired is 7 types, 6 candidate images are generated accordingly to ensure that the existing style information has corresponding candidate images, thereby avoiding the loss of styles that the user may be satisfied with due to insufficient number of generated images.

[0042] Step 203: Determine the candidate images whose style difference with the image to be paired is less than a preset degree as images with similar styles.

[0043] In this embodiment, after a plurality of candidate images are generated in step 202, the style similarities of the plurality of candidate images are compared with the image to be paired one by one, and the candidate images whose style difference with the image to be paired is less than a preset degree are determined as images with similar styles.

[0044] Among them, it is usually possible to use a feature extraction-based image matching model to match the paired image and the candidate image with style information as a feature to obtain a corresponding similarity value or similarity vector, etc., so as to quantify the matching results, and select candidate images with style differences less than a preset degree based on the quantification results.

[0045] It should be understood that the preset degree of style difference can be preset by the above-mentioned execution subject, and can also be adjusted accordingly according to the actual needs of the user to meet the user's accuracy requirements for the candidate images.

[0046] Step 204: determine the target gender classification tendency according to the paired gender classification tendency information, and determine the images with similar styles that are consistent with the target gender classification tendency as paired images.

[0047] In this embodiment, after obtaining the images with similar styles, the obtained images with similar styles may be labeled with gender classification by using a gender classification model or the like, so as to select the corresponding images with similar styles according to the paired gender classification tendency information.

[0048] Among them, the gender classification model is usually a neural network composed of convolutional neural networks and other methods, which is trained by a predetermined set of image samples with gender classification annotations. By inputting the candidate image into the gender classification model for processing, the gender classification mark can be added to the candidate image according to the obtained result, thereby realizing the gender classification of the candidate image.

[0049] It should be understood that the final style-similar images can be a determined single image or multiple determined images. When the final style-similar images are multiple images, an image candidate set can be generated based on these images, and the image candidate set can be sent to the user so that the user can determine the final pairing image based on his or her own preferences.

[0050] In some embodiments, after determining that the corresponding style-similar images are multiple images based on gender classification preference information, these images can also be screened using the images to be paired uploaded by the user, for example by matching image content features, to determine the style-similar image that is closest to the image to be paired uploaded by the user as the pairing image, providing the user with the optimal pairing image determined by feature analysis, thereby improving the user experience.

[0051] In some embodiments, when training the above-mentioned style classification model and gender classification model, a sample set with both gender classification identification and style classification identification can be used in advance to establish the correlation between the style classification model and the gender classification model to improve the quality of the obtained paired images.

[0052] The method for generating a pairing image provided in an embodiment of the present application obtains the image to be paired and the pairing gender classification tendency information input by the user, and then uses a preset style transfer model to generate a candidate image corresponding to the image to be paired, and then determines the candidate image whose style difference with the image to be paired is less than a preset degree as a style-similar image, and finally determines the target gender classification tendency according to the pairing gender classification tendency information, and determines the style-similar image consistent with the target gender classification tendency as the pairing image, thereby providing a pairing image generation method that is not limited to selecting pairing images from existing images, and providing users with more obviously differentiated pairing image options.

[0053] In some optional implementations of this embodiment, the process of obtaining the preset style transfer model includes:

[0054] Sample image sets of different styles are obtained respectively; a sample image set of any style is used as input and another sample image set of a style different from the input is used as output, and the original neural network is trained to obtain the style transfer model; wherein the original neural network includes at least one of a generative adversarial neural network, a convolutional neural network, and a residual neural network.

[0055] Specifically, after obtaining multiple sample image sets of determined different styles, the sample image sets of one style are taken as input, and the sample image sets of the remaining styles are taken as output respectively, and the original neural network model determined based on at least one neural network including an adversarial neural network, a convolutional neural network, and a residual neural network is trained to enable the trained original neural network model to generate output images of the remaining styles according to the image corresponding to the input style. In this way, after taking the sample image sets of different styles as input for training, the final neural network is used as a style transfer model. The obtained style transfer model can generate corresponding images of the remaining styles according to the images to be paired of the determined style among the above different styles, thereby providing users with candidate images that do not exist in the existing environment and providing more differentiated paired image options.

[0056] In some optional implementations of the present embodiment, candidate images whose style difference with the image to be paired is less than a preset degree are determined as images with similar style, including: calculating the similarity value between each candidate image and the image to be paired respectively; and determining candidate images whose similarity value is greater than a preset threshold as images with similar style.

[0057] Specifically, when multiple candidate images are obtained, the similarity value between each candidate image and the paired image can be calculated separately by using a similarity calculation neural network determined based on image content features, an image coincidence calculation neural network, etc., so as to quantify the similarity between the candidate image and the image to be paired. When the similarity between the candidate image and the image to be paired meets a predetermined threshold condition, the candidate image is determined to be an image with similar style. In this way, the candidate images are screened to reduce invalid data with large style differences, so as to ultimately improve the quality of the paired images presented to the user.

[0058] In some optional implementations of this embodiment, the target gender classification tendency is determined based on the pairing gender classification tendency information, including: in response to the pairing gender classification tendency being same-sex pairing, determining the gender classification tendency that is the same as the gender classification tendency of the image to be paired as the target gender classification tendency.

[0059] Specifically, when the above-mentioned execution subject receives information through user instructions, system update instructions, etc. and determines that the pairing gender classification tendency is same-sex pairing, the gender classification tendency that is the same as the gender classification tendency of the image to be paired is determined as the target gender classification tendency to adjust the final determination direction of the pairing image to better meet the user's diverse selection needs.

[0060] In some optional implementations of this embodiment, the target gender classification tendency is determined based on the pairing gender classification tendency information, including: in response to the pairing gender classification tendency being opposite-sex pairing, determining the gender classification tendency opposite to the gender classification tendency of the image to be paired as the target gender classification tendency.

[0061] Specifically, when the above-mentioned execution subject receives information through user instructions, system update instructions, etc. and determines that the pairing gender classification tendency is opposite-sex pairing, the gender classification tendency opposite to the gender classification tendency of the image to be paired is determined as the target gender classification tendency to adjust the final determination direction of the pairing image to better meet the user's diverse selection needs.

[0062] Based on the above embodiments, the present invention also Figure 3 Another embodiment of a method for generating a pairing image is provided in 300, which provides a further processing method after determining the pairing image, specifically including:

[0063] Step 301: Obtain the image to be paired and the paired gender classification tendency information input by the user.

[0064] Step 302: Generate a candidate image corresponding to the image to be paired using a preset style transfer model.

[0065] Step 303: Determine the candidate images whose style difference with the image to be paired is less than a preset degree as images with similar styles.

[0066] Step 304: In response to the pairing gender classification tendency being opposite-sex pairing, a gender classification tendency opposite to the gender classification tendency of the image to be paired is determined as a target gender classification tendency.

[0067] Step 305: output the pairing image as a couple pairing image.

[0068] Specifically, after obtaining a pairing image of the opposite sex corresponding to the image to be paired uploaded by the user, the pairing image is provided to the user as a couple pairing image, so that the user can obtain a pairing image that does not exist in the existing images, providing the user with more obviously differentiated pairing image options.

[0069] Step 306: In response to the image to be paired including the character portrait, output the pairing image including the character portrait as a couple pairing portrait.

[0070] Specifically, when it is determined that there is a character avatar in the image to be paired, it can be determined that the purpose of the user uploading the image to be paired is to find a avatar of the opposite sex corresponding to the image to be paired as a couple avatar. Since the pairing image is obtained by style transfer based on the image to be paired, the pairing image can also include the character avatar. The pairing avatar containing the character avatar is output as a couple pairing avatar, providing the user with a couple pairing avatar that is different from the existing image, so as to meet the user's need to obtain differentiated pairing avatars.

[0071] In this embodiment, steps 301-304 and Figure 2 Steps 201-204 in the illustrated embodiment are similar and will not be described in detail. Through the method for generating paired images provided in this embodiment, corresponding images can be generated based on the images to be paired uploaded by the user. When there are character portraits in the images to be paired uploaded by the user, that is, when it is determined that the user expects to obtain an image as a couple paired portrait, the user is provided with a couple paired portrait, and an image that does not exist in the existing image data generated based on the style transfer model is provided to the user, providing the user with more obviously differentiated paired image options.

[0072] To deepen understanding, this application also provides a specific implementation scheme in combination with a specific application scenario. In this specific application scenario, the user inputs Figure 4 The images to be paired and the paired gender classification tendency information shown are of the opposite sex.

[0073] Will Figure 4 Input to the preset style transfer model to generate Figure 4 The corresponding candidate images are selected and Figure 4 The candidate images whose style differences are less than the preset degree are determined as follows Figure 5-1 and Figure 5-2 Similar style images.

[0074] The gender classification results of the images to be paired are male, and the target gender classification is determined to be female based on the gender classification tendency information. Figure 5-1 and Figure 5-2 Classify by gender.

[0075] get Figure 5-1 The gender classification result is male, Figure 5-2 The result of gender classification is female. Figure 5-2 Determined as paired images.

[0076] It can be seen from this application scenario that the method for generating pairing images provided in the embodiment of the present application, after obtaining the image to be paired and the pairing gender classification tendency information passed in by the user, uses a preset style transfer model to generate a candidate image corresponding to the image to be paired, and then determines the candidate image whose style difference with the image to be paired is less than a preset degree as a style-similar image, and finally determines the target gender classification tendency according to the pairing gender classification tendency information, and determines the style-similar image consistent with the target gender classification tendency as the pairing image, thereby providing a pairing image generation method that is not restricted to selecting pairing images from existing images, and provides users with more obviously differentiated pairing image choices.

[0077] like Figure 6 As shown, the device 600 for generating a pairing image in this embodiment may include: a to-be-paired image acquisition unit 601, configured to acquire the to-be-paired image and the pairing gender classification tendency information input by the user; a candidate image generation unit 602, configured to generate a candidate image corresponding to the to-be-paired image using a preset style transfer model; a candidate image screening unit 603, configured to determine a candidate image whose style difference with the to-be-paired image is less than a preset degree as a style-similar image; a pairing image determination unit 604, configured to determine a target gender classification tendency according to the pairing gender classification tendency information, and determine a style-similar image consistent with the target gender classification tendency as a pairing image.

[0078] In some optional implementations of the present embodiment, the candidate image generation unit 602 includes: a sample acquisition subunit, configured to respectively acquire sample image sets of different styles; a model training subunit, configured to take a sample image set of any style as input and another sample image set of a style different from the input as output, to train the original neural network to obtain the style transfer model; wherein the original neural network includes at least one of a generative adversarial neural network, a convolutional neural network, and a residual neural network.

[0079] In some optional implementations of the present embodiment, the candidate image screening unit 603 includes: a similarity calculation subunit, configured to respectively calculate the similarity value between each candidate image and the image to be paired; and a similarity comparison subunit, configured to determine the candidate image whose similarity value is greater than a preset threshold as the style-similar image.

[0080] In some optional implementations of this embodiment, the pairing image determination unit 604 is further configured to: in response to the pairing gender classification tendency being same-sex pairing, determine the gender classification tendency that is the same as the gender classification tendency of the image to be paired as the target gender classification tendency.

[0081] In some optional implementations of this embodiment, the pairing image determination unit 604 is further configured to: in response to the pairing gender classification tendency being opposite-sex pairing, determine a gender classification tendency opposite to the gender classification tendency of the image to be paired as the target gender classification tendency.

[0082] In some optional implementations of this embodiment, the apparatus for generating a pairing image further includes: an image output unit configured to output the pairing image as a couple pairing image.

[0083] In some optional implementations of this embodiment, the above-mentioned device for generating a pairing image also includes: an avatar output unit, which is configured to output the pairing image containing the character avatar as a couple pairing avatar in response to the image to be paired containing a character avatar.

[0084] This embodiment exists as a device embodiment corresponding to the above method embodiment. For the same content, refer to the description of the above method embodiment, and no further description is given. The device for generating a pairing image provided by the embodiment of the present application provides a pairing image generation method that is not limited to selecting a pairing image from existing images, providing users with more differentiated pairing image options.

[0085] like Figure 7 , is a block diagram of an electronic device for generating a method for pairing images according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0086] like Figure 7As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.

[0087] The memory 702 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for generating a pairing image provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for generating a pairing image provided in the present application.

[0088] The memory 702 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the corresponding program instructions / modules of the method for generating a paired image in the embodiment of the present application (for example, Figure 6 The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the method for generating a pairing image in the above method embodiment is implemented.

[0089] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the electronic device used to generate the pairing image, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the electronic device used to generate the pairing image through a neural network. Examples of the above-mentioned neural network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0090] The electronic device for executing the method for generating a pairing image may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0091] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device used to generate the pairing image, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0092] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the above storage system, the above at least one input device, and the above at least one output device.

[0093] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0095] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a neural network browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communicating neural network). Examples of communicating neural networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0096] A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication neural network. The relationship of client and server arises through computer programs running on respective computers and having a client-server relationship to each other.

[0097] According to the technical solution of the embodiment of the present application, after obtaining the image to be paired and the pairing gender classification tendency information input by the user, a preset style transfer model is used to generate a candidate image corresponding to the image to be paired, and then the candidate image whose style difference with the image to be paired is less than a preset degree is determined as a style-similar image, and finally the target gender classification tendency is determined according to the pairing gender classification tendency information, and the style-similar image consistent with the target gender classification tendency is determined as the pairing image, which provides a pairing image generation method that is not restricted to selecting pairing images from existing images, and provides users with more obviously differentiated pairing image options.

[0098] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0099] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for generating a paired image, comprising: Obtain the image to be paired and the matching gender preference information passed in by the user; Generate a candidate image corresponding to the image to be paired using a preset style transfer model; Determine a candidate image whose style difference with the image to be paired is less than a preset degree as an image with similar style; The target gender orientation is determined according to the paired gender orientation information, and images with similar styles that are consistent with the target gender orientation are determined as paired images.

2. The method according to claim 1, wherein: The process of obtaining the preset style transfer model includes: Obtain sample image sets of different styles respectively; A sample image set of any style is taken as input and another sample image set of a style different from the input is taken as output, and the original neural network is trained to obtain the style transfer model; wherein the original neural network includes at least one of a generative adversarial neural network, a convolutional neural network, and a residual neural network.

3. The method according to claim 1, wherein: The step of determining a candidate image whose style difference with the image to be paired is less than a preset degree as an image with similar style includes: Calculating the similarity value between each candidate image and the image to be paired respectively; The candidate images whose similarity values ​​are greater than a preset threshold are determined as the style-similar images.

4. The method according to any one of claims 1 to 3, wherein: The determining the target gender orientation according to the paired gender orientation information includes: In response to the pairing gender orientation being same-sex pairing, a gender orientation that is the same as the gender orientation of the image to be paired is determined as the target gender orientation.

5. The method according to any one of claims 1 to 3, wherein: The determining the target gender orientation according to the paired gender orientation information includes: In response to the pairing gender orientation being opposite-sex pairing, a gender orientation opposite to the gender orientation of the image to be paired is determined as the target gender orientation.

6. The method according to claim 5, further comprising: The pairing image is output as a couple pairing image.

7. The method according to claim 5, further comprising: In response to the image to be paired including a character portrait, the pairing image including the character portrait is output as a couple pairing portrait.

8. A device for generating a paired image, comprising: The to-be-paired image acquisition unit is configured to acquire the to-be-paired image and the pairing gender preference information input by the user; A candidate image generating unit, configured to generate a candidate image corresponding to the image to be paired using a preset style transfer model; a candidate image screening unit, configured to determine a candidate image whose style difference with the image to be paired is less than a preset degree as an image with similar style; The pairing image determination unit is configured to determine a target gender orientation according to the pairing gender orientation information, and determine an image with a similar style that is consistent with the target gender orientation as a pairing image.

9. The device according to claim 8, wherein: The candidate image generation unit includes: The sample acquisition subunit is configured to respectively acquire sample image sets of different styles; The model training subunit is configured to take a sample image set of any style as input and another sample image set of a style different from the input as output, train the original neural network, and obtain the style transfer model; wherein the original neural network includes at least one of a generative adversarial neural network, a convolutional neural network, and a residual neural network.

10. The device according to claim 8, wherein: The candidate image screening unit comprises: A similarity calculation subunit is configured to respectively calculate a similarity value between each candidate image and the image to be paired; The similarity comparison subunit is configured to determine the candidate images whose similarity values ​​are greater than a preset threshold as the images with similar styles.

11. The device according to any one of claims 8 to 10, wherein: The paired image determination unit is further configured to: In response to the pairing gender orientation being same-sex pairing, a gender orientation that is the same as the gender orientation of the image to be paired is determined as the target gender orientation.

12. The device according to any one of claims 8 to 10, wherein: The paired image determination unit is further configured to: In response to the pairing gender orientation being opposite-sex pairing, a gender orientation opposite to the gender orientation of the image to be paired is determined as the target gender orientation.

13. The apparatus according to claim 12, further comprising: The image output unit is configured to output the pairing image as a couple pairing image.

14. The apparatus according to claim 12, further comprising: The avatar output unit is configured to output the pairing image containing the character avatar as a couple pairing avatar in response to the image to be paired containing the character avatar.

15. An electronic device, comprising: at least one processor; as well as A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method for generating a pairing image according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, comprising: The computer instructions are used to cause the computer to execute the method for generating a paired image according to any one of claims 1 to 7.