WO2021027344A1 - Image processing method and device, electronic apparatus, and storage medium - Google Patents

Image processing method and device, electronic apparatus, and storage medium Download PDF

Info

Publication number
WO2021027344A1
WO2021027344A1 PCT/CN2020/089402 CN2020089402W WO2021027344A1 WO 2021027344 A1 WO2021027344 A1 WO 2021027344A1 CN 2020089402 W CN2020089402 W CN 2020089402W WO 2021027344 A1 WO2021027344 A1 WO 2021027344A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature
features
images
similarity
Prior art date
Application number
PCT/CN2020/089402
Other languages
French (fr)
Chinese (zh)
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 JP2022504708A priority Critical patent/JP2022542127A/en
Priority to KR1020227003244A priority patent/KR20220025052A/en
Publication of WO2021027344A1 publication Critical patent/WO2021027344A1/en

Links

Images

Classifications

    • 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/51Indexing; Data structures therefor; Storage structures
    • 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/54Browsing; Visualisation therefor
    • 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/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular to an image processing method and device, electronic equipment, and storage medium.
  • the present disclosure provides a technical solution for image processing.
  • an image processing method including: acquiring an image data set, the image data set including a plurality of images and first indexes respectively associated with the plurality of images, the first The index is used to determine the spatio-temporal data of the object in the image; perform distributed clustering processing on the images in the image data set to obtain at least one cluster; based on the obtained first cluster associated with the images in the cluster The index determines the spatiotemporal trajectory information of the object corresponding to the cluster.
  • the method further includes: acquiring image features of the input image; performing quantization processing on the image features of the input image to obtain the quantized features of the input image; based on the quantized features of the input image And the cluster center of the at least one cluster obtained by the distributed clustering process to determine the cluster where the input image is located.
  • the determining the cluster where the input image is located based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering processing includes: Obtain the third degree of similarity between the quantized feature of the input image and the quantized feature of the cluster center of the at least one cluster obtained by the distributed clustering process; determine the degree of similarity between the quantized feature of the input image The K3 class centers with the third highest similarity, where K3 is an integer greater than or equal to 1, obtain the fourth similarity between the image features of the input image and the image features of the K3 class centers; in response to the The fourth similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest, and the fourth similarity is greater than the third threshold, the input image is added to any one of the The cluster corresponding to the cluster center.
  • the determining the cluster where the input image is located based on the quantized feature of the input image and the cluster center obtained by the distributed clustering processing further includes responding to There is no class center whose fourth similarity with the image features of the input image is greater than the third threshold, and the distributed clustering is performed based on the quantized features of the input image and the quantized features of the images in the image data set. Class processing, at least one new cluster is obtained.
  • the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
  • the performing distributed clustering processing on the images in the image data set to obtain at least one cluster includes: acquiring image features of the images in the image data set in a distributed and parallel manner Distributed parallel quantization processing on the image features to obtain the quantized features corresponding to the image features; based on the quantized features corresponding to the image in the image data set, the distributed clustering processing is performed to obtain the At least one cluster.
  • the distributed and parallel acquisition of the image features of the images in the image data set includes: grouping the multiple images in the image data set to obtain multiple image groups Input the multiple image groups into multiple feature extraction models, and use the multiple feature extraction models to execute feature extraction processing of images in the image group corresponding to the feature extraction model in a distributed and parallel manner to obtain the multiple The image features of each image, where each feature extraction model inputs different image groups.
  • the distributed and parallel quantization processing on the image features to obtain the quantized features corresponding to the image features includes: grouping the image features of the multiple images to obtain multiple The first grouping, the first grouping includes image features of at least one image; the quantization processing of the image features of the plurality of first groups is executed in parallel in a distributed manner to obtain the quantized features corresponding to the image features.
  • the method before the distributed and parallel execution of the quantization processing of the image features of the multiple first groups to obtain the quantized features corresponding to the image features, the method further includes: Configure second indexes for each of the first groups to obtain multiple second indexes; the distributed and parallel execution of the quantization processing of the image features of the multiple first groups to obtain the quantized features corresponding to the image features includes: The plurality of second indexes are respectively allocated to a plurality of quantizers, and each of the plurality of quantizers is allocated a different second index; the plurality of quantizers are used to execute the allocated second indexes respectively in parallel Quantization processing of image features in the first group corresponding to the second index.
  • the quantization processing includes product quantization encoding processing.
  • the performing the distributed clustering process based on the quantitative features corresponding to the images in the image data set to obtain the at least one cluster includes: obtaining the image data set The first degree of similarity between the quantized feature of any image and the quantized features of the rest of the image; based on the first degree of similarity, determine the K1 neighbor image of the any image, and the quantized feature of the K1 neighbor image is The first K1 quantized features with the highest similarity of the quantized features of any image, where K1 is an integer greater than or equal to 1, and the distribution is determined by using the any image and K1 neighboring images of the any image The clustering result of the formula clustering process.
  • the determining the clustering result of the distributed clustering process by using any image and K1 neighbor images of the any image includes: selecting from the K1 neighbor images A first image set whose first similarity with the quantized feature of any image is greater than a first threshold; mark all images in the first image set and any image as the first state, and based on Each image marked as a first state forms a cluster, and the first state is a state including the same object in the image.
  • the determining the clustering result of the distributed clustering processing by using the any image and the K1 neighbor images of the any image includes: acquiring image features of the any image The second degree of similarity with the image features of the K1 neighbor image of any image; based on the second degree of similarity, the K2 neighbor image of the any image is determined, and the image feature of the K2 neighbor image is The K2 image features with the second highest similarity to the image features of any of the image features in the K1 neighbor images, K2 is an integer greater than or equal to 1 and less than or equal to K1; and the K2 neighbor images are selected from the K2 neighbor images.
  • the method before the acquiring the first similarity between the quantized features of any image in the image data set and the quantized features of other images, the method further includes: Grouping the quantized features of the multiple images to obtain multiple second groups, where the second grouping includes the quantized features of at least one image; and, obtaining the quantized features of any image in the image data set and
  • the first degree of similarity between the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
  • the method before the distributed and parallel acquisition of the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images, the method further includes: The plurality of second groups respectively configure third indexes to obtain a plurality of third indexes; and, the distributed and parallel acquisition of the quantized features of the images in the second group and the quantized features of the remaining images
  • the first similarity includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain the target image in the second group corresponding to the third index
  • the first similarity between the quantized feature and the quantized features of all images other than the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
  • the method further includes: determining the cluster center of the cluster obtained by the distributed clustering processing; configuring a fourth index for the cluster center, and storing the fourth index in association with each other. Index and corresponding class center.
  • the determining the cluster center of the cluster obtained by the distributed clustering processing includes: determining the cluster center based on the average value of the image features of the images in the at least one cluster. State the cluster center.
  • the determining the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the images in the cluster includes: based on each image in the cluster The associated first index determines the time information and location information of the object corresponding to the cluster; and determines the spatiotemporal trajectory information of the object based on the time information and location information.
  • the method further includes: determining an object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library.
  • the determining the object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library includes: obtaining the quantitative feature of the known object in the identity feature library ; Determine the fifth similarity between the quantitative feature of the known object and the quantitative feature of the at least one cluster center, and determine the K4 with the fifth highest similarity to the quantitative feature of the cluster center Quantified features of known objects; acquiring the sixth similarity between the image features of the cluster center and the corresponding image features of K4 known objects; responding to the K4 known object’s
  • the sixth similarity between the image feature and the image feature of the class center is the highest and the sixth similarity is greater than a fourth threshold, and it is determined that the known object with the highest sixth similarity corresponds to the class center
  • the cluster matches includes: obtaining the quantitative feature of the known object in the identity feature library ; Determine the fifth similarity between the quantitative feature of the known object and the quantitative feature of the at least one cluster center, and determine the K4 with the fifth highest similarity to the quantitative feature of the cluster
  • the determining the object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library further includes: responding to the image features of the K4 known objects The sixth similarity with the image feature of the corresponding cluster center is all less than the fourth threshold, and it is determined that there is no cluster matching the known object.
  • an image processing device which includes: an acquisition module for acquiring an image data set, the image data set including a plurality of images and a first image associated with the plurality of images.
  • An index, the first index is used to determine the spatiotemporal data of the object in the image;
  • a clustering module is used to perform distributed clustering processing on the images in the image data set to obtain at least one cluster; determine The module is used to determine the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the image in the cluster.
  • the device further includes an incremental clustering module, which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  • an incremental clustering module which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  • the incremental clustering module is further configured to obtain the difference between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process.
  • K3 is an integer greater than or equal to 1.
  • the incremental clustering module is further configured to, in the case that there is no cluster center with a fourth similarity greater than a third threshold between the image features of the input image, based on the The quantized features of the input image and the quantized features of the images in the image data set execute the distributed clustering process to obtain at least one new cluster.
  • the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
  • the clustering module includes: a first distribution processing unit, which is used to obtain image features of the images in the image data set in a distributed and parallel manner; a second distribution processing unit, which uses Distributedly perform quantization processing on the image features in parallel to obtain the quantized features corresponding to the image features; a clustering unit is used to execute the distributed based on the quantized features corresponding to the image in the image data set Clustering processing to obtain the at least one cluster.
  • the first distribution processing unit is further configured to group the multiple images in the image data set to obtain multiple image groups; and input the multiple image groups into multiple image groups respectively.
  • a feature extraction model which uses the multiple feature extraction models to execute feature extraction processing of images in an image group corresponding to the feature extraction model in a distributed and parallel manner to obtain image features of the multiple images, wherein each feature extraction model The input image group is different.
  • the second distribution processing unit is further configured to perform grouping processing on the image features of the multiple images to obtain multiple first groups, and the first group includes the image features of at least one image ; Distributed and parallel execution of the quantization processing of the image features of the plurality of first groups, to obtain the quantized feature corresponding to the image feature.
  • the second distribution processing unit is further configured to execute the quantization processing of the image features of the plurality of first groups in the distributed parallel to obtain the quantized feature corresponding to the image feature, Respectively configure second indexes for the plurality of first groups to obtain a plurality of second indexes; and are used to allocate the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers The allocated second indexes are different; and the multiple quantizers are used to respectively execute quantization processing of image features in the first group corresponding to the allocated second indexes in parallel.
  • the quantization processing includes product quantization encoding processing.
  • the clustering unit is further configured to obtain a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images; based on the first degree of similarity, Determine the K1 neighbor image of any image, the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image, and the K1 is greater than or equal to 1 Integer; the clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
  • the clustering unit is further configured to select, from the K1 neighboring images, a first image set whose first similarity with the quantized feature of any image is greater than a first threshold. ; Mark all the images in the first image set and any one of the images as a first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same object status.
  • the clustering unit is further configured to obtain a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image; based on the first Second similarity, determining the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the K2 image feature with the second highest similarity between the K1 neighbor image and the image feature of the any image , K2 is an integer greater than or equal to 1 and less than or equal to K1; selecting a second image set whose second similarity with the image feature of any image is greater than a second threshold from the K2 neighboring images; All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  • the clustering unit is further configured to compare the image data with the first similarity between the quantized features of any image in the image dataset and the quantized features of other images.
  • the quantized features of the multiple images in the data set are grouped to obtain multiple second groups, where the second group includes the quantized features of at least one image; and the quantization of any image in the image data set is obtained
  • the first degree of similarity between the features and the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
  • the clustering unit is further configured to obtain the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images in the distributed and parallel manner.
  • the first similarity between the two includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain a target in the second group corresponding to the third index
  • the first similarity between the quantized feature of the image and the quantized features of all the images except the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
  • the class center determining module is used to determine the class center of the cluster obtained by the distributed clustering process; configure a fourth index for the class center and store it in association The fourth index and the corresponding class center.
  • the cluster center determining module is further configured to determine the cluster center based on the average value of the image features of each image in the at least one cluster.
  • the determining module is further configured to determine the time information and location information of the object corresponding to the cluster based on the first index associated with each image in the cluster; based on the time information and The location information determines the spatiotemporal trajectory information of the object.
  • the device further includes an identity determining module, which is configured to determine the identity of the object corresponding to each cluster based on the identity feature of at least one object in the identity feature library.
  • the identity determination module is further configured to obtain the quantitative characteristics of the known objects in the identity feature library; determine the quantitative characteristics of the known objects and the cluster center of the at least one cluster Quantify the fifth similarity between the quantized features, and determine the quantized features of the K4 known objects with the fifth highest similarity to the quantized features of the class center; obtain the image features of the class center and the corresponding K4
  • the sixth degree of similarity between the image features of known objects; the sixth degree of similarity between the image feature of a known object in the K4 known objects and the image feature of the class center is the highest and the sixth degree of similarity When the similarity is greater than the fourth threshold, it is determined that the known object with the sixth highest similarity matches the cluster corresponding to the cluster center.
  • the identity determination module is further configured to: when the sixth similarity between the image features of the K4 known objects and the image features of the corresponding class center is less than the fourth threshold , It is determined that there is no cluster matching the known object.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call the instructions stored in the memory to Perform the method described in any one of the first aspect.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions, when executed by a processor, implement the method described in any one of the first aspects.
  • a computer program comprising computer readable code, when the computer readable code runs in an electronic device, the processor in the electronic device executes Implement the method described in any one of the first aspect.
  • each image can be configured with corresponding index information to determine the spatiotemporal data of objects in the image. Based on this configuration, the spatiotemporal trajectories of different objects can be analyzed. After performing distributed clustering, the image set corresponding to each object is obtained (a cluster is equivalent to the image set of an object), and the index information (first index) associated with each image in the cluster can be obtained.
  • the spatiotemporal trajectory information of the objects corresponding to the clustering can realize the trajectory analysis of different objects.
  • the embodiments of the present disclosure adopt a distributed clustering method, which can improve the efficiency of clustering, so that the spatiotemporal trajectory of the object can be obtained quickly and effectively.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure
  • Fig. 3 shows a flowchart of step S21 in an image processing method according to an embodiment of the present disclosure
  • Fig. 4 shows a flowchart of step S22 in an image processing method according to an embodiment of the present disclosure
  • Fig. 5 shows a flowchart of step S23 in an image processing method according to an embodiment of the present disclosure
  • Fig. 6 shows a flowchart of step S233 in an image processing method according to an embodiment of the present disclosure
  • Fig. 7 shows another flowchart of step S233 in an image processing method according to an embodiment of the present disclosure
  • Fig. 8 shows a flowchart of an image processing method for performing clustering increment processing according to an embodiment of the present disclosure
  • Fig. 9 shows a flowchart of step S43 in an image processing method according to an embodiment of the present disclosure
  • FIG. 10 shows a flowchart of determining the identity of objects matched by clusters in an image processing method according to an embodiment of the present disclosure
  • Fig. 11 shows a block diagram of an image processing device according to an embodiment of the present disclosure
  • Fig. 12 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • FIG. 13 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • 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 image processing method provided by the embodiments of the present disclosure can be applied to any image processing device.
  • the image processing method can be executed by a terminal device or a server or other processing device.
  • the terminal device can be a User Equipment (UE), Mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc., are not illustrated in this disclosure.
  • the image processing method may be implemented by a processor calling computer-readable instructions stored in the memory.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method may include:
  • S10 Obtain an image data set, the image data set including a plurality of images and a first index respectively associated with the plurality of images, the first index being used to determine spatiotemporal data of objects in the images;
  • the image data set may include multiple images, and the multiple images may be acquired by an image acquisition device, and each image may be acquired by the same image acquisition device, or may also be acquired by different image devices,
  • image capture devices can be deployed in streets, shopping malls, security areas, homes, communities, or other areas, and images in corresponding places can be captured by deploying image capture devices.
  • the image obtained by the embodiment of the present disclosure may be an image captured by at least one image capture device, and the image capture device may include a mobile phone, a camera, or other devices capable of capturing images, and the present disclosure will not illustrate them one by one.
  • the images in the image data set of the embodiments of the present disclosure may include objects of the same type, for example, they may include person objects.
  • the time and space of the same person object can be obtained through the image processing method of the embodiments of the present disclosure. Track information.
  • the images in the image data set may also include other types of objects, such as animals, so that the spatiotemporal trajectory of the same animal can be determined.
  • the present disclosure does not specifically limit the type of object in the image.
  • the method of obtaining the image data set may include directly connecting with an image capturing device to receive the captured images, or may also connect with a server or other electronic devices to receive images transmitted by the server or other electronic devices.
  • the images in the image data set in the embodiments of the present disclosure may also be preprocessed images.
  • the preprocessing may intercept images including human faces (face images) from the collected images, or delete collected images.
  • the image has a low signal-to-noise ratio, is blurry or does not include an image of human objects.
  • the image data set further includes a first index associated with each image, where the first index is used to determine spatiotemporal data corresponding to the image, and the spatiotemporal data includes at least one of time data and spatial location data, for example
  • the first index may include at least one of the following information: at least one of the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the location where the image collection device is installed. Therefore, the temporal and spatial data information such as the appearance time and location of the object in the image can be determined through the first index associated with the image.
  • the image capture device when it is capturing an image and sending the captured image, it may also send the first index of the image, for example, the time when the image was captured, the location where the image was captured, and the image capture device that captured the image (such as camera identification and other information.
  • the image and the first index After the image and the first index are received, the image can be stored in association with the corresponding first index, such as stored in a database, which may be a local database or a cloud database.
  • S20 Perform distributed clustering processing on the images in the image data set to obtain at least one cluster
  • distributed clustering processing may be performed on multiple images in the image data set.
  • the images in the image data set can be images of the same object or different objects.
  • the embodiments of the present disclosure can perform distributed clustering processing on the images to obtain multiple clusters, wherein the obtained images in each cluster include the same The image of the object.
  • the distributed clustering process can perform the clustering process in parallel at the same time, and the clustering efficiency can be improved under the premise of ensuring the clustering accuracy.
  • the facial features of the human object in the image can be extracted to determine the similarity between the facial features of any two images, and the two images with the similarity greater than the threshold are determined to include the same object.
  • the two images are Can be clustered together, and then get the clustering result.
  • the clustering process can also be performed in other ways.
  • the obtained images included in each cluster are images of the same object. Therefore, the object corresponding to the cluster can be determined through the first index associated with the images in the cluster.
  • the spatiotemporal trajectory information about the object can be formed. For example, a time and location coordinate system can be established, and the appearance time and location of the object can be marked in the coordinate system through the first index of each image in a cluster, so that the spatiotemporal trajectory of the object can be displayed intuitively.
  • the embodiment of the present disclosure can obtain the spatiotemporal trajectory information of the object corresponding to the cluster according to the first index associated with each image in each cluster based on the clustering result of the distributed clustering.
  • the embodiment of the present disclosure effectively Mining potential trajectory information in the data, making full use of the value of the data and the resource input behind the data, and the embodiment of the present disclosure can accelerate the clustering processing speed through the distributed clustering clustering method.
  • step S20 may include:
  • S23 Perform the distributed clustering process based on the quantified feature corresponding to the image in the image data set to obtain the at least one cluster.
  • the image may be a face image, and the corresponding image feature is the corresponding face feature.
  • the image feature of the image can be extracted by a feature extraction algorithm when acquiring the image feature of the image, or the image feature can be extracted by a neural network trained to perform feature extraction.
  • the feature extraction algorithm may include at least one of Principal Components Analysis (PCA), Linear Discriminant Analysis (LDA), Independent Component Analysis (ICA) and other algorithms.
  • PCA Principal Components Analysis
  • LDA Linear Discriminant Analysis
  • ICA Independent Component Analysis
  • the neural network can be a convolutional neural network, such as the VGG network (Visual Geometry Group Network), which convolutes the image through the convolutional neural network.
  • the embodiment of the present disclosure does not specifically limit the feature extraction algorithm and the neural network for feature extraction, as long as the extraction of facial features (image features) can be realized, it can be used as an embodiment of the present disclosure.
  • the embodiments of the present disclosure may extract image features of each image in a distributed and parallel manner.
  • Fig. 3 shows a flowchart of step S21 in an image processing method according to an embodiment of the present disclosure, wherein the distributed and parallel acquisition of the image characteristics of the image in the image data set (step S21) may include:
  • multiple images in the image data set may be grouped to obtain multiple image groups, and each image group may include at least one image.
  • the method for grouping images may include average grouping or random grouping.
  • the number of image groups obtained can be a pre-configured number of groups, and the number of groups can be less than or equal to the number of feature extraction models described below.
  • S212 Input the multiple image groups into multiple feature extraction models respectively, and use the multiple feature extraction models to execute feature extraction processing of images in the image groups corresponding to the feature extraction models in a distributed and parallel manner, to obtain the multiple feature extraction models.
  • a distributed parallel processing process of feature extraction may be performed.
  • Each of the obtained multiple image groups can be assigned to one of the feature extraction models, and the feature extraction model is used to perform feature extraction processing of the images in the assigned image groups to obtain the image features of the corresponding images.
  • the feature extraction model can use the feature extraction algorithm described above to perform feature extraction processing, or the feature extraction model can be constructed as the feature extraction neural network described above to obtain image features, which is not specifically limited in the present disclosure.
  • multiple feature extraction models can be used to perform feature extraction of each image group in a distributed and parallel manner.
  • each feature extraction model can perform image feature extraction of one image group or multiple image groups at the same time, thereby Speed up feature extraction.
  • the first index of the image and the image feature can be stored in association, the mapping relationship between the first index and the image feature can be established, and the mapping can be stored in the database. relationship.
  • the monitored real-time image stream can be input to the front-end distributed feature extraction module (feature extraction model).
  • feature extraction model distributed feature extraction module
  • the image features are stored in the form of persistent features based on spatio-temporal information.
  • the feature database that is, the first index and image features are stored in the feature database in the form of persistent features.
  • the persistence feature is stored in an index structure
  • the first index key of the persistence feature in the database may include Region id, Camera idx, Captured time, and Sequence id.
  • Region id is the camera area identifier
  • Camera idx is the camera id in the area
  • Captured time is the image capture time
  • Sequence id is the self-increasing sequence identifier (such as the identifier of the number in sequence), which can be used for deduplication.
  • the first index can constitute a unique identification of each image feature and can include the spatiotemporal information of the image feature. After the first index is stored in association with the corresponding image feature, the image feature (persistent feature) of each image can be easily obtained, and the spatiotemporal data information (time and location) of the object in the image can be obtained at the same time.
  • the embodiment of the present disclosure may perform quantization processing on the image after obtaining the image feature of the image to obtain the quantized feature corresponding to each image, that is, step S22 may be performed.
  • the embodiments of the present disclosure may adopt product quantization (PQ) coding to obtain quantized features corresponding to image features of each image in the image data set.
  • PQ product quantization
  • This quantization process is performed by a PQ quantizer, for example.
  • the process of performing the quantization process through the PQ quantizer can include decomposing the vector space of the image feature into the Cartesian product of multiple low-dimensional vector spaces, and quantizing the low-dimensional vector space obtained by the decomposition, so that each image feature is There can be multiple quantized combination representations of low-dimensional spaces to obtain quantized features.
  • Image feature data compression can be achieved through quantization processing.
  • the image feature dimension of the image in the embodiment of the present disclosure can be N, and each dimension data is a float32 floating point number (ie, a 32-bit floating point number).
  • the quantization feature obtained after the quantization process is The dimension can be N, and the data of each dimension is a half floating point number (that is, half-precision floating point number), that is, the amount of feature data can be reduced through quantization.
  • the quantization process of all image features can be performed by one quantizer, or the quantization process of image features can be performed by multiple quantizers, that is, the image features of all images can be performed by at least one quantizer.
  • the quantization process obtains the quantized features corresponding to all images.
  • a distributed parallel execution method can be adopted to improve the processing speed.
  • the embodiments of the present disclosure may use distributed parallel execution to execute the quantization process, where 4 shows a flowchart of step S22 in an image processing method according to an embodiment of the present disclosure, wherein the distributed and parallel quantization processing on the image features to obtain the quantized features corresponding to the image features may include :
  • S221 Perform grouping processing on the image features of the multiple images to obtain multiple first groups, where the first group includes the image features of at least one image;
  • the embodiments of the present disclosure can group image features, and perform quantization processing on image features of each group in a distributed and parallel manner to obtain corresponding quantized features.
  • the multiple quantizers can be distributed and executed in parallel to quantize image features of different images, thereby reducing the time required for quantization and increasing the speed of calculation.
  • the image features can be divided into multiple groups (multiple first groups), and the first group can also be the same as the above grouping of images (image groups), that is, grouped according to images
  • image groups images
  • the image features are divided into corresponding number of groups, that is, the image feature of the image group can be directly obtained to determine the group of the image feature, or multiple first groups can be re-formed, which is not specifically limited in the present disclosure.
  • Each first group includes at least one image feature of the image.
  • the present disclosure does not specifically limit the number of the first group, which can be determined comprehensively according to the number of quantizers, processing capabilities, and the number of images, and can be determined by a person skilled in the art or a neural network according to actual needs.
  • the manner of grouping the image features of the multiple images may include: performing average grouping on the image features of the multiple images, or grouping the multiple images in a random manner. Perform grouping of image features. That is, the embodiment of the present disclosure can group the image features of each image in the image data set equally according to the number of groups, or can also group randomly to obtain multiple first groups. As long as the image features of multiple images can be divided into multiple first groups, it can be used as an embodiment of the present disclosure.
  • an identifier (such as a second index) may also be assigned to each first group, and the second index and the first group may be associated storage.
  • each image feature of the image data set can be formed into an image feature library T (feature database), and the image features in the image feature library T are grouped (sliced) to obtain n first groups ⁇ S 1 , S 2 ,. ..S n ⁇ , where S i represents the i-th first group, i is an integer greater than or equal to 1 and less than or equal to n, n represents the number of first groups, and n is an integer greater than or equal to 1.
  • Each of the first groups may include image characteristics of at least one image. In order to easily distinguish each of the first packet and convenient quantization process may correspond to a first packet for the second index distribution ⁇ I 11, I 12, ... I 1n ⁇ , wherein the first index of the first packet may be S i I 1i .
  • S222 Distributedly execute quantization processing of the image features of the multiple first groups in parallel to obtain quantized features corresponding to the image features.
  • the quantization processing of the image features in each first group may be performed in parallel respectively.
  • the quantization process may be performed by multiple quantizers, and each quantizer may perform quantization process of one or more image features of the first group, thereby speeding up the processing.
  • each quantizer may also be assigned a corresponding quantization processing task according to the second index of each first group. That is, the second index of each first group can be assigned to multiple quantizers, where each quantizer is assigned a different second index, and the quantizers respectively execute the quantization processing tasks corresponding to the assigned second indexes in parallel. , That is, perform the quantization process of the image features in the corresponding first group.
  • the number of quantizers can be greater than or equal to the number of second groups, and each quantizer can be assigned at most one second index, that is, each quantizer can only execute one second index.
  • the quantization processing of the image features in the corresponding first group is not a specific limitation of the embodiments of the present disclosure.
  • the number of groups and the number of quantizers, and the number of first indexes allocated to each quantizer can be set according to different requirements.
  • the quantization process can reduce the data amount of image features.
  • the quantization processing method in the embodiment of the present disclosure may be product quantization (PQ) coding, for example, the quantization processing is performed by a PQ quantizer.
  • Image feature data compression can be achieved through quantization processing.
  • the dimension of the image feature of the image in the embodiment of the present disclosure can be N, and the data of each dimension can be a float32 floating point number.
  • the dimension of the quantization feature obtained after quantization can be N, and each The dimensional data is a half floating point number, that is, the amount of feature data can be reduced through quantization.
  • the quantized features can also be stored in association with the first index, so that the associated storage of the first index, second index, image, image feature, and quantized feature can be established to facilitate data retrieval Read and call.
  • the quantized feature of each image can be used to perform clustering processing on the image data set, that is, step S23 can be performed.
  • the images in the image data set may be images of the same object or different objects.
  • the embodiments of the present disclosure may perform clustering processing on the images to obtain multiple clusters, and the obtained images in each cluster are images of the same object.
  • Fig. 5 shows a flowchart of step S23 in an image processing method according to an embodiment of the present disclosure, in which the distributed clustering process is executed based on the quantized feature corresponding to the image in the image data set, Obtaining the at least one cluster (step S23) may include:
  • S231 Acquire a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images;
  • clustering of the image can be performed based on the quantitative features, that is, clusters of the same objects (clusters of objects with the same identity) are obtained.
  • the embodiment of the present disclosure may first obtain the first similarity between any two quantized features, where the first similarity may be the cosine similarity. In other embodiments, other methods may be used to determine the difference between the quantized features.
  • the first degree of similarity is not specifically limited in this disclosure.
  • one arithmetic unit can be used to calculate the first similarity between any two quantized features, or multiple arithmetic units can be used to calculate the first similarity between each quantized feature in a distributed and parallel manner. Parallel execution of calculations by multiple operators can speed up calculations.
  • the embodiment of the present disclosure may also perform the first similarity between the quantitative features of each group and the remaining quantitative features based on the group distribution of the quantitative features.
  • the quantized features of each image can be grouped to obtain multiple second groups, and each second group includes at least one quantized feature of the image.
  • the second group can be determined directly based on the first group, that is, the corresponding quantized feature is determined according to the image feature of the first group, and the second group is directly formed according to the quantized feature corresponding to the image feature in the first group.
  • the grouping method may be average grouping or random grouping, which is not specifically limited in the present disclosure.
  • the quantitative features of each image in the image data set can be formed into a quantitative feature library L, or the quantitative features can also be stored in the aforementioned image feature library T in association with each other.
  • the quantitative features are related to the image, image feature, first index, second The index and the third index can be stored correspondingly.
  • each second group can be assigned a corresponding third index ⁇ I 21 , I 22 ,...I 2m ⁇ , where the third index of the second group L j can be Is I 2j .
  • multiple operators may be used to respectively execute the first similarity between the quantized features in the multiple second groups and the remaining quantized features. Since the data volume of the image data set may be very large, multiple operations can be used to execute the first similarity between any one of the quantized features in each second group and all the remaining quantized features in parallel.
  • each arithmetic unit may be included, and the arithmetic units may be any electronic device with arithmetic processing function, such as a CPU, a processor, a single-chip computer, etc., which is not specifically limited in the present disclosure.
  • each arithmetic unit can calculate the first degree of similarity between each quantized feature in one or more second groups and the quantized features of all other images, thereby speeding up the processing.
  • each arithmetic unit may also be assigned a corresponding similarity calculation task according to the third index of each second group. That is, the third index of each second group can be assigned to multiple arithmetic units, where each operation is assigned a different third index, and the similarity calculation tasks corresponding to the assigned third index can be executed in parallel through the arithmetic units.
  • the similarity calculation task is to obtain the first similarity between the quantized feature of the image in the second group corresponding to the third index and the quantized feature of all images except the image. Therefore, through the parallel execution of multiple arithmetic units, the first degree of similarity between the quantized features of any two images can be quickly obtained.
  • the number of operators can be greater than or equal to the number of the second group.
  • each operator can be assigned at most one third index, and each operator can execute only one third index.
  • the number of groups and the number of operators, and the number of third indexes allocated to each operator can be set according to different requirements.
  • S232 Determine the K1 neighbor image of any image based on the first similarity, where the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image ,
  • the K1 is an integer greater than or equal to 1;
  • the K1 neighbor image of any image can be obtained, that is, the image corresponding to the K1 quantized feature with the highest first similarity of the quantized feature of any image.
  • Any image corresponding to the first K1 quantized feature with the highest similarity is a neighboring image, which represents an image that may include the same object.
  • the first similarity sequence for any quantized feature can be obtained.
  • the first similarity sequence is a sequence of quantized features sorted from high to low or from low to high with the any quantized feature, and the first similarity sequence is obtained After that, it is convenient to determine the K1 quantized features with the highest first similarity to any quantized feature, and then determine the K1 neighbors of any image.
  • the number of K1 can be determined according to the number in the image data set, such as 20, 30, or other values in other embodiments, which is not specifically limited in the present disclosure.
  • S233 Determine a clustering result of the distributed clustering processing by using any image and the K1 neighbor image of the any image.
  • determining the clustering result of the distributed clustering process by using the any image and the K1 neighbor image of the any image may include:
  • S23301 Select, from the K1 neighboring images, a first image set that has a first similarity with the quantized feature of any image that is greater than a first threshold;
  • S23302 Mark all the images and any one of the images in the first image set as a first state, and form a cluster based on each image marked as the first state, and the first state is that the images include the same The state of the object.
  • the first similarity can be directly selected from the K1 neighbor images of each image (the K1 images with the highest first similarity of quantized features).
  • the first image set is formed by selecting the images with the first similarity larger than the first threshold.
  • the first threshold may be a set value, such as 90%, but it is not a specific limitation of the present disclosure.
  • the image that is closest to any image can be selected by setting the first threshold.
  • any image and all images in the selected first image set can be marked as the first state, And form a cluster according to the image in the first state. For example, if the image with the first similarity greater than the first threshold is selected from the K1 neighbor images of image A as the first image set including A1 and A2, then A and A1 and A2 can be marked as the first state respectively, from and The image with the first similarity greater than the first threshold is selected from the K1 neighbor images of A1 to include the first image set of B1. At this time, A1 and B1 can be marked as the first state, and there is no first image in the K1 neighbor images of A2. For images with similarity greater than the first threshold, A2 is no longer labeled in the first state. Through the above, A, A1, A2, and B1 can be classified into one cluster. That is, images A, A1, A2, and B1 include the same object.
  • the clustering results can be easily obtained in the above manner. Since the quantized feature reduces the image feature amount, the clustering speed can be accelerated, and the clustering accuracy can be improved by setting the first threshold.
  • FIG. 7 shows another flowchart of step S233 in an image processing method according to an embodiment of the present disclosure, wherein the use of any image and K1 neighbor images of any image determines the distributed cluster
  • the clustering result of the class processing may also include:
  • S23311 Acquire a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image;
  • the image features of any image and the corresponding K1 neighbor images can be further calculated
  • the second degree of similarity between features That is, after obtaining the K1 neighboring image of any image, the second similarity between the image feature of the any image and the image features of the K1 neighboring images can be further calculated.
  • the second degree of similarity may also be a cosine degree of similarity, or in other embodiments, the degree of similarity may also be determined in other ways, which is not specifically limited in the present disclosure.
  • S23312 Determine the K2 neighbor image of any image based on the second similarity, and the image feature of the K2 neighbor image is the second similarity between the K1 neighbor image and the image feature of any image
  • the highest K2 image features, K2 is an integer greater than or equal to 1 and less than or equal to K1;
  • the second similarity between the image feature of any image and the image feature of the corresponding K1 neighbor image can be obtained, and the K2 image features with the second highest similarity are further selected.
  • the image corresponding to the K2 image features is determined as the K2 neighbor image of any image.
  • the value of K2 can be set according to requirements.
  • S23313 Select, from the K2 neighbor images, a second image set whose second similarity with the image feature of any image is greater than a second threshold;
  • the second similarity can be directly selected from the K2 neighbor images of each image (the K2 images with the highest second similarity of image features).
  • the selected images can form a second image set.
  • the second threshold may be a set value, such as 90%, but it is not a specific limitation of the present disclosure.
  • the image closest to any image can be selected by setting the second threshold.
  • S23314 Mark all the images and any one of the images in the second image set as the first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same The state of the object.
  • the selected image may be All the images in the second image set are marked as the first state, and a cluster is formed according to the images in the first state.
  • the images with the second similarity greater than the second threshold are selected as images A3 and A4, then A, A3, and A4 can be marked as the first state, from the K2 neighbor images of A3
  • the image with the second similarity greater than the second threshold is selected as image B2.
  • A3 and B2 can be marked as the first state, and there is no image with the second similarity greater than the second threshold in the K2 neighbor images of A4.
  • A4 in the first state is marked.
  • the clustering results can be easily obtained by the above method. Since the quantized feature reduces the image feature amount, and the K1 neighbor obtained based on the quantized feature further determines the closest K2 neighbor of the image feature, thereby speeding up the clustering speed and further improving the clustering. Class precision. In addition, in the process of performing the calculation of the similarity between quantized features and image features, a distributed parallel operation can also be used to speed up the clustering speed.
  • the computational cost is reduced, and the parallel processing of multiple arithmetic units can further increase the computational speed.
  • the images in the same cluster can be considered as a collection of images of the same object (such as a person object), and the first index associated with the images in the cluster can be used to obtain the time when the object appears Information and corresponding location information, based on the time information and location information, the spatiotemporal trajectory information of the object can be further obtained.
  • each cluster may include at least one image, and the images in the same cluster may be regarded as including the same object.
  • the cluster center of each cluster can be further determined.
  • the average value of the image features of each image in the cluster may be used as the cluster center.
  • a fourth index can be assigned to the class center to distinguish the clusters corresponding to each class center.
  • each image in the embodiment of the present disclosure includes a third index as an image identifier, a first index as an identifier of the first group of image features, a second index as an identifier of the second group where the quantized feature is located, and as The fourth index of the cluster identification, the above-mentioned index and the corresponding feature, image and other data can be stored in association.
  • there may be indexes of other feature data which are not specifically limited in the present disclosure.
  • the third index of the image, the first index of the first group of image features, the second index of the second group of quantized features, and the fourth index of the cluster are all different, and can be represented by different symbols.
  • the received image can also be clustered to determine the cluster to which the received image belongs, that is, to perform clustering increment processing, where After the received image matches the cluster, the received image can be assigned to the corresponding cluster. If the current cluster does not match the received image, the received image can be used as a cluster alone. Or merge with an existing image data set to perform clustering again.
  • FIG. 8 shows a flowchart of performing clustering increment processing by an image processing method according to an embodiment of the present disclosure, where the clustering increment processing may include:
  • the input image may be an image captured by an image capture device in real time, or may also be an image transmitted through other devices, or an image stored locally. This disclosure does not specifically limit this.
  • the image features of the input image can be obtained.
  • the image features can be obtained through a feature collection algorithm, or through at least one layer of convolution processing of a convolutional neural network.
  • the image may be a face image, and the corresponding image feature is a face feature.
  • S42 Perform quantization processing on the image feature of the input image to obtain the quantized feature of the input image
  • the input images acquired by the embodiments of the present disclosure may be one or more.
  • image feature acquisition and image feature quantization processing they can all be acquired through distributed parallel execution.
  • the specific parallel execution process is the same as the above-mentioned embodiment.
  • the described process is the same, so it will not be repeated here.
  • S43 Determine the cluster in which the input image is located based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  • the cluster in which the input image is located can be determined according to the quantitative feature and the cluster center of each cluster.
  • the specific clustering method can also refer to the above process.
  • Fig. 9 shows a flowchart of step S43 in an image processing method according to an embodiment of the present disclosure.
  • the determining the cluster in which the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering processing (S43) may include:
  • S4301 Acquire a third degree of similarity between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process;
  • the cluster center (the image feature of the cluster center) can be determined according to the average value of the image features of each image in the cluster, and the corresponding quantitative features of the cluster center can also be obtained.
  • the feature performs quantization processing to obtain the quantized feature of the center of the class, or the quantized feature of each image in the cluster can be averaged to obtain the quantized feature of the center of the class.
  • a third degree of similarity between the input image and the quantized feature of the cluster center of each cluster can be obtained.
  • the third degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure.
  • multiple class centers can be grouped to obtain multiple class center groups, and the multiple class center groups are allocated to multiple operators, each of which is assigned a different class center group ,
  • the third degree of similarity between the class centers in the various center groups and the quantized features of the input image is executed in parallel through multiple arithmetic units, thereby speeding up the processing.
  • S4302 Determine the K3 class centers with the third highest similarity between the quantized features of the input image, and K3 is an integer greater than or equal to 1;
  • K3 cluster centers with the highest similarity can be obtained.
  • the number of K3 is less than the number of clusters.
  • the obtained K3 cluster centers can be expressed as K3 clusters that best match the input object.
  • the third degree of similarity between the input image and the quantized features of the cluster centers of each cluster can be obtained by means of distributed parallel execution. That is, the centers can be grouped, and the similarity between the quantized features of the corresponding grouped class centers and the quantized features of the input image can be calculated through different arithmetic units, thereby increasing the calculation speed.
  • S4303 Acquire a fourth degree of similarity between the image features of the input image and the image features of the K3 class centers;
  • the difference between the image features of the input image and the corresponding K3 class centers can be further obtained.
  • the fourth similarity degree may be a cosine similarity degree, but it is not a specific limitation of the present disclosure.
  • a distributed parallel execution method can also be used.
  • the K3 class centers are divided into multiple groups, and The K3 class centers are assigned to multiple arithmetic units, and the arithmetic unit can perform the fourth similarity between the image features of the assigned class centers and the image features of the input image, thereby speeding up the calculation.
  • S4305 In the case that there is no class center whose fourth similarity with the image feature of the input feature is greater than the third threshold, perform the calculation based on the quantized feature of the input image and the quantized feature of the image in the image data set.
  • the clustering process is described to obtain at least one new cluster.
  • the fourth similarity between the image features of the input image and the image features of the K3 class centers has a fourth similarity greater than the third threshold, it can be determined that the input image and the first The cluster matching corresponding to the center of the four clusters with the highest similarity, that is, the object included in the input image and the object corresponding to the fourth cluster with the highest similarity are the same objects.
  • the input image can be added to the cluster.
  • the cluster identifier can be assigned to the input image for associated storage, so that the cluster to which the input image belongs can be determined.
  • the input image can be used as a separate cluster, or the input image can be fused with the existing image data set to obtain a new image data set, and step S20 can be performed again on the new image data set, that is, for all images
  • the distributed clustering is performed again to obtain at least one new cluster, and the image data can be accurately clustered in this way.
  • the cluster center can be re-determined, thereby improving the cluster center Accurately, it is convenient for accurate clustering in the subsequent process.
  • the identity of the object matched by the image in each cluster can also be determined, that is, the identity of the object corresponding to each cluster can be determined based on the identity feature of at least one object in the identity feature library.
  • FIG. 10 shows a flow chart of determining the identity of objects matched by clusters in an image processing method according to an embodiment of the present disclosure, wherein the determination is based on the identity feature of at least one object in the identity feature library with each of the clusters.
  • the object identity corresponding to the class including:
  • the identity feature database includes multiple known identities of object information, for example, it may include the face image of the object with known identities and the identity information of the object, and the identity information may include name, age, work, etc. Basic Information.
  • the identity feature library can also include the image features and quantified features of each known object.
  • the corresponding image features can be obtained from the face image of each known object, and the quantized features can be obtained by quantizing the image features. .
  • S52 Determine the fifth similarity between the quantitative feature of the known object and the quantitative feature of the class center of the at least one cluster, and determine K4 with the fifth highest similarity to the quantitative feature of the class center
  • the quantitative characteristics of a known object, K4 is an integer greater than or equal to 1;
  • the fifth similarity between the quantitative feature of the known object and the obtained quantitative feature of the cluster center can be further obtained.
  • the fifth degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure.
  • the quantitative features of the K4 known objects with the fifth highest similarity to the quantitative features of each class center can be determined. That is, the K4 known objects with the fifth highest similarity to the quantitative feature of the class center can be found from the identity database, and the K4 known objects may be the K4 identities with the highest matching pair with the class center.
  • the K4 class centers with the fifth highest similarity to the quantitative feature of each known object can also be obtained.
  • the corresponding correspondences of the K4 class centers are the K4 class centers with the highest matching degree with the identity of the known object.
  • the quantized features of known objects can be grouped, and the fifth similarity between the quantized features of the known objects and the quantized features of the cluster centers obtained by at least one quantizer can be used to improve the processing speed. .
  • the sixth similarity between the image features of each class center and the corresponding K4 known objects can be further determined,
  • the sixth degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure.
  • the image characteristics of the known object can be further determined.
  • S54 Determine if the sixth similarity between the image feature of a known object among the K4 known objects and the image feature of the cluster center is the highest and the sixth similarity is greater than the fourth threshold. The known object with the sixth highest similarity is matched with the cluster corresponding to the cluster center.
  • the image feature of the known object with the highest sixth similarity can be determined as the image feature that best matches the cluster center.
  • the identity of the known object is determined as the identity that matches the center of the class, that is, the identity of each image in the cluster corresponding to the center of the class is the identity of the known object with the sixth highest similarity.
  • the K4 class centers corresponding to the known object if the K4 class centers corresponding to the known object have the sixth similarity with the image feature of the known object greater than the fourth threshold
  • the cluster center of the sixth highest similarity can be matched with the known object, that is, the cluster corresponding to the sixth highest similarity center is matched with the identity of the known object, thereby determining the corresponding cluster The identity of the object of the class.
  • the sixth similarity between the K4 known objects and the image features of the corresponding class center All are less than the fourth threshold, indicating that there is no identity object that matches the center of the class.
  • the sixth similarity between the image features of the K4 class centers and the image feature of the known object is less than the fourth threshold, then It indicates that there is no identity matching the known object in the obtained cluster.
  • corresponding index information can be configured for each image to determine the spatio-temporal data of the object in the image. Based on this configuration, the analysis of the spatio-temporal trajectory of different objects can be realized. After the images in the image data set are clustered, the image set corresponding to each object is obtained (a cluster is equivalent to the image set of an object), and the index information (first index) associated with each image in the cluster is The spatiotemporal trajectory information of the object corresponding to the cluster can be obtained, so that the trajectory analysis of different objects can be realized. At the same time, the embodiments of the present disclosure adopt a distributed clustering method, which can improve clustering efficiency.
  • 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. 11 shows a block diagram of an image processing device according to an embodiment of the present disclosure. As shown in FIG. 11, the image processing device includes:
  • the acquiring module 10 is configured to acquire an image data set, the image data set including a plurality of images and a first index respectively associated with the plurality of images, and the first index is used to determine an object in the image Spatiotemporal data
  • the clustering module 20 is configured to perform distributed clustering processing on the images in the image data set to obtain at least one cluster;
  • the determining module 30 is configured to determine the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the image in the cluster.
  • the device further includes an incremental clustering module, which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  • an incremental clustering module which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  • the incremental clustering module is further configured to obtain the difference between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process.
  • K3 is an integer greater than or equal to 1.
  • the incremental clustering module is further configured to, in the case that there is no cluster center with a fourth similarity greater than a third threshold between the image features of the input image, based on the The quantized features of the input image and the quantized features of the images in the image data set execute the distributed clustering process to obtain at least one new cluster.
  • the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
  • the clustering module includes: a first distribution processing unit, which is used to obtain image features of the images in the image data set in a distributed and parallel manner; a second distribution processing unit, which uses Distributedly perform quantization processing on the image features in parallel to obtain the quantized features corresponding to the image features; a clustering unit is used to execute the distributed based on the quantized features corresponding to the image in the image data set Clustering processing to obtain the at least one cluster.
  • the first distribution processing unit is further configured to group the multiple images in the image data set to obtain multiple image groups; and input the multiple image groups into multiple image groups respectively.
  • a feature extraction model which uses the multiple feature extraction models to execute feature extraction processing of images in an image group corresponding to the feature extraction model in a distributed and parallel manner to obtain image features of the multiple images, wherein each feature extraction model The input image group is different.
  • the second distribution processing unit is further configured to perform grouping processing on the image features of the multiple images to obtain multiple first groups, and the first group includes the image features of at least one image ; Distributed and parallel execution of the quantization processing of the image features of the plurality of first groups, to obtain the quantized feature corresponding to the image feature.
  • the second distribution processing unit is further configured to execute the quantization processing of the image features of the plurality of first groups in the distributed parallel to obtain the quantized feature corresponding to the image feature, Respectively configure second indexes for the plurality of first groups to obtain a plurality of second indexes; and are used to allocate the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers The allocated second indexes are different; and the multiple quantizers are used to respectively execute quantization processing of image features in the first group corresponding to the allocated second indexes in parallel.
  • the quantization processing includes product quantization encoding processing.
  • the clustering unit is further configured to obtain a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images; based on the first degree of similarity, Determine the K1 neighbor image of any image, the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image, and the K1 is greater than or equal to 1 Integer; the clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
  • the clustering unit is further configured to select, from the K1 neighboring images, a first image set whose first similarity with the quantized feature of any image is greater than a first threshold. ; Mark all the images in the first image set and any one of the images as a first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same object status.
  • the clustering unit is further configured to obtain a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image; based on the first Second similarity, determining the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the K2 image feature with the second highest similarity between the K1 neighbor image and the image feature of the any image , K2 is an integer greater than or equal to 1 and less than or equal to K1; selecting a second image set whose second similarity with the image feature of any image is greater than a second threshold from the K2 neighboring images; All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  • the clustering unit is further configured to compare the image data with the first similarity between the quantized features of any image in the image dataset and the quantized features of other images.
  • the quantized features of the multiple images in the data set are grouped to obtain multiple second groups, where the second group includes the quantized features of at least one image; and the quantization of any image in the image data set is obtained
  • the first degree of similarity between the features and the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
  • the clustering unit is further configured to obtain the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images in the distributed and parallel manner.
  • the first similarity between the two includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain a target in the second group corresponding to the third index
  • the first similarity between the quantized feature of the image and the quantized features of all the images except the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
  • the class center determining module is used to determine the class center of the cluster obtained by the distributed clustering process; configure a fourth index for the class center and store it in association The fourth index and the corresponding class center.
  • the cluster center determining module is further configured to determine the cluster center based on the average value of the image features of each image in the at least one cluster.
  • the determining module is further configured to determine the time information and location information of the object corresponding to the cluster based on the first index associated with each image in the cluster; based on the time information and The location information determines the spatiotemporal trajectory information of the object.
  • the device further includes an identity determining module, which is configured to determine the identity of the object corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library.
  • the identity determination module is further configured to obtain the quantitative characteristics of the known objects in the identity feature library; determine the quantitative characteristics of the known objects and the cluster center of the at least one cluster Quantify the fifth similarity between the quantized features, and determine the quantized features of the K4 known objects with the fifth highest similarity to the quantized features of the class center; obtain the image features of the class center and the corresponding K4
  • the sixth degree of similarity between the image features of known objects; the sixth degree of similarity between the image feature of a known object in the K4 known objects and the image feature of the class center is the highest and the sixth degree of similarity When the similarity is greater than the fourth threshold, it is determined that the known object with the sixth highest similarity matches the cluster corresponding to the cluster center.
  • the identity determination module is further configured to: when the sixth similarity between the image features of the K4 known objects and the image features of the corresponding class center is less than the fourth threshold , It is determined that there is no cluster matching the known object.
  • 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 embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned 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 embodiment of the present disclosure also proposes 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. 12 shows a block diagram of an electronic device 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: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, 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. 13 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server. 13
  • 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)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An image processing method and device, an electronic apparatus, and a storage medium. The method comprises: acquiring an image dataset comprising multiple images and first indices respectively associated with the multiple images, the first indices being used to determine spatio-temporal data of objects in the images (S10); performing distributed clustering of the images in the image dataset, and obtaining at least one cluster (S20); and determining, on the basis of the first indices associated with the images in the obtained cluster, spatio-temporal trajectory information of the objects corresponding to the cluster (S30). The method can realize quick and efficient acquisition of a spatio-temporal trajectory of an object.

