Method and device for generating target re-identification model and for target re-identification

By mixing labeled and unlabeled data for training, and using graph convolutional neural networks to fuse features, the problem of insufficient utilization of labeled data in the unsupervised target re-identification model is solved, and the training efficiency and performance of the model are improved.

CN112149637BActive Publication Date: 2024-09-13BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011143731.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-23
Publication Date
2024-09-13
Estimated Expiration
2040-10-23

AI Technical Summary

Technical Problem

In the existing unsupervised object re-identification model training, precious labeled data is not fully utilized, resulting in low model training efficiency and performance.

Method used

By obtaining labeled and unlabeled sample sets, use the initialization model to perform feature extraction and clustering of unlabeled samples, assign pseudo labels, and mix the sample sets with pseudo labels and labeled sample sets for supervised training, combined with the graph volume The convolutional neural network combines features from different domains to generate a target re-identification model.

Benefits of technology

Effective use of labeled data speeds up model training, improves the performance of the target re-identification model, reduces the model's dependence on a certain data source, and improves robustness and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112149637B
    Figure CN112149637B
Patent Text Reader

Abstract

The present application discloses methods, devices, equipment and storage media for generating a target re-identification model and for target re-identification, and relates to the field of artificial intelligence technology, specifically the field of computer vision and deep learning technology. The specific implementation scheme is: obtain a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training; use the initialization model to extract features from each sample in the unlabeled sample set; use a clustering algorithm to cluster the features extracted from the unlabeled sample set; for each sample in the unlabeled sample set, assign a pseudo-label to the sample according to the cluster corresponding to the sample in the feature space; mix the sample set with pseudo-labels and the labeled sample set as a training sample set, and perform supervised training on the initialization model to obtain a target re-identification model. This implementation method makes full use of labeled data for model training, improves the speed and accuracy of model training, and thus improves the accuracy of re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, specifically computer vision and deep learning technology. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] Target re-identification is also called object re-recognition. Currently, it focuses on the fields of pedestrian re-identification and vehicle re-identification, especially pedestrian re-identification, which has been studied more and has more public data sets. Target re-identification is mainly used to solve the cross-camera tracking of targets. Realizing scene matching can achieve cross-field tracking of suspected pedestrians / vehicles and trajectory prediction. In actual industrial applications, it is difficult to obtain labels for large-scale re-identification tasks such as pedestrians or vehicles. In this case, the use of unsupervised learning becomes an effective prerequisite for using re-identification technology. Existing unsupervised re-identification technology is usually based on re-identification models trained on public data sets, but in this process, the labeled data set is only used to learn a pre-trained model, and then only unlabeled data will be used for training. This situation does not make full use of the precious labeled data, resulting in great waste. Summary of the invention

[0004] The present disclosure provides a method, apparatus, device and storage medium for generating a target re-identification model, and a method, apparatus, device and storage medium for target re-identification.

[0005] According to a first aspect of the present disclosure, a method for generating a target re-identification model is provided, comprising: obtaining a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training. Use the initialization model to extract features from each sample in the unlabeled sample set. Use a clustering algorithm to cluster the features extracted from the unlabeled sample set. For each sample in the unlabeled sample set, a pseudo-label is assigned to the sample according to the cluster corresponding to the sample in the feature space. The sample set with pseudo-labels and the labeled sample set are mixed as a training sample set, and the initialization model is supervised trained to obtain the target re-identification model.

[0006] According to a second aspect of the present disclosure, a method for target re-identification is provided, comprising: obtaining a surveillance image to be identified, inputting the surveillance image into a target re-identification model trained according to any one of the methods in the first aspect, and generating a target re-identification result.

[0007] According to a third aspect of the present disclosure, there is provided an apparatus for generating a target re-identification model, comprising: an acquisition unit, configured to acquire a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training. A feature extraction unit, configured to use the initialization model to extract features from each sample in the unlabeled sample set. A clustering unit, configured to cluster features extracted from the unlabeled sample set using a clustering algorithm. An allocation unit, configured to assign a pseudo-label to each sample in the unlabeled sample set according to the cluster corresponding to the sample in the feature space. A training unit, configured to mix the sample set with pseudo-labels and the labeled sample set as a training sample set, and to perform supervised training on the initialization model to obtain the target re-identification model.

[0008] According to a fourth aspect of the present disclosure, there is provided an apparatus for target re-identification, comprising: an image acquisition unit configured to acquire a surveillance image to be identified; an image recognition unit configured to input the surveillance image into a target re-identification model trained according to any one of the methods in the first aspect, and generate a target re-identification result.

[0009] According to a fifth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: at least one processor. And a memory connected to the at least one processor in communication. The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any one of the methods in the first aspect.

[0010] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute any one of the methods in the first aspect.

[0011] According to the technology of this application, a multi-source unsupervised domain fusion target re-identification method is proposed. Multi-source means that labeled data sets from different sources and unlabeled data of the target application scenario will be used in model training. Unsupervised means that the data of the target application scenario has no labels. Domain fusion refers to the fusion of labeled data features and unlabeled data features to help the target application scenario to train the model. This application mainly solves the problem of insufficient utilization of labeled data in unsupervised target re-identification model training.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0014] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0015] Figure 2 is a flowchart of an embodiment of a method for generating a target re-identification model according to the present disclosure;

[0016] Figure 3 is a flowchart of another embodiment of a method for generating a target re-identification model according to the present disclosure;

[0017] Figure 4a-4b is a structural diagram of a graph convolutional neural network for generating a target re-identification model according to the method disclosed in the present invention;

[0018] Figure 5 is a schematic diagram of an application scenario of the method for generating a target re-identification model according to the present disclosure;

[0019] Figure 6 is a structural schematic diagram of an embodiment of a device for generating a target re-identification model according to the present disclosure;

[0020] Figure 7 is a flow chart of an embodiment of a method for target re-identification according to the present disclosure;

[0021] Figure 8 is a structural schematic diagram of an embodiment of a device for target re-identification according to the present disclosure;

[0022] Fig. 9 It is a block diagram of an electronic device used to implement the method for generating a target re-identification model or for target re-identification according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0024] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method for generating a target re-identification model or a target re-identification method, and an apparatus for generating a target re-identification model or a target re-identification method of the present disclosure can be applied.

[0025] like Figure 1 As shown, the system architecture 100 may include terminals 101, 102, a network 103, a database server 104, and a server 105. The network 103 is used to provide a medium for communication links between the terminals 101, 102, the database server 104, and the server 105. The network 103 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0026] The user 110 can use the terminals 101 and 102 to interact with the server 105 through the network 103 to receive or send messages, etc. Various client applications can be installed on the terminals 101 and 102, such as model training applications, target detection and recognition applications, shopping applications, payment applications, web browsers, and instant messaging tools.

[0027] The terminals 101 and 102 here can be hardware or software. When the terminals 101 and 102 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Dynamic Image Experts Compression Standard Audio Layer 3), laptops and desktop computers, etc. When the terminals 101 and 102 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0028] When the terminals 101 and 102 are hardware, an image acquisition device may be installed thereon. The image acquisition device may be any device capable of acquiring images, such as a camera, a sensor, etc. The user 110 may use the image acquisition device on the terminals 101 and 102 to acquire images of his or her own or other people's target objects.

[0029] The database server 104 may be a database server that provides various services. For example, a sample set may be stored in the database server. The sample set includes a large number of samples. The sample may include a sample image and a sample label corresponding to the sample image. The sample may be a target such as a pedestrian or a vehicle. In this way, the user 110 may also select a sample from the sample set stored in the database server 104 through the terminals 101 and 102.

[0030] The server 105 may also be a server that provides various services, such as a background server that supports various applications displayed on the terminals 101 and 102. The background server may train the initial model using samples in the sample set sent by the terminals 101 and 102, and may send the training results (such as the generated re-recognition model) to the terminals 101 and 102. In this way, the user may apply the generated re-recognition model to perform target re-recognition.

[0031] The database server 104 and the server 105 here can also be hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made here.

[0032] It should be noted that the method for generating a target re-identification model or the method for target re-identification provided in the embodiments of the present application is generally executed by the server 105. Accordingly, the device for generating a target re-identification model or the device for target re-identification is generally also provided in the server 105.

