WO2021031645A1 - 图像处理方法及装置、电子设备和存储介质 - Google Patents

图像处理方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021031645A1
WO2021031645A1 PCT/CN2020/092391 CN2020092391W WO2021031645A1 WO 2021031645 A1 WO2021031645 A1 WO 2021031645A1 CN 2020092391 W CN2020092391 W CN 2020092391W WO 2021031645 A1 WO2021031645 A1 WO 2021031645A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
image
category
processed
class center
Prior art date
Application number
PCT/CN2020/092391
Other languages
English (en)
French (fr)
Inventor
窦浩轩
徐静
李冠亮
杨禹飞
李敏妙
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Priority to JP2021558009A priority Critical patent/JP2022526381A/ja
Publication of WO2021031645A1 publication Critical patent/WO2021031645A1/zh
Priority to US17/488,634 priority patent/US20220019838A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to an image processing method and device, electronic equipment, and storage medium.
  • face retrieval has been widely used, especially when solving a case in the public security industry, it is necessary to retrieve images of unidentified suspects in massive portrait databases.
  • the commonly used face retrieval method is to compare the retrieved pictures with the database pictures one by one.
  • the present disclosure proposes an image processing technical solution.
  • an image processing method including: performing feature extraction on an image to be processed to obtain a first feature of the image to be processed; according to the first feature and multiple reference image categories in a feature library Determine the image category of the image to be processed; in the case that the image category of the image to be processed is the first category of the multiple reference image categories, according to the first feature and the The multiple feature information of the first category in the feature database is updated to update the category center feature of the first category.
  • the image category of the image to be processed can be determined according to the first feature of the image to be processed and the class center feature of the reference image category; when the image to be processed is an existing first category, according to the first feature And multiple feature information of the first category, update the class center feature of the first category to realize the clustering of the image to be processed, so that the image retrieval can be clustered and then retrieved, which improves the accuracy and recall rate of image retrieval, and Through the comparison of the image to be processed and the center feature of the class, the number of image comparisons during retrieval is reduced, and the speed of image retrieval is increased.
  • the features of the image to be processed can be added to the feature library, which increases the number of images and features corresponding to each category, and further improves Retrieval accuracy rate.
  • the method further includes: in the case that the image category of the image to be processed is not a category of the multiple reference image categories, performing the first feature of the image to be processed Class center extraction, to obtain the class center feature of the second category of the image to be processed; add the first feature and the class center feature of the second category to the feature library, and add the second category Added to the multiple reference image categories.
  • the feature information and image category in the feature library can be updated as new images increase, thereby The feature information and image categories in the feature library can be continuously enriched, and the accuracy of image retrieval can be improved.
  • the method further includes: in the case that the image category of the image to be processed is not a category of the multiple reference image categories, performing the first feature of the image to be processed Clustering to obtain one or more third categories; respectively perform class center extraction on each third category to obtain the class center features of the third category; combine the class center features of the first feature and the third category Adding to the feature library, and adding the third category to the multiple reference image categories.
  • the image to be processed when the image to be processed is a plurality of pictures, the image to be processed can be clustered when the image category matching fails to obtain one or more new image categories, and the new image category and class center feature Adding to the feature library allows the feature information and image categories in the feature library to be updated as new images increase, so that the feature information and image categories in the feature library can be continuously enriched, and the accuracy of image retrieval can be improved.
  • determining the image category of the image to be processed according to the first feature and the class center features of multiple reference image categories in the feature library includes: acquiring the first feature and multiple reference image categories. A plurality of first distances between class center features; in the case that the second distance with the smallest distance value among the plurality of first distances is less than or equal to the distance threshold, the image category of the image to be processed is determined to be the same as that of the first distance The first category corresponding to the two distances.
  • the image category of the image to be processed is determined by the relationship between the second distance and the distance threshold, and when the second distance is less than or equal to the distance threshold, it is determined that the image category of the image to be processed is relative to the object at the second distance.
  • the first category simple and fast, can improve the efficiency and accuracy of image classification.
  • determining the image category of the image to be processed according to the first feature and the class center features of multiple reference image categories in the feature library includes: when the second distance is greater than the In the case of the distance threshold, it is determined that the image category of the image to be processed is not the category of the multiple reference image categories.
  • the second distance when the second distance is greater than the distance threshold, it can be considered that the image to be processed does not belong to any one of the multiple reference image categories in the feature library, and a new image category needs to be determined for the image to be processed, so Can improve the accuracy of image classification.
  • the class center feature includes N class center features, where N is a positive integer
  • acquiring multiple first distances between the first feature and the multiple class center features includes : Perform quantization processing on the N class center features to obtain N feature vectors; obtain N third distances between the first feature and the N feature vectors; determine the N third distances K class center features corresponding to the smallest K approximate distances; determine the K first distances between the first feature and the K class center features, K is a positive integer and K ⁇ N.
  • the method further includes: extracting the class centers of the feature information of each reference image category in the feature library to obtain the class center features of each image category.
  • the class center features of each reference image category are obtained, which can improve the accuracy of the class center features.
  • performing feature extraction on the image to be processed to obtain the first feature of the image to be processed includes: performing feature extraction on the image to be processed to obtain the second feature of the image to be processed; The second feature is normalized to obtain the first feature of the image to be processed.
  • the second feature of the image to be processed is normalized, and the normalized feature value is used as the first feature of the image to be processed, so that the feature values of the first feature are all within a certain range, whereby, the complexity of calculation can be reduced and the calculation efficiency can be improved.
  • the method further includes: re-clustering the feature information of the multiple fourth categories in the case that the multiple fourth categories in the feature library correspond to the same object, Obtain the fifth category; perform class center extraction on the fifth category to obtain the class center features of the fifth category; add the class center features of the fifth category to the feature library, and add the first Five categories are added to multiple reference image categories.
  • multiple image categories of the same object in the feature library can be merged by re-clustering, so as to improve the accuracy of image classification, and thus the accuracy of image retrieval.
  • the method further includes: deleting the multiple fourth category center features from the feature library, and deleting the multiple first category features from the multiple reference image categories. Four categories.
  • the efficiency of image retrieval can be improved by deleting the class center features that do not exist in the feature library and the image categories that do not exist in the multiple reference image categories.
  • an image processing device including: a first feature extraction module, configured to perform feature extraction on an image to be processed, to obtain the first feature of the image to be processed;
  • the first feature and the class center feature of the multiple reference image categories in the feature library determine the image category of the image to be processed; the first update module is used to determine the image category of the image to be processed
  • the class center feature of the first category is updated according to the first feature and the multiple feature information of the first category in the feature library.
  • the device further includes: a second feature extraction module, which is configured to: if the image category of the image to be processed is not one of the multiple reference image categories, Perform class center extraction on the first feature of the image to be processed to obtain the class center feature of the second category of the image to be processed; the second update module is used to combine the first feature and the class center feature of the second category Adding to the feature library, and adding the second category to the multiple reference image categories.
  • a second feature extraction module which is configured to: if the image category of the image to be processed is not one of the multiple reference image categories, Perform class center extraction on the first feature of the image to be processed to obtain the class center feature of the second category of the image to be processed
  • the second update module is used to combine the first feature and the class center feature of the second category Adding to the feature library, and adding the second category to the multiple reference image categories.
  • the device further includes: a first clustering module, configured to perform a comparison of the image category of the image to be processed if the category of the multiple reference image categories Clustering the first feature of the image to be processed to obtain one or more third categories; the third feature extraction module is configured to perform class center extraction on each third category to obtain the class center feature of the third category; The third update module is configured to add the class center features of the first feature and the third category to the feature library, and add the third category to the multiple reference image categories.
  • a first clustering module configured to perform a comparison of the image category of the image to be processed if the category of the multiple reference image categories Clustering the first feature of the image to be processed to obtain one or more third categories
  • the third feature extraction module is configured to perform class center extraction on each third category to obtain the class center feature of the third category
  • the third update module is configured to add the class center features of the first feature and the third category to the feature library, and add the third category to the multiple reference image categories.
  • the category determining module includes: a distance determining submodule, configured to obtain multiple first distances between the first feature and multiple category center features; The module is configured to determine the image category of the image to be processed as the first category corresponding to the second distance when the second distance with the smallest distance value among the plurality of first distances is less than or equal to the distance threshold.
  • the category determining module includes: a second category determining submodule, configured to determine the image category of the image to be processed when the second distance is greater than the distance threshold It is not a category among the multiple reference image categories.
  • the class center features include N class center features, where N is a positive integer
  • the distance determination submodule is used to: quantize the N class center features to obtain N feature vectors; respectively obtain N third distances between the first feature and the N feature vectors; determine K class centers corresponding to the smallest K approximate distances among the N third distances Features; determine the K first distances between the first feature and the K class center features, K is a positive integer and K ⁇ N.
  • the device further includes: a fourth feature extraction module, configured to perform class center extraction on the feature information of each reference image category in the feature library to obtain the class center features of each image category.
  • the first feature extraction module includes: a feature extraction sub-module, configured to perform feature extraction on the image to be processed to obtain the second feature of the image to be processed; and a normalization sub-module, It is used to normalize the second feature to obtain the first feature of the image to be processed.
  • the device further includes: a second clustering module, which is configured to: when the multiple fourth categories in the feature library correspond to the same object, compare the multiple fourth categories Re-clustering the feature information of the fifth category to obtain the fifth category; the fifth feature extraction module is used to extract the category center of the fifth category to obtain the category center feature of the fifth category; the fourth update module is used to The class center feature of the fifth category is added to the feature library, and the fifth category is added to multiple reference image categories.
  • a second clustering module which is configured to: when the multiple fourth categories in the feature library correspond to the same object, compare the multiple fourth categories Re-clustering the feature information of the fifth category to obtain the fifth category
  • the fifth feature extraction module is used to extract the category center of the fifth category to obtain the category center feature of the fifth category
  • the fourth update module is used to The class center feature of the fifth category is added to the feature library, and the fifth category is added to multiple reference image categories.
  • the device further includes: a deletion module, configured to delete the plurality of class center features of the fourth category from the feature library, and delete from the plurality of reference image categories The plurality of fourth categories.
  • a deletion module configured to delete the plurality of class center features of the fourth category from the feature library, and delete from the plurality of reference image categories The plurality of fourth categories.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned image processing method.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned image processing method when executed by a processor.
  • a computer program including computer readable code, and when the computer readable code runs in an electronic device, a processor in the electronic device performs the above-mentioned image processing method.
  • the image category of the image to be processed can be determined based on the first feature of the image to be processed and the class center feature of the reference image category; when the image to be processed is an existing first category, Features and multiple feature information of the first category, update the class center feature of the first category, realize the clustering of the image to be processed, so that the image retrieval can be clustered and then retrieved, which improves the accuracy and recall rate of image retrieval. And through the comparison of the image to be processed and the center feature of the class, the number of image comparisons during retrieval is reduced, and the speed of image retrieval is increased. At the same time, the features of the image to be processed can be added to the feature library to increase the number of images and features corresponding to each category. Improve retrieval accuracy.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • Fig. 2 shows a schematic diagram of an application scenario of an image processing method according to an embodiment of the present disclosure.
  • Fig. 3 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
  • Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure. As shown in Fig. 1, the image processing method includes:
  • Step S11 performing feature extraction on the image to be processed to obtain the first feature of the image to be processed
  • Step S12 Determine the image category of the image to be processed according to the first feature and the class center features of multiple reference image categories in the feature library;
  • Step S13 in the case that the image category of the image to be processed is the first category of the multiple reference image categories, according to the first feature and the multiple of the first category in the feature library
  • the feature information updates the class center feature of the first category.
  • the image category of the image to be processed can be determined according to the first feature of the image to be processed and the class center feature of the reference image category; when the image to be processed is an existing first category, according to the first feature Features and multiple feature information of the first category, update the class center feature of the first category, realize the clustering of the image to be processed, so that the image retrieval can be clustered and then retrieved, which improves the accuracy and recall rate of image retrieval. And through the comparison of the image to be processed and the center feature of the class, the number of image comparisons during retrieval is reduced, and the speed of image retrieval is increased. At the same time, the features of the image to be processed can be added to the feature library to increase the number of images and features corresponding to each category. Improve retrieval accuracy.
  • the image processing method can be executed by electronic equipment such as a terminal device or a server.
  • the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, or a cordless
  • UE user equipment
  • PDAs personal digital assistants
  • the method can be implemented by a processor calling computer-readable instructions stored in a memory.
  • the method can be executed by a server.
  • the image to be processed may include one or more pictures or video frames, where the pictures or video frames include a human face.
  • the pictures or video frames include a human face.
  • they can be classified into one or more clusters according to factors such as face, time, and location.
  • a cluster is a preliminary classification of the image to be processed, and a cluster can contain one or more to be processed image.
  • multiple images of the same person are collected at different times. According to different collection times, the pictures of the same person can be divided into multiple clusters.
  • the image processing method can be used to process the image to be processed in real time or periodically. For example, you can perform image processing once a day or a week, or start image processing after a certain number of images to be processed are collected, or perform image processing before image retrieval.
  • the present disclosure does not limit the start timing of image processing.
  • step S11 feature extraction of the image to be processed may be performed to obtain the first feature of the image to be processed.
  • the first feature may include one or more feature information of the image to be processed, for example, the first feature includes multiple feature information of a human face.
  • the first feature may include multiple feature information of the multiple pictures.
  • the extracted feature information can be used as its first feature.
  • the present disclosure does not limit the method of feature extraction.
  • step S11 may include: performing feature extraction on the image to be processed to obtain the second feature of the image to be processed; performing normalization processing on the second feature to obtain the image to be processed The first feature.
  • the normalization process can generalize and unify the feature information, and unify the feature value within a certain range.
  • the normalization processing may include, for example, regularization processing, and the present disclosure does not limit the specific manner of the normalization processing.
  • the to-be-processed image may be determined according to the first feature and the class center features of multiple reference image categories in the feature library.
  • the image category of the processed image may be determined according to the first feature and the class center features of multiple reference image categories in the feature library.
  • the reference image category can be an image category classified in the feature library, and an image category can be a collection of images of a certain type, for example, a collection of images of the same person.
  • the center feature of the category can be determined.
  • a variety of clustering algorithms (such as k-average algorithm, mean shift algorithm, hierarchical clustering algorithm, etc.) can be used to determine the class center feature of the reference image category.
  • the clustering algorithm is different, the calculation method of the corresponding cluster center feature is also different.
  • Those skilled in the art can determine the method for determining the quasi-center feature according to the actual situation, which is not limited in this disclosure.
  • the image category of the image to be processed can be determined according to the first feature of the image to be processed and the category center features of the multiple reference image categories in the feature library. That is, the first feature of the image to be processed can be compared with the category center features of multiple reference image categories to determine the image category of the image to be processed. For example, when the k-average algorithm is used, the distance between the first feature of the image to be processed and the class center features of multiple reference image categories can be calculated respectively, and the image category of the image to be processed can be determined according to the distance.
  • the method may further include: extracting the class centers of the feature information of each reference image category in the feature library to obtain the class center features of each image category. That is to say, for each reference image category in the feature library, the feature information can be extracted by class center, and the extracted feature information can be used as the class center feature of each reference image category.
  • the clustering algorithm can be used to determine the extraction method of the cluster center. For example, when using the k-average algorithm to extract the cluster center, you can first determine the feature information of each image in the reference image category, and calculate the distance between each feature information (such as European Distance), and then determine the average value of each distance, and determine the feature information corresponding to the average value as the class center feature of the reference image category.
  • the present disclosure does not limit the method of class center extraction.
  • the class center features of each reference image category are obtained, which can improve the accuracy of the class center features.
  • step S12 may include: acquiring a plurality of first distances between the first feature and a plurality of class center features; among the plurality of first distances, the second distance with the smallest distance value is less than If it is equal to the distance threshold, the image category of the image to be processed is determined as the first category corresponding to the second distance.
  • the distance threshold can be set in advance, and the present disclosure does not limit the value of the distance threshold.
  • the distances between the first feature of the image to be processed and multiple center-like features can be calculated separately to obtain multiple first distances.
  • the first distance with the smallest distance value is taken as the second distance.
  • the relationship between the second distance and the preset distance threshold is determined. If the second distance is less than or equal to the distance threshold, the image category of the image to be processed may be determined as the first category corresponding to the second distance.
  • the image category of the image to be processed is determined by the relationship between the second distance and the distance threshold, and when the second distance is less than or equal to the distance threshold, it is determined that the image category of the image to be processed is relative to the object at the second distance.
  • the first category simple and fast, can improve the efficiency and accuracy of image classification.
  • the class center feature includes N class center features, where N is a positive integer
  • acquiring multiple first distances between the first feature and the multiple class center features includes : Perform quantization processing on the N class center features to obtain N feature vectors; obtain N third distances between the first feature and the N feature vectors; determine the N third distances K class center features corresponding to the smallest K third distances; determine the K first distances between the first feature and the K class center features, K is a positive integer and K ⁇ N.
  • the N class central features can be quantized separately to obtain N feature vectors.
  • the IVFADC algorithm in Faiss can be used to quantify N class central features, where the IVFADC algorithm includes a coarse quantizer (such as k-average). Algorithm) and product quantizer.
  • a rough quantizer such as k-average algorithm
  • N third distances between the first feature and the N feature vectors can be obtained respectively.
  • the asymmetric distance may be used to calculate N third distances between the first feature and the N feature vectors, where the third distance is an approximate distance (for example, approximate Euclidean distance).
  • x represents the first feature
  • y represents the class center feature
  • q represents the quantization process
  • q 1 represents the coarse quantizer
  • q 1 (y) represents the quantization result (quantization center) of the coarse quantizer
  • q 2 Represents the product quantizer
  • q 2 (yq 1 (y)) represents the result of product quantization
  • its input yq 1 (y) represents the residual of y and the quantization center.
  • the smallest K third distances can be selected from the N third distances, and K class center features corresponding to the K third distances can be determined.
  • K class center features the precise distances between the first feature and each class center feature (such as inner product distance) can be calculated separately, and the calculation result is taken as the K first distances between the first feature and the K class center features .
  • step S12 may include: in a case where the second distance is greater than the distance threshold, determining that the image category of the image to be processed is not a category among the multiple reference image categories. In other words, when the second distance is greater than the distance threshold, it can be considered that the image to be processed does not belong to any one of the multiple reference image categories in the feature library, and a new image category needs to be determined for the image to be processed, which can improve The accuracy of image classification.
  • step S13 in the case that the image category of the image to be processed is the first category of the multiple reference image categories, according to the first feature and the The multiple feature information of the first category in the feature database is updated to update the category center feature of the first category.
  • the first feature can be added to the first category as new feature information, and the distance between each feature information in the first category is calculated separately, and each distance is determined Use the feature information corresponding to the average value to update the class center feature of the first category.
  • Other clustering algorithms can also be used to update the class center features of the first category, which is not limited in the present disclosure. In this way, the class center feature of the reference image category in the feature library can be updated when a new image is added.
  • the method may further include: in a case where the image category of the image to be processed is not the category of the multiple reference image categories, performing the first feature of the image to be processed Class center extraction, to obtain the class center feature of the second category of the image to be processed; add the first feature and the class center feature of the second category to the feature library, and add the second category Added to the multiple reference image categories.
  • the uncategorized images to be processed can be aggregated
  • the category is the new category, the second category.
  • the first feature of the image to be processed can be extracted by class center to obtain the class center feature of the second category.
  • the extraction method of the class center is similar to the above, so I won't repeat it here.
  • the first feature and the class center features of the second category can be added to the feature library, and the second category can be added to multiple reference image categories , So that the new feature information and image categories can be updated to the feature library in time.
  • the feature information and image category in the feature library can be updated as new images increase, thereby The feature information and image categories in the feature library can be continuously enriched, and the accuracy of image retrieval can be improved.
  • the method may further include: in the case that the image category of the image to be processed is not a category of the multiple reference image categories, comparing the first feature of the image to be processed Perform clustering to obtain one or more third categories; perform class center extraction on each third category to obtain the class center features of the third category; combine the first features and the class centers of the third category
  • the feature is added to the feature library, and the third category is added to the multiple reference image categories.
  • the first feature of the image to be processed can be clustered to obtain one Or multiple third categories.
  • a third category may be obtained; when the image to be processed is multiple pictures of multiple objects, after clustering, multiple third categories may be obtained. category.
  • search in other images to be processed for example, search through Faiss
  • K similarity results you can draw an affinity map Search for link fluxes to determine clusters, or DFS (Deep First Search) recursive staining to determine clusters, where staining can be determined according to the similarity threshold. For example, if the similarity threshold is 0.7, then the pair is greater than The similarity results of the similarity threshold are colored, and the similarity results less than the similarity threshold are skipped.
  • DFS Deep First Search
  • each third category can be extracted separately to obtain the characteristics of the third category;
  • the first feature of the image and the class center feature of the third category are added to the feature library, and the third category is added to multiple reference image categories, so that the newly added feature information and image categories can be updated to the feature library in time.
  • the extraction method of the class center is similar to the above, and will not be repeated here.
  • the image to be processed when the image to be processed is a plurality of pictures, the image to be processed can be clustered when the image category matching fails to obtain one or more new image categories, and the new image category and class center feature Adding to the feature library allows the feature information and image categories in the feature library to be updated as new images increase, so that the feature information and image categories in the feature library can be continuously enriched, and the accuracy of image retrieval can be improved.
  • the method further includes: re-clustering the feature information of the multiple fourth categories in the case that the multiple fourth categories in the feature library correspond to the same object, Obtain the fifth category; perform class center extraction on the fifth category to obtain the class center features of the fifth category; add the class center features of the fifth category to the feature library, and add the first Five categories are added to multiple reference image categories.
  • multiple fourth categories corresponding to the same object means that the same object (for example, the same face) has multiple image categories in the feature database, that is, the fourth category.
  • the feature information of multiple fourth categories can be re-clustered to obtain the fifth category, that is, multiple image categories of the same object are merged into one image category through re-clustering.
  • the class center extraction of the fifth category can be performed to obtain the class center feature of the fifth category, and the class center feature of the fifth category can be added to the feature library, and the fifth category can be added to multiple reference images in.
  • multiple image categories of the same object in the feature library can be merged by re-clustering, so as to improve the accuracy of image classification, and thus the accuracy of image retrieval.
  • the method further includes: deleting the multiple fourth category center features from the feature library, and deleting the multiple first category features from the multiple reference image categories. Four categories.
  • the class center features of multiple fourth categories that have been re-clustered into the fifth category can be deleted from the feature library, and multiple fourth categories can be deleted from multiple reference image categories.
  • the class center features that do not exist in the feature library and the image categories that do not exist in multiple reference image categories can be deleted in time, thereby improving the efficiency of image retrieval.
  • Fig. 2 shows a schematic diagram of an application scenario of an image processing method according to an embodiment of the present disclosure.
  • feature extraction can be performed first to obtain its first feature 22; then, based on the first feature 21 and the class center features 23 of multiple reference image categories in the feature library, the similar
  • the algorithm in the sexual search library 29 determines the image category 24 of the image to be processed.
  • the image category 24 of the image 21 to be processed is the first category 26 among the multiple reference image categories
  • the first category 26 can be updated according to the first feature 21 and multiple feature information of the first category 26 in the feature library. Class center feature.
  • the processed image 21 can be clustered 27 by the algorithm in the similarity search library 29 (ie Faiss), and a new image category 28 can be determined according to the clustering result. , And add the first feature and the class center feature of the new image category 28 to the feature library, and add the new image category 28 to multiple reference image categories.
  • the similarity search library 29 ie Faiss
  • the image processing method of the embodiment of the present disclosure can determine the image category of the image to be processed according to the feature information of the image to be processed and the class center feature in the feature library, and update the feature library and image category to achieve clustering of the image to be processed , Not only can improve the retrieval speed and recall rate of image retrieval, especially face retrieval; it can also automatically build personnel files to improve image utilization.
  • clustering the image to be processed can improve the retrieval speed and recall rate of image retrieval, especially face retrieval.
  • face retrieval is an important scene for solving cases in the public security industry, and a series of information such as the identity of the suspect needs to be retrieved in a massive portrait database based on the picture of an unidentified suspect.
  • the image processing method of the embodiment of the present disclosure can realize the clustering of the image to be processed, and can automatically construct the personnel file, thereby improving the utilization rate of the image.
  • the captured pictures can be grouped into one category in a human dimension to achieve the integration of massive and scattered pictures, which can be seen in the system All the captured pictures related to the same person form a personal track, realize big data analysis, and assist case study and judgment.
  • the image processing method of the embodiment of the present disclosure can realize the automatic iteration of the image system through clustering.
  • the image category and its center can be updated, so that the system can continuously obtain Incremental training forms a positive feedback loop to improve system capabilities.
  • the present disclosure also provides image processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • image processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • Fig. 3 shows a block diagram of an image processing device according to an embodiment of the present disclosure. As shown in Fig. 3, the image processing device includes:
  • the first feature extraction module 31 is configured to perform feature extraction on the image to be processed to obtain the first feature of the image to be processed;
  • the category determining module 32 is configured to determine the image category of the image to be processed according to the first feature and the category center features of multiple reference image categories in the feature library;
  • the first update module 33 is configured to, when the image category of the image to be processed is the first category among the multiple reference image categories, according to the first feature and the first category in the feature
  • the multiple feature information in the library updates the class center feature of the first category.
  • the device further includes: a second feature extraction module, which is configured to: if the image category of the image to be processed is not one of the multiple reference image categories, Perform class center extraction on the first feature of the image to be processed to obtain the class center feature of the second category of the image to be processed; the second update module is used to combine the first feature and the class center feature of the second category Adding to the feature library, and adding the second category to the multiple reference image categories.
  • a second feature extraction module which is configured to: if the image category of the image to be processed is not one of the multiple reference image categories, Perform class center extraction on the first feature of the image to be processed to obtain the class center feature of the second category of the image to be processed
  • the second update module is used to combine the first feature and the class center feature of the second category Adding to the feature library, and adding the second category to the multiple reference image categories.
  • the device further includes: a first clustering module, configured to perform a comparison of the image category of the image to be processed if the category of the multiple reference image categories Clustering the first feature of the image to be processed to obtain one or more third categories; the third feature extraction module is configured to perform class center extraction on each third category to obtain the class center feature of the third category; The third update module is configured to add the class center features of the first feature and the third category to the feature library, and add the third category to the multiple reference image categories.
  • a first clustering module configured to perform a comparison of the image category of the image to be processed if the category of the multiple reference image categories Clustering the first feature of the image to be processed to obtain one or more third categories
  • the third feature extraction module is configured to perform class center extraction on each third category to obtain the class center feature of the third category
  • the third update module is configured to add the class center features of the first feature and the third category to the feature library, and add the third category to the multiple reference image categories.
  • the category determining module 32 includes: a distance determining sub-module for obtaining multiple first distances between the first feature and multiple category center features; the first category determining A sub-module, configured to determine the image category of the image to be processed as the first category corresponding to the second distance when the second distance with the smallest distance value among the multiple first distances is less than or equal to the distance threshold .
  • the category determining module 32 includes: a second category determining submodule, configured to determine the image of the image to be processed when the second distance is greater than the distance threshold The category is not among the multiple reference image categories.
  • the class center features include N class center features, where N is a positive integer
  • the distance determination submodule is used to: quantize the N class center features to obtain N feature vectors; respectively obtain N third distances between the first feature and the N feature vectors; determine K class centers corresponding to the smallest K approximate distances among the N third distances Features; determine the K first distances between the first feature and the K class center features, K is a positive integer and K ⁇ N.
  • the device further includes: a fourth feature extraction module, configured to perform class center extraction on the feature information of each reference image category in the feature library to obtain the class center features of each image category.
  • the first feature extraction module 31 includes: a feature extraction sub-module, configured to perform feature extraction on the image to be processed to obtain the second feature of the image to be processed; a normalization sub-module , Used to normalize the second feature to obtain the first feature of the image to be processed.
  • the device further includes: a second clustering module, which is configured to: when the multiple fourth categories in the feature library correspond to the same object, compare the multiple fourth categories Re-clustering the feature information of the fifth category to obtain the fifth category; the fifth feature extraction module is used to extract the category center of the fifth category to obtain the category center feature of the fifth category; the fourth update module is used to The class center feature of the fifth category is added to the feature library, and the fifth category is added to multiple reference image categories.
  • a second clustering module which is configured to: when the multiple fourth categories in the feature library correspond to the same object, compare the multiple fourth categories Re-clustering the feature information of the fifth category to obtain the fifth category
  • the fifth feature extraction module is used to extract the category center of the fifth category to obtain the category center feature of the fifth category
  • the fourth update module is used to The class center feature of the fifth category is added to the feature library, and the fifth category is added to multiple reference image categories.
  • the device further includes: a deletion module, configured to delete the plurality of class center features of the fourth category from the feature library, and delete from the plurality of reference image categories The plurality of fourth categories.
  • a deletion module configured to delete the plurality of class center features of the fourth category from the feature library, and delete from the plurality of reference image categories The plurality of fourth categories.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiment of the present disclosure also proposes a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
  • the embodiments of the present disclosure also provide a computer program product, the computer program includes computer readable code, and when the computer readable code runs in an electronic device, the processor in the electronic device executes to realize the above An image processing method provided by any embodiment.
  • the electronic device can be provided as a terminal, server or other form of device.
  • FIG. 4 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or nonvolatile 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, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 806 provides power for 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 the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC).
  • the microphone is configured to receive external audio signals.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • 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.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • FIG. 5 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server. 5
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply 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 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method, and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but 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.
  • Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • 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 via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more functions for implementing the specified logical function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Human Computer Interaction (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Computing Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法及装置、电子设备和存储介质。所述方法包括:对待处理图像进行特征提取,得到所述待处理图像的第一特征(S11);根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别(S12);在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征(S13)。该方法可提高图像检索的速度及准确率。

Description

图像处理方法及装置、电子设备和存储介质
本申请要求在2019年8月22日提交中国专利局、申请号为201910779555.3、发明名称为“图像处理方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。
背景技术
随着相关技术的发展,人脸检索得到了广泛应用,特别是在公安行业破案时,需要根据未确认身份的嫌疑人图像在海量人像库中进行检索。通常采用的人脸检索方式是将检索图片与数据库图片进行一一比对。
发明内容
本公开提出了一种图像处理技术方案。
根据本公开的一方面,提供了一种图像处理方法,包括:对待处理图像进行特征提取,得到所述待处理图像的第一特征;根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
在本实施例中,能够根据待处理图像的第一特征及参考图像类别的类中心特征,确定出待处理图像的图像类别;在待处理图像为已有的第一类别时,根据第一特征及第一类别的多个特征信息,更新第一类别的类中心特征,实现对待处理图像的聚类,从而可以在进行图像检索时先聚类再检索,提高图像检索准确率及召回率,并通过待处理图像与类中心特征的对比降低检索时的图像比对次数,提高图像检索速度,同时还可以将待处理图像的特征加入特征库,提高每个类别对应的图像及特征数量,进一步提高检索准确率。
在一种可能的实现方式中,所述方法还包括:在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图像的第二类别的类中心特征;将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
在本实施例中,通过在图像类别匹配失败时,根据第一特征为待处理图像建立新的图像类别,可以使得特征库中的特征信息及图像类别随着新图像的增加而得到更新,从而可以不断丰富特征库中的特征信息及图像类别,提高图像检索的准确率。
在一种可能的实现方式中,所述方法还包括:在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
在本实施例中,在待处理图像为多个图片时,能够在图像类别匹配失败时对待处理图像进行聚类,得到一个或多个新的图像类别,并将新的图像类别及类中心特征添加到特征库中,可以使得特征库中的特征信息及图像类别随着新图像的增加而得到更新,从而可以不断丰富特征库中的特征信息及图像类别,提高图像检索的准确率。
在一种可能的实现方式中,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别,包括:获取所述第一特征与多个类中心特征之间的多个第一距离;在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。
在本实施例中,通过第二距离与距离阈值的关系来确定待处理图像的图像类别,并在第二距离小于或等于距离阈值时,确定待处理图像的图像类别为与第二距离对象的第一类别,简单快速,可提高图像归类的效率及准确度。
在一种可能的实现方式中,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别,包括:在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。
在本实施例中,在第二距离大于距离阈值的情况下,可认为待处理图像不属于特征库中多个参考图像类别中的任意一个类别,需要为待处理图像确定新的图像类别,从而可提高图像归类的准确度。
在一种可能的实现方式中,所述类中心特征包括N个类中心特征,N为正整数,其中,获取所述第一特征与多个类中心特征之间的多个第一距离,包括:对N个类中心特征分别进行量化处理,得到N个特征向量;分别获取所述第一特征与所述N个特征向量之间的N个第三距离;确定与所述N个第三距离中最小的K个近似距离对应的K个类中心特征;确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
在本实施例中,通过对N个类中心特征进行量化与降维,在使用N个类中心特征中的K个类中心特征来计算第一距离时,可以减少运算量,从而可以提高多个第一距离的计算效率。
在一种可能的实现方式中,所述方法还包括:对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。
在本实施例中,通过对个参考图像类别的特征信息进行类中心提取,得到各参考图像类别的类中心特征,可以提高类中心特征的准确度。
在一种可能的实现方式中,对待处理图像进行特征提取,得到所述待处理图像的第一特征,包括:对待处理图像进行特征提取,得到所述待处理图像的第二特征;对所述 第二特征进行归一化处理,得到所述待处理图像的第一特征。
在本实施例中,对待处理图像的第二特征进行归一化处理,并将归一化后的特征值作为待处理图像的第一特征,使得第一特征的特征值均处于一定范围内,从而可以降低计算的复杂度,提高计算效率。
在一种可能的实现方式中,所述方法还包括:在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
在本实施例中,能够通过重新聚类将特征库中同一个对象的多个图像类别进行合并,提高图像归类的准确性,进而提高图像检索的准确性。
在一种可能的实现方式中,所述方法还包括:从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
在本实施例中,通过删除特征库中不存在的类中心特征以及多个参考图像类别中不存在的图像类别,可提高图像检索的效率。
根据本公开的一方面,提供了一种图像处理装置,包括:第一特征提取模块,用于对待处理图像进行特征提取,得到所述待处理图像的第一特征;类别确定模块,用于根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;第一更新模块,用于在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
在一种可能的实现方式中,所述装置还包括:第二特征提取模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图像的第二类别的类中心特征;第二更新模块,用于将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
在一种可能的实现方式中,所述装置还包括:第一聚类模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;第三特征提取模块,用于分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;第三更新模块,用于将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
在一种可能的实现方式中,所述类别确定模块,包括:距离确定子模块,用于获取所述第一特征与多个类中心特征之间的多个第一距离;第一类别确定子模块,用于在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。
在一种可能的实现方式中,所述类别确定模块,包括:第二类别确定子模块,用于 在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。
在一种可能的实现方式中,所述类中心特征包括N个类中心特征,N为正整数,其中,所述距离确定子模块,用于:对N个类中心特征分别进行量化处理,得到N个特征向量;分别获取所述第一特征与所述N个特征向量之间的N个第三距离;确定与所述N个第三距离中最小的K个近似距离对应的K个类中心特征;确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
在一种可能的实现方式中,所述装置还包括:第四特征提取模块,用于对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。
在一种可能的实现方式中,所述第一特征提取模块,包括:特征提取子模块,用于对待处理图像进行特征提取,得到所述待处理图像的第二特征;归一化子模块,用于对所述第二特征进行归一化处理,得到所述待处理图像的第一特征。
在一种可能的实现方式中,所述装置还包括:第二聚类模块,用于在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;第五特征提取模块,用于对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;第四更新模块,用于将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
在一种可能的实现方式中,所述装置还包括:删除模块,用于从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述图像处理方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述图像处理方法。
根据本公开的一方面,提供了一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行上述图像处理方法。
在本公开实施例中,能够根据待处理图像的第一特征及参考图像类别的类中心特征,确定出待处理图像的图像类别;在待处理图像为已有的第一类别时,根据第一特征及第一类别的多个特征信息,更新第一类别的类中心特征,实现对待处理图像的聚类,从而可以在进行图像检索时先聚类再检索,提高图像检索准确率及召回率,并通过待处理图像与类中心特征的对比降低检索时的图像比对次数,提高图像检索速度,同时还可以将待处理图像的特征加入特征库,提高每个类别对应的图像及特征数量,进一步提高检索准确率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清 楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的图像处理方法的流程图。
图2示出根据本公开实施例的图像处理方法的应用场景的示意图。
图3示出根据本公开实施例的图像处理装置的框图。
图4示出根据本公开实施例的一种电子设备的框图。
图5示出根据本公开实施例的一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
图1示出根据本公开实施例的图像处理方法的流程图,如图1所示,所述图像处理方法包括:
步骤S11,对待处理图像进行特征提取,得到所述待处理图像的第一特征;
步骤S12,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;
步骤S13,在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
根据本公开的实施例,能够根据待处理图像的第一特征及参考图像类别的类中心特 征,确定出待处理图像的图像类别;在待处理图像为已有的第一类别时,根据第一特征及第一类别的多个特征信息,更新第一类别的类中心特征,实现对待处理图像的聚类,从而可以在进行图像检索时先聚类再检索,提高图像检索准确率及召回率,并通过待处理图像与类中心特征的对比降低检索时的图像比对次数,提高图像检索速度,同时还可以将待处理图像的特征加入特征库,提高每个类别对应的图像及特征数量,进一步提高检索准确率。
在一种可能的实现方式中,所述图像处理方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。
在一种可能的实现方式中,所述待处理图像可以包括一张或多张图片或视频帧,其中,图片或视频帧中包括人脸。对于多个待处理图像,可以根据人脸、时间、地点等要素将其归入为一个或多个簇,其中,簇是对待处理图像的初步分类,一个簇中可包含一个或多个待处理图像。例如,分别在不同的时间对同一个人进行了多次图像采集,根据采集时间不同,可以将同一个人的图片分为多个簇。
在一种可能的实现方式中,可以使用所述图像处理方法实时或定期对待处理图像进行处理。例如,可以每天或每周进行一次图像处理,或在采集了一定数量的待处理图像后启动图像处理,或在进行图片检索前,进行图像处理。本公开对图像处理的启动时机不作限制。
在一种可能的实现方式中,可以在步骤S11中,对待处理图像进行特征提取,得到所述待处理图像的第一特征。其中,第一特征可包括待处理图像的一个或多个特征信息,例如第一特征包括人脸的多个特征信息。在待处理图像为多张图片时,第一特征可包括多张图片的多个特征信息。对待处理图像进行特征提取后,可以将提取的特征信息作为其第一特征。本公开对特征提取的方式不作限制。
在一种可能的实现方式中,步骤S11可包括:对待处理图像进行特征提取,得到所述待处理图像的第二特征;对所述第二特征进行归一化处理,得到所述待处理图像的第一特征。其中,归一化处理可以对特征信息进行归纳统一,将特征值统一在一定范围内。归一化处理可例如包括正则化处理,本公开对归一化处理的具体方式不作限制。
对待处理图像的第二特征进行归一化处理,并将归一化后的特征值作为待处理图像的第一特征,使得第一特征的特征值均处于一定范围内,从而可以降低计算的复杂度,提高计算效率。
在一种可能的实现方式中,在得到待处理图像的第一特征后,可以在步骤S12中,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别。
其中,参考图像类别可以是特征库中已归类的图像类别,一个图像类别可以是某一 类图像的集合,例如同一个人的图像集合。
对于每个参考图像类别,可以确定出其类中心特征。可使用多种聚类算法(例如k-平均算法、均值漂移算法、层次聚类算法等)的类中心确定方式来确定参考图像类别的类中心特征。其中,聚类算法不同,其对应的类中心特征的计算方式也不同。本领域技术人员可根据实际情况确定类中心特征的确定方式,本公开对此不作限制。
在确定出多个参考图像类别的类中心特征后,可根据待处理图像的第一特征以及特征库中多个参考图像类别的类中心特征,可以确定待处理图像的图像类别。即,可将待处理图像的第一特征与多个参考图像类别的类别中心特征进行比对,确定待处理图像的图像类别。例如,使用k-平均算法时,可分别计算待处理图像的第一特征与多个参考图像类别的类中心特征的距离,根据该距离来确定待处理图像的图像类别。
在一种可能的实现方式中,在步骤S12之前,所述方法还可包括:对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。也就是说,对于特征库中的各个参考图像类别,可以分别对其特征信息进行类中心提取,将提取的特征信息作为各个参考图像类别的类中心特征。可根据聚类算法来确定类中心的提取方式,例如,使用k-平均算法进行类中心提取时,可首先确定参考图像类别中各个图像的特征信息,计算各个特征信息之间的距离(例如欧式距离),然后确定各个距离的平均值,并将与该平均值对应的特征信息确定为参考图像类别的类中心特征。本公开对类中心提取的方法不作限制。
在本实施例中,通过对个参考图像类别的特征信息进行类中心提取,得到各参考图像类别的类中心特征,可以提高类中心特征的准确度。
在一种可能的实现方式中,步骤S12可包括:获取所述第一特征与多个类中心特征之间的多个第一距离;在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。其中,距离阈值可以预先设置,本公开对距离阈值的取值不作限制。
在一种可能的实现方式中,可以分别计算待处理图像的第一特征与多个类中心特征之间的距离,得到多个第一距离。在多个第一距离中,将距离值最小的第一距离作为第二距离。之后,判断第二距离与预设的距离阈值之间的关系。如果第二距离小于或等于距离阈值,可以将待处理图像的图像类别确定为与第二距离对应的第一类别。
在本实施例中,通过第二距离与距离阈值的关系来确定待处理图像的图像类别,并在第二距离小于或等于距离阈值时,确定待处理图像的图像类别为与第二距离对象的第一类别,简单快速,可提高图像归类的效率及准确度。
在一种可能的实现方式中,所述类中心特征包括N个类中心特征,N为正整数,其中,获取所述第一特征与多个类中心特征之间的多个第一距离,包括:对N个类中心特征分别进行量化处理,得到N个特征向量;分别获取所述第一特征与所述N个特征向量之间的N个第三距离;确定与所述N个第三距离中最小的K个第三距离对应的K个类中心特征;确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
在一种可能的实现方式中,可以对N个类中心特征分别进行量化处理,得到N个特征向量。例如,可以使用Faiss(Facebook AI Similarity Search,是由Facebook提供的开源相似性搜索库)中的IVFADC算法来对N个类中心特征进行量化处理,其中,IVFADC算法包括粗量化器(例如k-平均算法)和乘积量化器。可以首先使用粗量化器(例如k-平均算法)对N个类中心特征进行粗略量化,将N个类中心特征分为P组(P为正整数且P<N),分别计算每组的量化中心,以及组内每个向量与量化中心的残差向量;然后使用乘积量化器对各个残差向量进行乘积量化,将D维残差向量沿维度分成M(D、M均为正整数且M<D)个子向量并对一个子向量进行粗略量化,使D维残差向量压缩至M维,从而得到N个类中心特征对应的N个M维特征向量。
在一种可能的实现方式中,可以分别获取第一特征与N个特征向量之间的N个第三距离。例如,可以使用非对称距离计算第一特征与N个特征向量之间的N个第三距离,其中,第三距离为近似距离(例如近似欧式距离)。
在一种可能的实现方式中,可以使用下述公式(1)来计算第三距离:
Figure PCTCN2020092391-appb-000001
在公式(1)中,x表示第一特征,y表示类中心特征,q表示量化处理,q 1表示粗量化器,q 1(y)表示粗量化器的量化结果(量化中心),q 2表示乘积量化器,q 2(y-q 1(y))表示乘积量化的结果,其输入y-q 1(y)表示y与量化中心的残差。
在一种可能的实现方式中,可以从N个第三距离中选取最小的K个第三距离,并确定出与K个第三距离对应的K个类中心特征。对于K个类中心特征,可以分别计算第一特征与每个类中心特征的精确距离(例如内积距离),将计算结果作为第一特征与K个类中心特征之间的K个第一距离。
通过对N个类中心特征进行量化与降维,在使用N个类中心特征中的K个类中心特征来计算第一距离时,可以减少运算量,从而可以提高多个第一距离的计算效率。
在一种可能的实现方式中,步骤S12可包括:在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。也就是说,在第二距离大于距离阈值的情况下,可认为待处理图像不属于特征库中多个参考图像类别中的任意一个类别,需要为待处理图像确定新的图像类别,从而可提高图像归类的准确度。
在一种可能的实现方式中,在步骤S13中,可在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。例如,使用k-平均算法更新 第一类别的类中心特征时,可将第一特征作为新的特征信息加入第一类别,分别计算第一类别中各个特征信息之间的距离,并确定各个距离的平均值,使用与该平均值对应的特征信息更新第一类别的类中心特征。还可使用其他聚类算法来更新第一类别的类中心特征,本公开对此不作限制。通过这种方式,可以使得特征库中参考图像类别的类中心特征在加入新图像时得到更新。
在一种可能的实现方式中,所述方法还可包括:在所述待处理图像的图像类别不是所述多个参考图像类别的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图像的第二类别的类中心特征;将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
在一种可能的实现方式中,在待处理图像为一张图片,且待处理图像的图像类别不属于多个参考图像类别中的任意一个类别的情况下,可将无类别的待处理图像聚类为新的类别即第二类别。在该情况下,可以对待处理图像的第一特征进行类中心提取,得到所述第二类别的类中心特征。类中心的提取方式与上文类似,此处不再赘述。
在一种可能的实现方式中,在确定第二类别的类中心特征后,可将第一特征以及第二类别的类中心特征添加到特征库,将第二类别添加到多个参考图像类别中,使得新增的特征信息及图像类别可以及时更新至特征库中。
在本实施例中,通过在图像类别匹配失败时,根据第一特征为待处理图像建立新的图像类别,可以使得特征库中的特征信息及图像类别随着新图像的增加而得到更新,从而可以不断丰富特征库中的特征信息及图像类别,提高图像检索的准确率。
在一种可能的实现方式中,所述方法还可包括:在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
举例来说,在待处理图像为多张图片,且待处理图像的图像类别不属于多个参考图像类别中的任意一个类别的情况下,可对待处理图像的第一特征进行聚类,得到一个或多个第三类别。其中,待处理图像为一个对象的多张图片时,进行聚类后,可能得到一个第三类别;待处理图像为多个对象的多张图片时,进行聚类后,可能得到多个第三类别。
例如,可以根据一个待处理图像的第一特征,在其他多个待处理图像中搜索(例如通过Faiss进行搜索),得到前K个相似度结果;对于K个相似度结果,可以通过绘制亲和力图寻找联通量来确定聚类,或者通过DFS(Deep First Search,深度优先搜索)递归染色来确定聚类,其中,是否染色可根据相似度阈值来确定,例如,相似度阈值为0.7,则对大于相似度阈值的相似度结果进行染色,对小于相似度阈值的相似度结果则跳过。应当理解,还可以使用其他聚类算法对待处理图像进行聚类,本公开对此不作限制。
在一种可能的实现方式中,对待处理图像进行聚类得到一个或多个第三类别后,可 分别对各个第三类别进行类中心提取,得到第三类别的类中心特征;可将待处理图像的第一特征以及第三类别的类中心特征添加到特征库中,并将第三类别添加到多个参考图像类别中,使得新增的特征信息及图像类别可以及时更新至特征库中。其中,类中心的提取方式与上文类似,此处不再赘述。
在本实施例中,在待处理图像为多个图片时,能够在图像类别匹配失败时对待处理图像进行聚类,得到一个或多个新的图像类别,并将新的图像类别及类中心特征添加到特征库中,可以使得特征库中的特征信息及图像类别随着新图像的增加而得到更新,从而可以不断丰富特征库中的特征信息及图像类别,提高图像检索的准确率。
在一种可能的实现方式中,所述方法还包括:在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
其中,多个第四类别对应同一对象是指同一个对象(例如同一个人脸)在特征库中有多个图像类别,即第四类别。在该情况下,可将多个第四类别的特征信息进行重新聚类,得到第五类别,即将同一个对象的多个图像类别通过重新聚类合并为一个图像类别。
在得到第五类别后,可对第五类别进行类中心提取,得到第五类别的类中心特征,并将第五类别的类中心特征添加到特征库,将第五类别添加到多个参考图像中。
在本实施例中,能够通过重新聚类将特征库中同一个对象的多个图像类别进行合并,提高图像归类的准确性,进而提高图像检索的准确性。
在一种可能的实现方式中,所述方法还包括:从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
也就是说,可将已经重新聚类为第五类别的多个第四类别的类中心特征从特征库中删除,并将多个第四类别从多个参考图像类别中删除。通过这种方式,可及时删除特征库中不存在的类中心特征以及多个参考图像类别中不存在的图像类别,从而提高图像检索的效率。
图2示出根据本公开实施例的图像处理方法的应用场景的示意图。如图2所示,对于待处理图像21,可以首先进行特征提取,得到其第一特征22;然后,可以根据第一特征21以及特征库中多个参考图像类别的类中心特征23,通过相似性搜索库29(即Faiss)中的算法确定待处理图像的图像类别24。在待处理图像21的图像类别24为多个参考图像类别中的第一类别26时,可以根据第一特征21以及第一类别26在特征库中的多个特征信息,更新第一类别26的类中心特征。在待处理图像21的图像类别24为无类别25时,可以通过相似性搜索库29(即Faiss)中的算法对处理图像21进行聚类27,根据聚类结果,可以确定新的图像类别28,并将第一特征以及新的图像类别28的类中心特征添加至特征库中,将新的图像类别28添加到多个参考图像类别中。
本公开的实施例的图像处理方法,可以根据待处理图像的特征信息及特征库中的类中心特征,确定待处理图像的图像类别,并更新特征库及图像类别,实现对待处理图像 的聚类,不仅可以提高图像检索特别是人脸检索的检索速度和召回率;还可以自动构建人员档案,提高图像利用率。
在进行图像检索前,对待处理图像进行聚类,可以提高图像检索,特别是人脸检索的检索速度和召回率。例如,人脸检索是公安行业破案的重要场景,需要根据未确认身份的嫌疑人图片在海量人像库中进行检索来确定嫌疑人身份等一系列信息。在检索前,可以对嫌疑人图片进行图像处理,确定其图像类别(聚类);在检索时,通过嫌疑人图片与类中心特征的比对,可以提高检索速度及召回率,从而可以更快速地返回更准确的嫌疑人信息,帮助公安工作人员更快地研判嫌疑人信息与破案。
本公开的实施例的图像处理方法,可以实现对待处理图像的聚类可以自动构建人员档案,提高图像的利用率。例如,在公安信息系统中,存在海量的抓拍图片,对这些抓拍图片进行图像处理后,可以将抓拍图片以人为维度聚为一类,实现海量、零散图片的整合,从而在系统中可以看到与同一人相关的所有抓拍图片,形成个人轨迹,实现大数据分析,辅助案情研判。
本公开的实施例的图像处理方法,可以通过聚类实现图像系统的自动迭代,对于不断新增的待处理图像,每次进行聚类后,可以更新图像类别及其类中心,使得系统不断得到增量训练,形成正反馈循环,提高系统能力。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
图3示出根据本公开实施例的图像处理装置的框图,如图3所示,所述图像处理装置包括:
第一特征提取模块31,用于对待处理图像进行特征提取,得到所述待处理图像的第一特征;
类别确定模块32,用于根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;
第一更新模块33,用于在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
在一种可能的实现方式中,所述装置还包括:第二特征提取模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图像的第二类别的类中心特征;第二更新模 块,用于将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
在一种可能的实现方式中,所述装置还包括:第一聚类模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;第三特征提取模块,用于分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;第三更新模块,用于将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
在一种可能的实现方式中,所述类别确定模块32,包括:距离确定子模块,用于获取所述第一特征与多个类中心特征之间的多个第一距离;第一类别确定子模块,用于在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。
在一种可能的实现方式中,所述类别确定模块32,包括:第二类别确定子模块,用于在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。
在一种可能的实现方式中,所述类中心特征包括N个类中心特征,N为正整数,其中,所述距离确定子模块,用于:对N个类中心特征分别进行量化处理,得到N个特征向量;分别获取所述第一特征与所述N个特征向量之间的N个第三距离;确定与所述N个第三距离中最小的K个近似距离对应的K个类中心特征;确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
在一种可能的实现方式中,所述装置还包括:第四特征提取模块,用于对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。
在一种可能的实现方式中,所述第一特征提取模块31,包括:特征提取子模块,用于对待处理图像进行特征提取,得到所述待处理图像的第二特征;归一化子模块,用于对所述第二特征进行归一化处理,得到所述待处理图像的第一特征。
在一种可能的实现方式中,所述装置还包括:第二聚类模块,用于在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;第五特征提取模块,用于对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;第四更新模块,用于将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
在一种可能的实现方式中,所述装置还包括:删除模块,用于从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述 计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质或易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
本公开实施例还提供了一种计算机程序产品,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述任一实施例提供的图像处理方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图4示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图4,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图5示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图5,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理, 一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
在不违背逻辑的情况下,本公开不同实施例之间可以相互结合,不同实施例描述有所侧重,为侧重描述的部分可以参见其他实施例的记载。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (23)

  1. 一种图像处理方法,其特征在于,包括:
    对待处理图像进行特征提取,得到所述待处理图像的第一特征;
    根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;
    在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图像的第二类别的类中心特征;
    将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;
    分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;
    将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
  4. 根据权利要求1所述的方法,其特征在于,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别,包括:
    获取所述第一特征与多个类中心特征之间的多个第一距离;
    在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。
  5. 根据权利要求4所述的方法,其特征在于,根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别,包括:
    在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。
  6. 根据权利要求4或5所述的方法,其特征在于,所述类中心特征包括N个类中心特征,N为正整数,其中,获取所述第一特征与多个类中心特征之间的多个第一距离,包括:
    对N个类中心特征分别进行量化处理,得到N个特征向量;
    分别获取所述第一特征与所述N个特征向量之间的N个第三距离;
    确定与所述N个第三距离中最小的K个近似距离对应的K个类中心特征;
    确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述方法还包括:
    对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。
  8. 根据权利要求1-7中任意一项所述的方法,其特征在于,对待处理图像进行特征提取,得到所述待处理图像的第一特征,包括:
    对待处理图像进行特征提取,得到所述待处理图像的第二特征;
    对所述第二特征进行归一化处理,得到所述待处理图像的第一特征。
  9. 根据权利要求1-8中任意一项所述的方法,其特征在于,所述方法还包括:
    在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;
    对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;
    将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
  11. 一种图像处理装置,其特征在于,包括:
    第一特征提取模块,用于对待处理图像进行特征提取,得到所述待处理图像的第一特征;
    类别确定模块,用于根据所述第一特征以及特征库中多个参考图像类别的类中心特征,确定所述待处理图像的图像类别;
    第一更新模块,用于在所述待处理图像的图像类别为所述多个参考图像类别中的第一类别的情况下,根据所述第一特征以及所述第一类别在所述特征库中的多个特征信息,更新所述第一类别的类中心特征。
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括:
    第二特征提取模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行类中心提取,得到所述待处理图 像的第二类别的类中心特征;
    第二更新模块,用于将所述第一特征及所述第二类别的类中心特征添加到所述特征库中,并将所述第二类别添加到所述多个参考图像类别中。
  13. 根据权利要求11所述的装置,其特征在于,所述装置还包括:
    第一聚类模块,用于在所述待处理图像的图像类别不是所述多个参考图像类别中的类别的情况下,对所述待处理图像的第一特征进行聚类,得到一个或多个第三类别;
    第三特征提取模块,用于分别对各个第三类别进行类中心提取,得到所述第三类别的类中心特征;
    第三更新模块,用于将所述第一特征及所述第三类别的类中心特征添加到所述特征库中,并将所述第三类别添加到所述多个参考图像类别中。
  14. 根据权利要求11所述的装置,其特征在于,所述类别确定模块,包括:
    距离确定子模块,用于获取所述第一特征与多个类中心特征之间的多个第一距离;
    第一类别确定子模块,用于在多个第一距离中距离值最小的第二距离小于或等于距离阈值的情况下,将所述待处理图像的图像类别确定为与所述第二距离对应的第一类别。
  15. 根据权利要求14所述的装置,其特征在于,所述类别确定模块,包括:
    第二类别确定子模块,用于在所述第二距离大于所述距离阈值的情况下,确定所述待处理图像的图像类别不是所述多个参考图像类别中的类别。
  16. 根据权利要求14或15所述的装置,其特征在于,所述类中心特征包括N个类中心特征,N为正整数,其中,所述距离确定子模块,用于:
    对N个类中心特征分别进行量化处理,得到N个特征向量;
    分别获取所述第一特征与所述N个特征向量之间的N个第三距离;
    确定与所述N个第三距离中最小的K个近似距离对应的K个类中心特征;
    确定所述第一特征与所述K个类中心特征之间的K个第一距离,K为正整数且K<N。
  17. 根据权利要求11-16中任意一项所述的装置,其特征在于,所述装置还包括:
    第四特征提取模块,用于对特征库中各个参考图像类别的特征信息分别进行类中心提取,得到各个图像类别的类中心特征。
  18. 根据权利要求11-17中任意一项所述的装置,其特征在于,所述第一特征提取模块,包括:
    特征提取子模块,用于对待处理图像进行特征提取,得到所述待处理图像的第二特征;
    归一化子模块,用于对所述第二特征进行归一化处理,得到所述待处理图像的第一特征。
  19. 根据权利要求11-18中任意一项所述的装置,其特征在于,所述装置还包括:
    第二聚类模块,用于在所述特征库中的多个第四类别对应同一对象的情况下,对所述多个第四类别的特征信息进行重新聚类,得到第五类别;
    第五特征提取模块,用于对所述第五类别进行类中心提取,得到所述第五类别的类中心特征;
    第四更新模块,用于将所述第五类别的类中心特征添加到所述特征库中,并将所述第五类别添加到多个参考图像类别中。
  20. 根据权利要求19所述的装置,其特征在于,所述装置还包括:
    删除模块,用于从所述特征库中删除所述多个第四类别的类中心特征,并从所述多个参考图像类别中删除所述多个第四类别。
  21. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:执行权利要求1至10中任意一项所述的方法。
  22. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至10中任意一项所述的方法。
  23. 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至10中任意一项所述的方法。
PCT/CN2020/092391 2019-08-22 2020-05-26 图像处理方法及装置、电子设备和存储介质 WO2021031645A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021558009A JP2022526381A (ja) 2019-08-22 2020-05-26 画像処理方法及び装置、電子機器並びに記憶媒体
US17/488,634 US20220019838A1 (en) 2019-08-22 2021-09-29 Image Processing Method and Device, and Storage Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910779555.3A CN110472091B (zh) 2019-08-22 2019-08-22 图像处理方法及装置、电子设备和存储介质
CN201910779555.3 2019-08-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/488,634 Continuation US20220019838A1 (en) 2019-08-22 2021-09-29 Image Processing Method and Device, and Storage Medium

Publications (1)

Publication Number Publication Date
WO2021031645A1 true WO2021031645A1 (zh) 2021-02-25

Family

ID=68513418

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092391 WO2021031645A1 (zh) 2019-08-22 2020-05-26 图像处理方法及装置、电子设备和存储介质

Country Status (5)

Country Link
US (1) US20220019838A1 (zh)
JP (1) JP2022526381A (zh)
CN (1) CN110472091B (zh)
TW (1) TW202109314A (zh)
WO (1) WO2021031645A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7504236B2 (ja) 2021-06-25 2024-06-21 エルアンドティー テクノロジー サービシズ リミテッド データサンプルをクラスタ化する方法およびシステム

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472091B (zh) * 2019-08-22 2022-01-11 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质
CN110929072A (zh) * 2019-11-29 2020-03-27 深圳市商汤科技有限公司 聚类系统及方法、电子设备和存储介质
CN111079653B (zh) * 2019-12-18 2024-03-22 中国工商银行股份有限公司 数据库自动分库方法及装置
CN111309946B (zh) * 2020-02-10 2023-04-07 浙江大华技术股份有限公司 一种已建立档案优化方法及装置
CN111177435B (zh) * 2019-12-31 2023-03-31 重庆邮电大学 一种基于改进pq算法的cbir方法
CN111242217A (zh) * 2020-01-13 2020-06-05 支付宝实验室(新加坡)有限公司 图像识别模型的训练方法、装置、电子设备及存储介质
CN112668632B (zh) * 2020-12-25 2022-04-08 浙江大华技术股份有限公司 一种数据处理方法、装置、计算机设备及存储介质
CN112949710B (zh) * 2021-02-26 2023-06-13 北京百度网讯科技有限公司 一种图像的聚类方法和装置
CN116881485A (zh) * 2023-06-19 2023-10-13 北京百度网讯科技有限公司 生成图像检索索引的方法及装置、电子设备和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080101705A1 (en) * 2006-10-31 2008-05-01 Motorola, Inc. System for pattern recognition with q-metrics
CN102009879A (zh) * 2010-11-18 2011-04-13 无锡中星微电子有限公司 电梯自动按键控制系统、方法和人脸模型训练系统、方法
CN108664920A (zh) * 2018-05-10 2018-10-16 深圳市深网视界科技有限公司 一种实时的大规模级联人脸聚类方法和装置
CN109726674A (zh) * 2018-12-28 2019-05-07 上海依图网络科技有限公司 一种人脸识别方法及装置
CN109753577A (zh) * 2018-12-29 2019-05-14 深圳云天励飞技术有限公司 一种搜索人脸的方法及相关装置
CN110472091A (zh) * 2019-08-22 2019-11-19 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016006090A1 (ja) * 2014-07-10 2016-01-14 株式会社東芝 電子機器、方法及びプログラム
CN106547744B (zh) * 2015-09-16 2020-11-06 杭州海康威视数字技术股份有限公司 一种图像检索方法及系统
JP2018120527A (ja) * 2017-01-27 2018-08-02 株式会社リコー 画像処理装置、画像処理方法及び画像処理システム
US10621416B2 (en) * 2017-10-02 2020-04-14 Microsoft Technology Licensing, Llc Image processing for person recognition
JP2019082959A (ja) * 2017-10-31 2019-05-30 キヤノン株式会社 情報処理装置、情報処理方法及びプログラム
CN109213732B (zh) * 2018-06-28 2022-03-18 努比亚技术有限公司 一种改善相册分类的方法、移动终端及计算机可读存储介质
CN109657711A (zh) * 2018-12-10 2019-04-19 广东浪潮大数据研究有限公司 一种图像分类方法、装置、设备及可读存储介质
CN111260032A (zh) * 2020-01-14 2020-06-09 北京迈格威科技有限公司 神经网络训练方法、图像处理方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080101705A1 (en) * 2006-10-31 2008-05-01 Motorola, Inc. System for pattern recognition with q-metrics
CN102009879A (zh) * 2010-11-18 2011-04-13 无锡中星微电子有限公司 电梯自动按键控制系统、方法和人脸模型训练系统、方法
CN108664920A (zh) * 2018-05-10 2018-10-16 深圳市深网视界科技有限公司 一种实时的大规模级联人脸聚类方法和装置
CN109726674A (zh) * 2018-12-28 2019-05-07 上海依图网络科技有限公司 一种人脸识别方法及装置
CN109753577A (zh) * 2018-12-29 2019-05-14 深圳云天励飞技术有限公司 一种搜索人脸的方法及相关装置
CN110472091A (zh) * 2019-08-22 2019-11-19 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7504236B2 (ja) 2021-06-25 2024-06-21 エルアンドティー テクノロジー サービシズ リミテッド データサンプルをクラスタ化する方法およびシステム

Also Published As

Publication number Publication date
US20220019838A1 (en) 2022-01-20
JP2022526381A (ja) 2022-05-24
CN110472091A (zh) 2019-11-19
CN110472091B (zh) 2022-01-11
TW202109314A (zh) 2021-03-01

Similar Documents

Publication Publication Date Title
WO2021031645A1 (zh) 图像处理方法及装置、电子设备和存储介质
TWI754855B (zh) 人臉圖像識別方法、裝置、電子設備及儲存介質
JP7171884B2 (ja) 歩行者認識方法及び装置
US11120078B2 (en) Method and device for video processing, electronic device, and storage medium
WO2021036382A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021027343A1 (zh) 一种人脸图像识别方法及装置、电子设备和存储介质
KR20200113195A (ko) 이미지 클러스터링 방법 및 장치, 전자 기기 및 저장 매체
CN110781957B (zh) 图像处理方法及装置、电子设备和存储介质
WO2017028416A1 (zh) 分类器训练方法、类型识别方法及装置
TWI761851B (zh) 圖像處理方法、圖像處理裝置、電子設備和電腦可讀儲存媒體
CN111259967B (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
CN112101238A (zh) 聚类方法及装置、电子设备和存储介质
CN110659690B (zh) 神经网络的构建方法及装置、电子设备和存储介质
CN110532956B (zh) 图像处理方法及装置、电子设备和存储介质
TWI785267B (zh) 影像處理方法、電子設備和儲存介質
CN112926310B (zh) 一种关键词提取方法及装置
TWI779449B (zh) 對象計數方法、電子設備、電腦可讀儲存介質
CN109101542B (zh) 图像识别结果输出方法及装置、电子设备和存储介质
CN112307281A (zh) 一种实体推荐方法及装置
WO2021164100A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN114332503A (zh) 对象重识别方法及装置、电子设备和存储介质
CN114168798A (zh) 文本存储管理与检索方法及装置
CN111062407B (zh) 图像处理方法及装置、电子设备和存储介质
WO2023092975A1 (zh) 图像处理方法及装置、电子设备、存储介质及计算机程序产品
CN112131999B (zh) 身份确定方法及装置、电子设备和存储介质

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: 20855738

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021558009

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20855738

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20855738

Country of ref document: EP

Kind code of ref document: A1