Image Processing Method, Apparatus, Electronic Device, and Storage Medium

By using deep learning models and similarity calculations between different distance spaces in clothing retrieval, the problem of low accuracy of clothing retrieval is solved, and more efficient clothing detection and retrieval is achieved, which is suitable for clothing detection and retrieval in multiple scenarios.

CN114329015BActive Publication Date: 2025-07-08SHENZHEN TENGENX TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111646263.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-07-08
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In the prior art, clothing retrieval is susceptible to deformation, occlusion and light in online video, social media and surveillance comparison scenarios, resulting in a low search accuracy, which limits its promotion and application.

Method used

By obtaining the clothing area in the image to be detected, determining the clothing characteristics, and calculating the similarity score in different distances, combining deep learning models to train clothing characteristics, and using the similarity calculation method of European space and manifold space to improve the accuracy of clothing retrieval.

Benefits of technology

It improves the accuracy of clothing retrieval, reduces hardware and labor costs, is suitable for clothing detection in various scenarios, and enhances the promotion and application of clothing retrieval functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329015B_ABST
    Figure CN114329015B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image processing method, apparatus, electronic device, and storage medium. The processing method includes: obtaining a region to be detected in a to-be-detected image; determining to-be-detected clothing features corresponding to the region to be detected; determining a first similarity score and a second similarity score of the reference clothing features corresponding to a reference clothing image relative to the to-be-detected clothing features; and determining a reference clothing image that matches the to-be-detected image according to the first similarity score and the second similarity score. By combining the first similarity score and the second similarity score in different distance spaces, the embodiments of the present disclosure can accurately determine the similarity between the to-be-detected image and the reference clothing image, thereby improving the accuracy of clothing retrieval results and facilitating the popularization and application of clothing retrieval functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, electronic device, and storage medium. Background Art

[0002] Clothing retrieval plays an important role in scenarios such as network videos, social media, advertising shootings, and surveillance comparisons. However, since clothing pictures or clothing videos are easily affected by various factors such as deformation, occlusion, and light, the accuracy of clothing retrieval is usually low, which is not conducive to the popularization and application of the clothing retrieval function. Summary of the Invention

[0003] The present disclosure proposes an image processing technical solution.

[0004] According to one aspect of the present disclosure, there is provided an image processing method, the processing method including: obtaining a region to be detected in a to-be-detected image; wherein the region to be detected includes clothing; determining a to-be-detected clothing feature corresponding to the region to be detected; determining a first similarity score and a second similarity score of a reference clothing feature corresponding to a reference clothing image with respect to the to-be-detected clothing feature, the first similarity score being a similarity score in a first distance space, and the second similarity score being a similarity score in a second distance space; and determining a reference clothing image matching the to-be-detected image according to the first similarity score and the second similarity score.

[0005] In a possible implementation manner, the obtaining a region to be detected in a to-be-detected image includes: determining a first detection region in the to-be-detected image; wherein the first detection region includes clothing; obtaining clothing key points in the first detection region; and determining the region to be detected according to the clothing key points in the first detection region.

[0006] In a possible implementation manner, the processing method further includes: obtaining a first region in a to-be-screened image; wherein the first region includes clothing; screening the first region to obtain a second region; determining the to-be-screened image corresponding to the second region as the reference clothing image, and determining the clothing feature corresponding to the reference clothing image as the reference clothing feature.

[0007] In a possible implementation, determining a first similarity score and a second similarity score of the reference clothing feature corresponding to the reference clothing image with respect to the clothing feature to be detected includes: determining a third similarity score between the reference clothing feature and each clothing feature to be detected in the first distance space or the second distance space; taking a preset number of reference clothing images with the highest third similarity scores as the first clothing images corresponding to the first distance space or the second distance space; generating an average clothing feature of the first distance space or the second distance space according to the clothing feature to be detected and the reference clothing feature corresponding to the first clothing image; determining the first similarity score between the reference clothing feature and the average clothing feature in the first distance space, or determining the second similarity score between the reference clothing feature and the average clothing feature in the second distance space.

[0008] In a possible implementation, determining the reference clothing image matching the image to be detected according to the first similarity score and the second similarity score includes: generating a comprehensive similarity score corresponding to the reference clothing image according to the first similarity score and the second similarity score corresponding to the reference clothing image; when the comprehensive similarity score is greater than or equal to a preset score, determining the reference clothing image as the reference clothing image matching the image to be detected.

[0009] In a possible implementation, the processing method further includes: arranging and displaying in sequence the reference clothing images matching the image to be detected according to the magnitude of the comprehensive similarity score.

[0010] In a possible implementation, the processing method further includes: determining the clothing category corresponding to the image to be detected according to the clothing category corresponding to the reference clothing image matching the image to be detected.

[0011] In a possible implementation, determining the clothing feature to be detected corresponding to the area to be detected includes: determining the clothing feature to be detected corresponding to the area to be detected through a deep learning model.

[0012] In a possible implementation manner, the deep learning model includes a feature extraction network and a classification network. The training process of the deep learning model is as follows: Input a training image into the deep learning model to obtain the training clothing feature corresponding to the training image through the feature extraction network and obtain the training clothing category corresponding to the training image through the classification network; Determine the classification loss and / or triplet loss corresponding to the training image according to the training clothing category; Train the deep learning model according to the classification loss and / or the triplet loss. The feature extraction network of the trained deep learning model is used to determine the to-be-detected clothing feature corresponding to the to-be-detected area and / or the reference clothing feature corresponding to the reference clothing image.

[0013] In a possible implementation manner, the determining the triplet loss corresponding to the training image according to the training clothing category includes: determining the triplet loss corresponding to the training image according to the training clothing category, a positive sample with the same training clothing category, and a negative sample with a different training clothing category.

[0014] In a possible implementation manner, the processing method further includes: obtaining retrieval information; retrieving a reference clothing image that matches the retrieval information according to the retrieval information; The determining the first similarity score and the second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the to-be-detected clothing feature includes: determining the first similarity score and the second similarity score of the reference clothing feature corresponding to the reference clothing image that matches the retrieval information relative to the to-be-detected clothing feature.

[0015] In a possible implementation manner, the first distance space includes a Euclidean space, and / or the second distance space includes a manifold space.

[0016] According to a second aspect of the present disclosure, there is provided an image processing apparatus. The processing apparatus includes: a to-be-detected area obtaining module for obtaining a to-be-detected area in a to-be-detected image; wherein, the to-be-detected area includes clothing; a clothing feature determining module for determining a to-be-detected clothing feature corresponding to the to-be-detected area; a similarity score determining module for determining a first similarity score and a second similarity score of a reference clothing feature corresponding to a reference clothing image relative to the to-be-detected clothing feature, the first similarity score being a similarity score in a first distance space, and the second similarity score being a similarity score in a second distance space; a clothing image matching module for determining a reference clothing image that matches the to-be-detected image according to the first similarity score and the second similarity score.

[0017] According to a third aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to call the instructions stored in the memory to execute the image processing method according to any one of the above.

[0018] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the image processing method according to any one of the above is implemented.

[0019] In the embodiments of the present disclosure, by obtaining a region to be detected in a to-be-detected image, determining the to-be-detected clothing features corresponding to the region to be detected, then determining a first similarity score and a second similarity score of the reference clothing features of a reference clothing image relative to the to-be-detected clothing features, and finally determining, according to the first similarity score and the second similarity score, the reference clothing image that matches the to-be-detected image. By combining the first similarity score and the second similarity score in different distance spaces, the embodiments of the present disclosure can accurately determine the similarity between the to-be-detected image and the reference clothing image, thereby improving the accuracy of the clothing retrieval result and facilitating the popularization and application of the clothing retrieval function.

[0020] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure. According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0022] Figure 1 A flowchart showing the image processing method according to an embodiment of the present disclosure.

[0023] Figure 2 A flowchart showing the training method of a deep learning model according to an embodiment of the present disclosure.

[0024] Figure 3 A reference schematic diagram showing the image processing method according to an embodiment of the present disclosure.

[0025] Figure 4 A block diagram showing the image processing device according to an embodiment of the present disclosure.

[0026] Figure 5 A block diagram showing an electronic device according to an embodiment of the present disclosure.

[0027] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed implementation manners

[0028] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0029] The term "exemplary" used herein means "serving as an example, embodiment, or illustration". Any embodiment described as "exemplary" herein is not necessarily to be construed as superior or better than other embodiments.

[0030] The term "and / or" in this document merely describes an association relationship between associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" in this document means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C may represent any one or more elements selected from the set composed of A, B, and C.

[0031] In addition, for a better illustration of the present disclosure, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can still be implemented without some specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art are not described in detail so as to highlight the gist of the present disclosure.

[0032] Here, two clothing retrieval methods commonly used in the related art are listed for reference. 1. Using manual labor for clothing retrieval. This method has low dependence on hardware and software design. Although the retrieval accuracy is relatively high, it greatly increases the labor cost. 2. Using a fixed feature algorithm for clothing retrieval. This method has low dependence on hardware, but since a corresponding feature algorithm needs to be set for different categories of clothing, it has extremely high dependence on software design. In addition, developers also need to continuously maintain various feature algorithms, and the labor cost is still relatively high. The accuracy rate of this method is also relatively low. In summary, due to reasons such as high labor cost and low accuracy rate, the clothing retrieval methods in the related art are not conducive to the popularization and application of the clothing retrieval function.

[0033] In view of this, embodiments of the present disclosure provide an image processing method. By obtaining a detection region in a to-be-detected image, determining to-be-detected clothing features corresponding to the detection region, then determining a first similarity score and a second similarity score of reference clothing features corresponding to a reference clothing image relative to the to-be-detected clothing features, and finally determining, according to the first similarity score and the second similarity score, a reference clothing image matching the to-be-detected image. By combining the first similarity score and the second similarity score in different distance spaces, embodiments of the present disclosure can accurately determine the similarity between the to-be-detected image and the reference clothing image, thereby improving the accuracy of clothing retrieval results and facilitating the popularization and application of the clothing retrieval function.

[0034] In a possible implementation manner, the image processing method may be executed by an electronic device such as a terminal device or a server. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method may be implemented by a processor invoking computer-readable instructions stored in a memory. Alternatively, the method may be executed by a server, or by a combination of a server and a terminal device.

[0035] Figure 1 The flowchart showing the image processing method according to an embodiment of the present disclosure is as Figure 1 shown, and the image processing method includes:

[0036] Step S100, obtaining a detection region in a to-be-detected image. Wherein, the detection region includes clothing. Exemplarily, the to-be-detected image may be obtained by a user taking a photo through a mobile terminal, or uploaded to the above-mentioned electronic device through a storage medium. Embodiments of the present disclosure do not limit this here. In one example, the to-be-detected image may also be any frame image in a to-be-detected video. For example: a user may take a to-be-detected video with clothing through a mobile terminal, and then perform clothing retrieval through the local mobile terminal or a server communicating therewith. Any of the above-mentioned electronic devices may extract images from multiple frames of the to-be-detected video at a certain frequency as the to-be-detected image.

[0037] In a possible implementation, step S100 may include: determining a first detection area in the image to be detected. The first detection area includes clothing. In the first detection area, obtain clothing key points. In the first detection area, determine the area to be detected according to the clothing key points. Exemplarily, the first detection area may be determined by a clothing detector in the related art, and the clothing detector may determine one or more first detection areas in the same image to be detected. The position of the first detection area may be determined by a detection frame of the area where the clothing is located, and the clothing key points may be determined by a clothing key point regressor in the related art, and the clothing key point regressor may determine the clothing key points of each first detection area, and the clothing key points in different first detection areas may correspond to different identifiers for easy distinction, such as digital identifiers: 1, 2, 3, or type identifiers: upper body clothing, lower body clothing, full body clothing, etc. Clothing key points may include any key points located at the collar, shoulder, cuff, waist, etc. that can indicate the location of clothing. In other words, the image processing method provided by the embodiment of the present disclosure may also be applicable to scenes where there are multiple clothing to be detected in the same image to be detected. Exemplarily, the above-mentioned clothing detector and clothing key point regressor may be a machine learning model or a related algorithm matching model, which is not limited in the embodiments of the present disclosure. In one example, the outermost key points among the clothing key points, or the pixel points at a fixed distance from the outermost key points (to ensure that a complete clothing to be detected is included in the area to be detected) may be selected as a part of the periphery of the area to be detected. The embodiments of the present disclosure may select a region to be detected in the first detection area based on the clothing key points to reduce the area ratio of the background image in the area to be detected as much as possible, so that the subsequent process can accurately extract the clothing features to be detected in the image to be detected, which is conducive to improving the accuracy of the clothing retrieval results (such as the reference clothing images that are arranged in sequence and matched with the image to be detected as described later). In addition, since the extracted clothing features are less affected by the background image in the image to be detected, the image processing method provided by the embodiments of the present disclosure can be applied to clothing detection in various scenes, and can also ensure the accuracy of clothing feature extraction without making specific scene annotations for the image to be detected or the reference clothing image for each application scene.

[0038] Continue reading Figure 1, Step S200, determine the clothing features to be detected corresponding to the area to be detected. Exemplarily, the clothing features to be detected can be obtained by any clothing feature extraction method in related technologies. For example, a fixed feature algorithm can be used for extraction. In one example, various machine learning models can also be used to extract the clothing features to be detected, so as to improve the representativeness of the extracted clothing features to be detected, and further improve the accuracy of the subsequent similarity scores, thereby further improving the robustness and accuracy of the clothing detection results. For example, a deep learning model can be used to determine the clothing features to be detected corresponding to the area to be detected. An embodiment of the present disclosure provides a training process of a deep learning model for reference here. The above deep learning model may include a feature extraction network and a classification network.

[0039] Figure 2 The flowchart showing the training method of the deep learning model according to an embodiment of the present disclosure is as Figure 2 shown, and the above training method includes:

[0040] Step S600, input the training image into the deep learning model, so as to obtain the training clothing features corresponding to the training image through the feature extraction network and obtain the training clothing category corresponding to the training image through the classification network. Exemplarily, the above training image can also be processed by the clothing detector, clothing key point regressor, etc. described above, or the training image can be screened to obtain a training image with higher image quality and stronger representativeness as the training sample of the deep learning model, so that the clothing features extracted by the trained deep learning model are more representative.

[0041] Step S700: Determine the classification loss (which can be expressed as cross - entropy loss, etc.) and / or triplet loss corresponding to the training image according to the training clothing category. Exemplarily, the above - mentioned classification loss is positively correlated with the difference degree between the training clothing category and the true category corresponding to the training image. The above - mentioned triplet loss can be obtained in the following way: According to the training clothing category, the positive sample corresponding to the clothing category that is the same as the training clothing category, and the negative sample corresponding to the clothing category that is different from the training clothing category, determine the triplet loss corresponding to the training image. Among them, the triplet loss is positively correlated with the difference degree between the training clothing category and the true category corresponding to the training image, positively correlated with the difference degree between the training image and the positive sample, and negatively correlated with the difference degree between the training image and the negative sample. The above - mentioned triplet loss is used to narrow the distance between the training image and the positive sample and widen the distance between the training image and the negative sample. In one example, the above - mentioned positive sample can be a hard positive sample, and the above - mentioned negative sample can be a hard negative sample, so that the subsequent trained deep - learning model can accurately extract corresponding clothing features (such as the clothing features to be detected, reference clothing features, etc.) for some confusing clothing images (such as the image to be detected, reference clothing image, etc.).