[0033] It should be pointed out that, in the case where the server 105 can implement the related functions of the database server 104 , the database server 104 may not be provided in the system architecture 100 .

[0034] It should be understood that Figure 1 The number of terminals, networks, database servers and servers in the embodiment is only for illustration. Any number of terminals, networks, database servers and servers may be provided according to the implementation requirements.

[0035] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for generating a target re-identification model according to the present disclosure. The method for generating a target re-identification model comprises the following steps:

[0036] Step 201, obtain a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training.

[0037] In this embodiment, the execution body (eg, Figure 1 The server 105 shown in FIG. 104 may obtain a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training in a variety of ways. For example, the execution subject may obtain the sample set from a database server (e.g. Figure 1For example, a user may obtain an existing sample set stored in the database server 104 as shown in FIG. Figure 1 In this way, the execution subject can receive the samples collected by the terminal and store the samples locally, thereby generating a sample set.

[0038] Here, the sample set is divided into two categories, one is a labeled sample set, and the other is an unlabeled sample set. Labeled samples and unlabeled samples come from different scenes, and images in different scenes are likely to have different image styles (lighting, contrast, etc.), which leads to the direct mixing of labeled data and unlabeled data. It will not improve the performance of the trained model, and may even cause a decrease in accuracy. Each type of sample set may include at least one sample. Among them, the labeled samples may include sample images and labels corresponding to the sample images, for example, the same pedestrian in different images uses a unified number. Unlabeled samples only include sample images without corresponding labels. Usually, labeled samples are manually annotated and are suitable for some specific scenes, such as schools, shopping malls, etc. Unlabeled samples may be other application scenarios, such as train stations, hospitals, etc.

[0039] The initialization model obtained through supervised training refers to a target re-identification model that is pre-trained using a labeled sample set. The pre-training process can be performed by the execution subject of the method for generating a target re-identification model, or by a third-party server. The labeled sample set used in the pre-training process can be the samples used in steps 201-205, or other samples. For example, the pre-training process of the initialization model uses a labeled sample set from a school. The target re-identification model training process of the present application can use both labeled sample sets from schools and labeled sample sets from data sources such as shopping malls and amusement parks.

[0040] The initialization model may generally include a feature extraction layer and a classification layer. The feature extraction layer may include several convolutional layers, pooling layers, fully connected layers, etc., which are all existing technologies and will not be described in detail.

[0041] Step 202: Use the initialization model to extract features from each sample in the unlabeled sample set.

[0042] In this embodiment, when the initialization model is used to extract features from each sample in the unlabeled sample set, it is only necessary to output the results from the feature extraction layer, and there is no need to input them into the classification layer.

[0043] Step 203: clustering the features extracted from the unlabeled sample set using a clustering algorithm.

[0044] In this embodiment, a clustering algorithm such as k-means or DBSCAN can be used to cluster the features of the unlabeled samples extracted in step 202. In this way, the unlabeled sample set is divided into many different clusters in the feature space. The labeled sample set does not participate in the feature clustering step.

[0045] Step 204: for each sample in the unlabeled sample set, a pseudo label is assigned to the sample according to the cluster corresponding to the sample in the feature space.

[0046] In this embodiment, the number of clusters is used as the target number of the current unlabeled samples, and the cluster index is used as the pseudo label of each sample under it. For example, if the sample is a photo of pedestrians, the number of clusters is the number of pedestrians, and the cluster index is used as the pseudo label of each pedestrian under it.

[0047] Step 205 , the sample set with pseudo labels and the sample set with labels are mixed as a training sample set, and supervised training is performed on the initialization model to obtain a target re-identification model.

[0048] In this embodiment, a sample set with a pseudo label and a sample set with a label are mixed as a training sample set. The mixing method can be random mixing or mixing according to a predetermined ratio, for example, 40% of the samples without labels are in each batch. If the number of labeled samples is less than 60%, the samples can be enhanced by rotation, cropping, scaling, etc. During training, the ratio of pseudo-labeled samples to labeled samples can be dynamically adjusted according to the change of loss value. For example, if the loss value is difficult to decrease when training with 40% of unlabeled samples, the proportion of unlabeled samples can be reduced.

[0049] The supervised training process of the initialized model is prior art and will not be described in detail here.

[0050] The method provided by the above embodiment of the present disclosure trains the target re-identification model by mixing samples assigned with pseudo labels and samples with labels, and can fully utilize the samples with labels to speed up the training speed of the target re-identification model and improve the model performance.

[0051] Further references Figure 3 , which shows a process 300 of another embodiment of a method for generating a target re-identification model. The process 300 of the method for generating a target re-identification model includes the following steps:

[0052] Step 301, obtain a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training.

[0053] Step 302: Use the initialization model to extract features from each sample in the unlabeled sample set.

[0054] Step 303: cluster the features extracted from the unlabeled sample set using a clustering algorithm.

[0055] Step 304: for each sample in the unlabeled sample set, a pseudo label is assigned to the sample according to the cluster corresponding to the sample in the feature space.

[0056] Steps 301-304 are substantially the same as steps 201-204, and thus are not described in detail herein.

[0057] Step 305: Use the initialized model to extract features from each sample in the labeled sample set.

[0058] In this embodiment, when the initialization model is used to extract features from each sample in the labeled sample set, it is only necessary to output the results from the feature extraction layer, and it is not necessary to input them into the classification layer. The labeled samples may come from different data sources, and each feature extracted from the labeled sample is marked with the data source. The features extracted from the unlabeled samples in step 302 are uniformly marked as coming from the target application scenario.

[0059] In some optional implementations of this embodiment, the present application uses at least one labeled sample set, and each labeled sample set comes from a data source. The more data sources involved in the training, the more the unique style of each data source can be weakened, preventing the neural network model from overfitting, and making the trained model more accurate.

[0060] Step 306: Use a graph convolutional neural network to fuse the features of each sample in the sample set with pseudo labels and the features of each sample in the sample set with labels to obtain a fused feature of each sample.

[0061] In this embodiment, a graph convolutional neural network is a method that can perform deep learning on graph data. This application proposes to use a graph convolutional neural network to fuse image features from different domains (which can be simply understood as different sample sets), and then train a re-recognition model for the fused features, usually using a classified cross entropy loss function.

[0062] In some optional implementations of this embodiment, the graph convolutional neural network includes a first graph convolutional layer and a second graph convolutional layer, wherein the first graph convolutional layer ( Figure 4aThe first graph convolution layer (shown in FIG. 1 ) includes at least one sample node representing a sample and at least one proxy node representing a sample set. Sample nodes belonging to the same sample set are unidirectionally connected to the same proxy node. The proxy nodes are interconnected. Each proxy node weightedly sums the sample features of the sample nodes connected to it to obtain the proxy features of the proxy node. The proxy features of all proxy nodes are fused through the graph convolution layer to obtain the output features of the proxy node of the first graph convolution layer. The second graph convolution layer ( Figure 4b The graph convolutional layer (as shown in FIG. 1 ) includes at least one sample node representing a sample and at least one proxy node representing a sample set. Sample nodes belonging to the same sample set are bidirectionally connected to the same proxy node. The proxy nodes are interconnected. The output features of the proxy nodes of the first graph convolutional layer are fused through the second graph convolutional layer to obtain the output features of each sample node. This fusion method allows the features of each sample set to be fused with the features of other sample sets, thereby reducing the model's dependence on a certain data source and obtaining a more accurate model.

[0063] The structural diagram of the graph convolutional neural network is as follows Figure 4a , 4b First see Figure 4a , different filling patterns represent different domains (data sources), small circles represent a sample feature, and large circles are proxy features of a specific domain, which are obtained by weighted summation of sample features of the domain. The weights are automatically trained by learnable parameters in the neural network. Afterwards, the proxy features are fused through the graph convolutional neural network. Specifically, the adjacency matrix of several proxy nodes in the graph convolutional neural network is an all-one matrix, indicating that the output features of each proxy node of the current layer of the graph convolutional neural network are the weighted sum of all proxy features. Figure 4b The second layer of graph convolutional neural network is shown here. Here, each proxy node is still adjacent to each other, which is similar to Figure 4a The same is true, indicating that the proxy features of different domains will still merge with each other. However, the difference is that there is also an adjacency relationship between each sample node and its proxy node in each domain, indicating that in the second layer of the graph convolutional neural network, the proxy features are weighted by each sample in the domain and the output features of each sample in this layer of the network are the weighted sum of its own features and the proxy features. In this way, each sample in each domain will incorporate the feature information of other domains, thereby reducing the feature specificity of its own domain.

[0064] In some optional implementations of this embodiment, the graph convolutional neural network includes a first graph convolutional layer and at least one second graph convolutional layer, wherein the output of the first graph convolutional layer is used as the input of the second graph convolutional layer, and the output features of each second graph convolutional layer are used as the input of the next second graph convolutional layer or the input of the classification layer of the initialization model. The accuracy of the model can be further improved through the iteration of the multi-layer network.

[0065] Step 307 , training an initialization model based on the fused features of each sample in the sample set with pseudo labels and the fused features of each sample in the sample set with labels to obtain a target re-identification model.

[0066] In this embodiment, the graph convolutional neural network is located between the feature extraction layer and the classification layer. The features of the labeled samples extracted by the feature extraction layer and the features of the samples with pseudo-graph labels are input into the graph convolutional neural network, and the graph convolutional neural network inputs the fused features into the classification layer to obtain the prediction results. The predicted result is compared with the label or pseudo-label of the input sample to calculate the loss value. According to the loss value, the network parameters of the feature extraction layer, the classification layer and the graph convolutional neural network are adjusted, and then some unlabeled samples and labeled samples are selected, and steps 301-307 are repeated until the loss value is less than a predetermined threshold or the number of iterations reaches a predetermined value, indicating that the target re-identification model training is completed. The final target re-identification model may include only the feature extraction layer and the classification layer, and may also include a graph convolutional neural network.

[0067] Such an operation can weaken the unique style of each domain, reduce the risk of overfitting the neural network model to a certain domain, and make the trained model more robust.

[0068] Continue to see Figure 5 , Figure 5 FIG. 1 is a schematic diagram of an application scenario of the method for generating a target re-identification model according to this embodiment. Figure 5 In the application scenario, the overall process is as follows:

[0069] 500 supervised training: First, use a labeled sample set and follow the general target re-identification supervised training process to train an initialization model with a certain label distinction ability.

[0070] 501 Target re-identification model obtained by training: Since the entire training process is performed in an iterative manner, the model here can be the initialization model obtained by the above 500 steps, or it can be a model obtained by subsequent retraining.

[0071] 502 Feature extraction step: Use the target re-identification model in 501 to extract features from each sample image in the unlabeled sample set. Both labeled and unlabeled samples participate in this process, and it is marked which source each sample image comes from, that is, which dataset.

[0072] 503 Feature clustering: Use DBSCAN, k-means or other clustering algorithms (any of which can be used) to cluster the features of the unlabeled samples extracted in step 502. In this way, the unlabeled sample set is divided into many different clusters in the feature space. Labeled samples do not participate in the feature clustering step.

[0073] 504 Pseudo-label assignment: Pseudo-labels are assigned to each sample image in the unlabeled sample set according to the corresponding cluster in the feature space. The pseudo-label is the corresponding cluster index.

[0074] 505: Training of target re-identification model by domain feature fusion using graph convolutional neural network: Both labeled and unlabeled samples participate in this process. Among them, labeled samples and unlabeled samples come from different scenes, and images in different scenes are likely to have different image styles (lighting, contrast, etc.), which leads to the direct mixing of labeled samples and unlabeled samples. It will not improve the performance of the trained model, and may even cause a decrease in accuracy. In order to solve this problem, the present application proposes to use a graph convolutional neural network to fuse image features from different domains (which can be simply understood as different data sets), and then train a target re-identification model on the fused features, usually using a classified cross entropy loss function. Such an operation can weaken the specific style of each domain, reduce the risk of overfitting the neural network model to a certain domain, and make the trained model more robust. The structural diagram of the graph convolutional neural network in this application scenario is shown in the figure. Figure 4a-4b In this way, each sample in each domain will incorporate the feature information of other domains to weaken the feature specificity of its own domain.

[0075] Continue to see Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for generating a target re-identification model. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0076] like Figure 6 As shown, the device 600 for generating a target re-identification model of this embodiment may include: an acquisition unit 601, a feature extraction unit 602, a clustering unit 603, an allocation unit 604 and a training unit 605. Among them, the acquisition unit 601 is configured to acquire a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training. The feature extraction unit 602 is configured to use the initialization model to extract features from each sample in the unlabeled sample set. The clustering unit 603 is configured to cluster the features extracted from the unlabeled sample set using a clustering algorithm. The allocation unit 604 is configured to assign a pseudo-label to each sample in the unlabeled sample set according to the cluster corresponding to the sample in the feature space. The training unit 605 is configured to mix the sample set with pseudo-labels and the labeled sample set as a training sample set, and perform supervised training on the initialization model to obtain a target re-identification model.

[0077] In this embodiment, the specific processing of the acquisition unit 601, the feature extraction unit 602, the clustering unit 603, the allocation unit 604 and the training unit 605 of the device 600 for generating the target re-identification model can be referred to. Figure 2 Corresponding to step 201, step 202, step 203, step 204 and step 205 in the embodiment.

[0078] In some optional implementations of this embodiment, the training unit 605 is further configured to: use the initialization model to extract features from each sample in the labeled sample set. Use a graph convolutional neural network to fuse the features of each sample in the sample set with pseudo labels and the features of each sample in the labeled sample set to obtain a fused feature of each sample. Train the initialization model based on the fused features of each sample in the sample set with pseudo labels and the fused features of each sample in the labeled sample set to obtain a target re-identification model.

[0079] In some optional implementations of this embodiment, the graph convolutional neural network includes a first graph convolutional layer and a second graph convolutional layer, wherein the first graph convolutional layer includes at least one sample node representing a sample and at least one proxy node representing a sample set, sample nodes belonging to the same sample set are unidirectionally connected to the same proxy node, and the proxy nodes are interconnected. Each proxy node performs a weighted sum of sample features of sample nodes connected to it to obtain a proxy feature of the proxy node, and the proxy features of all proxy nodes are fused through the graph convolutional layer to obtain an output feature of the proxy node of the first graph convolutional layer. The second graph convolutional layer includes at least one sample node representing a sample and at least one proxy node representing a sample set, sample nodes belonging to the same sample set are bidirectionally connected to the same proxy node, and the proxy nodes are interconnected. The output features of the proxy nodes of the first graph convolutional layer are fused through the second graph convolutional layer to obtain an output feature of each sample node.

[0080] In some optional implementations of this embodiment, the graph convolutional neural network includes a first graph convolutional layer and at least one second graph convolutional layer, wherein the output of the first graph convolutional layer serves as the input of the second graph convolutional layer, and the output features of each second graph convolutional layer serve as the input of the next second graph convolutional layer or the input of the classification layer of the initialization model.

[0081] In some optional implementations of this embodiment, the device uses at least one labeled sample set, and each labeled sample set comes from a data source.

[0082] See also Figure 7 , which shows a process 700 of an embodiment of a method for target re-identification provided by the present application. The method for target re-identification may include the following steps:

[0083] Step 701: Acquire a surveillance image to be identified.

[0084] In this embodiment, the execution subject of the method for target re-identification (for example Figure 1 The server 105 shown in FIG. 104 can obtain the surveillance image to be identified in a variety of ways. For example, the execution subject can obtain the surveillance image from the database server (e.g. Figure 1 For example, the execution subject may also receive a terminal (such as a database server 104) to obtain the surveillance image stored therein. Figure 1 The monitoring images are collected by the terminals 101, 102) or other devices shown.

[0085] In this embodiment, the target to be identified can be any person or vehicle. The monitoring image can be from a video or a photo, and can be a color image and / or a grayscale image, etc. The format of the monitoring image is not limited in this application.

[0086] Step 702: input the monitoring image into the target re-identification model to generate a target re-identification result.

[0087] In this embodiment, the execution subject may input the surveillance image acquired in step 701 into the target re-identification model to generate a target re-identification result of the detection object. The target re-identification result may be information used to describe pedestrians or vehicles in the image. For example, the target re-identification result may include whether the target person appears in multiple images.

[0088] In this embodiment, the target re-identification model can be adopted as described above Figure 2 or Figure 3 The specific generation process can be found in Figure 2 or Figure 3 The relevant description of the embodiments will not be repeated here.

[0089] It should be noted that the method for target re-identification in this embodiment can be used to test the target re-identification model generated by the above embodiments. Then, the target re-identification model can be continuously optimized according to the test results. This method can also be a practical application method of the target re-identification model generated by the above embodiments. Using the target re-identification model generated by the above embodiments to perform target re-identification helps to improve the performance of target re-identification.

[0090] Continue to see Figure 8 , as a response to the above Figure 7 The present application provides an embodiment of a device for target re-identification. Figure 7 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0091] like Figure 8 As shown, the device 800 for target re-identification in this embodiment may include: an image acquisition unit 801, configured to acquire a surveillance image to be identified; an image recognition unit 802, configured to input the surveillance image into the image recognition system as described above; Figure 2 or Figure 3 In the target re-identification model generated by the method described in the embodiment, a target re-identification result is generated.

[0092] It is understood that the units described in the device 800 are similar to those described in the reference Figure 7 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 800 and the units included therein, and will not be described in detail here.

[0093] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0094] like Fig. 9 , is a block diagram of an electronic device for generating a target re-identification model or a method for target re-identification according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0095] like Fig. 9 As shown, the electronic device includes: one or more processors 901, a memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 901 is taken as an example.

[0096] The memory 902 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to execute the method for generating a target re-identification model or for target re-identification provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to execute the method for generating a target re-identification model or for target re-identification provided in the present application.

[0097] The memory 902 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for generating a target re-identification model or for target re-identification in the embodiments of the present application (for example, the attached Figure 6 The processor 901 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 902, that is, implements the method for generating a target re-identification model or for target re-identification in the above method embodiment.

[0098] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of an electronic device for generating a target re-identification model or for target re-identification, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to an electronic device for generating a target re-identification model or for target re-identification via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0099] The electronic device for generating a target re-identification model or a method for target re-identification may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903 and the output device 904 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0100] The input device 903 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device used to generate the target re-identification model or for target re-identification, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 904 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0101] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0102] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0104] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0105] A computer system may include clients and servers. The client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology."

