Image processing method and device, intelligent wearable equipment and computer storage medium

By combining a large intelligent painting model with a variety of networks, the stylization and content feature retention of the target facial image are achieved, which solves the problem of poor correlation between the stylized image and the original image in the existing technology, and improves the intelligence and performance of smart wearable devices. Image processing accuracy.

CN118587084APending Publication Date: 2024-09-03SHENZHEN QIHOO INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410631768.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

It is difficult to achieve both the stylization of the target facial image and the retention of content features in image processing with existing technology, resulting in poor correlation between the stylized image and the original image and insufficient intelligence of the smart wearable device.

Method used

Using a large intelligent painting model, combined with the content feature extraction network, edge detection network, 3D LORA network and two-dimensional LORA network, through content loss and style loss, it ensures that the stylized image retains the content features of the target facial image, and generates a facial image with the target Style information images.

Benefits of technology

It improves the accuracy of image processing and the intelligence of smart wearable devices, ensures the correlation between the stylized image and the original image, and achieves the stylization of the target facial image and the retention of content features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587084A
    Figure CN118587084A
Patent Text Reader

Abstract

The invention discloses an image processing method and device, intelligent wearable equipment and a computer storage medium. The method is applied to the intelligent wearable device, and the method comprises the following steps: obtaining a target face image and to-be-converted target style information of the target face image; the target face image and the target style information are input into an intelligent drawing large model, a target style image corresponding to the target face image is output, the intelligent drawing large model comprises content loss and style loss, and the content loss is used for ensuring that the target style image output by the intelligent drawing large model keeps target content features of the target face image; the style loss is used for ensuring that the target style image output by the intelligent drawing large model has the characteristics of the target style information, so that the stylization of the target face image can be directly realized, and the target content characteristics of the target face image can be kept in the stylized target style image; and the image processing accuracy and the intelligence of the intelligent wearable device are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer image processing, and in particular to an image processing method, apparatus, smart wearable device and computer storage medium. Background Art

[0002] With the rapid development of image processing technology and special effects technology, the real-life pictures taken with cameras have gradually evolved into new ways of playing and using. For example, the real-life pictures can be converted from a realistic style to other styles such as cartoons and animations. That is, the image content is kept unchanged during the style conversion process, so that the style-converted images can be used in a wider range of scenarios in styles other than the real-life style. Summary of the invention

[0003] The embodiments of the present application provide an image processing method, apparatus, smart wearable device, and computer storage medium, which can not only directly realize the stylization of the target facial image, but also ensure that the target content features of the target facial image are retained in the stylized target style image, improve the correlation between the target style image and the target facial image, and thus improve the accuracy of image processing and the intelligence of the smart wearable device. The above technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides an image processing method, which is applied to a smart wearable device, and the method includes:

[0005] Obtaining a target facial image and target style information to be converted from the target facial image;

[0006] The target facial image and the target style information are input into the intelligent painting large model, and a target style image corresponding to the target facial image is output; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information.

[0007] In a possible implementation, the above-mentioned intelligent painting model includes a content feature extraction network, an edge detection network, a 3D LORA network and a two-dimensional LORA network;

[0008] The above-mentioned inputting the above-mentioned target facial image and the above-mentioned target style information into the intelligent painting large model, and outputting the target style image corresponding to the above-mentioned target facial image, includes:

[0009] The target facial image and the target style information are input into the Zhihui big model, the target content features corresponding to the target facial image are extracted by using the content feature extraction network, and the target facial contour features in the target facial image are extracted by using the edge detection network, and the initial style image corresponding to the target facial image is generated by using the two-dimensional LORA network based on the target content features, the target facial contour features and the target style information, and the initial style image is optimized by using the 3D LORA network, and the target style image corresponding to the target facial image is output.

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

[0011] Use the basic big model to create the initial intelligent big model for the image conversion scene;

[0012] Acquire sample training data; the sample training data includes a plurality of sample facial images, sample style images corresponding to the plurality of sample facial images, and sample style information corresponding to the sample style images;

[0013] Using the sample training data to perform model migration training on the initial intelligent large model;

[0014] During the model transfer training process, the initial content features and initial style features corresponding to the sample facial image are determined based on the initial intelligent painting model, and a predicted sample style image corresponding to the sample facial image is generated based on the initial content features, the initial style features and the sample style information, and the model parameters of the initial intelligent painting model are adjusted based on the predicted sample style image and the sample style image to obtain the intelligent painting model after transfer training.

[0015] In a possible implementation, the step of obtaining the target facial image and the target style information to be converted of the target facial image includes:

[0016] receiving a target style selection operation input by a user based on the to-be-converted style selection page; the target style selection operation carries target style information corresponding to the to-be-converted target style selected by the user;

