Data processing method, device, equipment and computer storage medium

By performing feature enhancement and subspace alignment of the source and target domain sample data, the problem of the accuracy of the pedestrian re-identification model deteriorates after the migration scenario is solved, and the robustness and recognition accuracy of the model are improved.

CN114429643BActive Publication Date: 2025-08-08MIGU CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, after the pedestrian re-identification model is moved from the original scene to the new scene, the recognition accuracy rate has dropped significantly.

Method used

By enhancing the source domain and target domain sample data, determining the weight matrix, amplifying the source domain sample characteristics close to the target domain sample distribution, weakening the characteristics with large distribution differences, and aligning the source domain and target domain subspace, and determining the target domain sample label based on the source domain sample label.

Benefits of technology

The robustness and accuracy of the pedestrian re-identification model after migration scenarios are improved, and good recognition performance is maintained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114429643B_ABST
    Figure CN114429643B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the technical field of computer data processing and discloses a data processing method, which includes: performing feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determining a weight matrix corresponding to the enhanced source domain sample data based on the distance between the enhanced source domain sample data and the enhanced target domain sample data; determining a source domain subspace based on the weight matrix and the enhanced source domain sample data; determining a target domain subspace based on the enhanced target domain sample data; aligning the source domain subspace and the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; and determining a sample label corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data, and the sample label corresponding to the source domain sample data. Through the above-mentioned method, the embodiment of the present invention improves the accuracy of pedestrian re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of computer data processing, and in particular to a data processing method, apparatus, device, and computer storage medium. Background Art

[0002] Person re-identification (PIR) utilizes computer vision algorithms to match pedestrian images or videos across multiple devices. Given a query image, the technology aims to retrieve the same person from the image libraries of different surveillance devices. Due to the differences between different cameras and the susceptibility of pedestrian appearance to factors such as clothing, scale, occlusion, posture, and viewing angle, PIR has become a hot topic in the field of computer vision, both highly valuable and challenging.

[0003] The inventors of the present application discovered during the implementation of the embodiments of the present application that in the prior art, after the pedestrian re-identification model in the original scene was migrated to a new scene, the performance of the pedestrian re-identification model decreased significantly, resulting in inaccurate recognition results. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a data processing method, apparatus, device, and computer storage medium for solving the problem of low accuracy of pedestrian re-identification in the prior art.

[0005] According to one aspect of an embodiment of the present invention, a data processing method is provided, the method comprising:

[0006] Performing feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data;

[0007] Determine a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data;

[0008] Determine a source domain subspace according to the weight matrix and the enhanced source domain sample data;

[0009] Determine a target domain subspace according to the enhanced target domain sample data;

[0010] Aligning the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data;

[0011] The sample labels corresponding to the target domain sample data are determined according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0012] In an optional manner, the source domain sample data includes a plurality of source domain samples; the target domain sample data includes a plurality of target domain samples; and the method further includes:

[0013] Determine the similarity between each source domain sample and each target domain sample and a sample set according to a Gaussian kernel function; the sample set includes all source domain samples and all target domain samples;

[0014] Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

[0015] In an optional manner, the method further includes:

[0016] respectively determining the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples;

[0017] The weight value corresponding to each of the enhanced source domain samples is determined according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

[0018] In an optional manner, the method further includes:

[0019] Determine a covariance matrix according to the weight matrix and the enhanced source domain sample data;

[0020] Performing eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues;

[0021] The source domain subspace is determined according to the multiple eigenvalues.

[0022] In an optional manner, the method further includes:

[0023] The covariance matrix is determined according to the following formula:

[0024]

[0025] Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

[0026] In an optional manner, the method further includes:

[0027] Sorting the plurality of eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence;

[0028] The source domain subspace is determined according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

[0029] In an optional manner, the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; the method further includes:

[0030] Obtaining image data to be identified corresponding to the target scene;

[0031] The image data to be identified is input into a pedestrian re-identification model corresponding to the target scene to obtain a pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

[0032] According to another aspect of an embodiment of the present invention, there is provided a data processing apparatus, including:

[0033] An enhancement module is used to perform feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data;

[0034] A first determining module is configured to determine a weight matrix corresponding to the enhanced source domain sample data according to a distance between the enhanced source domain sample data and the enhanced target domain sample data;