[0042] Step S800: Train the deep - learning model according to the classification loss and / or the triplet loss. After training, the feature extraction network of the deep - learning model is used to determine the clothing features to be detected corresponding to the area to be detected and / or the reference clothing features corresponding to the reference clothing image. In the embodiments of the present disclosure, at least one of the classification loss and the triplet loss is used as one of the reference objects for adjusting the feature extraction network (the feature extraction network can also be comprehensively adjusted based on various losses in other related technologies, which will not be elaborated here), so that the trained feature extraction network can extract the unique features of different clothing categories (that is, in the feature space, the clothing features corresponding to different clothing categories can be separated as much as possible), thereby improving the accuracy of subsequent clothing retrieval results. Through the above - trained deep - learning model, the embodiments of the present disclosure can more accurately determine the clothing features corresponding to the image to be detected and the reference clothing image, and determine the clothing detection results with a lower false - alarm rate and a higher recall rate.

[0043] Continue to refer to Figure 1, Step S300, determine a first similarity score and a second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the to-be-detected clothing feature. Exemplarily, if the stage when the electronic device can provide a clothing retrieval function is regarded as the online stage, and the stage when the electronic device pauses providing the clothing retrieval function is regarded as the offline stage, then the reference clothing image and the reference clothing feature can be stored in an index library during the offline stage. Subsequently, when the electronic device is in the online stage, the electronic device can access this index library, and then obtain the reference clothing image and its corresponding reference clothing feature for subsequent comparison with the to-be-detected clothing feature. For example: The above index library can store: the reference clothing image, the reference clothing feature corresponding to the reference clothing image, the clothing category corresponding to the reference clothing image, the index number corresponding to the reference clothing image, etc. Developers can also change the attributes of various basic clothing images stored in the index library on this basis to match the process requirements of the image processing method, which is not limited in this disclosure. In one example, developers can perform addition, deletion, modification, and query of the reference clothing image and its corresponding various attributes on the index library during the offline stage.

[0044] In a possible implementation manner, the acquisition method of the above reference clothing image and its corresponding reference clothing feature can be as follows: Obtain a first region in the to-be-screened image, where the first region includes clothing. Screen the first region to obtain a second region. Determine the to-be-screened image corresponding to the second region as the reference clothing image, and determine the clothing feature corresponding to the reference clothing image as the reference clothing feature. Exemplarily, the rules for screening the first region may include: the resolution is higher than a threshold, the size of the first region is higher than a threshold, etc. The screening rules only need to ensure that the reference clothing image has sufficient representativeness, and developers can adjust the screening rules by themselves. In one example, the first region in the to-be-screened image can be obtained through the above clothing detector. The above reference clothing feature can be obtained through a feature extraction model or a feature extraction algorithm in related technologies, which is not limited in the embodiments of this disclosure. For example: The feature extraction model can be a trained feature extraction network. The input of this feature extraction network is an image (such as the above reference clothing image, to-be-detected image, etc.), and then it outputs a corresponding clothing feature vector to reduce labor costs. Such a setting is also beneficial to improving the accuracy of the similarity score.

[0045] Exemplarily, the first similarity score is a similarity score in a first distance space, and the second similarity score is a similarity score in a second distance space. In one example, the first distance space and the second distance space may be different. For example: The first distance space may include a Euclidean space, and the second distance space may include a manifold space. The definitions of the above Euclidean space and manifold space can refer to related technologies, and are not elaborated in the embodiments of this disclosure.

[0046] In a possible implementation, the above first similarity score can be obtained through the following process: Map the clothing features to be detected and the reference clothing features into a first distance space (such as a Euclidean space), and then calculate the cosine similarity (also known as Cosine Similarity) between the two in the first distance space. Based on the above cosine similarity, determine the similarity score. For example, the value of the above cosine similarity can be simply used as the above similarity score, or the cosine similarity can be used as a generation criterion for the similarity score. In other words, it is only necessary that the cosine similarity and the similarity score are positively correlated. Here, only the cosine similarity is taken as an example, and other parameters included in the Euclidean space in the related art can also be used as the generation criterion for the similarity score, such as the Euclidean distance between the clothing features to be detected and the reference clothing features. The embodiments of the present disclosure do not limit this here.

[0047] In a possible implementation, the above second similarity score can be obtained through the following process: Map the clothing features to be detected and the reference clothing features into a second distance space (such as a manifold space), and then construct a nearest neighbor graph; Based on the nearest neighbor graph, obtain the affinity matrix (also known as the similarity matrix) between the clothing features to be detected and the reference clothing features; Based on the above affinity matrix, obtain the second similarity score between the clothing features to be detected and the reference clothing features through iteration (for example: conjugate gradient method, etc.). Here, only the affinity matrix is taken as an example, and other similarity determination methods based on the manifold space in the related art can also be used, such as similarity curve comparison, etc. The embodiments of the present disclosure do not limit this here.

[0048] Exemplarily, in a possible implementation, the first similarity and / or the second similarity can be obtained based on the idea of retrieval expansion, that is, step S300 may include: In the first distance space or the second distance space, determine the third similarity score between the reference clothing features and each clothing feature to be detected; Use a preset number of reference clothing images with the highest third similarity scores as the first clothing images corresponding to the first distance space or the second distance space; Generate the average clothing feature of the first distance space or the second distance space according to the clothing features to be detected and the reference clothing features corresponding to the first clothing images; In the first distance space, determine the first similarity score between the reference clothing features and the average clothing feature, or, in the second distance space, determine the second similarity score between the reference clothing features and the average clothing feature.

[0049] The above average clothing features can be simply obtained by calculating the average value of the reference clothing features corresponding to the first clothing image, or can be obtained by weighted averaging according to the level of the third similarity score. The embodiments of the present disclosure do not limit this here. Then, in the first distance space, the first similarity score between the reference clothing features and the average clothing features is determined, and in the second distance space, the second similarity score between the reference clothing features and the average clothing features is determined. By expanding the retrieval of the clothing features to be detected in the distance space in the embodiments of the present disclosure, the clothing features to be detected can be made more universal during comparison, which is beneficial to improving the representativeness of the similarity score, and thus improves the accuracy of the subsequent clothing retrieval result.

[0050] Continue to refer to Figure 1 As shown, in step S400, according to the first similarity score and the second similarity score, a reference clothing image matching the image to be detected is determined. In a possible implementation manner, step S400 may include: generating a comprehensive similarity score corresponding to the reference clothing image according to the first similarity score and the second similarity score corresponding to the reference clothing image. Exemplarily, the above comprehensive similarity score may be the average value of the first similarity score and the second similarity score corresponding to the same reference clothing image, or may be a weighted average of the two. The embodiments of the present disclosure do not limit this here. When the comprehensive similarity score is greater than or equal to a preset score, the reference clothing image is determined to be the reference clothing image matching the image to be detected.

[0051] In a possible implementation manner, after step S400, the processing method may further include: arranging and displaying in sequence the reference clothing images matching the image to be detected according to the magnitude of the comprehensive similarity score. Exemplarily, the retrieval result may be displayed for the user through the display screen of an electronic terminal.

[0052] In a possible implementation manner, the above processing method may further include: determining the clothing category corresponding to the image to be detected according to the clothing category corresponding to the reference clothing image (hereinafter simply referred to as the candidate image) matching the image to be detected. Exemplarily, the clothing category corresponding to the candidate image with the highest comprehensive similarity score may be simply used as the clothing category corresponding to the image to be detected. In one example, the clothing category with the largest number among the candidate images above a certain similarity score threshold may also be used as the clothing category corresponding to the image to be detected to improve the representativeness of the obtained clothing category.

[0053] In a possible implementation, the electronic device may also obtain retrieval information before clothing retrieval, and retrieve a reference clothing image that matches the retrieval information according to the retrieval information. In this case, step S300 may include: determining a first similarity score and a second similarity score of the reference clothing features corresponding to the reference clothing image that matches the retrieval information with respect to the clothing features to be detected. In other words, the electronic device can use the retrieval information set by the user as a reference to retrieve the corresponding reference clothing image in the index library, and further retrieve based on the method of the embodiments of the present application in the retrieved reference clothing images, so as to reduce computing power consumption and retrieval time. Exemplarily, the above retrieval information may include clothing categories, main colors of clothing, main materials of clothing, etc. The retrieval information can be determined according to the attributes corresponding to the reference clothing images stored in the above index library, and the two are adaptable, and the embodiments of the present disclosure do not limit this here.

[0054] Figure 3 A reference schematic diagram showing a method for processing an image according to an embodiment of the present disclosure. As Figure 3 shown, the method for processing an image can be divided into two stages, one is the offline stage and the other is the online stage (the definitions of the two can be referred to in the above text).

[0055] In the offline stage, the electronic device may obtain a batch of to-be-screened images containing to-be-screened clothing (that is, the target images in Figure 3 ), and input the to-be-screened images into a clothing detector and a clothing key point regressor to obtain a plurality of second regions with the to-be-screened clothing (that is, the target clothing in Figure 3 ). By screening the second regions in the to-be-screened images (that is, image quality filtering in Figure 3 ), the reference clothing features, their corresponding reference clothing images, and their corresponding clothing categories are obtained, and the three are saved in the index library (that is, feature warehousing) as the bottom library features. Exemplarily, when the number of reference clothing features reaches a certain number, the set containing the reference clothing features can be stored in the index library at one time. In the offline stage, the processing method provided by the embodiments of the present disclosure has lower labor costs. After the offline deployment is completed by the developers, the subsequent interference with the system is less, which is conducive to the popularization and application of the clothing retrieval function.

