CN111589156A - Image processing method, device, equipment and computer readable storage medium - Google Patents

Image processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111589156A
CN111589156A CN202010431363.6A CN202010431363A CN111589156A CN 111589156 A CN111589156 A CN 111589156A CN 202010431363 A CN202010431363 A CN 202010431363A CN 111589156 A CN111589156 A CN 111589156A
Authority
CN
China
Prior art keywords
image
virtual
processed
image set
generator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010431363.6A
Other languages
Chinese (zh)
Inventor
何茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010431363.6A priority Critical patent/CN111589156A/en
Publication of CN111589156A publication Critical patent/CN111589156A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure provides an image processing method, apparatus, device and computer-readable storage medium, the method comprising: acquiring a preset image set to be processed from a data server, wherein a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set; generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set; carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set; and sending the target image set to a data server for storage. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved.

Description

Image processing method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an image processing method, an image processing apparatus, an image processing device, and a computer-readable storage medium.
Background
In practical applications, many scenes require a large number of virtual avatars. For example, a large network game may have many Non-Player controlled characters (NPCs), and each NPC needs to be provided with an avatar, so that the network game needs a large number of virtual avatars. In addition, for example, when a user registers a new application, if the user does not want to use his/her real photo as an avatar, a need for a virtual avatar may also be generated.
The conventional virtual avatar generally performs simple image cropping, image color information adjustment, and the like on an image in a preset image set. However, the virtual avatar generated by the above method cannot meet the actual use requirement. Therefore, how to generate a virtual image which is more real and meets the use requirement is an urgent problem to be solved.
Disclosure of Invention
The present disclosure provides an image processing method, an image processing apparatus, an image processing device, and a computer-readable storage medium, which are used to solve the technical problem that an image generated by an existing virtual avatar generation method is not good in effect and cannot meet actual use requirements.
A first aspect of the present disclosure is to provide an image processing method, including:
acquiring a preset image set to be processed from a data server, wherein a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set;
generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set;
carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set;
and sending the target image set to a data server for storage.
According to the image processing method provided by the embodiment, the generator in the preset antagonistic neural network is adopted, the virtual image is generated according to the user image in the real scene in the preset image set to be processed, and the random editing operation is performed on the virtual image, so that the reality of the virtual image can be improved. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
In one possible design, the antagonistic neural network includes a generator and an arbiter;
correspondingly, before the generating a virtual image according to the image to be processed by using a generator in the preset antagonistic neural network, the method further includes:
acquiring a data set to be trained from a data server, wherein the data set to be trained comprises a plurality of images to be trained under real scenes;
inputting the image to be trained into the generator to obtain a generated image corresponding to the image to be trained;
and inputting the generated image and the image to be trained under the real scene into the discriminator so that the discriminator judges the authenticity of the generated image and the image to be trained under the real scene, and carrying out supervision training on the generator according to a judgment result until the antagonistic neural network converges.
In the image processing method provided by this embodiment, by training the preset antagonistic neural network on the image set to be trained in advance, the generator can be supervised by the discriminator, so that the degree of reality of the virtual image generated by the generator is higher, and the adaptability of the corresponding target image obtained after editing processing according to the virtual image is higher.
In a possible design, before the generating a virtual image according to the image to be processed by using a generator in a preset antagonistic neural network, the method further includes:
and performing clipping operation on the image to be processed through a preset image clipping model.
In one possible design, the performing, by using a preset image cropping model, a cropping operation on the image to be processed includes:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
In one possible design, the randomly editing each virtual image in the virtual image set includes:
and performing random-size cutting operation on each virtual image in the virtual image set.
In one possible design, the randomly editing each virtual image in the virtual image set includes:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
In a possible design, after the generating a virtual image according to the image to be processed by using a generator in a preset antagonistic neural network, the method further includes:
and inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
In one possible design, after the sending the target image set to a data server for storage, the method further includes:
acquiring a target image set acquisition instruction sent by terminal equipment;
and acquiring the target image set from a data server according to the target image set acquisition instruction, and sending the target image set to the terminal equipment so that the terminal equipment performs virtual head portrait setting operation according to the target image set.
The image processing method provided by this embodiment obtains the target image set from the data server according to the target image set obtaining instruction sent by the terminal device, and sends the target image set to the terminal device. Therefore, the user can perform the operation of setting the virtual avatar on the terminal equipment, and the user experience is improved.
A second aspect of the present disclosure is to provide an image processing apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a preset image set to be processed from a data server, a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set;
the generating module is used for generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set;
the editing module is used for carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set;
and the storage module is used for sending the target image set to a data server for storage.
The image processing apparatus provided in this embodiment generates a virtual image according to a user image in a real scene in a preset image set to be processed by using a generator in a preset antagonistic neural network, and performs a random editing operation on the virtual image, thereby improving the reality of the virtual image. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
In one possible design, the antagonistic neural network includes a generator and an arbiter;
correspondingly, the device further comprises:
the data set acquisition module is used for acquiring a data set to be trained from the data server, wherein the data set to be trained comprises a plurality of images to be trained under a real scene;
the first training module is used for inputting the image to be trained into the generator to obtain a generated image corresponding to the image to be trained;
and the second training module is used for inputting the generated image and the image to be trained under the real scene into the discriminator so as to enable the discriminator to judge the authenticity of the generated image and the image to be trained under the real scene, and supervise and train the generator according to a judgment result until the antagonistic neural network converges.
The image processing apparatus provided in this embodiment trains a preset antagonistic neural network through a to-be-trained image set in advance, and can supervise the generator through the discriminator, so that the degree of reality of the virtual image generated by the generator is higher, and the adaptability of the corresponding target image obtained after editing processing according to the virtual image is stronger.
In one possible design, the apparatus further includes:
and the cutting module is used for cutting the image to be processed through a preset image cutting model.
In one possible design, the cropping module is to:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
In one possible design, the editing module is to:
and performing random-size cutting operation on each virtual image in the virtual image set.
In one possible design, the editing module is to:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
In one possible design, the apparatus further includes:
and the screening module is used for inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
In one possible design, the apparatus further includes:
the instruction acquisition module is used for acquiring a target image set acquisition instruction sent by the terminal equipment;
and the sending module is used for obtaining the target image set from a data server according to the target image set obtaining instruction and sending the target image set to the terminal equipment so that the terminal equipment can carry out the setting operation of the virtual head portrait according to the target image set.
The image processing apparatus provided in this embodiment acquires a target image set from a data server according to a target image set acquisition instruction sent by a terminal device, and sends the target image set to the terminal device. Therefore, the user can perform the operation of setting the virtual avatar on the terminal equipment, and the user experience is improved.
A third aspect of the present disclosure is to provide an image processing apparatus comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the image processing method according to the first aspect by the processor.
A fourth aspect of the present disclosure is to provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the image processing method according to the first aspect when the computer-executable instructions are executed by a processor.
According to the image processing method, the image processing device, the image processing equipment and the computer readable storage medium, the generator in the preset antagonistic neural network is adopted, the virtual image is generated according to the user image under the real scene in the preset image set to be processed, and random editing operation is carried out on the virtual image, so that the reality of the virtual image can be improved. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of a network architecture upon which the present disclosure is based;
fig. 2 is a schematic flowchart of an image processing method according to a first embodiment of the disclosure;
fig. 3 is a schematic diagram of images to be processed with different ratios according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of an image processing method according to a second embodiment of the disclosure;
FIG. 5 is a diagram of a network architecture for an anti-neural network provided by an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of an image processing method according to a third embodiment of the disclosure;
FIG. 7 is a diagram of yet another system architecture provided in accordance with yet another embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an image processing apparatus according to a fourth embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an image processing apparatus according to a fifth embodiment of the present disclosure;
fig. 10 is a schematic flowchart of an image processing method according to a sixth embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an image processing apparatus according to a seventh embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments obtained based on the embodiments in the disclosure belong to the protection scope of the disclosure.
In order to solve the above-mentioned technical problems that the image generated by the existing virtual avatar generation method is poor in effect and cannot meet the actual use requirements, the present disclosure provides an image processing method, an image processing apparatus, an image processing device, and a computer-readable storage medium.
It should be noted that the image processing method, apparatus, device and computer-readable storage medium provided in the present application may be applied to a scene that requires a large amount of random avatars.
The existing virtual head portrait generation method is generally obtained by directly performing size and color editing operation on a real image, so that the generation of batch virtual head portraits cannot be realized, and the applicability is not strong.
In order to obtain batch virtual head images with strong applicability, the inventor finds out through research that a neural network model can be used for generating virtual images according to real images, and in practical application, the neural network model can generate a plurality of virtual images according to the same real image.
The inventor further researches and discovers that a generator in a preset antagonistic neural network can be adopted to generate a virtual image according to a user image under a real scene in a preset image set to be processed, and random editing operation is carried out on the virtual image, so that the reality of the virtual image can be improved. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
Fig. 1 is a schematic diagram of a network architecture based on the present disclosure, and as shown in fig. 1, the network architecture based on the present disclosure at least includes: an image processing apparatus 1 and a data server 2. The image processing device 1 is written by C/C + +, Java, Shell or Python; the data server 2 may be a cloud server or a server cluster, and a large amount of data is stored therein. The image processing apparatus 1 is communicatively connected to the data server 2, and is capable of information exchange with the data server 2.
Fig. 2 is a schematic flowchart of an image processing method according to a first embodiment of the disclosure, and as shown in fig. 2, the method includes:
step 101, obtaining a preset image set to be processed from a data server, wherein a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set.
The execution subject of the present embodiment is an image processing apparatus. The image processing device is in communication connection with the data server, so that information interaction can be carried out with the data server. The image processing apparatus may be installed in the terminal device, or may be an apparatus independent from the terminal device.
In this embodiment, in order to generate a batch of virtual images, the image processing apparatus may obtain a preset image set to be processed from the data server, where the image set to be processed includes a plurality of images to be processed, and each image to be processed is a user image in a real scene. It should be noted that the image set to be processed is an open source data set, so that the image set to be processed is easier to acquire.
And 102, generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set.
In this embodiment, after the image set to be processed is obtained, a preset antagonistic neural network may be used to generate a virtual image. Specifically, the images to be processed in the image set to be processed may be input into a generator in a preset antagonistic neural network, and a virtual image set is obtained, where the generator is configured to generate a virtual image according to the images to be processed. It should be noted that, because the antagonistic neural network generally includes a generator and a discriminator, the generator and the discriminator are antagonistic to each other during the training process, so as to enable the image generated by the generator to be closer to the real image. So that the degree of similarity between the virtual image generated by the antagonistic neural network and the image to be processed is high.
Further, on the basis of any of the above embodiments, before the step 102, the method further includes:
and performing clipping operation on the image to be processed through a preset image clipping model.
In this embodiment, before training the anti-neural network model, the image to be trained needs to be preprocessed first. Specifically, the image to be processed may be clipped through a preset image clipping model.
Specifically, on the basis of any of the above embodiments, the performing, by using a preset image cropping model, a cropping operation on an image to be processed includes:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
Specifically, different parameters may be set for the image cropping model, so that after the image to be processed is cropped by the image cropping model, the image to be processed with different target object ratios can be obtained. Fig. 3 is a schematic diagram of images to be processed with different proportions, as shown in fig. 3, after image cropping is performed by using an image cropping model, images to be trained with different face proportions can be obtained, and after the images are cropped, the difference between the images to be processed can be improved, so that the applicability of a virtual image generated according to the images to be processed is stronger.
And 103, carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set.
In the present embodiment, in order to obtain target images in different batches, after a virtual image set corresponding to an image set to be processed is obtained through a countering neural network, random editing operations may be performed on each virtual image in the virtual image set to obtain the target image set.
Specifically, on the basis of the first embodiment, the step 103 may specifically include:
and performing random-size cutting operation on each virtual image in the virtual image set.
In this embodiment, a random-size clipping operation may be performed on the virtual image output by the reactive network model, so as to obtain a plurality of target images of different sizes.
Optionally, on the basis of the first embodiment, step 103 may specifically include:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
In this embodiment, a random color adjustment operation may be performed on the virtual image output by the reactive network model to obtain a plurality of target images of different colors.
The two embodiments described above may be implemented individually or in combination. The above embodiments can be seen in detail in the implementation manner of separate implementation, and when the above embodiments are implemented in combination, the virtual image can be adjusted in random size and color at the same time, so as to obtain a plurality of target images with different sizes and colors. Further, operations such as setting of the avatar can be performed based on the target image.
Further, in order to improve the quality of the generated virtual image, after step 103, the method further includes:
and inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
In this embodiment, after the virtual image set is obtained through the anti-neural network, in order to improve the degree of reality of the virtual image, each virtual image in the virtual image set may be input into a preset screening model, and the virtual avatar with low degree of reality is deleted, so as to obtain the screened virtual image. It should be noted that any method capable of implementing image filtering may be used to perform the filtering operation on the virtual image, and the disclosure is not limited thereto.
And 104, sending the target image set to a data server for storage.
In this embodiment, after the target image set is obtained, the target image set may be sent to a data server for storage. Therefore, when the terminal equipment has a virtual image using requirement, the target image set can be acquired from the data server, and the operation such as head portrait setting can be carried out according to the target image set.
According to the image processing method provided by the embodiment, the generator in the preset antagonistic neural network is adopted, the virtual image is generated according to the user image in the real scene in the preset image set to be processed, and the random editing operation is performed on the virtual image, so that the reality of the virtual image can be improved. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
Fig. 4 is a schematic flow chart of an image processing method provided in a second embodiment of the present disclosure, and on the basis of the first embodiment, the neural network specifically includes a generator and a discriminator, and accordingly, as shown in fig. 4, before step 102, the method further includes:
step 201, acquiring a data set to be trained from a data server, wherein the data set to be trained comprises a plurality of images to be trained in a real scene;
step 202, inputting the image to be trained into the generator to obtain a generated image corresponding to the image to be trained;
step 203, inputting the generated image and the image to be trained in the real scene into the discriminator, so that the discriminator judges the reality of the generated image and the image to be trained in the real scene, and performing supervised training on the generator according to the judgment result until the antagonistic neural network converges.
In the embodiment, the antagonistic neural network generally comprises a generator and an arbiter, and the generator and the arbiter resist each other in the training process, so that the image generated by the generator can be promoted to be closer to a real image. Fig. 5 is a network architecture diagram of a countering neural network provided in an embodiment of the present disclosure, as shown in fig. 5, the countering neural network includes a generator and a discriminator, the generator is configured to generate a virtual image according to an image to be trained, and the discriminator is configured to discriminate the virtual image output by the discriminator and an input real image to be trained, and urge the generator to generate a more real image. Specifically, in order to implement training on an anti-neural network, a preset data set to be trained needs to be acquired from a data server, wherein the data set to be trained includes a plurality of images to be trained, and the images to be trained are face images in a real scene. And the data set to be trained is an open source data set. And inputting each data to be trained in the data set to be trained into the generator to obtain a generated image corresponding to the image to be trained output by the generator.
And inputting the generated image output by the generator and the image to be trained in the real scene into the discriminator together. After the generated images are received by the discriminator, the generated images are discriminated as false as possible, when the images to be trained are received, the images to be trained are discriminated as true, the images to be trained continuously resist the generator, and the truth of the images output by the monitoring generator is higher and higher. The generator and the discriminator are continuously antagonized until the antagonistic neural network converges. Thereby enabling the generation operation of the virtual image with the generator.
In the image processing method provided by this embodiment, by training the preset antagonistic neural network on the image set to be trained in advance, the generator can be supervised by the discriminator, so that the degree of reality of the virtual image generated by the generator is higher, and the adaptability of the corresponding target image obtained after editing processing according to the virtual image is higher.
Fig. 6 is a schematic flowchart of an image processing method according to a third embodiment of the present disclosure, and on the basis of any of the foregoing embodiments, as shown in fig. 6, after step 104, the method further includes:
301, acquiring a target image set acquisition instruction sent by a terminal device;
step 302, acquiring the target image set from a data server according to the target image set acquisition instruction, and sending the target image set to the terminal device, so that the terminal device performs a virtual avatar setting operation according to the target image set.
Fig. 7 is a further system architecture diagram according to another embodiment of the present disclosure, and as shown in fig. 7, the system architecture based on the present disclosure further includes a terminal device 3, and the image processing apparatus 1 may be communicatively connected to the data server 2 and the terminal device 3, respectively, so as to be able to perform information interaction with the data server 2 and the terminal device 3, respectively.
In this embodiment, after the target image set is obtained, the target image set may be sent to a data server for storage. Therefore, when the terminal equipment has a virtual image using requirement, the target image set can be acquired from the data server, and the operation such as head portrait setting can be carried out according to the target image set. Specifically, a target image set acquisition instruction sent by the terminal device may be acquired. After the target image set obtaining instruction is obtained, a target image set can be obtained from a data server according to the target image set obtaining instruction, and the target image set is sent to the terminal device. So that the user can perform an operation of virtual avatar setting on the terminal device.
For example, in practical applications, when a virtual avatar needs to be set for an NPC in a large-scale network game, a target image set acquisition instruction may be sent to the image processing apparatus through the terminal device. Accordingly, the image processing apparatus can acquire the target image set from the data server according to the target image set acquisition instruction and feed back the target image set to the terminal device. The terminal device can set virtual head portraits for the NPCs respectively according to the target image set.
Still in terms of the practical application distance, when the user does not want to adopt the private image as the avatar, it is possible to acquire the instruction by sending the target image set to the image processing apparatus through the terminal device. Accordingly, the image processing apparatus can randomly acquire a target image from the data server according to the target image set acquisition instruction, and feed back the virtual image to the terminal device, so that the user can directly take the target image as the avatar.
The image processing method provided by this embodiment obtains the target image set from the data server according to the target image set obtaining instruction sent by the terminal device, and sends the target image set to the terminal device. Therefore, the user can perform the operation of setting the virtual avatar on the terminal equipment, and the user experience is improved.
Fig. 8 is a schematic structural diagram of an image processing apparatus according to a fourth embodiment of the disclosure, and as shown in fig. 8, the image processing apparatus includes: the image processing system comprises an acquisition module 41, a generation module 42, an editing module 43 and a storage module 44, wherein the acquisition module 41 is configured to acquire a preset image set to be processed from a data server, a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set; a generating module 42, configured to generate a virtual image according to the image to be processed by using a generator in a preset antagonistic neural network, so as to obtain a virtual image set; an editing module 43, configured to perform a random editing operation on each virtual image in the virtual image set to obtain a target image set; and the storage module 44 is configured to send the target image set to a data server for storage.
Further, on the basis of the fourth embodiment, the apparatus further includes:
and the cutting module is used for cutting the image to be processed through a preset image cutting model.
Further, on the basis of the fourth embodiment, the clipping module is configured to:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
Further, on the basis of the fourth embodiment, the editing module is configured to:
and performing random-size cutting operation on each virtual image in the virtual image set.
Further, on the basis of the fourth embodiment, the editing module is configured to:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
Further, on the basis of the fourth embodiment, the apparatus further includes:
and the screening module is used for inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
The image processing apparatus provided in this embodiment generates a virtual image according to a user image in a real scene in a preset image set to be processed by using a generator in a preset antagonistic neural network, and performs a random editing operation on the virtual image, thereby improving the reality of the virtual image. Because the antagonistic neural network comprises the generator and the discriminator, the discriminator continuously carries out supervision training on the generator according to the discrimination result, so that the similarity between the image generated by the generator and the real image is higher. Further, by randomly editing the generated virtual image, the applicability of the virtual image can be further improved. And the data set with an open source is used as the image set to be processed, so that the acquisition difficulty of the image set to be processed can be reduced.
Fig. 9 is a schematic structural diagram of an image processing apparatus according to a fifth embodiment of the present disclosure, and based on the fourth embodiment, as shown in fig. 9, the antagonistic neural network includes a generator and a discriminator; correspondingly, the device further comprises: the training system comprises a data set acquisition module 51, a first training module 52 and a second training module 53, wherein the data set acquisition module 51 is used for acquiring a data set to be trained from a data server, and the data set to be trained comprises a plurality of images to be trained in real scenes; a first training module 52, configured to input the image to be trained into the generator, and obtain a generated image corresponding to the image to be trained; and the second training module 53 is configured to input the generated image and the image to be trained in the real scene into the discriminator, so that the discriminator judges the reality of the generated image and the image to be trained in the real scene, and perform supervised training on the generator according to a judgment result until the antagonistic neural network converges.
The image processing apparatus provided in this embodiment trains a preset antagonistic neural network through a to-be-trained image set in advance, and can supervise the generator through the discriminator, so that the degree of reality of the virtual image generated by the generator is higher, and the adaptability of the corresponding target image obtained after editing processing according to the virtual image is stronger.
Fig. 10 is a schematic flowchart of an image processing method according to a sixth embodiment of the present disclosure, and on the basis of any of the foregoing embodiments, as shown in fig. 10, the image processing apparatus further includes: the device comprises an instruction acquisition module 61 and a sending module 62, wherein the instruction acquisition module 61 is used for acquiring a target image set acquisition instruction sent by the terminal equipment; a sending module 62, configured to obtain the target image set from a data server according to the target image set obtaining instruction, and send the target image set to the terminal device, so that the terminal device performs a virtual avatar setting operation according to the target image set.
The image processing apparatus provided in this embodiment acquires a target image set from a data server according to a target image set acquisition instruction sent by a terminal device, and sends the target image set to the terminal device. Therefore, the user can perform the operation of setting the virtual avatar on the terminal equipment, and the user experience is improved.
Fig. 11 is a schematic structural diagram of an image processing apparatus according to a seventh embodiment of the present disclosure, and as shown in fig. 11, the image processing apparatus includes: a memory 71, a processor 72;
a memory 71; a memory 71 for storing instructions executable by the processor 72;
wherein the processor 72 is configured to execute the image processing method according to any of the above embodiments by the processor 72.
The memory 71 stores programs. In particular, the program may include program code comprising computer operating instructions. The memory 71 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 72 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present disclosure.
Alternatively, in a specific implementation, if the memory 71 and the processor 72 are implemented independently, the memory 71 and the processor 72 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (enhanced Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 11, but this is not intended to represent only one bus or type of bus.
Alternatively, in a specific implementation, if the memory 71 and the processor 72 are integrated on a chip, the memory 71 and the processor 72 may perform the same communication through an internal interface.
Yet another embodiment of the present disclosure further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is used for implementing the image processing method according to any one of the above embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (18)

1. An image processing method, comprising:
acquiring a preset image set to be processed from a data server, wherein a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set;
generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set;
carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set;
and sending the target image set to a data server for storage.
2. The method of claim 1, wherein the antagonistic neural network comprises a generator and an arbiter;
correspondingly, before the generating a virtual image according to the image to be processed by using a generator in the preset antagonistic neural network, the method further includes:
acquiring a data set to be trained from a data server, wherein the data set to be trained comprises a plurality of images to be trained under real scenes;
inputting the image to be trained into the generator to obtain a generated image corresponding to the image to be trained;
and inputting the generated image and the image to be trained under the real scene into the discriminator so that the discriminator judges the authenticity of the generated image and the image to be trained under the real scene, and carrying out supervision training on the generator according to a judgment result until the antagonistic neural network converges.
3. The method according to claim 1 or 2, wherein before generating the virtual image from the image to be processed by using the generator in the preset antagonistic neural network, the method further comprises:
and performing clipping operation on the image to be processed through a preset image clipping model.
4. The method according to claim 1, wherein the performing a cropping operation on the image to be processed through a preset image cropping model comprises:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
5. The method of claim 1, wherein the randomly editing each virtual image in the set of virtual images comprises:
and performing random-size cutting operation on each virtual image in the virtual image set.
6. The method of claim 1, wherein the randomly editing each virtual image in the set of virtual images comprises:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
7. The method according to any one of claims 1-2 and 4-6, wherein after the generating a virtual image according to the image to be processed by using a generator in a preset antagonistic neural network, the method further comprises:
and inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
8. The method of any one of claims 1-2 and 4-6, wherein after sending the target image set to a data server for storage, further comprising:
acquiring a target image set acquisition instruction sent by terminal equipment;
and acquiring the target image set from a data server according to the target image set acquisition instruction, and sending the target image set to the terminal equipment so that the terminal equipment performs virtual head portrait setting operation according to the target image set.
9. An image processing apparatus characterized by comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a preset image set to be processed from a data server, a plurality of images to be processed in the image set to be processed are user images in a real scene, and the image set to be processed is an open source data set;
the generating module is used for generating a virtual image according to the image to be processed by adopting a generator in a preset antagonistic neural network to obtain a virtual image set;
the editing module is used for carrying out random editing operation on each virtual image in the virtual image set to obtain a target image set;
and the storage module is used for sending the target image set to a data server for storage.
10. The apparatus of claim 9, wherein the antagonistic neural network comprises a generator and an arbiter;
correspondingly, the device further comprises:
the data set acquisition module is used for acquiring a data set to be trained from the data server, wherein the data set to be trained comprises a plurality of images to be trained under a real scene;
the first training module is used for inputting the image to be trained into the generator to obtain a generated image corresponding to the image to be trained;
and the second training module is used for inputting the generated image and the image to be trained under the real scene into the discriminator so as to enable the discriminator to judge the authenticity of the generated image and the image to be trained under the real scene, and supervise and train the generator according to a judgment result until the antagonistic neural network converges.
11. The apparatus of claim 9 or 10, further comprising:
and the cutting module is used for cutting the image to be processed through a preset image cutting model.
12. The apparatus of claim 9, wherein the cropping module is configured to:
and setting different parameters for the image cutting model, and cutting the image to be processed through the preset image cutting model to obtain the image to be trained with different target object occupation ratios.
13. The apparatus of claim 9, wherein the editing module is configured to:
and performing random-size cutting operation on each virtual image in the virtual image set.
14. The apparatus of claim 9, wherein the editing module is configured to:
and carrying out random color adjustment operation on each virtual image in the virtual image set.
15. The apparatus of any of claims 9-10, 12-14, further comprising:
and the screening module is used for inputting the virtual image into a preset screening model to carry out screening operation so as to delete the virtual avatar with low true degree and obtain the screened virtual avatar.
16. The apparatus of any of claims 9-10, 12-14, further comprising:
the instruction acquisition module is used for acquiring a target image set acquisition instruction sent by the terminal equipment;
and the sending module is used for obtaining the target image set from a data server according to the target image set obtaining instruction and sending the target image set to the terminal equipment so that the terminal equipment can carry out the setting operation of the virtual head portrait according to the target image set.
17. An image processing apparatus characterized by comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the image processing method of any one of claims 1-8 by the processor.
18. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the image processing method of any one of claims 1 to 8.
CN202010431363.6A 2020-05-20 2020-05-20 Image processing method, device, equipment and computer readable storage medium Pending CN111589156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010431363.6A CN111589156A (en) 2020-05-20 2020-05-20 Image processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010431363.6A CN111589156A (en) 2020-05-20 2020-05-20 Image processing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111589156A true CN111589156A (en) 2020-08-28

Family

ID=72182895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010431363.6A Pending CN111589156A (en) 2020-05-20 2020-05-20 Image processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111589156A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257653A (en) * 2020-11-06 2021-01-22 Oppo广东移动通信有限公司 Method and device for determining space decoration effect graph, storage medium and electronic equipment
CN114120412A (en) * 2021-11-29 2022-03-01 北京百度网讯科技有限公司 Image processing method and device
CN115447853A (en) * 2022-09-28 2022-12-09 厦门烟草工业有限责任公司 Defective cigarette packet recognition device and recognition method, rejection device and cigarette processing system
CN117338436A (en) * 2023-12-06 2024-01-05 鸡西鸡矿医院有限公司 Manipulator and control method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875766A (en) * 2017-11-29 2018-11-23 北京旷视科技有限公司 Method, apparatus, system and the computer storage medium of image procossing
CN108875510A (en) * 2017-11-28 2018-11-23 北京旷视科技有限公司 Method, apparatus, system and the computer storage medium of image procossing
CN109933677A (en) * 2019-02-14 2019-06-25 厦门一品威客网络科技股份有限公司 Image generating method and image generation system
CN110097086A (en) * 2019-04-03 2019-08-06 平安科技(深圳)有限公司 Image generates model training method, image generating method, device, equipment and storage medium
CN110321849A (en) * 2019-07-05 2019-10-11 腾讯科技(深圳)有限公司 Image processing method, device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875510A (en) * 2017-11-28 2018-11-23 北京旷视科技有限公司 Method, apparatus, system and the computer storage medium of image procossing
CN108875766A (en) * 2017-11-29 2018-11-23 北京旷视科技有限公司 Method, apparatus, system and the computer storage medium of image procossing
CN109933677A (en) * 2019-02-14 2019-06-25 厦门一品威客网络科技股份有限公司 Image generating method and image generation system
CN110097086A (en) * 2019-04-03 2019-08-06 平安科技(深圳)有限公司 Image generates model training method, image generating method, device, equipment and storage medium
CN110321849A (en) * 2019-07-05 2019-10-11 腾讯科技(深圳)有限公司 Image processing method, device and computer readable storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257653A (en) * 2020-11-06 2021-01-22 Oppo广东移动通信有限公司 Method and device for determining space decoration effect graph, storage medium and electronic equipment
CN112257653B (en) * 2020-11-06 2024-06-07 Oppo广东移动通信有限公司 Method and device for determining space decoration effect graph, storage medium and electronic equipment
CN114120412A (en) * 2021-11-29 2022-03-01 北京百度网讯科技有限公司 Image processing method and device
CN114120412B (en) * 2021-11-29 2022-12-09 北京百度网讯科技有限公司 Image processing method and device
CN115447853A (en) * 2022-09-28 2022-12-09 厦门烟草工业有限责任公司 Defective cigarette packet recognition device and recognition method, rejection device and cigarette processing system
CN117338436A (en) * 2023-12-06 2024-01-05 鸡西鸡矿医院有限公司 Manipulator and control method thereof
CN117338436B (en) * 2023-12-06 2024-02-27 鸡西鸡矿医院有限公司 Manipulator and control method thereof

Similar Documents

Publication Publication Date Title
CN111589156A (en) Image processing method, device, equipment and computer readable storage medium
US11482040B2 (en) Face anti-counterfeiting detection methods and systems, electronic devices, programs and media
CN109859295B (en) Specific cartoon face generation method, terminal device and storage medium
CN110599387A (en) Method and device for automatically removing image watermark
CN110956691B (en) Three-dimensional face reconstruction method, device, equipment and storage medium
CN111369428B (en) Virtual head portrait generation method and device
CN111985281B (en) Image generation model generation method and device and image generation method and device
CN113240692A (en) Image processing method, device, equipment and storage medium
CN111192313B (en) Method for constructing map by robot, robot and storage medium
CN110781770A (en) Living body detection method, device and equipment based on face recognition
CN111583280B (en) Image processing method, device, equipment and computer readable storage medium
CN111967319A (en) Infrared and visible light based in-vivo detection method, device, equipment and storage medium
TW202016876A (en) Method, apparatus and electronic device for image processing and storage medium thereof
CN111080546B (en) Picture processing method and device
CN114612986A (en) Detection method, detection device, electronic equipment and storage medium
CN106534485A (en) Method and device for setting group head portrait
CN110415318B (en) Image processing method and device
US11967344B2 (en) Video processing method and apparatus, device and computer readable storage medium
CN111461971B (en) Image processing method, device, equipment and computer readable storage medium
CN111097169A (en) Game image processing method, device, equipment and storage medium
CN111369612A (en) Three-dimensional point cloud image generation method and equipment
CN115250313A (en) Variable mode scanning method, device, equipment and storage medium
CN109636935A (en) Personnel register method, apparatus and storage medium
CN114612989A (en) Method and device for generating face recognition data set, electronic equipment and storage medium
CN111611843A (en) Face detection preprocessing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination