CN113989325A - Multi-target matching algorithm based on matrix maximum number - Google Patents

Multi-target matching algorithm based on matrix maximum number Download PDF

Info

Publication number
CN113989325A
CN113989325A CN202111216075.XA CN202111216075A CN113989325A CN 113989325 A CN113989325 A CN 113989325A CN 202111216075 A CN202111216075 A CN 202111216075A CN 113989325 A CN113989325 A CN 113989325A
Authority
CN
China
Prior art keywords
matching
matrix
target
maximum number
similarity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111216075.XA
Other languages
Chinese (zh)
Inventor
马也驰
华炜
张顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202111216075.XA priority Critical patent/CN113989325A/en
Publication of CN113989325A publication Critical patent/CN113989325A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/292Multi-camera tracking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a multi-target matching algorithm based on matrix maximum number, firstly converting A-B matching scores into A-B two-dimensional similarity matrix M and maintaining a result container R; then find the "maximum number" N of the two-dimensional similarity matrix Mij(ii) a Then, the maximum number N in the two-dimensional similarity matrix M is usedijDeleting all the values of the ith row and the jth column to form a new two-dimensional similarity matrix M, and adding the maximum number NijAnd its row and column valuesForming a matching pair and outputting the matching pair to a result container R; and finally, when the number of rows and columns of the new two-dimensional similarity matrix is less than or equal to 1 or the matching logarithm in the container R is equal to K, completing the multi-target matching. The method firstly solves the multi-target matching problem based on the similarity, and improves the efficiency compared with other multi-target matching methods.

Description