Description

图像处理方法及装置、电子设备和存储介质Image processing method and device, electronic equipment and storage medium
本申请要求在2019年8月15日提交中国专利局、申请号为201910755628.5、发明名称为“图像处理方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910755628.5, and the invention title is "Image processing method and device, electronic equipment and storage medium" on August 15, 2019, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本公开涉及计算机视觉技术领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。The present disclosure relates to the field of computer vision technology, and in particular to an image processing method and device, electronic equipment, and storage medium.
背景技术Background technique
随着平安城市的建设,城市级的监控系统每天都在产生着海量的抓拍人脸图片。这些人脸数据具有规模大、时间和区域分布广等特点。With the construction of a safe city, the city-level surveillance system is producing massive snapshots of human faces every day. These face data have the characteristics of large scale, wide time and regional distribution.
发明内容Summary of the invention
本公开提供了一种图像处理的技术方案。The present disclosure provides a technical solution for image processing.
根据本公开的一方面,提供了一种图像处理方法,其包括:获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。According to an aspect of the present disclosure, there is provided an image processing method, including: acquiring an image data set, the image data set including a plurality of images and first indexes respectively associated with the plurality of images, the first The index is used to determine the spatio-temporal data of the object in the image; perform distributed clustering processing on the images in the image data set to obtain at least one cluster; based on the obtained first cluster associated with the images in the cluster The index determines the spatiotemporal trajectory information of the object corresponding to the cluster.
在一些可能的实施方式中,所述方法还包括:获取输入图像的图像特征;对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。In some possible implementation manners, the method further includes: acquiring image features of the input image; performing quantization processing on the image features of the input image to obtain the quantized features of the input image; based on the quantized features of the input image And the cluster center of the at least one cluster obtained by the distributed clustering process to determine the cluster where the input image is located.
在一些可能的实施方式中,所述基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类,包括:获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心,K3为大于或者等于1的整数;获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;响应于所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该第四相似度大于第三阈值,将所述输入图像加入至所述任一类中心对应的聚类。In some possible implementation manners, the determining the cluster where the input image is located based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering processing includes: Obtain the third degree of similarity between the quantized feature of the input image and the quantized feature of the cluster center of the at least one cluster obtained by the distributed clustering process; determine the degree of similarity between the quantized feature of the input image The K3 class centers with the third highest similarity, where K3 is an integer greater than or equal to 1, obtain the fourth similarity between the image features of the input image and the image features of the K3 class centers; in response to the The fourth similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest, and the fourth similarity is greater than the third threshold, the input image is added to any one of the The cluster corresponding to the cluster center.
在一些可能的实施方式中,所述基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述聚类的类中心,确定所述输入图像所在的聚类,还包括响应于不存在与所述输入图像的图像特征之间的第四相似度大于第三阈值的类中心,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述分布式聚类处理,得到至少一个新的聚类。In some possible implementation manners, the determining the cluster where the input image is located based on the quantized feature of the input image and the cluster center obtained by the distributed clustering processing further includes responding to There is no class center whose fourth similarity with the image features of the input image is greater than the third threshold, and the distributed clustering is performed based on the quantized features of the input image and the quantized features of the images in the image data set. Class processing, at least one new cluster is obtained.
在一些可能的实施方式中,所述第一索引包括以下信息中的至少一种:所述图像的采集时间、采集地点以及采集所述图像的图像采集设备的标识、所述图像采集设备所安装的位置。In some possible implementation manners, the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
在一些可能的实施方式中,所述对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类,包括:分布式并行地获取所述图像数据集中的所述图像的图像特征;分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。In some possible implementation manners, the performing distributed clustering processing on the images in the image data set to obtain at least one cluster includes: acquiring image features of the images in the image data set in a distributed and parallel manner Distributed parallel quantization processing on the image features to obtain the quantized features corresponding to the image features; based on the quantized features corresponding to the image in the image data set, the distributed clustering processing is performed to obtain the At least one cluster.
在一些可能的实施方式中,所述分布式并行地获取所述图像数据集中的所述图像的图像特征,包括:将所述图像数据集中的多个所述图像进行分组,得到多个图像组;将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行地执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。In some possible implementation manners, the distributed and parallel acquisition of the image features of the images in the image data set includes: grouping the multiple images in the image data set to obtain multiple image groups Input the multiple image groups into multiple feature extraction models, and use the multiple feature extraction models to execute feature extraction processing of images in the image group corresponding to the feature extraction model in a distributed and parallel manner to obtain the multiple The image features of each image, where each feature extraction model inputs different image groups.
在一些可能的实施方式中,所述分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征,包括:对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。In some possible implementation manners, the distributed and parallel quantization processing on the image features to obtain the quantized features corresponding to the image features includes: grouping the image features of the multiple images to obtain multiple The first grouping, the first grouping includes image features of at least one image; the quantization processing of the image features of the plurality of first groups is executed in parallel in a distributed manner to obtain the quantized features corresponding to the image features.
在一些可能的实施方式中,在所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征之前,所述方法还包括:为所述多个第一分组分别配置第二索引,得 到多个第二索引;所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征,包括:将所述多个第二索引分别分配给多个量化器,所述多个量化器中每个量化器被分配的所述第二索引不同;利用所述多个量化器分别并行执行分配的所述第二索引对应的第一分组内的图像特征的量化处理。In some possible implementation manners, before the distributed and parallel execution of the quantization processing of the image features of the multiple first groups to obtain the quantized features corresponding to the image features, the method further includes: Configure second indexes for each of the first groups to obtain multiple second indexes; the distributed and parallel execution of the quantization processing of the image features of the multiple first groups to obtain the quantized features corresponding to the image features includes: The plurality of second indexes are respectively allocated to a plurality of quantizers, and each of the plurality of quantizers is allocated a different second index; the plurality of quantizers are used to execute the allocated second indexes respectively in parallel Quantization processing of image features in the first group corresponding to the second index.
在一些可能的实施方式中,所述量化处理包括乘积量化编码处理。In some possible implementation manners, the quantization processing includes product quantization encoding processing.
在一些可能的实施方式中,所述基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类,包括:获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。In some possible implementation manners, the performing the distributed clustering process based on the quantitative features corresponding to the images in the image data set to obtain the at least one cluster includes: obtaining the image data set The first degree of similarity between the quantized feature of any image and the quantized features of the rest of the image; based on the first degree of similarity, determine the K1 neighbor image of the any image, and the quantized feature of the K1 neighbor image is The first K1 quantized features with the highest similarity of the quantized features of any image, where K1 is an integer greater than or equal to 1, and the distribution is determined by using the any image and K1 neighboring images of the any image The clustering result of the formula clustering process.
在一些可能的实施方式中,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果,包括:从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the determining the clustering result of the distributed clustering process by using any image and K1 neighbor images of the any image includes: selecting from the K1 neighbor images A first image set whose first similarity with the quantized feature of any image is greater than a first threshold; mark all images in the first image set and any image as the first state, and based on Each image marked as a first state forms a cluster, and the first state is a state including the same object in the image.
在一些可能的实施方式中,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果,包括:获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the determining the clustering result of the distributed clustering processing by using the any image and the K1 neighbor images of the any image includes: acquiring image features of the any image The second degree of similarity with the image features of the K1 neighbor image of any image; based on the second degree of similarity, the K2 neighbor image of the any image is determined, and the image feature of the K2 neighbor image is The K2 image features with the second highest similarity to the image features of any of the image features in the K1 neighbor images, K2 is an integer greater than or equal to 1 and less than or equal to K1; and the K2 neighbor images are selected from the K2 neighbor images. The second image set in which the second similarity of the image feature of the any image is greater than the second threshold; all the images in the second image set and the any image are marked as the first state, and based on being Each image marked as a first state forms a cluster, and the first state is a state including the same object in the image.
在一些可能的实施方式中,在所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度之前,所述方法还包括:对所述图像数据集中的所述多个图像的量化特征进行分组处理,得到多个第二分组,所述第二分组包括至少一个图像的量化特征;并且,所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度,包括:分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度。In some possible implementation manners, before the acquiring the first similarity between the quantized features of any image in the image data set and the quantized features of other images, the method further includes: Grouping the quantized features of the multiple images to obtain multiple second groups, where the second grouping includes the quantized features of at least one image; and, obtaining the quantized features of any image in the image data set and The first degree of similarity between the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
在一些可能的实施方式中,在所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度之前,所述方法还包括:为所述多个第二分组分别配置第三索引,得到多个第三索引;并且,所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度,包括:基于所述第三索引,建立所述第三索引对应的相似度运算任务,所述相似度运算任务为获取所述第三索引对应的第二分组内的目标图像的量化特征与所述目标图像以外的全部图像的量化特征之间的第一相似度;分布式并行执行所述多个第三索引中每个第三索引对应的相似度获取任务。In some possible implementation manners, before the distributed and parallel acquisition of the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images, the method further includes: The plurality of second groups respectively configure third indexes to obtain a plurality of third indexes; and, the distributed and parallel acquisition of the quantized features of the images in the second group and the quantized features of the remaining images The first similarity includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain the target image in the second group corresponding to the third index The first similarity between the quantized feature and the quantized features of all images other than the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
在一些可能的实施方式中,所述方法还包括:确定所述分布式聚类处理得到的所述聚类的类中心;为所述类中心配置第四索引,并关联地存储所述第四索引和相应的类中心。In some possible implementation manners, the method further includes: determining the cluster center of the cluster obtained by the distributed clustering processing; configuring a fourth index for the cluster center, and storing the fourth index in association with each other. Index and corresponding class center.
在一些可能的实施方式中,所述确定所述分布式聚类处理得到的所述聚类的类中心,包括:基于所述至少一个聚类内的各图像的图像特征的平均值,确定所述聚类的类中心。In some possible implementation manners, the determining the cluster center of the cluster obtained by the distributed clustering processing includes: determining the cluster center based on the average value of the image features of the images in the at least one cluster. State the cluster center.
在一些可能的实施方式中,所述基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息,包括:基于所述聚类中各图像关联的第一索引确定所述聚类对应的对象出现的时间信息和位置信息;基于所述时间信息和位置信息确定所述对象的时空轨迹信息。In some possible implementation manners, the determining the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the images in the cluster includes: based on each image in the cluster The associated first index determines the time information and location information of the object corresponding to the cluster; and determines the spatiotemporal trajectory information of the object based on the time information and location information.
在一些可能的实施方式中,所述方法还包括:基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份。In some possible implementation manners, the method further includes: determining an object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library.
在一些可能的实施方式中,所述基于身份特征库中的至少一个对象的身份特征,确定与各所述聚 类对应的对象身份,包括:获得所述身份特征库中已知对象的量化特征;确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征;获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;响应于所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。In some possible implementation manners, the determining the object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library includes: obtaining the quantitative feature of the known object in the identity feature library ; Determine the fifth similarity between the quantitative feature of the known object and the quantitative feature of the at least one cluster center, and determine the K4 with the fifth highest similarity to the quantitative feature of the cluster center Quantified features of known objects; acquiring the sixth similarity between the image features of the cluster center and the corresponding image features of K4 known objects; responding to the K4 known object’s The sixth similarity between the image feature and the image feature of the class center is the highest and the sixth similarity is greater than a fourth threshold, and it is determined that the known object with the highest sixth similarity corresponds to the class center The cluster matches.
在一些可能的实施方式中,所述基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份,还包括:响应于所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值,确定不存在与所述已知对象匹配的聚类。In some possible implementation manners, the determining the object identity corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library further includes: responding to the image features of the K4 known objects The sixth similarity with the image feature of the corresponding cluster center is all less than the fourth threshold, and it is determined that there is no cluster matching the known object.
根据本公开的第二方面,提供了一种图像处理装置,其包括:获取模块,其用于获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;聚类模块,其用于对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;确定模块,其用于基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。According to a second aspect of the present disclosure, there is provided an image processing device, which includes: an acquisition module for acquiring an image data set, the image data set including a plurality of images and a first image associated with the plurality of images. An index, the first index is used to determine the spatiotemporal data of the object in the image; a clustering module is used to perform distributed clustering processing on the images in the image data set to obtain at least one cluster; determine The module is used to determine the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the image in the cluster.
在一些可能的实施方式中,所述装置还包括增量聚类模块,其用于获取输入图像的图像特征;对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。In some possible implementation manners, the device further includes an incremental clustering module, which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
在一些可能的实施方式中,所述增量聚类模块还用于获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心;获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;在所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该第四相似度大于第三阈值的情况下,将所述输入图像加入至所述任一类中心对应的聚类,K3为大于或者等于1的整数。In some possible implementations, the incremental clustering module is further configured to obtain the difference between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process. Determine the K3 class centers with the highest third similarity between the quantized features of the input image; obtain the difference between the image features of the input image and the image features of the K3 class centers The fourth degree of similarity; in the case that the fourth degree of similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest and the fourth degree of similarity is greater than the third threshold, The input image is added to the cluster corresponding to the center of any type, and K3 is an integer greater than or equal to 1.
在一些可能的实施方式中,所述增量聚类模块还用于在不存在与所述输入图像的图像特征之间的第四相似度大于第三阈值的类中心的情况下,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述分布式聚类处理,得到至少一个新的聚类。In some possible implementation manners, the incremental clustering module is further configured to, in the case that there is no cluster center with a fourth similarity greater than a third threshold between the image features of the input image, based on the The quantized features of the input image and the quantized features of the images in the image data set execute the distributed clustering process to obtain at least one new cluster.
在一些可能的实施方式中,所述第一索引包括以下信息中的至少一种:所述图像的采集时间、采集地点以及采集所述图像的图像采集设备的标识、所述图像采集设备所安装的位置。In some possible implementation manners, the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
在一些可能的实施方式中,所述聚类模块包括:第一分布处理单元,其用于分布式并行地获取所述图像数据集中的所述图像的图像特征;第二分布处理单元,其用于分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;聚类单元,其用于基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。In some possible implementation manners, the clustering module includes: a first distribution processing unit, which is used to obtain image features of the images in the image data set in a distributed and parallel manner; a second distribution processing unit, which uses Distributedly perform quantization processing on the image features in parallel to obtain the quantized features corresponding to the image features; a clustering unit is used to execute the distributed based on the quantized features corresponding to the image in the image data set Clustering processing to obtain the at least one cluster.
在一些可能的实施方式中,所述第一分布处理单元还用于将所述图像数据集中的多个所述图像进行分组,得到多个图像组;将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行地执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。In some possible implementation manners, the first distribution processing unit is further configured to group the multiple images in the image data set to obtain multiple image groups; and input the multiple image groups into multiple image groups respectively. A feature extraction model, which uses the multiple feature extraction models to execute feature extraction processing of images in an image group corresponding to the feature extraction model in a distributed and parallel manner to obtain image features of the multiple images, wherein each feature extraction model The input image group is different.
在一些可能的实施方式中,所述第二分布处理单元还用于对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。In some possible implementation manners, the second distribution processing unit is further configured to perform grouping processing on the image features of the multiple images to obtain multiple first groups, and the first group includes the image features of at least one image ; Distributed and parallel execution of the quantization processing of the image features of the plurality of first groups, to obtain the quantized feature corresponding to the image feature.
在一些可能的实施方式中,所述第二分布处理单元还用于在所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征之前,为所述多个第一分组分别配置第二索引,得到多个第二索引;并用于将所述多个第二索引分别分配给多个量化器,所述多个量化器中每个量化器被分配的所述第二索引不同;利用所述多个量化器分别并行执行分配的所述第二索引对应的第一分组内的图像特征的量化处理。In some possible implementation manners, the second distribution processing unit is further configured to execute the quantization processing of the image features of the plurality of first groups in the distributed parallel to obtain the quantized feature corresponding to the image feature, Respectively configure second indexes for the plurality of first groups to obtain a plurality of second indexes; and are used to allocate the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers The allocated second indexes are different; and the multiple quantizers are used to respectively execute quantization processing of image features in the first group corresponding to the allocated second indexes in parallel.
在一些可能的实施方式中,所述量化处理包括乘积量化编码处理。In some possible implementation manners, the quantization processing includes product quantization encoding processing.
在一些可能的实施方式中,所述聚类单元还用于获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。In some possible implementation manners, the clustering unit is further configured to obtain a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images; based on the first degree of similarity, Determine the K1 neighbor image of any image, the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image, and the K1 is greater than or equal to 1 Integer; the clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
在一些可能的实施方式中,所述聚类单元还用于从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the clustering unit is further configured to select, from the K1 neighboring images, a first image set whose first similarity with the quantized feature of any image is greater than a first threshold. ; Mark all the images in the first image set and any one of the images as a first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same object status.
在一些可能的实施方式中,所述聚类单元还用于获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the clustering unit is further configured to obtain a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image; based on the first Second similarity, determining the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the K2 image feature with the second highest similarity between the K1 neighbor image and the image feature of the any image , K2 is an integer greater than or equal to 1 and less than or equal to K1; selecting a second image set whose second similarity with the image feature of any image is greater than a second threshold from the K2 neighboring images; All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
在一些可能的实施方式中,所述聚类单元还用于在所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度之前,对所述图像数据集中的所述多个图像的量化特征进行分组处理,得到多个第二分组,所述第二分组包括至少一个图像的量化特征;并且,所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度,包括:分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度。In some possible implementation manners, the clustering unit is further configured to compare the image data with the first similarity between the quantized features of any image in the image dataset and the quantized features of other images. The quantized features of the multiple images in the data set are grouped to obtain multiple second groups, where the second group includes the quantized features of at least one image; and the quantization of any image in the image data set is obtained The first degree of similarity between the features and the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
在一些可能的实施方式中,所述聚类单元还用于在所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度之前,为所述多个第二分组分别配置第三索引,得到多个第三索引;并且,所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度,包括:基于所述第三索引,建立所述第三索引对应的相似度运算任务,所述相似度运算任务为获取所述第三索引对应的第二分组内的目标图像的量化特征与所述目标图像以外的全部图像的量化特征之间的第一相似度;分布式并行执行所述多个第三索引中每个第三索引对应的相似度获取任务。In some possible implementation manners, the clustering unit is further configured to obtain the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images in the distributed and parallel manner. , Configure a third index for each of the plurality of second groups to obtain a plurality of third indexes; and, the distributed and parallel acquisition of the quantized features of the images in the second group and the quantized features of the remaining images The first similarity between the two includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain a target in the second group corresponding to the third index The first similarity between the quantized feature of the image and the quantized features of all the images except the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
在一些可能的实施方式中,所述类中心确定模块,其用于确定所述分布式聚类处理得到的所述聚类的类中心;为所述类中心配置第四索引,并关联地存储所述第四索引和相应的类中心。In some possible implementation manners, the class center determining module is used to determine the class center of the cluster obtained by the distributed clustering process; configure a fourth index for the class center and store it in association The fourth index and the corresponding class center.
在一些可能的实施方式中,所述类中心确定模块还用于基于所述至少一个聚类内的各图像的图像特征的平均值,确定所述聚类的类中心。In some possible implementation manners, the cluster center determining module is further configured to determine the cluster center based on the average value of the image features of each image in the at least one cluster.
在一些可能的实施方式中,所述确定模块还用于基于所述聚类中各图像关联的第一索引确定所述聚类对应的对象出现的时间信息和位置信息;基于所述时间信息和位置信息确定所述对象的时空轨迹信息。In some possible implementation manners, the determining module is further configured to determine the time information and location information of the object corresponding to the cluster based on the first index associated with each image in the cluster; based on the time information and The location information determines the spatiotemporal trajectory information of the object.
在一些可能的实施方式中,所述装置还包括身份确定模块,其用于基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份。In some possible implementation manners, the device further includes an identity determining module, which is configured to determine the identity of the object corresponding to each cluster based on the identity feature of at least one object in the identity feature library.
在一些可能的实施方式中,所述身份确定模块还用于获得所述身份特征库中已知对象的量化特征;确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征;获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;在所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值的情况下,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。In some possible implementations, the identity determination module is further configured to obtain the quantitative characteristics of the known objects in the identity feature library; determine the quantitative characteristics of the known objects and the cluster center of the at least one cluster Quantify the fifth similarity between the quantized features, and determine the quantized features of the K4 known objects with the fifth highest similarity to the quantized features of the class center; obtain the image features of the class center and the corresponding K4 The sixth degree of similarity between the image features of known objects; the sixth degree of similarity between the image feature of a known object in the K4 known objects and the image feature of the class center is the highest and the sixth degree of similarity When the similarity is greater than the fourth threshold, it is determined that the known object with the sixth highest similarity matches the cluster corresponding to the cluster center.
在一些可能的实施方式中,所述身份确定模块还用于在所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值的情况下,确定不存在与所述已知对象匹配的聚 类。In some possible implementation manners, the identity determination module is further configured to: when the sixth similarity between the image features of the K4 known objects and the image features of the corresponding class center is less than the fourth threshold , It is determined that there is no cluster matching the known object.
根据本公开的第三方面,提供了一种电子设备,其包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行第一方面中任意一项所述的方法。According to a third aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call the instructions stored in the memory to Perform the method described in any one of the first aspect.
根据本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现第一方面中的任意一项所述的方法。According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions, when executed by a processor, implement the method described in any one of the first aspects.
根据本公开的第五方面,提供了一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现第一方面中的任意一项所述的方法。According to a fifth aspect of the present disclosure, there is provided a computer program, the computer program comprising computer readable code, when the computer readable code runs in an electronic device, the processor in the electronic device executes Implement the method described in any one of the first aspect.
在本公开实施例中,可以为每个图像配置相应的索引信息,用于确定图像中对象的时空数据,基于该配置可以实现不同对象的时空轨迹的分析,其中可以在对图像数据集中的图像进行分布式聚类之后,得到每个对象对应的图像集(一个聚类就相当于一个对象的图像集),通过该聚类中各图像所关联的索引信息(第一索引)即可以得到该聚类对应的对象的时空轨迹信息,从而可以实现不同对象的轨迹分析。同时本公开实施例采用分布式聚类的方式,可以提高聚类效率,从而可以快速有效的获得对象的时空轨迹。In the embodiments of the present disclosure, each image can be configured with corresponding index information to determine the spatiotemporal data of objects in the image. Based on this configuration, the spatiotemporal trajectories of different objects can be analyzed. After performing distributed clustering, the image set corresponding to each object is obtained (a cluster is equivalent to the image set of an object), and the index information (first index) associated with each image in the cluster can be obtained. The spatiotemporal trajectory information of the objects corresponding to the clustering can realize the trajectory analysis of different objects. At the same time, the embodiments of the present disclosure adopt a distributed clustering method, which can improve the efficiency of clustering, so that the spatiotemporal trajectory of the object can be obtained quickly and effectively.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments that conform to the disclosure and are used together with the specification to explain the technical solutions of the disclosure.
图1示出根据本公开实施例的一种图像处理方法的流程图;Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图2示出根据本公开实施例的一种图像处理方法中步骤S20的流程图;Fig. 2 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure;
图3示出根据本公开实施例的一种图像处理方法中步骤S21的流程图;Fig. 3 shows a flowchart of step S21 in an image processing method according to an embodiment of the present disclosure;
图4示出根据本公开实施例的一种图像处理方法中步骤S22的流程图;Fig. 4 shows a flowchart of step S22 in an image processing method according to an embodiment of the present disclosure;
图5示出根据本公开实施例的一种图像处理方法中步骤S23的流程图;Fig. 5 shows a flowchart of step S23 in an image processing method according to an embodiment of the present disclosure;
图6示出根据本公开实施例的一种图像处理方法中步骤S233的流程图;Fig. 6 shows a flowchart of step S233 in an image processing method according to an embodiment of the present disclosure;
图7示出根据本公开实施例的一种图像处理方法中步骤S233的另一流程图;Fig. 7 shows another flowchart of step S233 in an image processing method according to an embodiment of the present disclosure;
图8示出根据本公开实施例的一种图像处理方法执行聚类增量处理的流程图;Fig. 8 shows a flowchart of an image processing method for performing clustering increment processing according to an embodiment of the present disclosure;
图9示出根据本公开实施例的一种图像处理方法中步骤S43的流程图;Fig. 9 shows a flowchart of step S43 in an image processing method according to an embodiment of the present disclosure;
图10示出根据本公开实施例的一种图像处理方法中确定聚类匹配的对象身份的流程图;FIG. 10 shows a flowchart of determining the identity of objects matched by clusters in an image processing method according to an embodiment of the present disclosure;
图11示出根据本公开实施例的一种图像处理装置的框图;Fig. 11 shows a block diagram of an image processing device according to an embodiment of the present disclosure;
图12示出根据本公开实施例的一种电子设备的框图;Fig. 12 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
图13示出根据本公开实施例的另一种电子设备的框图。FIG. 13 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the drawings. The same reference numerals in the drawings indicate elements with the same or similar functions. Although various aspects of the embodiments are shown in the drawings, unless otherwise noted, the drawings are not necessarily drawn to scale.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The dedicated word "exemplary" here means "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" need not be construed as being superior or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the term "at least one" in this document means any one or any combination of at least two of the multiple, for example, including at least one of A, B, and C, may mean including A, Any one or more elements selected in the set formed by B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的 方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. Those skilled in the art should understand that the present disclosure can also be implemented without some specific details. In some instances, the methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order to highlight the gist of the present disclosure.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。It can be understood that, without violating the principle logic, the various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment, which is limited in length and will not be repeated in this disclosure.
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, 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. For the corresponding technical solutions and descriptions, refer to the corresponding records in the method section. ,No longer.
本公开实施例提供的图像处理方法可以应用在任意的图像处理装置,例如,图像处理方法可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,本公开对此不进行一一举例说明。另外,在一些可能的实现方式中,该图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。The image processing method provided by the embodiments of the present disclosure can be applied to any image processing device. For example, the image processing method can be executed by a terminal device or a server or other processing device. The terminal device can be a User Equipment (UE), Mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc., are not illustrated in this disclosure. In addition, in some possible implementation manners, the image processing method may be implemented by a processor calling computer-readable instructions stored in the memory.
下面对本公开实施例进行详细说明。图1示出根据本公开实施例的一种图像处理方法的流程图,如图1所示,所述图像处理方法可以包括:The embodiments of the present disclosure are described in detail below. 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 may include:
S10:获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;S10: Obtain an image data set, the image data set including a plurality of images and a first index respectively associated with the plurality of images, the first index being used to determine spatiotemporal data of objects in the images;
在一些可能的实施方式,图像数据集中可以包括多个图像,该多个图像可以通过图像采集设备采集获得,并且各图像可以由相同的图像采集设备采集,或者也可以由不同的图像设备采集,本公开对此不作具体限定。例如在街道、商场、安防领域、家庭、小区或者其他区域可以布设图像采集设备,通过布设地图像采集设备可以采集相应场所内的图像。本公开实施例获得的图像可以为至少一个图像采集设备采集的图像,图像采集设备可以包括手机、摄像头、或者其他能够采集图像的设备,本公开在此不一一举例说明。In some possible implementations, the image data set may include multiple images, and the multiple images may be acquired by an image acquisition device, and each image may be acquired by the same image acquisition device, or may also be acquired by different image devices, This disclosure does not specifically limit this. For example, image capture devices can be deployed in streets, shopping malls, security areas, homes, communities, or other areas, and images in corresponding places can be captured by deploying image capture devices. The image obtained by the embodiment of the present disclosure may be an image captured by at least one image capture device, and the image capture device may include a mobile phone, a camera, or other devices capable of capturing images, and the present disclosure will not illustrate them one by one.
在一些可能的实施方式中,本公开实施例的图像数据集中的图像中可以包括相同类型的对象,例如可以包括人物对象,对应的通过本公开实施例的图像处理方法可以获得同一人物对象的时空轨迹信息。或者,在其他实施例中,图像数据集中的图像也可以包括其他类型的对象,如动物等,从而可以确定同一动物的时空轨迹。对于图像中的对象的类型本公开不作具体限定。In some possible implementation manners, the images in the image data set of the embodiments of the present disclosure may include objects of the same type, for example, they may include person objects. Correspondingly, the time and space of the same person object can be obtained through the image processing method of the embodiments of the present disclosure. Track information. Or, in other embodiments, the images in the image data set may also include other types of objects, such as animals, so that the spatiotemporal trajectory of the same animal can be determined. The present disclosure does not specifically limit the type of object in the image.
在一些可能的实施方式中,获取图像数据集的方式可以包括直接与图像采集设备连接,以接收采集的图像,或者也可以通过与服务器或者其他电子设备连接,接收服务器或者其他电子设备传输的图像。另外,本公开实施例中的图像数据集中的图像也可以为经过预处理的图像,例如该预处理可以从采集的图像中截取包括人脸的图像(人脸图像),或者也可以删除采集的图像中信噪比低,较为模糊或者不包括人物对象的图像。上述仅为示例性说明,本公开不限定获取图像数据集的具体方式。In some possible implementations, the method of obtaining the image data set may include directly connecting with an image capturing device to receive the captured images, or may also connect with a server or other electronic devices to receive images transmitted by the server or other electronic devices. . In addition, the images in the image data set in the embodiments of the present disclosure may also be preprocessed images. For example, the preprocessing may intercept images including human faces (face images) from the collected images, or delete collected images. The image has a low signal-to-noise ratio, is blurry or does not include an image of human objects. The foregoing is only an exemplary description, and the present disclosure does not limit the specific manner of obtaining the image data set.
在一些可能的实施方式中,图像数据集还包括各图像关联的第一索引,其中第一索引用于确定图像对应的时空数据,时空数据包括时间数据和空间位置数据中的至少一种,例如第一索引可以包括以下信息中的至少一种:图像的采集时间、采集地点以及采集图像的图像采集设备的标识、图像采集设备所安装的位置中的至少一种。从而通过图像关联的第一索引可以确定图像中的对象的出现时间、地点等时空数据信息。In some possible implementation manners, the image data set further includes a first index associated with each image, where the first index is used to determine spatiotemporal data corresponding to the image, and the spatiotemporal data includes at least one of time data and spatial location data, for example The first index may include at least one of the following information: at least one of the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the location where the image collection device is installed. Therefore, the temporal and spatial data information such as the appearance time and location of the object in the image can be determined through the first index associated with the image.
在一些可能的实施方式,图像采集设备在采集图像并发送采集的图像时,还可以发送该图像的第一索引,例如可以发送采集图像的时间、采集图像的地点、采集图像的图像采集设备(如摄像头)的标识等信息。在接收到图像和第一索引后,可以将该图像与相应的第一索引关联的存储,如存储在数据库中,该数据库可以为本地数据库也可以为云端数据库。In some possible implementation manners, when the image capture device is capturing an image and sending the captured image, it may also send the first index of the image, for example, the time when the image was captured, the location where the image was captured, and the image capture device that captured the image ( Such as camera identification and other information. After the image and the first index are received, the image can be stored in association with the corresponding first index, such as stored in a database, which may be a local database or a cloud database.
S20:对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;S20: Perform distributed clustering processing on the images in the image data set to obtain at least one cluster;
在一些可能的实施方式中,在获得图像数据集后,可以对该图像数据集中的多个图像执行分布式聚类处理。其中,图像数据集中图像可以为相同对象或者不同对象的图像,本公开实施例可以针对图像进行分布式聚类处理,得到多个聚类,其中得到的每个聚类内的图像包括的是相同对象的图像。其中通过分布式聚类处理可以同时并行的执行聚类处理,在保证聚类精度的前提下,还可以提高聚类效率。In some possible implementations, after the image data set is obtained, distributed clustering processing may be performed on multiple images in the image data set. Among them, the images in the image data set can be images of the same object or different objects. The embodiments of the present disclosure can perform distributed clustering processing on the images to obtain multiple clusters, wherein the obtained images in each cluster include the same The image of the object. Among them, the distributed clustering process can perform the clustering process in parallel at the same time, and the clustering efficiency can be improved under the premise of ensuring the clustering accuracy.
在一些可能的实施方式中,可以基于图像数据集中的图像对应的特征信息之间的相似度,确定两个图像是否包括相同的对象。例如,可以提取图像中的人物对象的人脸特征确定任意两个图像的人脸特征之间的相似度,将相似度大于阈值的两个图像确定为包括相同对象的图像,该两个图像即可以被聚类到一起,进而得到聚类结果。或者,在其他实施例中,也可以通过确定出每个图像的人脸特征的K近邻的人脸特征(相似度最高的K个人脸特征,K为大于或者等于1的整数),并从该K近邻的人脸特征中确定出相似度大于阈值的人脸特征。或者,也可以通过其他方式执行聚类处理。In some possible implementation manners, it may be determined whether two images include the same object based on the similarity between the feature information corresponding to the images in the image data set. For example, the facial features of the human object in the image can be extracted to determine the similarity between the facial features of any two images, and the two images with the similarity greater than the threshold are determined to include the same object. The two images are Can be clustered together, and then get the clustering result. Or, in other embodiments, it is also possible to determine the face features of the K neighbors of the face features of each image (the K face features with the highest similarity, K is an integer greater than or equal to 1), and from the Among the facial features of K-nearest neighbors, the facial features whose similarity is greater than the threshold are determined. Alternatively, the clustering process can also be performed in other ways.
S30:基于得到的聚类中各图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。S30: Based on the obtained first index associated with each image in the cluster, determine spatiotemporal trajectory information of the object corresponding to the cluster.
在一些可能的实施方式中,得到的每个聚类中包括的图像为相同对象的图像,因此,通过该聚类中的图像所关联的第一索引,即可以确定出该聚类对应的对象的出现时间、位置等信息。通过各对象的时间信息和位置信息即可以形成关于该对象的时空轨迹信息。例如,可以建立时间和位置坐标系,通过一个聚类内各图像的第一索引可以在该坐标系中标示出对象的出现时间、地点等信息,从而可以直观的显示该对象的时空轨迹。In some possible implementations, the obtained images included in each cluster are images of the same object. Therefore, the object corresponding to the cluster can be determined through the first index associated with the images in the cluster. The appearance time, location and other information of. Through the time information and location information of each object, the spatiotemporal trajectory information about the object can be formed. For example, a time and location coordinate system can be established, and the appearance time and location of the object can be marked in the coordinate system through the first index of each image in a cluster, so that the spatiotemporal trajectory of the object can be displayed intuitively.
基于上述配置,本公开实施例可以基于分布式聚类的聚类结果,根据每个聚类中各图像关联的第一索引得到该聚类对应的对象的时空轨迹信息,本公开实施例有效地挖掘数据中潜在的轨迹信息,充分利用数据的价值和这些数据背后依赖的资源投入,而且本公开实施例通过分布式聚类的聚类方式,可以加快聚类处理速度。Based on the above configuration, the embodiment of the present disclosure can obtain the spatiotemporal trajectory information of the object corresponding to the cluster according to the first index associated with each image in each cluster based on the clustering result of the distributed clustering. The embodiment of the present disclosure effectively Mining potential trajectory information in the data, making full use of the value of the data and the resource input behind the data, and the embodiment of the present disclosure can accelerate the clustering processing speed through the distributed clustering clustering method.
下面结合附图对本公开实施例进行详细说明。其中,在得到图像数据集之后,可以对图像数据集中的图像执行聚类处理。图2示出根据本公开实施例的一种图像处理方法中步骤S20的流程图。其中,所述对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类(步骤S20),可以包括:The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Among them, after the image data set is obtained, clustering processing can be performed on the images in the image data set. Fig. 2 shows a flowchart of step S20 in an image processing method according to an embodiment of the present disclosure. Wherein, performing distributed clustering processing on the images in the image data set to obtain at least one cluster (step S20) may include:
S21:分布式并行地获取所述图像数据集中的所述图像的图像特征;S21: Acquire image features of the images in the image data set in a distributed and parallel manner;
S22:分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;S22: Distributed and parallelly perform quantization processing on the image feature to obtain the quantized feature corresponding to the image feature;
S23:基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。S23: Perform the distributed clustering process based on the quantified feature corresponding to the image in the image data set to obtain the at least one cluster.
在一些可能的实施方式中,图像可以为人脸图像,相应的图像特征即为对应的人脸特征。步骤S21中,获取图像的图像特征时可以通过特征提取算法提取图像的图像特征,也可以通过经过训练能够执行特征提取的神经网络执行该图像特征的提取。其中,特征提取算法可以包括主成分分析(Principal Components Analysis,简称PCA)、线性判别分析(Linear Discriminant Analysis,简称LDA)、独立元分析(Independent Component Analysis,简称ICA)等算法中的至少一种,或者也可以采用其他能够识别人脸区域并得到人脸区域的特征的算法,神经网络可以为卷积神经网络,例如VGG网络(Visual Geometry Group Network),通过卷积神经网络对图像进行卷积处理,并得到图像的人脸区域的特征,即人脸特征。本公开实施例对特征提取算法以及特征提取的神经网络不作具体限定,只要能够实现人脸特征(图像特征)的提取,即可以作为本公开实施例。In some possible implementation manners, the image may be a face image, and the corresponding image feature is the corresponding face feature. In step S21, the image feature of the image can be extracted by a feature extraction algorithm when acquiring the image feature of the image, or the image feature can be extracted by a neural network trained to perform feature extraction. Among them, the feature extraction algorithm may include at least one of Principal Components Analysis (PCA), Linear Discriminant Analysis (LDA), Independent Component Analysis (ICA) and other algorithms. Alternatively, other algorithms that can recognize the face area and obtain the characteristics of the face area can also be used. The neural network can be a convolutional neural network, such as the VGG network (Visual Geometry Group Network), which convolutes the image through the convolutional neural network. , And get the features of the face area of the image, that is, face features. The embodiment of the present disclosure does not specifically limit the feature extraction algorithm and the neural network for feature extraction, as long as the extraction of facial features (image features) can be realized, it can be used as an embodiment of the present disclosure.
另外,在一些可能的实施方式中,为了加快图像特征的提取速度,本公开实施例可以分布式并行的提取各图像的图像特征。In addition, in some possible implementation manners, in order to speed up the extraction of image features, the embodiments of the present disclosure may extract image features of each image in a distributed and parallel manner.
图3示出根据本公开实施例的一种图像处理方法中步骤S21的流程图,其中所述分布式并行地获取所述图像数据集中的所述图像的图像特征(步骤S21)可以包括:Fig. 3 shows a flowchart of step S21 in an image processing method according to an embodiment of the present disclosure, wherein the distributed and parallel acquisition of the image characteristics of the image in the image data set (step S21) may include:
S211:将所述图像数据集中的多个所述图像进行分组,得到多个图像组;S211: Group the multiple images in the image data set to obtain multiple image groups;
在一些可能的实施方式中,可以将图像数据集中的多个图像进行分组,得到多个图像组,每个图像组中可以包括至少一个图像。其中对图像进行分组的方式可以包括平均分组或者随机分组。得到的图像组的数量可以为预先配置的组数,该组数可以小于或者等于下述特征提取模型的数量。In some possible implementations, multiple images in the image data set may be grouped to obtain multiple image groups, and each image group may include at least one image. The method for grouping images may include average grouping or random grouping. The number of image groups obtained can be a pre-configured number of groups, and the number of groups can be less than or equal to the number of feature extraction models described below.
S212:将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。S212: Input the multiple image groups into multiple feature extraction models respectively, and use the multiple feature extraction models to execute feature extraction processing of images in the image groups corresponding to the feature extraction models in a distributed and parallel manner, to obtain the multiple feature extraction models. The image features of each image, where each feature extraction model inputs different image groups.
在一些可能的实施方式中,基于得到的多个图像组,可以执行特征提取的分布式并行处理过程。其中可以将得到的多个图像组中的每个图像组分配给特征提取模型中的一个模型,通过特征提取模型 执行被分配的图像组内的图像的特征提取处理,得到相应图像的图像特征。In some possible implementations, based on the obtained multiple image groups, a distributed parallel processing process of feature extraction may be performed. Each of the obtained multiple image groups can be assigned to one of the feature extraction models, and the feature extraction model is used to perform feature extraction processing of the images in the assigned image groups to obtain the image features of the corresponding images.
在一些可能的实施方式,特征提取模型可以采用上述特征提取算法执行特征提取处理,或者特征提取模型可以构造为上述特征提取神经网络得到图像特征,本公开对此不作具体限定。In some possible implementations, the feature extraction model can use the feature extraction algorithm described above to perform feature extraction processing, or the feature extraction model can be constructed as the feature extraction neural network described above to obtain image features, which is not specifically limited in the present disclosure.
在一些可能的实施方式中,可以利用多个特征提取模型分布式并行的执行各图像组的特征提取,例如每个特征提取模型可以同时执行一个图像组或者多个图像组的图像特征提取,从而加快特征提取的速度。In some possible implementations, multiple feature extraction models can be used to perform feature extraction of each image group in a distributed and parallel manner. For example, each feature extraction model can perform image feature extraction of one image group or multiple image groups at the same time, thereby Speed up feature extraction.
在一些可能的实施方式中,在得到图像的图像特征之后,可以关联的存储图像的第一索引和图像特征,建立第一索引和图像特征之间的映射关系,并可以在数据库中存储该映射关系。例如,监控的实时图片流可以被输入至前端的分布式特征提取模块(特征提取模型),通过该分布式特征提取模块提取图像特征后,将该图像特征以持久化特征形态存储基于时空信息的特征数据库,即将第一索引和图像特征以持久化特征的形式存储在特征数据库中。在数据库中,该持久化特征以索引结构存储,持久化特征在数据库中的第一索引key可以包括Region id、Camera idx、Captured time和Sequence id。其中,Region id为摄像头区域标识,Camera idx为区域内的摄像头id,Captured time为图片的采集时间,Sequence id为自增的序列标识(如依次排列的数字等标识),可以用于去重,第一索引可以构成每条图像特征的唯一标识并可以将图像特征的时空信息包含在内。经第一索引与对应的图像特征关联存储,可以方便的获得各图像的图像特征(持久化特征),同时获知图像中对象的时空数据信息(时间和位置)。In some possible implementations, after the image feature of the image is obtained, the first index of the image and the image feature can be stored in association, the mapping relationship between the first index and the image feature can be established, and the mapping can be stored in the database. relationship. For example, the monitored real-time image stream can be input to the front-end distributed feature extraction module (feature extraction model). After the image features are extracted by the distributed feature extraction module, the image features are stored in the form of persistent features based on spatio-temporal information. The feature database, that is, the first index and image features are stored in the feature database in the form of persistent features. In the database, the persistence feature is stored in an index structure, and the first index key of the persistence feature in the database may include Region id, Camera idx, Captured time, and Sequence id. Among them, Region id is the camera area identifier, Camera idx is the camera id in the area, Captured time is the image capture time, and Sequence id is the self-increasing sequence identifier (such as the identifier of the number in sequence), which can be used for deduplication. The first index can constitute a unique identification of each image feature and can include the spatiotemporal information of the image feature. After the first index is stored in association with the corresponding image feature, the image feature (persistent feature) of each image can be easily obtained, and the spatiotemporal data information (time and location) of the object in the image can be obtained at the same time.
在一些可能的实施方式中,本公开实施例可以在得到图像的图像特征之后,对图像执行量化处理,得到每个图像对应的量化特征,即可以执行步骤S22。其中本公开实施例可以采用乘积量化(Product quantization,简称PQ)编码得到图像数据集中各图像的图像特征对应的量化特征。例如通过PQ量化器执行该量化处理。其中通过PQ量化器执行量化处理的过程可以包括将图像特征的向量空间分解成多个低维向量空间的笛卡尔积,并对分解得到的低维向量空间分别做量化,这样每个图像特征就能有多个低维空间的量化组合表示,即得到量化特征。对于PQ编码的具体过程,本公开对此不做具体说明,本领域技术人员可以通过现有技术手段实现该量化过程。通过量化处理可以实现图像特征的数据压缩,例如本公开实施例图像的图像特征的维度可以为N,每维数据为float32浮点数(即32位浮点数),经量化处理后得到的量化特征的维度可以为N,以及每维度的数据为half浮点数(即半精度浮点数),即通过量化处理可以减少特征的数据量。In some possible implementation manners, the embodiment of the present disclosure may perform quantization processing on the image after obtaining the image feature of the image to obtain the quantized feature corresponding to each image, that is, step S22 may be performed. The embodiments of the present disclosure may adopt product quantization (PQ) coding to obtain quantized features corresponding to image features of each image in the image data set. This quantization process is performed by a PQ quantizer, for example. The process of performing the quantization process through the PQ quantizer can include decomposing the vector space of the image feature into the Cartesian product of multiple low-dimensional vector spaces, and quantizing the low-dimensional vector space obtained by the decomposition, so that each image feature is There can be multiple quantized combination representations of low-dimensional spaces to obtain quantized features. Regarding the specific process of PQ encoding, this disclosure does not specifically describe this, and those skilled in the art can implement the quantization process through existing technical means. Image feature data compression can be achieved through quantization processing. For example, the image feature dimension of the image in the embodiment of the present disclosure can be N, and each dimension data is a float32 floating point number (ie, a 32-bit floating point number). The quantization feature obtained after the quantization process is The dimension can be N, and the data of each dimension is a half floating point number (that is, half-precision floating point number), that is, the amount of feature data can be reduced through quantization.
在一些可能的实施方式中,可以通过一个量化器执行所有的图像特征的量化处理,也可以通过多个量化器执行图像特征的量化处理,即可以通过至少一个量化器对全部图像的图像特征执行量化处理,得到全部图像对应的量化特征。其中,在通过多个量化器执行图像特征的量化处理过程时,可以采用分布式并行执行的方式,从而提高处理速度。In some possible implementations, the quantization process of all image features can be performed by one quantizer, or the quantization process of image features can be performed by multiple quantizers, that is, the image features of all images can be performed by at least one quantizer. The quantization process obtains the quantized features corresponding to all images. Among them, when the image feature quantization process is executed by multiple quantizers, a distributed parallel execution method can be adopted to improve the processing speed.
下面对量化处理以及聚类处理的过程进行详细的说明,如上述实施例所述,为了加快量化特征的获取过程,本公开实施例可以采用分布式并行执行的方式执行所述量化处理,其中图4示出根据本公开实施例的一种图像处理方法中步骤S22的流程图,其中,所述分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征,可以包括:The process of quantization and clustering will be described in detail below. As described in the above embodiments, in order to speed up the process of acquiring quantized features, the embodiments of the present disclosure may use distributed parallel execution to execute the quantization process, where 4 shows a flowchart of step S22 in an image processing method according to an embodiment of the present disclosure, wherein the distributed and parallel quantization processing on the image features to obtain the quantized features corresponding to the image features may include :
S221:对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;S221: Perform grouping processing on the image features of the multiple images to obtain multiple first groups, where the first group includes the image features of at least one image;
本公开实施例可以对图像特征进行分组,分布式并行的执行对各分组的图像特征的量化处理,得到相应的量化特征。在通过多个量化器执行图像数据集的图像特征的量化处理时,可以通过该多个量化器分布并行执行不同图像的图像特征的量化处理,从而可以减少量化处理所需时间,提高运算速度。The embodiments of the present disclosure can group image features, and perform quantization processing on image features of each group in a distributed and parallel manner to obtain corresponding quantized features. When multiple quantizers are used to perform quantization of image features of an image data set, the multiple quantizers can be distributed and executed in parallel to quantize image features of different images, thereby reducing the time required for quantization and increasing the speed of calculation.
在并行执行各图像特征的量化处理过程时,可以将图像特征分成多个分组(多个第一分组),该第一分组也可以与上述对图像的分组(图像组)相同,即按照图像分组的方式将图像特征分成对应数量的分组,即可以直接得到的图像组的图像特征确定图像特征的分组,或者也可以重新形成多个第一分组,本公开对此不作具体限定。每个第一分组至少包括一个图像的图像特征。其中,对于第一分组的数量本公开不作具体限定,其可以根据量化器的数量、处理能力以及图像的数量综合确定,本领域 技术人员或者神经网络可以根据实际需求确定。When performing the quantization process of each image feature in parallel, the image features can be divided into multiple groups (multiple first groups), and the first group can also be the same as the above grouping of images (image groups), that is, grouped according to images The image features are divided into corresponding number of groups, that is, the image feature of the image group can be directly obtained to determine the group of the image feature, or multiple first groups can be re-formed, which is not specifically limited in the present disclosure. Each first group includes at least one image feature of the image. The present disclosure does not specifically limit the number of the first group, which can be determined comprehensively according to the number of quantizers, processing capabilities, and the number of images, and can be determined by a person skilled in the art or a neural network according to actual needs.
另外,本公开实施例中,对所述多个图像的图像特征进行分组处理的方式可以包括:对所述多个图像的图像特征执行平均分组,或者,按照随机分组方式对所述多个图像的图像特征执行分组。即本公开实施例可以按照分组的数量对图像数据集中各图像的图像特征进行平均分组,或者也可以随机分组,得到多个第一分组。只要能够将多个图像的图像特征分成多个第一分组,即可以作为本公开实施例。In addition, in the embodiment of the present disclosure, the manner of grouping the image features of the multiple images may include: performing average grouping on the image features of the multiple images, or grouping the multiple images in a random manner. Perform grouping of image features. That is, the embodiment of the present disclosure can group the image features of each image in the image data set equally according to the number of groups, or can also group randomly to obtain multiple first groups. As long as the image features of multiple images can be divided into multiple first groups, it can be used as an embodiment of the present disclosure.
在一些可能的实施方式中,在对图像特征进行分组得到多个第一分组的情况下,还可以为各第一分组分配标识(如第二索引),并将第二索引和第一分组关联存储。例如,图像数据集的各图像特征可以形成为图像特征库T(特征数据库),将图像特征库T中的图像特征进行分组(分片)得到n个第一分组{S 1,S 2,...S n},其中S i表示第i个第一分组,i为大于或者等于1且小于或者等于n的整数,n表示第一分组的数量,n为大于或者等于1的整数。其中每个第一分组中可以包括至少一个图像的图像特征。为了方便区分各第一分组以及方便量化处理,可以为各第一分组分配相应的第二索引{I 11,I 12,...I 1n},其中第一分组S i的第一索引可以为I 1iIn some possible implementation manners, in the case of grouping image features to obtain multiple first groups, an identifier (such as a second index) may also be assigned to each first group, and the second index and the first group may be associated storage. For example, each image feature of the image data set can be formed into an image feature library T (feature database), and the image features in the image feature library T are grouped (sliced) to obtain n first groups {S 1 , S 2 ,. ..S n }, where S i represents the i-th first group, i is an integer greater than or equal to 1 and less than or equal to n, n represents the number of first groups, and n is an integer greater than or equal to 1. Each of the first groups may include image characteristics of at least one image. In order to easily distinguish each of the first packet and convenient quantization process may correspond to a first packet for the second index distribution {I 11, I 12, ... I 1n}, wherein the first index of the first packet may be S i I 1i .
S222:分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。S222: Distributedly execute quantization processing of the image features of the multiple first groups in parallel to obtain quantized features corresponding to the image features.
在一些可能的实施方式中,在对图像特征进行分组得到多个(至少两个)第一分组后,可以分别并行的执行各第一分组内的图像特征的量化处理。例如可以通过多个量化器执行该量化处理,每个量化器可以执行一个或多个第一分组的图像特征的量化处理,从而加快处理速度。In some possible implementation manners, after the image features are grouped to obtain multiple (at least two) first groups, the quantization processing of the image features in each first group may be performed in parallel respectively. For example, the quantization process may be performed by multiple quantizers, and each quantizer may perform quantization process of one or more image features of the first group, thereby speeding up the processing.
在一些可能的实施方式,也可以按照各第一分组的第二索引为各量化器分配相应的量化处理任务。即可以将各第一分组的第二索引分别分配给多个量化器,其中每个量化器被分配的第二索引不同,通过量化器分别并行的执行所分配的第二索引对应的量化处理任务,即执行对应的第一分组内的图像特征的量化处理。In some possible implementation manners, each quantizer may also be assigned a corresponding quantization processing task according to the second index of each first group. That is, the second index of each first group can be assigned to multiple quantizers, where each quantizer is assigned a different second index, and the quantizers respectively execute the quantization processing tasks corresponding to the assigned second indexes in parallel. , That is, perform the quantization process of the image features in the corresponding first group.
另外,为了进一步提高量化处理速度,可以使得量化器的数量大于或者等于第二分组的数量,同时每个量化器可以至多被分配一个第二索引,即每个量化器可以仅执行一个第二索引对应的第一分组内的图像特征的量化处理。但上述并不作为本公开实施例的具体限定,分组数量以及量化器的数量,以及每个量化器被分配的第一索引的数量可以根据不同的需求进行设定。In addition, in order to further improve the quantization processing speed, the number of quantizers can be greater than or equal to the number of second groups, and each quantizer can be assigned at most one second index, that is, each quantizer can only execute one second index. The quantization processing of the image features in the corresponding first group. However, the foregoing is not a specific limitation of the embodiments of the present disclosure. The number of groups and the number of quantizers, and the number of first indexes allocated to each quantizer can be set according to different requirements.
如上述实施例所述,量化处理可以减小图像特征的数据量。本公开实施例中量化处理的方式可以为乘积量化(Product quantization,简称PQ)编码,例如通过PQ量化器执行该量化处理。通过量化处理可以实现图像特征的数据压缩,例如本公开实施例图像的图像特征的维度可以为N,每维数据为float32浮点数,经量化处理后得到的量化特征的维度可以为N,以及每维度的数据为half浮点数,即通过量化处理可以减少特征的数据量。As described in the foregoing embodiment, the quantization process can reduce the data amount of image features. The quantization processing method in the embodiment of the present disclosure may be product quantization (PQ) coding, for example, the quantization processing is performed by a PQ quantizer. Image feature data compression can be achieved through quantization processing. For example, the dimension of the image feature of the image in the embodiment of the present disclosure can be N, and the data of each dimension can be a float32 floating point number. The dimension of the quantization feature obtained after quantization can be N, and each The dimensional data is a half floating point number, that is, the amount of feature data can be reduced through quantization.
通过上述实施例,可以实现量化处理的分布并行执行,提高量化处理的速度。Through the above-mentioned embodiments, distributed parallel execution of quantization processing can be realized, and the speed of quantization processing can be improved.
在得到图像数据集中的图像的量化特征之后,也可以将量化特征和第一索引关联的存储,从而可以建立第一索引、第二索引、图像、图像特征以及量化特征的关联存储,方便数据的读取和调用。After obtaining the quantized features of the images in the image data set, the quantized features can also be stored in association with the first index, so that the associated storage of the first index, second index, image, image feature, and quantized feature can be established to facilitate data retrieval Read and call.
另外,在得到图像的量化特征的情况下,可以利用各图像的量化特征对该图像数据集执行聚类处理,即可以执行步骤S23。其中,图像数据集中图像可以为相同对象或者不同对象的图像,本公开实施例可以针对图像进行聚类处理,得到多个聚类,其中得到的每个聚类内的图像为相同对象的图像。In addition, when the quantized feature of the image is obtained, the quantized feature of each image can be used to perform clustering processing on the image data set, that is, step S23 can be performed. Among them, the images in the image data set may be images of the same object or different objects. The embodiments of the present disclosure may perform clustering processing on the images to obtain multiple clusters, and the obtained images in each cluster are images of the same object.
图5示出根据本公开实施例的一种图像处理方法中步骤S23的流程图,其中,所述基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类(步骤S23),可以包括:Fig. 5 shows a flowchart of step S23 in an image processing method according to an embodiment of the present disclosure, in which the distributed clustering process is executed based on the quantized feature corresponding to the image in the image data set, Obtaining the at least one cluster (step S23) may include:
S231:获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;S231: Acquire a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images;
在一些可能的实施方式中,在得到图像的图像特征对应的量化特征之后,则可以基于量化特征执 行图像的聚类处理,即得到相同对象的聚类(具有相同身份的对象的聚类)。其中,本公开实施例可以首先得到任意两个量化特征之间的第一相似度,其中第一相似度可以为余弦相似度,在其他实施例中也可以采用其他的方式确定量化特征之间的第一相似度,本公开对此不作具体限定。In some possible implementations, after the quantitative features corresponding to the image features of the image are obtained, clustering of the image can be performed based on the quantitative features, that is, clusters of the same objects (clusters of objects with the same identity) are obtained. Among them, the embodiment of the present disclosure may first obtain the first similarity between any two quantized features, where the first similarity may be the cosine similarity. In other embodiments, other methods may be used to determine the difference between the quantized features. The first degree of similarity is not specifically limited in this disclosure.
在一些可能的实施方式中,可以利用一个运算器计算任意两个量化特征之间的第一相似度,也可以通过多个运算器分布式并行地计算各量化特征之间的第一相似度。通过多个运算器并行执行运算可以加快运算速度。In some possible implementation manners, one arithmetic unit can be used to calculate the first similarity between any two quantized features, or multiple arithmetic units can be used to calculate the first similarity between each quantized feature in a distributed and parallel manner. Parallel execution of calculations by multiple operators can speed up calculations.
同样的,本公开实施例还可以基于量化特征的分组分布执行各分组的量化特征与其余量化特征之间的第一相似度。其中,可以对各图像的量化特征进行分组,得到多个第二分组,每个第二分组包括至少一个图像的量化特征。其中,可以直接基于第一分组确定第二分组,即根据第一分组的图像特征确定相应的量化特征,并根据第一分组内的图像特征对应的量化特征直接形成第二分组。或者,也可以按照各图像的量化特征进行重新分组,得到多个第二分组。同样的,该分组的方式可以为平均分组或者随机分组,本公开对此不作具体限定。Similarly, the embodiment of the present disclosure may also perform the first similarity between the quantitative features of each group and the remaining quantitative features based on the group distribution of the quantitative features. Wherein, the quantized features of each image can be grouped to obtain multiple second groups, and each second group includes at least one quantized feature of the image. Wherein, the second group can be determined directly based on the first group, that is, the corresponding quantized feature is determined according to the image feature of the first group, and the second group is directly formed according to the quantized feature corresponding to the image feature in the first group. Alternatively, it is also possible to regroup according to the quantized characteristics of each image to obtain multiple second groups. Similarly, the grouping method may be average grouping or random grouping, which is not specifically limited in the present disclosure.
在得到多个第二分组后,也可以为各第二分组配置第三索引,得到多个第三索引,通过第三索引可以区分各第二分组,还可以将第三索引和第二分组关联存储。例如,图像数据集的各图像的量化特征可以形成为量化特征库L,或者可以将量化特征也关联的存储到上述图像特征库T中,量化特征与图像、图像特征、第一索引、第二索引、第三索引可以对应的关联存储。通过对量化特征库L中的量化特征进行分组(分片)可以得到m个第二分组{L 1,L 2,...L m},其中L j表示第j个第二分组,j为大于或者等于1且小于或者等于m的整数,m表示第二分组的数量,m为大于或者等于1的整数。为了方便区分各第二分组以及方便聚类处理,可以为各第二分组分配相应的第三索引{I 21,I 22,...I 2m},其中第二分组L j的第三索引可以为I 2jAfter obtaining multiple second groups, you can also configure a third index for each second group to obtain multiple third indexes. The third index can distinguish each second group, and you can also associate the third index with the second group. storage. For example, the quantitative features of each image in the image data set can be formed into a quantitative feature library L, or the quantitative features can also be stored in the aforementioned image feature library T in association with each other. The quantitative features are related to the image, image feature, first index, second The index and the third index can be stored correspondingly. By grouping (slicing) the quantized features in the quantized feature library L, m second groups {L 1 , L 2 ,...L m } can be obtained, where L j represents the jth second group, and j is An integer greater than or equal to 1 and less than or equal to m, where m represents the number of second groups, and m is an integer greater than or equal to 1. In order to distinguish each second group conveniently and facilitate clustering processing, each second group can be assigned a corresponding third index {I 21 , I 22 ,...I 2m }, where the third index of the second group L j can be Is I 2j .
在得到多个第二分组后,可以利用多个运算器分别执行该多个第二分组内的量化特征与其余量化特征的第一相似度。由于图像数据集的数据量可能会很大,可以利用多个运算其并行执行各第二分组中任意一个量化特征与其余全部量化特征之间的第一相似度。After multiple second groups are obtained, multiple operators may be used to respectively execute the first similarity between the quantized features in the multiple second groups and the remaining quantized features. Since the data volume of the image data set may be very large, multiple operations can be used to execute the first similarity between any one of the quantized features in each second group and all the remaining quantized features in parallel.
在一些可能的实施方式中,可以包括多个运算器,该运算器可以为任意具有运算处理功能的电子器件,如CPU、处理器、单片机等,本公开对此不作具体限定。其中,每个运算器可以计算一个或多个第二分组中的各量化特征与其余全部图像的量化特征之间的第一相似度,从而加快处理速度。In some possible implementation manners, multiple arithmetic units may be included, and the arithmetic units may be any electronic device with arithmetic processing function, such as a CPU, a processor, a single-chip computer, etc., which is not specifically limited in the present disclosure. Among them, each arithmetic unit can calculate the first degree of similarity between each quantized feature in one or more second groups and the quantized features of all other images, thereby speeding up the processing.
在一些可能的实施方式,也可以按照各第二分组的第三索引为各运算器分配相应的相似度运算任务。即可以将各第二分组的第三索引分别分配给多个运算器,其中每个运算被分配的第三索引不同,通过运算器分别并行的执行所分配的第三索引对应的相似度运算任务,相似度运算任务为获取第三索引对应的第二分组内的图像的量化特征与该图像以外的全部图像的量化特征之间的第一相似度。从而通过多个运算器的并行执行,则可以快速的得到任意两个图像的量化特征之间的第一相似度。In some possible implementation manners, each arithmetic unit may also be assigned a corresponding similarity calculation task according to the third index of each second group. That is, the third index of each second group can be assigned to multiple arithmetic units, where each operation is assigned a different third index, and the similarity calculation tasks corresponding to the assigned third index can be executed in parallel through the arithmetic units. , The similarity calculation task is to obtain the first similarity between the quantized feature of the image in the second group corresponding to the third index and the quantized feature of all images except the image. Therefore, through the parallel execution of multiple arithmetic units, the first degree of similarity between the quantized features of any two images can be quickly obtained.
另外,为了进一步提高相似度运算速度,可以使得运算器的数量大于或者等于第二分组的数量,同时每个运算器可以至多被分配一个第三索引,可以每个运算器仅执行一个第三索引对应的第二分组内的量化特征与其余量化特征之间的第一相似度运算。但上述并不作为本公开实施例的具体限定,分组数量以及运算器的数量,以及每个运算器被分配的第三索引的数量可以根据不同的需求进行设定。In addition, in order to further improve the similarity calculation speed, the number of operators can be greater than or equal to the number of the second group. At the same time, each operator can be assigned at most one third index, and each operator can execute only one third index. The first similarity calculation between the quantized features in the corresponding second group and the remaining quantized features. However, the foregoing is not a specific limitation of the embodiments of the present disclosure. The number of groups and the number of operators, and the number of third indexes allocated to each operator can be set according to different requirements.
S232:基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;S232: Determine the K1 neighbor image of any image based on the first similarity, where the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image , The K1 is an integer greater than or equal to 1;
在得到任意两个量化特征之间的第一相似度之后,可以获取任一图像的K1近邻图像,即与任一图像的量化特征的第一相似度最高的K1个量化特征对应的图像,该任一图像和第一相似度最高的K1个量化特征对应的图像则为近邻图像,表征可能包括相同对象的图像。其中可以获得针对任一量化特征的第一相似度序列,第一相似度序列为与该任一量化特征从高到低或者从低到高排序的量化特征的序列,在得到第一相似度序列之后,即可以方便的确定与该任一量化特征的第一相似度最高的K1个量化 特征,进而确定任一图像的K1近邻。其中K1的数量可以根据图像数据集中的数量确定,如可以为20、30,或者在其他实施例中也可以设置成其他数值,本公开对此不作具体限定。After obtaining the first similarity between any two quantized features, the K1 neighbor image of any image can be obtained, that is, the image corresponding to the K1 quantized feature with the highest first similarity of the quantized feature of any image. Any image corresponding to the first K1 quantized feature with the highest similarity is a neighboring image, which represents an image that may include the same object. The first similarity sequence for any quantized feature can be obtained. The first similarity sequence is a sequence of quantized features sorted from high to low or from low to high with the any quantized feature, and the first similarity sequence is obtained After that, it is convenient to determine the K1 quantized features with the highest first similarity to any quantized feature, and then determine the K1 neighbors of any image. The number of K1 can be determined according to the number in the image data set, such as 20, 30, or other values in other embodiments, which is not specifically limited in the present disclosure.
S233:利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。S233: Determine a clustering result of the distributed clustering processing by using any image and the K1 neighbor image of the any image.
在一些可能的实施方式中,在得到每个图像的K1近邻图像之后,可以执行后续的聚类处理。例如可以直接利用K1近邻得到聚类,或者也可以基于K1近邻的图像特征得到聚类。图6示出根据本公开实施例的一种图像处理方法中步骤S233的流程图。其中,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果(步骤S233),可以包括:In some possible implementation manners, after the K1 neighbor image of each image is obtained, subsequent clustering processing may be performed. For example, K1 neighbors can be directly used to obtain clusters, or clusters can also be obtained based on image features of K1 neighbors. Fig. 6 shows a flowchart of step S233 in an image processing method according to an embodiment of the present disclosure. Wherein, the determining the clustering result of the distributed clustering process by using the any image and the K1 neighbor image of the any image (step S233) may include:
S23301:从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;S23301: Select, from the K1 neighboring images, a first image set that has a first similarity with the quantized feature of any image that is greater than a first threshold;
S23302:将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。S23302: Mark all the images and any one of the images in the first image set as a first state, and form a cluster based on each image marked as the first state, and the first state is that the images include the same The state of the object.
在一些可能的实施方式中,得到每个图像的K1近邻图像(量化特征的第一相似度最高的K1个图像)之后,可以直接从与每个图像的K1近邻图像中选择出第一相似度大于第一阈值的图像,通过选择出的第一相似度大于第一阈值的图像形成第一图像集。其中第一阈值可以为设定的值,如可以为90%,但不作为本公开的具体限定。通过第一阈值的设定可以选择出与任一图像最相近的图像。In some possible implementations, after obtaining the K1 neighbor images of each image (the K1 images with the highest first similarity of quantized features), the first similarity can be directly selected from the K1 neighbor images of each image For the images larger than the first threshold, the first image set is formed by selecting the images with the first similarity larger than the first threshold. The first threshold may be a set value, such as 90%, but it is not a specific limitation of the present disclosure. The image that is closest to any image can be selected by setting the first threshold.
在从任一图像的K1近邻图像中选择出第一相似度大于第一阈值的第一图像集之后,可以将该任一图像与选择出的第一图像集中的全部图像标注为第一状态,并根据处于第一状态的图像形成一个聚类。例如,从图像A的K1近邻图像中选择出第一相似度大于第一阈值的图像为包括A1和A2的第一图像集,则可以将A分别与A1、A2标注为第一状态,从与A1的K1近邻图像中选择出第一相似度大于第一阈值的图像为包括B1第一图像集,此时可以将A1与B1标注为第一状态,以及A2的K1近邻图像中不存在第一相似度大于第一阈值的图像,不再对A2进行第一状态的标注。通过上述,则可以将A、A1、A2、B1归为一个聚类。即图像A、A1、A2、B1中包括相同的对象。After selecting a first image set with a first similarity greater than the first threshold from K1 neighbor images of any image, any image and all images in the selected first image set can be marked as the first state, And form a cluster according to the image in the first state. For example, if the image with the first similarity greater than the first threshold is selected from the K1 neighbor images of image A as the first image set including A1 and A2, then A and A1 and A2 can be marked as the first state respectively, from and The image with the first similarity greater than the first threshold is selected from the K1 neighbor images of A1 to include the first image set of B1. At this time, A1 and B1 can be marked as the first state, and there is no first image in the K1 neighbor images of A2. For images with similarity greater than the first threshold, A2 is no longer labeled in the first state. Through the above, A, A1, A2, and B1 can be classified into one cluster. That is, images A, A1, A2, and B1 include the same object.
通过上述方式可以方便的得到聚类结果,由于量化特征缩减了图像特征量,可以加快聚类速度,同时通过设置第一阈值,可以提高聚类精度。The clustering results can be easily obtained in the above manner. Since the quantized feature reduces the image feature amount, the clustering speed can be accelerated, and the clustering accuracy can be improved by setting the first threshold.
在另一些可能的实施例中,可以进一步结合图像特征的相似度来提高聚类精度。图7示出根据本公开实施例的一种图像处理方法中步骤S233的另一流程图,其中,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果(步骤S233),还可以包括:In other possible embodiments, the similarity of image features can be further combined to improve the clustering accuracy. FIG. 7 shows another flowchart of step S233 in an image processing method according to an embodiment of the present disclosure, wherein the use of any image and K1 neighbor images of any image determines the distributed cluster The clustering result of the class processing (step S233) may also include:
S23311:获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;S23311: Acquire a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image;
在一些可能的实施方式中,得到每个图像的K1近邻图像(量化特征第一相似度最高的K1个图像)之后,可以进一步计算该任一图像的图像特征和其对应的K1近邻图像的图像特征之间的第二相似度。也就是说,在得到任一图像的K1近邻图像之后,还可以对进一步计算该任一图像的图像特征与K1个近邻图像的图像特征之间的第二相似度。其中该第二相似度也可以为余弦相似度,或者在其他实施例中也可以通过其他方式确定相似度,本公开不作具体限定。In some possible implementation manners, after obtaining the K1 neighbor images of each image (the K1 images with the highest quantization feature first similarity), the image features of any image and the corresponding K1 neighbor images can be further calculated The second degree of similarity between features. That is, after obtaining the K1 neighboring image of any image, the second similarity between the image feature of the any image and the image features of the K1 neighboring images can be further calculated. The second degree of similarity may also be a cosine degree of similarity, or in other embodiments, the degree of similarity may also be determined in other ways, which is not specifically limited in the present disclosure.
S23312:基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;S23312: Determine the K2 neighbor image of any image based on the second similarity, and the image feature of the K2 neighbor image is the second similarity between the K1 neighbor image and the image feature of any image The highest K2 image features, K2 is an integer greater than or equal to 1 and less than or equal to K1;
在一些可能的实施方式中,可以得到的任一图像的图像特征与对应的K1近邻图像的图像特征之间的第二相似度,并进一步选择出第二相似度最高的K2个图像特征,将该K2个图像特征对应的图像确定为该任一图像的K2近邻图像。其中,K2的数值可以根据需求自行设定。In some possible implementations, the second similarity between the image feature of any image and the image feature of the corresponding K1 neighbor image can be obtained, and the K2 image features with the second highest similarity are further selected. The image corresponding to the K2 image features is determined as the K2 neighbor image of any image. Among them, the value of K2 can be set according to requirements.
S23313:从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;S23313: Select, from the K2 neighbor images, a second image set whose second similarity with the image feature of any image is greater than a second threshold;
在一些可能的实施方式中,得到每个图像的K2近邻图像(图像特征的第二相似度最高的K2个图像)之后,可以直接从与每个图像的K2近邻图像中选择出第二相似度大于第二阈值的图像,选择出的图像可以形成第二图像集。其中第二阈值可以为设定的值,如可以为90%,但不作为本公开的具体限 定。通过第二阈值的设定可以选择出与任一图像最相近的图像。In some possible implementations, after obtaining the K2 neighbor images of each image (the K2 images with the highest second similarity of image features), the second similarity can be directly selected from the K2 neighbor images of each image For images larger than the second threshold, the selected images can form a second image set. The second threshold may be a set value, such as 90%, but it is not a specific limitation of the present disclosure. The image closest to any image can be selected by setting the second threshold.
S23314:将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。S23314: Mark all the images and any one of the images in the second image set as the first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same The state of the object.
在一些可能的实施方式中,在从任一图像的K2近邻图像中选择出图像特征之间的第二相似度大于第一阈值的第二图像集之后,可以将该任一图像与选择出的第二图像集中的全部图像标注为第一状态,并根据处于第一状态的图像形成一个聚类。例如,从图像A的K2近邻图像中选择出第二相似度大于第二阈值的图像为图像A3和A4,则可以将A和A3、A4标注为第一状态,从与A3的K2近邻图像中选择出第二相似度大于第二阈值的图像为图像B2,此时可以将A3与B2标注为第一状态,以及A4的K2近邻图像中不存在第二相似度大于第二阈值的图像,不再对A4进行第一状态的标注。通过上述,则可以将A、A3、A4、B2归为一个聚类。即图像A、A3、A4、B2中包括相同的对象。In some possible implementations, after selecting a second image set whose second similarity between image features is greater than the first threshold from the K2 neighbor images of any image, the selected image may be All the images in the second image set are marked as the first state, and a cluster is formed according to the images in the first state. For example, from the K2 neighbor images of image A, the images with the second similarity greater than the second threshold are selected as images A3 and A4, then A, A3, and A4 can be marked as the first state, from the K2 neighbor images of A3 The image with the second similarity greater than the second threshold is selected as image B2. At this time, A3 and B2 can be marked as the first state, and there is no image with the second similarity greater than the second threshold in the K2 neighbor images of A4. Then mark A4 in the first state. Through the above, A, A3, A4, and B2 can be classified into one cluster. That is, images A, A3, A4, and B2 include the same object.
通过上述方式可以方便的得到聚类结果,由于量化特征缩减了图像特征量,同时基于量化特征得到的K1近邻进一步确定图像特征最接近的K2近邻,从而在加快聚类速度的同时进一步提高了聚类精度。另外,执行量化特征、图像特征之间的相似度的计算过程中,也可以采用分布式并行运算的方式,从而加快聚类速度。The clustering results can be easily obtained by the above method. Since the quantized feature reduces the image feature amount, and the K1 neighbor obtained based on the quantized feature further determines the closest K2 neighbor of the image feature, thereby speeding up the clustering speed and further improving the clustering. Class precision. In addition, in the process of performing the calculation of the similarity between quantized features and image features, a distributed parallel operation can also be used to speed up the clustering speed.
本公开实施例中,由于量化特征的特征量相对于图像特征被缩减,因此减少了运算成本的耗费,同时通过多个运算器的并行处理,可以进一步提高运算速度。In the embodiments of the present disclosure, since the feature amount of the quantized feature is reduced relative to the image feature, the computational cost is reduced, and the parallel processing of multiple arithmetic units can further increase the computational speed.
在得到图像的至少一个聚类后,可以认为相同聚类中的图像为同一对象(如人物对象)的图像的集合,利用聚类内的图像所关联的第一索引可以得到该对象出现的时间信息以及对应的位置信息,根据该时间信息和位置信息可以进一步得到该对象的时空轨迹信息。After at least one cluster of the image is obtained, the images in the same cluster can be considered as a collection of images of the same object (such as a person object), and the first index associated with the images in the cluster can be used to obtain the time when the object appears Information and corresponding location information, based on the time information and location information, the spatiotemporal trajectory information of the object can be further obtained.
如上所述,在执行聚类处理之后,可以得到至少一个聚类,其中,每个聚类中可以包括至少一个图像,相同聚类中的图像可以视作包括相同的对象。其中,在执行聚类处理后还可以进一步确定得到的每个聚类的类中心。在一些可能的实施方式中,可以将聚类中每个图像的图像特征的平均值作为该聚类的类中心。在得到类中心后还可以为该类中心分配第四索引,用于区别各类中心对应的聚类。也就是说,本公开实施例的各图像包括作为图像标识的第三索引、作为图像特征的第一分组的标识的第一索引,作为量化特征所在第二分组的标识的第二索引,以及作为聚类的标识的第四索引,上述索引以及对应的特征、图像等数据可以关联的存储。在其他实施例中,可能还存在其他特征数据的索引,本公开对此不作具体限定。另外,图像的第三索引、图像特征的第一分组的第一索引、量化特征的第二分组的第二索引以及聚类的第四索引均不相同,可以通过不同的符号标识进行表示。As described above, after performing the clustering process, at least one cluster may be obtained, wherein each cluster may include at least one image, and the images in the same cluster may be regarded as including the same object. Among them, after performing the clustering process, the cluster center of each cluster can be further determined. In some possible implementations, the average value of the image features of each image in the cluster may be used as the cluster center. After the class center is obtained, a fourth index can be assigned to the class center to distinguish the clusters corresponding to each class center. That is, each image in the embodiment of the present disclosure includes a third index as an image identifier, a first index as an identifier of the first group of image features, a second index as an identifier of the second group where the quantized feature is located, and as The fourth index of the cluster identification, the above-mentioned index and the corresponding feature, image and other data can be stored in association. In other embodiments, there may be indexes of other feature data, which are not specifically limited in the present disclosure. In addition, the third index of the image, the first index of the first group of image features, the second index of the second group of quantized features, and the fourth index of the cluster are all different, and can be represented by different symbols.
另外,在通过本公开实施例得到的多个聚类之后,还可以对接收的图像进行聚类处理,确定接收的图像所属的聚类,即执行聚类的增量处理,其中,在确定出接收的图像匹配的聚类之后,可以将该接收的图像分配到相应的聚类中,如果当前的聚类与该接收的图像均不匹配,则可以将该接收的图像单独作为一个聚类,或者与现有的图像数据集融合重新执行聚类处理。In addition, after multiple clusters are obtained through the embodiments of the present disclosure, the received image can also be clustered to determine the cluster to which the received image belongs, that is, to perform clustering increment processing, where After the received image matches the cluster, the received image can be assigned to the corresponding cluster. If the current cluster does not match the received image, the received image can be used as a cluster alone. Or merge with an existing image data set to perform clustering again.
图8示出根据本公开实施例的一种图像处理方法执行聚类增量处理的流程图,其中所述聚类增量处理可以包括:FIG. 8 shows a flowchart of performing clustering increment processing by an image processing method according to an embodiment of the present disclosure, where the clustering increment processing may include:
S41:获取输入图像的图像特征;S41: Obtain image features of the input image;
在一些可能的实施方式中,输入图像可以为图像采集设备实时采集的图像,或者也可以为通过其他设备传输的图像,或者也可以本地存储的图像。本公开对此不做具体限定。在得到输入图像之后,可以得到输入图像的图像特征,与上述实施例相同,可以通过特征采集算法得到图像特征,也可以通过卷积神经网络的至少一层卷积处理得到图像特征。其中,图像可以为人脸图像,对应的图像特征为人脸特征。In some possible implementation manners, the input image may be an image captured by an image capture device in real time, or may also be an image transmitted through other devices, or an image stored locally. This disclosure does not specifically limit this. After the input image is obtained, the image features of the input image can be obtained. As in the foregoing embodiment, the image features can be obtained through a feature collection algorithm, or through at least one layer of convolution processing of a convolutional neural network. Among them, the image may be a face image, and the corresponding image feature is a face feature.
S42:对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;S42: Perform quantization processing on the image feature of the input image to obtain the quantized feature of the input image;
在得到图像特征之后,可以进一步对该图像特征执行量化处理,得到相应的量化特征。其中,本公开实施例获取的输入图像可以为一个或者多个,在执行图像特征的获取以及图像特征的量化处理时,都可以通过分布并行执行的方式获取,具体并行执行的过程与上述实施例所述的过程相同,在此 不作重复说明。After the image feature is obtained, quantization processing can be further performed on the image feature to obtain the corresponding quantized feature. Among them, the input images acquired by the embodiments of the present disclosure may be one or more. When performing image feature acquisition and image feature quantization processing, they can all be acquired through distributed parallel execution. The specific parallel execution process is the same as the above-mentioned embodiment. The described process is the same, so it will not be repeated here.
S43:基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。S43: Determine the cluster in which the input image is located based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
在得到图像的量化特征之后,可以根据该量化特征与各聚类的类中心确定该输入图像所在的聚类。具体聚类方式也可以参照上述过程。After the quantitative feature of the image is obtained, the cluster in which the input image is located can be determined according to the quantitative feature and the cluster center of each cluster. The specific clustering method can also refer to the above process.
图9示出根据本公开实施例的一种图像处理方法中步骤S43的流程图。其中,所述基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类(S43),可以包括:Fig. 9 shows a flowchart of step S43 in an image processing method according to an embodiment of the present disclosure. Wherein, the determining the cluster in which the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering processing (S43) may include:
S4301:获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;S4301: Acquire a third degree of similarity between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process;
如上所述,可以根据聚类中各图像的图像特征的平均值确定聚类的类中心(类中心的图像特征),对应的也可以得到类中心的量化特征,如可以通过对类中心的图像特征执行量化处理得到该类中心的量化特征,或者也可以对聚类内各图像的量化特征执行均值处理,得到该类中心的量化特征。As mentioned above, the cluster center (the image feature of the cluster center) can be determined according to the average value of the image features of each image in the cluster, and the corresponding quantitative features of the cluster center can also be obtained. The feature performs quantization processing to obtain the quantized feature of the center of the class, or the quantized feature of each image in the cluster can be averaged to obtain the quantized feature of the center of the class.
进一步地,可以获得输入图像与每个聚类的类中心的量化特征之间的第三相似度,同样的该第三相似度可以为余弦相似度,但不作为本公开的具体限定。Further, a third degree of similarity between the input image and the quantized feature of the cluster center of each cluster can be obtained. Similarly, the third degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure.
在一些可能的实施方式中,可以对多个类中心进行分组,得到多个类中心组,将该多个类中心组分别分配给多个运算器,每个运算器被分配的类中心组不同,通过多个运算器分别并行的执行各类中心组内的类中心与输入图像的量化特征之间的第三相似度,从而加快处理速度。In some possible implementations, multiple class centers can be grouped to obtain multiple class center groups, and the multiple class center groups are allocated to multiple operators, each of which is assigned a different class center group , The third degree of similarity between the class centers in the various center groups and the quantized features of the input image is executed in parallel through multiple arithmetic units, thereby speeding up the processing.
S4302:确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心,K3为大于或者等于1的整数;S4302: Determine the K3 class centers with the third highest similarity between the quantized features of the input image, and K3 is an integer greater than or equal to 1;
在得到输入图像的量化特征与聚类的类中心的量化特征之间的第三相似度后,可以得到相似度最高的K3个类中心。其中,K3的数目小于聚类的数目。得到的该K3个类中心可以表示为与输入对象最为匹配的K3个聚类。After the third degree of similarity between the quantized feature of the input image and the quantized feature of the clustered cluster center is obtained, K3 cluster centers with the highest similarity can be obtained. Among them, the number of K3 is less than the number of clusters. The obtained K3 cluster centers can be expressed as K3 clusters that best match the input object.
在一些可能的实施方式中,可以通过分布并行执行的方式得到输入图像与各聚类的类中心的量化特征之间的第三相似度。即可以对各中心进行分组,通过不同的运算器运算对应的分组的类中心的量化特征与输入图像的量化特征之间的相似度,从而提高运算速度。In some possible implementation manners, the third degree of similarity between the input image and the quantized features of the cluster centers of each cluster can be obtained by means of distributed parallel execution. That is, the centers can be grouped, and the similarity between the quantized features of the corresponding grouped class centers and the quantized features of the input image can be calculated through different arithmetic units, thereby increasing the calculation speed.
S4303:获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;S4303: Acquire a fourth degree of similarity between the image features of the input image and the image features of the K3 class centers;
在一些可能的实施方式中,在得到与输入图像的量化特征的第四相似度最高的K3个类中心时,可以进一步得到该输入图像的图像特征与对应的K3个类中心的图像特征之间的第四相似度,同样的,该第四相似度可以为余弦相似度,但不作为本公开的具体限定。In some possible implementation manners, when the K3 class centers with the fourth highest similarity to the quantized features of the input image are obtained, the difference between the image features of the input image and the corresponding K3 class centers can be further obtained. Similarly, the fourth similarity degree may be a cosine similarity degree, but it is not a specific limitation of the present disclosure.
同样的,在运算输入图像的图像特征与相应的K3个类中心的图像特征之间的第四相似度时,也可以采用分布并行执行的方式运算,例如将K3个类中心分成多组,并将该K3个类中心分别分配给多个运算器,运算器可以执行分配的类中心的图像特征与输入图像的图像特征之间的第四相似度,从而可以加快运算速度。Similarly, when calculating the fourth similarity between the image features of the input image and the image features of the corresponding K3 class centers, a distributed parallel execution method can also be used. For example, the K3 class centers are divided into multiple groups, and The K3 class centers are assigned to multiple arithmetic units, and the arithmetic unit can perform the fourth similarity between the image features of the assigned class centers and the image features of the input image, thereby speeding up the calculation.
S4304:在所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该最高的第四相似度大于第三阈值的情况下,将所述输入图像加入至所述任一类中心对应的聚类。S4304: In the case that the fourth similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest and the highest fourth similarity is greater than the third threshold, change The input image is added to the cluster corresponding to the center of any type.
S4305:在不存在与所述输入特征的图像特征的第四相似度大于第三阈值的类中心的情况下,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述聚类处理,得到至少一个新的聚类。S4305: In the case that there is no class center whose fourth similarity with the image feature of the input feature is greater than the third threshold, perform the calculation based on the quantized feature of the input image and the quantized feature of the image in the image data set. The clustering process is described to obtain at least one new cluster.
在一些可能的实施方式中,如果输入图像的图像特征与K3个类中心的图像特征之间的第四相似度存在大于第三阈值的第四相似度,此时可以确定为该输入图像与第四相似度最高的类中心对应的聚类匹配,即该输入图像中包括的对象与第四相似度最高的聚类所对应的对象为相同对象。此时可以将该输入图像加入至该聚类中,例如可以将该聚类的标识分配给输入图像,以关联的存储,从而可以确定输入图像所属的聚类。In some possible implementations, if the fourth similarity between the image features of the input image and the image features of the K3 class centers has a fourth similarity greater than the third threshold, it can be determined that the input image and the first The cluster matching corresponding to the center of the four clusters with the highest similarity, that is, the object included in the input image and the object corresponding to the fourth cluster with the highest similarity are the same objects. At this time, the input image can be added to the cluster. For example, the cluster identifier can be assigned to the input image for associated storage, so that the cluster to which the input image belongs can be determined.
在一些可能的实施方式中,如果输入图像的图像特征与K3个类中心的图像特征之间的第四相似度均小于第三阈值,则此时可以确定输入图像与全部的聚类均不匹配。此时可以将该输入图像作为单独的聚类,或者也可以将输入图像与现有的图像数据集融合得到新的图像数据集,对新的图像数据集重新执行步骤S20,即对所有的图像重新进行分布式聚类,得到至少一个新的聚类,通过该方式可以精确地对图像数据进行聚类。In some possible implementations, if the fourth similarity between the image features of the input image and the image features of the K3 cluster centers is less than the third threshold, then it can be determined that the input image does not match all the clusters. . At this time, the input image can be used as a separate cluster, or the input image can be fused with the existing image data set to obtain a new image data set, and step S20 can be performed again on the new image data set, that is, for all images The distributed clustering is performed again to obtain at least one new cluster, and the image data can be accurately clustered in this way.
在一些可能的实施方式中,如果一聚类内包括的图像发生变化,如新加入了新的输入图像,或者重新执行了聚类处理,可以重新确定聚类的类中心,从而提高类中心的精确地,方便后续过程中的精确地聚类处理。In some possible implementations, if the images included in a cluster change, for example, a new input image is newly added, or the clustering process is re-executed, the cluster center can be re-determined, thereby improving the cluster center Accurately, it is convenient for accurate clustering in the subsequent process.
在对图像聚类之后,还可以确定各个聚类内的图像所匹配的对象身份,即可以基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份。图10示出根据本公开实施例的一种图像处理方法中确定聚类匹配的对象身份的流程图,其中,所述基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份,包括:After the images are clustered, the identity of the object matched by the image in each cluster can also be determined, that is, the identity of the object corresponding to each cluster can be determined based on the identity feature of at least one object in the identity feature library. FIG. 10 shows a flow chart of determining the identity of objects matched by clusters in an image processing method according to an embodiment of the present disclosure, wherein the determination is based on the identity feature of at least one object in the identity feature library with each of the clusters. The object identity corresponding to the class, including:
S51:获得所述身份特征库中已知对象的量化特征;S51: Obtain quantitative features of known objects in the identity feature library;
在一些可能的实施方式中,身份特征库中包括多个已知身份的对象信息,例如可以包括已知身份的对象的人脸图像以及对象的身份信息,身份信息可以包括姓名、年龄、工作等基本信息。In some possible implementations, the identity feature database includes multiple known identities of object information, for example, it may include the face image of the object with known identities and the identity information of the object, and the identity information may include name, age, work, etc. Basic Information.
对应的,身份特征库中还可以包括每个已知对象的图像特征和量化特征,其中可以通过每个已知对象的人脸图像得到相应的图像特征,以及对图像特征进行量化处理得到量化特征。Correspondingly, the identity feature library can also include the image features and quantified features of each known object. The corresponding image features can be obtained from the face image of each known object, and the quantized features can be obtained by quantizing the image features. .
S52:确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征,K4为大于或者等于1的整数;S52: Determine the fifth similarity between the quantitative feature of the known object and the quantitative feature of the class center of the at least one cluster, and determine K4 with the fifth highest similarity to the quantitative feature of the class center The quantitative characteristics of a known object, K4 is an integer greater than or equal to 1;
在一些可能的实施方式中,在得到每个已知对象的量化特征后,可以进一步得到已知对象的量化特征与得到的聚类的类中心的量化特征之间的第五相似度。第五相似度可以为余弦相似度,但不作为本公开的具体限定。进一步地,可以确定与每个类中心的量化特征的第五相似度最高的K4个已知对象的量化特征。即可以从身份特库中找到与类中心的量化特征的第五相似度最高的K4个已知对象,该K4个已知对象可以为与类中心匹配对最高的K4个身份。In some possible implementation manners, after the quantitative feature of each known object is obtained, the fifth similarity between the quantitative feature of the known object and the obtained quantitative feature of the cluster center can be further obtained. The fifth degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure. Further, the quantitative features of the K4 known objects with the fifth highest similarity to the quantitative features of each class center can be determined. That is, the K4 known objects with the fifth highest similarity to the quantitative feature of the class center can be found from the identity database, and the K4 known objects may be the K4 identities with the highest matching pair with the class center.
在另一些可能的实施方式中,也可以得到与每个已知对象的量化特征的第五相似度最高的K4个类中心。该K4个类中心对应的对应为与已知对象的身份的匹配度最高的K4个类中心。In other possible implementations, the K4 class centers with the fifth highest similarity to the quantitative feature of each known object can also be obtained. The corresponding correspondences of the K4 class centers are the K4 class centers with the highest matching degree with the identity of the known object.
同样的,可以对已知对象的量化特征进行分组,通过至少一个量化器执行该已知对象的量化特征与得到的聚类的类中心的量化特征之间的第五相似度,从而提高处理速度。Similarly, the quantized features of known objects can be grouped, and the fifth similarity between the quantized features of the known objects and the quantized features of the cluster centers obtained by at least one quantizer can be used to improve the processing speed. .
S53:获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;S53: Acquire a sixth degree of similarity between the image feature of the cluster center and the corresponding image features of K4 known objects;
在一些可能的实施方式中,在得到每个类中心对应的K4个已知对象之后,可以进一步确定每个类中心与相应的K4个已知对象的的图像特征之间的第六相似度,其中第六相似度可以为余弦相似度,但不作为本公开的具体限定。In some possible implementations, after obtaining the K4 known objects corresponding to each class center, the sixth similarity between the image features of each class center and the corresponding K4 known objects can be further determined, The sixth degree of similarity may be cosine similarity, but it is not a specific limitation of the present disclosure.
在一些可能的实施方式中,在确定的是与已知对象对应的K4个类中心的情况下,在得到已知对象对应的K4个类中心之后,可以进一步确定该已知对象的图像特征与该K4个类中心的图像特征之间的第六相似度,其中第六相似度可以为余弦相似度,但不作为本公开的具体限定。In some possible implementations, in the case where it is determined that the K4 class centers corresponding to the known object are determined, after the K4 class centers corresponding to the known object are obtained, the image characteristics of the known object can be further determined. The sixth similarity between the image features of the K4 class centers, where the sixth similarity may be a cosine similarity, but it is not a specific limitation of the present disclosure.
S54:在所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值的情况下,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。S54: Determine if the sixth similarity between the image feature of a known object among the K4 known objects and the image feature of the cluster center is the highest and the sixth similarity is greater than the fourth threshold. The known object with the sixth highest similarity is matched with the cluster corresponding to the cluster center.
S55:在所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值的情况下,确定不存在与所述已知对象匹配的聚类。S55: In the case where the sixth similarity between the image features of the K4 known objects and the image features of the corresponding cluster centers is less than the fourth threshold, it is determined that there is no cluster matching the known object .
在一些可能的实施方式中,如果确定的是与类中心匹配的K4个已知对象,此时如果K4个已知对象的图像特征中存在至少一个已知对象的图像特征与相应的类中心之间的第六相似度大于第四阈值,此时可以将第六相似度最高的已知对象的图像特征确定为与类中心最匹配的图像特征,此时可以将该第六相似度最高的已知对象的身份确定为与该类中心匹配的身份,即该类中心对应的聚类中 各图像的身份为第六相似度最高的已知对象的身份。或者,在确定的是与已知对象对应的K4个类中心的情况下,如果已知对象对应的K4个类中心中存在与已知对象的图像特征之间的第六相似度大于第四阈值的类中心,可以将第六相似度最高的类中心与该已知对象进行匹配,即该第六相似度最高的类中心对应的聚类与该已知对象的身份匹配,从而确定了相应聚类的对象的身份。In some possible implementations, if it is determined that there are K4 known objects matching the class center, at this time, if there is at least one of the image features of the known object and the corresponding class center among the image features of the K4 known objects. The sixth similarity between the two is greater than the fourth threshold. At this time, the image feature of the known object with the highest sixth similarity can be determined as the image feature that best matches the cluster center. The identity of the known object is determined as the identity that matches the center of the class, that is, the identity of each image in the cluster corresponding to the center of the class is the identity of the known object with the sixth highest similarity. Or, in the case of determining K4 class centers corresponding to the known object, if the K4 class centers corresponding to the known object have the sixth similarity with the image feature of the known object greater than the fourth threshold The cluster center of the sixth highest similarity can be matched with the known object, that is, the cluster corresponding to the sixth highest similarity center is matched with the identity of the known object, thereby determining the corresponding cluster The identity of the object of the class.
在一些可能的实施方式中,在确定的是与类中心匹配的K4个已知对象的情况下,此时,如果K4个已知对象与对应的类中心的图像特征之间的第六相似度全部小于第四阈值,则说明不存在与类中心匹配的身份对象。或者在确定的是与已知对象匹配的K4个类中心的情况下,如果K4个类中心的图像特征与所述已知对象的图像特征之间的第六相似度均小于第四阈值,则表明得到的聚类中不存在与该已知对象匹配的身份。In some possible implementations, in the case where it is determined that K4 known objects matching the class center, at this time, if the sixth similarity between the K4 known objects and the image features of the corresponding class center All are less than the fourth threshold, indicating that there is no identity object that matches the center of the class. Or in the case where it is determined that the K4 class centers that match the known object, if the sixth similarity between the image features of the K4 class centers and the image feature of the known object is less than the fourth threshold, then It indicates that there is no identity matching the known object in the obtained cluster.
综上所述,在本公开实施例中,可以为每个图像配置相应的索引信息,用于确定图像中对象的时空数据,基于该配置可以实现不同对象的时空轨迹的分析,其中可以在对图像数据集中的图像进行聚类之后,得到每个对象对应的图像集(一个聚类就相当于一个对象的图像集),通过该聚类中各图像所关联的索引信息(第一索引)即可以得到该聚类对应的对象的时空轨迹信息,从而可以实现不同对象的轨迹分析。同时本公开实施例采用分布式聚类的方式,可以提高聚类效率。In summary, in the embodiments of the present disclosure, corresponding index information can be configured for each image to determine the spatio-temporal data of the object in the image. Based on this configuration, the analysis of the spatio-temporal trajectory of different objects can be realized. After the images in the image data set are clustered, the image set corresponding to each object is obtained (a cluster is equivalent to the image set of an object), and the index information (first index) associated with each image in the cluster is The spatiotemporal trajectory information of the object corresponding to the cluster can be obtained, so that the trajectory analysis of different objects can be realized. At the same time, the embodiments of the present disclosure adopt a distributed clustering method, which can improve clustering efficiency.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above methods of the specific implementation, 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.
图11示出根据本公开实施例的一种图像处理装置的框图,如图11所示,所述图像处理装置包括:FIG. 11 shows a block diagram of an image processing device according to an embodiment of the present disclosure. As shown in FIG. 11, the image processing device includes:
获取模块10,其用于获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;The acquiring module 10 is configured to acquire an image data set, the image data set including a plurality of images and a first index respectively associated with the plurality of images, and the first index is used to determine an object in the image Spatiotemporal data
聚类模块20,其用于对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;The clustering module 20 is configured to perform distributed clustering processing on the images in the image data set to obtain at least one cluster;
确定模块30,其用于基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。The determining module 30 is configured to determine the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the image in the cluster.
在一些可能的实施方式中,所述装置还包括增量聚类模块,其用于获取输入图像的图像特征;对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。In some possible implementation manners, the device further includes an incremental clustering module, which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the quantized features of the input image; Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
在一些可能的实施方式中,所述增量聚类模块还用于获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心;获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;在所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该第四相似度大于第三阈值的情况下,将所述输入图像加入至所述任一类中心对应的聚类,K3为大于或者等于1的整数。In some possible implementations, the incremental clustering module is further configured to obtain the difference between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process. Determine the K3 class centers with the highest third similarity between the quantized features of the input image; obtain the difference between the image features of the input image and the image features of the K3 class centers The fourth degree of similarity; in the case that the fourth degree of similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest and the fourth degree of similarity is greater than the third threshold, The input image is added to the cluster corresponding to the center of any type, and K3 is an integer greater than or equal to 1.
在一些可能的实施方式中,所述增量聚类模块还用于在不存在与所述输入图像的图像特征之间的第四相似度大于第三阈值的类中心的情况下,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述分布式聚类处理,得到至少一个新的聚类。In some possible implementation manners, the incremental clustering module is further configured to, in the case that there is no cluster center with a fourth similarity greater than a third threshold between the image features of the input image, based on the The quantized features of the input image and the quantized features of the images in the image data set execute the distributed clustering process to obtain at least one new cluster.
在一些可能的实施方式中,所述第一索引包括以下信息中的至少一种:所述图像的采集时间、采集地点以及采集所述图像的图像采集设备的标识、所述图像采集设备所安装的位置。In some possible implementation manners, the first index includes at least one of the following information: the collection time of the image, the collection location, the identification of the image collection device that collected the image, and the installation of the image collection device s position.
在一些可能的实施方式中,所述聚类模块包括:第一分布处理单元,其用于分布式并行地获取所述图像数据集中的所述图像的图像特征;第二分布处理单元,其用于分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;聚类单元,其用于基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。In some possible implementation manners, the clustering module includes: a first distribution processing unit, which is used to obtain image features of the images in the image data set in a distributed and parallel manner; a second distribution processing unit, which uses Distributedly perform quantization processing on the image features in parallel to obtain the quantized features corresponding to the image features; a clustering unit is used to execute the distributed based on the quantized features corresponding to the image in the image data set Clustering processing to obtain the at least one cluster.
在一些可能的实施方式中,所述第一分布处理单元还用于将所述图像数据集中的多个所述图像进行分组,得到多个图像组;将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行地执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。In some possible implementation manners, the first distribution processing unit is further configured to group the multiple images in the image data set to obtain multiple image groups; and input the multiple image groups into multiple image groups respectively. A feature extraction model, which uses the multiple feature extraction models to execute feature extraction processing of images in an image group corresponding to the feature extraction model in a distributed and parallel manner to obtain image features of the multiple images, wherein each feature extraction model The input image group is different.
在一些可能的实施方式中,所述第二分布处理单元还用于对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。In some possible implementation manners, the second distribution processing unit is further configured to perform grouping processing on the image features of the multiple images to obtain multiple first groups, and the first group includes the image features of at least one image ; Distributed and parallel execution of the quantization processing of the image features of the plurality of first groups, to obtain the quantized feature corresponding to the image feature.
在一些可能的实施方式中,所述第二分布处理单元还用于在所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征之前,为所述多个第一分组分别配置第二索引,得到多个第二索引;并用于将所述多个第二索引分别分配给多个量化器,所述多个量化器中每个量化器被分配的所述第二索引不同;利用所述多个量化器分别并行执行分配的所述第二索引对应的第一分组内的图像特征的量化处理。In some possible implementation manners, the second distribution processing unit is further configured to execute the quantization processing of the image features of the plurality of first groups in the distributed parallel to obtain the quantized feature corresponding to the image feature, Respectively configure second indexes for the plurality of first groups to obtain a plurality of second indexes; and are used to allocate the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers The allocated second indexes are different; and the multiple quantizers are used to respectively execute quantization processing of image features in the first group corresponding to the allocated second indexes in parallel.
在一些可能的实施方式中,所述量化处理包括乘积量化编码处理。In some possible implementation manners, the quantization processing includes product quantization encoding processing.
在一些可能的实施方式中,所述聚类单元还用于获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。In some possible implementation manners, the clustering unit is further configured to obtain a first degree of similarity between a quantized feature of any image in the image data set and quantized features of other images; based on the first degree of similarity, Determine the K1 neighbor image of any image, the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of the any image, and the K1 is greater than or equal to 1 Integer; the clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
在一些可能的实施方式中,所述聚类单元还用于从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the clustering unit is further configured to select, from the K1 neighboring images, a first image set whose first similarity with the quantized feature of any image is greater than a first threshold. ; Mark all the images in the first image set and any one of the images as a first state, and form a cluster based on each image marked as the first state, the first state is that the images include the same object status.
在一些可能的实施方式中,所述聚类单元还用于获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。In some possible implementation manners, the clustering unit is further configured to obtain a second degree of similarity between the image feature of any image and the image feature of the K1 neighbor image of the any image; based on the first Second similarity, determining the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the K2 image feature with the second highest similarity between the K1 neighbor image and the image feature of the any image , K2 is an integer greater than or equal to 1 and less than or equal to K1; selecting a second image set whose second similarity with the image feature of any image is greater than a second threshold from the K2 neighboring images; All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
在一些可能的实施方式中,所述聚类单元还用于在所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度之前,对所述图像数据集中的所述多个图像的量化特征进行分组处理,得到多个第二分组,所述第二分组包括至少一个图像的量化特征;并且,所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度,包括:分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度。In some possible implementation manners, the clustering unit is further configured to compare the image data with the first similarity between the quantized features of any image in the image dataset and the quantized features of other images. The quantized features of the multiple images in the data set are grouped to obtain multiple second groups, where the second group includes the quantized features of at least one image; and the quantization of any image in the image data set is obtained The first degree of similarity between the features and the quantized features of the remaining images includes: obtaining the first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images in a distributed and parallel manner.
在一些可能的实施方式中,所述聚类单元还用于在所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度之前,为所述多个第二分组分别配置第三索引,得到多个第三索引;并且,所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度,包括:基于所述第三索引,建立所述第三索引对应的相似度运算任务,所述相似度运算任务为获取所述第三索引对应的第二分组内的目标图像的量化特征与所述目标图像以外的全部图像的量化特征之间的第一相似度;分布式并行执行所述多个第三索引中每个第三索引对应的相似度获取任务。In some possible implementation manners, the clustering unit is further configured to obtain the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images in the distributed and parallel manner. , Configure a third index for each of the plurality of second groups to obtain a plurality of third indexes; and, the distributed and parallel acquisition of the quantized features of the images in the second group and the quantized features of the remaining images The first similarity between the two includes: establishing a similarity calculation task corresponding to the third index based on the third index, and the similarity calculation task is to obtain a target in the second group corresponding to the third index The first similarity between the quantized feature of the image and the quantized features of all the images except the target image; the similarity acquisition task corresponding to each third index of the plurality of third indexes is executed in a distributed and parallel manner.
在一些可能的实施方式中,所述类中心确定模块,其用于确定所述分布式聚类处理得到的所述聚类的类中心;为所述类中心配置第四索引,并关联地存储所述第四索引和相应的类中心。In some possible implementation manners, the class center determining module is used to determine the class center of the cluster obtained by the distributed clustering process; configure a fourth index for the class center and store it in association The fourth index and the corresponding class center.
在一些可能的实施方式中,所述类中心确定模块还用于基于所述至少一个聚类内的各图像的图像特征的平均值,确定所述聚类的类中心。In some possible implementation manners, the cluster center determining module is further configured to determine the cluster center based on the average value of the image features of each image in the at least one cluster.
在一些可能的实施方式中,所述确定模块还用于基于所述聚类中各图像关联的第一索引确定所述聚类对应的对象出现的时间信息和位置信息;基于所述时间信息和位置信息确定所述对象的时空轨迹信息。In some possible implementation manners, the determining module is further configured to determine the time information and location information of the object corresponding to the cluster based on the first index associated with each image in the cluster; based on the time information and The location information determines the spatiotemporal trajectory information of the object.
在一些可能的实施方式中,所述装置还包括身份确定模块,其用于基于身份特征库中的至少一个 对象的身份特征,确定与各所述聚类对应的对象身份。In some possible implementation manners, the device further includes an identity determining module, which is configured to determine the identity of the object corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library.
在一些可能的实施方式中,所述身份确定模块还用于获得所述身份特征库中已知对象的量化特征;确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征;获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;在所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值的情况下,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。In some possible implementations, the identity determination module is further configured to obtain the quantitative characteristics of the known objects in the identity feature library; determine the quantitative characteristics of the known objects and the cluster center of the at least one cluster Quantify the fifth similarity between the quantized features, and determine the quantized features of the K4 known objects with the fifth highest similarity to the quantized features of the class center; obtain the image features of the class center and the corresponding K4 The sixth degree of similarity between the image features of known objects; the sixth degree of similarity between the image feature of a known object in the K4 known objects and the image feature of the class center is the highest and the sixth degree of similarity When the similarity is greater than the fourth threshold, it is determined that the known object with the sixth highest similarity matches the cluster corresponding to the cluster center.
在一些可能的实施方式中,所述身份确定模块还用于在所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值的情况下,确定不存在与所述已知对象匹配的聚类。In some possible implementation manners, the identity determination module is further configured to: when the sixth similarity between the image features of the K4 known objects and the image features of the corresponding class center is less than the fourth threshold , It is determined that there is no cluster matching the known object.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some 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. For specific implementation, refer to the description of the above method embodiments. For brevity, here No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质或易失性计算机可读存储介质。The embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned 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 embodiment of the present disclosure also proposes 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.
图12示出根据本公开实施例的一种电子设备的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。Fig. 12 shows a block diagram of an electronic device according to an embodiment of the present disclosure. For example, 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.
参照图12,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。12, the electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814 , And communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。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. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。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.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。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.
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen 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. In some embodiments, 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.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC). When the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, 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. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。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.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation. For example, the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components. For example, 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. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。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. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, 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.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, there is also provided 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.
图13示出根据本公开实施例的另一种电子设备的框图。例如,电子设备1900可以被提供为一服务器。参照图13,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 13 shows a block diagram of another electronic device according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. 13, 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. In addition, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。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.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, there is also provided 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.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线 电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。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. More specific examples of computer-readable storage media (non-exhaustive list) 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 The protruding structure in the hole card or the groove, and any suitable combination of the above. 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 .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。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. In the case of a remote computer, 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). In some embodiments, 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.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Herein, various aspects of the present disclosure are described with reference to flowcharts and/or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and/or block diagrams and combinations of blocks in the flowcharts and/or block diagrams can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。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.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions onto a computer, other programmable data processing device, or other equipment, so that a series of operation steps are executed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , So that the instructions executed on the computer, other programmable data processing apparatus, or other equipment realize the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the drawings show the possible implementation architecture, functions, and operations of the system, method, and computer program product according to multiple embodiments of the present disclosure. In this regard, 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. In some alternative implementations, the functions marked in the block 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. It should also be noted that 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.
在不违背逻辑的情况下,本公开不同实施例之间可以相互结合,不同实施例描述有所侧重,为侧重描述的部分可以参见其他实施例的记载。Without violating logic, different embodiments of the present disclosure can be combined with each other, and the description of different embodiments is emphasized. For the part of the description, reference may be made to the records of other embodiments.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Without departing from the scope and spirit of the described embodiments, many modifications and changes are obvious to those of ordinary skill in the art. The choice of terms used herein is intended to best explain the principles, practical applications, or improvements to technologies in the market of the embodiments, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.

