Target re-identification method and device, electronic device and storage medium

Through the target re-identification network based on the graph convolution network, the feature aggregation ability is used to improve the accuracy of vehicle re-identification, which solves the problem of low recognition accuracy caused by illumination, viewing angle and occlusion in vehicle re-identification, and achieves higher accuracy. Feature matching accuracy and recognition accuracy.

CN113807369BActive Publication Date: 2024-09-17BEIJING SENSETIME TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111131075.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2024-09-17
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

The recognition accuracy in vehicle re-identification is low, mainly due to image differences caused by factors such as illumination, viewing angle, and occlusion, resulting in large differences in images of the same vehicle or small differences in images of different vehicles, resulting in feature matching errors.

Method used

A target re-identification network based on graph convolution network (GCN)-assisted training is used to improve the accuracy of feature matching through feature extraction and feature matching, using the feature aggregation ability of the graph convolution network.

Benefits of technology

The recognition accuracy of vehicle re-identification is improved. Through the feature aggregation capability, vehicle images with the same ID are distributed closer in the feature space, reducing misrecognition and meeting the time and computing resource requirements in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113807369B
    Figure CN113807369B
Patent Text Reader

Abstract

The present disclosure relates to a method and device for target re-identification, an electronic device and a storage medium, the method comprising: extracting features from a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network; matching the first feature with a plurality of second features included in a feature library to obtain a recognition result corresponding to the target image, wherein the plurality of second features are obtained by extracting features from a plurality of reference images through the target re-identification network. The disclosed embodiments can improve the recognition accuracy of target re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a target re-identification method and device, an electronic device, and a storage medium. Background Art

[0002] Vehicle re-identification (ReID) is a type of target re-identification. The purpose of vehicle ReID is to retrieve reference vehicle images with high similarity to the target vehicle image to be identified in the image library. The widespread application of vehicle ReID has greatly reduced the time for staff to review video recordings. Therefore, vehicle ReID can be widely used in many application scenarios such as vehicle tracking, intelligent transportation, and urban rescue. However, since the target vehicle image to be identified and the multiple reference vehicle images stored in the image library are often acquired by different image acquisition devices, the effective information of the vehicle image may be affected by factors such as lighting, viewing angle, and occlusion. For example, due to the influence of lighting, viewing angle, occlusion, etc., the difference between multiple vehicle images corresponding to the same vehicle may be large, or the difference between multiple vehicle images corresponding to different vehicles may be small, which will result in a low recognition accuracy of vehicle ReID. Summary of the invention

[0003] The present disclosure proposes a technical solution of a target re-identification method and device, an electronic device, and a storage medium.

[0004] According to one aspect of the present disclosure, a target re-identification method is provided, comprising: performing feature extraction on a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network; performing feature matching on the first feature with multiple second features included in a feature library to obtain a recognition result corresponding to the target image, wherein the multiple second features are obtained by performing feature extraction on multiple reference images through the target re-identification network.

[0005] In a possible implementation, the training samples of the target re-identification network include N sample images; the training method of the target re-identification network is as follows: performing image processing on the N sample images through the target re-identification network to obtain a third feature corresponding to each of the sample images; performing image processing on the N sample images through the graph convolutional network to obtain a fourth feature corresponding to each of the sample images; determining a first network loss based on the third feature and the fourth feature corresponding to each of the sample images; and optimizing the target re-identification network based on the first network loss.

[0006] In a possible implementation, the performing image processing on the N sample images through the graph convolutional network to obtain the fourth feature corresponding to each of the sample images includes: performing hierarchical feature extraction on the N sample images through the graph convolutional network to obtain the first local feature and the second local feature corresponding to each of the sample images; and fusing the first local feature and the second local feature corresponding to each of the sample images to obtain the fourth feature corresponding to each of the sample images.

[0007] In a possible implementation, the first network loss includes a first loss; the determining the first network loss according to the third feature and the fourth feature corresponding to each of the sample images includes: classifying the N sample images according to the third feature corresponding to each of the sample images, and determining a first classification prediction result corresponding to each of the sample images; classifying the N sample images according to the fourth feature corresponding to each of the sample images, and determining a second classification prediction result corresponding to each of the sample images; and determining the first loss according to the first classification prediction result and the second classification prediction result corresponding to each of the sample images.

[0008] In a possible implementation, the N sample images are classified according to the fourth feature corresponding to each of the sample images to determine the second classification prediction result corresponding to each of the sample images, including: determining the initial feature connectivity graph corresponding to each of the sample images according to the fourth feature corresponding to each of the sample images; performing feature aggregation on the initial feature connectivity graph corresponding to each of the sample images using the graph convolutional network to obtain aggregated features corresponding to each of the sample images; and the N sample images are classified according to the aggregated features corresponding to each of the sample images to determine the second classification prediction result corresponding to each of the sample images.

[0009] In a possible implementation, the first network loss includes a second loss; determining the first network loss according to the third feature and the fourth feature corresponding to each of the sample images includes: determining a first target feature connectivity graph corresponding to each of the sample images according to the third feature corresponding to each of the sample images; determining a second target feature connectivity graph corresponding to each of the sample images according to the fourth feature corresponding to each of the sample images; and determining the second loss according to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each of the sample images.

[0010] In a possible implementation manner, optimizing the target re-identification network according to the first network loss includes: optimizing the target re-identification network by using the first loss and / or the second loss.

[0011] In a possible implementation, determining the second target feature connectivity graph corresponding to each sample image according to the fourth feature corresponding to each sample image includes: determining the fourth feature corresponding to each sample image as a feature node corresponding to each sample image, and obtaining N feature nodes; determining the P nearest neighbor feature nodes that are closest to the target feature node as the first-level nearest neighbor feature nodes corresponding to the target feature node, wherein the target feature node is a feature node corresponding to a target sample image, and the target sample image is any one of the multiple sample images; determining the Q nearest neighbor feature nodes that are closest to each of the first-level nearest neighbor feature nodes as the second-level nearest neighbor feature nodes corresponding to the target feature node; determining the initial feature connectivity graph corresponding to the target sample image according to the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes; and determining the second target feature connectivity graph corresponding to the target sample image according to the initial feature connectivity graph corresponding to the target sample image.

[0012] In a possible implementation, the initial feature connectivity graph corresponding to the target sample image includes a first feature node set and a first adjacency matrix; the initial feature connectivity graph corresponding to the target sample image is determined based on the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes, including: normalizing the N feature nodes according to the target feature nodes to obtain normalized N feature nodes; forming the first feature node set based on the normalized N feature nodes including the normalized first-level nearest neighbor feature nodes and the normalized second-level nearest neighbor feature nodes; for the i-th feature node in the first feature node set, determining the m nearest neighbor feature nodes closest to the i-th feature node from the normalized N feature nodes; determining a feature connection edge between the i-th feature node and the j-th nearest neighbor feature node, wherein the j-th nearest neighbor feature node is a feature node existing in the first feature node set; and determining the first adjacency matrix based on the connection relationship corresponding to each of the feature nodes in the first feature node set.

[0013] In a possible implementation, the second target feature connectivity graph includes a second feature node set and a second adjacency matrix; determining the second target feature connectivity graph corresponding to the target sample image based on the initial feature connectivity graph corresponding to the target sample image includes: adding feature nodes that do not exist in the first feature node set among the normalized N feature nodes to the first feature node set to form the second feature node set; for a pseudo feature node in the second feature node set, determining the nearest neighbor feature node corresponding to the pseudo feature node among the normalized N feature nodes, wherein the pseudo feature node is any feature node that does not exist in the first feature node set among the normalized N feature nodes; determining a pseudo feature connection edge between the pseudo feature node and the nearest neighbor feature node corresponding to the pseudo feature node; and determining the second adjacency matrix based on the connection relationship corresponding to each of the feature nodes in the second feature node set.