[0056] In the online stage, the electronic device may obtain a to-be-detected video (that is, the user video in Figure 3 ) or a to-be-detected image (that is, the video frame or user picture in Figure 3 ), and input the to-be-detected image into a clothing detector and a clothing key point regressor to obtain the to-be-detected region in the to-be-detected image (that is, Figure 3in the user's clothing). Through the trained deep learning model, the clothing features to be detected in the area to be detected are extracted. Based on the above index library, by calculating the cosine similarity between the clothing features to be detected and the reference clothing features, a third similarity score is obtained (that is, Figure 3 in which the cosine similarity ranking is determined by the feature search system), and then the average clothing features are calculated, and then a first similarity score is obtained (that is, Figure 3 in which the extended query re-ranking is performed). Based on the above index library, a second similarity score between the clothing features to be detected and the reference clothing features is calculated (that is, Figure 3 in which the manifold structure ranking is performed). By comprehensively considering the first and second similarity scores, based on the score threshold or the specified number, the clothing retrieval result is determined. Then, the clothing retrieval result is displayed to the user through the visualization platform. For example: displaying the image to be detected, its corresponding clothing position, the similarity score of its corresponding reference clothing image, etc. The user can also modify the retrieval rules by adjusting the retrieval information described above.

[0057] In summary, the image processing method provided by the embodiments of the present disclosure has a low hardware dependence. Most current Internet platforms have deployed video and image storage systems and have a large amount of data resources. On this basis, the image processing method provided by the embodiments of the present disclosure is more convenient to deploy compared with the processing methods in the related art.

[0058] The embodiments of the present disclosure also provide several actual application scenarios of the above processing methods for reference.

[0059] 1. The user can record a video data and transmit it to the mobile terminal storing the above processing method. Then, the mobile terminal automatically extracts the images to be detected in the above video data at a fixed frequency (or the images to be detected with clothing can be screened by the clothing detector), and determines the clothing retrieval result in the server communicating with it. The server sends the clothing retrieval result to the mobile terminal. The server can generate a composite image for each image to be detected as the clothing retrieval result. The above composite image may include: a retrieval result area composed of several reference clothing images with the highest comprehensive similarity to the image to be detected, a detection object area composed of the image to be detected, a parameter display area for displaying the clothing category and the similarity score, etc.

[0060] 2. The user can take a picture of the image to be detected with clothing through the mobile terminal. The mobile terminal can realize the lightweight interaction between the mobile terminal and the server by uploading the image to be detected to a web page. Then, the web page displays the clothing retrieval result on the page in a specific order of layout (such as the high and low of the comprehensive similarity, the high and low of the comprehensive similarity in a specific category, etc.). The above is only an exemplary description. The electronic device can display the clothing retrieval result in any way, and the embodiments of the present disclosure do not limit this here.

[0061] It can be understood that, without violating the principle logic, the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form combined embodiments. For the sake of brevity, the present disclosure will not elaborate further. Those skilled in the art can understand that in the above methods of the specific implementation manner, the specific execution order of each step should be determined according to its function and possible internal logic.

[0062] Refer to Figure 4 as shown Figure 4 which shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.

[0063] As Figure 4 shown, the processing apparatus 100 includes: a to-be-detected area acquisition module 110 for acquiring a to-be-detected area in a to-be-detected image. Wherein, the to-be-detected area includes clothing. A clothing feature determination module 120 for determining to-be-detected clothing features corresponding to the to-be-detected area. A similarity score determination module 130 for determining a first similarity score and a second similarity score of reference clothing features corresponding to a reference clothing image with respect to the to-be-detected clothing features, where the first similarity score is a similarity score in a first distance space and the second similarity score is a similarity score in a second distance space. A clothing image matching module 140 for determining a reference clothing image that matches the to-be-detected image according to the first similarity score and the second similarity score.

[0064] In a possible implementation manner, acquiring the to-be-detected area in the to-be-detected image includes: determining a first detection area in the to-be-detected image; wherein, the first detection area includes clothing; in the first detection area, acquiring clothing key points; and in the first detection area, determining the to-be-detected area according to the clothing key points.

[0065] In a possible implementation manner, the processing apparatus further includes an image screening unit, and the image screening unit is configured to perform: acquiring a first area in a to-be-screened image; wherein, the first area includes clothing; screening the first area to obtain a second area; determining the to-be-screened image corresponding to the second area as the reference clothing image, and determining the clothing features corresponding to the reference clothing image as the reference clothing features.

[0066] In a possible implementation, determining a first similarity score and a second similarity score of the reference clothing feature corresponding to the reference clothing image with respect to the to-be-detected clothing feature includes: determining a third similarity score between the reference clothing feature and each to-be-detected clothing feature in the first distance space or the second distance space; using a preset number of reference clothing images with the highest third similarity scores as the first clothing images corresponding to the first distance space or the second distance space; generating an average clothing feature of the first distance space or the second distance space according to the to-be-detected clothing feature and the reference clothing feature corresponding to the first clothing image; determining the first similarity score between the reference clothing feature and the average clothing feature in the first distance space, or determining the second similarity score between the reference clothing feature and the average clothing feature in the second distance space.

[0067] In a possible implementation, determining the reference clothing image that matches the to-be-detected image according to the first similarity score and the second similarity score includes: generating a comprehensive similarity score corresponding to the reference clothing image according to the first similarity score and the second similarity score corresponding to the reference clothing image; when the comprehensive similarity score is greater than or equal to a preset score, determining the reference clothing image as the reference clothing image that matches the to-be-detected image.

[0068] In a possible implementation, the processing device further includes: an image display unit for arranging and displaying in sequence the reference clothing images that match the to-be-detected image according to the magnitude of the comprehensive similarity score.

[0069] In a possible implementation, the processing device further includes: a clothing category determination unit for determining the clothing category corresponding to the to-be-detected image according to the clothing category corresponding to the reference clothing image that matches the to-be-detected image.

[0070] In a possible implementation, determining the to-be-detected clothing feature corresponding to the to-be-detected region includes: determining the to-be-detected clothing feature corresponding to the to-be-detected region through a deep learning model.

[0071] In a possible implementation, the deep learning model includes a feature extraction network and a classification network. The training process of the deep learning model is as follows: Input the training images into the deep learning model to obtain the training clothing features corresponding to the training images through the feature extraction network and the training clothing categories corresponding to the training images through the classification network; Determine the classification loss and / or triplet loss corresponding to the training images according to the training clothing categories; Train the deep learning model according to the classification loss and / or the triplet loss. The feature extraction network of the trained deep learning model is used to determine the detected clothing features corresponding to the area to be detected and / or the reference clothing features corresponding to the reference clothing image.

[0072] In a possible implementation, the determining the triplet loss corresponding to the training images according to the training clothing categories includes: determining the triplet loss corresponding to the training images according to the training clothing categories, the positive samples with the same training clothing categories, and the negative samples with different training clothing categories.

[0073] In a possible implementation, the processing method further includes: obtaining retrieval information; retrieving a reference clothing image that matches the retrieval information according to the retrieval information; The determining the first similarity score and the second similarity score of the reference clothing features corresponding to the reference clothing image with respect to the detected clothing features includes: determining the first similarity score and the second similarity score of the reference clothing features corresponding to the reference clothing image that matches the retrieval information with respect to the detected clothing features.

[0074] In a possible implementation, the first distance space includes a Euclidean space, and / or the second distance space includes a manifold space.

[0075] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0076] In addition, the present disclosure also provides an image processing device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any one of the image processing methods provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated.