[0106] According to the technical solution of the embodiment of the present application, labeled data and unlabeled data are used together during the training process. By designing a graph convolutional neural network between multiple domains to fuse the features between different domains, the style differences between different data sources can be alleviated to a certain extent, making the mixed use of multi-source data a feasible solution. Compared with general methods, this application can further improve the performance of the model and ultimately achieve better results.

[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0108] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for generating a target re-identification model, comprising: Obtain labeled sample sets, unlabeled sample sets, and initialized models obtained through supervised training; Using the initialization model to extract features from each sample in the unlabeled sample set; Use a clustering algorithm to cluster the features extracted from the unlabeled sample set; For each sample in the unlabeled sample set, assign a pseudo label to the sample according to the cluster corresponding to the sample in the feature space; The sample set with pseudo labels and the sample set with labels are mixed in a predetermined ratio as a training sample set, and the initialization model is supervised trained to obtain a target re-identification model, wherein the ratio is dynamically adjusted according to the change of the loss value, including: Using the initialization model to extract features from each sample in the labeled sample set; Using a graph convolutional neural network, the features of each sample in the sample set with pseudo labels and the features of each sample in the sample set with labels are fused to obtain fused features of each sample; The initialization model is trained based on the fusion features of each sample in the sample set with pseudo labels and the fusion features of each sample in the sample set with labels to obtain a target re-identification model.