[0014] In a possible implementation, the training sample also includes a true label corresponding to each of the sample images, and the second classification prediction result corresponding to each of the sample images includes a predicted label corresponding to each of the sample images; the training method of the target re-identification network also includes: determining a second network loss based on the true label and the predicted label corresponding to each of the sample images; and optimizing the graph convolutional network based on the second network loss.

[0015] In a possible implementation, each reference image corresponds to a label; the first feature is matched with multiple second features included in the feature library to obtain a recognition result corresponding to the target image, including: determining the feature similarity between the first feature and each of the second features; determining the second feature whose feature similarity is greater than a preset threshold as the target second feature that successfully matches the first feature; and determining the label of the reference image corresponding to the target second feature as the recognition result.

[0016] According to one aspect of the present disclosure, a target re-identification device is provided, including: a feature extraction module, used to extract features of a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network; a feature matching module, used to match the first feature with multiple second features included in a feature library to obtain a recognition result corresponding to the target image, wherein the multiple second features are obtained after extracting features from multiple reference images through the target re-identification network.

[0017] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

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

[0019] In the disclosed embodiment, a target re-identification network is obtained based on graph convolutional network-assisted training, so that the target re-identification network has feature aggregation capability, and then a first feature obtained by extracting features of a target image through the target re-identification network is matched with a plurality of second features obtained after the target re-identification network included in the feature library extracts features of a plurality of reference images, so that similar features can be better matched successfully, thereby obtaining a recognition result with a higher accuracy, and effectively improving the recognition accuracy of target re-identification.

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

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

[0022] Figure 1 A flow chart showing a method for target re-identification according to an embodiment of the present disclosure is shown;

[0023] Figure 2 A schematic diagram of a target network structure for training a target re-identification network according to an embodiment of the present disclosure is shown;

[0024] Figure 3 A schematic diagram showing a method of determining an initial feature connectivity graph corresponding to a sample image according to an embodiment of the present disclosure;

[0025] Figure 4 The embodiment according to the present disclosure is shown Figure 3 The schematic diagram of determining the second target feature connectivity graph from the initial feature connectivity graph shown;

[0026] Figure 5 A block diagram of a target re-identification device according to an embodiment of the present disclosure is shown;

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

[0028] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

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

[0030] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0031] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0032] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0033] Figure 1 A flow chart of a target re-identification method according to an embodiment of the present disclosure is shown. The target re-identification method can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The target re-identification method can be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the target re-identification method can be executed by a server. Figure 1 As shown, the target re-identification method includes:

[0034] In step S11, a target re-identification network is used to extract features of the target image to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network.

[0035] The target image here is obtained after an image acquisition device (eg, a camera) acquires an image of the target object to be identified.

[0036] The target object here can be a target pedestrian or a target vehicle, which is not specifically limited in the present disclosure. When the target object is a target pedestrian, the target image is a target pedestrian image, and the target re-identification network is a pedestrian re-identification network; when the target object is a target vehicle, the target image is a target vehicle image, and the target re-identification network is a vehicle re-identification network.

[0037] Since the graph convolutional network (GCN) has the ability to aggregate features, the target re-identification network in the embodiment of the present disclosure is obtained by auxiliary training based on GCN. Therefore, the target re-identification network in the embodiment of the present disclosure can be called a pseudo-graph convolutional network (pseudo-GCN). The pseudo-GCN is still a conventional convolutional neural network (CNN) in terms of network structure, but it has the ability to aggregate features. The training process of the target re-identification network obtained based on GCN auxiliary training will be described in detail later in conjunction with possible implementation methods of the present disclosure, which will not be repeated here.

[0038] The target image is subjected to feature extraction using the target re-identification network to obtain the first feature for subsequent feature matching.

[0039] In step S12, the first feature is matched with multiple second features included in the feature library to obtain a recognition result corresponding to the target image, wherein the multiple second features are obtained by extracting features from multiple reference images through a target re-identification network.

[0040] The reference image here is obtained by an image acquisition device (e.g., a camera) after acquiring images of multiple reference objects. In addition, the identity information of the reference objects is known. Therefore, each reference image corresponds to a label (ID, such as a vehicle ID or a pedestrian ID) to indicate the identity information of the corresponding reference object.

[0041] One reference image corresponds to a unique label, but one label can correspond to multiple reference images. For example, when the reference image is a reference vehicle image, one reference vehicle image corresponds to a unique vehicle ID, but one vehicle ID can correspond to multiple reference vehicle images. Multiple reference vehicle images corresponding to the same vehicle ID can be obtained by the same image acquisition device capturing the same reference vehicle, or by different image acquisition devices capturing the same reference vehicle, and the present disclosure does not specifically limit this.

[0042] The target re-identification network is used to extract features from each reference image to obtain multiple second features. A feature library can be constructed using the multiple second features.

[0043] When performing target re-identification on a target image, a first feature corresponding to the target image is matched with a plurality of second features included in the feature library, thereby obtaining a recognition result corresponding to the target image.

[0044] Compared with the related art that only extracts and matches features of a target image and multiple reference images based on an ordinary CNN, in the disclosed embodiment, a target re-identification network (pseudo-GCN) is obtained based on GCN-assisted training, so that the target re-identification network has feature aggregation capabilities, and then the first feature obtained by extracting features of the target image through the target re-identification network is matched with multiple second features obtained after the target re-identification network included in the feature library extracts features from multiple reference images, so that similar features can be better matched successfully, thereby obtaining a recognition result with a higher accuracy rate, and effectively improving the recognition accuracy rate of target re-identification.

[0045] In one possible implementation, each reference image corresponds to a label, and a first feature is matched with multiple second features included in a feature library to obtain a recognition result corresponding to the target image, including: determining the feature similarity between the first feature and each second feature; determining the second feature whose feature similarity is greater than a preset threshold as the target second feature that successfully matches the first feature; and determining the label of the reference image corresponding to the target second feature (for example, a license plate number) as the recognition result.

[0046] By using feature similarity, a target second feature whose feature similarity with the first feature is greater than a preset threshold can be determined among multiple second features, and then the label of the reference image corresponding to the target second feature can be determined as the recognition result corresponding to the target image. In other words, the reference image corresponding to the target second feature is a different image corresponding to the same object as the target image and has the same label. For example, the reference image corresponding to the target second feature is a different image corresponding to the same vehicle as the target image and has the same vehicle ID.

[0047] The specific value of the preset threshold can be set according to the actual situation, and the present disclosure does not make any specific limitation on this. The target second feature that successfully matches the first feature can be one or more, and the present disclosure does not make any specific limitation on this.

[0048] The target ReID method in the related art is affected by perspective differences, occlusion, lighting and other issues, which makes the two images corresponding to the same ID have a long distribution distance in the feature space, which will lead to incorrect feature matching, and then lead to misidentification of target re-identification. Since GCN has the ability to aggregate features, based on GCN, the two images corresponding to the same ID can be distributed closer in the feature space, thereby improving the accuracy of feature matching and thus improving the recognition rate of target re-identification. However, since GCN has a relatively high demand for time and computing resources, it cannot meet the actual needs of target ReID in practical applications. In the disclosed embodiment, CNN is assisted in training based on GCN, so that the CNN (target re-identification network) obtained after training has the ability to aggregate features, which can improve the recognition rate of target re-identification. At the same time, since the target re-identification network is still CNN in terms of network structure, the demand for time and computing resources can still meet the actual needs of target ReID.

[0049] The following is a detailed description of the training process of obtaining a target re-identification network (pseudo GCN) based on GCN-assisted training in an embodiment of the present disclosure.

[0050] In a possible implementation, the training samples of the target re-identification network include N sample images; the training method of the target re-identification network is as follows: performing image processing on the N sample images through the target re-identification network to obtain a third feature corresponding to each sample image; performing image processing on the N sample images through a graph convolutional network to obtain a fourth feature corresponding to each sample image; determining a first network loss based on the third feature and the fourth feature corresponding to each sample image; and optimizing the target re-identification network based on the first network loss.

[0051] Before training the target re-identification network, a training sample is constructed. The training sample includes N sample images, each of which is an image that has been ID-labeled. The specific value of N can be set according to actual conditions, and this disclosure does not specifically limit this.

[0052] In one example, the training sample includes N sample images corresponding to multiple IDs. For example, N=KM. K is the number of IDs, and M is the number of sample images corresponding to each ID. The specific values ​​of K and M can be set according to actual conditions, and this disclosure does not make specific limitations on this.

[0053] Figure 2FIG. 2 shows a schematic diagram of a target network structure for training a target re-identification network according to an embodiment of the present disclosure. Figure 2 As shown, the target network structure includes two branches: a GCN branch and a CNN branch. During the training process, the GCN branch and the CNN branch are alternately trained to implement auxiliary training of the CNN branch based on the GCN branch, so that the CNN branch obtained after training can be used as the target re-identification network of the embodiment of the present disclosure to perform target re-identification on the target image to be identified.

[0054] The GCN branch and the CNN branch are trained alternately, that is, in the alternating iteration process, the GCN branch and the CNN branch are trained separately. Specifically, in the process of training the GCN branch, the network parameters of the CNN branch are fixed and unchanged, and only the network parameters of the GCN branch are adjusted; in the process of training the CNN branch, the network parameters of the GCN branch are fixed and unchanged, and only the network parameters of the CNN branch are adjusted. The training of the GCN branch and the CNN branch are introduced in detail below.

[0055] The following first introduces the training process of the CCN branch.

[0056] like Figure 2 As shown, N sample images in the training sample are input into the target network structure, and a shared basic feature extraction submodule in the target network structure is used to extract basic features from each sample image, so that an initial feature of a D dimension corresponding to each sample image can be obtained. The specific dimension value of the D dimension can be set according to actual conditions, and the present disclosure does not specifically limit this.

[0057] Among them, the shared basic feature extraction submodule can be ResNet50 or other basic feature extraction submodules. The present disclosure does not specifically limit the specific structure of the basic feature extraction submodule.

[0058] The initial features of a D dimension corresponding to each sample image are input into the GCN branch and the CNN branch respectively. The CNN branch further extracts features from the initial features of a D dimension corresponding to each sample image to obtain the third features corresponding to each sample image; the GCN branch further extracts features from the initial features of a D dimension corresponding to each sample image to obtain the fourth features corresponding to each sample image.

[0059] Still with the above Figure 2 For example, Figure 2 As shown, the CNN branch performs global feature extraction on an initial feature of D dimension corresponding to each sample image to obtain the third feature corresponding to each sample image. Figure 2As shown in the figure, the CCN branch performs global feature extraction through feature dimension reduction (Reduction) operation and global average pooling (GAP) operation.

[0060] In one possible implementation, N sample images are processed by a graph convolutional network to obtain a fourth feature corresponding to each sample image, including: performing hierarchical feature extraction on the N sample images by a graph convolutional network to obtain a first local feature and a second local feature corresponding to each sample image; and fusing the first local feature and the second local feature corresponding to each sample image to obtain a fourth feature corresponding to each sample image.

[0061] The local features of an image can better reflect the detailed information of the image. Therefore, a hierarchical feature extraction method can be used in the GCN branch to obtain local features that reflect the detailed information of the image, and then the local features are fused to obtain global features that reflect the detailed information of different images, so as to optimize the fourth feature corresponding to each sample image obtained by feature extraction by the GCN branch, and thus optimize the feature aggregation capability of the GCN branch.

[0062] Still with the above Figure 2 For example, Figure 2 As shown, the GCN branch can also include two hierarchical feature extraction branches, which respectively perform hierarchical feature extraction on an initial feature of a D dimension corresponding to each sample image to obtain a first local feature and a second local feature corresponding to each sample image. Figure 2 As shown, each hierarchical feature extraction branch of the GCN branch performs hierarchical feature extraction through Reduction operation and GAP operation.

[0063] In the case where the sample image is a vehicle sample image, the first local feature may be a local feature containing information such as a vehicle window or a driver, and the second local feature may be a local feature containing information such as a wheel or a license plate.

[0064] The first local feature and the second local feature corresponding to each sample image are fused to obtain a fourth feature corresponding to each sample image.

[0065] In one example, the GCN branch may also directly perform global feature extraction on an initial feature of a D dimension corresponding to each sample image to obtain a fourth feature corresponding to each sample image, which is not specifically limited in the present disclosure.

[0066] In a possible implementation, the first network loss includes the second loss; determining the first network loss according to the third feature and the fourth feature corresponding to each sample image includes: determining the first target feature connectivity graph corresponding to each sample image according to the third feature corresponding to each sample image; determining the second target feature connectivity graph corresponding to each sample image according to the fourth feature corresponding to each sample image; determining the second loss according to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each sample image.

[0067] In order to assist the training of the CNN branch based on the GCN branch so that the CNN branch has the ability to aggregate features, the first target feature connectivity graph of each sample image in the CNN branch and the second target feature connectivity graph in the GCN branch are constructed according to the third feature and the fourth feature corresponding to each sample image.

[0068] The way in which the CNN branch constructs the first target feature connectivity graph is similar to the way in which the GCN branch constructs the second target feature connectivity graph. The following only takes the GCN branch as an example to describe in detail the process of the GCN branch constructing the second target feature connectivity graph. The process of the CNN branch constructing the first target feature connectivity graph is not repeated here.

[0069] In a possible implementation, a second target feature connectivity graph corresponding to each sample image is determined based on the fourth feature corresponding to each sample image, including: determining the fourth feature corresponding to each sample image as a feature node corresponding to each sample image, and obtaining N feature nodes; determining the P nearest neighbor feature nodes that are closest to the target feature node as the first-level nearest neighbor feature nodes corresponding to the target feature node, wherein the target feature node is the feature node corresponding to the target sample image, and the target sample image is any one of a plurality of sample images; determining the Q nearest neighbor feature nodes that are closest to each first-level nearest neighbor feature node as the second-level nearest neighbor feature nodes corresponding to the target feature node; determining an initial feature connectivity graph corresponding to the target sample image based on the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes; and determining a second target feature connectivity graph corresponding to the target sample image based on the initial feature connectivity graph corresponding to the target sample image.

[0070] The fourth feature corresponding to each sample image can be regarded as a feature node. Since the training sample includes N sample images, N feature nodes are obtained. Figure 3 FIG. 1 is a schematic diagram showing a method for determining an initial feature connectivity graph corresponding to a sample image according to an embodiment of the present disclosure. Figure 3 As shown, the N feature nodes corresponding to the N sample images, the IDs corresponding to the N sample images include: ID1, ID2, ID3 and ID4.