[0017] Receive a target facial image selection operation input by the user, or obtain a target facial image based on a target facial image acquisition operation input by the user, or receive the target facial image sent by a terminal connected to the smart wearable device; the target facial image selection operation carries the target facial image to be converted selected by the user from multiple facial images pre-stored on the smart wearable device.

[0018] In a possible implementation, the step of inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image includes:

[0019] In response to a style conversion confirmation operation or a style conversion confirmation voice command input by the user, the target facial image and the target style information are input into the intelligent painting model, and a target style image corresponding to the target facial image is output.

[0020] In a possible implementation, after inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image, the method further includes:

[0021] The target style image is stored, or the target style image is set as the positioning avatar of the smart wearable device or the account avatar of the user account corresponding to the smart wearable device, or the target style image is sent to a terminal connected to the smart wearable device.

[0022] In a possible implementation, the target style information includes basic information of a target cartoon style; the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style; the basic information includes a style name and / or style sample image corresponding to the target cartoon style.

[0023] In a second aspect, an embodiment of the present application provides an image processing device, which is applied to a smart wearable device. The image processing device includes:

[0024] A first acquisition module is used to acquire a target facial image and target style information to be converted from the target facial image;

[0025] An image processing module is used to input the target facial image and the target style information into the intelligent painting large model, and output a target style image corresponding to the target facial image; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information.

[0026] In a possible implementation, the above-mentioned intelligent painting model includes a content feature extraction network, an edge detection network, a 3D LORA network and a two-dimensional LORA network;

[0027] The above-mentioned image processing module is specifically used for:

[0028] The target facial image and the target style information are input into the Zhihui big model, the target content features corresponding to the target facial image are extracted by using the content feature extraction network, and the target facial contour features in the target facial image are extracted by using the edge detection network, and the initial style image corresponding to the target facial image is generated by using the two-dimensional LORA network based on the target content features, the target facial contour features and the target style information, and the initial style image is optimized by using the 3D LORA network, and the target style image corresponding to the target facial image is output.

[0029] In a possible implementation, the image processing device further includes:

[0030] The model creation module is used to create an initial intelligent drawing model for the image conversion scenario using the basic large model;

[0031] A second acquisition module is used to acquire sample training data; the sample training data includes a plurality of sample facial images, sample style images corresponding to the plurality of sample facial images, and sample style information corresponding to the sample style images;

[0032] A migration training module, used to perform model migration training on the initial intelligent drawing large model using the sample training data;

[0033] A parameter adjustment module is used to determine the initial content features and initial style features corresponding to the sample facial image based on the initial intelligent painting large model during the model migration training process, and to generate a predicted sample style image corresponding to the sample facial image based on the initial content features, the initial style features and the sample style information, and to adjust the model parameters of the initial intelligent painting large model based on the predicted sample style image and the sample style image to obtain the intelligent painting large model after migration training.

[0034] In a possible implementation, the first acquisition module includes:

[0035] A first receiving unit is used to receive a target style selection operation input by a user based on the to-be-converted style selection page; the target style selection operation carries target style information corresponding to the target style to be converted selected by the user;

[0036] The second receiving unit is used to receive the target facial image selection operation input by the above-mentioned user, or to obtain the target facial image based on the target facial image acquisition operation input by the above-mentioned user, or to receive the above-mentioned target facial image sent by the terminal connected to the above-mentioned smart wearable device; the above-mentioned target facial image selection operation carries the target facial image to be converted selected by the above-mentioned user from multiple facial images pre-stored on the above-mentioned smart wearable device.

[0037] In a possible implementation, the image processing module is specifically used for:

[0038] In response to a style conversion confirmation operation or a style conversion confirmation voice command input by the user, the target facial image and the target style information are input into the intelligent painting model, and a target style image corresponding to the target facial image is output.

[0039] In a possible implementation, the image processing device further includes:

[0040] The image application module is used to store the above-mentioned target style image, or set the above-mentioned target style image as the positioning avatar of the above-mentioned smart wearable device or the account avatar of the user account corresponding to the above-mentioned smart wearable device, or send the above-mentioned target style image to a terminal connected to the above-mentioned smart wearable device.

[0041] In a possible implementation, the target style information includes basic information of a target cartoon style; the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style; the basic information includes a style name and / or style sample image corresponding to the target cartoon style.

[0042] In a third aspect, an embodiment of the present application provides a smart wearable device, including: a processor and a memory;

[0043] The processor is connected to the memory;

[0044] The above-mentioned memory is used to store executable program code;

[0045] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method provided by the first aspect of the embodiment of this specification or any possible implementation of the first aspect.

[0046] In a fourth aspect, an embodiment of the present specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method provided by the first aspect of the embodiment of the present specification or any possible implementation of the first aspect.