Claims (45)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized by comprising:
    获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;Acquiring an image data set, the image data set including a plurality of images and first indexes respectively associated with the plurality of images, the first indexes being used to determine spatiotemporal data of objects in the images;
    对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;Perform distributed clustering processing on the images in the image data set to obtain at least one cluster;
    基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。Based on the obtained first index associated with the images in the cluster, the spatiotemporal trajectory information of the object corresponding to the cluster is determined.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    获取输入图像的图像特征;Obtain the image characteristics of the input image;
    对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;Performing quantization processing on the image feature of the input image to obtain the quantization feature of the input image;
    基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。Determine the cluster where the input image is located based on the quantitative feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类,包括:The method according to claim 2, characterized in that, based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process, determine where the input image is located Clustering, including:
    获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;Acquiring a third degree of similarity between the quantitative feature of the input image and the quantitative feature of the cluster center of the at least one cluster obtained by the distributed clustering process;
    确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心,K3为大于或者等于1的整数;Determine the K3 class centers with the third highest similarity between the quantized features of the input image, and K3 is an integer greater than or equal to 1;
    获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;Acquiring a fourth degree of similarity between the image features of the input image and the image features of the K3 class centers;
    响应于所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该第四相似度大于第三阈值,将所述输入图像加入至所述任一类中心对应的聚类。In response to the fourth similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest and the fourth similarity is greater than the third threshold, the input image is added to The cluster corresponding to any type of center.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述聚类的类中心,确定所述输入图像所在的聚类,还包括The method according to claim 3, wherein the determining the cluster where the input image is located is based on the quantized feature of the input image and the cluster center obtained by the distributed clustering process ,Also includes
    响应于不存在与所述输入图像的图像特征之间的第四相似度大于第三阈值的类中心,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述分布式聚类处理,得到至少一个新的聚类。In response to the absence of a class center having a fourth similarity greater than a third threshold with the image features of the input image, the distribution is performed based on the quantized features of the input image and the quantized features of the images in the image data set In order to obtain at least one new cluster.
  5. 根据权利要求1-4中任意一项所述的方法,其特征在于,所述第一索引包括以下信息中的至少一种:所述图像的采集时间、采集地点以及采集所述图像的图像采集设备的标识、所述图像采集设备所安装的位置。The method according to any one of claims 1 to 4, wherein the first index includes at least one of the following information: the collection time of the image, the collection location, and the image collection used to collect the image The identification of the device and the location where the image capture device is installed.
  6. 根据权利要求1-5中任意一项所述的方法,其特征在于,所述对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类,包括:The method according to any one of claims 1-5, wherein the performing distributed clustering processing on the images in the image data set to obtain at least one cluster comprises:
    分布式并行地获取所述图像数据集中的所述图像的图像特征;Acquiring image features of the images in the image data set in a distributed and parallel manner;
    分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;Distributed and parallelly perform quantization processing on the image feature to obtain the quantized feature corresponding to the image feature;
    基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。The distributed clustering process is executed based on the quantified feature corresponding to the image in the image data set to obtain the at least one cluster.
  7. 根据权利要求6所述的方法,其特征在于,所述分布式并行地获取所述图像数据集中的所述图像的图像特征,包括:The method according to claim 6, wherein the distributed and parallel acquisition of the image features of the images in the image data set comprises:
    将所述图像数据集中的多个所述图像进行分组,得到多个图像组;Grouping the multiple images in the image data set to obtain multiple image groups;
    将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行地执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。The multiple image groups are respectively input to multiple feature extraction models, and the multiple feature extraction models are used to execute feature extraction processing of images in the image group corresponding to the feature extraction models in a distributed and parallel manner to obtain the multiple feature extraction models. The image features of the image, where each feature extraction model inputs different image groups.
  8. 根据权利要求6或7所述的方法,其特征在于,所述分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征,包括:The method according to claim 6 or 7, wherein the distributed and parallel quantization process on the image feature to obtain the quantized feature corresponding to the image feature comprises:
    对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;Grouping the image features of the multiple images to obtain multiple first groups, where the first group includes the image features of at least one image;
    分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。The quantization processing of the image features of the plurality of first groups is executed in a distributed and parallel manner to obtain the quantized feature corresponding to the image feature.
  9. 根据权利要求8所述的方法,其特征在于,在所述分布式并行执行所述多个第一分组的图像特 征的量化处理,得到所述图像特征对应的量化特征之前,所述方法还包括:The method according to claim 8, characterized in that, before the quantization processing of the image features of the plurality of first groups is executed in parallel in the distributed manner to obtain the quantized feature corresponding to the image feature, the method further comprises :
    为所述多个第一分组分别配置第二索引,得到多个第二索引;Respectively configuring second indexes for the plurality of first groups to obtain a plurality of second indexes;
    所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征,包括:The distributed and parallel execution of the quantization processing of the image features of the plurality of first groups to obtain the quantized features corresponding to the image features includes:
    将所述多个第二索引分别分配给多个量化器,所述多个量化器中每个量化器被分配的所述第二索引不同;Allocating the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers is allocated a different second index;
    利用所述多个量化器分别并行执行分配的所述第二索引对应的第一分组内的图像特征的量化处理。The multiple quantizers are used to perform quantization processing of the image features in the first group corresponding to the assigned second index respectively in parallel.
  10. 根据权利要求6-9中任意一项所述的方法,其特征在于,所述量化处理包括乘积量化编码处理。The method according to any one of claims 6-9, wherein the quantization processing comprises product quantization coding processing.
  11. 根据权利要求6-10中任意一项所述的方法,其特征在于,所述基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类,包括:The method according to any one of claims 6-10, wherein the distributed clustering process is executed based on the quantized feature corresponding to the image in the image data set to obtain the at least one Clustering, including:
    获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;Acquiring the first degree of similarity between the quantized features of any image in the image data set and the quantized features of other images;
    基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;Based on the first similarity, determine the K1 neighbor image of any image, and the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of any image, so Said K1 is an integer greater than or equal to 1;
    利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。The clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
  12. 根据权利要求11所述的方法,其特征在于,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果,包括:The method according to claim 11, wherein the determining the clustering result of the distributed clustering process by using the any image and the K1 neighbor image of the any image comprises:
    从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;Selecting, from the K1 neighboring images, a first image set that has a first similarity with a quantized feature of any image greater than a first threshold;
    将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。All the images in the first image set and any one of the images are marked as a first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  13. 根据权利要求11所述的方法,其特征在于,所述利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果,包括:The method according to claim 11, wherein the determining the clustering result of the distributed clustering process by using the any image and the K1 neighbor image of the any image comprises:
    获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;Acquiring a second degree of similarity between the image feature of the any image and the image feature of the K1 neighbor image of the any image;
    基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;Based on the second similarity, determine the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the second highest similarity between the K1 neighbor image and the image feature of any image K2 image features, K2 is an integer greater than or equal to 1 and less than or equal to K1;
    从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;Selecting, from the K2 neighboring images, a second image set whose second similarity to the image feature of any image is greater than a second threshold;
    将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  14. 根据权利要求11-13中任意一项所述的方法,其特征在于,在所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度之前,所述方法还包括:The method according to any one of claims 11-13, characterized in that before said acquiring the first degree of similarity between the quantized features of any image in the image data set and the quantized features of other images, The method also includes:
    对所述图像数据集中的所述多个图像的量化特征进行分组处理,得到多个第二分组,所述第二分组包括至少一个图像的量化特征;Grouping the quantized features of the multiple images in the image data set to obtain multiple second groups, the second groupings including the quantized features of at least one image;
    并且,所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度,包括:And, the acquiring the first degree of similarity between the quantized features of any image in the image data set and the quantized features of other images includes:
    分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度。The first degree of similarity between the quantized features of the images in the second group and the quantized features of the remaining images is acquired in a distributed and parallel manner.
  15. 根据权利要求14所述的方法,其特征在于,在所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度之前,所述方法还包括:The method according to claim 14, characterized in that, before the distributed and parallel acquisition of the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images, the Methods also include:
    为所述多个第二分组分别配置第三索引,得到多个第三索引;Configure third indexes for the plurality of second groups respectively to obtain a plurality of third indexes;
    并且,所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度,包括:In addition, the distributed and parallel acquisition of the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images includes:
    基于所述第三索引,建立所述第三索引对应的相似度运算任务,所述相似度运算任务为获取所述 第三索引对应的第二分组内的目标图像的量化特征与所述目标图像以外的全部图像的量化特征之间的第一相似度;Based on the third index, a similarity calculation task corresponding to the third index is established, and the similarity calculation task is to obtain the quantized feature of the target image in the second group corresponding to the third index and the target image The first degree of similarity between the quantized features of all images other than those;
    分布式并行执行所述多个第三索引中每个第三索引对应的相似度获取任务。Distributed and parallel execution of the similarity acquisition task corresponding to each third index of the plurality of third indexes.
  16. 根据权利要求1-15中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-15, wherein the method further comprises:
    确定所述分布式聚类处理得到的所述聚类的类中心;Determining the cluster center of the cluster obtained by the distributed clustering process;
    为所述类中心配置第四索引,并关联地存储所述第四索引和相应的类中心。A fourth index is configured for the class center, and the fourth index and the corresponding class center are stored in association.
  17. 根据权利要求16所述的方法,其特征在于,所述确定所述分布式聚类处理得到的所述聚类的类中心,包括:The method according to claim 16, wherein the determining the cluster center obtained by the distributed clustering processing comprises:
    基于所述至少一个聚类内的各图像的图像特征的平均值,确定所述聚类的类中心。Based on the average value of the image features of the images in the at least one cluster, the cluster center is determined.
  18. 根据权利要求1-17中任意一项所述的方法,其特征在于,所述基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息,包括:The method according to any one of claims 1-17, characterized in that, based on the obtained first index associated with the images in the cluster, the spatiotemporal trajectory information of the object corresponding to the cluster is determined ,include:
    基于所述聚类中各图像关联的第一索引确定所述聚类对应的对象出现的时间信息和位置信息;Determining, based on the first index associated with each image in the cluster, the time information and location information of the object corresponding to the cluster;
    基于所述时间信息和位置信息确定所述对象的时空轨迹信息。The spatiotemporal trajectory information of the object is determined based on the time information and the position information.
  19. 根据权利要求1-18中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-18, wherein the method further comprises:
    基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份。Based on the identity feature of at least one object in the identity feature library, the object identity corresponding to each cluster is determined.
  20. 根据权利要求19所述的方法,其特征在于,所述基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份,包括:The method according to claim 19, wherein the determining the identity of the object corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library comprises:
    获得所述身份特征库中已知对象的量化特征;Obtaining quantitative features of known objects in the identity feature library;
    确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征;Determine the fifth degree of similarity between the quantitative feature of the known object and the quantitative feature of the cluster center of the at least one cluster, and determine the K4 has the fifth highest degree of similarity with the quantitative feature of the cluster center Know the quantitative characteristics of the object;
    获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;Acquiring the sixth similarity between the image feature of the cluster center and the image features of the corresponding K4 known objects;
    响应于所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。In response to the sixth similarity between the image feature of a known object among the K4 known objects and the image feature of the cluster center being the highest and the sixth similarity is greater than a fourth threshold, determining the sixth The known object with the highest similarity is matched with the cluster corresponding to the cluster center.
  21. 根据权利要求20所述的方法,其特征在于,所述基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份,还包括:The method according to claim 20, wherein the determining the identity of the object corresponding to each of the clusters based on the identity feature of at least one object in the identity feature library further comprises:
    响应于所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值,确定不存在与所述已知对象匹配的聚类。In response to the sixth similarity between the image features of the K4 known objects and the image features of the corresponding cluster centers are all less than the fourth threshold, it is determined that there is no cluster matching the known object.
  22. 一种图像处理装置,其特征在于,包括:An image processing device, characterized by comprising:
    获取模块,其用于获取图像数据集,所述图像数据集包括多个图像以及分别与所述多个图像关联的第一索引,所述第一索引用于确定所述图像中的对象的时空数据;An acquisition module for acquiring an image data set, the image data set including a plurality of images and a first index respectively associated with the plurality of images, the first index is used to determine the time and space of the object in the image data;
    聚类模块,其用于对所述图像数据集中的图像执行分布式聚类处理,得到至少一个聚类;A clustering module, configured to perform distributed clustering processing on the images in the image data set to obtain at least one cluster;
    确定模块,其用于基于得到的所述聚类中的图像所关联的第一索引,确定所述聚类对应的对象的时空轨迹信息。The determining module is configured to determine the spatiotemporal trajectory information of the object corresponding to the cluster based on the obtained first index associated with the image in the cluster.
  23. 根据权利要求22所述的装置,其特征在于,所述装置还包括增量聚类模块,其用于获取输入图像的图像特征;对所述输入图像的图像特征执行量化处理,得到所述输入图像的量化特征;基于所述输入图像的量化特征以及所述分布式聚类处理得到的所述至少一个聚类的类中心,确定所述输入图像所在的聚类。The device according to claim 22, wherein the device further comprises an incremental clustering module, which is used to obtain image features of the input image; perform quantization processing on the image features of the input image to obtain the input The quantified feature of the image; based on the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process, the cluster where the input image is located is determined.
  24. 根据权利要求23所述的装置,其特征在于,所述增量聚类模块还用于获取所述输入图像的量化特征与所述分布式聚类处理得到的所述至少一个聚类的类中心的量化特征之间的第三相似度;确定与所述输入图像的量化特征之间的第三相似度最高的K3个类中心;获取所述输入图像的图像特征与所述K3个类中心的图像特征之间的第四相似度;在所述K3个类中心中任一类中心的图像特征与所述输入图像的图像特征之间的第四相似度最高且该第四相似度大于第三阈值的情况下,将所述输入图像加入至所述任一类中心对应的聚类,K3为大于或者等于1的整数。The device according to claim 23, wherein the incremental clustering module is further configured to obtain the quantized feature of the input image and the cluster center of the at least one cluster obtained by the distributed clustering process. The third degree of similarity between the quantized features of the input image; determine the K3 class centers with the third highest degree of similarity between the quantized features of the input image; obtain the image features of the input image and the K3 class centers The fourth degree of similarity between image features; the fourth degree of similarity between the image feature of any one of the K3 class centers and the image feature of the input image is the highest, and the fourth degree of similarity is greater than the third In the case of a threshold, the input image is added to the cluster corresponding to the center of any type, and K3 is an integer greater than or equal to 1.
  25. 根据权利要求24所述的装置,其特征在于,所述增量聚类模块还用于在不存在与所述输入图 像的图像特征之间的第四相似度大于第三阈值的类中心的情况下,基于所述输入图像的量化特征以及所述图像数据集中的图像的量化特征执行所述分布式聚类处理,得到至少一个新的聚类。The device according to claim 24, wherein the incremental clustering module is further configured to: when there is no cluster center whose fourth similarity is greater than the third threshold between the image features of the input image Next, perform the distributed clustering process based on the quantized features of the input image and the quantized features of the images in the image data set to obtain at least one new cluster.
  26. 根据权利要求22-25中任意一项所述的装置,其特征在于,所述第一索引包括以下信息中的至少一种:所述图像的采集时间、采集地点以及采集所述图像的图像采集设备的标识、所述图像采集设备所安装的位置。The device according to any one of claims 22-25, wherein the first index includes at least one of the following information: the collection time of the image, the collection location, and the image collection used to collect the image The identification of the device and the location where the image capture device is installed.
  27. 根据权利要求22-26中任意一项所述的装置,其特征在于,所述聚类模块包括:The device according to any one of claims 22-26, wherein the clustering module comprises:
    第一分布处理单元,其用于分布式并行地获取所述图像数据集中的所述图像的图像特征;A first distributed processing unit, configured to acquire image features of the images in the image data set in a distributed and parallel manner;
    第二分布处理单元,其用于分布式并行地对所述图像特征执行量化处理得到所述图像特征对应的量化特征;A second distribution processing unit, configured to perform quantization processing on the image features in a distributed and parallel manner to obtain the quantized features corresponding to the image features;
    聚类单元,其用于基于所述图像数据集中的所述图像对应的量化特征,执行所述分布式聚类处理,得到所述至少一个聚类。The clustering unit is configured to perform the distributed clustering process based on the quantified feature corresponding to the image in the image data set to obtain the at least one cluster.
  28. 根据权利要求27所述的装置,其特征在于,所述第一分布处理单元还用于将所述图像数据集中的多个所述图像进行分组,得到多个图像组;The device according to claim 27, wherein the first distribution processing unit is further configured to group a plurality of the images in the image data set to obtain a plurality of image groups;
    将所述多个图像组分别输入多个特征提取模型,利用所述多个特征提取模型分布式并行地执行与所述特征提取模型对应图像组中的图像的特征提取处理,得到所述多个图像的图像特征,其中每个特征提取模型所输入的图像组不同。The multiple image groups are respectively input to multiple feature extraction models, and the multiple feature extraction models are used to execute feature extraction processing of images in the image group corresponding to the feature extraction models in a distributed and parallel manner to obtain the multiple feature extraction models. The image features of the image, where each feature extraction model inputs different image groups.
  29. 根据权利要求27或28所述的装置,其特征在于,所述第二分布处理单元还用于对所述多个图像的图像特征进行分组处理,得到多个第一分组,所述第一分组包括至少一个图像的图像特征;The device according to claim 27 or 28, wherein the second distribution processing unit is further configured to perform grouping processing on the image features of the multiple images to obtain multiple first groups, and the first group Including image features of at least one image;
    分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征。The quantization processing of the image features of the plurality of first groups is executed in a distributed and parallel manner to obtain the quantized feature corresponding to the image feature.
  30. 根据权利要求29所述的装置,其特征在于,所述第二分布处理单元还用于在所述分布式并行执行所述多个第一分组的图像特征的量化处理,得到所述图像特征对应的量化特征之前,为所述多个第一分组分别配置第二索引,得到多个第二索引;The apparatus according to claim 29, wherein the second distribution processing unit is further configured to perform quantization processing of the image features of the plurality of first groups in the distributed parallel to obtain the image feature corresponding Before the quantization feature of, configure second indexes for the plurality of first groups respectively to obtain a plurality of second indexes;
    并用于将所述多个第二索引分别分配给多个量化器,所述多个量化器中每个量化器被分配的所述第二索引不同;And used to allocate the plurality of second indexes to a plurality of quantizers, each of the plurality of quantizers is allocated a different second index;
    利用所述多个量化器分别并行执行分配的所述第二索引对应的第一分组内的图像特征的量化处理。The multiple quantizers are used to perform quantization processing of the image features in the first group corresponding to the assigned second index respectively in parallel.
  31. 根据权利要求27-30中任意一项所述的装置,其特征在于,所述量化处理包括乘积量化编码处理。The device according to any one of claims 27-30, wherein the quantization processing comprises product quantization coding processing.
  32. 根据权利要求27-31中任意一项所述的装置,其特征在于,所述聚类单元还用于获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度;The device according to any one of claims 27-31, wherein the clustering unit is further configured to obtain the first difference between the quantized features of any image in the image data set and the quantized features of other images. Similarity
    基于所述第一相似度,确定所述任一图像的K1近邻图像,所述K1近邻图像的量化特征是与所述任一图像的量化特征的第一相似度最高的K1个量化特征,所述K1为大于或等于1的整数;Based on the first similarity, determine the K1 neighbor image of any image, and the quantized feature of the K1 neighbor image is the K1 quantized feature with the highest first similarity to the quantized feature of any image, so Said K1 is an integer greater than or equal to 1;
    利用所述任一图像以及所述任一图像的K1近邻图像确定所述分布式聚类处理的聚类结果。The clustering result of the distributed clustering process is determined by using the any image and the K1 neighbor image of the any image.
  33. 根据权利要求32所述的装置,其特征在于,所述聚类单元还用于从所述K1近邻图像中选择出与所述任一图像的量化特征之间的第一相似度大于第一阈值的第一图像集;The device according to claim 32, wherein the clustering unit is further configured to select from the K1 neighboring images that the first similarity with the quantized feature of any image is greater than a first threshold The first collection of images;
    将所述第一图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。All the images in the first image set and any one of the images are marked as a first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  34. 根据权利要求32所述的装置,其特征在于,所述聚类单元还用于获取所述任一图像的图像特征与所述任一图像的K1近邻图像的图像特征之间的第二相似度;The device according to claim 32, wherein the clustering unit is further configured to obtain a second degree of similarity between the image feature of the any image and the image feature of the K1 neighbor image of the any image ;
    基于所述第二相似度,确定所述任一图像的K2近邻图像,所述K2近邻图像的图像特征为所述K1近邻图像中与所述任一图像的图像特征的第二相似度最高的K2个图像特征,K2为大于或者等于1且小于或者等于K1的整数;Based on the second similarity, determine the K2 neighbor image of any image, and the image feature of the K2 neighbor image is the second highest similarity between the K1 neighbor image and the image feature of any image K2 image features, K2 is an integer greater than or equal to 1 and less than or equal to K1;
    从所述K2近邻图像中选择出与所述任一图像的图像特征的所述第二相似度大于第二阈值的第二图像集;Selecting, from the K2 neighboring images, a second image set whose second similarity to the image feature of any image is greater than a second threshold;
    将所述第二图像集中的全部图像和所述任一图像标注为第一状态,并基于被标注为第一状态的各 图像形成一个聚类,所述第一状态为图像中包括相同对象的状态。All the images in the second image set and any one of the images are marked as the first state, and a cluster is formed based on each image marked as the first state, and the first state is the images that include the same object status.
  35. 根据权利要求32-34中任意一项所述的装置,其特征在于,所述聚类单元还用于在所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度之前,对所述图像数据集中的所述多个图像的量化特征进行分组处理,得到多个第二分组,所述第二分组包括至少一个图像的量化特征;The device according to any one of claims 32-34, wherein the clustering unit is further configured to determine between the quantized features of any image in the acquired image data set and the quantized features of other images Before the first degree of similarity, grouping the quantized features of the multiple images in the image data set to obtain multiple second groups, where the second grouping includes the quantized features of at least one image;
    并且,所述获取所述图像数据集中任一图像的量化特征与其余图像的量化特征之间的第一相似度,包括:And, the acquiring the first degree of similarity between the quantized features of any image in the image data set and the quantized features of other images includes:
    分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度。The first similarity between the quantized features of the images in the second group and the quantized features of the remaining images is acquired in a distributed and parallel manner.
  36. 根据权利要求35所述的装置,其特征在于,所述聚类单元还用于在所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度之前,为所述多个第二分组分别配置第三索引,得到多个第三索引;The device according to claim 35, wherein the clustering unit is further configured to obtain the difference between the quantized features of the images in the second group and the quantized features of the remaining images in the distributed and parallel manner. Before the first degree of similarity, configure third indexes for the plurality of second groups respectively to obtain a plurality of third indexes;
    并且,所述分布式并行地获取所述第二分组内图像的量化特征与所述其余图像的量化特征之间的第一相似度,包括:In addition, the distributed and parallel acquisition of the first similarity between the quantized features of the images in the second group and the quantized features of the remaining images includes:
    基于所述第三索引,建立所述第三索引对应的相似度运算任务,所述相似度运算任务为获取所述第三索引对应的第二分组内的目标图像的量化特征与所述目标图像以外的全部图像的量化特征之间的第一相似度;Based on the third index, a similarity calculation task corresponding to the third index is established, and the similarity calculation task is to obtain the quantized feature of the target image in the second group corresponding to the third index and the target image The first degree of similarity between the quantized features of all images other than those;
    分布式并行执行所述多个第三索引中每个第三索引对应的相似度获取任务。Distributed and parallel execution of the similarity acquisition task corresponding to each third index of the plurality of third indexes.
  37. 根据权利要求22-36中任意一项所述的装置,其特征在于,所述类中心确定模块,其用于确定所述分布式聚类处理得到的所述聚类的类中心;The device according to any one of claims 22-36, wherein the class center determination module is configured to determine the class center of the cluster obtained by the distributed clustering process;
    为所述类中心配置第四索引,并关联地存储所述第四索引和相应的类中心。A fourth index is configured for the class center, and the fourth index and the corresponding class center are stored in association.
  38. 根据权利要求37所述的装置,其特征在于,所述类中心确定模块还用于基于所述至少一个聚类内的各图像的图像特征的平均值,确定所述聚类的类中心。The device according to claim 37, wherein the cluster center determining module is further configured to determine the cluster center based on the average value of the image features of each image in the at least one cluster.
  39. 根据权利要求37所述的装置,其特征在于,所述确定模块还用于基于所述聚类中各图像关联的第一索引确定所述聚类对应的对象出现的时间信息和位置信息;The device according to claim 37, wherein the determining module is further configured to determine the time information and location information of the object corresponding to the cluster based on the first index associated with each image in the cluster;
    基于所述时间信息和位置信息确定所述对象的时空轨迹信息。The spatiotemporal trajectory information of the object is determined based on the time information and the position information.
  40. 根据权利要求22-39中任意一项所述的装置,其特征在于,所述装置还包括身份确定模块,其用于基于身份特征库中的至少一个对象的身份特征,确定与各所述聚类对应的对象身份。The device according to any one of claims 22-39, wherein the device further comprises an identity determining module, which is configured to determine the identity of at least one object in the identity feature library to determine the identity of The object identity corresponding to the class.
  41. 根据权利要求40所述的装置,其特征在于,所述身份确定模块还用于获得所述身份特征库中已知对象的量化特征;The device according to claim 40, wherein the identity determination module is further configured to obtain quantitative characteristics of known objects in the identity characteristic library;
    确定所述已知对象的量化特征与所述至少一个聚类的类中心的量化特征之间的第五相似度,并确定与所述类中心的量化特征的第五相似度最高的K4个已知对象的量化特征;Determine the fifth degree of similarity between the quantitative feature of the known object and the quantitative feature of the cluster center of the at least one cluster, and determine the K4 has the fifth highest degree of similarity with the quantitative feature of the cluster center Know the quantitative characteristics of the object;
    获取所述类中心的图像特征与对应的K4个已知对象的图像特征之间的第六相似度;Acquiring the sixth similarity between the image feature of the cluster center and the image features of the corresponding K4 known objects;
    在所述K4个已知对象中的一已知对象的图像特征与所述类中心的图像特征之间的第六相似度最高且该第六相似度大于第四阈值的情况下,确定所述第六相似度最高的所述一已知对象与所述类中心对应的聚类匹配。In the case that the sixth similarity between the image feature of a known object among the K4 known objects and the image feature of the cluster center is the highest and the sixth similarity is greater than the fourth threshold, it is determined that the The known object with the sixth highest similarity is matched with the cluster corresponding to the cluster center.
  42. 根据权利要求41所述的装置,其特征在于,所述身份确定模块还用于在所述K4个已知对象的图像特征与相应的类中心的图像特征的第六相似度均小于所述第四阈值的情况下,确定不存在与所述已知对象匹配的聚类。The device according to claim 41, wherein the identity determination module is further configured to determine that the sixth similarity between the image features of the K4 known objects and the image features of the corresponding cluster centers is less than that of the first In the case of four thresholds, it is determined that there is no cluster matching the known object.
  43. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1-21中任意一项所述的方法。Wherein, the processor is configured to call instructions stored in the memory to execute the method according to any one of claims 1-21.
  44. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令 被处理器执行时实现权利要求1-21中任意一项所述的方法。A computer-readable storage medium with computer program instructions stored thereon, wherein the computer program instructions implement the method of any one of claims 1-21 when executed by a processor.
  45. 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1-21中任意一项所述的方法。A computer program, characterized in that the computer program includes computer readable code, and when the computer readable code is executed in an electronic device, the processor in the electronic device executes for implementing claims 1-21 The method described in any one of.