[0071] Determine any sample image as the target sample image, that is, the feature node corresponding to the target sample image is the target feature node. Based on the target feature node, construct the initial feature connectivity graph G corresponding to the target sample image t . Still with the above Figure 3 For example, Figure 3 As shown, the target feature node is feature node A.

[0072] Still with the above Figure 3 For example, Figure 3 As shown, among the N-1 feature nodes other than the target feature node A, the P nearest neighbor feature nodes closest to the target feature node A are determined as the first-level nearest neighbor feature nodes corresponding to the target feature node A.

[0073] In order to solve the problem that the feature node with the same ID (ID1) as the target feature node A is classified outside the first-level nearest neighbor feature node, the second-level nearest neighbor feature node corresponding to the target feature node A is further determined. Figure 3 As shown, both feature node B and target feature node A correspond to ID1, but feature node B is not the first-level nearest neighbor feature node corresponding to target feature node A.

[0074] Specifically, among the remaining feature nodes, the Q nearest neighbor feature nodes closest to each first-level nearest neighbor feature node are determined as the second-level nearest neighbor feature nodes corresponding to the target feature node A. At this time, feature node B is determined as the second-level nearest neighbor feature node corresponding to the target feature node A.

[0075] The specific values ​​of P and Q can be set according to actual conditions, and the present disclosure does not make specific restrictions on this. The above-mentioned closest distance can be the closest cosine distance, the closest Euclidean distance, or other forms of the closest distance, and the present disclosure does not make specific restrictions on this.

[0076] According to the first-level nearest neighbor feature nodes corresponding to the target feature node A and the second-level nearest neighbor feature nodes, the initial feature connectivity graph G corresponding to the target sample image can be constructed t .

[0077] In a possible implementation, the initial feature connectivity graph corresponding to the target sample image includes a first feature node set and a first adjacency matrix; the initial feature connectivity graph corresponding to the target sample image is determined according to the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes, including: according to the target feature nodes, feature normalization is performed on N feature nodes to obtain normalized N feature nodes; a first feature node set is formed according to the normalized first-level nearest neighbor feature nodes and the normalized second-level nearest neighbor feature nodes included in the normalized N feature nodes; for the i-th feature node in the first feature node set, the m nearest neighbor feature nodes closest to the i-th feature node are determined from the normalized N feature nodes; a feature connection edge is determined between the i-th feature node and the j-th nearest neighbor feature node, wherein the j-th nearest neighbor feature node is a feature node existing in the first feature node set; and a first adjacency matrix is ​​determined according to the connection relationship corresponding to each feature node in the first feature node set.

[0078] Still with the above Figure 3 For example, Figure 3 As shown, according to the target feature node A, the N feature nodes are feature normalized to obtain the normalized N feature nodes, wherein the normalized first-level nearest neighbor feature nodes corresponding to the target feature node A and the normalized second-level nearest neighbor feature nodes are included in the normalized N feature nodes, forming the initial feature connectivity graph G corresponding to the target sample image (target feature node A) t The first feature node set F included in A .

[0079] The feature normalization may be performed by subtracting the fourth feature corresponding to the target feature node A from the fourth features corresponding to the N feature nodes. The feature normalization may also be performed in other processing methods, which are not specifically limited in the present disclosure.

[0080] For the first feature node set F A For any feature node in the set, for example, the i-th feature node, the m nearest neighbor feature nodes closest to the i-th feature node are determined in the normalized N feature nodes. Verification is performed based on the m nearest neighbor feature nodes. If the j-th nearest neighbor feature node among the m nearest neighbor feature nodes is present in the first feature node set F A If there are feature nodes in , the feature connection edge is determined between the i-th feature node and the j-th nearest neighbor feature node.

[0081] Based on the above method of determining the characteristic connection edge, traverse the first characteristic node set F AThe connection relationship corresponding to each feature node in the first feature node set is obtained, which will not be described here. The connection relationship corresponding to each feature node in the first feature node set can obtain the initial connected graph G corresponding to the target sample image (target feature node A). t The first adjacency matrix A included in A . A A (i,j)=1, used to indicate the initial connected graph G t There is a feature connection edge between the i-th feature node and the j-th feature node in .

[0082] Based on the first feature node set F A and the first adjacency matrix A A , we can get the initial feature connectivity graph G corresponding to the target sample image (target feature node A) t .

[0083] Based on the above determination, the initial feature connectivity graph G corresponding to the target sample image (target feature node A) t By traversing each of the N feature nodes, the initial feature connectivity graph G corresponding to each sample image (each feature node) can be obtained. t , which will not be elaborated here.

[0084] Together with the above GCN branch, an initial feature connectivity graph G is constructed for each sample image. t Similar to the formula, the CNN branch can construct an initial feature connectivity graph G for each sample image. s Due to the different feature extraction methods of the GCN branch and the CNN branch, the third feature and the fourth feature corresponding to each sample image are different, which makes it possible to construct an initial feature connectivity graph G for each sample image. t and G s In order to achieve auxiliary training of CNN branches based on GCN branches, the initial feature connectivity graph G constructed for each sample image is t and G s Expand and obtain the first target feature connectivity graph that the feature node set can align and the second target feature connectivity graph

[0085] The CNN branch constructs an initial feature connectivity graph G based on each sample image. s , expand to obtain the first target feature connectivity graph corresponding to each sample image The GCN branch constructs an initial feature connectivity graph G according to each sample image. t , expand to obtain the second target feature connectivity graph corresponding to each sample image In a similar way, we only take the GCN branch as an example to construct the second target feature connectivity graph for the GCN branch. The CNN branch constructs the first target feature connectivity graph The method will not be repeated here.

[0086] In a possible implementation, the second target feature connectivity graph includes a second feature node set and a second adjacency matrix; according to the initial feature connectivity graph corresponding to the target sample image, the second target feature connectivity graph corresponding to the target sample image is determined, including: adding feature nodes that do not exist in the first feature node set among the normalized N feature nodes to the first feature node set to form a second feature node set; for a pseudo feature node in the second feature node set, determining the nearest neighbor feature node corresponding to the pseudo feature node among the normalized N feature nodes, wherein the pseudo feature node is any feature node that does not exist in the first feature node set among the normalized N feature nodes; determining a pseudo feature connection edge between the pseudo feature node and the nearest neighbor feature node corresponding to the pseudo feature node; and determining the second adjacency matrix according to the connection relationship corresponding to each feature node in the second feature node set.

[0087] Figure 4 The embodiment according to the present disclosure is shown Figure 3 The schematic diagram of determining the second target feature connectivity graph from the initial feature connectivity graph shown in FIG. Figure 4 As shown, Figure 3 The normalized N feature nodes shown do not exist in the first feature node set F A The feature nodes in are added to the first feature node set F A , the process second target feature connectivity graph That is, the second feature node set includes all the normalized N feature nodes. At this time, the normalized N feature nodes do not exist in the first feature node set F. A The feature node in is a pseudo feature node in the second feature node set.

[0088] like Figure 4 As shown, for any pseudo feature node in the second feature node set, the nearest neighbor feature node corresponding to the pseudo feature node is determined among the normalized N feature nodes, and a pseudo feature connection edge is determined between the pseudo feature node and the nearest neighbor feature node corresponding to the pseudo feature node.