[0077] The embodiments of the present disclosure also propose a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above methods are implemented. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0078] An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

[0079] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0080] The electronic device may be provided as a terminal, a server, or other forms of devices.

[0081] Figure 5 A block diagram of an electronic device 800 according to an embodiment of the present disclosure is shown. For example, the electronic device 800 may be a terminal device such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.

[0082] Referring to Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0083] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0084] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0085] The power supply component 806 provides power to various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0086] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0087] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0088] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a start button, and a lock button.

[0089] The sensor assembly 814 includes one or more sensors for providing a status assessment of various aspects for the electronic device 800. For example, the sensor assembly 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0090] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a wireless network based on communication standards, such as Wi-Fi, 2G, 3G, 4G, Long Term Evolution (LTE) of Universal Mobile Telecommunications Technology, 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0091] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0092] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, and the above computer program instructions can be executed by a processor 820 of the electronic device 800 to complete the above method.

[0093] Figure 6 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server. Referring to Figure 6 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0094] The electronic device 1900 may further include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Microsoft Server Operating System (Windows Server TM ), the graphical user interface-based operating system launched by Apple Inc. (Mac OS X TM ), the multi-user and multi-process computer operating system (Unix TM ), the free and open-source Unix-like operating system (Linux TM ), the open-source Unix-like operating system (FreeBSD TM ) or the like.

[0095] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, and the above computer program instructions can be executed by the processing component 1922 of the electronic device 1900 to complete the above method.

[0096] The present disclosure may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0097] A computer-readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium can be, for example, (but is not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: 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), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device, such as a punched card or raised structures in grooves storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as an instantaneous signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0098] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0099] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of 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 alternatively, may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.

[0100] Aspects of the present disclosure are described herein with reference to the flowchart and / or block diagram of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, can be implemented by computer - readable program instructions.

[0101] These computer - readable program instructions can be provided to a processor of a general - purpose computer, a special - purpose computer, or other programmable data - processing apparatus to produce a machine such that the instructions, when executed by the processor of the computer or other programmable data - processing apparatus, result in an apparatus that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer - readable program instructions can also be stored in a computer - readable storage medium, which causes a computer, a programmable data - processing apparatus, and / or other devices to operate in a particular manner. Thus, the computer - readable medium storing the instructions includes a manufacture, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0102] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.

[0103] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions.

[0104] The computer program product may be implemented specifically by hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is embodied specifically as a computer storage medium. In another alternative embodiment, the computer program product is embodied specifically as a software product, such as a Software Development Kit (SDK), etc.

[0105] The various embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art in the field of the present technology without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skill in the art in the field of the present technology to understand the embodiments disclosed herein.

Claims