PCT/CN2020/089402 2019-08-15 2020-05-09 Image processing method and device, electronic apparatus, and storage medium WO2021027344A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022504708A JP2022542127A (en) 2019-08-15 2020-05-09 Image processing method and apparatus, electronic equipment and storage medium
KR1020227003244A KR20220025052A (en) 2019-08-15 2020-05-09 Image processing method and apparatus, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910755628.5A CN110502651B (en) 2019-08-15 2019-08-15 Image processing method and device, electronic equipment and storage medium
CN201910755628.5 2019-08-15

Publications (1)

Publication Number Publication Date
WO2021027344A1 true WO2021027344A1 (en) 2021-02-18

Family

ID=68586556

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/089402 WO2021027344A1 (en) 2019-08-15 2020-05-09 Image processing method and device, electronic apparatus, and storage medium

Country Status (5)

Country Link
JP (1) JP2022542127A (en)
KR (1) KR20220025052A (en)
CN (1) CN110502651B (en)
TW (1) TWI761851B (en)
WO (1) WO2021027344A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117786445A (en) * 2024-02-26 2024-03-29 山东盈动智能科技有限公司 Intelligent processing method for operation data of automatic yarn reeling machine

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502651B (en) * 2019-08-15 2022-08-02 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium
CN111325712B (en) * 2020-01-20 2024-01-23 北京百度网讯科技有限公司 Method and device for detecting image validity
CN112270361B (en) * 2020-10-30 2021-10-22 重庆紫光华山智安科技有限公司 Face data processing method, system, storage medium and equipment
CN112686141A (en) * 2020-12-29 2021-04-20 杭州海康威视数字技术股份有限公司 Personnel filing method and device and electronic equipment
CN112949751B (en) * 2021-03-25 2023-03-24 深圳市商汤科技有限公司 Vehicle image clustering and track restoring method
CN113139589B (en) * 2021-04-12 2023-02-28 网易(杭州)网络有限公司 Picture similarity detection method and device, processor and electronic device
TWI803223B (en) * 2022-03-04 2023-05-21 國立中正大學 Method for detecting object of esophageal cancer in hyperspectral imaging
CN116340991B (en) * 2023-02-02 2023-11-07 魔萌动漫文化传播(深圳)有限公司 Big data management method and device for IP gallery material resources and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050232495A1 (en) * 2004-04-19 2005-10-20 International Business Machines Corporation Device for Outputting Character Recognition Results, Character Recognition Device, and Method and Program Therefor
US20110103700A1 (en) * 2007-12-03 2011-05-05 National University Corporation Hokkaido University Image classification device and image classification program
US20150261789A1 (en) * 2012-03-26 2015-09-17 Amazon Technologies, Inc. Cloud-based photo management
CN108897777A (en) * 2018-06-01 2018-11-27 深圳市商汤科技有限公司 Target object method for tracing and device, electronic equipment and storage medium
CN109242048A (en) * 2018-11-07 2019-01-18 电子科技大学 Sensation target distributed clustering method based on time series
CN109543536A (en) * 2018-10-23 2019-03-29 北京市商汤科技开发有限公司 Image identification method and device, electronic equipment and storage medium
CN109800322A (en) * 2018-12-28 2019-05-24 上海依图网络科技有限公司 A kind of monitoring method and device
CN110046586A (en) * 2019-04-19 2019-07-23 腾讯科技(深圳)有限公司 A kind of data processing method, equipment and storage medium
CN110502651A (en) * 2019-08-15 2019-11-26 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8971641B2 (en) * 2010-12-16 2015-03-03 Microsoft Technology Licensing, Llc Spatial image index and associated updating functionality
CN105022752B (en) * 2014-04-29 2019-04-05 中国电信股份有限公司 Image search method and device
CN106446797B (en) * 2016-08-31 2019-05-07 腾讯科技(深圳)有限公司 Image clustering method and device
CN107415806A (en) * 2017-06-06 2017-12-01 高炎华 Intelligent warning lamp based on image recognition
TWM561251U (en) * 2017-07-24 2018-06-01 正能光電股份有限公司 Face recognition module
CN107798354B (en) * 2017-11-16 2022-11-01 腾讯科技(深圳)有限公司 Image clustering method and device based on face image and storage equipment
CN108229321B (en) * 2017-11-30 2021-09-21 北京市商汤科技开发有限公司 Face recognition model, and training method, device, apparatus, program, and medium therefor
CN108229335A (en) * 2017-12-12 2018-06-29 深圳市商汤科技有限公司 It is associated with face identification method and device, electronic equipment, storage medium, program
CN108876817B (en) * 2018-06-01 2021-08-20 深圳市商汤科技有限公司 Cross track analysis method and device, electronic equipment and storage medium
CN109213732B (en) * 2018-06-28 2022-03-18 努比亚技术有限公司 Method for improving photo album classification, mobile terminal and computer readable storage medium
CN108921876A (en) * 2018-07-10 2018-11-30 北京旷视科技有限公司 Method for processing video frequency, device and system and storage medium
CN109740660A (en) * 2018-12-27 2019-05-10 深圳云天励飞技术有限公司 Image processing method and device
CN109784221A (en) * 2018-12-28 2019-05-21 上海依图网络科技有限公司 A kind of monitoring method and device
CN109753920B (en) * 2018-12-29 2021-09-17 深圳市商汤科技有限公司 Pedestrian identification method and device
CN109800744B (en) * 2019-03-18 2021-08-20 深圳市商汤科技有限公司 Image clustering method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050232495A1 (en) * 2004-04-19 2005-10-20 International Business Machines Corporation Device for Outputting Character Recognition Results, Character Recognition Device, and Method and Program Therefor
US20110103700A1 (en) * 2007-12-03 2011-05-05 National University Corporation Hokkaido University Image classification device and image classification program
US20150261789A1 (en) * 2012-03-26 2015-09-17 Amazon Technologies, Inc. Cloud-based photo management
CN108897777A (en) * 2018-06-01 2018-11-27 深圳市商汤科技有限公司 Target object method for tracing and device, electronic equipment and storage medium
CN109543536A (en) * 2018-10-23 2019-03-29 北京市商汤科技开发有限公司 Image identification method and device, electronic equipment and storage medium
CN109242048A (en) * 2018-11-07 2019-01-18 电子科技大学 Sensation target distributed clustering method based on time series
CN109800322A (en) * 2018-12-28 2019-05-24 上海依图网络科技有限公司 A kind of monitoring method and device
CN110046586A (en) * 2019-04-19 2019-07-23 腾讯科技(深圳)有限公司 A kind of data processing method, equipment and storage medium
CN110502651A (en) * 2019-08-15 2019-11-26 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117786445A (en) * 2024-02-26 2024-03-29 山东盈动智能科技有限公司 Intelligent processing method for operation data of automatic yarn reeling machine
CN117786445B (en) * 2024-02-26 2024-05-10 山东盈动智能科技有限公司 Intelligent processing method for operation data of automatic yarn reeling machine