[0035] A second determining module is configured to determine a source domain subspace according to the weight matrix and the enhanced source domain sample data;

[0036] A third determination module is configured to determine a target domain subspace based on the enhanced target domain sample data;

[0037] an alignment module, configured to align the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data;

[0038] The fourth determining module is configured to determine the sample labels corresponding to the target domain sample data according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0039] According to another aspect of an embodiment of the present invention, there is provided a data processing device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0040] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the data processing method.

[0041] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a data processing device to execute the operation of the data processing method.

[0042] The embodiment of the present invention performs feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determines a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data, wherein in the weight matrix, the closer the source domain sample is to the target domain sample, the higher the weight is, thereby amplifying the features of the source domain samples that are close to the target domain sample distribution and weakening the features of the source domain samples that are very different from the target domain sample distribution; determines a source domain subspace according to the weight matrix and the enhanced source domain sample data; determines a target domain subspace according to the enhanced target domain sample data; and separates the source domain subspace and the target domain subspace. Domain subspaces are aligned to obtain aligned source domain sample data and aligned target domain sample data; finally, the sample labels corresponding to the target domain sample data are determined based on the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data, wherein the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a pedestrian re-identification model corresponding to the original scene, and the target domain sample data and the sample labels corresponding to the target domain sample data are used to train a pedestrian re-identification model corresponding to the target scene, thereby enabling the model to maintain good performance after being transplanted from the original scene to the target scene, thereby improving the robustness of the pedestrian re-identification model and the accuracy of pedestrian re-identification.

[0043] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the drawings. In the drawings:

[0045] Figure 1 A schematic diagram showing a flow chart of a data processing method provided by an embodiment of the present invention;

[0046] Figure 2 A schematic structural diagram of a data processing device provided by an embodiment of the present invention is shown;

[0047] Figure 3 A schematic structural diagram of a data processing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0049] Figure 1 The flowchart of the data processing method provided by the embodiment of the present invention is shown, and the method is executed by a computer processing device. The computer processing device may include a mobile phone, a notebook computer, etc. Figure 1 As shown, the method includes the following steps:

[0050] Step 10: Perform feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data.

[0051] In one embodiment of the present invention, the source domain sample data may be training data for a person re-identification model corresponding to historical scenarios, and the target domain sample data may be training data for a person re-identification model corresponding to new scenarios. The source domain sample data includes multiple source domain samples, and the target domain sample data includes multiple target domain samples. The source domain samples and the target domain samples may be image feature samples, each of which includes multiple image feature elements.

[0052] In one embodiment of the present invention, let D s =(x1,x2,...,x m ) T , x i ∈R 1×D , where D s represents the source domain sample data, x i Denotes a source domain sample in the source domain sample data. Let D t =(y1,y2,...,y n ) T ,y j ∈R 1×D , where D t represents the target domain sample data, y j represents a target domain sample in the target domain sample data. The source domain sample x i With D s ∪D t The similarity between all samples in is taken as x i The new feature representation of . The similarity can be determined based on the kernel mapping function.

[0053] In yet another embodiment of the present invention, step 10 further includes:

[0054] Step 101: determining the similarity between each source domain sample and each target domain sample and a sample set according to a Gaussian kernel function; the sample set includes all source domain samples and all target domain samples.

[0055] In one embodiment of the present invention, a Gaussian kernel function k(x,y)=exp(-γ||xy|| 2 ) is used as the similarity between the two samples. If the i-th enhanced source domain sample or enhanced target domain sample is represented by in, μ i ∈(D s ∪D t ),δ j ∈(D s ∪D t ).

[0056] Step 102: Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

[0057] In one embodiment of the present invention, represents the enhanced source domain sample data, represents the i-th enhanced source domain sample in the enhanced source domain data, where the j-th element in the i-th enhanced source domain sample is calculated as follows:

[0058]

[0059] Right now

[0060] make in, represents the enhanced target domain sample data, represents the i-th enhanced target domain sample in the enhanced target domain data, where the j-th element in the i-th enhanced target domain sample is calculated as follows:

[0061]

[0062] Right now

[0063] Step 20: Determine a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data.

[0064] In one embodiment of the present invention, in order to amplify the features of source domain samples that are close to the target domain samples in distribution during transfer learning and weaken the features of source domain samples that are very different from the target domain samples in distribution, the weights of the enhanced source domain samples that are close to the enhanced target domain samples can be set larger. That is, let W = [w1, w2, ..., w m ],W∈R 1×m Represents the weight of the source domain sample, then the enhanced source domain sample The weight w i The larger it is, the closer the distribution of the enhanced source domain samples is to the distribution of the enhanced target domain samples, and thus the more accurate the labeling of the target domain samples according to the labels corresponding to the source domain samples is.

[0065] In one embodiment of the present invention, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; step 20 further includes:

[0066] Step 201: Determine the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples.

[0067] In one embodiment of the present invention, the enhanced target domain samples and enhanced source domain samples The distance between is defined as follows:

[0068]

[0069] According to the above definition, the distance between each pair of enhanced target domain samples and enhanced source domain samples is calculated, and the distance matrix is obtained as follows:

[0070]

[0071] Calculate the minimum distance between each sample in the enhanced target domain and all samples in the enhanced source domain, that is, the minimum value of each row of the matrix S, expressed as α = [α1, α2, ..., α n ] T ∈R n×1 ,in,

[0072] Step 202: Determine the weight value corresponding to each of the enhanced source domain samples according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

[0073] In one embodiment of the present invention, the weight of each enhanced source domain sample can be expressed as:

[0074]

[0075] Among them, w 0 is the initial weight, which is set to 1 in the embodiment of the present invention. The calculation rule of φ(a) is as follows:

[0076]

[0077] From the weight expression formula, we can see that if d ji It is equal to the minimum value of the distance between sample j in the enhanced target domain and all samples in the enhanced source domain. That is, the distribution of the i-th sample in the enhanced source domain and the j-th sample in the enhanced target domain is closest, then the weight of the i-th enhanced source domain sample will increase.

[0078] Step 30: Determine a source domain subspace according to the weight matrix and the enhanced source domain sample data.

[0079] In one embodiment of the present invention, the source domain average value can be determined based on each enhanced source domain sample and the weight matrix, the covariance matrix corresponding to the enhanced source domain sample data can be determined based on the source domain average value, and then eigenvalue decomposition is performed based on the covariance matrix. According to the decomposition result, the maximum preset number of eigenvectors are selected to form the source domain subspace.

[0080] Therefore, in yet another embodiment of the present invention, step 30 further includes:

[0081] Step 301: Determine a covariance matrix based on the weight matrix and the enhanced source domain sample data.

[0082] In one embodiment of the present invention, the weighted sample values corresponding to each enhanced source domain sample are calculated according to the weight matrix, and then all the weighted sample values are normalized to obtain the average sample value corresponding to all enhanced source domain samples. The covariance matrix is determined according to the distance between the average sample value and each enhanced source domain sample and the weight corresponding to the enhanced source domain sample.

[0083] Therefore, in another embodiment of the present invention, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; and step 301 further includes:

[0084] Step 3011: Determine the covariance matrix according to the following formula:

[0085]

[0086]

[0087] Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

[0088] Step 302: Perform eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues.

[0089] Step 303: Determine the source domain subspace according to the multiple eigenvalues.

[0090] In one embodiment of the present invention, in order to make the source domain subspace more capable of representing the characteristics of the source domain sample data, the eigenvectors corresponding to the largest preset number of eigenvalues among the eigenvalues may be constructed into the source domain subspace.

[0091] In one embodiment of the present invention, step 303 further includes:

[0092] Step 3031: Sort the multiple eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence.

[0093] Step 3032: Determine the source domain subspace according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

[0094] In one embodiment of the present invention, the source domain subspace is obtained, denoted as P s ∈R (m+n)×d .

[0095] Step 40: Determine the target domain subspace according to the enhanced target domain sample data.

[0096] In one embodiment of the present invention, the principal component analysis method can be used to calculate the enhanced target domain sample data to obtain the target domain subspace, which is denoted as P t ∈R (m+n)×d .

[0097] Step 50: Align the source domain subspace and the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data.