Multi-target matching algorithm based on matrix maximum number
Technical Field
The invention belongs to the technical field of multi-target tracking, target re-identification and multi-target matching, and particularly relates to a multi-target matching algorithm based on the maximum number of matrixes.
Background
With the rapid development of computer vision in the field of artificial intelligence, in the fields of monitoring and unmanned driving, multi-target tracking of a single camera and a target re-identification algorithm across cameras become more and more important, in the overall framework of multi-target tracking and target re-identification, a multi-target matching algorithm is an important ring influencing the efficiency of the overall tracking and re-identification algorithm, the efficiency of the multi-target matching algorithm is improved, namely the frame rate of multi-target tracking and the efficiency of target re-identification can be greatly improved, and the realization of subsequent algorithms is greatly influenced. At the present stage, the multi-target matching algorithm which is efficient and related to the matching similarity is less.
Disclosure of Invention
The invention aims to provide a multi-target matching algorithm based on the maximum number of matrixes in order to overcome the defects of the prior art.
The purpose of the invention is realized by the following technical scheme: a multi-target matching algorithm based on matrix 'maximum number' comprises the following steps:
1) inputting data: acquiring two groups of data through two acquisition devices, and respectively carrying out target detection on the two groups of data to obtain two corresponding groups of target detection results; one group of target detection results comprise A targets to be matched, and the other group of target detection results comprise B targets to be matched; respectively extracting the features of the two groups of targets to be matched to obtain a feature vector of each target to be matched; and pairwise matching the targets to be matched in different groups, and calculating similarity scores according to the feature vectors to obtain A × B matched pairs and similarity scores thereof, wherein the similarity scores are between [0,1 ].
2) Converting the A x B similarity scores into A x B two-dimensional similarity matrix M and maintaining a result container R;
3) finding all the "maximum number" N of the two-dimensional similarity matrix MijThe maximum number of the matrix is the number of the maximum value of the row and the column of the matrix; i, j representi rows and j columns, 0<i≤A,0<j≤B;
4) All the maximum number N in the two-dimensional similarity matrix M found in the step 3)ijDeleting the ith row and the jth column to form a new two-dimensional similarity matrix M, wherein the rows and columns of the new two-dimensional similarity matrix are A and B respectively to obtain a matching pair [ i, j, N ]ij]And output to a result container R, where A<A,B*<B;
5) Outputting K groups of matching pairs and corresponding similarity scores; wherein 0< K is less than or equal to min (A, B). If A is less than or equal to 1 or B is less than or equal to 1 or the matching logarithm in the result container R is greater than or equal to K, completing the multi-target matching, and outputting the result container R in the multi-target matching; otherwise, returning to the step 3), wherein the two-dimensional similarity matrix M is replaced by a new similarity matrix M.
Further, the step 5) is specifically as follows:
judging whether at least one of the following conditions is met at present:
a is less than or equal to 1, or B is less than or equal to 1, or the logarithm of match in the resulting container R is greater than or equal to K.
And if A is less than or equal to 1 or B is less than or equal to 1 or the matching logarithm in the result container R is greater than or equal to K, finishing matching.
If a >1 and B >1 and the logarithm of matches in the result container R is less than K, go back to step 3); wherein, in the step 3), the 'maximum number' is found by taking the similarity matrix updated in the step 4) as a reference; specifically, the similarity matrix M is replaced with the updated similarity matrix M, and the row and column numbers a and B are replaced with a and B.
Furthermore, a similarity score threshold of the matching result is set, and matching pairs lower than the threshold in the matching result are removed.
Further, the acquisition equipment is a camera, a laser radar or a millimeter wave radar; the camera collects image data, and the laser radar and the millimeter wave radar collect point cloud data.
Furthermore, the acquisition equipment is two cameras, and two pictures are acquired respectively, wherein the target in the pictures comprises a pedestrian.
Further, cosine similarity of the feature vectors of the two targets to be matched is adopted as a similarity score.
The invention has the beneficial effects that: the method can greatly reduce the time complexity of the multi-target matching algorithm while ensuring the multi-target matching precision, thereby improving the efficiency of the multi-target matching algorithm, namely greatly improving the frame rate of multi-target tracking and the efficiency of target re-identification, and greatly influencing the implementation of the subsequent algorithm.
Drawings
FIG. 1 is a flow chart of the multi-target matching method of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
In order to make the objects, technical solutions and technical effects of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
Aiming at the tasks of video multi-target tracking and target re-identification across cameras, the efficient multi-target matching method based on the similarity can efficiently complete multi-target matching of different frames of a video and multi-target matching among different cameras.
Specifically, as shown in fig. 1, for a target re-recognition task across cameras:
1) the Data collected by the two collecting devices are respectively Data _1 and Data _ 2. The acquisition equipment can be a camera, a laser radar and millimeter waves; the camera collects RGB image data of videos or photos; the laser radar equipment collects point cloud data; the millimeter wave radar collects point cloud data. The two acquisition devices may be the same or different. And training a target detection network, and respectively performing target detection on the Data _1 and the Data _2 to obtain target detection results Detect _1 and Detect _2 of the Data _1 and the Data _ 2. The Target frames of the input Data _1 and Data _2 are selected through Detect _1 and Detect _2 respectively, so as to obtain different Target Data Target _1_ i and Target _2_ j of Data _1 and Data _2, wherein 0< i < A, 0< j < B, and A, B are the Target detection quantity of Data _1 and Data _2 respectively.
In this embodiment, the picture taken by the camera 1 detects 20 pedestrian targets through the centret target detection algorithm, and the picture taken by the camera 2 detects 30 pedestrian targets through the centret target detection algorithm.
2) And training a classifier, and respectively performing feature extraction on Target _1_ i and Target _2_ j to obtain feature vectors F _1_ i and F _2_ j of different targets in the group A and the group B.
In this embodiment, a ResNet50 neural network is used to perform feature extraction on 20 targets of the camera 1 and 30 targets of the camera 2, so as to obtain feature vectors of different targets respectively.
3) Cosine similarity calculation is carried out on the feature vectors of the 20 targets and the feature vectors of the 30 targets respectively to obtain a similarity matrix M of 20 x 30, and similarity scores between different targets of the two cameras are respectively represented.
4) A result container R is maintained that stores the target matching results. For example, it can be used to store matching pairs [2,3,0.8] that have completed matching; wherein "0.8" is the similarity score; "2" is the 2 nd target of the camera 1, and is also the row number of "0.8" in the similarity matrix; "3" is the 3 rd object of the camera 2, and is also the column number of the similarity matrix of "0.8".
5) Find all "maximum number" N in 20 x 30 similarity matrixij(ii) a Wherein, i and j refer to the ith row and the jth column of the similarity matrix, 0 respectively<i≤20,0<j is less than or equal to 30; "maximum number" NijIs a number whose row i and column j are both at maximum; the similarity matrix contains a number of "maxima".
6) All "maximum number" N found in step 5)ijAnd deleting all the similarity scores of the ith row and the jth column of the corresponding 20-30 similarity matrix to obtain a new two-dimensional similarity matrix M, wherein the rows and the columns of the new two-dimensional similarity matrix are respectively A, B and A<20,B*<30, of a nitrogen-containing gas; and matching pairs [ i, j, N ] corresponding to the maximum numberij]And output to the result container R.
7) Judging whether at least one of the following conditions is met at present:
a is less than or equal to 1, or B is less than or equal to 1, or the logarithm of match in the resulting container R is greater than or equal to 20.
8) If A is less than or equal to 1 or B is less than or equal to 1 or the logarithm of matches in the result container R is greater than or equal to 20, the matching is ended and the process jumps to step 10).
9) If A >1 and B >1 and the logarithm of matches in the result container R is less than 20, repeating steps 5) -7); wherein, in the step 5), the 'maximum number' is found by taking the similarity matrix updated in the step 6) as a reference; specifically, the similarity matrix M is replaced with the updated similarity matrix M, and the row and column numbers 20 and 30 are replaced with a and B.
10) And setting a matching score threshold value of 0.5, traversing the matching pair in the result container R, and if the similarity score is less than the matching threshold value of 0.5, deleting the matching pair and updating the result container R.
11) And (4) finishing re-identification of different targets across the camera through the result container R. Specifically, the matching pair in the result container R at this time is the target re-recognition result.
The invention can greatly reduce the time of the multi-target matching algorithm while ensuring the precision of the multi-target matching, and the comparison of the matching time of the invention and the greedy algorithm is shown in the following table:
matching times of greedy algorithm 20 x 30 matrix 26ms
Matching times for 20 x 30 matrices of the invention 16ms
As can be seen from the table, the efficiency of the matching algorithm is improved by about 50% compared with that of the greedy algorithm.