[0047] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0048] In one or more embodiments of the present application, a target facial image and target style information to be converted for the target facial image are obtained; the target facial image and the target style information are input into a smart large model, and a target style image corresponding to the target facial image is output; the smart large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the smart large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the smart large model has the features of the target style information, thereby directly realizing the stylization of the target facial image and ensuring that the target content features of the target facial image are retained in the stylized target style image, thereby improving the correlation between the target style image and the target facial image, and thereby improving the accuracy of image processing and the intelligence of smart wearable devices.

[0049] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A schematic diagram of the architecture of an image processing system provided by an exemplary embodiment of the present application;

[0052] Figure 2 A flowchart of an image processing method provided by an exemplary embodiment of the present application;

[0053] Figure 3 A schematic diagram of a style selection page to be converted provided by an exemplary embodiment of the present application;

[0054] Figure 4 A schematic diagram of a target facial image provided by an exemplary embodiment of the present application;

[0055] Figure 5 A schematic diagram of a target style image provided by an exemplary embodiment of the present application;

[0056] Figure 6 A schematic diagram of a training process of a large intelligent drawing model provided by an exemplary embodiment of the present application;

[0057] Figure 7 A schematic diagram of the structure of an image processing device provided by an exemplary embodiment of the present application;

[0058] Figure 8 A schematic diagram of the structure of a smart wearable device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0060] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0061] Please refer to the following Figure 1 , which is a schematic diagram of the architecture of an image processing system provided by an exemplary embodiment of this specification. Figure 1 As shown, the image processing system may include: a smart wearable device 110 and a server 120. Among them:

[0062] The smart wearable device 110 may be, but is not limited to, a smart watch, smart glasses, or other devices with a user version of the software installed. The user version of the software may be installed in the smart wearable device 110, and the software may be, but is not limited to, having a built-in trained smart image model for performing image processing on a target facial image imported by a user or a target facial image taken by a user, such as, but not limited to, stylization processing, splicing processing, and the like.

[0063] Specifically, the smart wearable device 110 can first obtain the target facial image and the target style information to be converted of the target facial image, and then input the target facial image and the target style information into the smart painting large model, and output the target style image corresponding to the target facial image; the smart painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the smart painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the smart painting large model has the features of the target style information.

[0064] Optionally, the smart wearable device 110 can also establish a data relationship with the network, and establish a data connection relationship with the server 120 through the network, such as sending a target facial image and target style information to be converted of the target facial image, and receiving a target style image after the server 120 performs style conversion on the target facial image based on the target style information.

[0065] The server 120 may be a server that can provide a variety of image processing, and may receive data such as the target facial image and the target style information to be converted of the target facial image sent by the smart wearable device 110 through the network, and input the target facial image and the target style information into the smart painting model, and output the target style image corresponding to the target facial image. After obtaining the target style image corresponding to the target facial image, the server 120 may, but is not limited to, send the target style image to the smart wearable device 110 through the network for export, thereby realizing the image processing function. The server 120 may, but is not limited to, be a hardware server, a virtual server, a cloud server, etc.

[0066] It can be understood that the image processing method provided in the embodiment of the present application can be executed on the smart wearable device 110, on the server 120, or on a terminal connected to the smart wearable device 110, and the embodiment of the present application is not limited to this.

[0067] The network may be a medium providing a communication link between the server 120 and the smart wearable device 110, or may be the Internet including network devices and transmission media, but is not limited thereto. The transmission medium may be a wired link, such as but not limited to coaxial cable, optical fiber, and digital subscriber line (DSL), or a wireless link, such as but not limited to wireless fidelity (WIFI), Bluetooth, and mobile device network.

[0068] Furthermore, in one or more embodiments proposed in the present application, the target facial image may be, but is not limited to, a human face image, an animal face image, etc. that needs to be stylized, and the target style information may be, but is not limited to, information including any target style to be converted to the target facial image, such as, but not limited to, description text, style name, style sample image, etc. of any target style to be converted. The target style to be converted may be, but is not limited to, at least one of the following cartoon styles: Disney, comics, two-dimensional, etc., and the embodiments of the present application are not limited to this.

[0069] Understandably, Figure 1 The number of smart wearable devices 110 and servers 120 in the image processing system shown is only an example. In a specific implementation, the image processing system may include any number of terminals and servers. This specification embodiment does not specifically limit this. For example, but not limited to, the smart wearable device 110 may be a smart wearable device cluster composed of multiple smart wearable devices, and the server 120 may be a server cluster composed of multiple servers.

[0070] Next, an image processing method provided by an exemplary embodiment of the present application is introduced by taking the image processing performed by a smart wearable device as an example. Figure 2 As shown, the image processing method includes the following steps:

[0071] S201, obtaining a target facial image and target style information to be converted from the target facial image.

