WO2024103649A1 - 图像颜色识别方法、图像推荐方法及装置 - Google Patents
图像颜色识别方法、图像推荐方法及装置 Download PDFInfo
- Publication number
- WO2024103649A1 WO2024103649A1 PCT/CN2023/092818 CN2023092818W WO2024103649A1 WO 2024103649 A1 WO2024103649 A1 WO 2024103649A1 CN 2023092818 W CN2023092818 W CN 2023092818W WO 2024103649 A1 WO2024103649 A1 WO 2024103649A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- color information
- information
- target
- color
- initial
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 239000003086 colorant Substances 0.000 claims abstract description 6
- 239000013598 vector Substances 0.000 claims description 38
- 239000011159 matrix material Substances 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 16
- 230000015654 memory Effects 0.000 claims description 15
- 238000006243 chemical reaction Methods 0.000 claims description 13
- 230000009466 transformation Effects 0.000 claims description 6
- 230000003993 interaction Effects 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 4
- 238000012545 processing Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 5
- 230000003936 working memory Effects 0.000 description 5
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000010267 cellular communication Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/7715—Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
Definitions
- the present disclosure relates to the field of computer technology, in particular to the field of image processing technology, and specifically to an image color recognition method, device, electronic device, computer-readable storage medium, and computer program product.
- Color features are a key component of image features and have important applications in fields such as image recommendation and image search.
- the present disclosure provides an image color recognition method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
- an image color recognition method comprising: acquiring initial color information of a first target image; determining weight information, wherein the weight information is at least used to indicate a target user's preference for color; and based on the weight information, determining target color information corresponding to the initial color information from a plurality of preset color information, wherein the target color information is used to characterize a standard color of the first target image corresponding to the plurality of preset color information.
- an image recommendation method comprising: determining recommended color information for a target user from a plurality of preset color information; using the image color recognition method as described above The method determines target color information of a second target image; and determines a recommendation strategy for the second target image based on the target color information and the recommended color information.
- an image color recognition device including: an acquisition unit, configured to acquire initial color information of a first target image; a first determination unit, configured to determine weight information, wherein the weight information is at least used to indicate a target user's preference for color; and a second determination unit, configured to determine target color information corresponding to the initial color information from a plurality of preset color information based on the weight information, wherein the target color information is used to characterize a standard color of the first target image corresponding to the plurality of preset color information.
- an image recommendation device comprising: a third determination unit, configured to determine recommended color information for a target user from a plurality of preset color information; the image color recognition device as described above, configured to determine target color information of a second target image; and a fourth determination unit, configured to determine a recommendation strategy for the second target image based on the target color information and the recommended color information.
- an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned image color recognition method or image recommendation method.
- a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the above-mentioned image color recognition method or image recommendation method.
- a computer program product including a computer program, wherein the computer program implements the above-mentioned image color recognition method or image recommendation method when executed by a processor.
- a user's preference for color may be taken into consideration when recognizing the color of an image.
- FIG1 shows a flow chart of an image color recognition method according to an exemplary embodiment of the present disclosure
- FIG2 shows a flow chart of an image color recognition method according to an exemplary embodiment of the present disclosure
- FIG3 shows a flow chart of an image recommendation method according to an exemplary embodiment of the present disclosure
- 4A-4B are schematic diagrams showing a second target image according to an exemplary embodiment of the present disclosure.
- FIG5 shows a structural block diagram of an image color recognition device according to an exemplary implementation of the present disclosure
- FIG6 shows a structural block diagram of an image recommendation device according to an exemplary embodiment of the present disclosure
- FIG. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
- first, second, etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element.
- first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
- a fixed formula is usually used to calculate the similarity between the color information to be identified in the image and multiple preset color information, so that the color information to be identified can be determined from the multiple preset color information.
- the target color information that matches the color information to be identified does not take into account the personalized preferences of different users for colors in different images. For example, when the similarity between the color information to be identified and the preset color information A and the preset color information B is relatively close, different users with different personalized preferences may identify different target color information.
- the present disclosure provides an image color recognition method, which combines the user's color preference to determine the target color information corresponding to the initial color information from multiple preset color information, so that the obtained target color information is more in line with the user's preference and improves the user experience.
- FIG1 shows a flow chart of an image color recognition method 100 according to an exemplary embodiment of the present disclosure. As shown in FIG1 , the method 100 includes:
- Step S110 obtaining initial color information of the first target image
- Step S120 determining weight information, where the weight information is at least used to indicate the target user's preference for color.
- Step S130 Based on the weight information, determine target color information corresponding to the initial color information from a plurality of preset color information, wherein the target color information is used to represent a standard color of the first target image corresponding to the plurality of preset color information.
- target color information corresponding to initial color information from multiple preset color information based on weight information that can indicate the user's preference for color
- the user's preference can be fully taken into account in the color recognition process to obtain target color information that meets the user's preference, thereby improving the user experience.
- the target color information is determined from multiple preset color information, so that the standardized preset color information can be used to more accurately characterize the color of the target image.
- the initial color information may be color parameter information in a preset standard format, such as RGB color value information, but is not limited thereto, and may also be CMYK color value information, HSV color value information, etc.
- the initial color information may be directly obtained, or may be obtained by preprocessing color parameter information in other formats.
- obtaining the initial color information of the first target image in step S110 includes: obtaining the color information to be identified of the first target image; and determining the initial color information based on the color information to be identified, wherein the initial color information is in the same format as the plurality of preset color information.
- the hexadecimal color information of the color to be identified in the first target image may be obtained by using a color picking tool software, and then the hexadecimal color information may be converted into RGB color value information by using a preset conversion formula.
- the plurality of preset color information is manually preconfigured, for example, the plurality of preset color information may be selected from an existing standard color information list (eg, a webcolors list in RGB format).
- an existing standard color information list eg, a webcolors list in RGB format.
- determining the target color information corresponding to the initial color information from the plurality of preset color information includes: determining the similarity between the initial color information and the plurality of preset color information based on the weight information; and determining the target color information corresponding to the initial color information from the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information.
- the Manhattan distance between the initial color information and each preset color information may be calculated based on the color parameters of the initial color information and the respective color parameters of the multiple preset color information to characterize the similarity between the two, but is not limited thereto.
- the similarity between the two may also be characterized by calculating the Euclidean distance.
- the plurality of preset color information may be sorted based on the similarity between the initial color information and the plurality of preset color information, and based on the sorting result, the preset color information having the highest similarity to the initial color information may be determined as the target color information.
- the similarity between the initial color and multiple preset color information may be determined first, and then the target color information may be determined from the multiple preset color information based on the weight information and the similarity between the initial color information and the multiple preset color information.
- the initial color information and the preset color information both include hue information for indicating the color hue
- the weight information includes first weight information for indicating the user's preference for the color hue
- the determining of the similarity between the initial color information and the plurality of preset color information based on the weight information includes: determining the similarity between the initial color information and the plurality of preset color information based on the hue information respectively included in the initial color information and the plurality of preset color information and the first weight information.
- the hue information includes information of multiple color components
- the first weight information includes sub-weight information corresponding to the information of the multiple color components
- determining the similarity between the initial color information and multiple preset color information includes: determining the similarity between the initial color information and multiple preset color information based on the information of multiple color components respectively included in the initial color information and the multiple preset color information and the sub-weight information.
- the target color information can be determined by utilizing the information of multiple color components that can indicate the color hue and the corresponding sub-weight information, so that the target color information can be determined in combination with the user's preference for color hue.
- the determining of the similarity between the initial color information and the plurality of preset color information based on the information of the plurality of color components respectively included in the initial color information and the plurality of preset color information and the sub-weight information comprises: determining the deviation between the plurality of color components of the initial color information and the plurality of color components respectively included in the plurality of preset color information; and determining the similarity between the initial color information and the plurality of preset color information based on the deviation and the sub-weight information.
- the color difference between the two can be intuitively characterized, and then the calculation is performed based on the difference and the first weight information to obtain the similarity between the initial color information and the plurality of preset color information that meets the user's preference for color tone.
- the deviation between the plurality of color components and the plurality of color components respectively included in the plurality of preset color information may be a difference between the two.
- the initial color information is RGB color value information.
- (i 1, 2, 3 ... n)
- the Manhattan distance is calculated based on the information of the three color components R, G, and B included in the initial color information and the preset color information, and the first weight corresponding to each color component is further combined to obtain the similarity between the initial color information and the plurality of preset color information.
- the similarity between the initial color information and the preset color information can also be obtained by other means, such as calculating the Euclidean distance, cosine distance, etc. between the two.
- the information of multiple color components for indicating color hue included in the color information and preset color information may also be in other forms, for example, it may be color components corresponding to CMYK color value information, and may also include hue components, color saturation components, color brightness components, etc.
- the weight information includes second weight information for indicating the target user's preference for the plurality of preset color information
- the determining the target color information corresponding to the initial color information from the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information includes: determining a plurality of candidate color information from the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information; and determining the target color information corresponding to the initial color information from the plurality of candidate color information based on the similarity between the initial color information and the plurality of candidate color information and the second weight information.
- the second weight information can be used to indicate the user's preference for the preset color information, and the target color information is determined based on this.
- the determining the target color information corresponding to the initial color information from the multiple candidate color information based on the similarity between the initial color information and the multiple candidate color information and the second weight information includes: determining the correlation between the multiple candidate color information and the initial color information based on the similarity between the initial color information and the multiple candidate color information and the second weight information corresponding to the multiple candidate color information; sorting the multiple candidate color information based on the correlation; and determining the target color information from the multiple candidate color information based on the sorting result.
- the determining of the correlation between the plurality of candidate color information and the initial color information includes: determining the correlation by multiplying the similarity between the initial color information and the plurality of candidate color information and the second weight information corresponding to the plurality of candidate color information.
- the correlation may also be determined by other methods, such as determining the correlation by multiplying the similarity between the initial color information and the plurality of candidate color information and the second weight information corresponding to the plurality of candidate color information, which is not limited thereto.
- the determining of a plurality of candidate color information from the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information comprises: sorting the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information; and determining a plurality of candidate color information from the plurality of preset color information based on the sorting result.
- a plurality of candidate color information that is relatively similar to the initial color information can be determined by similarity sorting to improve the accuracy of color recognition.
- the target color information is determined from the k candidate color information based on the product ( bi ⁇ Si ) of the similarity Si between each candidate color information Ci and the initial color information C0 and the corresponding second weight bi .
- the k second weights bi can indicate the user's preference for the k candidate color information with a higher similarity to the initial color information, and then the target color information is determined based on this.
- FIG2 shows a flow chart of an image color recognition method 200 according to an exemplary embodiment of the present disclosure. As shown in FIG2 , the method 200 includes:
- Step S201 obtaining initial color information of a first target image
- Step S202 determining weight information, wherein the weight information is used to indicate the target user's preference for color.
- the initial color information and the preset color information both include information of multiple color components indicating color hue
- the weight information includes first weight information corresponding to the information of the multiple color components and second weight information indicating the target user's preference for the multiple preset color information.
- Step S203 determining the similarity between the initial color information and the plurality of preset color information based on the information of the plurality of color components respectively included in the initial color information and the plurality of preset color information and the first weight information;
- Step S204 sorting the plurality of preset color information based on the similarity between the initial color information and the plurality of preset color information;
- Step S205 determining a plurality of candidate color information from the plurality of preset color information based on the sorting result
- Step S206 Determine target color information corresponding to the initial color information from the plurality of candidate color information based on the similarity between the initial color information and the plurality of candidate color information and the second weight information.
- the target color information corresponding to the initial color information can be determined by combining the user's preference for color tone and the user's preference for preset color information to obtain the target color information that meets the user's preference, thereby improving the user experience.
- determining the weight information in step S120 includes: obtaining sample color information and first initial weight information in the sample image; determining first predicted color information corresponding to the sample color information from multiple preset color information based on the sample color information and the first initial weight information; determining a first predicted probability that the target user clicks on the sample image after browsing the sample image based on the first predicted color information and the first user feature information of the target user; obtaining first real click information, the first real click information being used to indicate whether the target user clicks on the sample image after browsing the sample image; and adjusting the first initial weight information based on the first predicted probability and the first real click information to obtain the weight information.
- the real click information of the sample image by the target user can be used for supervised optimization, so that the predicted color information obtained based on the weight information can better meet the preferences of the target user, that is, the weight information can more accurately indicate the target user's preference for color.
- the weight information can be optimized using the target user's actual click information on multiple sample images to obtain weight information uniquely corresponding to the target user, so as to indicate the user's personalized preference for color.
- the first user characteristic information of the target user may include at least one of a user portrait of the target user, time information, location information, and historical interaction data of the target user, which is not limited to this.
- the prediction accuracy can be improved.
- the historical interaction data of the target user may include the user's browsing history information, historical order record information, etc., without limitation.
- the first predicted probability includes: inputting the first predicted color information and the first user feature information into a click prediction model to obtain the first predicted probability output by the click prediction model.
- determining the weight information in step S120 includes: obtaining the second user feature information and the second initial weight information of the sample user; determining the second predicted color information corresponding to the initial color information from a plurality of preset color information based on the initial color information and the second initial weight information; determining the second predicted probability that the sample user clicks the first target image after browsing the first target image based on the second predicted color information and the second user feature information; obtaining the second real click information, the second real click information being used to indicate whether the sample user clicks the first target image after browsing the first target image; and adjusting the second initial weight information based on the second predicted probability and the second real click information to obtain the weight information.
- the real click information of the sample user on the first target image can be used for supervised optimization, so that the weight information can more accurately indicate the user's preference for the color in the first target image.
- the weight information can be optimized using the actual click information of multiple sample users on the first target image to obtain the weight information uniquely corresponding to the first target image to indicate the user's preference for the color in the first target image.
- a click prediction model may be used to obtain a second predicted probability that a sample user clicks on the first target image to improve efficiency and accuracy.
- the weight information includes at least one of the first weight information and the second weight information as described above.
- FIG3 shows a flowchart of an image recommendation method 300 according to an exemplary embodiment of the present disclosure. As shown in FIG3 , the method 300 includes:
- Step S310 determining recommended color information for a target user from a plurality of preset color information
- Step S320 determining target color information of the target image using the image color recognition method 100.
- Step S330 Determine a recommendation strategy for the second target image based on the target color information and the recommended color information.
- a recommendation strategy can be determined based on specific recommended color information and target color information of the target image, so that the recommended image can better meet the user's preferences.
- the recommended color information can be determined based on an image display request actively sent by the target user. For example, when the image display request of the target user is "show a picture of red XX", it can be determined based on this that the recommended color information includes red. In this case, when the target color information of the target image is green, it can be determined that the strategy of not recommending the target image to the target user is not recommended.
- the recommended color information can also be manually configured, for example, it can be configured according to marketing needs in a business marketing scenario, and then the target image can be actively recommended to the target user based on this to meet the needs of actual application scenarios.
- step S330 includes: in response to determining that the target color information is the same as the recommended color information, determining a recommendation strategy to recommend the second target image to the target user.
- a recommendation strategy can be determined simply and quickly to recommend a target image that matches the recommended color information to the target user.
- multiple target color information of the target image is determined in step S320, and the method 300 further includes: obtaining ratio information corresponding to the multiple target colors in the target image; and wherein, based on the multiple target color information, the ratio information and the recommended color information, determining a recommendation strategy for the second target image.
- the ratio information can be further combined with the ratio information to determine the image recommendation strategy.
- determining a recommendation strategy for the second target image based on the multiple target color information, the ratio information, and the recommended color information may include: in response to determining that a certain target color information among the multiple target color information is the same as the recommended color information, and in response to determining that the ratio information corresponding to the target color information is not less than a preset threshold, determining a recommendation strategy to recommend the target image to the target user.
- FIG4A-FIG4B are schematic diagrams showing a second target image according to an exemplary embodiment of the present disclosure.
- the second target image shown in FIG4A and FIG4B includes multiple colors, and each color pair
- the image color recognition method 100 described above it is possible to determine the corresponding multiple target color information, and based on the multiple target color information and the corresponding ratio of each target color information, the color feature information of the second target image can be efficiently and accurately represented.
- the multiple preset color information can be encoded using a multi-hot encoding method, and the dimension of the feature vector corresponding to each preset color information is the same as the number of the multiple preset color information.
- the color feature vector of the second target image can be obtained based on the feature vectors corresponding to the k target color information C target-i and the corresponding scale information k i .
- the 6-dimensional feature vector corresponding to each preset color information is as shown in Table 2:
- the color feature information of the second target image shown in Table 1 can be represented as a color feature vector (0.3, 0.3, 0.4, 0, 0, 0). It can be seen that when the number of preset color information is large When the color feature vector obtained in this way is relatively sparse, the ability to express the color features of the image is limited, and the data processing efficiency is low.
- the steps described above may be used to obtain 6-dimensional color feature vectors of multiple target images as shown in Table 3.
- the recommended color information indicates multiple preset color information and its corresponding ratio information
- the determination of the recommendation strategy for the second target image based on the multiple target color information, the ratio information and the recommended color information includes: determining the values of multiple dimensions corresponding to the multiple preset color information based on the multiple target color information and the ratio information to obtain the initial feature vector of the second target image including multiple dimensions; determining the color feature vector of the second target image based on the initial feature vector and the conversion matrix, the dimension of the color feature vector is less than the dimension of the initial feature vector; determining the recommended feature vector based on the recommended color information; and determining the recommendation strategy for the second target image based on the color feature vector and the recommended feature vector.
- the initial feature vector can be reduced in dimension using the conversion matrix, so as to more efficiently use the color feature vector after dimensionality reduction to represent the color features of the second target image, and then the recommendation strategy for the second target image is determined based on the color feature vector of the second target image and the recommended feature vector corresponding to the recommended color information.
- the steps described above may be used to obtain a recommended feature vector based on a plurality of preset color information indicated by the recommended color information and their corresponding ratio information.
- the color feature vector of the second target image may be obtained by multiplying the initial feature vector by a transformation matrix.
- the conversion matrix is obtained by the following method: determining multiple first eigenvectors corresponding to the multiple target color information; determining multiple second eigenvectors corresponding to the multiple target color information based on the multiple first eigenvectors and the initial conversion matrix; determining at least one color information to be predicted from the multiple target color information; determining the conditional probability value of the at least one color information to be predicted for other target color information in the multiple target color information based on the multiple second eigenvectors; and adjusting the initial conversion matrix based on the conditional probability value to obtain the conversion matrix.
- the initial conversion matrix can be adjusted by a gradient descent method, and the conversion matrix is iteratively optimized for multiple rounds by repeatedly performing the above steps to obtain a more accurate conversion matrix, so as to more accurately map the high-dimensional initial eigenvector to a low-dimensional color eigenvector.
- the initial eigenvector can be reduced in dimension using the conversion matrix, which is more convenient and efficient.
- FIG5 shows a structural block diagram of an image color recognition device 500 according to an exemplary implementation of the present disclosure. As shown in FIG5 , the device 500 includes:
- An acquisition unit 510 is configured to acquire initial color information of a first target image
- a first determining unit 520 is configured to determine weight information, where the weight information is used to indicate the target user's preference for color;
- the second determination unit 530 is configured to determine target color information corresponding to the initial color information from a plurality of preset color information based on the weight information, wherein the target color information is used to represent a standard color of the first target image corresponding to the plurality of preset color information.
- FIG6 shows a structural block diagram of an image recommendation device 600 according to an exemplary embodiment of the present disclosure. As shown in FIG6 , the device 600 includes:
- the third determining unit 610 is configured to determine the recommended color information for the target user from the plurality of preset color information
- the image color recognition device 500 is configured to determine target color information of the second target image.
- the fourth determining unit 620 is configured to determine a recommendation strategy for the second target image based on the target color information and the recommended color information.
- the operations of the various units of the image recommendation device 600 are similar to the operations of steps S310 to S330 described above, and are not described in detail here.
- an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned image color recognition method or image recommendation method.
- a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the above-mentioned image color recognition method or image recommendation method.
- a computer program product including a computer program, wherein the computer program implements the above-mentioned image color recognition method or image recommendation method when executed by a processor.
- the electronic device 700 can be a computer device of different types, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers.
- the electronic device can also represent various forms of mobile devices, such as personal digital processing, a cellular phone, a smart phone, a wearable device, and other similar computing devices.
- the components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present disclosure described and/or required herein.
- FIG7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
- the electronic device 700 may include at least one processor 701, a working memory 702, an I/O device 704, a display device 705, a storage device 706, and a communication interface 707 that can communicate with each other through a system bus 703.
- Processor 701 may be a single processing unit or multiple processing units, all of which may include a single or multiple computing units or multiple cores.
- Processor 701 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, or the like.
- the processor 701 may be configured to obtain and execute computer-readable instructions stored in the working memory 702, the storage device 706 or other computer-readable media, such as the program code of the operating system 702a, the program code of the application 702b, etc.
- the working memory 702 and the storage device 706 are examples of computer-readable storage media for storing instructions, which are executed by the processor 701 to implement the various functions described above.
- the working memory 702 may include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.).
- the storage device 706 may include a hard disk drive, a solid-state drive, a removable medium, including external and removable drives, memory cards, flash memory, a floppy disk, an optical disk (e.g., CD, DVD), a storage array, a network attached storage, a storage area network, etc.
- the working memory 702 and the storage device 706 may all be collectively referred to herein as memory or computer-readable storage media, and may be a non-transitory medium capable of storing computer-readable, processor-executable program instructions as computer program code, which may be executed by the processor 701 as a specific machine configured to implement the operations and functions described in the examples herein.
- the I/O device 704 may include an input device and/or an output device.
- the input device may be any type of device capable of inputting information to the electronic device 700, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote controller.
- the output device may be any type of device capable of presenting information, and may include but is not limited to a video/audio output terminal, a vibrator, and/or a printer.
- the communication interface 707 allows the electronic device 700 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and/or a chipset, such as a BluetoothTM device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device and/or the like.
- the application 702b in the working register 702 can be loaded to execute the various methods and processes described above, such as steps S110 to S130 in FIG. 1.
- part or all of the computer program can be loaded and/or installed on the electronic device 700 via the storage device 706 and/or the communication interface 707.
- the computer program is loaded and executed by the processor 701, one or more steps of the image color recognition method or image recommendation method described above can be executed.
- Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), The various embodiments may be implemented in an application specific standard product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof.
- ASSP application specific standard product
- SOC system on a chip
- CPLD load programmable logic device
- computer hardware firmware, software, and/or a combination thereof.
- These various embodiments may include: being implemented in one or more computer programs, which may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
- a programmable processor which may be a dedicated or general-purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
- the program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram.
- the program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
- 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.
- RAM random access memory
- ROM read-only memory
- EPROM or flash memory erasable programmable read-only memory
- CD-ROM portable compact disk read-only memory
- CD-ROM compact disk read-only memory
- magnetic storage device or any suitable combination of the foregoing.
- the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer.
- a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
- a keyboard and pointing device e.g., a mouse or trackball
- Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
- the systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components.
- the components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
- a computing system may include clients and servers.
- Clients and servers are generally remote from each other and usually interact through a communication network.
- the relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Color Image Communication Systems (AREA)
Abstract
本公开提供了一种图像颜色识别方法、图像推荐方法及装置,涉及计算机技术领域,尤其涉及图像处理技术领域。实现方案为:获取第一目标图像的初始颜色信息;确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
Description
相关申请的交叉引用
本申请要求于2022年11月17日提交的中国专利申请202211460950.3的优先权,其全部内容通过引用整体结合在本申请中。
本公开涉及计算机技术领域,尤其涉及图像处理技术领域,具体涉及一种图像颜色识别方法、装置、电子设备、计算机可读存储介质和计算机程序产品。
颜色特征是图像特征的关键组成部分,在例如图像推荐、图像搜索等领域均有重要的应用。
在此部分中描述的方法不一定是之前已经设想到或采用的方法。除非另有指明,否则不应假定此部分中描述的任何方法仅因其包括在此部分中就被认为是现有技术。类似地,除非另有指明,否则此部分中提及的问题不应认为在任何现有技术中已被公认。
发明内容
本公开提供了一种图像颜色识别方法、装置、电子设备、计算机可读存储介质和计算机程序产品。
根据本公开的一方面,提供了一种图像颜色识别方法,包括:获取第一目标图像的初始颜色信息;确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
根据本公开的一方面,提供了一种图像推荐方法,包括:从多个预设颜色信息中确定针对目标用户的推荐颜色信息;利用如上所述的图像颜色识别
方法确定第二目标图像的目标颜色信息;以及基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
根据本公开的另一方面,提供了一种图像颜色识别装置,包括:获取单元,被配置为获取第一目标图像的初始颜色信息;第一确定单元,被配置为确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及第二确定单元,被配置为基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
根据本公开的另一方面,提供了一种图像推荐装置,包括:第三确定单元,被配置为从多个预设颜色信息中确定针对目标用户的推荐颜色信息;如上所述的图像颜色识别装置,被配置为确定第二目标图像的目标颜色信息;以及第四确定单元,被配置为基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
根据本公开的另一方面,提供了一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述图像颜色识别方法或图像推荐方法。
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行上述图像颜色识别方法或图像推荐方法。
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现上述图像颜色识别方法或图像推荐方法
根据本公开的一个或多个实施例,可以在识别图像颜色时考虑到用户对颜色的偏好。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图示例性地示出了实施例并且构成说明书的一部分,与说明书的文字描述一起用于讲解实施例的示例性实施方式。所示出的实施例仅出于例示的目的,并不限制权利要求的范围。在所有附图中,相同的附图标记指代类似但不一定相同的要素。
图1示出了根据本公开示例性实施例的图像颜色识别方法的流程图;
图2示出了根据本公开示例性实施例的图像颜色识别方法的流程图;
图3示出了根据本公开示例性实施例的图像推荐方法的流程图;
图4A-图4B示出了根据本公开示例性实施例的第二目标图像的示意图;
图5示出了根据本公开示例性实施的图像颜色识别装置的结构框图;
图6示出了根据本公开示例性实施例的图像推荐装置的结构框图;
图7示出了根据本公开实施例的电子设备的框图。
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
在本公开中,除非另有说明,否则使用术语“第一”、“第二”等来描述各种要素不意图限定这些要素的位置关系、时序关系或重要性关系,这种术语只是用于将一个元件与另一元件区分开。在一些示例中,第一要素和第二要素可以指向该要素的同一实例,而在某些情况下,基于上下文的描述,它们也可以指代不同实例。
在本公开中对各种所述示例的描述中所使用的术语只是为了描述特定示例的目的,而并非旨在进行限制。除非上下文另外明确地表明,如果不特意限定要素的数量,则该要素可以是一个也可以是多个。此外,本公开中所使用的术语“和/或”涵盖所列出的项目中的任何一个以及全部可能的组合方式。
相关技术中,通常是利用固定的公式来计算图像中待识别的颜色信息和多个预设颜色信息之间的相似度,从而能够从多个预设颜色信息中确定与该
待识别的颜色信息相匹配的目标颜色信息,这种方式未能考虑到不同用户对不同图像中颜色的个性化偏好。例如,当待识别的颜色信息与预设颜色信息A和预设颜色信息B之间的相似度较为接近时,具有不同的个性化喜好的不同用户可能会识别得到不同的目标颜色信息。
基于此,本公开提供了一种图像颜色识别方法,结合用户对颜色的喜好来从多个预设颜色信息中确定与初始颜色信息对应的目标颜色信息,能够使所得到的目标颜色信息更符合用户的喜好,提升用户体验。
以下将结合附图,详细描述本公开的实施例。
图1示出了根据本公开示例性实施例的图像颜色识别方法100的流程图。如图1所示,方法100包括:
步骤S110、获取第一目标图像的初始颜色信息;
步骤S120、确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及
步骤S130、基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
通过基于能够指示用户对颜色的喜好的权重信息来从多个预设颜色信息中确定与初始颜色信息对应的目标颜色信息,能够在颜色识别过程中充分考虑到用户的喜好,以得到符合用户偏好的目标颜色信息,从而提升用户体验,所述目标颜色信息是从多个预设颜色信息中确定的,从而能够利用标准化的预设颜色信息来更精确地表征目标图像的颜色。
在一些示例中,所述初始颜色信息可以是预设标准格式的颜色参数信息,例如RGB色值信息,但不限于此,例如也可以是CMYK色值信息、HSV色值信息等。
所述初始颜色信息可以是直接获取的,也可以是对其他格式的颜色参数信息进行预处理得到的。例如在一些实施例中,步骤S110中获取第一目标图像的初始颜色信息包括:获取所述第一目标图像的待识别颜色信息;以及基于所述待识别颜色信息,确定所述初始颜色信息,所述初始颜色信息与所述多个预设颜色信息格式相同。通过将图像的原始待识别颜色信息转换为具有与预设颜色信息相同的预设标准格式的的初始颜色信息,能够更加便捷地
从多个预设颜色信息中确定与初始颜色信息对应的目标颜色信息。在一个示例中,可以是利用取色工具软件得到第一目标图像中待识别颜色的十六进制颜色信息,再利用预设转换公式将该十六进制颜色信息转换为RGB色值信息。
在一些示例中,多个预设颜色信息是由人工预先配置的,例如,可以是从已有的标准颜色信息列表(例如RGB格式的webcolors列表)中选取多个预设颜色信息。
根据一些实施例,步骤S130中基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度;以及基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息。由此,能够利用相似度来从多个预设颜色信息中确定目标颜色信息,更加简捷准确。
在一些示例中,可以是基于初始颜色信息和多个预设颜色信息各自的颜色参数,计算初始颜色信息与每个预设颜色信息之间的曼哈顿距离,以表征二者间的相似度,但不限于此,例如,也可以是通过计算欧氏距离来表征二者间的相似度。
在一些示例中,可以是基于初始颜色信息与多个预设颜色信息之间的相似度,对多个预设颜色信息进行排序,并基于排序结果,将与初始颜色信息相似度最高的预设颜色信息确定为目标颜色信息。
在一些示例中,也可以是先确定所述初始颜色与多个预设颜色信息之间的相似度,再基于权重信息和初始颜色信息与多个预设颜色信息之间的相似度,从多个预设颜色信息中确定目标颜色信息。
根据一些实施例,所述初始颜色信息和预设颜色信息均包括用于指示颜色色调的色调信息,所述权重信息包括用于指示用户对颜色色调喜好的第一权重信息,所述基于所述权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:基于所述初始颜色信息和多个预设颜色信息分别包括的色调信息以及所述第一权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。由此,通过基于色调信息和指示用户对颜色色调喜好的第一权重信息来确定初始颜色信息和预设颜色信息之间的相似度,能够表
征用户对颜色色调的偏好,从而能够结合用户对颜色色调的偏好来确定目标颜色信息。根据一些实施例,所述色调信息包括多个颜色分量的信息,所述第一权重信息包括与所述多个颜色分量的信息对应的子权重信息,并且其中,所述基于所述第一权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:基于所述初始颜色信息和多个预设颜色信息分别包括的多个颜色分量的信息以及所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。由此,能够利用能够指示颜色色调的多个颜色分量的信息及相应的子权重信息来确定,从而能够结合用户对颜色色调的偏好来确定目标颜色信息。
根据一些实施例,所述基于所述初始颜色信息和多个预设颜色信息分别包括的多个颜色分量的信息以及所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:确定所述初始颜色信息的多个颜色分量与所述多个预设颜色信息分别包括的多个颜色分量的偏差;以及基于所述偏差和所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。通过计算初始颜色信息和预设颜色信息各自包括的多个颜色分量相应的偏差,能够直观地表征二者间的颜色差异,再基于所述差值和所述第一权重信息进行计算,以得到符合用户对颜色色调的偏好的初始颜色信息与多个预设颜色信息之间的相似度。
在一些示例中,所述多个颜色分量与所述多个预设颜色信息分别包括的多个颜色分量的偏差可以是二者间的差值。
在一个示例中,所述初始颜色信息为RGB色值信息,当初始颜色信息C0为[R0,G0,B0],n个预设颜色信息Ci(i=1,2,3……n)为[Ri,Gi,Bi]时,则可以确定与R,G,B三个颜色分量分别对应的第一权重a1,a2,a3,进而利用如下公式来计算初始颜色信息与n个预设颜色信息的相似度Si:
Si=a1×|Ri-R0|+a2×|Gi-G0|+a3×|Bi-B0|(i=1,2,3……n)
Si=a1×|Ri-R0|+a2×|Gi-G0|+a3×|Bi-B0|(i=1,2,3……n)
上述示例中,是基于初始颜色信息和预设颜色信息各自包括的R,G,B三个颜色分量的信息,进一步结合每个颜色分量对应的第一权重来计算其曼哈顿距离,以得到初始颜色信息与多个预设颜色信息之间的相似度。在一些示例中,也可以是通过其他方式得到初始颜色信息和预设颜色信息之间的相似度,例如计算二者之间的欧氏距离、余弦距离等。在一些示例中,初始颜
色信息和预设颜色信息所包括的用于指示颜色色调的多个颜色分量的信息也可以是其他形式的,例如可以是对应于CMYK色值信息的颜色分量,还可以包括色调分量、色饱和度分量和色亮度分量等。
根据一些实施例,所述权重信息包括用于指示目标用户对所述多个预设颜色信息的喜好的第二权重信息,所述基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定多个候选颜色信息;以及基于所述初始颜色信息与多个候选颜色信息之间的相似度和所述第二权重信息,从所述多个候选颜色信息中确定与所述初始颜色信息对应的目标颜色信息。由此,能够利用第二权重信息来指示用户对预设颜色信息的偏好,基于此确定目标颜色信息。
根据一些实施例,所述基于所述初始颜色信息与多个候选颜色信息之间的相似度和所述第二权重信息,从所述多个候选颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述初始颜色信息与多个候选颜色信息之间的相似度和与所述多个候选颜色信息对应的第二权重信息,确定所述多个候选颜色信息与所述初始颜色信息的相关度;基于所述相关度,对所述多个候选颜色信息进行排序;以及基于所述排序结果,从所述多个候选颜色信息中确定所述目标颜色信息。由此,通过对每个候选颜色信息与初始颜色信息的相似度与相应的第二权重信息的乘积结果进行排序来确定目标颜色信息,能够简捷准确地从候选颜色信息中确定符合用户偏好的目标颜色信息。
在一个示例中,所述确定所述多个候选颜色信息与所述初始颜色信息的相关度包括:将所述初始颜色信息与多个候选颜色信息之间的相似度和与所述多个候选颜色信息对应的第二权重信息的乘积结果确定为所述相关度。示例性地,也可以利用其他方式确定所述相关度,例如将所述初始颜色信息与多个候选颜色信息之间的相似度和与所述多个候选颜色信息对应的第二权重信息的乘幂确定为所述相关度,对此不作限定。
在一个示例中,可以确定与n个预设颜色信息Ci(i=1,2,3……n)分别对应的第二权重bi(i=1,2,3……n),在已经得到k个候选颜色信息Ci(i=1,2,
3……k)以及初始颜色信息C0与k个预设颜色信息Ci的相似度Si的情况下,则可以基于每个候选颜色信息Ci与初始颜色信息C0的相似度Si与相应的第二权重bi的乘积(bi×Si)来从k个候选颜色信息中确定目标颜色信息,例如通过对k个乘积结果(bi×Si)进行排序,并将排位最高的候选颜色信息确定为目标颜色信息,从而能够结合用户对预设颜色信息的偏好来确定目标颜色信息。
根据一些实施例,所述基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定多个候选颜色信息包括:基于所述初始颜色信息与多个预设颜色信息之间的相似度,对所述多个预设颜色信息进行排序;以及基于所述排序结果,从所述多个预设颜色信息中确定多个候选颜色信息。由此,能够通过相似度排序来确定与初始颜色信息较为相似的多个候选颜色信息,以提升颜色识别的准确度。
在一个示例中,当基于排序结果从多个预设颜色信息中确定顺序排列的k个候选颜色信息Ci(i=1,2,3……k)时,可以获取顺序排列的k个第二权重bi(i=1,2,3……k),进而基于每个候选颜色信息Ci与初始颜色信息C0的相似度Si与相应的第二权重bi的乘积(bi×Si)来从k个候选颜色信息中确定目标颜色信息。在这种情况下,k个第二权重bi能够指示用户对与初始颜色信息相似度较高的k个候选颜色信息的喜好,进而基于此确定目标颜色信息。
图2示出了根据本公开示例性实施例的图像颜色识别方法200的流程图。如图2所示,方法200包括:
步骤S201、获取第一目标图像的初始颜色信息;
步骤S202、确定权重信息,所述权重信息用于指示目标用户对颜色的喜好,在这一示例中,所述初始颜色信息和预设颜色信息均包括用于指示颜色色调的多个颜色分量的信息,所述权重信息包括与所述多个颜色分量的信息对应的第一权重信息和用于指示目标用户对所述多个预设颜色信息的喜好的第二权重信息;
步骤S203、基于所述初始颜色信息和多个预设颜色信息分别包括的多个颜色分量的信息以及第一权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度;
步骤S204、基于所述初始颜色信息与多个预设颜色信息之间的相似度,对所述多个预设颜色信息进行排序;
步骤S205、基于所述排序结果,从所述多个预设颜色信息中确定多个候选颜色信息;
步骤S206、基于所述初始颜色信息与多个候选颜色信息之间的相似度和所述第二权重信息,从所述多个候选颜色信息中确定与所述初始颜色信息对应的目标颜色信息。
通过利用上述方法200,能够结合用户对颜色色调的偏好和用户对预设颜色信息的偏好确定与初始颜色信息对应的目标颜色信息,以得到符合用户偏好的目标颜色信息,从而提升用户体验。
根据一些实施例,步骤S120中确定权重信息包括:获取样本图像中的样本颜色信息和第一初始权重信息;基于所述样本颜色信息和第一初始权重信息,从多个预设颜色信息中确定与所述样本颜色信息对应的第一预测颜色信息;基于所述第一预测颜色信息和目标用户的第一用户特征信息,确定所述目标用户浏览所述样本图像后点击所述样本图像的第一预测概率;获取第一真实点击信息,所述第一真实点击信息用于指示目标用户浏览所述样本图像后是否点击所述样本图像;以及基于所述第一预测概率和所述第一真实点击信息,调整所述第一初始权重信息,以得到所述权重信息。由此,能够利用目标用户对样本图像的真实点击信息进行有监督的优化,以使得基于所述权重信息得到的预测颜色信息能够更符合目标用户的喜好,即使得所述权重信息能够更准确地指示目标用户对颜色的喜好。
在上述示例中,可以利用目标用户对多个样本图像的真实点击信息来优化权重信息,以得到与该目标用户唯一对应的权重信息,以指示该用户对颜色的个性化喜好。
根据一些实施例,目标用户的第一用户特征信息可以包括目标用户的用户画像、时间信息、位置信息和目标用户的历史交互数据中的至少一者,对此不作限定。通过利用丰富的用户特征信息来进行点击预测,能够提升预测准确性。
在一些示例中,目标用户的历史交互数据可以包括用户的浏览记录信息、历史订单记录信息等,对此不作限定。
根据一些实施例,所述基于所述第一预测颜色信息和目标用户的第一用户特征信息,确定所述目标用户浏览所述样本图像后点击所述第一目标图像
的第一预测概率包括:将所述第一预测颜色信息和第一用户特征信息输入点击预测模型,以获取所述点击预测模型所输出的第一预测概率。由此,能够利用神经网络模型高效准确地确定所述目标用户点击样本图像的第一预测概率。
在实际应用场景中,存在以下可能:图像中的其他颜色信息能够影响用户对初始颜色信息的识别结果,也就是说,用户对不同图像中的颜色具有不同的喜好。
基于此,根据一些实施例,步骤S120中确定权重信息包括:获取样本用户的第二用户特征信息和第二初始权重信息;基于所述初始颜色信息和第二初始权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的第二预测颜色信息;基于所述第二预测颜色信息和第二用户特征信息,确定所述样本用户浏览所述第一目标图像后点击所述第一目标图像的第二预测概率;获取第二真实点击信息,所述第二真实点击信息用于指示样本用户浏览所述第一目标图像后是否点击所述第一目标图像;以及基于所述第二预测概率和所述第二真实点击信息,调整所述第二初始权重信息,以得到所述权重信息。由此,能够利用样本用户对第一目标图像的真实点击信息进行有监督的优化,以使得所述权重信息能够更准确地指示用户对第一目标图像中的颜色的喜好。
在上述示例中,可以利用多个样本用户对第一目标图像的真实点击信息来优化权重信息,以得到与该第一目标图像唯一对应的权重信息,以指示用户对该第一目标图像中颜色的喜好。
在一些示例中,可以利用点击预测模型得到样本用户点击第一目标图像的第二预测概率,以提升效率和准确度。
在一些示例中,所述权重信息包括如前文所描述的第一权重信息和第二权重信息中的至少一者。
根据本公开的另一方面,还提供一种图像推荐方法。图3示出了根据本公开示例性实施例的图像推荐方法300的流程图,如图3所示,方法300包括:
步骤S310、从多个预设颜色信息中确定针对目标用户的推荐颜色信息;
步骤S320、利用图像颜色识别方法100确定目标图像的目标颜色信息;以及
步骤S330、基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
由此,能够基于特定的推荐颜色信息与目标图像的目标颜色信息来确定推荐策略,以使得所推荐的图像能够更符合用户的喜好。
在一些示例中,所述推荐颜色信息可以是基于目标用户主动发送的图像展示请求来确定的,例如,当目标用户的图像展示请求为“展示一张红色XX的图片”时,即可基于此确定推荐颜色信息包括红色,在这种情况下,当目标图像的目标颜色信息为绿色时,即可确定不向该目标用户推荐该目标图像的策略。所述推荐颜色信息也可以是由人工配置的,例如可以是在商务营销场景中根据营销需求来配置,进而能够基于此向目标用户主动推荐该目标图像,满足实际应用场景的需求。
根据一些实施例,步骤S330包括:响应于确定所述目标颜色信息与所述推荐颜色信息相同,确定推荐策略以向所述目标用户推荐所述第二目标图像。由此,能够简便快捷地确定推荐策略,以向目标用户推荐符合推荐颜色信息的目标图像。
根据一些实施例,在步骤S320中确定所述目标图像的多个目标颜色信息,并且方法300还包括:获取所述目标图像中所述多个目标颜色对应的比例信息;并且其中,基于所述多个目标颜色信息、所述比例信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。由此,能够在第二目标图像包括多个目标颜色信息的情况下,进一步结合比例信息来确定图像推荐策略。
在一些示例中,所述基于所述多个目标颜色信息、所述比例信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略可以包括:响应于确定所述多个目标颜色信息中的某一目标颜色信息与所述推荐颜色信息相同,并且响应于确定该目标颜色信息对应的比例信息不小于预设阈值,确定推荐策略以向所述目标用户推荐所述目标图像。
图4A-图4B示出了根据本公开示例性实施例的第二目标图像的示意图。图4A和图4B所示出的第二目标图像中均包含多个颜色,并且每个颜色对
应不同的比例。通过利用如前文所描述的图像颜色识别方法100对多个颜色信息进行识别,能够确定相应的多个目标颜色信息,基于多个目标颜色信息及每个目标颜色信息对应的比例,即可高效准确地表征第二目标图像的颜色特征信息。
在一些示例中,所述第二目标图像包含k个颜色信息Cinitial-i(i=1,2,3……k),基于此可以得到第二目标图像的颜色特征信息,其中包含k个目标颜色信息Ctarget-i和相应的比例信息ki(i=1,2,3……k)。
例如,当k为3,Ctarget-1、Ctarget-2和Ctarget-3分别为颜色A、颜色B和颜色C时,即可得到如表1所述的颜色特征信息:
表1
在这种情况下,可以利用多热编码方式对多个预设颜色信息进行编码,每个预设颜色信息对应的特征向量的维数与所述多个预设颜色信息的数量相同。由此,即可基于k个目标颜色信息Ctarget-i各自对应的特征向量和相应的比例信息ki得到第二目标图像的颜色特征向量。
在一个示例中,当多个预设颜色信息包括颜色A、颜色B、颜色C、颜色D、颜色E和颜色F时,每个预设颜色信息对应的6维特征向量如表2所示:
表2
在这一示例中,表1所示出的第二目标图像的颜色特征信息可以表征为颜色特征向量(0.3,0.3,0.4,0,0,0)。可以看出,当预设颜色信息的数量较多
时,这种方式得到的颜色特征向量较为稀疏,对图像颜色特征的表达能力有限,并且数据处理效率较低。
在一些示例中,可以利用上文所描述的步骤得到如表3所示的多个目标图像的6维颜色特征向量。
表3
基于此,可以利用embedding(嵌入层)将上述的高维颜色特征向量映射至低维空间中,从而使得低维空间中的低维向量能够表征原始的高维向量空间中的颜色特征。根据一些实施例,所述推荐颜色信息指示多个预设颜色信息及其对应的比例信息,所述基于所述多个目标颜色信息、所述比例信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略包括:基于所述多个目标颜色信息和所述比例信息,确定与多个预设颜色信息对应的多个维度的数值,以得到所述第二目标图像的包括多个维度的初始特征向量;基于所述初始特征向量和转换矩阵,确定所述第二目标图像的颜色特征向量,所述颜色特征向量的维数小于所述初始特征向量的维数;基于所述推荐颜色信息,确定推荐特征向量;以及基于所述颜色特征向量和所述推荐特征向量,确定针对所述第二目标图像的推荐策略。由此,能够利用转换矩阵对初始特征向量进行降维,以更高效地利用降维后的颜色特征向量表征第二目标图像的颜色特征,进而基于第二目标图像的颜色特征向量与推荐颜色信息相应的推荐特征向量来确定针对第二目标图像的推荐策略。
在一些示例中,可以是利用如上所述的步骤,基于推荐颜色信息指示的多个预设颜色信息及其对应的比例信息来得到推荐特征向量。
在一些示例中,可以是通过将所述初始特征向量与转换矩阵相乘来得到第二目标图像的颜色特征向量。
根据一些实施例,所述转换矩阵是利用如下方法得到的:确定所述多个目标颜色信息对应的多个第一特征向量;基于所述多个第一特征向量和初始转换矩阵,确定所述多个目标颜色信息对应的多个第二特征向量;从所述多个目标颜色信息中确定至少一个待预测颜色信息;基于所述多个第二特征向量,确定所述至少一个待预测颜色信息对所述多个目标颜色信息中其他目标颜色信息的条件概率值;以及基于所述条件概率值,调整所述初始转换矩阵,以得到转换矩阵。在一些示例中,可以是通过梯度下降的方法来调整所述初始转换矩阵,通过重复执行上述步骤来对转换矩阵进行多轮迭代优化,以得到更准确的转换矩阵,以更准确地将高维的初始特征向量映射为低维颜色特征向量。由此,能够利用转换矩阵对初始特征向量进行降维,更加简便高效。
在一些示例中,可以是将多个第二特征向量进行连乘以得到所述条件概率值,进而通过调整所述转换矩阵而使得所述条件概率值尽量大,即使得利用该转换矩阵进行降维得到的颜色特征向量能够更准确地拟合初始特征向量的分布特征,提升降维后的颜色特征向量的准确度。根据本公开的另一方面,还提供一种图像颜色识别装置。图5示出了根据本公开示例性实施的图像颜色识别装置500的结构框图。如图5所示,装置500包括:
获取单元510,被配置为获取第一目标图像的初始颜色信息;
第一确定单元520,被配置为确定权重信息,所述权重信息用于指示目标用户对颜色的喜好;以及
第二确定单元530,被配置为基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
图像颜色识别装置500的各个单元的操作与前面描述的步骤S110-步骤S130的操作类似,在此不做赘述。
根据本公开的另一方面,还提供一种图像推荐装置。图6示出了根据本公开示例性实施例的图像推荐装置600的结构框图。如图6所示,装置600包括:
第三确定单元610,被配置为从多个预设颜色信息中确定针对目标用户的推荐颜色信息;
图像颜色识别装置500,被配置为确定第二目标图像的目标颜色信息;以及
第四确定单元620,被配置为基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
图像推荐装置600的各个单元的操作与前面描述的步骤S310-步骤S330的操作类似,在此不做赘述。
根据本公开的另一方面,还提供一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的图像颜色识别方法或图像推荐方法。
根据本公开的另一方面,还提供一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行上述的图像颜色识别方法或图像推荐方法。
根据本公开的另一方面,还提供一种计算机程序产品,包括计算机程序,其中,所述计算机程序再被处理器执行时实现上述的图像颜色识别方法或图像推荐方法。
参见图7,现将描述可以作为本公开的电子设备700的结构框图,其是可以应用于本公开的各方面的硬件设备的示例。电子设备可以是不同类型的计算机设备,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
图7示出了根据本公开实施例的电子设备的框图。如图7所示,电子设备700可以包括能够通过系统总线703彼此通信的至少一个处理器701、工作存储器702、I/O设备704、显示设备705、存储装置706和通信接口707。
处理器701可以是单个处理单元或多个处理单元,所有处理单元可以包括单个或多个计算单元或者多个核心。处理器701可以被实施成一个或更多微处理器、微型计算机、微控制器、数字信号处理器、中央处理单元、状态
机、逻辑电路和/或基于操作指令来操纵信号的任何设备。处理器701可以被配置成获取并且执行存储在工作存储器702、存储装置706或者其他计算机可读介质中的计算机可读指令,诸如操作系统702a的程序代码、应用程序702b的程序代码等。
工作存储器702和存储装置706是用于存储指令的计算机可读存储介质的示例,指令由处理器701执行来实施前面所描述的各种功能。工作存储器702可以包括易失性存储器和非易失性存储器二者(例如RAM、ROM等等)。此外,存储装置706可以包括硬盘驱动器、固态驱动器、可移除介质、包括外部和可移除驱动器、存储器卡、闪存、软盘、光盘(例如CD、DVD)、存储阵列、网络附属存储、存储区域网等等。工作存储器702和存储装置706在本文中都可以被统称为存储器或计算机可读存储介质,并且可以是能够把计算机可读、处理器可执行程序指令存储为计算机程序代码的非暂态介质,计算机程序代码可以由处理器701作为被配置成实施在本文的示例中所描述的操作和功能的特定机器来执行。
I/O设备704可以包括输入设备和/或输出设备,输入设备可以是能向电子设备700输入信息的任何类型的设备,可以包括但不限于鼠标、键盘、触摸屏、轨迹板、轨迹球、操作杆、麦克风和/或遥控器。输出设备可以是能呈现信息的任何类型的设备,并且可以包括但不限于包括视频/音频输出终端、振动器和/或打印机。
通信接口707允许电子设备700通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据,并且可以包括但不限于调制解调器、网卡、红外通信设备、无线通信收发机和/或芯片组,例如蓝牙TM设备、802.11设备、WiFi设备、WiMax设备、蜂窝通信设备和/或类似物。
工作寄存器702中的应用程序702b可以被加载执行上文所描述的各个方法和处理,例如图1中的步骤S110-步骤S130。在一些实施例中,计算机程序的部分或者全部可以经由存储装置706和/或通信接口707而被载入和/或安装到电子设备700上。当计算机程序被加载并由处理器701执行时,可以执行上文描述的图像颜色识别方法或图像推荐方法的一个或多个步骤。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、
专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示设备(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行、也可以顺序地或以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
虽然已经参照附图描述了本公开的实施例或示例,但应理解,上述的方法、系统和设备仅仅是示例性的实施例或示例,本发明的范围并不由这些实施例或示例限制,而是仅由授权后的权利要求书及其等同范围来限定。实施例或示例中的各种要素可以被省略或者可由其等同要素替代。此外,可以通过不同于本公开中描述的次序来执行各步骤。进一步地,可以以各种方式组合实施例或示例中的各种要素。重要的是随着技术的演进,在此描述的很多要素可以由本公开之后出现的等同要素进行替换。
Claims (22)
- 一种图像颜色识别方法,包括:获取第一目标图像的初始颜色信息;确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
- 如权利要求1所述的方法,其中,所述基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度;以及基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息。
- 如权利要求2所述的方法,其中,所述初始颜色信息和预设颜色信息均包括用于指示颜色色调的色调信息,所述权重信息包括用于指示用户对颜色色调喜好的第一权重信息,所述基于所述权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:基于所述初始颜色信息和多个预设颜色信息分别包括的色调信息以及所述第一权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。
- 如权利要求3所述的方法,其中,所述色调信息包括多个颜色分量的信息,所述第一权重信息包括与所述多个颜色分量的信息对应的子权重信息,并且其中,所述基于所述权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:基于所述初始颜色信息和多个预设颜色信息分别包括的多个颜色分量的信息以及所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。
- 如权利要求4所述的方法,其中,所述基于所述初始颜色信息和多个预设颜色信息分别包括的多个颜色分量的信息以及所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度包括:确定所述初始颜色信息的多个颜色分量与所述多个预设颜色信息分别包括的多个颜色分量的偏差;以及基于所述偏差和所述子权重信息,确定所述初始颜色信息与多个预设颜色信息之间的相似度。
- 如权利要求2所述的方法,其中,所述权重信息包括用于指示目标用户对所述多个预设颜色信息的喜好的第二权重信息,所述基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述初始颜色信息与多个预设颜色信息之间的相似度,从所述多个预设颜色信息中确定多个候选颜色信息;以及基于所述初始颜色信息与多个候选颜色信息之间的相似度和所述第二权重信息,从所述多个候选颜色信息中确定与所述初始颜色信息对应的目标颜色信息。
- 如权利要求6所述的方法,其中,所述基于所述初始颜色信息与多个候选颜色信息之间的相似度和所述第二权重信息,从所述多个候选颜色信息中确定与所述初始颜色信息对应的目标颜色信息包括:基于所述初始颜色信息与多个候选颜色信息之间的相似度和与所述多个候选颜色信息对应的第二权重信息,确定所述多个候选颜色信息与所述初始颜色信息的相关度;基于所述相关度,对所述多个候选颜色信息进行排序;以及基于所述排序结果,从所述多个候选颜色信息中确定所述目标颜色信息。
- 如权利要求1所述的方法,其中,所述获取第一目标图像的初始颜色信息包括:获取所述第一目标图像的待识别颜色信息;以及基于所述待识别颜色信息,确定所述初始颜色信息,所述初始颜色信息与所述多个预设颜色信息格式相同。
- 如权利要求1-8中任一项所述的方法,其中,所述确定权重信息包括:获取样本图像中的样本颜色信息和第一初始权重信息;基于所述样本颜色信息和第一初始权重信息,从多个预设颜色信息中确定与所述样本颜色信息对应的第一预测颜色信息;基于所述第一预测颜色信息和目标用户的第一用户特征信息,确定所述目标用户浏览所述样本图像后点击所述样本图像的第一预测概率;获取第一真实点击信息,所述第一真实点击信息用于指示目标用户浏览所述样本图像后是否点击所述样本图像;以及基于所述第一预测概率和所述第一真实点击信息,调整所述第一初始权重信息,以得到所述权重信息。
- 如权利要求9所述的方法,其中,所述基于所述第一预测颜色信息和目标用户的第一用户特征信息,确定所述目标用户浏览所述样本图像后点击所述第一目标图像的第一预测概率包括:将所述第一预测颜色信息和所述第一用户特征信息输入点击预测模型,以获取所述点击预测模型所输出的第一预测概率。
- 如权利要求9所述的方法,其中,所述第一用户特征信息包括用户画像、时间信息、位置信息和用户的历史交互数据中的至少一者。
- 如权利要求1-8中任一项所述的方法,其中,所述确定权重信息包括:获取样本用户的第二用户特征信息和第二初始权重信息;基于所述初始颜色信息和第二初始权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的第二预测颜色信息;基于所述第二预测颜色信息和所述第二用户特征信息,确定所述样本用户浏览所述第一目标图像后点击所述第一目标图像的第二预测概率;获取第二真实点击信息,所述第二真实点击信息用于指示样本用户浏览所述第一目标图像后是否点击所述第一目标图像;以及基于所述第二预测概率和所述第二真实点击信息,调整所述第二初始权重信息,以得到所述权重信息。
- 一种图像推荐方法,包括:从多个预设颜色信息中确定针对目标用户的推荐颜色信息;利用权利要求1-12中任一项所述的方法确定第二目标图像的目标颜色信息;以及基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
- 如权利要求13所述的方法,其中,所述确定针对所述第二目标图像的推荐策略包括:响应于确定所述目标颜色信息与所述推荐颜色信息相同,确定推荐策略以向所述目标用户推荐所述第二目标图像。
- 如权利要求13所述的方法,其中,确定所述第二目标图像的多个目标颜色信息,所述方法还包括:获取所述第二目标图像中所述多个目标颜色对应的比例信息;并且其中,基于所述多个目标颜色信息、所述比例信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
- 如权利要求15所述的方法,其中,所述推荐颜色信息指示多个预设颜色信息及其对应的比例信息,所述基于所述多个目标颜色信息、所述比例信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略包括:基于所述多个目标颜色信息和所述比例信息,确定与多个预设颜色信息对应的多个维度的数值,以得到所述第二目标图像的包括多个维度的初始特征向量;基于所述初始特征向量和转换矩阵,确定所述第二目标图像的颜色特征向量,所述颜色特征向量的维数小于所述初始特征向量的维数;基于所述推荐颜色信息,确定推荐特征向量;以及基于所述颜色特征向量和所述推荐特征向量,确定针对所述第二目标图像的推荐策略。
- 如权利要求16所述的方法,其中,所述转换矩阵是利用如下方法得到的:确定所述多个目标颜色信息对应的多个第一特征向量;基于所述多个第一特征向量和初始转换矩阵,确定所述多个目标颜色信息对应的多个第二特征向量;从所述多个目标颜色信息中确定至少一个待预测颜色信息;基于所述多个第二特征向量,确定所述至少一个待预测颜色信息对所述多个目标颜色信息中其他目标颜色信息的条件概率值;以及基于所述条件概率值,调整所述初始转换矩阵,以得到所述转换矩阵。
- 一种图像颜色识别装置,包括:获取单元,被配置为获取第一目标图像的初始颜色信息;第一确定单元,被配置为确定权重信息,所述权重信息至少用于指示目标用户对颜色的喜好;以及第二确定单元,被配置为基于所述权重信息,从多个预设颜色信息中确定与所述初始颜色信息对应的目标颜色信息,所述目标颜色信息用于表征所述第一目标图像的对应所述多个预设颜色信息的标准颜色。
- 一种图像推荐装置,包括:第三确定单元,被配置为从多个预设颜色信息中确定针对目标用户的推荐颜色信息;如权利要求18所述的装置,被配置为确定第二目标图像的目标颜色信息;以及第四确定单元,被配置为基于所述目标颜色信息和所述推荐颜色信息,确定针对所述第二目标图像的推荐策略。
- 一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-17中任一项所述的方法。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1-17中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现权利要求1-17中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211460950.3A CN118053001A (zh) | 2022-11-17 | 2022-11-17 | 图像颜色识别方法、图像推荐方法及装置 |
CN202211460950.3 | 2022-11-17 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024103649A1 true WO2024103649A1 (zh) | 2024-05-23 |
Family
ID=91052699
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/092818 WO2024103649A1 (zh) | 2022-11-17 | 2023-05-08 | 图像颜色识别方法、图像推荐方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118053001A (zh) |
WO (1) | WO2024103649A1 (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9406024B1 (en) * | 2015-02-10 | 2016-08-02 | International Business Machines Corporation | System and method for color paint selection and acquisition |
CN113139073A (zh) * | 2021-03-31 | 2021-07-20 | 有米科技股份有限公司 | 基于神经网络结果再处理的图像推荐方法及装置 |
CN113537248A (zh) * | 2021-08-13 | 2021-10-22 | 珠海格力电器股份有限公司 | 图像识别方法和装置、电子设备和存储介质 |
CN114266838A (zh) * | 2021-12-09 | 2022-04-01 | 深圳市智岩科技有限公司 | 图像数据处理方法、装置、电子设备及存储介质 |
CN114359305A (zh) * | 2021-12-31 | 2022-04-15 | Oppo广东移动通信有限公司 | 图像处理方法、装置、电子设备和计算机可读存储介质 |
CN114610995A (zh) * | 2022-03-10 | 2022-06-10 | 清华大学 | 口红颜色推荐方法、设备、介质及程序产品 |
-
2022
- 2022-11-17 CN CN202211460950.3A patent/CN118053001A/zh active Pending
-
2023
- 2023-05-08 WO PCT/CN2023/092818 patent/WO2024103649A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9406024B1 (en) * | 2015-02-10 | 2016-08-02 | International Business Machines Corporation | System and method for color paint selection and acquisition |
CN113139073A (zh) * | 2021-03-31 | 2021-07-20 | 有米科技股份有限公司 | 基于神经网络结果再处理的图像推荐方法及装置 |
CN113537248A (zh) * | 2021-08-13 | 2021-10-22 | 珠海格力电器股份有限公司 | 图像识别方法和装置、电子设备和存储介质 |
CN114266838A (zh) * | 2021-12-09 | 2022-04-01 | 深圳市智岩科技有限公司 | 图像数据处理方法、装置、电子设备及存储介质 |
CN114359305A (zh) * | 2021-12-31 | 2022-04-15 | Oppo广东移动通信有限公司 | 图像处理方法、装置、电子设备和计算机可读存储介质 |
CN114610995A (zh) * | 2022-03-10 | 2022-06-10 | 清华大学 | 口红颜色推荐方法、设备、介质及程序产品 |
Also Published As
Publication number | Publication date |
---|---|
CN118053001A (zh) | 2024-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12067060B2 (en) | Automatic document negotiation | |
US10755447B2 (en) | Makeup identification using deep learning | |
US11003896B2 (en) | Entity recognition from an image | |
US11288719B2 (en) | Identifying key-value pairs in documents | |
CN108287857B (zh) | 表情图片推荐方法及装置 | |
WO2020253357A1 (zh) | 数据产品推荐方法、装置、计算机设备和存储介质 | |
CN111325353A (zh) | 训练数据集的贡献度计算方法、装置、设备及存储介质 | |
US9088676B2 (en) | Information processing apparatus, information processing method, and computer readable medium | |
CN111506608B (zh) | 一种结构化文本的比较方法和装置 | |
US20150074122A1 (en) | Social recommendation across heterogeneous networks | |
CN112884542A (zh) | 商品推荐方法和装置 | |
CN113657087B (zh) | 信息的匹配方法及装置 | |
JP2012198684A (ja) | 情報処理装置、帳票種別推定方法および帳票種別推定用プログラム | |
CN111651552A (zh) | 结构化信息确定方法、装置和电子设备 | |
CN114724156B (zh) | 表单识别方法、装置及电子设备 | |
CN116628228A (zh) | 一种rpa流程推荐方法以及计算机可读存储介质 | |
CN113869063A (zh) | 数据推荐方法、装置、电子设备及存储介质 | |
US11403339B2 (en) | Techniques for identifying color profiles for textual queries | |
JP7421866B2 (ja) | 学習情報製造装置、情報処理装置、学習情報の製造方法、情報処理方法、およびプログラム | |
CN109785037B (zh) | 资源托管服务方法、电子装置及计算机可读存储介质 | |
WO2024103649A1 (zh) | 图像颜色识别方法、图像推荐方法及装置 | |
CN116030375A (zh) | 视频特征提取、模型训练方法、装置、设备及存储介质 | |
US10522246B2 (en) | Concepts for extracting lab data | |
CN113989562A (zh) | 模型训练、图像分类方法和装置 | |
JP2015097036A (ja) | 推薦画像提示装置及びプログラム |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23890093 Country of ref document: EP Kind code of ref document: A1 |