Image processing method and device, electronic equipment and storage medium
By grading and determining parameters for the target adjustment items of the image to be processed, the problem of requiring users to manually specify adjustment parameters in the prior art is solved, and the intelligent image editing is automated.
Patent Information
- Application Number
- CN202311095001.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-03-04
AI Technical Summary
When performing photo editing software, the user needs to manually specify the adjustment parameter change amount when the existing photo editing software is undergoing photo editing, and it is impossible to realize intelligent photo editing without user specification.
By acquiring the image to be processed and adjusting instructions, including target adjustment item identification information and adjustment direction, the target adjustment item of the image to be processed is scored, the amount of adjustment parameter changes is determined based on the scoring results and adjustment direction, and the image is adjusted.
It realizes intelligent photo editing without requiring the user to specify the amount of adjustment parameter changes, which improves the degree of automation of image processing.
Smart Images

Figure CN119559092A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] At present, various photo editing software in electronic products are becoming more and more popular. Existing photo editing software can edit one or more parts of a photo after it is taken, such as enlarging the eyes, brightening the skin tone or adjusting the face shape.
[0003] When using existing photo editing software to perform photo editing (such as enlarging the eyes), a slider representing the adjustable range of parameters is usually displayed in the terminal display interface, and the user needs to move the slider in the slider to a suitable position so that the photo editing software can know the degree of adjustment (such as the degree of enlarging the eyes). In other words, in the prior art, the user moves the slider in the slider to a suitable position, which is actually the user specifying the amount of change in the adjustment parameter. However, when actually performing beauty enhancement, the user hopes that the photo editing software can achieve intelligent photo editing without the user specifying the amount of change in the adjustment parameter. Summary of the invention
[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides an image processing method, device, electronic device and storage medium.
[0005] In a first aspect, the present disclosure provides an image processing method, comprising:
[0006] Acquire an image to be processed and an adjustment instruction; the adjustment instruction includes target adjustment item identification information and an adjustment direction;
[0007] Scoring the target adjustment item of the image to be processed to obtain a scoring result;
[0008] Determining a change amount of an adjustment parameter based on the scoring result and the adjustment direction;
[0009] Based on the change amount of the adjustment parameter, the target adjustment item of the image to be processed is adjusted.
[0010] In a second aspect, the present disclosure further provides an image processing device, comprising:
[0011] An acquisition module, used for acquiring an image to be processed and an adjustment instruction; the adjustment instruction includes target adjustment item identification information and an adjustment direction;
[0012] A scoring module, used for scoring the target adjustment items of the image to be processed to obtain a scoring result;
[0013] A determination module, used to determine the change amount of the adjustment parameter based on the scoring result and the adjustment direction;
[0014] An adjustment module is used to adjust the target adjustment item of the image to be processed based on the change amount of the adjustment parameter.
[0015] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] A storage device for storing one or more programs;
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.
[0019] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the image processing method as described above when executed by a processor.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The technical solution provided by the embodiment of the present disclosure is configured to obtain an image to be processed and an adjustment instruction; the adjustment instruction includes target adjustment item identification information and an adjustment direction; the target adjustment item of the image to be processed is scored to obtain a scoring result; based on the scoring result and the adjustment direction, an adjustment parameter change amount is determined; based on the adjustment parameter change amount, the target adjustment item of the image to be processed is adjusted, thereby realizing intelligent photo retouching without the need for the user to specify the adjustment parameter change amount. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A flowchart of an image processing method provided by an embodiment of the present disclosure;
[0025] Figure 2 A structural block diagram of an image processing device provided by an embodiment of the present disclosure;
[0026] Figure 3 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] Figure 1 This is a flowchart of an image processing method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where image processing is performed in a client. The method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where image processing is performed in a server. The method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.
[0030] like Figure 1 As shown, the method may specifically include:
[0031] S110, obtaining an image to be processed and an adjustment instruction; the adjustment instruction includes target adjustment item identification information and an adjustment direction.
[0032] The image to be processed may be, for example, an image that needs to be retouched. The retouching may be, for example, adjusting one or more adjustable items in the image to be processed. The adjustable items may include, but are not limited to, at least one of the following: whitening, skin resurfacing, freckle and acne removal, brightness adjustment, face shape adjustment, eye size adjustment, teeth whitening, and filters.
[0033] The adjustment instruction may be, for example, an instruction for indicating which item or items of the image to be processed are to be adjusted. The target adjustment item may be, for example, the adjustment item for which the image processing method is executed this time. The adjustment item identification information may be information for distinguishing one adjustment item from other adjustment items. Exemplarily, the adjustment item identification information may include, but is not limited to, the adjustment item name and / or number, etc. The target adjustment item identification information may be information for distinguishing the target adjustment item from non-target adjustment items. The adjustment direction is a restriction condition on the adjustment, which is used to limit the direction in which the target adjustment item is to be adjusted.
[0034] Each adjustment item corresponds to at least one adjustment parameter. The adjustment parameter is used to control the state presented by the adjustment item. Exemplarily, the adjustment item is to adjust the size of the eye, and the adjustment parameter corresponding to the adjustment item is used to control the size presented by the eye. The larger the adjustment parameter, the larger the eye. The adjustment direction can be positive or negative. The positive direction refers to the direction of increasing the adjustment parameter, and the negative direction refers to the direction of decreasing the adjustment parameter.
[0035] In some embodiments, the adjustment instruction is generated based on user input information. For example, the user input information is "enlarge the eyes of the person in the image". Based on the user input information, it can be obtained that the target adjustment item is to adjust the size of the eyes, and the adjustment direction is the direction of increasing the adjustment parameter, that is, the positive direction. The adjustment instruction can be generated based on the user input information.
[0036] In practice, the user input information can be text information or voice information. If the user input information is text information, the text information can be processed by natural language to determine the target adjustment item identification information and the adjustment direction; then, based on the target adjustment item identification information and the adjustment direction, an adjustment instruction is generated. If the user input information is voice information, the voice information is converted into text information, and then the text information is processed by natural language to determine the target adjustment item identification information and the adjustment direction; then, based on the target adjustment item identification information and the adjustment direction, an adjustment instruction is generated.
[0037] S120 , scoring the target adjustment items of the image to be processed to obtain a scoring result.
[0038] In practice, the same adjustment item presents different states in different images to be processed before adjustment. For example, two images to be processed are given in advance, namely image a and image b. Both images to be processed include people. It is necessary to adjust the eye size of the people in image a and image b. In practice, the eye size of the person in image a may be different from the eye size of the person in image b. The purpose of this step is to evaluate the state presented by the target adjustment item in the image to be processed before adjustment. In other words, the purpose of this step is to enable the executor of this method to understand the initial state of the target adjustment item in the image to be processed before adjustment, so as to lay the foundation for subsequent adjustment.
[0039] There are many implementation methods for this step, and this application does not limit this. Exemplarily, the implementation method of this step may include: presetting a scoring rule for the target adjustment item; using the preset scoring rule, scoring the target adjustment item of the image to be processed to obtain a scoring result. This application does not limit the specific content of the scoring rule. In practice, optionally, different target adjustment items have different scoring rules. Exemplarily, the target adjustment item is eye size. The scoring rule may include: if the ratio of the size of the eye to the size of the head is less than a first set threshold, determining that the score of the target adjustment item of the image to be processed is 0.2 points; if the ratio of the size of the eye to the size of the head is greater than or equal to the first set threshold and less than the second set threshold, determining that the score of the target adjustment item of the image to be processed is 0.5 points; if the ratio of the size of the eye to the size of the head is greater than or equal to the second set threshold, determining that the score of the target adjustment item of the image to be processed is 0.8 points. Among them, the first set threshold is less than the second set threshold.
[0040] In another embodiment, the implementation method of this step may include: determining positive description text information and negative description text information corresponding to the target adjustment item; based on the positive description text information and the negative description text information, scoring the target adjustment item of the image to be processed to obtain a scoring result.
[0041] Both the positive description text information and the negative description text information can be used to describe the two directions in which the target adjustment item can be adjusted, but the directions described by the two are opposite. For example, the target adjustment item is eye size, the positive description text information is "big eyes", and the negative description text information is "small eyes".
[0042] The purpose of “scoring the target adjustment items of the image to be processed based on the positive description text information and the negative description text information to obtain a scoring result” is to determine the degree of conformity of the image to be processed with the positive description text information and the negative description text information respectively.
[0043] Furthermore, there are many specific implementation methods for "scoring the target adjustment items of the image to be processed based on the positive description text information and the negative description text information to obtain a scoring result", and the present application does not limit this. Exemplarily, based on the positive description text information and the negative description text information, scoring the target adjustment items of the image to be processed to obtain a scoring result includes: determining a first semantic vector corresponding to the positive description text information and a second semantic vector corresponding to the negative description text information; performing image feature extraction on the image to be processed to obtain an image feature vector; and determining the scoring result based on the first semantic vector, the second semantic vector and the image feature vector. Among them, the first semantic vector is the result of encoding the positive description text information, which can be implemented using a text encoder. The second semantic vector is the result of encoding the negative description text information, which can be implemented using a text encoder. The image feature vector is the result of encoding the image to be processed, which can be implemented using an image encoder.
[0044] Furthermore, a scoring result can be determined based on the first semantic vector, the second semantic vector and the image feature vector, including: calculating a first similarity between the first semantic vector and the image feature vector; calculating a second similarity between the second semantic vector and the image feature vector; and determining the scoring result based on the first similarity and the second similarity.
[0045] In some embodiments, the first similarity may be a cosine similarity or a dot product operation result. That is, the cosine similarity or the dot product operation result between the first semantic vector and the image feature vector is used as the first similarity. Similarly, the second similarity may also be a cosine similarity or a dot product operation result. That is, the cosine similarity or the dot product operation result between the second semantic vector and the image feature vector is used as the second similarity.
[0046] There are many implementation methods for "determining a scoring result based on the first similarity and the second similarity", and this application does not limit this. For example, a function relationship can be pre-constructed with the first similarity and the second similarity as independent variables and the scoring result as a dependent variable; the first similarity and the second similarity are input into the function relationship to obtain the scoring result.
[0047] For example, the target adjustment item is eye size, the positive description text information is "big eyes", and the negative description text information is "small eyes". Assume that the image feature vector of the image to be processed is x, the first semantic vector corresponding to "big eyes" is t1, and the second semantic vector corresponding to "small eyes" is t2. The first similarity is s1=x·t1, and the second similarity is s2=x·t2. The scoring result is
[0048] S130: Determine the change amount of the adjustment parameter based on the scoring result and the adjustment direction.
[0049] There are many methods for implementing this step, which are not limited in this application. Exemplarily, the method for implementing this step includes: determining a reference standard associated with the adjustment direction; and determining the change amount of the adjustment parameter based on the scoring result and the reference standard.
[0050] Normally, each adjustment item corresponds to a threshold range. No matter what value the adjustment parameter takes within the threshold range, the user's overall viewing experience is better. If the adjustment parameter takes a value outside the threshold range, no matter what specific value it takes, the user's viewing experience is very poor. The reference standard can be, for example, the extreme point of the threshold range. Specifically, each adjustment item corresponds to two reference standards; one reference standard corresponds to the positive direction, which is the maximum value of the threshold range (hereinafter referred to as the positive reference standard); the other reference standard corresponds to the negative direction, which is the minimum value of the threshold range (hereinafter referred to as the negative reference standard).
[0051] For example, if the target adjustment item is the size of the eye, the target adjustment item corresponds to two reference standards, namely a positive reference standard and a negative reference standard, the positive reference standard corresponds to the direction of increasing the eye (i.e., positive), and the negative reference standard corresponds to the direction of decreasing the eye (i.e., negative). If the adjustment direction in the adjustment instruction is to increase the eye, the score result and the positive reference standard are used to determine the change in the adjustment parameter.
[0052] Furthermore, there are many specific implementation methods for "determining the amount of change in the adjustment parameter based on the scoring result and the reference standard", and this application does not limit this. For example, if the adjustment direction is positive, the amount of change in the adjustment parameter is determined based on the first function, the scoring result and the positive reference standard; if the adjustment direction is negative, the amount of change in the adjustment parameter is determined based on the second function, the scoring result and the negative reference standard.
[0053] The first function is a function with the score result and the positive reference standard as independent variables and the adjustment parameter change as the dependent variable. Optionally, in the first function, the adjustment parameter change is proportional to the positive reference standard and inversely proportional to the score result. In some embodiments, the first function can be expressed as
[0054]
[0055] Among them, a1 is the positive reference standard, b1 is a constant, e is the natural base, S is the scoring result, and M is the change in the adjustment parameter.
[0056] The second function is a function with the score result and the negative reference standard as independent variables and the adjustment parameter change as the dependent variable. Optionally, in the second function, the adjustment parameter change is inversely proportional to the negative reference standard and inversely proportional to the score result. In some embodiments, the second function can be expressed as
[0057]
[0058] Among them, a2 is the reverse reference standard, b2 is a constant, e is the natural base, S is the scoring result, and M is the change in the adjustment parameter.
[0059] Optionally, “determining the amount of change of the adjustment parameter based on the scoring result and the adjustment direction” may also include: determining a reference standard associated with the adjustment direction; determining an adjustment target value based on the reference standard; and determining the amount of change of the adjustment parameter based on the scoring result and the adjustment target value. The adjustment target value is the value of the adjustment parameter corresponding to the target adjustment item after the image processing is performed this time.
[0060] There are many specific implementation methods for "determining the adjustment target value based on the reference standard", and the present application does not limit this. Exemplarily, the reference standard is directly determined as the adjustment target value, or a function is pre-constructed with the reference standard as the independent variable and the adjustment target value as the dependent variable; the reference standard is input into the function to obtain the adjustment target value.
[0061] Optionally, if the adjustment target value is D and the scoring result is S, the adjustment parameter change M can be obtained based on the following formula:
[0062] M=DS.
[0063] S140: Adjust the target adjustment item of the image to be processed based on the change amount of the adjustment parameter.
[0064] The above technical solution is configured to obtain the image to be processed and the adjustment instruction; the adjustment instruction includes the target adjustment item identification information and the adjustment direction; the target adjustment item of the image to be processed is scored to obtain the scoring result; based on the scoring result and the adjustment direction, the adjustment parameter change amount is determined; based on the adjustment parameter change amount, the target adjustment item of the image to be processed is adjusted. By adopting the above technical solution, intelligent photo editing can be realized without the user specifying the adjustment parameter change amount.
[0065] On the basis of the above technical solutions, optionally, after determining the scoring result based on the first similarity and the second similarity, the following steps are performed: mapping the scoring result to a target score range; determining the amount of change in the adjustment parameter based on the scoring result and the adjustment direction, including: determining the amount of change in the adjustment parameter based on the mapped scoring result and the adjustment direction. The target score range is a pre-specified area, which can be set according to the target adjustment item in practice. Exemplarily, the target score range can be [0, 1], [-1, 1], or [0, 100], etc.
[0066] In the existing photo editing software, the value ranges of the adjustment parameters corresponding to different adjustable items are different, such as the value ranges of the adjustment parameters corresponding to some adjustable items are [0, 1], while the value ranges of the adjustment parameters corresponding to other adjustable items are [0, 100]. Moreover, for the same adjustable item, the value ranges of the adjustment parameters corresponding to the adjustable items set in different photo editing software may also be different. For example, the value range of the adjustment parameters corresponding to the adjustable items set in some photo editing software is [0, 1], while the value range of the adjustment parameters corresponding to the adjustable items set in other photo editing software is [0, 100]. In view of these situations, by setting the scoring results to be mapped to the target score interval, the image processing method provided by the present application can be organically connected with the existing photo editing software, and the electronic device can control different photo editing software to perform graphics processing with the help of the image processing method, and control the existing photo editing software to adjust multiple different adjustable items, which can further improve the intelligence of image processing.
[0067] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0068] For example, in response to receiving an active request from a user (the active request may be, for example, the adjustment instruction mentioned in this application), a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of this disclosure according to the prompt message.
[0069] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0070] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0071] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0072] Figure 2 Schematic diagram of the structure of an image processing device in an embodiment of the present disclosure. The image processing device provided in the embodiment of the present disclosure can be configured in a client or in a server. Figure 2 , the image processing device specifically comprises:
[0073] The acquisition module 210 is used to acquire the image to be processed and the adjustment instruction; the adjustment instruction includes the target adjustment item identification information and the adjustment direction;
[0074] A scoring module 220 is used to score the target adjustment item of the image to be processed to obtain a scoring result;
[0075] A determination module 230, configured to determine a change amount of an adjustment parameter based on the scoring result and the adjustment direction;
[0076] The adjustment module 240 is used to adjust the target adjustment item of the image to be processed based on the change amount of the adjustment parameter.
[0077] Furthermore, the scoring module 220 is used to:
[0078] Determining positive descriptive text information and negative descriptive text information corresponding to the target adjustment item;
[0079] Based on the positive description text information and the negative description text information, the target adjustment item of the image to be processed is scored to obtain a scoring result.
[0080] Furthermore, the scoring module 220 is used to:
[0081] Determine a first semantic vector corresponding to the positive description text information and a second semantic vector corresponding to the negative description text information;
[0082] Extracting image features from the image to be processed to obtain an image feature vector;
[0083] The scoring result is determined based on the first semantic vector, the second semantic vector, and the image feature vector.
[0084] Furthermore, the scoring module 220 is used to:
[0085] Calculating a first similarity between the first semantic vector and the image feature vector;
[0086] Calculating a second similarity between the second semantic vector and the image feature vector;
[0087] The scoring result is determined based on the first similarity and the second similarity.
[0088] Furthermore, the device further comprises a mapping module, which is used for mapping the scoring result into a target score range after determining the scoring result based on the first similarity and the second similarity;
[0089] The determination module 230 is used to determine the change amount of the adjustment parameter based on the mapped scoring result and the adjustment direction.
[0090] Further, the determination module 230 is used to:
[0091] determining a reference standard associated with the adjustment direction;
[0092] Based on the scoring result and the reference standard, the amount of change of the adjustment parameter is determined.
[0093] Further, the determination module 230 is used to:
[0094] determining a reference standard associated with the adjustment direction;
[0095] Based on the reference standard, determining an adjustment target value;
[0096] Based on the scoring result and the adjustment target value, the adjustment parameter change amount is determined.
[0097] The image processing device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image processing method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.
[0098] Figure 3 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 3, which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0099] like Figure 3 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the image processing method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0100] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Figure 3 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0101] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the image processing method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0102] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0103] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.
[0104] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0105] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0106] Acquire an image to be processed and an adjustment instruction; the adjustment instruction includes target adjustment item identification information and an adjustment direction;
[0107] Scoring the target adjustment item of the image to be processed to obtain a scoring result;
[0108] Determining a change amount of an adjustment parameter based on the scoring result and the adjustment direction;
[0109] Based on the change amount of the adjustment parameter, the target adjustment item of the image to be processed is adjusted.
[0110] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0111] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0114] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0117] one or more processors;
[0118] A memory for storing one or more programs;
[0119] When the one or more programs are executed by the one or more processors, the one or more processors implement any image processing method provided in the present disclosure.
[0120] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image processing method as described in any one of the present disclosure is implemented.
[0121] The embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the video processing method described above is implemented.
[0122] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0123] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that: include: Obtain images to be processed and adjustment instructions; The adjustment instruction includes target adjustment item identification information and adjustment direction; Scoring the target adjustment item of the image to be processed to obtain a scoring result; Determining a change amount of an adjustment parameter based on the scoring result and the adjustment direction; Based on the change amount of the adjustment parameter, the target adjustment item of the image to be processed is adjusted.
2. The method according to claim 1, characterized in that Scoring the target adjustment item of the image to be processed to obtain a scoring result includes: Determining positive descriptive text information and negative descriptive text information corresponding to the target adjustment item; Based on the positive description text information and the negative description text information, the target adjustment item of the image to be processed is scored to obtain a scoring result.
3. The method according to claim 2, characterized in that Scoring the target adjustment item of the image to be processed based on the positive description text information and the negative description text information to obtain a scoring result includes: Determine a first semantic vector corresponding to the positive description text information and a second semantic vector corresponding to the negative description text information; Extracting image features from the image to be processed to obtain an image feature vector; The scoring result is determined based on the first semantic vector, the second semantic vector, and the image feature vector.
4. The method according to claim 3, characterized in that The step of determining the scoring result based on the first semantic vector, the second semantic vector, and the image feature vector includes: Calculating a first similarity between the first semantic vector and the image feature vector; Calculating a second similarity between the second semantic vector and the image feature vector; The scoring result is determined based on the first similarity and the second similarity.
5. The method according to claim 1, characterized in that The step of scoring the target adjustment item of the image to be processed and obtaining the scoring result comprises: Mapping the scoring result to a target score range; The determining the change amount of the adjustment parameter based on the scoring result and the adjustment direction includes: Based on the mapped scoring result and the adjustment direction, the change amount of the adjustment parameter is determined.
6. The method according to claim 1, characterized in that The determining the change amount of the adjustment parameter based on the scoring result and the adjustment direction includes: determining a reference standard associated with the adjustment direction; Based on the scoring result and the reference standard, the amount of change of the adjustment parameter is determined.
7. The method according to claim 1, characterized in that The determining the change amount of the adjustment parameter based on the scoring result and the adjustment direction includes: determining a reference standard associated with the adjustment direction; Based on the reference standard, determining an adjustment target value; Based on the scoring result and the adjustment target value, the adjustment parameter change amount is determined.
8. An image processing device, characterized in that: include: An acquisition module, used to acquire images to be processed and adjustment instructions; The adjustment instruction includes target adjustment item identification information and adjustment direction; A scoring module, used for scoring the target adjustment items of the image to be processed to obtain a scoring result; A determination module, used to determine the change amount of the adjustment parameter based on the scoring result and the adjustment direction; An adjustment module is used to adjust the target adjustment item of the image to be processed based on the change amount of the adjustment parameter.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.