[0072] Specifically, when a user wearing a smart wearable device wants to convert a target facial image into a target style image of a target style, the target facial image to be converted and the target style information of the target facial image to be converted can be directly input into the smart wearable device, so that the smart wearable device can obtain the target facial image and the target style information.

[0073] It is understandable that the target facial image may be, but is not limited to, a target human face image, an animal face image, etc. that needs to be stylized, and the target style information may be a style description text, a style name, a style sample image, etc. of any target style to be converted to the target facial image, and the style description text may include, but is not limited to, keywords of various cartoon styles such as Disney, comics, two-dimensional, Ukiyo-e, etc., and may also include keywords of other styles, etc., which are not limited in the embodiments of the present application. The style sample image may include, but is not limited to, any facial image with the target style.

[0074] Optionally, the target facial image may not be limited to real facial images such as real face images or other facial images without style, but may also be a facial image with any style. The target style corresponding to the above-mentioned target style information is different from the style of the target facial image to be converted, that is, the target facial image of one style may be converted into a target style image of another target style through the embodiments of the present application, and the present application does not make any specific limitations on this.

[0075] It is understandable that the target style information may include but is not limited to basic information of the target cartoon style, and the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style. The basic information may include but is not limited to the style name and / or style sample image corresponding to the target cartoon style.

[0076] Optionally, the implementation process of obtaining the target facial image and the target style information to be converted of the target facial image in S201 may include, but is not limited to: receiving a target style selection operation input by a user based on the style selection page to be converted, wherein the target style selection operation carries the target style information corresponding to the target style to be converted selected by the user, for example, but not limited to, when the user triggers the image processing function or the image style conversion function on the smart wearable device, the smart wearable device may display the target style information on its display screen. Figure 3 In the style selection page to be converted shown, the user can select the target style information corresponding to the target style he wants to convert from the multiple style information to be converted displayed on the style selection page (for example, multiple style names such as Disney style, comic style, and corresponding style sample images, etc.), that is, input the corresponding target style selection operation, so that the smart wearable device can obtain the target style information carried in the target style selection operation input by the user; receive the target facial image selection operation input by the user, the above-mentioned target facial image selection operation carries the target facial image to be converted selected by the user from multiple facial images pre-stored in the smart wearable device, or, obtain the target facial image based on the target facial image acquisition operation input by the user, that is, the smart wearable device is installed with an image acquisition device, and the user can, but is not limited to, acquire the target facial image he wants to convert through the image acquisition device on the smart wearable device, or, receive the target facial image sent by the terminal connected to the smart wearable device.

[0077] Please continue to refer to Figure 2 ,like Figure 2 As shown, after obtaining the target facial image and the target style information to be converted of the target facial image in S201, the image processing method further includes:

[0078] S202, input the target facial image and the target style information into the intelligent painting model, and output the target style image corresponding to the target facial image.

[0079] Specifically, the above-mentioned intelligent painting model may include, but is not limited to, content loss and style loss. The above-mentioned content loss is used to ensure that the target style image output by the intelligent painting model retains the target content features of the target facial image, and the above-mentioned style loss is used to ensure that the target style image output by the intelligent painting model has the features of the target style information. The above-mentioned content loss may be, but is not limited to, determined based on the gap between the target content features in the target facial image and the content features in the corresponding target style image. The above-mentioned content features include, for example, but are not limited to, facial contour features, facial shape features, etc. The above-mentioned style loss may be, but is not limited to, determined based on the gap between the target style features in the target style image and the style sample features corresponding to the style sample image in the target style information.

[0080] For example, if the smart wearable device obtains Figure 4 The target facial image 410 and Disney style information shown in FIG. 4 can be used to convert the target facial image 410 into a style image based on the Disney style information using the smart model. Figure 5 The Disney style image 511 shown; if the smart wearable device obtains Figure 4 The target facial image 410 and the comic style information shown in FIG. 4 can be converted into the target facial image 410 by using the smart model based on the comic style information. Figure 5 The comic style image 512 shown; if the smart wearable device obtains Figure 4 The target facial image 420 and Disney style information shown in FIG. 4 can be used to convert the target facial image 420 into a style based on the Disney style information using the smart painting model. Figure 5 The Disney style image 521 shown; if the smart wearable device obtains Figure 4 The target facial image 420 and the comic style information shown in FIG. 4 can be converted into the target facial image 420 by using the smart model based on the comic style information. Figure 5 Comic style image 522 is shown.

[0081] Optionally, the above S202, inputting the target facial image and target style information into the smart painting large model, and outputting the target style image corresponding to the target facial image. The implementation process may include but is not limited to: responding to a style conversion confirmation operation input by the user (for example, but not limited to clicking the style conversion confirmation control displayed on the display screen or short pressing the confirmation button, etc.) or a style conversion confirmation voice command, inputting the target facial image and target style information into the smart painting large model, and outputting the target style image corresponding to the target facial image, that is, the user can manually trigger or voice trigger the smart wearable device to perform image style conversion, thereby improving the flexibility of triggering the smart wearable device to perform image processing.

[0082] Optionally, the above-mentioned intelligent painting model may include but is not limited to a content feature extraction network, an edge detection network, a 3D LORA network, and a two-dimensional LORA network. The above S202, inputting the target facial image and the target style information into the intelligent painting large model, and outputting the target style image corresponding to the target facial image. The implementation process may include but is not limited to: inputting the target facial image and the target style information into the intelligent painting large model, using the content feature extraction network to extract the target content features corresponding to the target facial image, and using the edge detection network to extract the target facial contour features in the target facial image, and using the two-dimensional LORA network to generate the initial style image corresponding to the target facial image based on the target content features, the target facial contour features and the target style information, and using the 3D LORA network to optimize the initial style image, and output the target style image corresponding to the target facial image, thereby introducing the edge detection network to accurately control the character contour in the image, maintaining the accuracy and recognizability of the character features, ensuring that the converted style image can adapt to the new artistic style while maintaining the original character features, and using the 3D LORA network to focus on enhancing the three-dimensional sense of the image, so that the converted target style image has a more three-dimensional visual effect, and also using the two-dimensional LORA network to optimize the image style to ensure the unity and recognizability of the image style, thereby improving the image stylization effect.

[0083] In an embodiment of the present application, a target facial image and target style information to be converted of the target facial image are obtained; the target facial image and the target style information are input into the intelligent painting large model, and a target style image corresponding to the target facial image is output; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information, thereby directly realizing the stylization of the target facial image and ensuring that the target content features of the target facial image are retained in the stylized target style image, thereby improving the correlation between the target style image and the target facial image, and thereby improving the accuracy of image processing and the intelligence of smart wearable devices.

[0084] In a possible embodiment, in the above S202, after inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image, the image processing method further includes: storing the target style image, or setting the target style image as the positioning avatar of the smart wearable device or the account avatar of the user account corresponding to the smart wearable device, or sending the target style image to a terminal connected to the smart wearable device, thereby improving the fun and flexibility of using the smart wearable device. The above positioning avatar is used to represent the avatar displayed during the positioning process of the smart wearable device.

[0085] Please refer to the following Figure 6 , which is a schematic diagram of a training process of a large intelligent drawing model provided by an exemplary embodiment of the present application. Figure 6 As shown, the training process of the intelligent drawing model can include but is not limited to the following steps:

[0086] S601, using the basic large model to create an initial intelligent drawing large model for the image conversion scene.

[0087] Optionally, obtain a basic large model; based on the basic large language model, create an initial intelligent painting large model that at least includes an image conversion scene adaptation module and an image generation module. That is, you can first obtain the basic large model to create an initial intelligent painting large model, and obtain sample training data in the image conversion scenario. Since the basic large model is usually a trained open source AIGC model with content generation capabilities, based on this, this manual only needs to adapt it to the image conversion scene. Specifically, the sample training data can be used to perform model fine-tuning training on the initial intelligent painting large model, and after the model fine-tuning training is completed, the intelligent painting large model adapted to the image conversion scenario is obtained.

[0088] Model creation: Get the basic big model, create an image conversion scene adaptation module for the image conversion scene and an image generation module based on the basic big model, and form the initial intelligent painting big model based on the image generation module and the image conversion scene adaptation module.

[0089] S602, obtaining sample training data, where the sample training data includes a plurality of sample facial images, sample style images corresponding to the plurality of sample facial images, and sample style information corresponding to the sample style images.

[0090] It can be understood that the styles of the sample style images corresponding to the above-mentioned multiple sample facial images may be the same or different, and the embodiments of the present application are not limited to this.

[0091] S603: Use sample training data to perform model migration training on the initial intelligent drawing large model.

[0092] S604, during the model transfer training process, the initial content features and initial style features corresponding to the sample facial image are determined based on the initial intelligent painting large model, and a predicted sample style image corresponding to the sample facial image is generated based on the initial content features, the initial style features and the sample style information, and the model parameters of the initial intelligent painting large model are adjusted based on the predicted sample style image and the sample style image to obtain the intelligent painting large model after transfer training.

[0093] Model migration training process: input sample training data to the initial intelligent painting model for at least one round of model training to obtain a predicted sample style image, calculate the model comprehensive loss based on the predicted sample style image and the corresponding sample style image, adjust the model parameters of the image processing scene adaptation module in the initial intelligent painting model based on the comprehensive model loss, and control the model parameters of the image generation module to remain unchanged. Until the model training end conditions are met to obtain the image generation module and the image conversion scene adaptation module, complete the model fusion of the image generation module and the knowledge question and answer scene adaptation module, and obtain the trained intelligent painting model.

[0094] Model fusion of the image generation module and the image conversion scene adaptation module: the model structure layer weights of the image conversion scene adaptation module and the image generation module are weighted and fused. The target model structure layer corresponding to the model structure layer weight in the image generation module is determined, and the model structure layer parameters of the target model structure layer are fused with the model structure layer weights. The model structure layer weights of the image conversion scene adaptation module may only partially correspond to and have model structure layer weights in all model structure layers in the basic large model. The model structure layer parameters are updated based on the model structure layer weights for this part of the target model structure layer, and the reference update process for all model structure layer weights is completed by analogy, thereby obtaining the intelligent drawing large model.

[0095] Optionally, the model training end condition may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition may be determined based on actual conditions and is not specifically limited here.

[0096] In one or more embodiments of the present application, the above-mentioned method can be used to train a large intelligent painting model, and the use of the large intelligent painting model can effectively realize the stylization of the target facial image, ensure that the target content features of the target facial image are retained in the stylized target style image, improve the correlation between the target style image and the target facial image, and thereby improve the accuracy of image processing and the intelligence of the smart wearable device.

[0097] Please refer to the following Figure 7 , which is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. The above device is applied to smart wearable devices, such as Figure 7 As shown, the image processing device 700 includes:

[0098] A first acquisition module 710 is used to acquire a target facial image and target style information to be converted from the target facial image;

[0099] The image processing module 720 is used to input the above-mentioned target facial image and the above-mentioned target style information into the intelligent painting large model, and output the target style image corresponding to the above-mentioned target facial image; the above-mentioned intelligent painting large model includes content loss and style loss. The above-mentioned content loss is used to ensure that the above-mentioned target style image output by the above-mentioned intelligent painting large model retains the target content characteristics of the above-mentioned target facial image, and the above-mentioned style loss is used to ensure that the above-mentioned target style image output by the above-mentioned intelligent painting large model has the characteristics of the above-mentioned target style information.

[0100] In a possible implementation, the above-mentioned intelligent painting model includes a content feature extraction network, an edge detection network, a 3D LORA network and a two-dimensional LORA network;

[0101] The image processing module 720 is specifically used for:

[0102] The target facial image and the target style information are input into the Zhihui big model, the target content features corresponding to the target facial image are extracted by using the content feature extraction network, and the target facial contour features in the target facial image are extracted by using the edge detection network, and the initial style image corresponding to the target facial image is generated by using the two-dimensional LORA network based on the target content features, the target facial contour features and the target style information, and the initial style image is optimized by using the 3D LORA network, and the target style image corresponding to the target facial image is output.

[0103] In a possible implementation, the image processing device 700 further includes:

[0104] The model creation module is used to create an initial intelligent drawing model for the image conversion scenario using the basic large model;

[0105] A second acquisition module is used to acquire sample training data; the sample training data includes a plurality of sample facial images, sample style images corresponding to the plurality of sample facial images, and sample style information corresponding to the sample style images;

[0106] A migration training module, used to perform model migration training on the initial intelligent drawing large model using the sample training data;

[0107] A parameter adjustment module is used to determine the initial content features and initial style features corresponding to the sample facial image based on the initial intelligent painting large model during the model migration training process, and to generate a predicted sample style image corresponding to the sample facial image based on the initial content features, the initial style features and the sample style information, and to adjust the model parameters of the initial intelligent painting large model based on the predicted sample style image and the sample style image to obtain the intelligent painting large model after migration training.

[0108] In a possible implementation, the first acquisition module 710 includes:

[0109] A first receiving unit is used to receive a target style selection operation input by a user based on the to-be-converted style selection page; the target style selection operation carries target style information corresponding to the target style to be converted selected by the user;

[0110] The second receiving unit is used to receive the target facial image selection operation input by the above-mentioned user, or to obtain the target facial image based on the target facial image acquisition operation input by the above-mentioned user, or to receive the above-mentioned target facial image sent by the terminal connected to the above-mentioned smart wearable device; the above-mentioned target facial image selection operation carries the target facial image to be converted selected by the above-mentioned user from multiple facial images pre-stored on the above-mentioned smart wearable device.

[0111] In a possible implementation, the image processing module 720 is specifically used for:

[0112] In response to a style conversion confirmation operation or a style conversion confirmation voice command input by the user, the target facial image and the target style information are input into the intelligent painting model, and a target style image corresponding to the target facial image is output.

[0113] In a possible implementation, the image processing device 700 further includes:

[0114] The image application module is used to store the above-mentioned target style image, or set the above-mentioned target style image as the positioning avatar of the above-mentioned smart wearable device or the account avatar of the user account corresponding to the above-mentioned smart wearable device, or send the above-mentioned target style image to a terminal connected to the above-mentioned smart wearable device.

[0115] In a possible implementation, the target style information includes basic information of a target cartoon style; the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style; the basic information includes a style name and / or style sample image corresponding to the target cartoon style.

[0116] The division of each module in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device. The implementation of each module in the image processing device provided in the embodiment of this specification can be in the form of a computer program. The computer program can be run on a smart wearable device. The program module composed of the computer program can be stored in the memory of a terminal or a smart wearable device. When the computer program is executed by the processor, all or part of the steps of the image processing method described in the embodiment of this specification are implemented.

[0117] See next Figure 8 , Figure 8 This is a schematic diagram of the structure of a smart wearable device provided by an exemplary embodiment of this specification. Figure 8 As shown, the smart wearable device 800 may include: at least one processor 810, at least one communication bus 820, a user interface 830, at least one network interface 840, and a memory 850.

[0118] The communication bus 820 may be used to realize the connection and communication among the above-mentioned components.

[0119] The user interface 830 may include a display screen (Display) and a camera (Camera), and the optional user interface may also include a standard wired interface and a wireless interface.

[0120] The network interface 840 may optionally include a Bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, and the like.

[0121] Among them, the processor 810 may include one or more processing cores. The processor 810 uses various interfaces and lines to connect the various parts of the entire smart wearable device 800, and executes various functions and processes data of the routing smart wearable device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 850, and calling data stored in the memory 850. Optionally, the processor 810 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 810 can integrate one or more combinations of a processor (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 810, and it can be implemented separately through a chip.

[0122] The memory 850 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 850 includes a non-transitory computer-readable medium. The memory 850 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 850 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as an acquisition function, an image processing function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 850 may optionally be at least one storage device located away from the aforementioned processor 810. As Figure 8 As shown, the memory 850 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0123] Specifically, the processor 810 may be used to call the program instructions stored in the memory 850 and perform the following operations:

[0124] A target facial image and target style information to be converted of the target facial image are obtained.

[0125] The target facial image and the target style information are input into the intelligent painting large model, and a target style image corresponding to the target facial image is output; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information.

[0126] In some possible embodiments, the above-mentioned intelligent drawing model includes a content feature extraction network, an edge detection network, a 3D LORA network and a two-dimensional LORA network;

[0127] When the processor 810 inputs the target facial image and the target style information into the intelligent painting model and outputs the target style image corresponding to the target facial image, it is specifically used to execute:

[0128] The target facial image and the target style information are input into the Zhihui big model, the target content features corresponding to the target facial image are extracted by using the content feature extraction network, and the target facial contour features in the target facial image are extracted by using the edge detection network, and the initial style image corresponding to the target facial image is generated by using the two-dimensional LORA network based on the target content features, the target facial contour features and the target style information, and the initial style image is optimized by using the 3D LORA network, and the target style image corresponding to the target facial image is output.

[0129] In some possible embodiments, the processor 810 is further configured to execute:

[0130] The basic large model is used to create the initial intelligent large model for the image conversion scenario.

[0131] Acquire sample training data; the sample training data includes a plurality of sample facial images, sample style images corresponding to the plurality of sample facial images, and sample style information corresponding to the sample style images.

[0132] The above sample training data is used to perform model migration training on the above initial intelligent painting large model.

[0133] During the model transfer training process, the initial content features and initial style features corresponding to the sample facial image are determined based on the initial intelligent painting model, and a predicted sample style image corresponding to the sample facial image is generated based on the initial content features, the initial style features and the sample style information, and the model parameters of the initial intelligent painting model are adjusted based on the predicted sample style image and the sample style image to obtain the intelligent painting model after transfer training.

[0134] In some possible embodiments, when the processor 810 executes the acquisition of the target facial image and the target style information to be converted of the target facial image, it is specifically configured to execute:

[0135] A target style selection operation input by a user is received based on the style selection page to be converted; the target style selection operation carries target style information corresponding to the target style to be converted selected by the user.

[0136] Receive a target facial image selection operation input by the user, or obtain a target facial image based on a target facial image acquisition operation input by the user, or receive the target facial image sent by a terminal connected to the smart wearable device; the target facial image selection operation carries the target facial image to be converted selected by the user from multiple facial images pre-stored on the smart wearable device.

[0137] In some possible embodiments, when the processor 810 performs the inputting of the target facial image and the target style information into the intelligent painting large model and outputting the target style image corresponding to the target facial image, it is specifically used to perform:

[0138] In response to a style conversion confirmation operation or a style conversion confirmation voice command input by the user, the target facial image and the target style information are input into the intelligent painting model, and a target style image corresponding to the target facial image is output.

[0139] In some possible embodiments, after the processor 810 executes the inputting of the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image, it is further configured to execute:

[0140] The target style image is stored, or the target style image is set as the positioning avatar of the smart wearable device or the account avatar of the user account corresponding to the smart wearable device, or the target style image is sent to a terminal connected to the smart wearable device.

[0141] In some possible embodiments, the target style information includes basic information of the target cartoon style; the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style; the basic information includes a style name and / or style sample image corresponding to the target cartoon style.

[0142] The embodiment of the present application also provides a computer storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods. If the components of the above image processing device are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above storage medium.

[0143] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above process or function according to the embodiment of the present application is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above computer instructions can be stored in a computer-readable storage medium or transmitted by the above computer-readable storage medium. The above computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The above computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The above available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0145] The above-mentioned embodiments are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims of the present application.

Claims

1. An image processing method, characterized in that: The method is applied to a smart wearable device; the method comprises: Acquire a target facial image and target style information to be converted of the target facial image; The target facial image and the target style information are input into the intelligent painting large model, and a target style image corresponding to the target facial image is output; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information.

2. The method according to claim 1, characterized in that The intelligent painting model includes a content feature extraction network, an edge detection network, a 3D LORA network and a two-dimensional LORA network; The step of inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image includes: The target facial image and the target style information are input into the intelligent painting model, the target content features corresponding to the target facial image are extracted by using the content feature extraction network, and the target facial contour features in the target facial image are extracted by using the edge detection network. Based on the target content features, the target facial contour features and the target style information, the initial style image corresponding to the target facial image is generated by using the two-dimensional LORA network, and the initial style image is optimized by using the 3D LORA network, and the target style image corresponding to the target facial image is output.

3. The method according to claim 1, characterized in that The method further comprises: Use the basic big model to create the initial intelligent big model for the image conversion scene; Acquire sample training data; the sample training data includes a plurality of sample facial images, sample style images corresponding to each of the plurality of sample facial images, and sample style information corresponding to the sample style images; Using the sample training data to perform model migration training on the initial intelligent drawing large model; During the model migration training process, the initial content features and initial style features corresponding to the sample facial image are determined based on the initial intelligent painting large model, and a predicted sample style image corresponding to the sample facial image is generated based on the initial content features, the initial style features and the sample style information, and the model parameters of the initial intelligent painting large model are adjusted based on the predicted sample style image and the sample style image to obtain the intelligent painting large model after migration training.

4. The method according to claim 1, characterized in that The step of acquiring a target facial image and target style information of the target facial image to be converted comprises: receiving a target style selection operation input by a user based on the to-be-converted style selection page; the target style selection operation carries target style information corresponding to the to-be-converted target style selected by the user; Receive a target facial image selection operation input by the user, or obtain a target facial image based on a target facial image acquisition operation input by the user, or receive the target facial image sent by a terminal connected to the smart wearable device; the target facial image selection operation carries the target facial image to be converted selected by the user from multiple facial images pre-stored on the smart wearable device.

5. The method according to claim 1, characterized in that The step of inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image includes: In response to a style conversion confirmation operation or a style conversion confirmation voice instruction input by a user, the target facial image and the target style information are input into the intelligent painting large model, and a target style image corresponding to the target facial image is output.

6. The method according to claim 1, characterized in that After inputting the target facial image and the target style information into the intelligent painting model and outputting the target style image corresponding to the target facial image, the method further includes: The target style image is stored, or the target style image is set as a positioning avatar of the smart wearable device or an account avatar of a user account corresponding to the smart wearable device, or the target style image is sent to a terminal connected to the smart wearable device.

7. The method according to any one of claims 1 to 6, characterized in that: The target style information includes basic information of a target cartoon style; the target cartoon style includes at least one of the following: Ukiyo-e style, Disney style, comic style, and two-dimensional style; the basic information includes a style name and / or a style sample image corresponding to the target cartoon style.

8. An image processing device, characterized in that: The device is applied to a smart wearable device, and the image processing device comprises: A first acquisition module is used to acquire a target facial image and target style information to be converted of the target facial image; An image processing module is used to input the target facial image and the target style information into the intelligent painting large model, and output a target style image corresponding to the target facial image; the intelligent painting large model includes content loss and style loss, the content loss is used to ensure that the target style image output by the intelligent painting large model retains the target content features of the target facial image, and the style loss is used to ensure that the target style image output by the intelligent painting large model has the features of the target style information.

9. A smart wearable device, characterized in that: include: processor and memory; wherein, The processor is connected to the memory; the memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method steps according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

Citation Information

Cited By

  • Image stylized editing method and device for three-dimensional scene, equipment and medium

    CN119540431A

  • Image stylization editing method, device, equipment and medium for three-dimensional scene

    CN119540431B