[0098] In one embodiment of the present invention, a linear transformation matrix M can be found to align the source domain subspace and the target domain subspace. The transformation matrix M can be obtained by minimizing the following formula:

[0099]

[0100] Since the Frobenius norm is invariant to orthogonal operations, the above formula can be rewritten as follows:

[0101]

[0102] According to the rewritten formula, the optimal solution M can be obtained as follows:

[0103]

[0104] Finally, the source domain subspace and the target domain subspace are aligned according to M to obtain the aligned source domain sample data, which is expressed as And the aligned target domain sample data is expressed as

[0105] Step 60: Determine the sample labels corresponding to the target domain sample data according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0106] In one embodiment of the present invention, the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data can be input into a preset classifier, which outputs the sample labels corresponding to the input target domain sample data. The classifier can be a nearest neighbor classifier.

[0107] In another embodiment of the present invention, the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; after step 60, the following further includes:

[0108] Step 601: Obtain image data to be recognized corresponding to the target scene.

[0109] In one embodiment of the present invention, the target scene may be a scene in which a target to be identified exists, and the target to be identified may be a pedestrian or the like.

[0110] Step 602: Input the image data to be identified into the pedestrian re-identification model corresponding to the target scene to obtain the pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

[0111] In one embodiment of the present invention, the sample labels corresponding to the same pedestrian in the original scene and the target scene are the same. Therefore, through the aforementioned steps, the target domain sample data and the corresponding sample labels are determined based on the source domain sample data corresponding to the original scene and the sample labels corresponding to the source domain sample data, thereby migrating the training results of the pedestrian re-identification model in the original scene to the target scene, thereby improving the accuracy of pedestrian re-identification and the robustness of the pedestrian re-identification model.

[0112] The data processing method provided by the embodiment of the present invention performs feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determines a weight matrix corresponding to the enhanced source domain sample data based on the distance between the enhanced source domain sample data and the enhanced target domain sample data, wherein the closer the source domain sample is to the target domain sample, the higher the weight is, thereby amplifying the features of the source domain samples with a distribution close to that of the target domain samples and weakening the features of the source domain samples with a distribution very different from that of the target domain samples; determines a source domain subspace based on the weight matrix and the enhanced source domain sample data; determines a target domain subspace based on the enhanced target domain sample data; aligns the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; finally, determines the sample labels corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data. Therefore, the data processing method provided by the embodiment of the present invention improves the robustness of the pedestrian re-identification model, enables the model to maintain good performance even after being transplanted to new scenarios, and can improve the accuracy of pedestrian re-identification.

[0113] Figure 2 FIG. 1 shows a schematic diagram of the structure of a data processing device provided by an embodiment of the present invention. Figure 2 As shown, the apparatus 70 includes: an enhancement module 701 , a first determination module 702 , a second determination module 703 , a third determination module 704 , an alignment module 705 and a fourth determination module 706 .

[0114] The enhancement module 701 is configured to perform feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data.

[0115] A first determining module 702 is configured to determine a weight matrix corresponding to the enhanced source domain sample data according to a distance between the enhanced source domain sample data and the enhanced target domain sample data;

[0116] A second determining module 703 is configured to determine a source domain subspace according to the weight matrix and the enhanced source domain sample data;

[0117] A third determining module 704 is configured to determine a target domain subspace based on the enhanced target domain sample data;

[0118] An alignment module 705 is configured to align the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data;

[0119] The fourth determining module 706 is configured to determine the sample labels corresponding to the target domain sample data according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0120] In an optional manner, the source domain sample data includes a plurality of source domain samples; the target domain sample data includes a plurality of target domain samples;

[0121] The enhancement module 701 is further configured to: determine the similarity between each of the source domain samples and each of the target domain samples and a sample set according to a Gaussian kernel function; the sample set includes all of the source domain samples and all of the target domain samples;

[0122] Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

[0123] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples;

[0124] The first determining module 702 is further configured to: respectively determine the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples;

[0125] The weight value corresponding to each of the enhanced source domain samples is determined according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

[0126] In an optional manner, the first determining module 702 is further configured to:

[0127] Determine a covariance matrix according to the weight matrix and the enhanced source domain sample data;

[0128] Performing eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues;