Claims (6)

1. A multi-target matching algorithm based on matrix 'maximum number' is characterized by comprising the following steps:
1) inputting data: acquiring two groups of data through two acquisition devices, and respectively carrying out target detection on the two groups of data to obtain two corresponding groups of target detection results; one group of target detection results comprise A targets to be matched, and the other group of target detection results comprise B targets to be matched; respectively extracting the features of the two groups of targets to be matched to obtain a feature vector of each target to be matched; and pairwise matching the targets to be matched in different groups, and calculating similarity scores according to the feature vectors to obtain A × B matched pairs and similarity scores thereof, wherein the similarity scores are between [0,1 ].
2) Converting the A x B similarity scores into A x B two-dimensional similarity matrix M and maintaining a result container R;
3) finding all the "maximum number" N of the two-dimensional similarity matrix MijThe maximum number of the matrix is the number of the maximum value of the row and the column of the matrix; i, j denotes the ith row and jth column, 0<i≤A,0<j≤B;
4) All the maximum number N in the two-dimensional similarity matrix M found in the step 3)ijDeleting the ith row and the jth column to form a new two-dimensional similarity matrix M, wherein the rows and columns of the new two-dimensional similarity matrix are A and B respectively to obtain a matching pair [ i, j, N ]ij]And output to a result container R, where A<A,B*<B;
5) Outputting K groups of matching pairs and corresponding similarity scores; wherein 0< K is less than or equal to min (A, B). If A is less than or equal to 1 or B is less than or equal to 1 or the matching logarithm in the result container R is greater than or equal to K, completing the multi-target matching, and outputting the result container R in the multi-target matching; otherwise, returning to the step 3), wherein the two-dimensional similarity matrix M is replaced by a new similarity matrix M.
2. The multi-target matching algorithm based on the "maximum number" of the matrix as claimed in claim 1, wherein the step 5) is specifically:
judging whether at least one of the following conditions is met at present:
a is less than or equal to 1, or B is less than or equal to 1, or the logarithm of match in the resulting container R is greater than or equal to K.
And if A is less than or equal to 1 or B is less than or equal to 1 or the matching logarithm in the result container R is greater than or equal to K, finishing matching.
If a >1 and B >1 and the logarithm of matches in the result container R is less than K, go back to step 3); wherein, in the step 3), the 'maximum number' is found by taking the similarity matrix updated in the step 4) as a reference; specifically, the similarity matrix M is replaced with the updated similarity matrix M, and the row and column numbers a and B are replaced with a and B.
3. The multi-target matching algorithm based on the "maximum number" of the matrixes as claimed in claim 1, wherein a threshold value of the similarity score of the matching results is set, and the matching pairs in the matching results which are lower than the threshold value are eliminated.
4. The matrix "maximum number" based multi-target matching algorithm as claimed in claim 1, wherein the collection device is a camera, a laser radar or a millimeter wave radar, etc. The camera collects image data, and the laser radar and the millimeter wave radar collect point cloud data.
5. The matrix maximum number-based multi-target matching algorithm as claimed in claim 1, wherein the two cameras are adopted as the acquisition devices, and two pictures are acquired respectively, wherein the targets in the pictures comprise pedestrians.
6. The efficient similarity-based multi-target matching method according to claim 1, wherein cosine similarity of feature vectors of two targets to be matched is adopted as a similarity score.
CN202111216075.XA 2021-10-19 2021-10-19 Multi-target matching algorithm based on matrix maximum number Pending CN113989325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111216075.XA CN113989325A (en) 2021-10-19 2021-10-19 Multi-target matching algorithm based on matrix maximum number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111216075.XA CN113989325A (en) 2021-10-19 2021-10-19 Multi-target matching algorithm based on matrix maximum number