Also Published As

Publication number Publication date
KR20220025052A (en) 2022-03-03
CN110502651B (en) 2022-08-02
CN110502651A (en) 2019-11-26
JP2022542127A (en) 2022-09-29
TW202109514A (en) 2021-03-01
TWI761851B (en) 2022-04-21

Similar Documents

Publication Publication Date Title
WO2021027344A1 (en) Image processing method and device, electronic apparatus, and storage medium
TWI754855B (en) Method and device, electronic equipment for face image recognition and storage medium thereof
TWI710964B (en) Method, apparatus and electronic device for image clustering and storage medium thereof
WO2020228163A1 (en) Image processing method and apparatus, and electronic device and storage medium
WO2021031645A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2021093375A1 (en) Method, apparatus, and system for detecting people walking together, electronic device and storage medium
CN109389162B (en) Sample image screening technique and device, electronic equipment and storage medium
TW202029055A (en) Pedestrian recognition method and device
JP6101399B2 (en) Clustering method, clustering device, terminal device, program, and recording medium
US20220019772A1 (en) Image Processing Method and Device, and Storage Medium
WO2020181728A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN110781957A (en) Image processing method and device, electronic equipment and storage medium
CN110532956B (en) Image processing method and device, electronic equipment and storage medium
CN109145150B (en) Target matching method and device, electronic equipment and storage medium
CN112101238A (en) Clustering method and device, electronic equipment and storage medium
CN109522937B (en) Image processing method and device, electronic equipment and storage medium
WO2020192113A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN112906484B (en) Video frame processing method and device, electronic equipment and storage medium
EP2919136A1 (en) Method and device for clustering
TWI779449B (en) Object counting method electronic equipment computer readable storage medium
JP2016517110A5 (en)
CN111062407A (en) Image processing method and device, electronic equipment and storage medium
CN113808578B (en) Audio signal processing method, device, equipment and storage medium
CN107992893B (en) Method and device for compressing image feature space
CN111814631A (en) Person detection method and device, electronic device and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022504708

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20227003244

Country of ref document: KR

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

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 05.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20853443

Country of ref document: EP

Kind code of ref document: A1