2. The method according to claim 1, wherein: The graph convolutional neural network includes a first graph convolutional layer and a second graph convolutional layer, wherein: The first graph convolution layer includes at least one sample node representing a sample and at least one proxy node representing a sample set. Sample nodes belonging to the same sample set are unidirectionally connected to the same proxy node. The proxy nodes are interconnected. Each proxy node performs a weighted sum of sample features of the sample nodes connected to it to obtain a proxy feature of the proxy node. The proxy features of all proxy nodes are fused through the graph convolution layer to obtain an output feature of the proxy node of the first graph convolution layer. The second graph convolution layer includes at least one sample node representing a sample and at least one proxy node representing a sample set. The sample nodes belonging to the same sample set are bidirectionally connected to the same proxy node. The proxy nodes are interconnected. The output features of the proxy nodes of the first graph convolution layer are fused through the second graph convolution layer to obtain the output features of each sample node.

3. The method according to claim 2, wherein: The graph convolutional neural network includes the first graph convolutional layer and at least one second graph convolutional layer, wherein the output of the first graph convolutional layer serves as the input of the second graph convolutional layer, and the output features of each second graph convolutional layer serve as the input of the next second graph convolutional layer or the input of the classification layer of the initialization model.

4. The method according to claim 1, wherein: The method adopts at least one labeled sample set, and each labeled sample set comes from a data source.