[0129] The source domain subspace is determined according to the multiple eigenvalues.

[0130] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; and the first determining module 702 is further configured to:

[0131] The covariance matrix is determined according to the following formula:

[0132]

[0133] Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

[0134] In an optional manner, the first determining module 702 is further configured to:

[0135] Sorting the plurality of eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence;

[0136] The source domain subspace is determined according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

[0137] In an optional manner, the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; and the fourth determining module 70 is further configured to:

[0138] Obtaining image data to be identified corresponding to the target scene;

[0139] The image data to be identified is input into a pedestrian re-identification model corresponding to the target scene to obtain a pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

[0140] The data processing device provided by the embodiment of the present invention performs feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determines a weight matrix corresponding to the enhanced source domain sample data based on the distance between the enhanced source domain sample data and the enhanced target domain sample data, wherein the closer the source domain sample is to the target domain sample, the higher the weight is, thereby amplifying the features of the source domain samples with a distribution close to that of the target domain sample and weakening the features of the source domain samples with a distribution very different from that of the target domain sample; determines a source domain subspace based on the weight matrix and the enhanced source domain sample data; determines a target domain subspace based on the enhanced target domain sample data; aligns the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; finally, determines a sample label corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data, and the sample label corresponding to the source domain sample data, thereby improving the robustness of the pedestrian re-identification model provided by the embodiment of the present invention, enabling the model to maintain good performance even after being transplanted to a new scenario, thereby improving the accuracy of pedestrian re-identification.

[0141] Figure 3 The diagram shows the structure of a data processing device provided by an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the data processing device.

[0142] like Figure 3 As shown, the data processing device may include: a processor (processor) 802 , a communications interface (Communications Interface) 804 , a memory (memory) 806 , and a communication bus 808 .

[0143] Processor 802, communication interface 804, and memory 806 communicate with each other via a communication bus 808. Communication interface 804 is used to communicate with other devices, such as clients or other server network elements. Processor 802 is used to execute program 810, which may specifically perform the steps described above in the data processing method embodiment.

[0144] Specifically, the program 810 may include program code including computer-executable instructions.

[0145] Processor 802 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a data processing device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0146] The memory 806 is used to store the program 810. The memory 806 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0147] The program 810 can be specifically called by the processor 802 to enable the data processing device to perform the following operations:

[0148] Performing feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data;

[0149] Determine a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data;

[0150] Determine a source domain subspace according to the weight matrix and the enhanced source domain sample data;

[0151] Determine a target domain subspace according to the enhanced target domain sample data;

[0152] Aligning the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data;

[0153] The sample labels corresponding to the target domain sample data are determined according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0154] In an optional manner, the source domain sample data includes multiple source domain samples; the target domain sample data includes multiple target domain samples; the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0155] Determine the similarity between each source domain sample and each target domain sample and a sample set according to a Gaussian kernel function; the sample set includes all source domain samples and all target domain samples;

[0156] Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

[0157] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0158] respectively determining the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples;

[0159] The weight value corresponding to each of the enhanced source domain samples is determined according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

[0160] In an optional manner, the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0161] Determine a covariance matrix according to the weight matrix and the enhanced source domain sample data;

[0162] Performing eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues;

[0163] The source domain subspace is determined according to the multiple eigenvalues.

[0164] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0165] The covariance matrix is determined according to the following formula:

[0166]

[0167] Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

[0168] In an optional manner, the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0169] Sorting the plurality of eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence;

[0170] The source domain subspace is determined according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

[0171] In an optional manner, the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; the program 810 is called by the processor 802 to enable the data processing device to perform the following operations:

[0172] Obtaining image data to be identified corresponding to the target scene;

[0173] The image data to be identified is input into a pedestrian re-identification model corresponding to the target scene to obtain a pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

[0174] The data processing device provided by the embodiment of the present invention performs feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determines a weight matrix corresponding to the enhanced source domain sample data based on the distance between the enhanced source domain sample data and the enhanced target domain sample data, wherein the closer the source domain sample is to the target domain sample, the higher the weight is, thereby amplifying the features of the source domain samples with a distribution close to that of the target domain samples and weakening the features of the source domain samples with a distribution very different from that of the target domain samples; determines a source domain subspace based on the weight matrix and the enhanced source domain sample data; determines a target domain subspace based on the enhanced target domain sample data; aligns the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; finally, determines a sample label corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data, and the sample label corresponding to the source domain sample data, thereby improving the robustness of the pedestrian re-identification model provided by the embodiment of the present invention, enabling the model to maintain good performance even after being transplanted to a new scenario, thereby improving the accuracy of pedestrian re-identification.

[0175] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a data processing device, the data processing device executes the data processing method in any of the above method embodiments.

[0176] The executable instructions can be specifically used to cause the data processing device to perform the following operations:

[0177] Performing feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data;

[0178] Determine a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data;

[0179] Determine a source domain subspace according to the weight matrix and the enhanced source domain sample data;

[0180] Determine a target domain subspace according to the enhanced target domain sample data;

[0181] Aligning the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data;

[0182] The sample labels corresponding to the target domain sample data are determined according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data.

[0183] In an optional manner, the source domain sample data includes a plurality of source domain samples; the target domain sample data includes a plurality of target domain samples; and the executable instructions enable the data processing device to perform the following operations:

[0184] Determine the similarity between each source domain sample and each target domain sample and a sample set according to a Gaussian kernel function; the sample set includes all source domain samples and all target domain samples;

[0185] Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

[0186] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; and the executable instructions cause the data processing device to perform the following operations:

[0187] respectively determining the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples;

[0188] The weight value corresponding to each of the enhanced source domain samples is determined according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

[0189] In an optional manner, the executable instructions cause the data processing device to perform the following operations:

[0190] Determine a covariance matrix according to the weight matrix and the enhanced source domain sample data;

[0191] Performing eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues;

[0192] The source domain subspace is determined according to the multiple eigenvalues.

[0193] In an optional manner, the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; and the executable instructions cause the data processing device to perform the following operations:

[0194] The covariance matrix is determined according to the following formula:

[0195]

[0196] Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

[0197] In an optional manner, the executable instructions cause the data processing device to perform the following operations:

[0198] Sorting the plurality of eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence;

[0199] The source domain subspace is determined according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

[0200] In an optional manner, the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; and the executable instructions enable the data processing device to perform the following operations:

[0201] Obtaining image data to be identified corresponding to the target scene;

[0202] The image data to be identified is input into a pedestrian re-identification model corresponding to the target scene to obtain a pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

[0203] The data processing device provided by the embodiment of the present invention performs feature enhancement on source domain sample data and target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; determines a weight matrix corresponding to the enhanced source domain sample data based on the distance between the enhanced source domain sample data and the enhanced target domain sample data, wherein the closer the source domain sample is to the target domain sample, the higher the weight is, thereby amplifying the features of the source domain samples with a distribution close to that of the target domain sample and weakening the features of the source domain samples with a distribution very different from that of the target domain sample; determines a source domain subspace based on the weight matrix and the enhanced source domain sample data; determines a target domain subspace based on the enhanced target domain sample data; aligns the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; finally, determines a sample label corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data, and the sample label corresponding to the source domain sample data, thereby improving the robustness of the pedestrian re-identification model provided by the embodiment of the present invention, enabling the model to maintain good performance even after being transplanted to a new scenario, thereby improving the accuracy of pedestrian re-identification.

[0204] An embodiment of the present invention provides a data processing device for executing the above data processing method.

[0205] An embodiment of the present invention provides a computer program, which can be called by a processor to enable a data processing device to execute the data processing method in any of the above method embodiments.

[0206] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are run on a computer, the computer executes the data processing method in any of the above method embodiments.

[0207] The algorithm or demonstration provided herein are not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems may also be used together with the teachings based on this. According to the above description, it is apparent that the structure required for constructing this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.