1. A method for processing an image, characterized in that, The processing method includes: Obtain a region to be detected in the image to be detected; wherein, the region to be detected includes clothing; Determine the clothing feature to be detected corresponding to the region to be detected; Determine a first similarity score and a second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the clothing feature to be detected, where the first similarity score is the similarity score in the first distance space, and the second similarity score is the similarity score in the second distance space; Determine a reference clothing image that matches the image to be detected according to the first similarity score and the second similarity score; Determining a first similarity score and a second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the clothing feature to be detected includes: In the first distance space or the second distance space, determine a third similarity score between the reference clothing feature and each clothing feature to be detected; Use a preset number of reference clothing images with the highest third similarity scores as the first clothing images corresponding to the first distance space or the second distance space; Generate an average clothing feature of the first distance space or the second distance space according to the clothing feature to be detected and the reference clothing feature corresponding to the first clothing image; In the first distance space, determine the first similarity score between the reference clothing feature and the average clothing feature, or, in the second distance space, determine the second similarity score between the reference clothing feature and the average clothing feature.

2. The processing method according to claim 1, wherein The obtaining of the region to be detected in the image to be detected includes: Determine a first detection region in the image to be detected; wherein, the first detection region includes clothing; In the first detection region, obtain clothing key points; In the first detection region, determine the region to be detected according to the clothing key points.

3. The processing method according to claim 1 or 2, characterized in that, The processing method further includes: Obtain a first region in the image to be screened; wherein, the first region includes clothing; Screen the first region to obtain a second region; Determine the image to be screened corresponding to the second region as the reference clothing image, and determine the clothing feature corresponding to the reference clothing image as the reference clothing feature.

4. The processing method according to claim 1, characterized in that, Determining a reference clothing image that matches the image to be detected according to the first similarity score and the second similarity score includes: Generate a comprehensive similarity score corresponding to the reference clothing image according to the first similarity score and the second similarity score corresponding to the reference clothing image; When the comprehensive similarity score is greater than or equal to a preset score, determine the reference clothing image as the reference clothing image that matches the image to be detected.

5. The processing method according to claim 4, wherein The processing method further includes: Arrange and display in sequence the reference clothing images that match the image to be detected according to the magnitude of the comprehensive similarity score.

6. The processing method according to claim 4 or 5, characterized in that The processing method further includes: Determine the clothing category corresponding to the image to be detected according to the clothing category corresponding to the reference clothing image that matches the image to be detected.

7. The processing method according to claim 1, wherein Determining the clothing feature to be detected corresponding to the area to be detected includes: determining the clothing feature to be detected corresponding to the area to be detected through a deep learning model.

8. The processing method according to claim 7, wherein The deep learning model includes a feature extraction network and a classification network. The training process of the deep learning model is as follows: Inputting the training image into the deep learning model to obtain the training clothing feature corresponding to the training image through the feature extraction network and the training clothing category corresponding to the training image through the classification network; Determining the classification loss and / or triplet loss corresponding to the training image according to the training clothing category; Training the deep learning model according to the classification loss and / or the triplet loss. The feature extraction network of the trained deep learning model is used to determine the clothing feature to be detected corresponding to the area to be detected and / or the reference clothing feature corresponding to the reference clothing image.

9. The processing method according to claim 8, characterized in that, The determining the triplet loss corresponding to the training image according to the training clothing category includes: Determining the triplet loss corresponding to the training image according to the training clothing category, the positive sample with the same training clothing category, and the negative sample with a different training clothing category.

10. The processing method according to claim 1, characterized in that, The processing method further includes: Obtaining retrieval information; Retrieving a reference clothing image that matches the retrieval information according to the retrieval information; The determining the first similarity score and the second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the clothing feature to be detected includes: Determining the first similarity score and the second similarity score of the reference clothing feature corresponding to the reference clothing image that matches the retrieval information relative to the clothing feature to be detected.

11. The processing method according to claim 1, characterized in that, The first distance space includes a Euclidean space, and / or the second distance space includes a manifold space.

12. An image processing apparatus, characterized in that, The processing device includes: An area-to-be-detected acquisition module for acquiring the area to be detected in the image to be detected; wherein, the area to be detected includes clothing; A clothing feature determination module for determining the clothing feature to be detected corresponding to the area to be detected; A similarity score determination module for determining the first similarity score and the second similarity score of the reference clothing feature corresponding to the reference clothing image relative to the clothing feature to be detected. The first similarity score is the similarity score in the first distance space, and the second similarity score is the similarity score in the second distance space; A clothing image matching module for determining the reference clothing image that matches the image to be detected according to the first similarity score and the second similarity score. Determining a first similarity score and a second similarity score of a reference clothing feature corresponding to a reference clothing image with respect to the to-be-detected clothing feature includes: determining a third similarity score between the reference clothing feature and each to-be-detected clothing feature in the first distance space or the second distance space; taking a preset number of reference clothing images with the highest third similarity scores as the first clothing images corresponding to the first distance space or the second distance space; generating an average clothing feature of the first distance space or the second distance space according to the to-be-detected clothing feature and the reference clothing feature corresponding to the first clothing image; determining the first similarity score between the reference clothing feature and the average clothing feature in the first distance space, or determining the second similarity score between the reference clothing feature and the average clothing feature in the second distance space.

13. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to call the instructions stored in the memory to execute the image processing method according to any one of claims 1 to 11.

14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the image processing method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Garment image retrieval method based on visual salient region and hand-drawn sketch

    CN108959379A

  • Costume identification method and device, equipment and medium

    CN111553327A

  • Image retrieval method and device, electronic equipment and storage medium

    CN113806582A