[0089] Based on the above-mentioned method of determining the pseudo-feature connection edge, each pseudo-feature node in the second feature node set is traversed to obtain the connection relationship corresponding to each pseudo-feature node in the second feature node set, which will not be described in detail here. According to the connection relationship corresponding to each feature node in the second feature node set, the second target feature connectivity graph can be obtained The second adjacency matrix included in Used to indicate the second target feature connectivity graph There is a feature connection edge between the i-th feature node and the j-th feature node in . Used to indicate the second target feature connectivity graph There is a pseudo-feature connection edge between the i-th feature node and the j-th feature node in .

[0090] Since the first target feature connectivity graph obtained in the CNN branch for each sample image and the second target feature connectivity graph obtained in the GCN branch both include N feature nodes corresponding to all N sample images. Therefore, the first target feature connectivity graph of each sample image on the CNN branch and the second target feature connectivity graph on the GCN branch achieve feature node alignment. Based on the first target feature connectivity graph on the CNN branch and the second target feature connectivity graph on the GCN branch, the graph relationship transfer between the GCN branch and the CNN branch can be achieved.

[0091] According to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each sample image, a second loss included in the first network loss is determined.

[0092] According to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each sample image, the graph distillation loss between the two feature connectivity graphs can be determined, and the graph distillation loss is the second loss included in the first network loss.

[0093] In one example, the graph distillation loss (second loss) L1 can be determined according to the following formula (1).

[0094]

[0095] in, Used to indicate the first target feature connectivity graph The distance between the i-th feature node and the j-th feature node in ; Used to indicate the second target feature connectivity graph The distance between the i-th feature node and the j-th feature node in .

[0096] When auxiliary training of the CNN branch is performed based on the GCN branch, it is also hoped to achieve classification information transmission between the GCN branch and the CNN branch.

[0097] In a possible implementation, the first network loss includes a first loss; determining the first network loss according to a third feature and a fourth feature corresponding to each sample image includes: classifying N sample images according to the third feature corresponding to each sample image, and determining a first classification prediction result corresponding to each sample image; classifying N sample images according to the fourth feature corresponding to each sample image, and determining a second classification prediction result corresponding to each sample image; determining the first loss according to the first classification prediction result and the second classification prediction result corresponding to each sample image.

[0098] According to the third feature corresponding to each sample image, the CNN branch classifies the N sample images and determines the first classification prediction result S corresponding to each sample image. t Among them, the first classification prediction result S corresponding to each sample image t It is used to indicate the probability of the ID corresponding to each sample image. For example, for a sample image, its corresponding first classification prediction result includes: S t (ID1) = 0.7 (used to indicate that the probability that the ID of the sample image is ID1 is 0.7), S t (ID2) = 0.1 (used to indicate that the probability that the ID of the sample image is ID2 is 0.1), S t (ID3)=0.2 (used to indicate that the probability that the ID of the sample image is ID3 is 0.2).

[0099] In a possible implementation, N sample images are classified according to the fourth feature corresponding to each sample image, and a second classification prediction result corresponding to each sample image is determined, including: determining an initial feature connectivity graph corresponding to each sample image according to the fourth feature corresponding to each sample image; performing feature aggregation on the initial feature connectivity graph corresponding to each sample image using a graph convolutional network to obtain aggregated features corresponding to each sample image; and classifying N sample images according to the aggregated features corresponding to each sample image to determine a second classification prediction result corresponding to each sample image.

[0100] Since the GCN branch has the ability to aggregate features, the graph convolutional network is used to aggregate the initial feature connectivity graph corresponding to each sample image to obtain the aggregated features corresponding to each sample image.

[0101] Among them, according to the fourth feature corresponding to each sample image, the initial feature connectivity graph corresponding to each sample image is determined. Please refer to the detailed description of the above embodiment and will not be repeated here.

[0102] Still with the above Figure 3 For example, the initial feature connectivity graph G corresponding to the target sample image (target feature node A)t , including the first feature node set F A and the first adjacency matrix A A .

[0103] The first feature node set F A and the first adjacency matrix A A , input the graph neural network (GNN) of the GCN branch. GNN is based on the first feature node set F A and the first adjacency matrix A A Perform feature aggregation to obtain the aggregated feature Y corresponding to the target sample image (target feature node A) A .

[0104] In one example, feature aggregation can be achieved according to the following formula (2) to obtain the aggregated feature Y A .

[0105]

[0106] Among them, σ(·) is a nonlinear activation function, G is an aggregation matrix, and g(·) is a A and A A For example, the mapping relationship may be mean aggregation, weighted aggregation, or attention-based aggregation, etc., which is not specifically limited in the present disclosure. ∥ is a matrix merging operation, and W is a learnable weight matrix.

[0107] According to the aggregated feature Y corresponding to the target sample image (target feature node A) A , the target sample image (target feature node A) is classified, and the second classification prediction result corresponding to the target sample image (target feature node A) can be determined.

[0108] By analogy, the second classification prediction result S corresponding to each sample image can be determined s , I will not go into details here.

[0109] According to the first classification prediction result S corresponding to each sample image t and the second classification prediction result S s , the classification distillation loss between the CNN branch and the GCN branch can be determined, and the classification distillation loss is the first loss included in the first network loss.

[0110] In one example, the classification distillation loss (first loss) KL(S s ||S t ).

[0111]

[0112] In a possible implementation manner, optimizing the target re-identification network according to the first network loss includes: optimizing the target re-identification network by using the first loss and / or the second loss.

[0113] In one example, the network parameters of the CNN branch can be adjusted by minimizing the first loss L1 corresponding to each sample image determined in the above embodiment to obtain the CNN branch optimized based on the first loss L1. Using the CNN branch optimized based on the first loss L1, the second loss KL(S) corresponding to each sample image is determined using the above embodiment. s ||S t ), and then by minimizing the second loss KL(S s ||S t ), and adjust the network parameters of the CNN branch again to obtain the second loss KL(S s ||S t ) The CNN branch after further optimization.

[0114] In one example, the second loss KL(S) corresponding to each sample image determined in the above embodiment can be minimized. s ||S t ), adjust the network parameters of the CNN branch, and obtain the second loss KL(S s ||S t ) The optimized CNN branch. Using the second loss KL(S s ||S t ) After the optimization, the first loss L1 corresponding to each sample image is determined by the above-mentioned embodiment, and then the network parameters of the CNN branch are adjusted again by minimizing the first loss L1 corresponding to each sample image to obtain a CNN branch that is further optimized based on the first loss L1.

[0115] In an example, the first loss L1 and the second loss KL (S L1 ) corresponding to each sample image determined based on the above embodiment can be s ||S t ), determine the first network loss L = L1 + KL (S s ||S t ). Then, by minimizing the first network loss L corresponding to each sample image, the network parameters of the CNN branch are adjusted to obtain the CNN branch optimized based on the first network loss L.

[0116] In a possible implementation, the CNN branch (target re-identification network) can also be optimized based on identification loss (ID loss) and / or triplet loss (triplet loss).

[0117] In one example, each sample image in the training sample corresponds to a true label. In the above implementation, the first classification prediction result corresponding to each sample image determined by the CNN branch includes the predicted label corresponding to each sample image. According to the true label corresponding to each sample image and the predicted label corresponding to each sample image determined by the CNN branch, the recognition loss of the CNN branch can be determined. By minimizing the recognition loss of the CNN branch and adjusting the network parameters of the CNN branch, the CNN branch (target re-identification network) is optimized. Those skilled in the art should understand that the specific loss supervision process of ID loss can refer to the loss supervision process of ID loss of target ReID in the related technology, and is not specifically limited here.