[0208] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0209] Similarly, it should be understood that in order to streamline the present invention and facilitate understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0210] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed so far can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0211] It should be noted that the above embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by a person skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A data processing method, characterized in that: The method comprises: Performing feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; Determine a weight matrix corresponding to the enhanced source domain sample data according to the distance between the enhanced source domain sample data and the enhanced target domain sample data; Determine a source domain subspace according to the weight matrix and the enhanced source domain sample data; Determine a target domain subspace according to the enhanced target domain sample data; Aligning the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; Determine the sample labels corresponding to the target domain sample data according to the aligned source domain sample data, the aligned target domain sample data, and the sample labels corresponding to the source domain sample data; the source domain sample data and the sample labels corresponding to the source domain sample data are used to train a person re-identification model corresponding to the original scene; Obtain image data to be identified corresponding to a target scene; input the image data to be identified into a person re-identification model corresponding to the target scene to obtain a pedestrian recognition result corresponding to the image data to be identified; wherein the person re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

2. The method according to claim 1, characterized in that The source domain sample data includes a plurality of source domain samples; the target domain sample data includes a plurality of target domain samples; and the feature enhancement of the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data includes: Determine the similarity between each source domain sample and each target domain sample and a sample set according to a Gaussian kernel function; the sample set includes all source domain samples and all target domain samples; Feature enhancement is performed on the source domain sample data and the target domain sample data according to the similarity to obtain the enhanced source domain sample data and the enhanced target domain sample data.

3. The method according to claim 1, characterized in that The determining, according to the distance between the enhanced source domain sample and the enhanced target domain sample, a weight matrix corresponding to the enhanced source domain sample data includes: respectively determining the minimum value of the distance between each of the enhanced target domain samples and all the enhanced source domain samples; The weight value corresponding to each of the enhanced source domain samples is determined according to the minimum value and the distance between each of the enhanced source domain samples and each of the enhanced target domain samples to obtain the weight matrix.

4. The method according to claim 1, wherein The determining of the source domain subspace according to the weight matrix and the enhanced source domain sample data includes: Determine a covariance matrix according to the weight matrix and the enhanced source domain sample data; Performing eigenvalue decomposition according to the covariance matrix to obtain multiple eigenvalues; The source domain subspace is determined according to the multiple eigenvalues.

5. The method according to claim 4, characterized in that The enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; and determining a covariance matrix according to the weight matrix and the enhanced source domain sample data includes: The covariance matrix is determined according to the following formula: Wherein, C is the covariance matrix; m is the number of the enhanced source domain samples; i is the sequence number of the enhanced source domain sample; is the i-th enhanced source domain sample; w i for The corresponding weight value in the weight matrix.

6. The method according to claim 4, characterized in that The determining the source domain subspace according to the eigenvalues includes: Sorting the plurality of eigenvalues in descending order of eigenvalues to obtain an eigenvalue sequence; The source domain subspace is determined according to the eigenvectors corresponding to the top n eigenvalues in the eigenvalue sequence; n is a positive integer.

7. A data processing device, characterized in that: The device comprises: An enhancement module is configured to perform feature enhancement on the source domain sample data and the target domain sample data to obtain enhanced source domain sample data and enhanced target domain sample data; the enhanced source domain sample data includes a plurality of enhanced source domain samples; the enhanced target domain sample data includes a plurality of enhanced target domain samples; A first determining module is configured to determine a weight matrix corresponding to the enhanced source domain sample data according to a distance between the enhanced source domain sample data and the enhanced target domain sample data; A second determining module is configured to determine a source domain subspace according to the weight matrix and the enhanced source domain sample data; A third determination module is configured to determine a target domain subspace based on the enhanced target domain sample data; an alignment module, configured to align the source domain subspace with the target domain subspace to obtain aligned source domain sample data and aligned target domain sample data; The fourth determination module is used to determine the sample labels corresponding to the target domain sample data based on the aligned source domain sample data, the aligned target domain sample data and the sample labels corresponding to the source domain sample data; the source domain sample data and the sample labels corresponding to the source domain sample data are used to train the pedestrian re-identification model corresponding to the original scene; obtain the image data to be identified corresponding to the target scene; input the image data to be identified into the pedestrian re-identification model corresponding to the target scene to obtain the pedestrian recognition result corresponding to the image data to be identified; wherein, the pedestrian re-identification model corresponding to the target scene is trained based on the target domain sample data and the sample labels corresponding to the target domain sample data.

8. A data processing device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The storage medium stores at least one executable instruction, and when the executable instruction is executed on a data processing device, the data processing device executes the operation of the data processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image classification model processing method, device, and storage medium

    CN109522946A