5. A method for target re-identification, comprising: Acquire a surveillance image to be identified; The monitoring image is input into a target re-recognition model trained according to the method described in any one of claims 1 to 4 to generate a target re-recognition result.

6. A device for generating a target re-identification model, comprising: An acquisition unit is configured to acquire a labeled sample set, an unlabeled sample set, and an initialization model obtained through supervised training; A feature extraction unit, configured to use the initialization model to extract features from each sample in the unlabeled sample set; A clustering unit, configured to cluster features extracted from the unlabeled sample set using a clustering algorithm; an allocating unit configured to allocate a pseudo label to each sample in the unlabeled sample set according to a cluster corresponding to the sample in the feature space; The training unit is configured to mix the sample set with pseudo labels and the sample set with labels in a predetermined ratio as a training sample set, and perform supervised training on the initialization model to obtain a target re-identification model, wherein the ratio is dynamically adjusted according to the change of the loss value, including: Using the initialization model to extract features from each sample in the labeled sample set; Using a graph convolutional neural network, the features of each sample in the sample set with pseudo labels and the features of each sample in the sample set with labels are fused to obtain fused features of each sample; The initialization model is trained based on the fusion features of each sample in the sample set with pseudo labels and the fusion features of each sample in the sample set with labels to obtain a target re-identification model.