Publications (1)

Publication Number Publication Date
CN113989325A true CN113989325A (en) 2022-01-28

Family

ID=79739366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111216075.XA Pending CN113989325A (en) 2021-10-19 2021-10-19 Multi-target matching algorithm based on matrix maximum number

Country Status (1)

Country Link
CN (1) CN113989325A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114814777A (en) * 2022-06-27 2022-07-29 中国人民解放军32035部队 Pattern matching correlation method and system for multi-radar dense target

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114814777A (en) * 2022-06-27 2022-07-29 中国人民解放军32035部队 Pattern matching correlation method and system for multi-radar dense target
CN114814777B (en) * 2022-06-27 2022-09-27 中国人民解放军32035部队 Pattern matching correlation method and system for multi-radar dense target

Similar Documents

Publication Publication Date Title
Suganuma et al. Attention-based adaptive selection of operations for image restoration in the presence of unknown combined distortions
CN108960211B (en) Multi-target human body posture detection method and system
CN112308158A (en) Multi-source field self-adaptive model and method based on partial feature alignment
CN111767882A (en) Multi-mode pedestrian detection method based on improved YOLO model
CN111161315B (en) Multi-target tracking method and system based on graph neural network
CN111814661A (en) Human behavior identification method based on residual error-recurrent neural network
CN110738690A (en) unmanned aerial vehicle video middle vehicle speed correction method based on multi-target tracking framework
CN110751018A (en) Group pedestrian re-identification method based on mixed attention mechanism
CN112070768B (en) Anchor-Free based real-time instance segmentation method
CN112967210B (en) Unmanned aerial vehicle image denoising method based on full convolution twin network
CN115984969A (en) Lightweight pedestrian tracking method in complex scene
CN113642685B (en) Efficient similarity-based cross-camera target re-identification method
CN110619280B (en) Vehicle re-identification method and device based on deep joint discrimination learning
CN115761356A (en) Image recognition method and device, electronic equipment and storage medium
CN109359530B (en) Intelligent video monitoring method and device
Zhang et al. Development of image processing based on deep learning algorithm
CN111462173A (en) Visual tracking method based on twin network discriminant feature learning
CN113989325A (en) Multi-target matching algorithm based on matrix maximum number
CN113269099B (en) Vehicle re-identification method under heterogeneous unmanned system based on graph matching
Barroso-Laguna et al. Scalenet: A shallow architecture for scale estimation
CN114333062A (en) Pedestrian re-recognition model training method based on heterogeneous dual networks and feature consistency
CN114359167A (en) Insulator defect detection method based on lightweight YOLOv4 in complex scene
CN111079585B (en) Pedestrian re-identification method combining image enhancement with pseudo-twin convolutional neural network
CN116977834A (en) Method for identifying internal and external images distributed under open condition
CN107358200B (en) Multi-camera non-overlapping vision field pedestrian matching method based on sparse learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination