Wallpaper setting method, electronic equipment, storage medium and chip system
By performing anomaly identification and multi-dimensional quality assessment of AI images in the wallpaper setting method, the problem of users having difficulty selecting high-quality AI images is solved, enabling users to quickly select high-quality wallpapers.
Patent Information
- Application Number
- CN202411137046.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2026-03-03
AI Technical Summary
Users find it difficult to quickly and easily select high-quality images as wallpapers from AI-generated images, resulting in a poor user experience.
This paper provides a method for setting wallpapers. By displaying images in the gallery, receiving user selections, generating and displaying AI images, performing anomaly identification and image quality assessment, and providing image quality references based on multiple dimensions, it facilitates user selection.
This improves the efficiency for users to select higher-quality images from multiple similar AI images, thus enhancing the user experience.
Smart Images

Figure CN121603591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a wallpaper setting method, electronic device, storage medium, and chip system. Background Technology
[0002] Artificial intelligence generated content (AIGC) refers to various types of content generated using artificial intelligence technology. This content can include text, images, audio, video, and more.
[0003] However, the images generated by AIGC vary in quality, making it difficult for users to quickly and easily select high-quality images. Summary of the Invention
[0004] This application provides a wallpaper setting method, electronic device, storage medium, and chip system that can set one or more AI images as wallpapers, enriching wallpaper diversity, and performing anomaly identification and image quality assessment on AI images. Images from anomalous scenes can be excluded from wallpaper selection. For images from non-anomalous scenes, image quality can be assessed based on aspects such as human details, background, frequency domain quality, and saliency. This provides image quality references when users select from multiple similar AI images, facilitating quick selection of higher-quality images and improving user experience.
[0005] In a first aspect, embodiments of this application provide a wallpaper setting method, which is applied to an electronic device and includes:
[0006] The system displays a first interface containing N images from a gallery, where N is an integer greater than or equal to 1. Upon receiving a first user action to select M images from the N images, a second interface is displayed. This second interface contains L AI images generated from the M images, where M is a positive integer less than or equal to N, and L is an integer greater than or equal to M. Upon receiving a second user action to select one or more AI images from the L AI images, the system sets one or more AI images as the wallpaper for the electronic device. This method of setting the wallpaper for an electronic device based on one or more generated AI images provides users with more personalized and diverse image styles, thus enriching the diversity of wallpapers.
[0007] In one possible implementation, the L AI images are sorted from highest to lowest image quality. This provides an image quality reference when a user selects an image from multiple AI images, allowing the user to prioritize images with higher quality, thus improving the user experience.
[0008] In one possible implementation, the second interface also displays the image quality scores of the L AI images. This allows users to more easily select AI wallpapers with higher quality scores, improving the user experience.
[0009] In one possible implementation, upon receiving a first operation from a user selecting M images from N images, a second interface is displayed. This includes: upon receiving the first operation from the user selecting M images from N images, a third interface is displayed, the third interface including one or more style selection controls; upon receiving a third operation from the user acting on one or more style selection controls, the second interface is displayed, the styles of the L AI images in the second interface including the styles selected by the user. In this way, generating AI wallpapers based on the image styles selected by the user makes it easier to obtain AI images that meet the user's needs, thereby improving the user experience.
[0010] In one possible implementation, after receiving the user's first operation to select M images from N images, the system further includes: displaying a fourth interface, which includes image information of one or more human figures, including age and / or gender information, and the M images include one or more human figures. This allows the user to easily understand whether the selected images meet their needs based on the image information; furthermore, it allows the user to confirm the accuracy of the image information, enabling the electronic device to update the corresponding training model based on user feedback, thereby improving the model's recognition accuracy.
[0011] In one possible implementation, the method further includes: receiving a fourth operation from the user on image information, displaying a fifth interface, the fifth interface including an age selection area and / or a gender selection area, the age selection area including age selection controls for multiple age ranges, and the gender selection area including female and male selection controls; receiving a fifth operation from the user on a control in the age selection area and / or a control in the gender selection area, displaying a sixth interface, in which the person's age and / or gender are matched with the corresponding person's image. In this way, on the one hand, the user can select information that matches the image according to the actual situation. On the other hand, the electronic device or server can update the age recognition model and / or gender recognition model based on the information modified by the user, thereby improving the accuracy of the model.
[0012] In one possible implementation, the method further includes: receiving a fourth operation from the user on the image information, displaying a fifth interface, the fifth interface including: a prompt message and a first control, the prompt message indicating whether the image information matches the corresponding person image; receiving a fifth operation from the user on the first control, displaying a sixth interface, in which the image information matches the corresponding person image. In this way, on the one hand, the user can select information matching the image according to the actual situation. On the other hand, the electronic device or server can update the age recognition model and / or gender recognition model based on the information modified by the user, thereby improving the accuracy of the model.
[0013] In one possible implementation, before displaying the second interface, the method further includes: determining the image quality or image quality score of L AI images. The image quality or image quality score of the L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and pose of the person, a second score related to the person's facial expression, a third score related to the image background, a fourth score related to the image's frequency domain quality, and a fifth score related to the image's saliency. This allows for a more comprehensive evaluation of image quality from multiple dimensions, providing a more reasonable image quality score, facilitating user selection, and improving the user experience.
[0014] In one possible implementation, the character's skeleton and posture include the skeleton and posture of the shoulder region, the skeleton and posture of the elbow region, and the skeleton and posture of the knee region. The first score S1 related to the character's skeleton and posture satisfies the following formula:
[0015] S1=K1×(1-d 11 / 0.1)+K2×(1–d 22 / 0.1)+K3×(1–d 33 / 0.1).
[0016] Where K1 is the scoring weight for the shoulder area, K2 is the scoring weight for the elbow area, K3 is the scoring weight for the knee area, and d 11 d represents the difference between the left and right shoulders in the shoulder region. 22 d represents the difference between the left and right elbows in the elbow region. 33 This represents the difference between the left and right knees in the knee region. The skeleton and posture are then scored based on different weights and coefficients assigned to the detected keypoints. When the image type differs, the keypoints included in the image also differ, resulting in different weights and coefficients for the same region, thus achieving a balanced and diverse scoring system.
[0017] In one possible implementation, the electronic device has multiple preset character expressions, each corresponding to a different score range. The second score S2 related to the character expression satisfies the following formula:
[0018] S2 = Em min +(Em max -Em min )×L em / 100.
[0019] Among them, L em The maximum similarity score for a person's facial expression is the highest similarity score among multiple facial expressions in an AI image. The AI image is any one of L AI images. min For L em The minimum value of the corresponding character's facial expression score range, Em max For L em The maximum value within the corresponding score range for facial expressions. Since users typically place great importance on facial expressions in images, this embodiment considers facial expressions and scores them during image quality assessment. This results in images with higher quality scores having better facial expressions, thus meeting user needs and improving the user experience.
[0020] In one possible implementation, the fourth score S4, which is related to the image frequency domain quality, satisfies the following formula:
[0021] S4=100×((f high / f all ) / 0.1).
[0022] Among them, f high f represents the energy of the high-frequency components of the AI image in the frequency domain. all The total energy of the AI image in the frequency domain is defined as follows: the high-frequency component is the frequency component within a preset pixel region in the center area of the AI image, and the AI image is any one of L AI images. By using Fourier transform, the image is converted from the spatial domain to the frequency domain. The ratio of the total spectral energy to the high-frequency energy is calculated, which can then be used as a basis for image frequency domain quality scoring. This yields a score that matches the image quality for user reference, thereby improving the user experience.
[0023] In one possible implementation, the fifth score S5, which is related to image saliency, satisfies the following formula:
[0024] S5=(1-((sm m -sm min ) / (sm max -sm min ))×100.
[0025] Where sm is the saliency value of the AI image, sm m Sm is the average of the significance values. max The maximum significance value is sm min The minimum saliency value is defined as any one of the L AI images. By considering the saliency of the images, we can better evaluate the people in the images, resulting in images with better portrait quality, thus helping users select higher-quality images.
[0026] In one possible implementation, before determining the image quality or image quality score of the L AI images, the method further includes: identifying image anomalies in the generated AI images. The generated AI images include L AI images, and image anomalies include one or more of the following: abnormal person information, distortion anomalies, and occlusion anomalies. Abnormal person information includes one or more of the following: incorrect age recognition, incorrect gender recognition; distortion anomalies include one or more of the following: extra fingers, multiple organs, missing organs, deformed torso, missing torso; occlusion anomalies can include people being occluded. In this way, by identifying abnormal scenes in the images beforehand, more types of distorted images can be identified, and these abnormal images can be filtered out in advance. Therefore, it is unnecessary to perform subsequent image quality scoring on the abnormal images, which can reduce computational power and improve the execution efficiency of the algorithm.
[0027] In one possible implementation, the electronic device does not use AI images with image anomalies. This includes discarding, deleting, scoring the AI images below a preset value, or assigning a score of 0 to such images. In this way, the electronic device will not display images of poor quality or with low scores, thus providing users with higher-quality images and improving the user experience.
[0028] Secondly, embodiments of this application provide another wallpaper setting method, which is applied to a communication system, the communication system including an electronic device and a server, and the method includes:
[0029] The electronic device displays a first interface, which includes N images from a gallery, where N is an integer greater than or equal to 1. The electronic device receives a first operation from the user selecting M images from the N images and sends these M images to the server, where M is a positive integer less than or equal to N. The server generates L AI images based on the M images and sends these L AI images to the electronic device, where L is an integer greater than or equal to M. The electronic device then displays a second interface, which also includes the L AI images. Finally, the electronic device receives a second operation from the user selecting one or more AI images from the L AI images and sets these one or more AI images as the device's wallpaper. This method of setting the electronic device's wallpaper based on one or more generated AI images provides users with more personalized and diverse images, thus enriching the diversity of wallpapers.
[0030] In one possible implementation, the L AI images are sorted from highest to lowest image quality, or from highest to lowest image quality score. This application embodiment can measure image quality from multiple dimensions to provide a comprehensive evaluation of the images. It can also sort the AI images from highest to lowest image quality. This provides an image quality reference when a user selects an image from multiple AI images, allowing the user to prioritize images with higher quality, thus improving the user experience.
[0031] In one possible implementation, the electronic device sends M images to the server, and further includes: the electronic device sending the M images to the server, and sending one or more image styles selected by the user; the server generates L AI images based on the M images, and further includes: the server generating L AI images based on the M images and one or more image styles, wherein the L AI images include one or more image styles. In this way, generating AI wallpapers based on the user-selected image styles makes it easier to obtain AI images that meet the user's needs, thereby improving the user experience.
[0032] In one possible implementation, after the server generates L AI images based on M images, the process includes: the server determining the image quality or image quality score of the L AI images, wherein the image quality or image quality score of the L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and pose of the person, a second score related to the expression of the person, a third score related to the background of the image, a fourth score related to the frequency domain quality of the image, and a fifth score related to the saliency of the image. This allows for a more comprehensive evaluation of the image quality from multiple dimensions, providing a more reasonable image quality score, facilitating user selection, and improving the user experience.
[0033] In one possible implementation, before the server determines the image quality or image quality score of the L AI images, the process further includes: the server identifying image anomalies in the generated AI images, which consist of L AI images. Image anomalies include one or more of the following: anomalies related to human information, distortion anomalies, and occlusion anomalies. Specifically, anomalies related to human information include one or more of the following: incorrect age recognition, incorrect gender recognition; distortion anomalies include one or more of the following: extra fingers, multiple organs, missing organs, deformed torso, missing torso; and occlusion anomalies can include occlusion of the human body. By identifying anomalies in the images beforehand, more types of distortion can be identified, and these anomalous images can be filtered out in advance. This eliminates the need for subsequent image quality scoring of anomalous images, reducing computational power and improving algorithm efficiency.
[0034] In one possible implementation, the server avoids using AI images with image anomalies. This includes discarding, deleting, scoring the AI images below a preset value, or assigning a score of 0 to such images. In this way, electronic devices will not display poor-quality or poorly scored images, thus providing users with higher-quality images and improving the user experience.
[0035] Thirdly, embodiments of this application provide a wallpaper setting apparatus, which may be an electronic device, or a chip or chip system within an electronic device. The apparatus may include a processing unit and a display unit. The processing unit is used to implement any processing-related method executed by the electronic device in the first aspect or any possible implementation of the first aspect, or by the electronic device in the second aspect or any possible implementation of the second aspect. The display unit is used to implement any display-related method executed by the electronic device in the first aspect or any possible implementation of the first aspect, or by the electronic device in the second aspect or any possible implementation of the second aspect.
[0036] When the device is an electronic device, the processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement the method performed by the electronic device described in the first aspect or any possible implementation of the first aspect, or the method performed by the electronic device described in the second aspect or any possible implementation of the second aspect.
[0037] When the device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes instructions stored in the storage unit to cause the electronic device to implement the method performed by the electronic device described in the first aspect or any possible implementation of the first aspect, or the method performed by the electronic device described in the second aspect or any possible implementation of the second aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.) or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).
[0038] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions, and the processor is used to execute the code instructions to perform the method executed by the electronic device as described in the first aspect or any possible implementation of the first aspect, or the method executed by the electronic device as described in the second aspect or any possible implementation of the second aspect.
[0039] Fifthly, embodiments of this application provide a communication system including an electronic device and a server. The electronic device is used to execute the method executed by the electronic device as described in the first aspect or any possible implementation of the first aspect, or the method executed by the electronic device as described in the second aspect or any possible implementation of the second aspect. The server is used to execute the method executed by the server in the method described in the second aspect or any possible implementation of the second aspect.
[0040] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform a method performed by an electronic device as described in the first aspect or any possible implementation of the first aspect, or a method performed by an electronic device as described in the second aspect or any possible implementation of the second aspect, or a method performed by a server as described in the second aspect or any possible implementation of the second aspect.
[0041] In a seventh aspect, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform a method performed by an electronic device as described in the first aspect or any possible implementation of the first aspect, or a method performed by an electronic device as described in the second aspect or any possible implementation of the second aspect, or a method performed by a server as described in the second aspect or any possible implementation of the second aspect.
[0042] Eighthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform methods executed by an electronic device described in the first aspect or any possible implementation thereof, or methods executed by an electronic device described in the second aspect or any possible implementation thereof, or methods executed by a server described in the second aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0043] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0044] It should be understood that the third to eighth aspects of this application correspond to the technical solutions of the first or second aspects of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0046] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0047] Figure 3 A schematic diagram illustrating the interaction between a first electronic device and a cloud server, provided in an embodiment of this application;
[0048] Figure 4 A schematic diagram of a character image selection interface provided in an embodiment of this application;
[0049] Figure 5 A schematic diagram of an image style selection interface provided in an embodiment of this application;
[0050] Figure 6 A schematic diagram of a person recognition interface provided in an embodiment of this application;
[0051] Figure 7 A schematic diagram illustrating an AI wallpaper generation interface provided in an embodiment of this application;
[0052] Figure 8 A schematic diagram of an AI wallpaper settings interface provided in an embodiment of this application;
[0053] Figure 9 A schematic diagram of an AI wallpaper rating interface provided in an embodiment of this application;
[0054] Figure 10 A schematic diagram of a preview interface provided for an embodiment of this application;
[0055] Figure 11 A flowchart illustrating a wallpaper setting method provided in an embodiment of this application;
[0056] Figure 12 A schematic diagram illustrating an abnormal scene recognition method provided in an embodiment of this application;
[0057] Figure 13 A schematic diagram of the overall structure of a ResNet50 algorithm model provided in an embodiment of this application;
[0058] Figure 14 A schematic diagram of each stage of a ResNet50 algorithm model provided for an embodiment of this application;
[0059] Figure 15 A schematic diagram of a BTNK1 structure and a BTNK2 structure provided in the embodiments of this application;
[0060] Figure 16 A schematic diagram illustrating a person's gender recognition method as provided in an embodiment of this application;
[0061] Figure 17 A schematic diagram illustrating human distortion recognition provided in an embodiment of this application;
[0062] Figure 18 A schematic diagram of a background image after human portrait extraction provided in an embodiment of this application;
[0063] Figure 19 This application provides an example of a background image repaired using an embodiment of the present application.
[0064] Figure 20 This is a schematic diagram of a background image with adjusted parameters provided in an embodiment of this application;
[0065] Figure 21 A schematic diagram illustrating the detection and scoring process of skeleton and posture provided in an embodiment of this application;
[0066] Figure 22 This is a schematic diagram illustrating a scoring weight K value selection strategy provided in an embodiment of this application;
[0067] Figure 23 A schematic diagram illustrating the process of detecting and scoring human facial expressions provided in an embodiment of this application;
[0068] Figure 24 A schematic diagram illustrating the process of detecting and scoring an image background, provided in an embodiment of this application;
[0069] Figure 25 This application provides a schematic diagram of image background scoring.
[0070] Figure 26 A schematic diagram illustrating the proportion of high-frequency components to total energy provided in an embodiment of this application;
[0071] Figure 27 A schematic diagram illustrating different proportions of high-frequency components in the total energy, provided for an embodiment of this application;
[0072] Figure 28 A schematic diagram illustrating the process of image saliency detection and scoring provided in an embodiment of this application;
[0073] Figure 29 A schematic diagram illustrating the salience scoring of a person image as provided in an embodiment of this application;
[0074] Figure 30 A schematic diagram illustrating a wallpaper setting method provided in an embodiment of this application;
[0075] Figure 31 A schematic diagram illustrating another wallpaper setting method provided in an embodiment of this application;
[0076] Figure 32 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0077] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:
[0078] 1. Terminology
[0079] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0080] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0081] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0082] 2. Electronic equipment
[0083] The electronic devices in this application embodiment can also be any form of terminal device. For example, electronic devices may include: mobile phones, tablet computers, handheld computers, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, electronic devices in 5G networks, or future evolved public land mobile communication networks (PLANs). The embodiments of this application do not limit the scope of electronic devices in a mobile network (PLMN).
[0084] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0085] Furthermore, in this application embodiment, the electronic device can also be an electronic device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0086] The electronic equipment in the embodiments of this application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0087] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0088] For example, Figure 1 A schematic diagram of the electronic device is shown.
[0089] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 150, and a display screen 160, etc.
[0090] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may include hardware, software, or a combination of software and hardware.
[0091] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0092] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. For example, in the embodiments of this application, the processor 110 can be used to display images of people, set wallpapers, etc. in the interface.
[0093] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0094] The internal memory 121 can be used to store executable program code, including instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc. The data storage area may store data created during the use of the electronic device, etc. Furthermore, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121 and / or instructions stored in memory disposed in the processor. For example, in this embodiment, the internal memory 121 may be used to store code related to interface display and code related to image scoring, etc.
[0095] Figure 2 This is a software structure block diagram of an electronic device according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, the hardware adaptation layer (HAL), and the kernel layer.
[0096] The application layer, also known as the application layer, can include a series of application packages. For example... Figure 2 As shown, the application package can include applications such as Gallery and Settings. Applications can include system applications and third-party applications.
[0097] The application framework layer, also known as the framework layer, provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer can include some predefined functions.
[0098] The Framework layer can include the Activity Manager, Window Manager, Resource Manager, Notification Manager, Content Provider, and View System, etc. For details, please refer to the relevant technical documentation; further details will not be elaborated upon here.
[0099] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the control and management of the Android system.
[0100] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0101] The application layer and framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiments of this application, the virtual machine can be used to display the interface, set the wallpaper, and receive and respond to user-triggered operations on electronic devices.
[0102] The system library can also be called the Native layer, which can include multiple functional modules.
[0103] The Hardware Abstraction Layer (HAL) is a layer of abstraction located between the kernel layer and the Android runtime. The HAL can be a wrapper around hardware drivers, providing a unified interface for calls from upper-layer applications.
[0104] The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, camera drivers, audio drivers, etc.
[0105] It should be noted that the embodiments of this application are only illustrated using the Android system. In other operating systems (such as Windows, iOS, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of this application, the solution of this application can also be implemented.
[0106] AIGC refers to various types of content generated using artificial intelligence technology. This content can include text, images, audio, video, etc. Images generated by AIGC can be simply referred to as AI images.
[0107] In some scenarios, users can use AI images as wallpapers. For example, a user can select one or more images from their gallery, and based on the selected images, the electronic device can use an AI model to generate various AI images in different styles in batches. In this way, the user can choose a satisfactory image from the generated AI images as their wallpaper.
[0108] However, among the many similar AI images generated, users need to visually inspect them to select the better quality AI images, making it difficult for users to quickly and easily select the better quality AI images.
[0109] In view of this, the wallpaper setting method provided in this application embodiment can set one or more AI images as wallpaper, enriching the diversity of wallpapers, and performing anomaly identification and image quality assessment on AI images. Images of abnormal scenes can be excluded from wallpaper selection, while images of non-abnormal scenes can be assessed for image quality based on aspects such as details of people, background, frequency domain quality, and saliency. This provides image quality references when users select from multiple similar AI images, facilitating quick selection of higher-quality images and improving user experience.
[0110] It is understood that in this embodiment, the generation of AI images and the anomaly recognition and image quality scoring of the AI images can be implemented on a cloud server or on the user's electronic device. The user's electronic device may include, for example, a mobile phone, watch, tablet, or computer, and the cloud server may be simply referred to as a cloud server or server. When the wallpaper setting method is implemented on a cloud server, the computational load on the user's electronic device can be reduced, improving performance and reducing lag. For ease of description, the following explanation will use the generation of AI images and the anomaly recognition and image quality scoring of AI images on a cloud server as an example. For clarity, the user's electronic device will be referred to as the first electronic device in subsequent embodiments.
[0111] The methods of this application will be described in detail below through specific embodiments. The following embodiments can be combined with each other or implemented independently, and the same or similar concepts or processes may not be described again in some embodiments.
[0112] For ease of description, the following descriptions will use human images as examples. Other types of images, such as animal images, landscape images, and cartoon character images, are similar to human images and will not be described in detail. The images in the embodiments of this application can also be understood as pictures or photographs.
[0113] In this embodiment, the first electronic device can provide the function of generating AI wallpapers. For example... Figure 3 As shown, a user can select one or more images on a first electronic device and trigger the AI wallpaper generation function. In response to this user action, the first electronic device can send the selected images to a cloud server. The cloud server can then generate one or more AI images based on these images and perform anomaly detection and image quality scoring on the generated AI images. The specific implementation process of the cloud server performing anomaly detection and image quality scoring on the AI images will be described in detail in subsequent embodiments and will not be repeated here.
[0114] It is understood that the user operations mentioned in the embodiments of this application may include, but are not limited to, touch (e.g., click), voice control, gestures, etc., and the embodiments of this application do not limit them.
[0115] After the cloud server performs anomaly detection and image quality scoring on the AI images, it can return one or more AI images with the highest quality scores to the first electronic device. Optionally, the cloud server can also return the scores corresponding to the AI images to the first electronic device. The first electronic device can display these one or more AI images on a relevant interface. The user can set these one or more AI images as wallpaper, including desktop wallpaper, lock screen wallpaper, live wallpaper, etc. In response to the user's action, the first electronic device can display the AI image set by the user as a wallpaper.
[0116] For example, the first electronic device may include a control for generating AI wallpapers. Optionally, this control may be a control on the desktop of the first electronic device, a control in the interface of a gallery application, or a control in the interface corresponding to the "Wallpaper and Theme" option in a settings application. The specific display position and style of this control are not limited in this embodiment. In some scenarios, a gallery application may also be called a photo album application. The "Wallpaper and Theme" option may also be called a "Desktop and Wallpaper" option, a "Display" option, a "Wallpaper and Personalization" option, etc.
[0117] Taking a gallery app as an example, which provides controls for generating AI wallpapers, in response to a user triggering the control to generate an AI wallpaper, such as... Figure 4 As shown, the first electronic device can display a person image selection interface 400. The person image selection interface 400 may include a search box 401, an image classification area 402, an image selection area 403, and a return control 404.
[0118] The search box 401 can be used to quickly search for images that a user wants to find. The search box 401 can also display prompts suggesting which keywords the user can enter to quickly find the desired images. When the user enters a keyword in the search box 401, in response to the user's action, the first electronic device can search the image library for images related to that keyword. For example, the user can enter a person's name in the search box 401, and the first electronic device can search the image library for images related to that person's name.
[0119] Image classification region 402 may include one or more controls.
[0120] Optionally, the one or more controls may include an "All" control. In response to a user triggering an operation on the "All" control, the "All" control may be highlighted. When the "All" control is highlighted, the image selection area 403 may display all images of people or images of multiple types of people, wherein the multiple types of people images may include images of different people, images of different styles of people, and / or images of different background styles, etc.
[0121] It is understood that highlighting may include, but is not limited to, one or more of the following: changing the color of the font and / or control, changing the size of the font and / or control, changing the grayscale of the font and / or control, and bolding the font.
[0122] Optionally, the one or more controls may include a "Personal" control. In response to a user triggering an action on the "Personal" control, the "Personal" control may be highlighted. When the "Personal" control is highlighted, the image selection area 403 may display an image related to the user.
[0123] Optionally, depending on the character's name, the one or more controls may further include one or more character name controls, such as a "Name a" control, a "Name b" control, and a "Name c" control. For example, in response to a user triggering an operation on the "Name a" control, the "Name a" control can be highlighted, and the image selection area 403 can display an image related to "Name a". Similarly, in response to a user triggering an operation on the "Name c" control, the "Name c" control can be highlighted, and the image selection area 403 can display an image related to "Name c".
[0124] It is understood that the number of controls included in the specific image classification area 402 and the names corresponding to the controls are not limited in this embodiment.
[0125] The image selection area 403 can be used to display thumbnails of the images to be selected. These thumbnails may include thumbnails of all images in the gallery, or they may only display thumbnails of images related to the person; this embodiment does not limit the scope. In possible implementations, the user can select one or more thumbnails in the image selection area 403 by clicking, long-pressing, or swiping; alternatively, the person image selection interface 400 may also include a "select all" control, allowing the user to select all thumbnails in the image selection area 403 by triggering the "select all" control.
[0126] The return control 404 can be used to exit the character image selection interface 400.
[0127] For example, the following example illustrates how a user selects a thumbnail in image selection area 403.
[0128] Optionally, in response to the user selecting a thumbnail in the image selection area 403, such as Figure 5 As shown, the first electronic device can display an image style selection interface 500. It is understood that the display of the image style selection interface 500 by the electronic device is not limited to responding to the user's operation of selecting a thumbnail in the image selection area 403, but may also include other operations that can trigger the display of the image style selection interface 500, such as responding to the selection of an image. This embodiment of the application does not limit this.
[0129] The image style selection interface 500 may include an image style display area 501, a return control 502, and a confirmation control 503.
[0130] The image style display area 501 can be used to display different styles of images. It is understood that different styles of images can include differences in the style of the people in the image, as well as differences in the style of the background. The image style can include, but is not limited to, one or more of the following: modern style, Republic of China style, minimalist style, retro style, pastoral style, cute style, and business style. Users can select one or more image styles in the image style selection interface 500. Optionally, the first electronic device can upload the image style selected by the user to a cloud server. In this way, the cloud server can generate AI wallpapers based on the user's selected image style, making it easier to obtain AI images that meet the user's needs, thereby improving the user experience.
[0131] The return control 502 can be used to exit the image style selection interface 500. In response to the user triggering the return control 502, the first electronic device can return to the portrait image selection interface 400, where the user can reselect an image.
[0132] The confirmation control 503 can be used to jump to the person recognition interface 600.
[0133] In response to the user triggering the confirmation control 503, such as Figure 6 As shown in a, the first electronic device can display a person recognition interface 600.
[0134] Optionally, in response to a user selecting a thumbnail in the image selection area 403, the electronic device may also display the person recognition interface 600. The specific display order of the image style selection interface 500 and the person recognition interface 600 is not limited in this embodiment.
[0135] The image recognition interface 600 may include an image display area 601, a person information display area 602, a return control 603, and a confirmation control 604.
[0136] The image display area 601 can be used to display the image selected by the user.
[0137] The person information display area 602 can be used to display relevant information about the person in the image display area 601. This information may include, but is not limited to, one or more of the following: age, gender, expression, clothing, actions, etc. This embodiment uses age and gender information as examples. It is understood that the person information display area 602 may or may not be displayed in the image display area 601; this embodiment does not impose any limitations on this.
[0138] Optionally, the person information display area 602 may include an age control 6021 and a gender control 6022.
[0139] In one possible display method, in response to the user triggering the age control 6021, such as Figure 6 As shown in b, the image recognition interface 600 can display an age option menu 605. The specific display location of the age option menu 605 within the image recognition interface 600 is not limited in this embodiment. The age option menu 605 may include "Child," "Youth," and "Elderly" options. The age option menu 605 may also include more or fewer age options, which is not limited in this embodiment. In this way, the user can select the option from the age option menu 605 according to the actual situation.
[0140] Optionally, if the user modifies the age information through the age option menu 605, the first electronic device can update the built-in age recognition model based on the user's modification; or the first electronic device can feed back the user's modification to the cloud server, which can then learn from the user's feedback to improve the age recognition model. In this way, either the first electronic device or the cloud server can improve the accuracy of the age recognition model based on the user's feedback.
[0141] In another possible display method, in response to the user triggering the age control 6021, such as... Figure 6As shown in Figure c, a pop-up window 606 can be displayed in the image recognition interface 600. The specific display location of the pop-up window 606 within the image recognition interface 600 is not limited in this embodiment. The pop-up window 606 may include first text 607, a first control 608, and a second control 609. The first text 607 may include information for confirming with the user whether the age has been correctly recognized; for example, the first text 607 may include "Has the age of the person in this image been correctly recognized?".
[0142] The first control 608 may include a control to indicate that the information is displayed correctly; for example, the first control 609 may also be called the correct control 609. If the user triggers the operation of the first control 608, it indicates that the age recognition is correct, and the first electronic device can cancel the display of the pop-up window 606 and still display the image recognition interface 600.
[0143] The second control 609 may include a control for indicating an information display error or a control for modifying age information. When the second control 609 is used to indicate an information display error, it may also be called an error control 609; when the second control 609 is used to modify age information, it may include a "child" control, a "youth" control, and an "elderly" control. Taking the error control 609 as an example, if the user triggers the operation of the second control 609, it indicates an age recognition error. The first electronic device can cancel the display of the pop-up window 606 and still display the image recognition interface 600. In addition, the first electronic device can update the age recognition model built into it based on the user feedback; or the first electronic device can also send the user's modified information to the cloud server, which can then learn from the user feedback to improve the accuracy of the age recognition model. In this way, the first electronic device or the cloud server can improve the accuracy of the age recognition model based on the user feedback.
[0144] Similarly, in response to a user triggering the gender control 6022, in one possible display method, a gender option menu can be displayed in the image recognition interface 600. The specific display location of the gender option menu in the image recognition interface 600 is not limited in this embodiment. The gender option menu may include a "female" option and a "male" option. The user can select an option from the gender option menu according to the actual situation.
[0145] Optionally, if a user modifies their gender information via the gender option menu, the first electronic device can update its built-in gender recognition model based on the user's feedback; alternatively, the first electronic device can send the user's modified information to a cloud server, which can then use this information to learn how to improve the gender recognition model. In this way, either the first electronic device or the cloud server can enhance the accuracy of the gender recognition model based on user feedback.
[0146] In another possible display method, the first electronic device can display a pop-up window, which may include second text, a correct control, and an incorrect control. The second text may include information to confirm with the user whether the gender recognition is correct. If the user triggers the correct control, it indicates that the gender recognition is correct, and the first electronic device can cancel the pop-up window, still displaying the image recognition interface 600. If the user triggers the incorrect control, it indicates that the gender recognition is incorrect, and the first electronic device can cancel the pop-up window, still displaying the image recognition interface 600. Furthermore, the first electronic device can update its built-in gender recognition model based on user feedback; alternatively, the first electronic device can also send the user's modified information to a cloud server, which can then learn from the user feedback to improve the gender recognition model. In this way, either the first electronic device or the cloud server can improve the accuracy of the gender recognition model based on user feedback.
[0147] Optionally, the person recognition interface 600 may not include the person information display area 602. The first electronic device can display information such as the person's age and gender by popping up a toast message in the person recognition interface 600. For example, in response to the user triggering the person information display area 402, the first electronic device can display the toast message. The specific method of displaying information such as the person's age and gender is not limited in this embodiment.
[0148] The return control 603 can be used to exit the image recognition interface 600. For example, in response to the user triggering the return control 603, the first electronic device can return to the person image selection interface 400, where the user can reselect an image; or the first electronic device can also return to the image style selection interface 500, where the user can reselect an image style.
[0149] The confirmation control 604 can be used to jump to the AI wallpaper generation interface 700.
[0150] In response to the user triggering confirmation control 604, the first electronic device can generate AI wallpapers of different styles for the selected image. For example... Figure 7 As shown, the first electronic device can display an AI wallpaper generation interface 700.
[0151] Optionally, when a user selects a thumbnail in the image selection area 403 of the person image selection interface 400, in response to the user's operation, the first electronic device may display the AI wallpaper generation interface 700 instead of the image style selection interface 500 or the person recognition interface 600. For example, when the age recognition model and gender recognition model have high recognition accuracy, the person recognition interface 600 may not be displayed.
[0152] The AI wallpaper generation interface 700 may include a wallpaper style display area 701, a prompt information area 702, a preview control 703, and a return control 704.
[0153] The wallpaper style display area 701 can be used to display the display effect of the original image selected by the user in different scenarios, such as the display effect in the main interface, which may include one or more application icons; it may also include the display effect in the lock screen wallpaper, etc. The specific scenarios are not limited in this application embodiment.
[0154] The prompt information area 702 may include a waiting icon and prompts during the AI wallpaper generation process. For example, the prompts may include information such as "Generating AI wallpaper..." or "Exiting the current page will not affect wallpaper generation." The specific style of the waiting icon and the content and style of the prompts are not limited in this embodiment.
[0155] The preview control 703 can be used to zoom in on the AI wallpaper on the screen. When the user selects an AI wallpaper in the wallpaper style display area 701, the first electronic device can display the preview control 703 in response to the user's action. Figure 10 The preview interface shown is 1000.
[0156] The return control 704 can be used to exit the AI wallpaper generation interface 700.
[0157] Understandably, after the AI wallpaper is generated, such as Figure 8 As shown, the first electronic device can display an AI wallpaper settings interface 800. The AI wallpaper settings interface 800 may include a wallpaper style display area 801, a photo upload control 802, a lock screen carousel area 803, and a preview control 804.
[0158] The wallpaper style display area 801 can be used to display the display effect of a certain style of AI wallpaper in different scenarios.
[0159] In one possible display method, in each scenario, the first electronic device can provide multiple similar AI wallpapers for the user to choose from.
[0160] In response to a user's action of triggering an image in the wallpaper style display area 801, such as Figure 9 As shown in Figure a, the first electronic device can display an AI wallpaper rating interface 900. The AI wallpaper rating interface 900 can include multiple similar AI wallpapers. To facilitate users in quickly selecting higher-quality images, these similar AI wallpapers can be displayed in descending order of image quality. This allows users to prioritize images with higher quality, thus facilitating selection and improving the user experience. It is understood that the display order of the various AI wallpapers is not limited in this embodiment.
[0161] In another possible display method, the first electronic device can not only provide multiple similar AI wallpapers, but also display the image quality rating of each AI wallpaper.
[0162] In response to a user's action of triggering an image in the wallpaper style display area 801, such as Figure 9 As shown in b, the first electronic device can display an AI wallpaper rating interface 900. The AI wallpaper rating interface 900 can include multiple similar AI wallpapers and image quality ratings for each AI wallpaper. The image quality ratings can be displayed in any possible location within the AI wallpaper rating interface 900, such as below each AI wallpaper or in the lower right corner of each AI wallpaper; this embodiment of the application does not impose any limitations on this.
[0163] Optionally, the display order of the AI wallpapers can be based on their quality scores, from highest to lowest. This allows users to see images with higher quality scores first, making it easier to select AI wallpapers with higher quality scores and improving the user experience. It is understood that this application embodiment does not limit the display order of the AI wallpapers.
[0164] The AI wallpaper rating interface 900 may also include a return control 901, which can be used to exit the AI wallpaper rating interface 900.
[0165] The photo upload control 802 can be used to reselect images from the gallery of the first electronic device to generate an AI image. For example, in response to the user triggering the photo upload control 802, the first electronic device can display a people image selection interface 400, where the user can reselect one or more images. Based on the images selected by the user, the first electronic device sends the images to a cloud server, which can then regenerate the AI image.
[0166] The lock screen carousel area 803 is used to display thumbnails of the wallpapers that are played in rotation when the first electronic device is locked. For ease of description, the wallpapers played in rotation will be referred to as carousel wallpapers. The lock screen carousel area 803 may include a title 8031, a carousel wallpaper thumbnail area 8032, a regeneration control 8033, an application control 8034, etc.
[0167] Title 8031 may include "Lock Screen Carousel," and may also include the number of generated AI wallpapers and the total number of carousel wallpapers that can be added. The display style may, for example, include "4 / 8," where 4 represents the number of generated AI wallpapers and 8 represents the total number of carousel wallpapers that can be added. The specific display style of title 8031, as well as the number of generated AI wallpapers and the total number of carousel wallpapers that can be added, are not limited in this application embodiment.
[0168] The carousel wallpaper thumbnail area 8032 can display thumbnails of generated AI wallpapers in different styles. Optionally, each thumbnail may also include a delete control, which can be located in any possible position on the thumbnail, such as the upper right corner. In response to a user triggering the delete control on a thumbnail, the first electronic device can delete that thumbnail from the carousel wallpaper thumbnail area 8032, and correspondingly, the image corresponding to that thumbnail will not be applied to the display of the carousel wallpaper.
[0169] The regeneration control 8033 can be used to regenerate AI wallpapers of different styles based on the current original image. The specific icon style of the regeneration control 8033 is not limited in this embodiment. For example, in response to a user triggering the regeneration control 8033, the first electronic device can instruct the cloud server to regenerate AI wallpapers of different styles based on the current original image. Then, the first electronic device can add newly generated AI wallpapers of different styles to the carousel wallpaper thumbnail area 8032 for the user to choose from. It is understood that the number of AI wallpapers that can be added to the carousel wallpaper thumbnail area 8032 is the total number of carousel wallpapers that can be added minus the number of AI wallpapers already generated. For example, if title 8031 displays "4 / 8", then the number of regenerated AI wallpapers that can be added to the carousel wallpaper thumbnail area 8032 is (8–4), meaning the carousel wallpaper thumbnail area 8032 can display 4 more regenerated AI wallpapers.
[0170] Understandably, in response to the user's triggering of the regeneration control 8033, the photo upload control 802 remains in an untriggerable state, such as being grayed out, until the regenerated AI wallpaper is displayed in the carousel wallpaper thumbnail area 8032. This reduces conflicts in the execution flow between reselecting an image and regenerating the AI image, and minimizes instances of abnormal interface display.
[0171] Optionally, the application control 8034 can use the images corresponding to the thumbnails displayed in the lock screen carousel area 803 as carousel wallpapers. When the first electronic device locks its screen, the images corresponding to the thumbnails displayed in the lock screen carousel area 803 can be played in a loop.
[0172] Optionally, the application control 8034 can use the wallpaper selected by the user in the wallpaper style display area 801 as the carousel wallpaper. For example, when the user selects a wallpaper in the wallpaper style display area 801, in response to the user triggering the operation of the application control 8034, the first electronic device can add a thumbnail of that wallpaper to the carousel wallpaper thumbnail area 8032. When the first electronic device locks its screen, the carousel wallpapers may include that wallpaper.
[0173] The preview control 804 can be used to zoom in on the AI wallpaper on the screen. When the user selects an AI wallpaper in the wallpaper style display area 801, the first electronic device can display the preview control 804 in response to the user's action. Figure 10 The preview interface shown is 1000.
[0174] Optionally, in response to a user triggering an action to display the AI wallpaper in the wallpaper style display area 801, it can also be displayed Figure 10 The preview interface shown is 1000.
[0175] like Figure 10 As shown, the preview interface 1000 may include a wallpaper display area 1001 and a wallpaper download control 1002.
[0176] Understandably, display area 1001 can display the wallpaper in full screen, allowing users to immerse themselves in the wallpaper display experience.
[0177] The wallpaper download control 1002 can be used to download the wallpaper displayed in the wallpaper display area 1001. In response to the user triggering the wallpaper download control 1002, the first electronic device can save the wallpaper to its gallery.
[0178] It is understood that the aforementioned character image selection interface 400, image style selection interface 500, image recognition interface 600, AI wallpaper generation interface 700, AI wallpaper rating interface 800, AI wallpaper setting interface 900, and preview interface 1000 are all exemplary interfaces. Each interface may include more or fewer content and controls, and the specific content and controls included in each interface are not limited in this application embodiment.
[0179] Figure 11 This document illustrates a flowchart of the process for performing an overall quality score on an AI image in an embodiment of this application.
[0180] The first electronic device can send one or more images selected by the user to the cloud server. The cloud server can then regenerate AI images in batches based on these images using AIGC, and perform anomaly identification and image quality scoring on the AI images.
[0181] The cloud server can perform image anomaly recognition on AI images. Image anomalies can include, but are not limited to, the following: anomalies related to human information, distortion, and occlusion. Anomalies related to human information can include errors in age or gender recognition. Distortion anomalies can include extra fingers, multiple organs, missing organs, deformed torso, or missing torso, and can also include distortions of animals or objects other than humans. Occlusion anomalies can include the occlusion of people, animals, and / or objects. When an AI image exhibits one or more of these anomalies, it is considered an anomalous image, and the cloud server may not use it for overall image quality scoring. For example, the cloud server can assign a low score to the image, which could be 0, or discard or delete the image, without limitation. Thus, when the first electronic device displays images returned by the cloud server, it will not display images of poor quality or with low scores, thereby displaying higher-quality images to the user and improving the user experience.
[0182] When the cloud server identifies that the AI image does not contain any abnormal scenes, it can perform an overall image quality score on the AI image. The overall image quality score can consider at least one dimension of the score, including the skeleton and posture of the person, the expression of the person, the background of the image, the frequency domain quality of the image, and the saliency of the image. Finally, the image quality score of the AI image is obtained by weighting multiple dimensions.
[0183] Image salience can be understood as the degree to which certain areas or features in an image are more visually striking or easier to notice than other parts. In this embodiment, image salience can primarily represent the prominence of a person in the image, thereby reflecting the subjectivity of the person.
[0184] Understandably, if the AI image does not belong to a human figure, the cloud server can determine whether to consider the skeleton and posture of the image subject, as well as the expression of the image subject, based on the actual scene.
[0185] In this way, the cloud server can evaluate the quality of an AI image from multiple dimensions and in a more comprehensive way based on the type of AI image, and give a more reasonable image quality score, making it easier for users to choose and improving the user experience.
[0186] For example, when calculating the weighted image quality score, the weights of each item can be the same or different. Assume the score for a person's skeleton and pose, S1, is 76 points, with a corresponding weight w1 of 30%; the score for a person's expression, S2, is 79.82 points, with a corresponding weight w2 of 30%; the score for the image background, S3, is 41 points, with a corresponding weight w3 of 10%; the score for the image frequency domain quality, S4, is 57.77 points, with a corresponding weight w4 of 10%; and the score for saliency, S5, is 84.7413 points, with a corresponding weight w5 of 20%.
[0187] The final image quality score S is:
[0188] S = S1×w1 + S2×w2 + S3×w3 + S4×w4 + S5×w5 = 76×30% + 79.82×30% + 41×10% + 57.77×10% + 84.7413×20% = 73.57 (points).
[0189] Understandably, since users typically prioritize the quality of the people in an image, image quality assessment should focus more on aspects related to the person. Therefore, when setting weights, the weights for skeletal and pose scores, as well as expression scores, can be set to relatively large values. To emphasize the subjectivity of the person in the image, the weight of the salience score can also be appropriately increased. This ensures that in images with higher quality scores, the person's pose and expression are also better, thus better meeting user needs and improving the user experience. The specific weight values can be set according to actual circumstances, and this application embodiment does not limit them.
[0190] In one possible implementation, the cloud server can calculate the image quality score of the AI image based on the pre-configured weight ratios corresponding to each dimension.
[0191] In another possible implementation, the first electronic device allows the user to customize the weight ratios for each dimension. The first electronic device can then upload these user-defined weight ratios to a cloud server, which can calculate the image quality score for the AI image based on these weight ratios. Understandably, by allowing the user to customize the weight ratios for each dimension, the user can set a larger weight ratio for the image quality content they care about most. This ensures that images with higher quality scores are more likely to meet the user's needs and satisfy them, thereby improving the user experience.
[0192] For example, if a user is more concerned about the facial expressions of people in an image, they can set a larger weighting for those expressions. This way, images with higher ratings will also have better facial expression quality. Similarly, if a user is more concerned about the background quality, they can set a larger weighting for the background. This will also result in images with higher ratings having better background quality.
[0193] The following section details the implementation process of the wallpaper setting method in this application embodiment, covering aspects such as (1) identification of abnormal scenes, (2) character extraction and background filling, (3) detection and scoring of character skeletons and postures, (4) detection and scoring of character expressions, (5) detection and scoring of image background, (6) detection and scoring of image frequency domain quality, and (7) detection and scoring of image saliency.
[0194] (1) Identification of abnormal scenarios.
[0195] like Figure 12 As shown, a user can select at least one image of a person from the image library of a first electronic device. The first electronic device can send the selected image to a cloud server, which can then generate AI images in batches based on the selected image. After acquiring the AI images, the cloud server can perform image anomaly recognition. Image anomalies may include, but are not limited to, the following: anomalies related to person information, distortion anomalies, and occlusion anomalies. Anomalies related to person information may include errors in age recognition or gender recognition. Distortion anomalies may include extra fingers, multiple organs, missing organs, deformed torso, or missing torso, and may also include distortion anomalies of animals or objects other than people. Occlusion anomalies may include anomalies where people, animals, and / or objects are occluded. When an image exhibits one or more of the above anomalies, it is considered an abnormal image. The cloud server can discard or delete the image, or assign it a lower score, which may include 0 points.
[0196] In this embodiment, the cloud server can identify whether the aforementioned abnormal scenes exist in the image based on different models. For example, the cloud server may include a gender recognition model, an age recognition model, a distortion recognition model, an occlusion recognition model, etc.
[0197] In one possible implementation, the aforementioned recognition models can be based on deep convolutional neural network (CNN) models. CNN models extract features from images, thereby enabling anomaly recognition.
[0198] In another possible implementation, the aforementioned recognition models can be implemented using the ResNet50 image classification algorithm. This ResNet50 algorithm model includes multiple convolutional layers that extract features from the image at different sizes and depths, allowing the model to capture features at different levels and thus possessing strong feature extraction capabilities. The ResNet50 algorithm model is described below.
[0199] The ResNet50 algorithm introduces residual connections, which allow information to jump between network layers, thereby better reducing the problems of gradient vanishing and model degradation during the training of deep networks and effectively improving the performance of the model.
[0200] The vanishing gradient phenomenon can be understood as follows: during the training of a CNN model, information between network layers is passed sequentially from one layer to the next, and the output of each layer needs to be processed by an activation function. As the number of network layers increases, the calculated gradient values gradually decrease, eventually approaching zero. This causes the network weights to update very slowly, or even stop updating altogether, making the model difficult to train effectively.
[0201] Model degradation can be understood as the phenomenon that, when training a CNN model, the training error and testing error increase instead of decreasing as the number of network layers increases. This means that when the number of parameters in the model increases, the model's performance does not improve accordingly, and may even become worse.
[0202] Figure 13 A schematic diagram of the overall structure of the ResNet50 algorithm model is shown.
[0203] The ResNet50 algorithm model can be divided into 5 stages, namely stage 0, stage 1, stage 2, stage 3, and stage 4.
[0204] Stage 0 can be understood as the preprocessing of the input image (INPUT), which is used to perform preliminary feature extraction on the input image, such as extracting information such as the edges and textures of the image.
[0205] Stages 1, 2, 3, and 4 are each composed of a Bottleneck (BTNK) structure, with similar structures. Stage 1 includes 3 BTNK structures, Stage 2 includes 4 BTNK structures, Stage 3 includes 6 BTNK structures, and Stage 4 includes 3 BTNK structures. It can be understood that stages 1, 2, 3, and 4 represent feature extraction processes at different depths within the algorithm model, allowing for the extraction of more complex image features, thereby increasing the image's depth and expressive power. The input passes through the five stages of the ResNet50 algorithm model, ultimately yielding the output image (OUTPUT).
[0206] The following describes phases 0 and 1. Phases 2, 3, and 4 are similar to phase 1 and will not be described in detail.
[0207] Figure 14 The diagram shows the specific structure of each stage of the ResNet50 algorithm model.
[0208] For stage 0:
[0209] The input (3,224,224) in stage 0 can represent the number of input channels, height, and width, i.e., (C,H,W). If the height and width of the input are equal, it can be represented as (C,W,W) or (C,H,H).
[0210] Stage 0 may also include convolutional layers (CONV) and max-pooling layers (MAXPOOL) for preliminary feature extraction and size reduction of the input image. In some scenarios, convolutional layers may also be referred to as convolutional blocks.
[0211] In convolutional layers, 7×7 represents the kernel size, 64 represents the number of kernels (which can also be understood as the number of output channels), and / 2 represents the stride of the kernel being 2. Batch normalization (BN) and ReLU activation functions can also be used in convolutional layers. Convolutional layers can perform preliminary feature extraction on the input image and downsample it by setting the stride, thereby capturing information such as image edges and textures. BN normalizes the output of the convolutional layer, thus stabilizing the training process. The ReLU activation function allows the ResNet50 algorithm model to learn more complex features.
[0212] In the max pooling layer, 3×3 represents the kernel size, and / 2 represents the kernel step size of 2.
[0213] The output of stage 0 (64, 56, 56) represents the number of output channels, height, and width. Here, 64 equals the number of convolutional kernels in the convolutional layer. Since a stride of 2 halves the output image size, 56 can be understood as being calculated using 2^24 / 2 / 2. By adjusting the stride of the convolutional and max-pooling layers, the image size is further reduced, decreasing the complexity of subsequent calculations while preserving image features.
[0214] For phase 1:
[0215] Understandably, the output of stage 0 can be used as the input of stage 1.
[0216] Phase 1 may include three BTNK structures, which may include BTNK1 and BTNK2 structures. BTNK1 structures have different numbers of input and output channels, while BTNK2 structures have the same number of input and output channels.
[0217] Figure 15 Schematic diagrams of the BTNK1 and BTNK2 structures are shown.
[0218] like Figure 15 As shown in Figure a, the BTNK1 structure corresponds to the case where the number of input and output channels are different. That is, the shape of the input image is (C1, W, W), and the shape of the output image is (C1×4, W / S, W / S).
[0219] The BTNK1 structure has four variable parameters: the number of channels C, the width W, the channel parameter C1, and the step size S. C1 is the channel parameter of the intermediate layer of the BTNK1 structure. The value of C1 can be set when the number of input / output channels needs to be changed. The value of C1 can be the same as or different from C; this application does not limit this.
[0220] For example, when C equals C1, the number of output channels is 4 × C1 = 4 × C. For instance, at the beginning of stage 1, the number of input channels C of the BTNK1 structure is 64, and the number of output channels is 4 × C1 = 4 × C = 4 × 64 = 256.
[0221] When C equals 2 × C1, the number of output channels is 4 × C1 = 4 × (C / 2) = 2 × C. For example, at the beginning of stage 3, the number of input channels of the BTNK1 structure is 512, C1 is 256, that is, C equals 2 × C1, and the number of output channels is 4 × C1 = 4 × (C / 2) = 2 × C = 2 × 512 = 1024.
[0222] In a possible implementation, of the four variable parameters of the BTNK1 structure, C can be 64, W can be 56, C1 can be 64, and S can be 1. The left side of the BTNK1 structure includes three convolutional layers (CONV), and the right side includes a ReLU activation function and one convolutional layer. Let the three convolutional layers on the left side of the BTNK1 structure be functions F(x), and the convolutional layer on the right side be functions G(x). Summing functions F(x) and G(x), and then passing the sum through the ReLU activation function, yields the output of the BTNK1 structure. The shape of the output image is (C1×4, W / S, W / S).
[0223] As can be seen, the convolutional layer on the right side of the BTNK1 structure can make the number of channels of function G(x) and function F(x) the same. In other words, the convolutional layer on the right side of the BTNK1 structure plays the role of matching the difference between the input and output dimensions.
[0224] like Figure 15 As shown in b, the BTNK2 structure corresponds to the case where the number of input and output channels is the same. That is, the shape of the input image is (C, W, W), and the shape of the output image is (C, W, W).
[0225] The BTNK2 structure has two variable parameters: the number of channels C and the width W. Let the input (C,W,W) be the variable x, and the three convolutional layers on the left side of the BTNK2 structure be the function F(x). Summing the variable x and the function F(x) and then passing it through the ReLU activation function yields the output of the BTNK2 structure, and the shape of the output image is (C,W,W).
[0226] from Figure 14 As shown in the diagram, the output image in Stage 1 has 256 channels, with a length and width of 56; the output image in Stage 2 has 512 channels, with a length and width of 28; the output image in Stage 3 has 1024 channels, with a length and width of 14; and the output image in Stage 4 has 2048 channels, with a length and width of 7. In other words, from Stage 1 to Stage 4, the number of channels in the output image increases while the image size decreases. Thus, as the learning depth increases, the smaller the image, the more image features the ResNet50 algorithm model can learn, thereby increasing the accuracy of image recognition.
[0227] For example, the following embodiments of this application use a gender recognition model and a distortion recognition model to illustrate the recognition of abnormal scenes.
[0228] (1.1) Gender recognition model.
[0229] like Figure 16As shown, the cloud server can use a gender recognition model to determine whether the gender of a person in an image has been correctly identified.
[0230] Before recognizing images, the gender recognition model can be trained based on a large number of male and female images. For example, 10,000 male images and 10,000 female images can be used as input data to learn the gender characteristics of men and women, thereby generating a more accurate gender recognition model. The specific number of images used during model training is not limited in this embodiment.
[0231] After generating a relatively accurate gender recognition model, both the original image and the AI image can be input into the model. By comparing the genders of the original image and the AI image, it can be determined whether the gender of the person in the image has been correctly identified.
[0232] If the gender recognition model identifies the gender of the original image and the AI image as consistent, it can output a normal result, which can be used to indicate that the gender of the person in the image is correctly identified; if the gender recognition model identifies the gender of the original image and the AI image as inconsistent, it can output an abnormal result, which can be used to indicate that the gender of the person in the image is incorrectly identified.
[0233] Understandably, the training process for age recognition models is similar to that for gender recognition models. The difference is that the input data for age recognition model training includes images of the elderly, children, and young adults, which will not be elaborated further.
[0234] (1.2) Distortion identification model.
[0235] Human anomalies can include body anomalies and facial anomalies. For example, body anomalies can include, but are not limited to, one or more of the following: large head and small body, small head and large body, arm anomalies, polydactyly, hunchback, and trunk anomalies; facial anomalies can include, but are not limited to, anomalies of one or more of the following parts: ears, nose, mouth, eyes, face, and multiple heads.
[0236] like Figure 17 As shown, the cloud server can use a distortion recognition model to determine whether there is distortion in the figures in the image.
[0237] Before recognizing an image, the distortion recognition model can be trained on a large number of distorted and undistorted images. For example, 10,000 distorted images and 10,000 undistorted images can be used as input data and fed into the distortion recognition model. After multiple levels of deep learning, the model learns the distortion features of a person. The specific number of images used during model training is not limited in this embodiment.
[0238] Once the distortion recognition model achieves a preset accuracy in identifying abnormal images, it can be used for distortion detection. Based on the learned distortion features of people, the distortion recognition model can identify whether there is distortion in the people in the image.
[0239] If the distortion recognition model identifies that the AI image does not have distortion features, it can output a normal result, which can be used to indicate that the person in the image is not distorted. If the distortion recognition model identifies that the AI image has distortion features, it can output an abnormal result, which can be used to indicate that the person in the image is distorted. Optionally, the distortion recognition model can also indicate the specific type of distortion.
[0240] The distortion recognition model can identify abnormal scene images in AI composition in batches, filter images that do not conform to the user's aesthetics, and enable the user to have a more beautiful visual experience.
[0241] Understandably, the training process for the occlusion recognition model is similar to that for the distortion recognition model. The difference is that the input data for training the occlusion recognition model includes images with occluded faces and images with unoccluded faces, which will not be elaborated further.
[0242] By first identifying abnormal scenes in the image, more types of distorted images can be identified, and these abnormal images can be filtered out in advance. This eliminates the need to perform subsequent image quality scoring on abnormal images, reducing computational power and improving the execution efficiency of the algorithm.
[0243] (2) Extracting people and filling the background.
[0244] In non-abnormal scenarios, cloud servers can extract human figures from images, which can then be further used for human figure detection and background detection.
[0245] One possible implementation is image semantic segmentation based on the DeepLabV3 deep learning model. This DeepLabV3 model can include atrous spatial pyramid pooling (ASPP) technology, which in some scenarios can also be called dilated convolution. Dilated convolution can capture image information at different image scales. The DeepLabV3 model can be implemented based on algorithms such as ResNet50 and ResNet101.
[0246] On the one hand, dilated convolution can expand the receptive field. The receptive field can be understood as the size of the region mapped to the input image by a pixel on the feature map output by each layer of the convolutional neural network, or as the region on the input image corresponding to a point on the feature map. As the neural network deepens, the receptive field of a single pixel expands, the feature map size shrinks, and the spatial resolution decreases. Thus, expanding the receptive field allows for the detection and segmentation of large targets, while shrinking the feature map size allows for precise target localization.
[0247] On the other hand, dilated convolution can capture multi-scale image information. (r-1) zeros can be padded between two columns of elements in the convolution. Here, r can be called the dilation rate or the dilation rate, and r determines the spacing between elements in the convolution. Different r values correspond to different scale information, and the default value of r can be set to 1. It can be understood that if r is 1, dilated convolution is equal to ordinary convolution; if r is 2, a hole, i.e., a zero, will be inserted between each element in dilated convolution. In other words, the larger r is, the larger the element spacing. r can be customized, and this embodiment does not limit it.
[0248] DeepLabV3 models can be pre-trained using the (common objects in context, COCO) image dataset and the PASCAL VOC image dataset.
[0249] The COCO image dataset can be used for person detection, person segmentation, and keypoint detection. It also provides image category annotations covering a wide range of objects commonly found in daily life. The PASCAL VOC image dataset can be used to train and evaluate person detection and image segmentation models.
[0250] Figure 18 The background image after the human portrait was extracted is shown.
[0251] As can be seen from the figure, after extracting the portrait, there are black areas in the background image corresponding to the portrait's outline. If these black areas are not processed, they may affect the final scoring result when scoring the background image. Therefore, this embodiment of the application can also use the background area around the portrait to repair the black areas corresponding to the portrait's outline, thereby reducing the impact of the black areas on the background image.
[0252] In a possible implementation, background patching may include the following steps:
[0253] a. Process the original background image into grayscale to obtain a grayscale image. For example, you can call the cv2.cvtColor() function to convert the image from the RGB color space to the grayscale color space.
[0254] b. Binarize the grayscale image to obtain a binary image. For example, you can call the `cv2.threshold()` function to set pixels with values greater than the threshold to 255 and pixels with values less than or equal to the threshold to 0. A pixel value of 255 represents white, and a pixel value of 0 represents black.
[0255] c. Perform a bitwise inversion operation on the binarized image to obtain the bitwise inverted binarized image. For example, you can call the cv2.bitwise_not() function to change the pixel value 0 to the pixel value 255, and the pixel value 255 to the pixel value 0.
[0256] d. Dilate the bit-inverted binary image to obtain an enlarged image. For example, you can call the cv2.dilate() function to enlarge objects in the image to fill black areas.
[0257] e. Select the patching algorithm type, set the patching radius, and fill the black areas of the enlarged image. For example, this can be achieved using the `cv2.inpaint()` function.
[0258] Figure 19 The image obtained after patching the background image is shown.
[0259] As shown in the figure, the repaired image may still contain some abnormal areas. This is likely due to the default parameters used in the `cv2.dilate()` function when performing the image dilation operation. Therefore, the repair effect can be optimized by adjusting the number of kernels and iterations in the `cv2.dilate()` function.
[0260] Figure 20 This describes the image display effect after adjusting the parameters of the cv2.dilate() function.
[0261] in, Figure 20 'a' represents the image display effect when the kernel number is set to 7×7 and the number of iterations is 3. Figure 20 b represents the image display effect when the number of kernels is set to 15×15 and the number of iterations is 5. Figure 20 The 'c' setting determines the image display effect with a kernel count of 25×25 and an iteration count of 10.
[0262] As shown in the figure, the image display effect is relatively better as the number of kernels and iterations in the function increases.
[0263] The wallpaper setting method of this application embodiment can score the background image after extracting the portrait. Since black areas appear around the portrait in the background image after extraction, they can interfere with the scoring result. This application embodiment reduces the interference of these black areas on the background image scoring by repairing them, thus making the scoring result more accurate.
[0264] (3) Detection and scoring of the skeleton and posture of the figure.
[0265] After the human image is extracted, the cloud server can detect and score the skeleton and posture of the image.
[0266] In a possible implementation, the skeleton and pose of a human figure can be scored by combining a pose estimation model with an aesthetic evaluation algorithm. The pose estimation model can include models such as MediaPipe and OpenPose. For ease of description, the MediaPipe model will be used as an example to illustrate the recognition of human skeleton and pose.
[0267] MediaPipe is a cross-platform machine learning framework for skeleton development, used for real-time computer vision and audio processing tasks. It includes various pre-trained models, such as a pose estimation model. This pose estimation model can detect human skeletal joints and estimate their position and orientation. It can also identify human poses in videos or images.
[0268] Figure 21 A schematic diagram of the detection and scoring process for skeletons and poses is shown.
[0269] In a possible implementation, the cloud server can initialize the pose estimation model in the MediaPipe model and extract the human image based on the pose estimation model. Further, pose estimation can be performed on the human image, pose estimation keypoints can be drawn, and the coordinates of the keypoints can be extracted. Thus, a score for the skeleton and pose can be calculated based on the coordinates of the keypoints.
[0270] Calculating the score requires considering the coordinates of key points and the portrait type. Key point coordinates can include those of the shoulder, elbow, and knee areas. Portrait types can include full-body shots, half-body shots, etc. Understandably, the number of key points may differ across portrait types, and the scoring weight for each location may also vary.
[0271] For example, the formula for calculating the skeleton and pose score S1 can satisfy the following formula:
[0272] S1 = K × (1 – d / 0.1).
[0273] Where K is the scoring weight, which can vary depending on the keypoint region and image type. d is the difference value of the keypoint region. This difference value can include both vertical and horizontal differences. The vertical difference value can be understood as the absolute value of the difference between the ordinates of the left and right coordinates of the keypoint region. The horizontal difference value can be understood as the absolute value of the difference between the abscissas of the left and right coordinates of the keypoint region. For ease of description, the following explanation uses d as the vertical difference value. According to laboratory testing and analysis, the maximum value of d can be 0.1. Therefore, in this formula, d needs to be divided by 0.1 to calculate the scores for skeleton and pose.
[0274] d can satisfy the following formula:
[0275] d = |d1 - d2|.
[0276] Here, d1 can represent the ordinate of the left-hand point in the keypoint region, and d2 can represent the ordinate of the right-hand point in the keypoint region. Alternatively, d1 can also represent the ordinate of the right-hand point in the keypoint region, and d2 can also represent the ordinate of the left-hand point in the keypoint region.
[0277] Figure 22 A schematic diagram illustrating the strategy for determining the scoring weight K is shown.
[0278] Understandably, when recognizing a human face, the pose estimation model can detect which type of human face it belongs to, such as whether it is a full-body photo or a half-body photo, and then select the corresponding calculation method according to the detected type.
[0279] Calculation Method 1: If the portrait type is a half-body shot, and the half-body shot includes the shoulders but excludes the elbows, then the scoring weight K can be set to 100. In this case, d represents the vertical difference value of the shoulder area.
[0280] Skeletal and posture score S 11 The calculation formula can satisfy the following formula:
[0281] S 11 =K1×(1-d) 11 / 0.1).
[0282] Where K1 is the scoring weight corresponding to the shoulder area, d 11 This is the vertical difference value of the shoulder region, that is, the absolute value of the difference in the ordinate of the key points on the left and right shoulders.
[0283] Calculation Method 2: If the portrait type is a half-body photo, including the shoulders and elbows, then the scoring weight K can include the scoring weight K1 corresponding to the shoulder area and the scoring weight K2 corresponding to the elbow area. In this case, d can include the vertical difference value of the shoulder area and the vertical difference value of the elbow area. K1 and K2 can each be 50. It is understood that K1 and K2 can also be set to other possible values, as long as the sum of K1 and K2 is 100; this embodiment of the application does not impose such limitations.
[0284] Skeletal and posture score S 12 The calculation formula can satisfy the following formula:
[0285] S 12 =K1×(1-d) 11 / 0.1)+K2×(1–d 22 / 0.1).
[0286] Where K1 is the scoring weight corresponding to the shoulder area, d 11 K1 represents the vertical difference value of the shoulder area, K2 represents the scoring weight of the elbow area, and d represents the vertical difference value of the shoulder area. 22 d represents the vertical difference value of the elbow region. 22 It can also be understood as the absolute value of the difference in the ordinates between the key points of the left and right elbows.
[0287] Calculation Method 3: If the portrait type is a full-body photo, including the shoulders, elbows, and knees, then the scoring weight K can include the scoring weight K1 corresponding to the shoulder area, the scoring weight K2 corresponding to the elbow area, and the scoring weight K3 corresponding to the knee area. In this case, d can include the vertical difference value d of the shoulder area. 11 Vertical difference value d in the elbow region 22 Vertical difference value d in the knee region 33 d 33 This can also be understood as the absolute value of the difference between the ordinates of the left and right knee keypoints. K1 and K2 can each be 25, and K3 can be 50. It is understood that K1, K2, and K3 can also be set to other possible values, as long as the sum of K1, K2, and K3 is 100. This embodiment of the application does not impose such limitations.
[0288] Skeletal and Posture Scoring Score 13 The calculation formula can satisfy the following formula:
[0289] S 13 =K1×(1-d) 11 / 0.1)+K2×(1–d 22 / 0.1)+K3×(1–d 33 / 0.1).
[0290] Where K1 is the scoring weight for the shoulder area, K2 is the scoring weight for the elbow area, K3 is the scoring weight for the knee area, and d 11 d represents the vertical difference value of the shoulder area. 22 d represents the vertical difference value of the elbow region. 33 This represents the vertical difference value in the knee region.
[0291] For example, taking a full-body photo as an example, assume the scoring weight for the shoulder area is K1 = 25, the scoring weight for the elbow area is K2 = 25, and the scoring weight for the knee area is K3 = 50; the vertical difference value d for the shoulder area... 11 =0.004, Vertical difference value d in the elbow region 22 =0.04, Vertical difference value d in the knee region 33 =0.026.
[0292] Based on the formula for calculating the skeleton and posture score S, the final score is:
[0293] S = 25 × (1 - 0.004 / 0.1) + 25 × (1 - 0.041 / 0.1) + 50 × (1 - 0.026 / 0.1) = 75.75 (points).
[0294] It is understood that the embodiments of this application can score skeletons and poses, assigning different weights and coefficients to the detected key points. When the image type is different, the key points included in the image are also different, so the weights and coefficients of the same region will also be different, thereby achieving a balanced and diverse scoring.
[0295] (4) Detection and scoring of facial expressions.
[0296] Figure 23 The flowchart illustrates the process of detecting and scoring human facial expressions.
[0297] In this embodiment of the application, after inputting a human image, the DeepFace library can be used for expression recognition. The DeepFace library can be used for facial recognition and expression analysis, and supports a variety of pre-trained models and datasets.
[0298] When pre-training the model, a facial emotion recognition (FER) dataset can be used for training facial expression recognition. This FER dataset can contain a large number of grayscale images. These images can include, but are not limited to, the following expression categories: angry, disgusted, fear, happy, sad, surprised, and neutral.
[0299] The DeepFace library can output the most similar or highly similar facial expressions and match the corresponding facial expression score range to calculate the score.
[0300] Taking the aforementioned expression categories as an example, different score ranges can be divided for each category of expressions, with the overall score range being 0 to 100 points. For instance, the mapping relationship between specific expressions and scores can include: happy expressions correspond to scores between 90 and 100 points, surprised expressions between 80 and 90 points, neutral expressions between 70 and 80 points, sad expressions between 60 and 70 points, fearful expressions between 40 and 60 points, angry expressions between 20 and 40 points, and disgusted expressions between 0 and 20 points. That is, happy->[90-100], surprise->[80-90), neutral->[70-80), sad->[60-70), fear->[40-60), angry->[20-40), disgust->[0-20), Or happy->(90-100], surprise->(80-90], neutral->(70-80], sad->(60-70], fear->(40-60], angry->(20-40], disgust->[0-20].
[0301] It is understood that the overall range of the score can also be set to other ranges. The specific score range for each expression can be adjusted according to the actual scenario, and this application embodiment does not limit it.
[0302] For example, the score S2 for a person's facial expression can satisfy the following formula:
[0303] S2 = Em min +(Em max -Em min )×L em / 100.
[0304] Among them, Em minEm represents the minimum value in the score range corresponding to a person's facial expression. max L represents the maximum value of the score range corresponding to a person's facial expression. em This represents the current expression similarity, which can be generated by the model after detection.
[0305] Example 1: Suppose image A is recognized by the model, and the similarity of the various expressions output is:
[0306] L em :{'angry':0.026740829343907535,'disgust':3.097870404644709e-07,'fear':0.40515423752367496,'happy':0.003 7195371987763792,'sad':1.352990511804819,'surprise':2.7506414923550437e-06,'neutral':98.21138978004456}.
[0307] Because of L em In the range, the value corresponding to neutral is the largest, which is L. em The maximum value in the equation indicates that the expression of the person in image A is neutral, i.e., Predicted emotion: neutral.
[0308] The neutral score range is 70 to 80 points. Substituting this value into the formula for calculating the facial expression score S2, we can obtain the facial expression score S2 for image A as follows:
[0309] S2 = 70 + (80 - 70) × 98.21 / 100 = 79.82 (points).
[0310] Example 2: Suppose image B is recognized by the model, and the similarity of the various expressions output is:
[0311] L em :{'angry':9.139324724674225,'disgust':0.018431803619023412,'fear':45.584166049957275,'happy':0.154 94365943595767,'sad':22.8873074054718,'surprise':0.19123555393889546,'neutral':22.02458828687668}.
[0312] Because of Lem In the above, fear corresponds to the largest value, which is L. em The maximum value in the equation indicates that the expression of the person in image B is fear, i.e., Predicted emotion: fear.
[0313] The score range for fear is 40 to 60 points. Substituting this value into the formula for calculating the score S2 for the facial expression, we can obtain the score S2 for the facial expression in image B as follows:
[0314] S = 40 + (60 - 40) × 45.58 / 100 = 49.12 (points).
[0315] Understandably, since users typically place great importance on the facial expressions of people in images, this application embodiment considers facial expressions and scores them when evaluating image quality. This results in images with higher quality scores having better facial expressions, thus meeting user needs and improving the user experience.
[0316] (5) Detection and scoring of image background.
[0317] Figure 24 A schematic diagram of the process for detecting and scoring the background of an image is shown.
[0318] In this embodiment, the TANet neural network model can be used to score the image background. The TANet neural network can consist of multiple sub-networks, such as ResNet34, ResNet50, and other types of sub-networks; the specific type of sub-network is not limited in this embodiment. These sub-networks can work together to process the input image and output a 10-dimensional vector, where each dimension of the 10-dimensional vector corresponds to a possible score.
[0319] This network model uses the Aesthetic Visual Analysis Dataset (AVA Dataset), which includes a database for aesthetic quality assessment containing a large number of photographs. Based on the recognized image semantics, these photographs can be categorized into over 60 common everyday objects, such as tables, chairs, benches, flowers, grass, trees, blue skies, white clouds, and the sea. Based on photographic style, these photographs can be categorized into 14 styles, including but not limited to one or more of the following: modern, Republican era, minimalist, retro, pastoral, cute, and business styles. The photographs in this dataset encompass most objects encountered in daily life.
[0320] In this dataset, each image can have its own corresponding score. Understandably, these scores are determined by votes from several people. Image scores range from 1 to 10. A higher score indicates higher image quality.
[0321] like Figure 25 As shown, when the background image after extracting the human portrait is input, after learning from multiple sub-models such as ResNet50, the TANet neural network model can output a 10-dimensional vector [1,2,3,4,5,6,7,8,9,10]. This 10-dimensional vector includes the image's score from 1 to 10. Furthermore, the Softmax activation function can calculate the probability of each score in each 10-dimensional vector.
[0322] Understandably, the Softmax activation function can calculate the probability of each score in the TANet neural network. The Softmax activation function can convert the scores output by the TANet neural network into probability values, and the sum of all probability values is 1. For example, in the embodiments of this application, the output of the TANet neural network model can be used as the input of the Softmax activation function to obtain the possible probability values [0.1, 0.05, 0.15, 0.2, 0.05, 0.1, 0.2, 0.1, 0.05, 0.0] corresponding to the portrait background.
[0323] After obtaining the probabilities of each score, the `get_score` function is used to calculate the score of the background image. The `get_score` function can be used to calculate the background score. The 10-dimensional vector output by the TANet neural network model can be multiplied by a weight vector in the `get_score` function and then summed.
[0324] In one possible implementation, each score in the 10-dimensional vector can be multiplied by the probability of each score calculated in the Softmax activation function, and then summed. This yields the score for the background image, which is then converted to a percentage to obtain the background image's score S3.
[0325] S3=(1×0.1+2×0.05+3×0.15+4×0.2+5×0.05+6×0.1+7×0.2+8×0.1+9×0.05+10× 0.0)×10%=(0.1+0.1+0.45+0.8+0.25+0.6+1.4+0.8+0.45+0.0)×10%=49.5 (minutes).
[0326] It is understandable that since the 10-dimensional vector output by the TANet neural network model ranges from 1 to 10, it needs to be multiplied by 10% when converting to a percentage. If the 10-dimensional vector output by the TANet neural network model ranges from 0 to 1, it needs to be multiplied by 100% when converting to a percentage. The specific representation of the 10-dimensional vector score is not limited in the embodiments of this application.
[0327] In calculating the image quality score, this application includes scoring the background of the person, which makes the overall image score more reasonable and results in an image with high background clarity and appropriate exposure.
[0328] (6) Detection and scoring of image frequency domain quality.
[0329] In the embodiments of this application, Fourier transform can be used to evaluate the frequency domain quality of the image.
[0330] Understandably, the Fourier transform can convert an image from the spatial domain to the frequency domain, thus enabling the analysis of its frequency characteristics. For example, the frequency characteristics of an image can include its power spectral density (PSD), which can be used to assess image quality. Generally, high-quality images have a wider frequency distribution, while low-quality images may have a narrower frequency distribution. A high-quality image can be understood as a sharp, uncompressed image, while a low-quality image can be understood as a blurry or compressed image.
[0331] In a possible implementation, when using Fourier transform to perform frequency domain quality assessment of an image, the following steps may be included:
[0332] (6.1) Perform Fourier transform on the image to convert the image from the spatial domain to the frequency domain.
[0333] Before performing a Fourier transform on an image, it can first be converted to grayscale. Then, the `fft2` function from the mathematical function library (numerical Python, Numpy) can be called to convert the grayscale image into a frequency domain representation, obtaining the frequency components of the image. The `fft2` function is used for the two-dimensional discrete Fourier transform (DFT). It converts the input two-dimensional array into a complex array, where each array element represents the amplitude and phase of the frequency component.
[0334] (6.2) Move the center of the frequency domain image to the center of the image.
[0335] Cloud servers can use the fftshift function in NumPy to calculate high-frequency components and move the center of the frequency domain image to the center of the image, which can better visualize the spectrum of the Fourier transform.
[0336] It is understood that frequency components can include high-frequency components and low-frequency components. The distinction between high-frequency and low-frequency components refers to the distinction between the area within and outside the 60-pixel central region of the image after the FFTshift function transformation. High-frequency components are generally located in the center of the image. In other words, the 60-pixel central region of the image after the FFTshift function transformation belongs to high-frequency components, while the areas outside this 60-pixel central region belong to low-frequency components. The specific division of high-frequency and low-frequency components within the image's central region is not limited in this embodiment.
[0337] (6.3) Calculate the proportion of high-frequency components in the image.
[0338] After calculating the frequency components of the image, the image quality evaluation score can be calculated by calculating the proportion of high-frequency components to the total energy.
[0339] In one possible implementation, the coordinates of the image's center point can be determined first, and then 30 pixels can be extended outwards from the center point as the origin, such as... Figure 26 As shown, a rectangular region with a side length of 60 pixels can be generated. The size of this rectangular region can be preset according to the actual scene, and is not limited in this embodiment. The energy f of the high-frequency component is calculated in this rectangular region. high And calculate the total energy f of the entire image. all It is understandable that the higher the proportion of high-frequency components in the total energy of an image, the clearer the image.
[0340] The image frequency domain quality score S4 can satisfy the following formula:
[0341] S4=100×((f high / f all ) / 0.1).
[0342] Among them, f high For high-frequency components, f all For the total energy of the image, 0.1 represents f. high / f all The maximum value.
[0343] For example, Figure 27 The diagram shows different proportions of high-frequency components in the total energy.
[0344] like Figure 27 As shown in a, if the energy f of the high-frequency components of image A...high The value is 24947196329.76693, and the total energy f of the entire image A is... all The value is 431813223303.42413. Therefore, according to the above formula, the frequency domain quality score S4 of image A can be calculated to be 57.77.
[0345] like Figure 27 As shown in b, if the energy f of the high-frequency components of image B... high The value is 37045343344.60573, and the total energy f of the entire image B is... all The value is 485619967273.3978. Therefore, according to the above formula, the frequency domain quality score S4 of image B can be calculated as 76.28.
[0346] like Figure 27 As shown in c, if the energy f of the high-frequency components of image C... high The value is 34280570144.448235, and the total energy f of the entire image C is... all The value is 399073079758.8036. Therefore, according to the above formula, the frequency domain quality score S4 of image C can be calculated to be 85.90.
[0347] It is understood that the embodiments of this application use Fourier transform to convert the image from the spatial domain to the frequency domain, calculate the ratio of total spectral energy to high-frequency energy, and thus use it as a basis for image frequency domain quality scoring to obtain a score that matches the image quality for user reference, thereby improving user experience.
[0348] Optionally, the above method can also be combined with other methods as a method for evaluating image quality. For example, it can be combined with the blind / referenceless image spatial quality evaluator (BRISQUE) method, the neural image assessment (NIMA) method based on deep convolutional neural networks, and / or the ranking-based learning for no-reference image quality assessment (RankIQA) method, thereby weighting the image quality score according to multiple dimensions. The specific methods combined are not limited in the embodiments of this application.
[0349] (7) Image saliency detection and scoring.
[0350] In this embodiment, the frequency-tuned (FT) algorithm can be used for saliency detection. The FT algorithm is a saliency detection algorithm based on the Euclidean distance between pixel vectors and the average pixel vector in the Lab color space. This algorithm can use the center-periphery operator of color features to obtain a saliency map, and it is simple in principle and highly reliable.
[0351] It is understood that saliency detection can be performed on the entire image. In this embodiment, since people are usually the main subject in an image, that is, people usually stand out in the image, and users pay more attention to people in the image, to a certain extent, image saliency can reflect the degree of distinction between people and background, that is, the degree to which people stand out in the image.
[0352] In a possible implementation, when using the FT algorithm to perform saliency detection on an image, such as Figure 28 As shown, the left side of the figure can convert the Gaussian-filtered image into an image in the LAB color space, and the right side of the figure can convert the original image into an image in the LAB color space, and then calculate the saliency. Specifically, this may include the following steps:
[0353] S2801. Perform Gaussian filtering on the image to obtain an image in the RGB color space.
[0354] S2802. After obtaining the RGB color space image after Gaussian filtering, the RGB color space image can be converted into a LAB color space image.
[0355] Understandably, when converting an image from RGB color space to LAB color space, since RGB color space cannot be directly converted to LAB color space, XYZ color space is needed as an intermediary. Therefore, you can first convert the RGB color space to XYZ color space, and then convert the XYZ color space to LAB color space.
[0356] The relationship between the RGB color space and the XYZ color space satisfies the following formula:
[0357]
[0358] Based on the above formula, we can obtain the corresponding X, Y, Z and the sum of each coefficient:
[0359] X = b 11 ×R+b 12 ×G+b 13 ×B.
[0360] X n =b 11 +b 12 +b 13=0.950456.
[0361] Y = b 21 ×R+b 22 ×G+b 23 ×B.
[0362] Y n =b 21 +b 22 +b 23 =1.0.
[0363] Z = b 31 ×R+b 32 ×G+b 33 ×B.
[0364] Z n =b 31 +b 32 +b 33 =1.088754.
[0365] Converting XYZ color space to LAB color space:
[0366] From the above formula, we can see that X n Y n and Z n The values are all close to 1, and the range of the RGB color space is [0, 255]. Assuming the sum of the coefficients is 1, then the corresponding values of X, Y, and Z are also in the range [0, 255]. This allows for mapping between the RGB and XYZ color spaces within the same value range. Therefore, when calculating the LAB color space, Y / Y can be included. n X / X n Z / Z n .
[0367] L'=116×f(Y / Y n )–16.
[0368] a'=500×[f(X / X n )–f(Y / Y n )).
[0369] b' = 200 × [f(Y / Y)] n )–f(Z / Z n )).
[0370]
[0371] S2803. Obtain the RGB color space of the original image.
[0372] S2804. Convert an image in RGB color space to an image in LAB color space.
[0373] The specific conversion process can be found in the relevant description in step S2702, and will not be repeated here.
[0374] S2805, Calculate the average value of the L channel of the image in the LAB color space from step S2704. m The average value of channel A, a m and the average value of channel B, b m .
[0375] S2806, Significance calculation.
[0376] Calculate the Euclidean distance between the filtered L', A', B' from step S2702 and the average values lm, am, bm from step S2705, and sum them to obtain the image saliency.
[0377] Wherein, the image saliency sm satisfies the following formula:
[0378] sm=(L'-l m )^2+(a'-a m )^2+(b'-b m )^2.
[0379] S2807. Normalize the significance level.
[0380] In this embodiment of the application, the saliency can be normalized to obtain an image saliency score S5. This image saliency score S5 satisfies the following formula:
[0381] S5=(1-((sm m -sm min ) / (sm max -sm min )))×100.
[0382] Where sm is the significance value, sm m Sm is the average of the significance values. max The maximum significance value is sm min This represents the minimum significance value.
[0383] For example, suppose the calculated significance value of sm is:
[0384] sm:[[780.6718786 775.95133906 768.34985748...453.3700229 447.8029946445.04616205] [822.54042814 815.97500381 805.07081959...450.46657216 445.0039292442.30619411] [917.75657685 905.76560511 885.43190285...444.88031973 439.65166161437.09051659] ... [30.17987777 30.58829598 31.29911563...1309.84618311 1310.402769341310.66004959] [29.70379248 30.13203894 30.88209209...1324.61789196 1326.293193161327.15627348] [29.52245132 29.95977896 30.72794593...1331.9621382 1334.169018361335.32045904]]
[0391] Based on sm, we can calculate:
[0392] sm average sm m =733.2619505338996.
[0393] The maximum value of sm max =4805.484630924549.
[0394] The minimum value of sm min =0.00847007921992726.
[0395] The average value of sm is sm m Maximum value sm max and minimum value sm min Substituting into the significance normalization formula, we get:
[0396] S5=(1-((sm m -sm min ) / (sm max -sm min )))×100=84.7413 (points).
[0397] The resulting image saliency score, S5, is 84.7413.
[0398] Figure 29 The salience scores for two portrait images are shown. Among them, in Figure 29 In example a, the person stands out relatively well in the image, and the distinction between the person and the background is quite clear. This can be interpreted as the person being prominent in the image, resulting in a salience score of 84.7413. Figure 29 In case b, due to the complex background and the relatively small size of the person, the person is not prominent enough in the image, and the distinction between the person and the background is not obvious enough. It can also be understood that the person is not very significant in the image, and the corresponding salience score is 64.1700.
[0399] In other words, image saliency can, to a certain extent, reflect the degree to which a person distinguishes from the background, and how prominent the person is in the image. Understandably, the higher the saliency score, the more prominent the person in the image. This application's embodiments consider that image saliency can better evaluate the people in the image, resulting in images with better portrait quality, thereby helping users select higher-quality images.
[0400] It is understood that the wallpaper setting method of this application embodiment can be viewed by decompiling to see the log information related to the generation of AI images and the quality scoring of AI images. For example, the log information may include, but is not limited to, one or more of the following keywords: "face abnormal", "body abnormal", "big head", "big body", "arm abnormal", "hunchback", "ear abnormal", "nose abnormal", "mouth abnormal", "eye abnormal", "multiple abnormal", "overall score", "portrait score", "background score", "weighted score".
[0401] Figure 30 This application illustrates a wallpaper setting method according to an embodiment of the present application. Applied to an electronic device, the method includes:
[0402] S3001. Display the first interface, which includes N images from the image library, where N is an integer greater than or equal to 1.
[0403] In this application embodiment, the electronic device may include any electronic device that may implement the wallpaper setting method of this application embodiment. For example, the electronic device may include the first electronic device in the specific embodiment.
[0404] The first interface can be understood as the interface used to select images, where users can choose one or more images. The first interface can retrieve and display images from a gallery. It is understood that the first interface can be any interface on an electronic device that can be used to select images. For example, the first interface could be an interface in a gallery application, an interface in a settings application, or an interface in other possible applications.
[0405] For example, the first interface can be referred to Figure 4 The character image selection interface 400 in the corresponding embodiment will not be described again. Compared to the character image selection interface 400, the first interface may include more or fewer contents and controls. The specific contents and controls included in the first interface are not limited in this application embodiment.
[0406] The N images can be any N images, or N images of people; this application does not limit this.
[0407] S3002. Upon receiving the first operation from the user to select M images from N images, a second interface is displayed. The second interface includes L AI images generated based on the M images, where M is a positive integer less than or equal to N, and L is an integer greater than or equal to M.
[0408] In this embodiment, the second interface can be understood as an interface used to display the generated AI image. For example, the second interface can refer to... Figure 8 The AI wallpaper settings interface 800 in the corresponding embodiment, or Figure 9 The AI wallpaper rating interface 900 in the corresponding embodiment will not be described again. Compared to the AI wallpaper settings interface 800, the second interface may include more or fewer content and controls. The specific content and controls included in the second interface are not limited in this embodiment.
[0409] S3003: Receive a second operation from the user selecting one or more AI images from L AI images, and set one or more AI images as the wallpaper of the electronic device.
[0410] In this embodiment, the wallpaper of an electronic device may include desktop wallpaper, i.e., the wallpaper displayed on the main interface, which may or may not include application icons; the wallpaper of an electronic device may also include lock screen wallpaper, i.e., the wallpaper displayed on the lock screen interface, etc., and this embodiment does not limit this. Setting the wallpaper of an electronic device based on one or more generated AI images can provide users with more personalized and diverse images, thereby enriching the diversity of wallpapers.
[0411] Optional, in Figure 30Based on the corresponding implementation, the L AI images are sorted from high to low image quality.
[0412] Image quality can be categorized into multiple dimensions, such as whether there are abnormally displayed people, animals, or backgrounds in the image, whether the details of people in the image are clear and aesthetically pleasing, whether the image background is clear, the energy of the image in the frequency domain, and / or whether the subject in the image is salient. In this embodiment, image quality can be understood as the image quality determined by comprehensively evaluating the image from multiple dimensions of image quality measurement.
[0413] The interface for sorting AI images from highest to lowest quality can be found here. Figure 8 The AI wallpaper settings interface 800 in the corresponding embodiment, or Figure 9 The AI wallpaper rating interface 900 in the embodiment corresponds to 'a'. The specific interface may include more or fewer content and controls, and this application embodiment does not limit this.
[0414] It is understandable that AI images are sorted from high to low quality. This way, when users select an image from multiple AI images, an image quality reference can be provided. Users can see the images with better quality first, making it easier for them to quickly select the better image, thereby improving the user experience.
[0415] Optional, in Figure 30 Based on the corresponding embodiment, the second interface also displays the image quality scores corresponding to each of the L AI images.
[0416] In this embodiment, the interface for displaying the AI image quality score can be referred to... Figure 9 The b corresponds to the AI wallpaper rating interface 900 in the embodiment. The specific interface may include more or fewer content and controls, which is not limited in this application embodiment.
[0417] Optionally, the display order of the AI wallpapers can be based on their image quality scores, from highest to lowest. This allows users to see images with higher quality scores first, making it easier to select AI wallpapers with higher quality scores and improving the user experience.
[0418] Optional, in Figure 30 Based on the corresponding embodiment, upon receiving a first operation from a user selecting M images from N images, displaying a second interface may include: upon receiving a first operation from a user selecting M images from N images, displaying a third interface, the third interface including one or more style selection controls; upon receiving a third operation from a user acting on one or more style selection controls, displaying a second interface, the styles of the L AI images in the second interface including the styles selected by the user.
[0419] In this embodiment, the third interface can be understood as an interface used to provide users with image style selection. For example, the third interface can refer to... Figure 5 The image style selection interface 500 in the corresponding embodiment will not be described again. Compared to the image style selection interface 500, the third interface may include more or fewer content and controls. The specific content and controls included in the third interface are not limited in this embodiment.
[0420] Each style selection control can correspond to different styles of images. Different styles of images can include different styles of people in the image, or different styles of backgrounds. The image style can include, but is not limited to, one or more of the following: modern style, Republic of China style, minimalist style, retro style, pastoral style, cute style, and business style.
[0421] It is understandable that generating AI wallpapers based on the image style selected by the user makes it easier to obtain AI images that meet the user's needs, thereby improving the user experience.
[0422] Optional, in Figure 30 Based on the corresponding embodiment, after receiving the first operation of the user selecting M images from N images, it may further include: displaying a fourth interface, the fourth interface including image information of one or more human images, the image information including human age information and / or human gender information, and the M images including one or more human images.
[0423] In this embodiment, the fourth interface can be understood as an interface used to display information about people in an image. For example, the fourth interface can refer to... Figure 6 The image recognition interface 600 in the embodiment corresponds to 'a', and the image information display can be, for example, the image recognition interface 600. Figure 6 As shown in section a602, it will not be described again. Compared to the image recognition interface 600, the fourth interface may include more or fewer content and controls. The specific content and controls included in the fourth interface are not limited in this embodiment.
[0424] The image information of the person may include the person's age, gender, expression, clothing, actions, etc., which are not limited in this embodiment. The display order of the third and fourth interfaces is not limited in this embodiment.
[0425] Understandably, the fourth interface displays image information of the person's image. On the one hand, it allows users to understand whether the selected image meets their needs based on the image information; on the other hand, it allows users to confirm whether the image information is correct. In this way, the electronic device can update the corresponding training model based on the user's feedback, thereby improving the accuracy of the model's recognition.
[0426] Optional, in Figure 30 Based on the corresponding embodiments, the method may further include: receiving a fourth operation from the user on image information, displaying a fifth interface, the fifth interface including an age selection area and / or a gender selection area, the age selection area including age selection controls for multiple age stages, and the gender selection area including a female selection control and a male selection control; receiving a fifth operation from the user on a control in the age selection area and / or a control in the gender selection area, displaying a sixth interface, in which the person's age and / or gender are matched with the corresponding person image.
[0427] In this embodiment, the fifth interface can be understood as an interface for updating character information. The fifth interface may also include menu interfaces for modifying age and gender. For example, the fifth interface may provide controls allowing users to modify age and / or gender information. Exemplarily, the fifth interface can refer to... Figure 6 In the embodiment of b, the image recognition interface 600, the age selection area can be... Figure 6 The age option menu 605 in b is shown and will not be described again. Compared to the image recognition interface 600, the fifth interface may include more or fewer content and controls. The specific content and controls included in the fifth interface are not limited in this embodiment.
[0428] The sixth interface can be understood as the updated information interface, or as the interface where the displayed image information matches the actual image. Understandably, if the age and gender of the person are correctly identified, the sixth interface can be the same as the fourth interface. If the age and / or gender are incorrectly identified, the sixth interface will differ from the fourth interface. In this way, on the one hand, users can select the information that matches the image based on the actual situation. On the other hand, the electronic device or server can update the age recognition model and / or gender recognition model based on the information modified by the user, thereby improving the accuracy of the model.
[0429] Optional, in Figure 30 Based on the corresponding embodiments, the method may further include: receiving a fourth operation performed by the user on the image information, displaying a fifth interface, the fifth interface including: prompt information and a first control, the prompt information being used to indicate whether the image information matches the corresponding person image; receiving a fifth operation performed by the user on the first control, displaying a sixth interface, in which the image information matches the corresponding person image.
[0430] In this embodiment, the fifth interface can be understood as an interface for updating character information. For example, the fifth interface may provide a pop-up window allowing the user to modify age and / or gender information. For instance, the fifth interface can refer to... Figure 6The c corresponds to the image recognition interface 600 in the embodiment, and the prompt information may include the first text 607, which will not be described in detail here. Compared to the image recognition interface 600, the fifth interface may include more or fewer content and controls. The specific content and controls included in the fifth interface are not limited in this embodiment.
[0431] It is understandable that the first control can be as shown in the first control 608 or the second control 609.
[0432] The sixth interface can be understood as the interface after the information is updated, or as the interface where the displayed image information matches the actual image.
[0433] If the person's age is correctly recognized, the first control can be the first control 608, or it can be understood as the correct control 608. In this case, the sixth interface can be the same as the fourth interface.
[0434] In the event of an error in age recognition, the first control can be the second control 609, or it can be understood as the error control 609. In this case, the sixth interface differs from the fourth interface. In some implementations, the error control 609 can also be an information selection control, which can be used to allow the user to select age and / or gender information.
[0435] In this way, on the one hand, users can select information that matches the image based on the actual situation. On the other hand, electronic devices or servers can update the age recognition model and / or gender recognition model based on the information modified by the user, thereby improving the accuracy of the model.
[0436] Optional, in Figure 30 Based on the corresponding embodiment, before displaying the second interface, it may further include: determining the image quality or image quality score of L AI images, wherein the image quality or image quality score of L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and posture of the person, a second score related to the expression of the person, a third score related to the background of the image, a fourth score related to the frequency domain quality of the image, and a fifth score related to the saliency of the image.
[0437] In this embodiment of the application, the image quality or image quality score of the L AI images is specifically determined by referring to... Figure 11 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0438] It is understood that when weighting one or more scores, the weights of each item can be the same or different. The specific weight ratios of each item can be set by the electronic device according to the actual situation, or the user can customize the weight ratios of each dimension. This application embodiment does not limit this.
[0439] If the AI image does not belong to a human figure, then the human's skeleton, posture, and facial expressions can be disregarded.
[0440] If the AI image includes images of people, since users typically value the quality of the people in the image, the quality assessment can focus more on the image quality related to the people. Therefore, when setting the weighting, the weights for skeletal and pose scores, as well as expression scores, can be set to relatively large values. To reflect the subjectivity of the person in the image, the weight of the salience score can also be appropriately increased. This ensures that in images with higher quality scores, the pose and expression of the people are also better, thus better meeting the user's needs.
[0441] The embodiments of this application can evaluate the quality of an image from multiple dimensions and provide a more reasonable image quality score, making it easier for users to choose and improving the user experience.
[0442] Optional, in Figure 30 Based on the corresponding embodiment, the skeleton and posture of the character include the skeleton and posture of the shoulder region, the skeleton and posture of the elbow region, and the skeleton and posture of the knee region. The first score S1 related to the skeleton and posture of the character satisfies the following formula:
[0443] S1=K1×(1-d 11 / 0.1)+K2×(1–d 22 / 0.1)+K3×(1–d 33 / 0.1).
[0444] Where K1 is the scoring weight for the shoulder area, K2 is the scoring weight for the elbow area, K3 is the scoring weight for the knee area, and d 11 d represents the difference between the left and right shoulders in the shoulder region. 22 d represents the difference between the left and right elbows in the elbow region. 33 This represents the difference between the left and right knees in the knee region.
[0445] In this embodiment, the first score S1, which is specifically related to the skeleton and posture of the character, can be referred to the relevant description in (3) detection and scoring of the skeleton and posture of the character in the specific implementation, and will not be repeated here.
[0446] It is understood that the embodiments of this application can score skeletons and poses, assigning different weights and coefficients to the detected key points. When the image type is different, the key points included in the image are also different, so the weights and coefficients of the same region will also be different, thereby achieving a balanced and diverse scoring.
[0447] Optional, in Figure 30 Based on the corresponding embodiments, the electronic device has a variety of character expressions preset, and different character expressions correspond to different score ranges. The second score S2 related to the character expression satisfies the following formula:
[0448] S2 = Em min +(Em max -Em min )×L em / 100.
[0449] Among them, L em The maximum similarity score for a person's facial expression is the highest similarity score among multiple facial expressions in an AI image. The AI image is any one of L AI images. min For L em The minimum value of the corresponding character's facial expression score range, Em max For L em The maximum value of the corresponding character's facial expression score range.
[0450] In this embodiment, the second score S2, which is specifically related to human facial expressions, can be referred to the relevant description in (4) of the specific implementation method for detecting and scoring human facial expressions, and will not be repeated here.
[0451] For example, various human facial expressions may include anger, disgust, fear, happiness, sadness, surprise, and neutrality. The specific classification of expressions and the corresponding score ranges for each expression can be adjusted according to the actual scenario, and this application embodiment does not limit them.
[0452] Understandably, since users typically place great importance on the facial expressions of people in images, this application embodiment considers facial expressions and scores them when evaluating image quality. This results in images with higher quality scores having better facial expressions, thus meeting user needs and improving the user experience.
[0453] Optional, in Figure 30 Based on the corresponding embodiment, the fourth score S4 related to image frequency domain quality satisfies the following formula:
[0454] S4=100×((f high / f all ) / 0.1).
[0455] Among them, f high f represents the energy of the high-frequency components of the AI image in the frequency domain. all The total energy of the AI image in the frequency domain is given by the AI image. The high-frequency component is the frequency component within a preset pixel region in the center region of the AI image in the frequency domain. The AI image is any one of the L AI images.
[0456] In this embodiment, the fourth score S4, which is specifically related to the image frequency domain quality, can be referred to the relevant description in (6) of the specific implementation method for the detection and scoring of the overall image frequency domain quality, and will not be repeated here.
[0457] The preset pixel area may include a 60-pixel area. Specifically, the division of high-frequency components and low-frequency components in the image center area is not limited in this application embodiment.
[0458] It is understood that the embodiments of this application use Fourier transform to convert the image from the spatial domain to the frequency domain, calculate the ratio of total spectral energy to high-frequency energy, and thus use it as a basis for image frequency domain quality scoring to obtain a score that matches the image quality for user reference, thereby improving user experience.
[0459] Optional, in Figure 30 Based on the corresponding embodiment, the fifth score S5 related to image saliency satisfies the following formula:
[0460] S5=(1-((sm m -sm min ) / (sm max -sm min ))×100.
[0461] Where sm is the saliency value of the AI image, sm m Sm is the average of the significance values. max The maximum significance value is sm min The minimum saliency value is denoted by , and the AI image is any one of the L AI images.
[0462] In this embodiment, the fifth score S5, which is specifically related to image saliency, can be referred to the relevant description in (7) Image Saliency Detection and Scoring of the specific implementation method, and will not be repeated here.
[0463] Image saliency, to a certain extent, reflects the degree to which a person stands out from the background, indicating how prominent the person is in the image. Understandably, the higher the saliency score, the more prominent the person in the image. This application's embodiments consider that image saliency can better evaluate the people in the image, resulting in images with better portrait quality, thereby helping users select higher-quality images.
[0464] Optional, in Figure 30Based on the corresponding embodiments, before determining the image quality or image quality score of the L AI images, the method may further include: identifying image anomalies in the generated AI images, wherein the generated AI images include L AI images, and the image anomalies include one or more of the following anomalies: abnormal person information, distortion anomalies, and occlusion anomalies; wherein, abnormal person information includes one or more of the following anomalies: incorrect age recognition of person, incorrect gender recognition of person; distortion anomalies include one or more of the following anomalies: extra fingers of person, multiple organs of person, missing organs of person, deformed torso of person, missing torso of person; occlusion anomalies may include person being occluded.
[0465] In this embodiment of the application, the specific identification of image anomalies in the generated AI image can be referred to the relevant description in (1) identification of abnormal scenes in the specific implementation method, which will not be repeated here.
[0466] Understandably, by first identifying abnormal scenes in the image, more types of distorted images can be identified, and these abnormal images can be filtered out in advance. This eliminates the need to perform subsequent image quality scoring on abnormal images, thereby reducing computing power and improving the execution efficiency of the algorithm.
[0467] Optional, in Figure 30 Based on the corresponding embodiments, the electronic device does not use AI images with image anomalies. Not using AI images with image anomalies includes discarding, deleting, scoring less than a preset value, or scoring 0 on AI images with image anomalies.
[0468] In this embodiment, the electronic device does not use AI images with image anomalies. In this way, when the electronic device displays images, it will not display images with poor quality or low ratings, thereby displaying higher quality images to the user and improving the user experience.
[0469] Figure 31 This application illustrates another wallpaper setting method according to an embodiment of the present application. Applied to a communication system, the communication system including electronic devices and a server, the method includes:
[0470] S3101. The electronic device displays a first interface, which includes N images from a gallery, where N is an integer greater than or equal to 1.
[0471] In this application embodiment, the electronic device may include any electronic device that may execute the wallpaper setting method of this application embodiment. For example, the electronic device may include the first electronic device in the specific embodiment.
[0472] The first interface can be referenced. Figure 30 The relevant descriptions in step S3001 of the corresponding embodiment will not be repeated here.
[0473] S3102. When the electronic device receives the first operation from the user to select M images from N images, the electronic device sends M images to the server, where M is a positive integer less than or equal to N.
[0474] In this embodiment, the server may also be referred to as a cloud server or cloud server. For example, the server may include the cloud server in the specific implementation.
[0475] S3103. The server generates L AI images based on M images, and sends the L AI images to the electronic device, where L is an integer greater than or equal to M.
[0476] In this embodiment, the server generates L AI images based on M images, which can reduce the computational load on the electronic devices used by the user, improve the operating performance of the electronic devices, and thus reduce lag.
[0477] S3104, The electronic device displays a second interface, which includes L AI images.
[0478] In this embodiment of the application, the second interface can be referred to Figure 30 The relevant descriptions in step S3002 of the corresponding embodiment will not be repeated here.
[0479] S3105. The electronic device receives a second operation from the user selecting one or more AI images from L AI images, and sets one or more AI images as the wallpaper of the electronic device.
[0480] In this embodiment, the wallpaper of an electronic device may include desktop wallpaper, lock screen wallpaper, live wallpaper, etc., and this embodiment is not limited thereto. Setting the wallpaper of an electronic device based on one or more generated AI images can provide users with more personalized and diverse images, thereby enriching the diversity of wallpapers.
[0481] Optional, in Figure 31 Based on the corresponding implementation, the L AI images are sorted from high to low image quality, or the L AI images are sorted from high to low image quality score.
[0482] In this embodiment, the interface corresponding to the AI images sorted from high to low image quality can be referred to... Figure 8 The AI wallpaper settings interface 800 in the corresponding embodiment, or Figure 9 The AI wallpaper rating interface 900 in the corresponding embodiment is shown in figure 'a'. The interface displaying the image quality score for the AI image can be referred to... Figure 9 The b corresponds to the AI wallpaper rating interface 900 in the embodiment. The specific interface may include more or fewer content and controls, which is not limited in this application embodiment.
[0483] Optionally, the display order of the AI wallpapers can be based on their image quality scores, from highest to lowest. This allows users to see images with higher quality scores first, making it easier to select AI wallpapers with higher quality scores and improving the user experience.
[0484] It is understood that the embodiments of this application can measure the quality of an image from multiple dimensions to make a comprehensive evaluation of the image. It can also sort AI images from high to low quality. In this way, when a user selects an image from multiple AI images, it can provide an image quality reference. The user can see the image with better quality first, which makes it easier for the user to quickly select the image with better quality, thereby improving the user experience.
[0485] Optional, in Figure 31 Based on the corresponding embodiments, the electronic device sending M images to the server may further include: the electronic device sending M images to the server and sending one or more image styles selected by the user; the server generating L AI images based on the M images may further include: the server generating L AI images based on the M images and one or more image styles, wherein the style of the L AI images includes one or more image styles.
[0486] In this embodiment of the application, different styles of images may include different styles of people in the images, or different styles of backgrounds in the images. The image styles may include, but are not limited to, one or more of the following: modern style, Republic of China style, minimalist style, retro style, pastoral style, cute style, and business style.
[0487] It is understandable that generating AI wallpapers based on the image style selected by the user makes it easier to obtain AI images that meet the user's needs, thereby improving the user experience.
[0488] Optional, in Figure 31 Based on the corresponding embodiment, after the server generates L AI images based on M images, it may include: the server determining the image quality or image quality score of the L AI images, wherein the image quality or image quality score of the L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and posture of the person, a second score related to the expression of the person, a third score related to the background of the image, a fourth score related to the frequency domain quality of the image, and a fifth score related to the saliency of the image.
[0489] In this embodiment of the application, the image quality or image quality score of the L AI images is specifically determined by referring to... Figure 11 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0490] It is understood that when weighting one or more scores, the weights of each item can be the same or different. The specific weight ratios of each item can be set by the electronic device according to the actual situation, or the user can customize the weight ratios of each dimension. This application embodiment does not limit this.
[0491] The embodiments of this application can evaluate the quality of an image from multiple dimensions and provide a more reasonable image quality score, making it easier for users to choose and improving the user experience.
[0492] Optional, in Figure 31 Based on the corresponding embodiments, before the server determines the image quality or image quality score of the L AI images, it may further include: the server identifying image anomalies in the generated AI images, the generated AI images including L AI images, and the image anomalies including one or more of the following anomalies: abnormal person information, distortion anomalies, and occlusion anomalies; wherein, abnormal person information includes one or more of the following anomalies: incorrect age recognition of person, incorrect gender recognition of person; distortion anomalies include one or more of the following anomalies: extra fingers of person, multiple organs of person, missing organs of person, deformed torso of person, missing torso of person; occlusion anomalies may include person being occluded.
[0493] In this embodiment of the application, the specific identification of image anomalies in the generated AI image can be referred to the relevant description in (1) identification of abnormal scenes in the specific implementation method, which will not be repeated here.
[0494] Understandably, by first identifying abnormal scenes in the image, more types of distorted images can be identified, and these abnormal images can be filtered out in advance. This eliminates the need to perform subsequent image quality scoring on abnormal images, thereby reducing computing power and improving the execution efficiency of the algorithm.
[0495] Optional, in Figure 31 Based on the corresponding embodiments, the server does not use AI images with image anomalies. Not using AI images with image anomalies includes discarding, deleting, scoring less than a preset value, or scoring the AI images with image anomalies to 0.
[0496] In this embodiment, the server does not use AI images with image anomalies. In this way, when the electronic device displays images, it will not display images with poor quality or low ratings, thereby displaying higher quality images to the user and improving the user experience.
[0497] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0498] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the method steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0499] This application embodiment can divide the apparatus for implementing the method into functional modules based on the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0500] like Figure 32 The diagram shows a chip structure according to an embodiment of this application. The chip 3200 includes one or more processors 3201, communication lines 3202, communication interfaces 3203, and memory 3204.
[0501] In some implementations, memory 3004 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof.
[0502] The methods described in the embodiments of this application can be applied to, or implemented by, processor 3201. Processor 3201 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 3201 or by instructions in software form. Processor 3201 may be a general-purpose processor (e.g., a microprocessor or conventional processor), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates, transistor logic devices, or discrete hardware components. Processor 3201 can implement or execute the various processing-related methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0503] The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM). This storage medium is located in memory 3204, and processor 3201 reads information from memory 3204 and, in conjunction with its hardware, completes the steps of the above method.
[0504] The processor 3201, memory 3204 and communication interface 3203 can communicate with each other through communication line 3202.
[0505] In the above embodiments, the instructions stored in the memory for execution by the processor can be implemented in the form of a computer program product. This computer program product can be pre-written into the memory, or it can be downloaded and installed into the memory as software.
[0506] This application also provides a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from a website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. For example, available media may include magnetic media (e.g., floppy disk, hard disk, or magnetic tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid-state disk (SSD)).
[0507] This application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. The computer-readable medium may include computer storage media and communication media, and may also include any medium capable of transferring a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0508] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may also include disk storage or other disk storage devices. Furthermore, any connecting cable may also be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. As used herein, disks and optical discs include optical discs (CD), laser discs, optical discs, digital versatile discs (DVD), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers.
[0509] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
Claims
1. A wallpaper setting method, applied to electronic devices, characterized in that, The method includes: Display a first interface, which includes N images from the gallery, where N is an integer greater than or equal to 1; Upon receiving a first operation from a user to select M images from the N images, a second interface is displayed. The second interface includes L AI images generated based on the M images, where M is a positive integer less than or equal to N, and L is an integer greater than or equal to M. Upon receiving a second operation from the user to select one or more AI images from the L AI images, the user sets the one or more AI images as the wallpaper of the electronic device.
2. The method as described in claim 1, characterized in that, The L AI images are sorted from highest to lowest image quality.
3. The method as described in claim 1 or 2, characterized in that, The second interface also displays the image quality scores corresponding to each of the L AI images.
4. The method according to any one of claims 1-3, characterized in that, Upon receiving the user's first operation to select M images from the N images, the second interface is displayed, including: Upon receiving the first operation from the user to select M images from the N images, a third interface is displayed, the third interface including one or more style selection controls; Upon receiving a third operation from the user on one or more style selection controls, the second interface is displayed, wherein the styles of the L AI images in the second interface include the styles selected by the user.
5. The method according to any one of claims 1-4, characterized in that, After receiving the first operation from the user to select M images from the N images, the method further includes: The fourth interface is displayed, which includes image information of one or more human figures. The image information includes the age information and / or gender information of the human figures. The M images include the one or more human figures.
6. The method as described in claim 5, characterized in that, The method further includes: Upon receiving a fourth operation from the user on the image information, a fifth interface is displayed. The fifth interface includes an age selection area and / or a gender selection area. The age selection area includes age selection controls for multiple age ranges, and the gender selection area includes female selection controls and male selection controls. Upon receiving a fifth operation from the user, which involves applying a control to the age selection area and / or a control to the gender selection area, a sixth interface is displayed, in which the person's age and / or gender are matched with the corresponding person's image.
7. The method as described in claim 5, characterized in that, The method further includes: Upon receiving a fourth operation from the user on the image information, a fifth interface is displayed. The fifth interface includes: a prompt message and a first control. The prompt message is used to indicate whether the image information matches the corresponding person image. Upon receiving a fifth operation from the user on the first control, a sixth interface is displayed, in which the image information is matched with the corresponding character image.
8. The method according to any one of claims 1-7, characterized in that, Before displaying the second interface, the following is also included: Determine the image quality or image quality score of the L AI images, wherein the image quality or image quality score of the L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and posture of the person, a second score related to the expression of the person, a third score related to the background of the image, a fourth score related to the frequency domain quality of the image, and a fifth score related to the saliency of the image.
9. The method as described in claim 8, characterized in that, The skeleton and posture of the figure include the skeleton and posture of the shoulder area, the skeleton and posture of the elbow area, and the skeleton and posture of the knee area. The first score S1 related to the skeleton and posture of the figure satisfies the following formula: S1=K1×(1-d 11 / 0.1)+K2×(1–d 22 / 0.1)+K3×(1–d 33 / 0.1); Wherein, K1 is the scoring weight corresponding to the shoulder area, K2 is the scoring weight corresponding to the elbow area, K3 is the scoring weight corresponding to the knee area, and d 11 d represents the difference between the left and right shoulders in the shoulder region. 22 d represents the difference between the left and right elbows in the elbow region. 33 The difference between the left and right knees in the knee region is denoted as .
10. The method as described in claim 8 or 9, characterized in that, The electronic device has a variety of preset human expressions, and different human expressions correspond to different score ranges. The second score S2 related to the human expression satisfies the following formula: S2=Em min +(I max -Me min )×L em / 100; Among them, L em The maximum similarity score for a person's facial expression is defined as the maximum similarity score among the various facial expressions in the AI image compared to the given expressions. The AI image is any one of the L AI images. min For the L em The minimum value of the corresponding character's facial expression score range, Em max For the L em The maximum value of the corresponding character's facial expression score range.
11. The method according to any one of claims 8-10, characterized in that, The fourth score S4, which is related to the image frequency domain quality, satisfies the following formula: S4=100×((f high / f all ) / 0.1); Among them, f high f represents the energy of the high-frequency components of the AI image in the frequency domain. all The total energy of the AI image in the frequency domain is defined as follows: the high-frequency component is the frequency component within a preset pixel region in the central region of the AI image in the frequency domain; and the AI image is any one of the L AI images.
12. The method according to any one of claims 8-11, characterized in that, The fifth score S5, which is related to image saliency, satisfies the following formula: S5=(1-((sm m -sm min ) / (sm max -sm min ))×100; Where sm is the saliency value of the AI image, sm m Sm is the average of the significance values. max The maximum significance value is sm min The minimum saliency value is any one of the L AI images.
13. The method according to any one of claims 8-12, characterized in that, Before determining the image quality or image quality score of the L AI images, the method further includes: The generated AI images are used to identify image anomalies. The generated AI images include the L AI images, and the image anomalies include one or more of the following: abnormal person information, abnormal distortion, and abnormal occlusion. The abnormality of the person information includes one or more of the following: incorrect age recognition of the person, incorrect gender recognition of the person; the distortion abnormality includes one or more of the following: multiple fingers of the person, multiple organs of the person, missing organs of the person, deformed torso of the person, missing torso of the person; the occlusion abnormality includes the person being occluded.
14. The method as described in claim 13, characterized in that, The electronic device does not use AI images with image anomalies. This includes discarding, deleting, scoring the AI images with image anomalies below a preset value, or scoring them to 0.
15. A wallpaper setting method, applied to a communication system, said communication system including electronic devices and a server, characterized in that, The method includes: The electronic device displays a first interface, which includes N images from a gallery, where N is an integer greater than or equal to 1. The electronic device receives a first operation from the user to select M images from the N images, and then sends the M images to the server, where M is a positive integer less than or equal to N; The server generates L AI images based on the M images, and the server sends the L AI images to the electronic device, where L is an integer greater than or equal to M; The electronic device displays a second interface, which includes the L AI images; The electronic device receives a second operation from the user to select one or more AI images from the L AI images, and sets the one or more AI images as the wallpaper of the electronic device.
16. The method as described in claim 15, characterized in that, The L AI images are sorted from highest to lowest image quality, or the L AI images are sorted from highest to lowest image quality score.
17. The method as described in claim 15 or 16, characterized in that, The electronic device sends the M images to the server, and also includes: The electronic device sends the M images to the server, as well as one or more image styles selected by the user; The server generates L AI images based on the M images, and also includes: The server generates the L AI images based on the M images and the one or more image styles, wherein the styles of the L AI images include the one or more image styles.
18. The method according to any one of claims 15-17, characterized in that, After the server generates L AI images based on the M images, it includes: The server determines the image quality or image quality score of the L AI images, wherein the image quality or image quality score of the L AI images is obtained based on one or more of the following scores: a first score related to the skeleton and posture of the person, a second score related to the expression of the person, a third score related to the background of the image, a fourth score related to the frequency domain quality of the image, and a fifth score related to the saliency of the image.
19. The method as described in claim 18, characterized in that, Before the server determines the image quality or image quality score of the L AI images, it also includes: The server identifies image anomalies in the generated AI images, which include the L AI images. The image anomalies include one or more of the following: abnormal person information, abnormal distortion, and abnormal occlusion. The abnormality of the person information includes one or more of the following: incorrect age recognition of the person, incorrect gender recognition of the person; the distortion abnormality includes one or more of the following: multiple fingers of the person, multiple organs of the person, missing organs of the person, deformed torso of the person, missing torso of the person; the occlusion abnormality includes the person being occluded.
20. The method as described in claim 19, characterized in that, The server does not use AI images with image anomalies. This includes discarding, deleting, scoring the AI images with image anomalies below a preset value, or scoring them to 0.
21. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-14, or the method performed by the electronic device as described in any one of claims 15-20.
22. A communication system, characterized in that, include: An electronic device and a server, the electronic device being configured to perform the method as described in any one of claims 1-14, or the method as described in any one of claims 15-20, and the server being configured to perform the method as described in any one of claims 15-20.
23. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-14, or the method performed by the electronic device as described in any one of claims 15-20.
24. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-14, or the method performed by the electronic device as described in any one of claims 15-20.
25. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-14, or the method performed by the electronic device as described in any one of claims 15-20.