[0118] In one example, the CNN branch (target re-identification network) is optimized based on the triplet loss so that the distance between the feature nodes corresponding to the same ID in the CNN branch is greater than the distance between the feature nodes corresponding to different IDs. For example, feature node i and feature node j both correspond to ID1, and feature node k corresponds to ID2. Therefore, the process of optimizing the CNN branch (target re-identification network) based on the triplet loss is to make the distance between feature node i and feature node j smaller than the distance between feature node i and feature node k. Those skilled in the art should understand that the specific loss supervision process of triplet loss can refer to the loss supervision process of triplet loss in the relevant technology, and is not specifically limited here.

[0119] In the process of optimizing the CNN branch (target re-identification network) based on the first network loss, ID loss, and triplet loss, the optimization order of different losses can be adjusted according to actual conditions, and the present disclosure does not make specific limitations on this.

[0120] For example, first, the ID loss is determined using the CNN branch before optimization (the specific determination method is as described above, which will not be repeated here), and based on the ID loss, the network parameters of the CNN branch are adjusted to obtain the CNN branch optimized based on the ID loss; then, the triplet loss is determined using the CNN branch optimized based on the ID loss (the specific determination method is as described above, which will not be repeated here), and based on the triplet loss, the network parameters of the CNN branch optimized based on the ID loss are adjusted to obtain the CNN branch optimized based on the IDloss and triplet loss; finally, the first network loss is determined using the CNN branch optimized based on the ID loss and triplet loss (the specific determination method is as described above, which will not be repeated here), and based on the first network loss, the network parameters of the CNN branch optimized based on the ID loss and triplet loss are adjusted to obtain the CNN branch optimized based on the ID loss, triplet loss and the first network loss. The above process can be performed once or iteratively multiple times to obtain the final optimized CNN branch (target re-identification network).

[0121] The following describes the training process of the GCN branch.

[0122] In a possible implementation, the training sample also includes a true label corresponding to each sample image, and the second classification prediction result corresponding to each sample image includes a predicted label corresponding to each sample image; the training method of the target re-identification network also includes: determining the second network loss based on the true label and predicted label corresponding to each sample image; and optimizing the graph convolutional network based on the second network loss.

[0123] The above-mentioned implementation method is used to determine the second classification prediction result corresponding to each sample image (the specific determination method is as described above and will not be repeated here), wherein the second classification prediction result corresponding to each sample image includes the prediction label corresponding to each sample image. According to the true label corresponding to each sample image and the prediction label corresponding to each sample image determined by the GCN branch, the second network loss of the GCN branch can be determined, and the second network loss is also the ID loss. By minimizing the second network loss of the CNN branch and adjusting the network parameters of the GCN branch, the GCN branch can be optimized. Those skilled in the art should understand that the specific loss supervision process of the second network loss can refer to the loss supervision process of the ID loss of the target ReID in the related technology, and is not specifically limited here.

[0124] In one example, the GNN in the GCN branch can be set to a four-layer network structure to implement the encoding and decoding process of channel dimension upscaling (for example, from 512 channels to 2048 channels) and channel dimension downscaling (for example, from 2048 channels to 512 channels) of the input aggregated features. The present disclosure does not specifically limit the specific network structure of the GNN.

[0125] In one example, the GCN branch can also be optimized based on triplet loss. Those skilled in the art should understand that the specific loss supervision process of triplet loss can refer to the loss supervision process of triplet loss in the related art, which is not specifically limited here.

[0126] In the process of optimizing the GCN branch based on the second network loss and triplet loss, the optimization order of different losses can be adjusted according to actual conditions, and the present disclosure does not make specific limitations on this.

[0127] For example, first, the GCN branch before optimization is used to determine the second network loss (the specific determination method is as described above, which will not be repeated here), and based on the second network loss, the network parameters of the GCN branch are adjusted to obtain the GCN branch optimized based on the second network loss; then, the GCN branch optimized based on the second network loss is used to determine the triplet loss (the specific determination method is as described above, which will not be repeated here), and based on the triplet loss loss, the network parameters of the GCN branch optimized based on the second network loss are adjusted to obtain the GCN branch optimized based on the second network loss and the triplet loss. The above process can be performed once or iteratively multiple times to obtain the final optimized GCN branch.

[0128] Based on the above Figure 2 The network structure shown uses the above implementation method to perform alternate iterative training on the GCN branch and the CNN branch respectively until the preset iteration condition is met, and the iterative training is terminated to obtain the trained GCN branch and CNN branch.

[0129] For example, in the first alternating iteration process: the network parameters of the CNN branch are fixed, the GCN branch is trained (the specific training process is as described above and will not be repeated here), the network parameters of the GCN branch are adjusted, and the GCN branch after the first optimization is obtained; the network parameters of the GCN branch after the first optimization are fixed, the CNN branch is trained (the specific training process is as described above and will not be repeated here), the network parameters of the CNN branch are adjusted, and the CNN branch after the first optimization is obtained;

[0130] In the second alternating iteration process: fix the network parameters of the CNN branch after the first optimization, train the GCN branch after the first optimization (the specific training process is as described above and will not be repeated here), adjust the network parameters of the GCN branch after the first optimization, and obtain the GCN branch after the second optimization; fix the network parameters of the GCN branch after the second optimization, train the CNN branch after the first optimization (the specific training process is as described above and will not be repeated here), adjust the network parameters of the CNN branch after the first optimization, and obtain the CNN branch after the second optimization;

[0131] Similarly, the CNN branch and the GCN branch are alternately iterated and trained until the preset iteration conditions are met, and the iterative training is terminated to obtain the final optimized GCN branch and CNN branch.

[0132] The final optimized CNN branch has the ability to aggregate features and can be deployed as a target re-identification network in target re-identification application scenarios to improve the recognition accuracy of target re-identification.

[0133] In an example, the target re-identification network is a vehicle re-identification network, and the vehicle re-identification network can be deployed in a vehicle re-identification scenario.

[0134] In one example, the target re-identification network is a pedestrian re-identification network, and the pedestrian re-identification network can be deployed in a pedestrian re-identification scenario.

[0135] The target re-identification network may also be a network for re-identifying target objects other than vehicles and pedestrians, and is applied to scenarios for re-identifying other target objects, which is not specifically limited in the present disclosure.

[0136] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

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

[0138] Figure 5 FIG. 2 is a block diagram of a target re-identification device according to an embodiment of the present disclosure. Figure 5 As shown, the device 50 includes:

[0139] A feature extraction module 51 is used to extract features of a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network;

[0140] The feature matching module 52 is used to perform feature matching on the first feature with multiple second features included in the feature library to obtain a recognition result corresponding to the target image, wherein the multiple second features are obtained by extracting features from multiple reference images through a target re-recognition network.

[0141] In a possible implementation, the training samples of the object re-identification network include N sample images;

[0142] The device 50 further includes: a network training module; the network training module includes:

[0143] A first feature extraction submodule is used to perform image processing on N sample images through a target re-identification network to obtain a third feature corresponding to each sample image;

[0144] A second feature extraction submodule is used to perform image processing on the N sample images through a graph convolutional network to obtain a fourth feature corresponding to each sample image;

[0145] A first network loss determination submodule, used to determine the first network loss according to the third feature and the fourth feature corresponding to each sample image;