7. The device according to claim 6, wherein: The graph convolutional neural network includes a first graph convolutional layer and a second graph convolutional layer, wherein: The first graph convolution layer includes at least one sample node representing a sample and at least one proxy node representing a sample set. Sample nodes belonging to the same sample set are unidirectionally connected to the same proxy node. The proxy nodes are interconnected. Each proxy node performs a weighted sum of sample features of the sample nodes connected to it to obtain a proxy feature of the proxy node. The proxy features of all proxy nodes are fused through the graph convolution layer to obtain an output feature of the proxy node of the first graph convolution layer. The second graph convolution layer includes at least one sample node representing a sample and at least one proxy node representing a sample set. The sample nodes belonging to the same sample set are bidirectionally connected to the same proxy node. The proxy nodes are interconnected. The output features of the proxy nodes of the first graph convolution layer are fused through the second graph convolution layer to obtain the output features of each sample node.

8. The device according to claim 7, wherein: The graph convolutional neural network includes the first graph convolutional layer and at least one second graph convolutional layer, wherein the output of the first graph convolutional layer serves as the input of the second graph convolutional layer, and the output features of each second graph convolutional layer serve as the input of the next second graph convolutional layer or the input of the classification layer of the initialization model.

9. The device according to claim 6, wherein: The device uses at least one labeled sample set, and each labeled sample set comes from a data source.

10. A device for target re-identification, comprising: An image acquisition unit, configured to acquire a surveillance image to be identified; The image recognition unit is configured to input the monitoring image into a target re-recognition model trained according to the method of any one of claims 1 to 4 to generate a target re-recognition result.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.