WO2023109829A1 - 图像处理方法、装置、电子设备及存储介质 - Google Patents

图像处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023109829A1
WO2023109829A1 PCT/CN2022/138760 CN2022138760W WO2023109829A1 WO 2023109829 A1 WO2023109829 A1 WO 2023109829A1 CN 2022138760 W CN2022138760 W CN 2022138760W WO 2023109829 A1 WO2023109829 A1 WO 2023109829A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
image
special effect
target object
processed
Prior art date
Application number
PCT/CN2022/138760
Other languages
English (en)
French (fr)
Inventor
黄佳斌
Original Assignee
北京字跳网络技术有限公司
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 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023109829A1 publication Critical patent/WO2023109829A1/zh

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation

Definitions

  • the present disclosure relates to the technical field of image processing, for example, to an image processing method, device, electronic equipment, and storage medium.
  • GAN Generative Adversarial Network
  • the present disclosure provides an image processing method, device, electronic equipment and storage medium, so as to realize the technical effects of authenticity and diversity of special effect display.
  • the present disclosure provides an image processing method, the method comprising:
  • a target image with a target special effect added to the target object is obtained.
  • an image processing device which includes:
  • An image acquisition module configured to respond to the instruction of adding special effects, and acquire the image to be processed including the target object
  • a rendering area determination module configured to segment the image to be processed based on an image segmentation model to obtain at least two target rendering areas corresponding to the image to be processed;
  • the target image determination module is configured to obtain a target image with target special effects added to the target object based on the at least two target rendering areas and special effect parameters.
  • the present disclosure also provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • a storage device configured to store one or more programs
  • the one or more processors implement the above image processing method.
  • the present disclosure also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute the above-mentioned image processing method when executed by a computer processor.
  • the present disclosure further provides a computer program product, including a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the above-mentioned image processing method.
  • FIG. 1 is a schematic flow chart of an image processing method provided in Embodiment 1 of the present disclosure
  • Fig. 2 is a schematic diagram of an ear dyeing effect provided by Embodiment 1 of the present disclosure
  • FIG. 3 is a schematic flowchart of an image processing method provided in Embodiment 2 of the present disclosure.
  • FIG. 4 is a schematic flow chart of an image processing method provided by Embodiment 3 of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an image processing device provided by Embodiment 4 of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by Embodiment 5 of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” means “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a schematic flow chart of an image processing method provided by Embodiment 1 of the present disclosure.
  • This embodiment of the present disclosure is applicable to any image display or video shooting scene supported by the Internet, and is used to add special effects, so that the added special effects are most suitable for the object, the method can be executed by an image processing device, and the device can be implemented in the form of software and/or hardware, for example, by electronic equipment, which can It is a mobile terminal, a personal computer (Personal Computer, PC) or a server.
  • the scene of arbitrary image display is usually implemented by the cooperation of the client and the server.
  • the method provided in this embodiment can be executed by the server, the client, or the cooperation of the client and the server.
  • the method includes:
  • the application scenario may be described as an example first.
  • the disclosed technical solution can be applied to any screen that requires special effects display, for example, in a video call, special effects can be displayed; or, in a live broadcast scene, special effects can be displayed for anchor users; it can also be applied in the process of video shooting , to display special effects on the image corresponding to the captured user, such as in the short video shooting scene. It may also be the case to add special effects to the user in still captured images.
  • the device for executing the image processing method provided by the embodiments of the present disclosure may be integrated into application software supporting image processing functions, and the software may be installed in electronic equipment, for example, the electronic equipment may be a mobile terminal or a PC.
  • the application software may be a type of software for image/video processing, and the application software will not be described here one by one, as long as the image/video processing can be realized.
  • the display interface may include a button for adding special effects.
  • the special effect button For example, after the user triggers the special effect button, at least one special effect to be added may pop up, and the user may select one of the multiple special effects to be added as the target special effect.
  • the server may determine to add the corresponding special effect to the object in the captured image. At this point, the server or the client may respond to the special effect adding instruction and collect the image to be processed including the target object.
  • the image to be processed may be an image collected based on the application software, and may be an image collected at a time consistent with the special effect adding instruction when the special effect adding instruction is triggered, and the image may include objects for which special effects need to be added.
  • the camera device may collect images to be processed including the target object in the target scene in real time or at intervals from the triggering of the special effect adding instruction.
  • the responding to the special effect adding instruction, and collecting the image to be processed including the target object includes: when it is detected that the target object triggers the special effect adding wake-up word, generating a special effect adding instruction, and collecting the image to be processed including the target object ; or, when it is detected that the special effect addition control is triggered, the special effect addition instruction is generated, and the image to be processed including the target object is collected; or, when the target object is detected in the field of view, the image to be processed including the target object is collected .
  • the voice information of the anchor user or the subject can be collected, and the collected voice information can be analyzed and processed to identify the text corresponding to the voice information.
  • the text corresponding to the voice information includes a pre-set wake-up word, for example, the wake-up word can be: "Please turn on the special effect function" and other types of words, it means that the anchor or the subject needs to be displayed with special effects.
  • you can An image to be processed including a target object is acquired. That is, in this case, it indicates that the target object triggers the wake-up word for adding special effects, and the corresponding special effects provided by the technical solution may be added to the target object.
  • the added special effect may be a special effect of dyeing the target object's hair, and the hair dyeing special effect does not directly replace the hair color of the target object with the color to be displayed as disclosed in related technologies.
  • the special effect adding control may be a button that can be displayed on the display interface of the application software, and the triggering representation of the button needs to collect the image to be processed and perform special effect processing on the image to be processed. When the user triggers the button, it can be considered that the image function displayed by the special effect is to be triggered, and at this time, the image to be processed including the target object can be collected.
  • the user triggers the special effect adding control, it may be automatically triggered to capture the image to be processed including the target object.
  • the facial features in the collected image to be used can be analyzed and processed in real time, and the feature detection result of each part in the facial image can be obtained, which can be used as the feature to be detected.
  • the feature to be detected matches the preset feature, for example, at least one feature that triggers a special effect display for each part is preset, and when a part triggers the corresponding feature, a special effect adding instruction can be generated, and then the image to be processed can be collected. It may also be that when it is detected that the target object is included in the incoming frame, it means that image acquisition is triggered, and the image to be processed including the target object may be acquired.
  • the image can be collected in real time, and the image collected at this time can be used as the image to be used.
  • the image analysis can be used Processing, if the analysis results meet the specific requirements, the image to be used when the specific requirements are met can be used as the image to be processed.
  • the implementation of this technical solution can be realized by the client or by the server; it can be that after the video shooting is completed, each video frame in the video is processed and then sent to the client for display, or it can be In the process of video shooting, each captured video frame is sequentially processed, and each video frame is an image to be processed at this time.
  • S120 Perform segmentation processing on the image to be processed based on an image segmentation model to obtain at least two target rendering regions corresponding to the image to be processed.
  • the image segmentation model is a pre-trained neural network model. If you need to determine the rendering area in the image to be processed, you can obtain multiple training samples (the training sample is a training image), and mark multiple areas in each training sample, such as selecting multiple areas in the training image to mark.
  • the training image is used as the input parameter of the image segmentation model to be trained, and the image containing the marked area is used as the output of the image segmentation model.
  • an image segmentation model can be trained.
  • the number of the at least two target rendering regions can be two, three or more, and the rendering regions correspond to the corresponding marked regions of the images in the training samples of the image segmentation model.
  • the image to be processed can be input into a pre-trained image segmentation model, multiple rendering regions in the image to be processed can be determined based on the image segmentation model, and the multiple rendering regions determined at this time are used as target rendering regions.
  • the input of the image segmentation model may be an image to be processed, and the output of the model may be an image in which the rendering area in the current image to be processed is determined.
  • the image segmentation model is a neural network, the network structure can be Visual Geometry Group Network (Visual Geometry Group Network, VGG), Residual Network (Residual Network, ResNet), GoogleNet, MobileNet, ShuffleNet, etc., for different network structures That said, different network structures have different computational loads, and not all models are lightweight. That is, some models have a large amount of calculation and are not suitable for deployment on the mobile terminal, while models with a small amount of calculation, high computational efficiency, and simplicity are easier to deploy on the mobile terminal.
  • the MobileNet and ShuffleNet model structures can be used.
  • the principle of the above model structure is to change the traditional convolution into separable convolution, that is, depthwise convolution and point-wise convolution, the purpose is to reduce the amount of calculation; in addition, Inverted Residuals is used to improve the feature extraction ability of depthwise convolution; at the same time
  • the simple operation of the shuffle channel is also used to improve the expressive ability of the model.
  • the above is the basic module design of the model.
  • the model is basically stacked by the above modules.
  • the advantage of this type of model is that it takes less time to infer and can be applied to On terminals with higher requirements. If it is implemented by a server, any of the above-mentioned neural networks can be used, as long as the rendering area in the image to be processed can be determined.
  • the foregoing is only a description of the image segmentation model, and does not limit it.
  • performing segmentation processing on the image to be processed based on the image segmentation model to obtain at least two target rendering regions corresponding to the image to be processed includes: performing segmentation processing on the image to be processed based on the image segmentation model Segmenting the target object in the image to be processed, determining the bounding box area corresponding to the target object and at least one rendering area to be processed; based on the bounding box area and the at least one rendering area to be processed, determining the at least Two target rendering areas.
  • the at least two target rendering areas are ear dye areas
  • the border frame area is an area surrounding the hair of the target object.
  • the special effects added to the target object in this technical solution may be special effects of hair dyeing, in order to make the special effects of hair dyeing best match the real scene or the individual needs of users. For example, it is necessary to determine the hair dyeing effect of each color, or the effect of dyeing each color in the corresponding area, which can be determined based on this technical solution.
  • the ear dyeing area can use the edge line of the ear as the dividing line for image segmentation, and the area below the edge line and close to the face as the inner ear dyeing area; the area above the edge line and relatively far away from the face
  • the area of the ear is the outer ear dyeing area, see Figure 2, the area corresponding to the mark 1 is the outer ear dyeing area, and the area corresponding to the mark 2 is the inner ear dyeing area.
  • the bounding box area may be an area corresponding to the hair of the target object.
  • Mark 1 indicates the dyed area of the left and right outer ears
  • Mark 2 indicates the dyed area of the left and right inner ears.
  • the image segmentation model can segment the input image to be processed, determine the area to be added with special effects in the image to be processed, and can use the area to be added with special effects as the area to be processed for rendering.
  • the region to be processed and rendered by the image segmentation model is not located on the hair, that is, there is a problem that the segmented region is inaccurate.
  • the region initially segmented based on the image segmentation model can be used as the region to be processed render area.
  • the rendering area to be processed can be filtered based on the border frame area to obtain the area that actually needs to be rendered and is located on the hair, that is, the target rendering area is obtained.
  • the image to be processed can be segmented based on the image segmentation model to obtain multiple rendering areas to be processed.
  • the rendering area to be processed can be filtered based on the edge frame area. Handle the rendering area as the target rendering area.
  • the target rendering area is multiple ear dyed areas in the hair.
  • the special effect parameters may be pre-selected parameters that need to add corresponding special effects to the target rendering area.
  • the image determined after adding special effects to the target rendering area will be used as the target image, and correspondingly, the special effects added based on the special effect parameters will be used as the target special effects.
  • the target effect may be a color effect.
  • the determined special effect parameters such as bleached color information
  • the determined target rendering area to obtain a target image with the target special effect added to the target object.
  • the obtaining a target image with a target special effect for the target object based on the at least two target rendering areas and special effect parameters includes: determining the at least two target rendering areas according to the special effect parameters The target pixel value of each pixel in the pixel; based on the target pixel value of the pixel, the original pixel value of the pixel in the at least two target rendering areas is updated to obtain a target image with a target special effect added to the target object.
  • Each pixel of the displayed image has a corresponding pixel value.
  • the three channels of Red-Green-Blue (RGB) have corresponding values, and the values in the three channels can be replaced with the corresponding dyeing colors (special effect parameter), so as to obtain the target image obtained after adding the target special effect to the target object.
  • the original pixel value can be replaced based on the target pixel value.
  • the target pixel value of different pixels is also different, and the value of the target pixel value is adapted to the special effect parameters.
  • the obtaining the target image for adding target special effects to the target object based on the at least two target rendering areas and special effect parameters includes: based on the rendering model, the special effect parameters and the at least two target The rendering area performs rendering processing to obtain a target image in which a target special effect is added to the target object.
  • the rendering model may be a pre-trained neural network, which is used to process the special effect parameters and determine the model of the target pixel value corresponding to the special effect parameters, or a model for processing the target rendering area into an area matching the special effect parameters.
  • the special effect parameters and the image including the target rendering areas can be used as the input of the rendering model, and based on the rendering model, a rendering image matching the special effect parameters can be output, and the image obtained at this time can be used as The target image obtained after adding target effects to the target object.
  • the technical solution can be applied in any scene where partial rendering is required, so as to obtain a schematic diagram of the effect of partial rendering.
  • the image to be processed including the target object can be collected, and the target rendering area in the image to be processed can be determined based on the image segmentation model. According to the target rendering area and special effect parameters , add target special effects to the target object, and then obtain the target image, which solves the need to train neural networks corresponding to different rendering methods in related technologies.
  • Fig. 3 is a schematic flow chart of an image processing method provided by Embodiment 2 of the present disclosure.
  • the method includes:
  • S220 Segment the image to be processed based on an image segmentation model to obtain at least two target rendering regions and border frame regions corresponding to the image to be processed.
  • the first special effect may be a special effect that needs to be added for the entire bounding box area.
  • the first special effect processing module may be a first special effect adding model, that is, a pre-trained neural network.
  • the first special effect may be added to the entire border frame area according to the special effect parameter.
  • the first effect may be a solid color effect, for example, a effect that dyes the entire hair yellow.
  • the special effect corresponding to the first special effect among the special effect parameters may be added to the border frame area of the target object.
  • the second special effect may be a special effect to be superimposed on the target rendering area, or a special effect to update the target rendering area. For example, if gray bleaching needs to be added in the target rendering area, that is, the ear dyeing area, then the gray bleaching can be updated in the target rendering area.
  • the second special effect may be added to the target rendering area.
  • the target rendering area it may be the superposition of the first special effect and the second special effect, or the target rendering area only includes the second special rendering effect.
  • the image corresponding to the added special effects is used as the target image, and its final rendering can be seen in Figure 2.
  • it also includes: when an operation triggering the replacement of the first special effect is detected, keeping the second special effect unchanged and updating the first special effect corresponding to the triggering operation; and, upon detecting When an operation to replace the second special effect is triggered, keep the first special effect unchanged and update the second special effect corresponding to the triggered operation
  • the image to be processed including the target object can be collected, and the target rendering area in the image to be processed can be determined based on the image segmentation model. According to the target rendering area and special effect parameters , add target special effects to the target object, and then obtain the target image, which solves the need to train neural networks corresponding to different rendering methods in related technologies.
  • FIG. 4 is a schematic flow chart of an image processing method provided by Embodiment 3 of the present disclosure, wherein technical terms that are the same as or corresponding to those in the foregoing embodiment will not be repeated here.
  • the current image to be processed is input into the image segmentation model, and the ear dyeing area is processed to obtain the outer dyeing area of the left ear, the inner dyeing area of the left ear, the outer dyeing area of the right ear, the inner dyeing area of the right ear, and the The hair area of the hair. That is, at least two target rendering areas may be the above-mentioned left ear dyed area, left ear inner dyed area, right ear outer dyed area, and right ear inner dyed area; the hair area is the above-mentioned edge box area.
  • Each pixel in the ear-stained area output by the image segmentation model may have a corresponding value, for example, the value is in the range of 0 to 1, and the value is used to represent whether the pixel is located in the ear-stained area.
  • the processing of the ear-dyed area may be: because in the segmentation result of the image segmentation model, the ear-dyed area may also be segmented in the non-hair area, at this time, the four ear-dyed areas can be respectively used Hair region to filter on. That is, the ear dyeing area is constrained based on the hair area, and the ear dyeing area must be located in the hair area. After filtering, since the values of some pixels in the output ear dyeing area (0-1 range) are not very high, the ear dyeing effect will be strong and sometimes weak.
  • the ear dyeing area can be post-processed, and the The processing method can be: enhance the value of the pixel points in the ear dye area, usually by stretching the curve to force the value of the pixel point less than 0.1 to be equal to 0, and force the value of the pixel point greater than 0.9 to be equal to 1, Therefore, the value of the weaker pixel point is directly 0, and the value of the stronger pixel point is directly 1, thereby obtaining four better-processed ear dye areas, namely the above-mentioned target rendering area.
  • the implementation method may be: after obtaining the ear-dyed area, it is necessary to replace the color of the ear-dyed area.
  • the second way is to dye the hair in the ear dyeing area to a solid color based on the pre-generated neural network model. At this time, it is only necessary to train the model through the data of hair of different colors. Hairstyles and samples corresponding to different colors are used to train the dyeing model, which reduces the difficulty of obtaining training data.
  • the final effect can be obtained by superimposing the above-mentioned ear dyeing area segmentation results with the results of the pure color hair dyeing module. Moreover, the ability of ear dyeing can be reused to a large extent, and new special effects can be obtained only by changing different pure color hair dye colors.
  • Original picture/Ear dye effect picture/Pure blonde hair picture/Pure dark color picture/Ear dye mask.
  • the technical solution of the embodiment of the present disclosure can segment the image to be processed to obtain the left, right, and inner and outer ear dyed areas corresponding to the target object in the image to be processed, and then obtain the effect of ear dyed hairstyle by superimposing the dyed hair color.
  • the neural network corresponding to general hairstyle special effects needs to obtain a large number of pictures of the target effect for training. For example, dyeing blond hair requires many photos of blond people, that is, different hair dyeing models need to be trained for different hair colors. At the same time, hair and ear dyeing is a highly personalized hairstyle, so there are few sample data corresponding to ear dyeing images.
  • ear dyeing corresponds to a variety of hairstyles and colors, so it is difficult to collect Corresponding renderings, even if a large number of ear dyeing images that meet the effect requirements are collected and the corresponding neural network is trained, a neural network model can only achieve one special effect at this time. If you need to achieve ear dyeing effects of different colors, you must train Different models have low reusability and increase a lot of workload. However, this technical solution can specify ear dyeing effects of any color. It only needs to train an image segmentation model to obtain the corresponding ear dyeing effects. It only needs to replace the ear dye color used, and the reusability is very high. At the same time, the data is very easy to collect, which not only improves the convenience of adding special effects, but also realizes the technical effect of rich and universal special effect content.
  • FIG. 5 is a schematic structural diagram of an image processing device provided by Embodiment 4 of the present disclosure. As shown in FIG. 5 , the device includes: an image acquisition module 410 , a rendering area determination module 420 and a target image determination module 430 .
  • the image acquisition module 410 is configured to respond to the special effect adding instruction to acquire the image to be processed including the target object;
  • the rendering area determination module 420 is configured to perform segmentation processing on the image to be processed based on the image segmentation model to obtain the image corresponding to the image to be processed At least two target rendering areas corresponding to the image;
  • the target image determination module 430 is configured to obtain a target image with target special effects added to the target object based on the at least two target rendering areas and special effect parameters.
  • the image acquisition module 410 is set to: when it is detected that the target object triggers the special effect to add a wake-up word, generate a special effect addition instruction, and collect the image to be processed including the target object; or, when the trigger is detected
  • adding a special effect control generate the special effect adding instruction, and collect the image to be processed including the target object; or, collect the image to be processed including the target object when it is detected that the target object is included in the field of view.
  • the rendering area determination module 420 includes:
  • the rendering area determination unit to be processed is configured to perform segmentation processing on the target object in the image to be processed based on the image segmentation model, and determine an edge frame area corresponding to the target object and at least two rendering areas to be processed; target rendering The area determination unit is configured to determine the at least two target rendering areas based on the border frame area and the at least two rendering areas to be processed.
  • the target image determination module 430 includes:
  • a pixel value determining unit configured to determine the target pixel value of each pixel in the at least two target rendering areas according to the special effect parameters; a pixel value updating unit configured to update based on the target pixel value of the pixel
  • the original pixel values of the pixels in the at least two target rendering areas are used to obtain a target image in which a target special effect is added to the target object.
  • the target image determination module 430 includes:
  • Rendering is performed on the special effect parameters and the at least two target rendering areas based on the rendering model to obtain a target image in which a target special effect is added to the target object.
  • the target image determination module 430 is also set to:
  • the device further includes: a special effect adding module, configured to keep the second special effect unchanged and update the first special effect corresponding to the triggering operation when an operation to replace the first special effect is detected. a special effect; and, when an operation replacing the second special effect is detected, maintaining the first special effect and updating the second special effect corresponding to the triggering operation.
  • a special effect adding module configured to keep the second special effect unchanged and update the first special effect corresponding to the triggering operation when an operation to replace the first special effect is detected.
  • the at least two target rendering areas are hair coloring areas
  • the border frame area is an area corresponding to hair.
  • the image to be processed including the target object can be collected, and the target rendering area in the image to be processed can be determined based on the image segmentation model. According to the target rendering area and special effect parameters , add target special effects to the target object, and then obtain the target image, which solves the need to train neural networks corresponding to different rendering methods in related technologies.
  • the image processing device provided in the embodiments of the present disclosure can execute the image processing method provided in any embodiment of the present disclosure, and has corresponding functional modules and effects for executing the method.
  • the multiple units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the names of multiple functional units are only for the convenience of distinguishing each other , and are not intended to limit the protection scope of the embodiments of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by Embodiment 5 of the present disclosure.
  • the terminal equipment in the embodiments of the present disclosure may include but not limited to mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), tablet computers (Portable Android Device, PAD), portable multimedia players (Portable Media Player, PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital televisions (Television, TV), desktop computers, etc.
  • the electronic device 500 shown in FIG. 6 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) Various appropriate actions and processes are performed by a program loaded into a random access memory (Random Access Memory, RAM) 503 by 508 . In the RAM 503, various programs and data necessary for the operation of the electronic device 500 are also stored.
  • the processing device 501, ROM 502, and RAM 503 are connected to each other through a bus 504.
  • An edit/output (Input/Output, I/O) interface 505 is also connected to the bus 504 .
  • an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; including, for example, a liquid crystal display (Liquid Crystal Display, LCD) , an output device 507 such as a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509.
  • the communication means 509 may allow the electronic device 500 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 6 shows electronic device 500 having various means, it is not a requirement to implement or possess all of the means shown. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 509, or from storage means 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the electronic device provided by the embodiment of the present disclosure belongs to the same concept as the image processing method provided by the above embodiment, and the technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same effect as the above embodiment .
  • An embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the image processing method provided in the foregoing embodiments is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • Examples of computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • the program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future-developed network protocols such as (HyperText Transfer Protocol, HTTP), and can communicate with digital data in any form or medium
  • the communication eg, communication network
  • Examples of communication networks include local area networks (Local Area Network, LAN), wide area networks (Wide Area Network, WAN), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently existing networks that are known or developed in the future.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
  • Responding to the special effect adding instruction collecting an image to be processed including a target object; performing segmentation processing on the image to be processed based on an image segmentation model to obtain at least two target rendering areas corresponding to the image to be processed; based on the at least Two target rendering areas and special effect parameters are used to obtain a target image in which target special effects are added to the target object.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a LAN or WAN, or it can be connected to an external computer (eg via the Internet using an Internet Service Provider).
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware.
  • the name of the unit does not constitute a limitation on the unit itself in one case, for example, the first obtaining unit may also be described as "a unit for obtaining at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (Field Programmable Gate Arrays, FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (Application Specific Standard Parts, ASSP), System on Chip (System on Chip, SOC), Complex Programmable Logic Device (Complex Programming Logic Device, CPLD) and so on.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard drives, RAM, ROM, EPROM or flash memory, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or Any suitable combination of the above.
  • Example 1 provides an image processing method, the method including:
  • a target image with a target special effect added to the target object is obtained.
  • Example 2 provides an image processing method, and the method further includes:
  • Said responding to the instruction of adding special effects, collecting the image to be processed including the target object includes:
  • the target object When it is detected that the target object triggers special effects to add a wake-up word, generate a special effect addition instruction, and collect images to be processed including the target object; or,
  • the special effect addition instruction is generated, and the image to be processed including the target object is collected; or,
  • the image to be processed including the target object is collected.
  • Example 3 provides an image processing method, and the method further includes:
  • Segmenting the image to be processed based on the image segmentation model to obtain at least two target rendering areas corresponding to the image to be processed including:
  • the at least two target rendering areas are determined.
  • Example 4 provides an image processing method, and the method further includes:
  • Example 5 provides an image processing method, and the method further includes:
  • Rendering is performed on the special effect parameters and the at least two target rendering areas based on the rendering model to obtain a target image in which a target special effect is added to the target object.
  • Example 6 provides an image processing method, and the method further includes:
  • Example 7 provides an image processing method, and the method further includes:
  • the first special effect is kept unchanged and the second special effect corresponding to the triggering operation is updated.
  • Example 8 provides an image processing method, and the method further includes:
  • the at least two target rendering areas are ear dyeing areas, and the border frame area is an area surrounding hair of the target object.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本公开提供了一种图像处理方法、装置、电子设备及存储介质。该图像处理方法包括:响应于特效添加指令,采集包括目标对象的待处理图像;基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。

Description

图像处理方法、装置、电子设备及存储介质
本申请要求在2021年12月17日提交中国专利局、申请号为202111552501.7的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像处理技术领域,例如涉及一种图像处理方法、装置、电子设备及存储介质。
背景技术
随着短视频技术的发展,用户对短视频内容的丰富性要求也越来越高。为了满足用户多样化的需求,可以为被拍摄对象添加相应的特效。
对特效的处理方式主要是通过生成对抗神经网络(Generative Adversarial Network,GAN)神经网络,例如,染发特效所对应的神经网络,此时需要获取大量染发效果图,进而基于染发效果图来训练相应的模型。
但是,不同用户的发型以及染发效果均存在一定的差异,存在获取的样本不统一导致训练得到的模型不准确的问题,进一步的,由于染发效果差异较大,因此需要训练与不同染发效果相对应的模型,存在训练的模型数量较多,即存在模型普适性较差的问题。
发明内容
本公开提供一种图像处理方法、装置、电子设备及存储介质,以实现特效显示的真实性和多样性的技术效果。
第一方面,本公开提供了一种图像处理方法,该方法包括:
响应于特效添加指令,采集包括目标对象的待处理图像;
基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;
基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
第二方面,本公开还提供了一种图像处理装置,该装置包括:
图像采集模块,设置为响应于特效添加指令,采集包括目标对象的待处理图像;
渲染区域确定模块,设置为基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;
目标图像确定模块,设置为基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
第三方面,本公开还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述图像处理方法。
第四方面,本公开还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行上述图像处理方法。
第五方面,本公开还提供了一种计算机程序产品,包括承载在非暂态计算机可读介质上的计算机程序,所述计算机程序包含用于执行上述的图像处理方法的程序代码。
附图说明
图1为本公开实施例一所提供的一种图像处理方法的流程示意图;
图2为本公开实施例一所提供的一种耳染效果的示意图;
图3为本公开实施例二所提供的一种图像处理方法的流程示意图;
图4为本公开实施例三所提供的一种图像处理方法的流程示意图;
图5为本公开实施例四所提供的一种图像处理装置的结构示意图;
图6为本公开实施例五所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图描述本公开的实施例。虽然附图中显示了本公开的一些实施例,然而本公开可以通过多种形式来实现,提供这些实施例是为了理解本公开。本公开的附图及实施例仅用于示例性作用。
本公开的方法实施方式中记载的多个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基 于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
实施例一
图1为本公开实施例一所提供的一种图像处理方法的流程示意图,本公开实施例适用于在互联网所支持的任意图像展示或者视频拍摄的场景中,用于为图像中的相应对象添加特效,以使添加的特效与对象最为适配的情形,该方法可以由图像处理装置来执行,该装置可以通过软件和/或硬件的形式实现,例如,通过电子设备来实现,该电子设备可以是移动终端、个人电脑(Personal Computer,PC)端或服务器等。任意图像展示的场景通常是由客户端和服务器来配合实现的,本实施例所提供的方法可以由服务端来执行,客户端来执行,或者是客户端和服务端的配合来执行。
如图1所示,所述方法包括:
S110、响应于特效添加指令,采集包括目标对象的待处理图像。
可以先对应用场景进行示例性说明。可以将本公开技术方案应用在任意需要特效展示的画面中,例如,视频通话中,可以进行特效展示;或者,直播场景中,可以对主播用户进行特效展示;也可以是应用在视频拍摄过程中,可以对被拍摄用户所对应的图像进行特效展示的情况,如短视频拍摄场景下。还可以是为静态拍摄的图像中的用户添加特效的情形。
执行本公开实施例提供的图像处理方法的装置,可以集成在支持图像处理功能的应用软件中,且该软件可以安装至电子设备中,例如,电子设备可以是移动终端或者PC端等。应用软件可以是对图像/视频处理的一类软件,对应用软件在此不再一一赘述,只要可以实现图像/视频处理即可。
在用户拍摄短视频、直播或者拍摄包括目标对象的图像中需要为其添加特效等的过程中,显示界面上可以包括添加特效的按键。例如,当用户触发特效按键后,可以弹出至少一个待添加特效,用户可以从多个待添加特效中选择一 个特效作为目标特效。或者是,当检测到触发添加特效所对应的控件后,服务器可以确定要为入镜画面中的对象添加相应的特效。此时,服务器或者客户端可以响应特效添加指令,采集包括目标对象的待处理图像。待处理图像可以是基于应用软件采集的图像,可以是在触发特效添加指令时,采集该与特效添加指令时刻相一致的图像,该图像中可以包括需要为其添加特效的对象。将需要为其添加特效的对象作为目标对象。例如,如果要为用户换发型或者染发,那么目标对象可以是用户;如果要为小猫或者小狗整体换毛发颜色,那么小猫和小狗可以是目标对象。例如,在直播场景或者拍摄视频的场景中,需要为拍摄的用户的头发换颜色,那么拍摄包括用户的图像作为待处理图像。此时,摄像装置可以从触发特效添加指令开始实时或者间隔性的采集目标场景中包括目标对象的待处理图像。
一实施例中,所述响应于特效添加指令,采集包括目标对象的待处理图像,包括:当检测到目标对象触发特效添加唤醒词时,生成特效添加指令,并采集包括目标对象的待处理图像;或,当检测到触发特效添加控件时,生成所述特效添加指令,并采集包括目标对象的待处理图像;或,在检测到视野区域中包括目标对象时,采集包括目标对象的待处理图像。
在视频直播的场景中,如,直播卖货或者拍摄视频的过程中,可以采集主播用户或者被拍摄对象的语音信息,并对采集的语音信息分析处理,从而识别与语音信息相对应的文字。如果与语音信息相对应的文字中包括预先设置的唤醒词,例如,唤醒词可以是:“请开启特效功能”等类型的词汇,则说明需要将主播或者被拍摄对象特效展示,此时,可以采集包括目标对象的待处理图像。即,在此种情况下说明目标对象触发了添加特效的唤醒词,可以为目标对象添加相应的本技术方案所提供的特效。例如,添加的特效可以为为目标对象染发的特效,该染发特效并不是像相关技术公开的直接将需要显示的颜色直接替换目标对象的头发颜色。特效添加控件可以是应用软件的显示界面上可以显示的按键,该按键的触发表征需要采集待处理图像,并对待处理图像特效处理。当用户触发该按键时,可以认为要触发特效展示的图像功能,此时,可以采集包括目标对象的待处理图像。例如,如果应用在静态图像的拍摄场景中,如果用户触发了特效添加控件,则可以自动触发采集包括目标对象的待处理图像。在应用场景中,例如,拍摄哑剧视频的场景中,可以实时对采集的待使用图像中的面部特征分析处理,得到面部图像中每个部位的特征检测结果,并将其作为待检测特征。如果待检测特征与预设特征匹配,例如,预先设置了每个部位触发特效展示的至少一个特征,在一个部位触发了相应的特征时,则可以生成特效添加指令,进而采集待处理图像。还可以是,在检测到入镜画面中包括目标对象时,说明触发了图像采集,可以采集包括包括目标对象的待处理图像。
不论是在视频直播场景,还是图像处理场景,如果有实时采集目标场景中的目标对象的需求,可以实时采集图像,可以将此时采集的图像作为待使用图像,相应的,可以对待使用图像分析处理,如果分析得到的结果满足了特定的要求,则可以将满足特定要求时的待使用图像作为待处理图像。
本技术方案的实现可以由客户端来实现,也可以由服务端来实现;可以是在视频拍摄完成后对视频中的每个视频帧处理后,发送至客户端进行显示的情形,也可以是在视频拍摄过程中,对拍摄的每个视频帧依次处理的情形,此时每个视频帧都为待处理图像。
S120、基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域。
图像分割模型为预先训练得到的神经网络模型。如需要确定待处理图像中的渲染区域,则可以获取多个训练样本(训练样本为训练图像),并对每个训练样本中的多个区域进行标记,如在训练图像中框选多个区域进行标记。将训练图像作为待训练图像分割模型的输入参数,将含有标记区域的图像作为图像分割模型的输出。基于训练样本中训练图像和图像中的相应标记区域,可以训练得到图像分割模型。至少两个目标渲染区域的数量可以是两个、三个或者多个,渲染区域和图像分割模型的训练样本中图像的相应标记区域相对应。
可以将待处理图像输入至预先训练得到的图像分割模型中,基于图像分割模型可以确定待处理图像中的多个渲染区域,将此时确定出的多个渲染区域作为目标渲染区域。
图像分割模型的输入可以是待处理图像,该模型的输出可以是确定出当前待处理图像中渲染区域的图像。图像分割模型为神经网络,该网络的结构可以是视觉几何组网络(Visual Geometry Group Network,VGG)、残差网络(Residual Network,ResNet)、GoogleNet、MobileNet、ShuffleNet等等,对于不同的网络结构来说,不同网络结构的计算量不同,并不是所有模型都是轻量级的。即,有的模型计算量很大,不适合在移动端部署,而计算量小、计算高效、简单的模型更容易在移动端上部署。如果本技术方案的实现是基于移动终端实现的,那么可以采用MobileNet和ShuffleNet模型结构。上述模型结构的原理是把传统的卷积变成了可分离卷积,即depthwise convolution和point-wise convolution,目的是为了减少计算量;另外采用了Inverted Residuals来提高depthwise convolution的特征提取能力;同时shuffle channel的简单操作也用来提高模型的表达能力,上面是模型基本的模块设计,模型基本上是由上述模块堆叠而成,此类模型的好处在于推断耗时较少,可以应用在对耗时要求较高的终端上。如果是服务器来实现的,那么可以采用上述任一神经网络都行,只要能够实现确 定出待处理图像中的渲染区域即可。上述仅仅是对图像分割模型的描述,并不对其进行的限定。
在本公开实施例中,所述基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域,包括:基于所述图像分割模型对所述待处理图像中的目标对象进行分割处理,确定与目标对象相对应的边缘框区域和至少一个待处理渲染区域;基于所述边缘框区域和所述至少一个待处理渲染区域,确定所述至少两个目标渲染区域。
在本实施例中,所述至少两个目标渲染区域为耳染区域,边缘框区域为包围目标对象的头发的区域。
本技术方案中为目标对象添加的特效可以是染发特效,为了使染发特效与真实场景,或者与用户的个性化需求最为适配。如,需要确定每一种颜色的染发效果,或者每一种颜色染到相应区域中的效果,可以基于本技术方案来确定。其中,耳染区域可以以耳朵的边缘线作为图像分割的分界线,将位于边缘线下方且距离脸部距离较近的区域作为内耳染区域;将位于边缘线上方且距离脸部距离相对较远的区域作为外耳染区域,参见图2,标识1对应的区域为外耳染区域,标识2对应的区域为内耳染区域。边缘框区域可以是与目标对象的头发所对应的区域。标识1表示左右外耳染区域,标识2表示左右内耳染区域。
图像分割模型可以对输入的待处理图像分割处理,确定待处理图像中需要添加特效的区域,可以将需要添加特效的区域作为待处理渲染处理。在实际应用中存在图像分割模型分割出的待处理渲染区域,并不位于头发上,即存在分割出的区域不准确的问题,此时,可以将基于图像分割模型初次分割出来的区域作为待处理渲染区域。可以基于边缘框区域对待处理渲染区域过滤处理,得到实际需要渲染且位于头发上的区域,即得到了目标渲染区域。
可以基于图像分割模型对待处理图像分割处理,得到多个待处理渲染区域,为了确定待处理渲染区域是否位于头发上,可以基于边缘框区域对待处理渲染区域过滤处理,将位于边缘框区域内部的待处理渲染区域,作为目标渲染区域。
S130、基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
基于上述可知,目标渲染区域是头发中的多个耳染区域。特效参数可以是预先选择的需要为目标渲染区域添加上相应特效的参数。将为目标渲染区域添加上特效后所确定的图像,作为目标图像,相应的,将基于特效参数添加的特效作为目标特效。例如,目标特效可以是颜色特效。
确定触发操作时,所确定的特效参数,例如,漂染的颜色信息,将漂染的 颜色信息添加到确定出的目标渲染区域中,得到为目标对象添加目标特效的目标图像。
一实施例中,所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:根据所述特效参数,确定所述至少两个目标渲染区域中每个像素点的目标像素点值;基于该像素点的目标像素值更新所述至少两个目标渲染区域中该像素点的原始像素值,得到为所述目标对象添加目标特效的目标图像。
显示的图像的每个像素点都存在相应的像素值,例如,红绿蓝(Red-Green-Blue,RGB)三通道对应有相应的值,可以将三通道中的值替换为对应漂染颜色(特效参数)所对应的值,从而得到为目标对象添加目标特效后得到的目标图像。将待处理图像中目标渲染区域内像素点的像素值作为原始像素值。将与特效参数相应的像素值作为目标像素点值。可以基于目标像素点值替换原始像素点值。
漂染的颜色可能存在多种颜色的情形,例如,是灰白渐变的颜色,那么,不同像素点的目标像素点值也是存在一定差异的,目标像素点值的数值是与特效参数相适配的。
一实施例中,所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:基于渲染模型对所述特效参数和所述至少两个目标渲染区域进行渲染处理,得到为所述目标对象添加目标特效的目标图像。
渲染模型可以是预先训练的神经网络,用于对特效参数处理,确定特效参数所对应的目标像素值的模型,或者是,将目标渲染区域处理为与特效参数相匹配的区域的模型。
在确定至少两个目标渲染区域后,可以将特效参数和包括目标渲染区域的图像作为渲染模型的输入,基于该渲染模型可以输出与特效参数相匹配的渲染图像,可以将此时得到的图像作为为目标对象添加目标特效后,得到的目标图像。
本技术方案,可以应用在任意需要对局部进行渲染的场景中,从而得到局部渲染的效果示意图。
本公开实施例的技术方案,通过在检测到触发特效添加指令时,可以采集包括目标对象的待处理图像,并基于图像分割模型确定待处理图像中的目标渲染区域,根据目标渲染区域和特效参数,为目标对象添加目标特效,进而得到目标图像,解决了相关技术中需要训练与不同渲染方式相对应的神经网络,不 仅需要训练的模型较多,还需要获取大量的训练样本,导致存在渲染特效添加不便的问题,实现了只需要神经网络确定需要处理的渲染区域,进而对渲染区域添加相应特效,提高特效处理便捷性和与实际使用适配度较高的技术效果。
实施例二
图3为本公开实施例二所提供的一种图像处理方法的流程示意图,在前述实施例的基础上,存在需要为目标对象添加多个特效的情形,此时可以基于本技术方案来实现,其实施方式可以参见本技术方案的阐述。其中,与上述实施例相同或者相应的技术术语在此不再赘述。
如图3所示,所述方法包括:
S210、响应于特效添加指令,采集包括目标对象的待处理图像。
S220、基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域和边缘框区域。
S230、基于第一特效处理模块为所述目标对象的边缘框区域添加第一特效。
第一特效可以是需要为整个边缘框区域添加的特效。第一特效处理模块可以是第一特效添加模型,即预先训练好的神经网络。可以根据特效参数,将第一特效添加到整个边缘框区域中。第一特效可以是纯色特效,例如,将整个头发染成黄色的特效。
基于第一特效处理模块,可以将特效参数中与第一特效相对应的特效添加到目标对象的边缘框区域中。
S240、将位于所述边缘框区域中的所述至少两个目标渲染区域的第一特效更新为第二特效,得到为所述目标对象添加目标特效的目标图像。
第二特效可以是在目标渲染区域叠加的特效,也可以是将目标渲染区域更新为的特效。例如,需要在目标渲染区域,即耳染区域增加灰色漂染,那么可以将灰色漂染更新在目标渲染区域中。
在为边缘框区域添加第一特效的同时,可以将第二特效添加到目标渲染区域上。对于目标渲染区域来说,可以是第一特效和第二特效的叠加,也可以是,目标渲染区域仅包括第二渲染特效。将添加特效后所对应的图像作为目标图像,其最终的效果图,可以参见图2。
在上述技术方案的基础上,还包括:当检测到触发替换所述第一特效的操作时,保持所述第二特效不变并更新与触发操作相对应的第一特效;以及,在检测到触发替换所述第二特效的操作时,保持所述第一特效不变并更新与触发 操作相对应的第二特效
本公开实施例的技术方案,通过在检测到触发特效添加指令时,可以采集包括目标对象的待处理图像,并基于图像分割模型确定待处理图像中的目标渲染区域,根据目标渲染区域和特效参数,为目标对象添加目标特效,进而得到目标图像,解决了相关技术中需要训练与不同渲染方式相对应的神经网络,不仅需要训练的模型较多,还需要获取大量的训练样本,导致存在渲染特效添加不便的问题,实现了只需要神经网络确定需要处理的渲染区域,进而对渲染区域添加相应特效,提高特效处理便捷性和与实际使用适配度较高的技术效果。
实施例三
图4为本公开实施例三所提供的一种图像处理方法的流程示意图,其中,与上述实施例相同或者相应的技术术语在此不再赘述。
如图4所示,将当前待处理图像输入至图像分割模型中,进行耳染区域处理,得到左耳外染区域、左耳内染区域、右耳外染区域、右耳内染区域以及包括头发的头发区域。即,至少两个目标渲染区域可以是上述所提及的左耳外染区域、左耳内染区域、右耳外染区域、右耳内染区域;头发区域即为上述所提及的边缘框区域。
图像分割模型输出的耳染区域中的每个像素点可以有相对应的值,例如,值在0至1范围之内,该值用于表征像素点是否位于耳染区域。
在本实施例中,进行耳染区域处理,可以是:由于图像分割模型的分割结果中,可能出现在非头发区域也分割出耳染区域的情形,此时可以将4个耳染区域分别用头发区域来进行过滤。即基于头发区域约束耳染区域,耳染区域必须位于头发区域中。过滤后,由于输出的耳染区域中部分像素点的值(0~1范围)并不会很高,会造成耳染效果时强时弱,此时,可以对耳染区域进行后处理,后处理的方式可以是:将耳染区域的像素点的值进行增强,通常是用拉伸曲线的方式将小于0.1的像素点的值强行等于0,将大于0.9的像素点的值强行等于1,从而使得较弱的像素点的值直接为0,较强的像素点的值直接为1,进而得到四个处理较好的耳染区域,即上述所提及的目标渲染区域。
在得到多个可以使用的耳染区域后,可以为耳染区域添加染发特效。在实际应用中还可以是,既有染发又有耳染的情形,此时在头发染纯色的基础上,在耳染区域增加新的漂染染色。
实施方式可以是:在得到了耳染区域后,需要把耳染区域的颜色替换掉,存在两种方式。第一种方式为:基于传统方法将耳染区域的RGB值替换为相应 漂染颜色的值。第二种方式是,基于预先生成的神经网络模型,将耳染区域的头发染为纯色,此时,只需要通过不同颜色头发的数据来训练模型即可,不需要使用与不同头发长度、不同发型、不同颜色相对应的样本来训练漂染模型,减少了训练数据获取难度。
将上述的耳染区域分割结果,与纯色染发模块的结果进行叠加,就能得到最终的效果。而且耳染的能力可以较大程度地复用,只需要换不同纯色染发颜色即能得到新的特效。原图/耳染效果图/纯金发图/纯深色图/耳染mask。
本公开实施例的技术方案,可以对待处理图像分割处理,得到待处理图像中与目标对象所对应的左右、内外耳染的区域,再通过叠加染发颜色,得到耳染发型的效果。一般的发型特效所对应的神经网络,需要获取大量目标效果的图片进行训练,比如染金发,就需要许多金发的人的照片,即染不同颜色的头发就需要训练不同的头发染色模型。同时,头发耳染是一个个性化极强的发型,就会存在耳染图像所对应的样本数据较少,同时耳染所对应的发型可以为多种多样,多种颜色,因此很难收集到相应的效果图,即使收集到了大量符合效果要求的耳染图像,训练得到相应的神经网络,此时一个神经网络模型只能实现一款特效,如果需要实现不同颜色的耳染特效,就要训练不同的模型,复用性较低,增加了许多工作量,而本技术方案能指定任意颜色的耳染特效,只需要训练得到一个图像分割模型,就可以得到相应的耳染特效,后续仅需要替换所用的耳染颜色即可,复用性很高,同时数据非常容易收集,不仅提高了特效添加的便捷性、还实现了特效内容丰富性和普适性的技术效果。
实施例四
图5为本公开实施例四所提供的一种图像处理装置的结构示意图,如图5所示,所述装置包括:图像采集模块410、渲染区域确定模块420和目标图像确定模块430。
图像采集模块410,设置为响应于特效添加指令,采集包括目标对象的待处理图像;渲染区域确定模块420,设置为基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;目标图像确定模块430,设置为基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
在上述技术方案的基础上,所述图像采集模块410设置为:当检测到目标对象触发特效添加唤醒词时,生成特效添加指令,并采集包括目标对象的待处理图像;或,当检测到触发特效添加控件时,生成所述特效添加指令,并采集 包括目标对象的待处理图像;或,在检测到视野区域中包括所述目标对象时,采集包括所述目标对象的待处理图像。
在上述技术方案的基础上,渲染区域确定模块420包括:
待处理渲染区域确定单元,设置为基于所述图像分割模型对所述待处理图像中的目标对象进行分割处理,确定与目标对象相对应的边缘框区域和至少两个待处理渲染区域;目标渲染区域确定单元,设置为基于所述边缘框区域和所述至少两个待处理渲染区域,确定所述至少两个目标渲染区域。
在上述技术方案的基础上,所述目标图像确定模块430,包括:
像素值确定单元,设置为根据所述特效参数,确定所述至少两个目标渲染区域中每个像素点的目标像素点值;像素值更新单元,设置为基于所述像素点的目标像素值更新所述至少两个目标渲染区域中所述像素点的原始像素值,得到为所述目标对象添加目标特效的目标图像。
在上述技术方案的基础上,所述目标图像确定模块430,包括:
基于渲染模型对所述特效参数和所述至少两个目标渲染区域进行渲染处理,得到为所述目标对象添加目标特效的目标图像。
在上述技术方案的基础上,所述目标图像确定模块430,还设置为:
基于第一特效处理模块为所述目标对象的边缘框区域添加与所述特效参数相对应的第一特效;将位于所述边缘框区域中的所述至少两个目标渲染区域的第一特效更新为与所述特效参数相对应的第二特效,得到为所述目标对象添加目标特效的目标图像;或将所述特效参数相对应的第二特效叠加在所述至少两个目标渲染区域中,得到为所述目标对象添加目标特效的目标图像。
在上述技术方案的基础上,所述装置还包括:特效添加模块,设置为当检测到替换所述第一特效的操作时,保持所述第二特效不变并更新与触发操作相对应的第一特效;以及,在检测到替换所述第二特效的操作时,保持所述第一特效不便并更新与触发操作相对应的第二特效。
在上述技术方案的基础上,所述至少两个目标渲染区域为染发区域,边缘框区域为与头发相对应的区域。
本公开实施例的技术方案,通过在检测到触发特效添加指令时,可以采集包括目标对象的待处理图像,并基于图像分割模型确定待处理图像中的目标渲染区域,根据目标渲染区域和特效参数,为目标对象添加目标特效,进而得到目标图像,解决了相关技术中需要训练与不同渲染方式相对应的神经网络,不仅需要训练的模型较多,还需要获取大量的训练样本,导致存在渲染特效添加 不便的问题,实现了只需要神经网络确定需要处理的渲染区域,进而对渲染区域添加相应特效,提高特效处理便捷性和与实际使用适配度较高的技术效果。
本公开实施例所提供的图像处理装置可执行本公开任意实施例所提供的图像处理方法,具备执行方法相应的功能模块和效果。
上述装置所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
实施例五
图6为本公开实施例五所提供的一种电子设备的结构示意图。下面参考图6,其示出了适于用来实现本公开实施例的电子设备(例如图6中的终端设备或服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、平板电脑(Portable Android Device,PAD)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视(Television,TV)、台式计算机等等的固定终端。图6示出的电子设备500仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(Read-Only Memory,ROM)502中的程序或者从存储装置508加载到随机访问存储器(Random Access Memory,RAM)503中的程序而执行多种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的多种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。编辑/输出(Input/Output,I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有多种装置的电子设备500,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软 件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的图像处理方法属于同一构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的效果。
实施例六
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的图像处理方法。
本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如(超文本传输协议HyperText Transfer Protocol,HTTP)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
响应于特效添加指令,采集包括目标对象的待处理图像;基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开多种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以 通过硬件的方式来实现。其中,单元的名称在一种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programming Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM或快闪存储器、光纤、CD-ROM、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,【示例一】提供了一种图像处理方法,该方法包括:
响应于特效添加指令,采集包括目标对象的待处理图像;
基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;
基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
根据本公开的一个或多个实施例,【示例二】提供了一种图像处理方法,该方法,还包括:
所述响应于特效添加指令,采集包括目标对象的待处理图像,包括:
当检测到目标对象触发特效添加唤醒词时,生成特效添加指令,并采集包括目标对象的待处理图像;或,
当检测到触发特效添加控件时,生成所述特效添加指令,并采集包括目标对象的待处理图像;或,
在检测到视野区域中包括所述目标对象时,采集包括所述目标对象的待处理图像。
根据本公开的一个或多个实施例,【示例三】提供了一种图像处理方法,该方法,还包括:
所述基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域,包括:
基于所述图像分割模型对所述待处理图像中的目标对象进行分割处理,确定与目标对象相对应的边缘框区域和至少两个待处理渲染区域;
基于所述边缘框区域和所述至少两个待处理渲染区域,确定所述至少两个目标渲染区域。
根据本公开的一个或多个实施例,【示例四】提供了一种图像处理方法,该方法,还包括:
所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
根据所述特效参数,确定所述至少两个目标渲染区域中每个像素点的目标像素点值;
基于所述像素点的目标像素值更新所述至少两个目标渲染区域中所述像素点的原始像素值,得到为所述目标对象添加目标特效的目标图像。
根据本公开的一个或多个实施例,【示例五】提供了一种图像处理方法,该方法,还包括:
所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
基于渲染模型对所述特效参数和所述至少两个目标渲染区域进行渲染处理,得到为所述目标对象添加目标特效的目标图像。
根据本公开的一个或多个实施例,【示例六】提供了一种图像处理方法,该方法,还包括:
所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
基于第一特效处理模块为所述目标对象的边缘框区域添加与所述特效参数相对应的第一特效;
将位于所述边缘框区域中的所述至少两个目标渲染区域的第一特效更新为 与所述特效参数相对应的第二特效,得到为所述目标对象添加目标特效的目标图像;
或将所述特效参数相对应的第二特效叠加在所述至少两个目标渲染区域中,得到为所述目标对象添加目标特效的目标图像。
根据本公开的一个或多个实施例,【示例七】提供了一种图像处理方法,该方法,还包括:
当检测到触发替换所述第一特效的操作时,保持所述第二特效不变并更新与触发操作相对应的第一特效;以及,
在检测到触发替换所述第二特效的操作时,保持所述第一特效不变并更新与触发操作相对应的第二特效。
根据本公开的一个或多个实施例,【示例八】提供了一种图像处理方法,该方法,还包括:
所述至少两个目标渲染区域为耳染区域,边缘框区域为包围目标对象头发的区域。
此外,虽然采用特定次序描绘了多个操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了多个实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的一些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的多种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。

Claims (12)

  1. 一种图像处理方法,包括:
    响应于特效添加指令,采集包括目标对象的待处理图像;
    基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;
    基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
  2. 根据权利要求1所述的方法,其中,所述响应于特效添加指令,采集包括目标对象的待处理图像,包括:
    当检测到所述目标对象触发特效添加唤醒词时,生成所述特效添加指令,并采集包括所述目标对象的待处理图像;或,
    当检测到触发特效添加控件时,生成所述特效添加指令,并采集包括所述目标对象的待处理图像;或,
    在检测到视野区域中包括所述目标对象时,采集包括所述目标对象的待处理图像。
  3. 根据权利要求1所述的方法,其中,所述基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域,包括:
    基于所述图像分割模型对所述待处理图像中的所述目标对象进行分割处理,确定与所述目标对象相对应的边缘框区域和至少两个待处理渲染区域;
    基于所述边缘框区域和所述至少两个待处理渲染区域,确定所述至少两个目标渲染区域。
  4. 根据权利要求1所述的方法,其中,所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
    根据所述特效参数,确定所述至少两个目标渲染区域中每个像素点的目标像素点值;
    基于所述像素点的目标像素值更新所述至少两个目标渲染区域中所述像素点的原始像素值,得到为所述目标对象添加目标特效的目标图像。
  5. 根据权利要求1所述的方法,其中,所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
    基于渲染模型对所述特效参数和所述至少两个目标渲染区域进行渲染处理,得到为所述目标对象添加目标特效的目标图像。
  6. 根据权利要求1所述的方法,其中,所述基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像,包括:
    基于第一特效处理模块为所述目标对象的边缘框区域添加与所述特效参数相对应的第一特效;
    将位于所述边缘框区域中的所述至少两个目标渲染区域的第一特效更新为与所述特效参数相对应的第二特效,得到为所述目标对象添加目标特效的目标图像;或将所述特效参数相对应的第二特效叠加在所述至少两个目标渲染区域中,得到为所述目标对象添加目标特效的目标图像。
  7. 根据权利要求6所述的方法,还包括:
    当检测到触发替换所述第一特效的操作时,保持所述第二特效不变并更新与触发操作相对应的第一特效;以及,
    在检测到触发替换所述第二特效的操作时,保持所述第一特效不变并更新与触发操作相对应的第二特效。
  8. 根据权利要求1-6中任一所述的方法,其中,所述至少两个目标渲染区域为耳染区域,边缘框区域为包围所述目标对象的头发的区域。
  9. 一种图像处理装置,包括:
    图像采集模块,设置为响应于特效添加指令,采集包括目标对象的待处理图像;
    渲染区域确定模块,设置为基于图像分割模型对所述待处理图像进行分割处理,得到与所述待处理图像相对应的至少两个目标渲染区域;
    目标图像确定模块,设置为基于所述至少两个目标渲染区域以及特效参数,得到为所述目标对象添加目标特效的目标图像。
  10. 一种电子设备,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-8中任一所述的图像处理方法。
  11. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-8中任一所述的图像处理方法。
  12. 一种计算机程序产品,包括承载在非暂态计算机可读介质上的计算机程序,所述计算机程序包含用于执行如权利要求1-8中任一所述的图像处理方法 的程序代码。
PCT/CN2022/138760 2021-12-17 2022-12-13 图像处理方法、装置、电子设备及存储介质 WO2023109829A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111552501.7A CN114240742A (zh) 2021-12-17 2021-12-17 图像处理方法、装置、电子设备及存储介质
CN202111552501.7 2021-12-17

Publications (1)

Publication Number Publication Date
WO2023109829A1 true WO2023109829A1 (zh) 2023-06-22

Family

ID=80757983

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138760 WO2023109829A1 (zh) 2021-12-17 2022-12-13 图像处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN114240742A (zh)
WO (1) WO2023109829A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240742A (zh) * 2021-12-17 2022-03-25 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN115100305A (zh) * 2022-04-29 2022-09-23 北京字跳网络技术有限公司 图像处理方法、装置、电子设备和存储介质
CN114866706A (zh) * 2022-06-01 2022-08-05 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091610A (zh) * 2019-11-22 2020-05-01 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN112258605A (zh) * 2020-10-16 2021-01-22 北京达佳互联信息技术有限公司 特效添加方法、装置、电子设备及存储介质
CN113744135A (zh) * 2021-09-16 2021-12-03 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN114240742A (zh) * 2021-12-17 2022-03-25 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091610A (zh) * 2019-11-22 2020-05-01 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN112258605A (zh) * 2020-10-16 2021-01-22 北京达佳互联信息技术有限公司 特效添加方法、装置、电子设备及存储介质
CN113744135A (zh) * 2021-09-16 2021-12-03 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN114240742A (zh) * 2021-12-17 2022-03-25 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN114240742A (zh) 2022-03-25

Similar Documents

Publication Publication Date Title
WO2023109829A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2022083383A1 (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
WO2022068487A1 (zh) 风格图像生成方法、模型训练方法、装置、设备和介质
US11800043B2 (en) Video processing method and apparatus, and computer-readable medium and electronic device
WO2023125374A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN110827378A (zh) 虚拟形象的生成方法、装置、终端及存储介质
CN112199016B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
WO2023040749A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN110069974B (zh) 高光图像处理方法、装置和电子设备
WO2022037602A1 (zh) 表情变换方法、装置、电子设备和计算机可读介质
CN110796721A (zh) 虚拟形象的颜色渲染方法、装置、终端及存储介质
WO2022142875A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2023165515A1 (zh) 拍摄方法、装置、电子设备和存储介质
CN114245028B (zh) 图像展示方法、装置、电子设备及存储介质
US11798596B2 (en) Image processing method and apparatus
US20220392026A1 (en) Video transmission method, electronic device and computer readable medium
WO2022171024A1 (zh) 图像显示方法、装置、设备及介质
WO2022233223A1 (zh) 图像拼接方法、装置、设备及介质
US20240119082A1 (en) Method, apparatus, device, readable storage medium and product for media content processing
WO2023143129A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2022132032A1 (zh) 人像图像处理方法及装置
WO2023273697A1 (zh) 图像处理方法、模型训练方法、装置、电子设备及介质
WO2021227953A1 (zh) 图像特效配置方法、图像识别方法、装置及电子设备
JP2024502117A (ja) 画像処理方法、画像生成方法、装置、機器及び媒体
WO2023231918A1 (zh) 图像处理方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22906574

Country of ref document: EP

Kind code of ref document: A1