[0146] The first optimization submodule is used to optimize the target re-identification network according to the first network loss.

[0147] In a possible implementation, the second feature extraction submodule is specifically used to:

[0148] Perform hierarchical feature extraction on N sample images through a graph convolutional network to obtain a first local feature and a second local feature corresponding to each sample image;

[0149] The first local feature and the second local feature corresponding to each sample image are fused to obtain a fourth feature corresponding to each sample image.

[0150] In a possible implementation, the first network loss includes a first loss;

[0151] The first network loss determination submodule includes:

[0152] A first classification unit, used to classify the N sample images according to the third feature corresponding to each sample image, and determine a first classification prediction result corresponding to each sample image;

[0153] A second classification unit, used to classify the N sample images according to the fourth feature corresponding to each sample image, and determine a second classification prediction result corresponding to each sample image;

[0154] The first loss determining unit is used to determine the first loss according to the first classification prediction result and the second classification prediction result corresponding to each sample image.

[0155] In a possible implementation, the second classification unit is specifically used to:

[0156] Determine an initial feature connectivity graph corresponding to each sample image according to the fourth feature corresponding to each sample image;

[0157] Using the graph convolutional network, the initial feature connectivity graph corresponding to each sample image is aggregated to obtain the aggregated features corresponding to each sample image;

[0158] According to the aggregated features corresponding to each sample image, the N sample images are classified to determine the second classification prediction result corresponding to each sample image.

[0159] In one possible implementation, the first network loss includes the second loss;

[0160] The first network loss determination submodule includes:

[0161] A first target feature connected graph determining unit, used to determine the first target feature connected graph corresponding to each sample image according to the third feature corresponding to each sample image;

[0162] A second target feature connected graph determining unit, used to determine the second target feature connected graph corresponding to each sample image according to the fourth feature corresponding to each sample image;

[0163] The second loss determination unit is used to determine the second loss according to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each sample image.

[0164] In a possible implementation, the first optimization submodule is specifically configured to:

[0165] The target re-identification network is optimized through the first loss and / or the second loss.

[0166] In a possible implementation, the second target feature connectivity graph determining unit includes:

[0167] A first determining subunit is used to determine the fourth feature corresponding to each sample image as a feature node corresponding to each sample image, so as to obtain N feature nodes;

[0168] A second determining unit is used to determine the P nearest neighbor feature nodes that are closest to the target feature node as the first-level nearest neighbor feature nodes corresponding to the target feature node, wherein the target feature node is a feature node corresponding to a target sample image, and the target sample image is any one of the multiple sample images;

[0169] A third determining unit is used to determine the Q nearest neighbor feature nodes that are closest to each first-level nearest neighbor feature node as the second-level nearest neighbor feature nodes corresponding to the target feature node;

[0170] A fourth determining unit, configured to determine an initial feature connectivity graph corresponding to the target sample image according to the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes;

[0171] The fifth determining unit is used to determine a second target feature connectivity graph corresponding to the target sample image according to the initial feature connectivity graph corresponding to the target sample image.

[0172] A second target feature connected graph determining unit, wherein the initial feature connected graph corresponding to the target sample image includes a first feature node set and a first adjacency matrix;

[0173] The fourth determining unit is specifically configured to:

[0174] According to the target feature node, the N feature nodes are normalized to obtain the normalized N feature nodes;

[0175] According to the normalized N feature nodes including the normalized first-level nearest neighbor feature nodes and the normalized second-level nearest neighbor feature nodes, a first feature node set is formed;

[0176] For the i-th feature node in the first feature node set, determine m nearest neighbor feature nodes that are closest to the i-th feature node from the normalized N feature nodes;

[0177] Determine a feature connection edge between the i-th feature node and the j-th nearest neighbor feature node, wherein the j-th nearest neighbor feature node is a feature node existing in the first feature node set;

[0178] A first adjacency matrix is ​​determined according to the connection relationship corresponding to each feature node in the first feature node set.

[0179] In a possible implementation, the second target feature connectivity graph includes a second feature node set and a second adjacency matrix;

[0180] The fifth determining unit is specifically configured to:

[0181] Adding feature nodes that are not present in the first feature node set among the normalized N feature nodes to the first feature node set to form a second feature node set;

[0182] For a pseudo feature node in the second feature node set, determine a nearest neighbor feature node corresponding to the pseudo feature node in the normalized N feature nodes, wherein the pseudo feature node is any feature node in the normalized N feature nodes that does not exist in the first feature node set;

[0183] Determine a pseudo feature connection edge between the pseudo feature node and the nearest neighbor feature node corresponding to the pseudo feature node;

[0184] A second adjacency matrix is ​​determined according to the connection relationship corresponding to each feature node in the second feature node set.

[0185] In a possible implementation, the training sample also includes a true label corresponding to each sample image, and the second classification prediction result corresponding to each sample image includes a predicted label corresponding to each sample image;

[0186] The network training module also includes:

[0187] A second network loss determination submodule, used to determine the second network loss according to the true label and the predicted label corresponding to each sample image;

[0188] The second optimization submodule is used to optimize the graph convolutional network according to the second network loss.

[0189] In a possible implementation, each reference image corresponds to a label;

[0190] The feature matching module 52 is specifically used for:

[0191] determining a feature similarity between the first feature and each second feature;

[0192] The second feature whose feature similarity is greater than a preset threshold is determined as the target second feature that successfully matches the first feature;

[0193] The label of the reference image corresponding to the second feature of the target is determined as the recognition result.

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

[0195] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0196] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

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

[0198] The electronic device may be provided as a terminal, a server, or a device in other forms.

[0199] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 6 As shown, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.

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

[0201] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone 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 above-mentioned 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.

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

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

[0204] 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, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with 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 operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

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

[0206] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0207] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, 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 assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a complementary metal oxide semiconductor (CMOS) or a charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0208] 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 a wireless network (Wi-Fi), a second generation mobile communication technology (2G), a third generation mobile communication technology (3G), a fourth generation mobile communication technology (4G), a long-term evolution (LTE) of a universal mobile communication technology, a fifth generation mobile communication technology (5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also 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.

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

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

[0211] The present disclosure relates to the field of augmented reality. By acquiring the image information of the target object in the real environment, the relevant features, states and attributes of the target object are detected or identified by various visual related algorithms, so as to obtain an AR effect that combines virtuality and reality and matches the specific application. Exemplarily, the target object may involve the face, limbs, gestures, actions, etc. related to the human body, or markers, markers related to objects, or sand tables, display areas or display items related to venues or places. Visual related algorithms may involve visual positioning, SLAM, three-dimensional reconstruction, image registration, background segmentation, key point extraction and tracking of objects, and position or depth detection of objects. Specific applications may not only involve interactive scenes such as guided tours, navigation, explanations, reconstruction, virtual effect superposition and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, limb beautification, special effects display, virtual model display and other interactive scenes. The relevant features, states and attributes of the target object can be detected or identified by a convolutional neural network. The above-mentioned convolutional neural network is a network model obtained by model training based on a deep learning framework.

[0212] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 7 As shown, the electronic device 1900 may be provided as a server. Figure 7 , 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 an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0213] 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 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OSX TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.

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

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

[0216] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can 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 thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0217] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, 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 can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0218] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0219] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0220] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so 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 boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

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

[0222] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0223] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

[0224] 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. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A target re-identification method, characterized in that: include: Extracting features of a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network; Performing feature matching on the first feature and a plurality of second features included in the feature library to obtain a recognition result corresponding to the target image, wherein the plurality of second features are obtained by extracting features from a plurality of reference images through the target re-recognition network; The training samples of the target re-identification network include sample images; The training method of the target re-identification network is as follows: The target re-identification network performing image processing on the sample images to obtain a third feature corresponding to each of the sample images; Through the graph convolutional network performing image processing on the sample images to obtain a fourth feature corresponding to each of the sample images; Determine a first network loss according to the third feature and the fourth feature corresponding to each of the sample images; Optimizing the target re-identification network according to the first network loss; The first network loss includes a second loss; The determining the first network loss according to the third feature and the fourth feature corresponding to each of the sample images includes: Determine a first target feature connectivity graph corresponding to each of the sample images according to the third feature corresponding to each of the sample images; Determine a second target feature connectivity graph corresponding to each of the sample images according to the fourth feature corresponding to each of the sample images; The second loss is determined according to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each of the sample images.

2. The method according to claim 1, characterized in that The graph convolution network is used to The sample images are processed to obtain a fourth feature corresponding to each of the sample images, including: Through the graph convolutional network Perform hierarchical feature extraction on the sample images to obtain a first local feature and a second local feature corresponding to each of the sample images; The first local feature and the second local feature corresponding to each of the sample images are fused to obtain the fourth feature corresponding to each of the sample images.

3. The method according to claim 1 or 2, characterized in that: The first network loss includes a first loss; The determining the first network loss according to the third feature and the fourth feature corresponding to each of the sample images includes: According to the third feature corresponding to each of the sample images, classify sample images, and determine a first classification prediction result corresponding to each of the sample images; According to the fourth feature corresponding to each of the sample images, classify the sample images, and determine a second classification prediction result corresponding to each of the sample images; The first loss is determined according to the first classification prediction result and the second classification prediction result corresponding to each of the sample images.

4. The method according to claim 3, characterized in that According to the fourth feature corresponding to each of the sample images, The method further comprises: classifying sample images and determining a second classification prediction result corresponding to each sample image, comprising: Determine an initial feature connectivity graph corresponding to each of the sample images according to the fourth feature corresponding to each of the sample images; Using the graph convolutional network, performing feature aggregation on the initial feature connectivity graph corresponding to each of the sample images to obtain aggregated features corresponding to each of the sample images; According to the aggregated features corresponding to each of the sample images, The sample images are classified to determine the second classification prediction result corresponding to each of the sample images.

5. The method according to claim 3, characterized in that: The step of optimizing the target re-identification network according to the first network loss includes: The target re-identification network is optimized by using the first loss and / or the second loss.

6. The method according to claim 1, characterized in that The determining, according to the fourth feature corresponding to each of the sample images, a second target feature connectivity graph corresponding to each of the sample images, comprises: The fourth feature corresponding to each of the sample images is determined as a feature node corresponding to each of the sample images, and feature nodes; The node closest to the target feature node nearest neighbor feature nodes, determined as the first-level nearest neighbor feature nodes corresponding to the target feature node, wherein the target feature node is a feature node corresponding to a target sample image, and the target sample image is any one of the multiple sample images; The nearest neighbor feature node to each of the first-level nearest neighbor feature nodes nearest neighbor feature nodes, and determining them as the second-level nearest neighbor feature nodes corresponding to the target feature node; Determine an initial feature connectivity graph corresponding to the target sample image according to the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes; The second target feature connectivity graph corresponding to the target sample image is determined according to the initial feature connectivity graph corresponding to the target sample image.

7. The method according to claim 6, characterized in that The initial feature connectivity graph corresponding to the target sample image includes a first feature node set and a first adjacency matrix; The determining, according to the first-level nearest neighbor feature nodes and the second-level nearest neighbor feature nodes, an initial feature connectivity graph corresponding to the target sample image comprises: According to the target feature node, The feature nodes are normalized to obtain the normalized feature nodes; According to the normalized The feature nodes include the normalized first-level nearest neighbor feature nodes and the normalized second-level nearest neighbor feature nodes, forming the first feature node set; For the first characteristic node set feature nodes, after the normalization The feature nodes are determined in the The closest feature node Nearest neighbor feature nodes; In the said The feature node and The feature connection edges are determined between the nearest neighbor feature nodes, wherein the The nearest neighbor feature node is a feature node existing in the first feature node set; The first adjacency matrix is ​​determined according to the connection relationship corresponding to each of the feature nodes in the first feature node set.

8. The method according to claim 7, characterized in that The second target feature connectivity graph includes a second feature node set and a second adjacency matrix; The determining, according to the initial feature connectivity graph corresponding to the target sample image, the second target feature connectivity graph corresponding to the target sample image comprises: The normalized feature nodes that do not exist in the first feature node set are added to the first feature node set to form the second feature node set; For the pseudo feature nodes in the second feature node set, after the normalization The nearest neighbor feature node corresponding to the pseudo feature node is determined from the feature nodes, wherein the pseudo feature node is the normalized any feature node among the feature nodes that does not exist in the first feature node set; Determining a pseudo feature connection edge between the pseudo feature node and a nearest neighbor feature node corresponding to the pseudo feature node; The second adjacency matrix is ​​determined according to the connection relationship corresponding to each of the feature nodes in the second feature node set.

9. The method according to claim 4, characterized in that The training sample also includes a true label corresponding to each of the sample images, and the second classification prediction result corresponding to each of the sample images includes a predicted label corresponding to each of the sample images; The training method of the target re-identification network also includes: Determine a second network loss according to the true label and the predicted label corresponding to each of the sample images; The graph convolutional network is optimized according to the second network loss.

10. The method according to claim 1 or 2, characterized in that: Each reference image has a corresponding label; The step of performing feature matching on the first feature and a plurality of second features included in the feature library to obtain a recognition result corresponding to the target image includes: determining a feature similarity between the first feature and each of the second features; Determine the second feature whose feature similarity is greater than a preset threshold as a target second feature that successfully matches the first feature; The label of the reference image corresponding to the second feature of the target is determined as the recognition result.

11. A target re-identification device, characterized in that: include: A feature extraction module, used to extract features of a target image through a target re-identification network to obtain a first feature corresponding to the target image, wherein the target re-identification network is obtained by auxiliary training based on a graph convolutional network; A feature matching module, used for matching the first feature with a plurality of second features included in a feature library to obtain a recognition result corresponding to the target image, wherein the plurality of second features are obtained by extracting features from a plurality of reference images through the target re-recognition network; The training samples of the target re-identification network include sample images; The device also includes a network training module, and the network training module includes: The first feature extraction submodule is used to identify the target through the target re-identification network performing image processing on the sample images to obtain a third feature corresponding to each of the sample images; The second feature extraction submodule is used to extract the performing image processing on the sample images to obtain a fourth feature corresponding to each of the sample images; A first network loss determination submodule, configured to determine a first network loss according to the third feature and the fourth feature corresponding to each of the sample images; A first optimization submodule, configured to optimize the target re-identification network according to the first network loss; The first network loss includes a second loss; The first network loss determination submodule includes: A first target feature connected graph determining unit, configured to determine a first target feature connected graph corresponding to each of the sample images according to the third feature corresponding to each of the sample images; A second target feature connected graph determining unit, configured to determine a second target feature connected graph corresponding to each of the sample images according to the fourth feature corresponding to each of the sample images; The second loss determination unit is used to determine the second loss according to the first target feature connectivity graph and the second target feature connectivity graph corresponding to each of the sample images.

12. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 10.

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