CN113096160B - Multi-target tracking method, device, equipment and storage medium - Google Patents

Multi-target tracking method, device, equipment and storage medium Download PDF

Info

Publication number
CN113096160B
CN113096160B CN202110640635.8A CN202110640635A CN113096160B CN 113096160 B CN113096160 B CN 113096160B CN 202110640635 A CN202110640635 A CN 202110640635A CN 113096160 B CN113096160 B CN 113096160B
Authority
CN
China
Prior art keywords
analyzed
detection frame
human body
tracker
body detection
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.)
Active
Application number
CN202110640635.8A
Other languages
Chinese (zh)
Other versions
CN113096160A (en
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.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech Technology Co ltd
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 Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN202110640635.8A priority Critical patent/CN113096160B/en
Publication of CN113096160A publication Critical patent/CN113096160A/en
Application granted granted Critical
Publication of CN113096160B publication Critical patent/CN113096160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/277Analysis of motion involving stochastic approaches, e.g. using Kalman filters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

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

Abstract

The application relates to the technical field of computer vision, and discloses a multi-target tracking method, a device, equipment and a storage medium, wherein the method comprises the following steps: obtaining a detection frame matching result and a tracker matching result according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm; calculating the shielded area proportion of the human body detection frame to be analyzed, wherein the human body detection frame to be analyzed is any human body detection frame with a detection frame matching result of successful matching; and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion. Different human characteristic data updating modes are adopted for trackers to be analyzed corresponding to the shielded and crossed human detection frames according to the human detection frames to be analyzed, the shielded area threshold and the shielded area proportion, and the mode of always updating is avoided being adopted when shielding and crossing are always carried out.

Description

Multi-target tracking method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer vision technologies, and in particular, to a multi-target tracking method, apparatus, device, and storage medium.
Background
In a surveillance video, in order to realize a human body duplicate removal function, a multi-target tracking algorithm is generally adopted to perform human body tracking so as to realize duplicate removal. Under the scene of the security camera equipment, because the security camera equipment is higher in installation height, the human body and the human body are not easy to be shielded and crossed in the visual angle of the security camera equipment, and the human body tracking effect of the multi-target tracking algorithm is better. In a robot scene, because the height of the robot is low, shielding and crossing are easily caused between human bodies in camera equipment of the robot, when the multi-target tracking algorithm is adopted for tracking the human bodies, the characteristic data of the human bodies are polluted due to shielding and crossing between the human bodies in the process of updating the characteristic data of the human bodies in real time, so that abnormal exchange of human body identification occurs in the subsequent matching process, and the accuracy of human body tracking is influenced.
Disclosure of Invention
The application mainly aims to provide a multi-target tracking method, a multi-target tracking device, a multi-target tracking equipment and a multi-target tracking storage medium, and aims to solve the technical problem that when a multi-target tracking algorithm is adopted for tracking a human body in the prior art, the characteristic data of the human body is polluted due to shielding and crossing between the human body and the human body in the process of updating the characteristic data of the human body in real time, so that abnormal exchange of human body identification occurs in the subsequent matching process, and the accuracy of human body tracking is influenced.
In order to achieve the above object, the present application provides a multi-target tracking method, including:
acquiring a human body detection frame set and a tracker set to be analyzed of target camera equipment;
performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
according to the human body detection frame set, carrying out shielded area proportion calculation on a human body detection frame to be analyzed to obtain a shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with the detection frame matching result of successful matching;
and acquiring a shielded area threshold, and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion.
Further, the step of updating the data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold and the blocked area ratio includes:
judging whether the shielded area proportion is larger than the shielded area threshold value;
when the shielded area proportion is larger than the shielded area threshold, updating Kalman filtering parameters and tracking loss counting parameters of the tracker to be analyzed, which are successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed;
and when the shielded area proportion is smaller than or equal to the shielded area threshold, updating tracker human characteristic data, the Kalman filtering parameter and the tracking loss counting parameter of the tracker to be analyzed, which are successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed.
Further, after the step of obtaining the blocked area threshold and updating the data of the tracker to be analyzed, which is successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed, the blocked area threshold and the blocked area ratio, the method further includes:
respectively establishing a tracker for each human body detection frame with failed matching according to the detection frame matching result to obtain a tracker set to be updated, and updating the tracker set to be updated into the tracker set to be analyzed;
acquiring a tracking loss time threshold;
adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed, the tracker matching result of which is the matching failure, in the tracker set to be analyzed;
finding out the tracker with the tracking loss counting parameter larger than the tracking loss frequency threshold value from the tracker set to be analyzed to obtain a tracker set to be discarded;
and deleting the tracker set to be discarded from the tracker set to be analyzed.
Further, the step of adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed whose matching result is a matching failure in the set of trackers to be analyzed includes:
acquiring a preset disappearing edge;
when the tracker to be analyzed with the tracker matching result of failed matching is crossed with the preset vanishing edge, taking the tracker to be analyzed as a tracker to be deleted;
when the tracker to be analyzed with the tracker matching result of matching failure does not intersect with the preset vanishing edge, taking the tracker to be analyzed as a reserved tracker;
deleting each tracker to be deleted from the tracker set to be analyzed;
and in the tracker set to be analyzed, adding 1 to the tracking loss count parameter of the tracker to be analyzed corresponding to each reserved tracker respectively.
Further, the step of performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by using a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results includes:
inputting each human body detection frame in the human body detection frame set into a preset feature extraction module for feature extraction, so as to obtain detection frame human body feature data corresponding to each human body detection frame in the human body detection frame set;
respectively performing position estimation according to Kalman filtering parameters corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain position estimation results corresponding to each tracker to be analyzed in the tracker set to be analyzed;
and adopting a Deep SORT algorithm to carry out cascade matching according to all the detection frame human characteristic data, all the position estimation results, the human detection frame set and the tracker set to be analyzed to obtain the detection frame matching results corresponding to the human detection frames in the human detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the tracker set to be analyzed.
Further, the step of performing cascade matching by using Deep SORT algorithm according to all the detection frame human feature data, all the position estimation results, the human detection frame set and the tracker set to be analyzed to obtain the detection frame matching result corresponding to each human detection frame in the human detection frame set and the tracker matching result corresponding to each tracker to be analyzed in the tracker set to be analyzed includes:
performing mahalanobis distance calculation on each human body detection frame in the human body detection frame set and each position estimation result respectively to obtain a mahalanobis distance set to be analyzed, which corresponds to each human body detection frame in the human body detection frame set;
respectively carrying out minimum cosine distance calculation on the human body characteristic data of each detection frame and the human body characteristic data of the tracker corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain a minimum cosine distance set to be analyzed corresponding to each human body detection frame in the human body detection frame set;
performing distance fusion processing according to all the Mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set;
matching the human body detection frames in the human body detection frame set and the trackers to be analyzed in the trackers to be analyzed set according to the distance fusion result set by adopting a minimum cost algorithm to obtain the detection frame matching results corresponding to the human body detection frames in the human body detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the trackers to be analyzed set.
Further, the step of performing distance fusion processing according to all the mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set includes:
acquiring a first distance threshold and a second distance threshold;
acquiring one human body detection frame from the human body detection frame set as a human body detection frame to be fused;
acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused;
taking the Mahalanobis distance corresponding to the tracker to be fused in the Mahalanobis distance set to be analyzed corresponding to the human body detection frame to be fused as the Mahalanobis distance to be fused;
taking the minimum cosine distance corresponding to the tracker to be fused in the minimum cosine distance set to be analyzed corresponding to the human body detection frame to be fused as the minimum cosine distance to be fused;
when the Mahalanobis distance to be fused is smaller than or equal to the first distance threshold and the minimum cosine distance to be fused is smaller than or equal to the second distance threshold, performing linear weighting on the Mahalanobis distance to be fused and the minimum cosine distance to be fused to obtain a corresponding distance fusion result between the human body detection frame to be fused and the tracker to be fused;
repeatedly executing the step of acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused until the extraction of all trackers to be analyzed in the tracker set to be analyzed is completed;
repeatedly executing the step of obtaining one human body detection frame from the human body detection frame set as the human body detection frame to be fused until the extraction of all the human body detection frames in the human body detection frame set is completed;
and determining a distance fusion result set according to all the distance fusion results.
The application also provides a multi-target tracking device, the device includes:
the data acquisition module is used for acquiring a human body detection frame set and a tracker set to be analyzed of the target camera equipment;
the cascade matching module is used for carrying out cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
the shielded area ratio determining module is used for calculating the shielded area ratio of the human body detection frame to be analyzed according to the human body detection frame set to obtain the shielded area ratio, wherein the human body detection frame to be analyzed is any one of the human body detection frames with the detection frame matching result of successful matching;
and the first updating module is used for acquiring a blocked area threshold value and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold value and the blocked area proportion.
The present application further proposes a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
The present application also proposes a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
The multi-target tracking method, the device, the equipment and the storage medium adopt a multi-target tracking algorithm, cascade matching is carried out according to a human body detection frame set and a tracker set to be analyzed to obtain a plurality of detection frame matching results and a plurality of tracker matching results, then the shielded area proportion of the human body detection frame to be analyzed is calculated according to the human body detection frame set to obtain the shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with successful matching of the detection frame matching results, and finally the data updating is carried out on the tracker to be analyzed which is successfully matched with the human body detection frame to be analyzed according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion, so that the tracker to be analyzed corresponding to the shielded and crossed human body detection frames adopts different human body characteristic data updating according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion The new mode avoids that the human body characteristic data in the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, is always updated in the shielding and crossing processes, and improves the accuracy of human body tracking.
Drawings
FIG. 1 is a schematic flow chart illustrating a multi-target tracking method according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating an exemplary multi-target tracking apparatus according to an embodiment of the present disclosure;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In order to solve the technical problem that when a multi-target tracking algorithm is adopted to track a human body in the prior art, the characteristic data of the human body is polluted due to shielding and crossing between the human body and the human body in the process of updating the characteristic data of the human body in real time, so that abnormal exchange of human body identification occurs in the subsequent matching process, and the accuracy of human body tracking is influenced, the multi-target tracking method is provided in the application, and is applied to the technical field of computer vision, and can also be applied to the technical field of robots.
Referring to fig. 1, an embodiment of the present application provides a multi-target tracking method, where the method includes:
s1: acquiring a human body detection frame set and a tracker set to be analyzed of target camera equipment;
s2: performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
s3: according to the human body detection frame set, carrying out shielded area proportion calculation on a human body detection frame to be analyzed to obtain a shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with the detection frame matching result of successful matching;
s4: and acquiring a shielded area threshold, and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion.
In the embodiment, a multi-target tracking algorithm is adopted, cascade matching is carried out according to a human body detection frame set and a tracker set to be analyzed to obtain a plurality of detection frame matching results and a plurality of tracker matching results, then shielded area proportion calculation is carried out on the human body detection frame to be analyzed according to the human body detection frame set to obtain shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with successfully matched detection frame matching results, and finally data updating is carried out on the tracker to be analyzed which is successfully matched with the human body detection frame to be analyzed according to the human body detection frame to be analyzed, a shielded area threshold value and the shielded area proportion, so that different human body characteristic data updating modes are adopted on the tracker to be analyzed corresponding to the shielded and crossed human body detection frames according to the human body detection frame to be analyzed, the shielded area threshold value and the shielded area proportion, the human body characteristic data in the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, is prevented from being updated all the time during shielding and crossing, and the human body tracking accuracy is improved.
For S1, one image sent by the target image capturing apparatus is acquired as an image to be detected.
A target image pickup apparatus, that is, an image pickup apparatus. The image pickup apparatus can take a picture and also can take a video. When the image pickup device shoots a video, one frame of image sent by the target image pickup device is acquired as an image to be detected.
The image to be detected, i.e. the digital image.
The tracker set to be analyzed corresponding to the target image pickup device may be acquired from a database, or the tracker set to be analyzed corresponding to the target image pickup device may be acquired from a third-party application system.
The target image capturing device is configured to capture an image of the target image capturing device, wherein the set of trackers to be analyzed corresponding to the target image capturing device, that is, the trackers to be analyzed in the set of trackers to be analyzed are trackers obtained from the image captured by the target image capturing device.
The tracker to be analyzed is also known as tracker.
The tracker includes: the system comprises tracker human body characteristic data, Kalman filtering parameters, tracking loss counting parameters and updating time.
The tracker human body characteristic data refers to shape characteristics, color characteristics and texture characteristics of a human body in an image.
Inputting the image to be detected into a preset human body detection module, detecting human bodies in the image to be detected through the preset human body detection module, generating a human body detection frame aiming at each detected human body, and taking all the human body detection frames as a human body detection frame set.
The preset human body detection module is a model obtained based on convolutional neural network training.
The image area corresponding to the human body detection frame is positioned in the human body detection frame.
For S2, respectively carrying out cascade matching on each human body detection frame in the human body detection frame set and each tracker to be analyzed in the tracker set to be analyzed by adopting a multi-target tracking algorithm; when the matching of the human body detection frame and the tracker to be analyzed is successful, determining a detection frame matching result corresponding to the fact human body detection frame which is successfully matched as the matching is successful, and determining a tracker matching result corresponding to the tracker to be analyzed which is successfully matched as the matching is successful; when the matching of the human body detection frame and the tracker to be analyzed fails, determining a detection frame matching result corresponding to the human body detection frame which fails to be matched as matching failure; and when the tracker to be analyzed fails to be matched with the human body detection frame, determining the tracker matching result corresponding to the tracker to be analyzed as matching failure. That is, each human body detection frame corresponds to one detection frame matching result, and each tracker to be analyzed corresponds to one tracker matching result.
The multi-target tracking algorithm in the present application includes, but is not limited to: the SORT algorithm, Deep SORT algorithm. The SORT algorithm is called Simple Online And Realtime Tracking. The Deep SORT algorithm is based on the SORT algorithm, appearance measurement information is added, and a trained convolutional neural network is applied, so that the Deep SORT algorithm can better process the occlusion problem.
For S3, extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed; calculating the proportion of the area of the human body detection frame to be analyzed, which is covered by the human body detection frame except the human body detection frame to be analyzed in the human body detection frame set, in the area of the human body detection frame to be analyzed, and taking the calculated data as the covered area proportion corresponding to the human body detection frame to be analyzed; and repeatedly executing the step of extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed until the human body detection frames in all the human body detection frames with the detection frame matching results of successful matching are extracted. That is to say, the detection frame matching result is that each human body detection frame which is successfully matched corresponds to a shielded area proportion.
For S4, the occluded area threshold may be obtained from the database, or the occluded area threshold input by the user may be obtained, or the occluded area threshold sent by the third-party application system may be obtained, or the occluded area threshold may be written in the slave program file implementing the present application.
The blocked area threshold is a value from 0 to 1, and does not include 0 nor 1.
Optionally, the blocked area threshold is set to 0.5, so as to avoid excessively discarding the detection frame human feature data.
When the shielded area proportion is smaller than or equal to the shielded area threshold, the shielded area proportion does not reach the standard of pollution, the human body characteristic data updating strategy at the moment is to update the tracker human body characteristic data of the tracker to be analyzed, which is matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, and the updating does not cause abnormal exchange of human body identification in the subsequent matching process.
The detection frame human body feature data refer to shape features, color features and texture features of a human body in the image.
When the shielded area proportion is larger than the shielded area threshold, the shielded area proportion reaches a pollution threshold, and the human characteristic data updating strategy at the moment is that the tracker human characteristic data of the tracker to be analyzed, which is matched with the human detection frame to be analyzed, cannot be updated, so that the tracker human characteristic data of the tracker to be analyzed, which is matched with the human detection frame to be analyzed, is prevented from being polluted, the problem of abnormal exchange of human identification in the subsequent matching process due to the fact that the characteristic data is polluted by shielding and crossing is solved, and the accuracy of human tracking is improved.
Optionally, after the step of updating the data of the tracker to be analyzed, which is successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed, the blocked area threshold, and the blocked area ratio, the method further includes:
s5: updating the tracker set to be analyzed according to the detection frame matching result and the tracker matching result which are failed to be matched;
s6: and repeating the steps until a tracking end signal is acquired.
For S5, respectively, creating a tracker for each human body detection frame with failed matching according to the detection frame matching result to obtain a tracker set to be updated, and updating the tracker set to be updated into the tracker set to be analyzed; and updating the tracking loss count parameters of the tracker to be analyzed in the tracker set to be analyzed according to the tracker matching result, which is the tracker to be analyzed with failed matching.
For S6, after steps S3, S4, and S5 are all executed, steps S1 to S6 are repeatedly executed until a tracking end signal is acquired, thereby achieving multi-target tracking.
The tracking end signal is a signal for ending human body tracking of an image captured by the target imaging apparatus.
The tracking end signal may be input by a user, triggered by a program file implementing the present application, or sent by a third-party application system.
In an embodiment, the step of updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold, and the blocked area ratio includes:
s41: judging whether the shielded area proportion is larger than the shielded area threshold value;
s42: when the shielded area proportion is larger than the shielded area threshold, updating Kalman filtering parameters and tracking loss counting parameters of the tracker to be analyzed, which are successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed;
s43: and when the shielded area proportion is smaller than or equal to the shielded area threshold, updating tracker human characteristic data, the Kalman filtering parameter and the tracking loss counting parameter of the tracker to be analyzed, which are successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed.
In this embodiment, when the ratio of the blocked area is greater than the threshold of the blocked area, the tracker human characteristic data of the tracker to be analyzed, which is matched with the human detection frame to be analyzed, is not updated, so that the characteristic data corresponding to the blocked and crossed human detection frames is cleaned, the problem of abnormal exchange of human identification in the subsequent matching process due to pollution of the characteristic data caused by blocking and crossing is avoided, and the accuracy of human tracking is improved.
For S41, when the blocked area ratio is greater than the blocked area threshold, it means that the blocked area ratio reaches a contaminated threshold, and at this time, the tracker human feature data of the to-be-analyzed tracker, which is matched with the to-be-analyzed human detection frame, cannot be updated, so that the kalman filtering parameter and the tracking loss counting parameter of the to-be-analyzed tracker, which are matched with the to-be-analyzed human detection frame, are updated according to the to-be-analyzed human detection frame, thereby preventing the tracker human feature data of the to-be-analyzed tracker, which is matched with the to-be-analyzed human detection frame, from being contaminated, thereby preventing the problem of abnormal exchange of human body identifiers in the subsequent matching process due to contamination of feature data caused by blocking and crossing, and improving the accuracy of human body tracking.
Optionally, when the ratio of the blocked area is greater than the blocked area threshold, the step of updating the kalman filtering parameter and the tracking loss counting parameter of the tracker to be analyzed, which are matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed includes: when the shielded area proportion is larger than the shielded area threshold, updating Kalman filtering parameters of the tracker to be analyzed, which are matched with the human body detection frame to be analyzed, according to the position data of the human body detection frame to be analyzed, initializing the tracking loss counting parameters of the tracker to be analyzed, which are matched with the human body detection frame to be analyzed, to 0, and updating the updating time of the tracker to be analyzed, which is matched with the human body detection frame to be analyzed, according to the shooting time of the image to be detected.
For S42, when the blocked area ratio is less than or equal to the blocked area threshold, it means that the blocked area ratio does not reach the standard of contamination, at this time, the tracker human feature data, the kalman filter parameter, and the tracking loss count parameter of the tracker to be analyzed, which are matched with the human detection frame to be analyzed, may be updated according to the human detection frame to be analyzed, and the updating may not result in abnormal exchange of human body identifiers in the subsequent matching process.
Optionally, when the ratio of the blocked area is smaller than or equal to the blocked area threshold, the step of updating, according to the human detection frame to be analyzed, the tracker human characteristic data, the kalman filter parameter, and the tracking loss count parameter of the tracker to be analyzed, which are matched with the human detection frame to be analyzed, includes: when the shielded area proportion is smaller than or equal to the shielded area threshold, updating tracker human characteristic data of the to-be-analyzed tracker, which is matched with the to-be-analyzed human detection frame, according to detection frame human characteristic data of the to-be-analyzed human detection frame, updating Kalman filtering parameters of the to-be-analyzed tracker, which are matched with the to-be-analyzed human detection frame, according to position data of the to-be-analyzed human detection frame, initializing the tracking loss counting parameters of the to-be-analyzed tracker, which are matched with the to-be-analyzed human detection frame, to 0, and updating the updating time of the to-be-analyzed tracker, which is matched with the to-be-analyzed human detection frame, according to the shooting time of the to-be-detected image.
In an embodiment, after the step of obtaining the blocked area threshold and updating the data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold, and the blocked area ratio, the method further includes:
s51: respectively establishing a tracker for each human body detection frame with failed matching according to the detection frame matching result to obtain a tracker set to be updated, and updating the tracker set to be updated into the tracker set to be analyzed;
s52: acquiring a tracking loss time threshold;
s53: adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed, the tracker matching result of which is the matching failure, in the tracker set to be analyzed;
s54: finding out the tracker with the tracking loss counting parameter larger than the tracking loss frequency threshold value from the tracker set to be analyzed to obtain a tracker set to be discarded;
s55: and deleting the tracker set to be discarded from the tracker set to be analyzed.
According to the embodiment, the tracker with the tracking loss counting parameter larger than the tracking loss time threshold value is discarded, so that the redundant quantity of the tracker needing to be matched is reduced, and the calculation efficiency of multi-target tracking is improved.
For S51, extracting one human body detection frame from all the human body detection frames with the detection frame matching results of matching failure as a detection frame of the tracker to be created; creating a tracker as a tracker to be set; updating tracker human characteristic data of the tracker to be set according to the detection frame human characteristic data of the detection frame of the tracker to be created, updating Kalman filtering parameters of the tracker to be set according to the position data of the detection frame of the tracker to be created, initializing the tracking loss counting parameters of the tracker to be set to 0, updating the updating time of the tracker to be set according to the shooting time of the image to be detected, and taking the tracker to be set as the tracker to be updated; repeatedly executing the step of extracting one human body detection frame from all the human body detection frames with the detection frame matching results of matching failure as a detection frame of the tracker to be created until the extraction of the human body detection frames from all the human body detection frames with the detection frame matching results of matching failure is completed; and taking all the trackers to be updated as a tracker set to be updated.
For S52, the tracking loss number threshold may be obtained from the database, or the tracking loss number threshold input by the user may be obtained, or the tracking loss number threshold sent by the third-party application system may be obtained, or the tracking loss number threshold may be written in the slave program file implementing the present application. The tracking loss time threshold is a specific numerical value.
For S53, in the set of trackers to be analyzed, adding 1 to the value of the tracking loss count parameter corresponding to the tracker to be analyzed whose matching result is a matching failure.
For step S54, finding the trackers to be analyzed whose tracking loss count parameter is greater than the tracking loss number threshold from the set of trackers to be analyzed updated in step S52, and regarding each of the found trackers to be analyzed as a tracker to be discarded; and taking all the trackers to be discarded as a tracker set to be discarded.
For step S55, delete each tracker to be discarded in the set of trackers to be discarded from the set of trackers to be analyzed, and use the set of trackers to be analyzed after the deletion for the next iterative computation.
In an embodiment, the step of adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed whose matching result is a matching failure in the set of trackers to be analyzed includes:
s531: acquiring a preset disappearing edge;
s532: when the tracker to be analyzed with the tracker matching result of failed matching is crossed with the preset vanishing edge, taking the tracker to be analyzed as a tracker to be deleted;
s533: when the tracker to be analyzed with the tracker matching result of matching failure does not intersect with the preset vanishing edge, taking the tracker to be analyzed as a reserved tracker;
s534: deleting each tracker to be deleted from the tracker set to be analyzed;
s535: and in the tracker set to be analyzed, adding 1 to the tracking loss count parameter of the tracker to be analyzed corresponding to each reserved tracker respectively.
The Deep SORT algorithm is used for avoiding the exchange of human body identification after crossing between people by acquiring a plurality of human body information in advance, and because the human body information outside an image to be detected cannot be acquired, a matching mechanism of the Deep SORT algorithm may connect a newly appeared human body to an existing tracker to be analyzed, so that false alarm is caused.
For S531, the preset vanishing edge may be obtained from the database, the preset vanishing edge input by the user may also be obtained, the preset vanishing edge sent by the third-party application system may also be obtained, and the preset vanishing edge may also be written in the slave program file implementing the application. The preset vanishing edge may be one or more line segments of a frame of the image to be detected.
For S532, when the to-be-analyzed tracker with the tracker matching result being the matching failure crosses the preset vanishing edge, the to-be-analyzed tracker with the tracker matching result being the matching failure is taken as the to-be-deleted tracker.
For S533, when there is the tracker to be analyzed whose matching result is that matching fails and the preset vanishing edge do not intersect, the tracker to be analyzed whose matching result is that matching fails and the preset vanishing edge do not intersect are taken as a retained tracker.
For step S535, in the tracker set to be analyzed updated in step S524, 1 is added to the tracking loss count parameter corresponding to the tracker to be analyzed corresponding to each retained tracker, respectively.
In an embodiment, the step of performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by using a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results includes:
s21: inputting each human body detection frame in the human body detection frame set into a preset feature extraction module for feature extraction, so as to obtain detection frame human body feature data corresponding to each human body detection frame in the human body detection frame set;
s22: respectively performing position estimation according to the Kalman filtering parameters corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain position estimation results corresponding to each tracker to be analyzed in the tracker set to be analyzed;
s23: and adopting a Deep SORT algorithm to carry out cascade matching according to all the detection frame human characteristic data, all the position estimation results, the human detection frame set and the tracker set to be analyzed to obtain the detection frame matching results corresponding to the human detection frames in the human detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the tracker set to be analyzed.
According to the embodiment, cascade matching is performed according to the human body detection frame set and the tracker set to be analyzed by adopting the Deep SORT algorithm, appearance measurement information is added to the Deep SORT algorithm on the basis of the SORT algorithm, and a trained convolutional neural network is applied, so that the shielding problem can be better processed, and the accuracy of a matching result is improved.
For S21, acquiring one human body detection frame from the human body detection frame set as a human body detection frame with features to be extracted; inputting the image area corresponding to the human body detection frame with the features to be extracted into a preset feature extraction module for feature extraction, and obtaining human body feature data of the detection frame corresponding to the human body detection frame with the features to be extracted; and repeatedly executing the step of obtaining one human body detection frame from the human body detection frame set as the human body detection frame with the characteristics to be extracted until the human body characteristic data of the detection frame corresponding to each human body detection frame in the human body detection frame set is determined.
The preset feature extraction module is a model obtained based on convolutional neural network training and is used for extracting shape features, color features and texture features of a human body in the image.
For S22, extracting one tracker to be analyzed from the set of trackers to be analyzed as a tracker to be predicted; estimating the position of the human body in the image to be predicted according to the Kalman filtering parameters corresponding to the tracker to be predicted, and taking estimated position data as a position estimation result corresponding to the tracker to be predicted; and repeatedly executing the step of extracting one tracker to be analyzed from the set of trackers to be analyzed as the tracker to be predicted until the position estimation result corresponding to each tracker to be analyzed in the set of trackers to be analyzed is determined.
And S23, adopting a Deep SORT algorithm, and respectively carrying out cascade matching on each human body detection frame in the human body detection frame set and each tracker to be analyzed in the tracker set to be analyzed according to the human body feature data of all the detection frames and all the position estimation results.
In an embodiment, the step of performing cascade matching according to all the detection frame human feature data, all the position estimation results, the human detection frame set, and the tracker set to be analyzed by using a Deep SORT algorithm to obtain the detection frame matching result corresponding to each of the human detection frames in the human detection frame set and the tracker matching result corresponding to each of the trackers to be analyzed in the tracker set to be analyzed includes:
s231: performing mahalanobis distance calculation on each human body detection frame in the human body detection frame set and each position estimation result respectively to obtain a mahalanobis distance set to be analyzed, which corresponds to each human body detection frame in the human body detection frame set;
s232: respectively carrying out minimum cosine distance calculation on the human body characteristic data of each detection frame and the human body characteristic data of the tracker corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain a minimum cosine distance set to be analyzed corresponding to each human body detection frame in the human body detection frame set;
s233: performing distance fusion processing according to all the Mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set;
s234: matching the human body detection frames in the human body detection frame set and the trackers to be analyzed in the trackers to be analyzed set according to the distance fusion result set by adopting a minimum cost algorithm to obtain the detection frame matching results corresponding to the human body detection frames in the human body detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the trackers to be analyzed set.
In the embodiment, the Deep SORT algorithm and the minimum cost algorithm are adopted for cascade matching, so that the accuracy of the matching result is further improved.
For S231, mahalanobis distance calculation is performed on each human body detection frame in the human body detection frame set and each position estimation result, that is, the number of mahalanobis distances in the mahalanobis distance set to be analyzed is the same as the number of trackers to be analyzed in the tracker set to be analyzed.
A formula for calculating Mahalanobis distances in the set of Mahalanobis distances to be analyzed
Figure 253401DEST_PATH_IMAGE001
Comprises the following steps:
Figure 963868DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 578607DEST_PATH_IMAGE003
is the position data of the jth human body detection frame in the human body detection frame set,
Figure 815553DEST_PATH_IMAGE004
is the position estimation result corresponding to the ith tracker to be analyzed in the set of trackers to be analyzed,
Figure 619561DEST_PATH_IMAGE005
is to be
Figure 941958DEST_PATH_IMAGE006
The transposition calculation is performed and,
Figure 489614DEST_PATH_IMAGE007
is the ith trace to be analyzed in the set of trackers to be analyzedAnd predicting the covariance matrix in the image to be detected by a Kalman filter.
For S232, performing minimum cosine distance calculation on each detection frame human body feature data and the tracker human body feature data corresponding to each tracker to be analyzed in the tracker set to be analyzed, that is, the number of minimum cosine distances in the minimum cosine distance set to be analyzed is the same as the number of trackers to be analyzed in the tracker set to be analyzed. And the minimum cosine distance between the detection frame human characteristic data and the tracker human characteristic data is appearance measurement information.
A calculation formula of the minimum cosine distance in the minimum cosine distance set to be analyzed
Figure 581067DEST_PATH_IMAGE008
Comprises the following steps:
Figure 821555DEST_PATH_IMAGE009
wherein the content of the first and second substances,
Figure 100090DEST_PATH_IMAGE010
is the human characteristic data of the detection frame corresponding to the jth human detection frame in the human detection frame set,
Figure 717016DEST_PATH_IMAGE011
is that
Figure 662975DEST_PATH_IMAGE012
Any one of the features of any one of the above aspects,
Figure 74365DEST_PATH_IMAGE013
the human body characteristic data of the tracker corresponding to the ith tracker to be analyzed in the set of trackers to be analyzed.
For S233, based on the method of performing distance fusion processing on the human body detection frame and the tracker pair to be analyzed, performing distance fusion processing according to all mahalanobis distance sets to be analyzed and all minimum cosine distance sets to be analyzed, and taking all distance fusion results obtained by calculation as a distance fusion result set.
For step S234, according to the numerical value of the distance fusion result in the distance fusion result set, matching each human body detection frame in the human body detection frame set with each tracker to be analyzed in the tracker set to obtain a plurality of detection frame tracker pair sets; and selecting a detection frame tracker pair set from the plurality of detection frame tracker pair sets by adopting a minimum cost algorithm to obtain a target detection frame tracker pair set, wherein each detection frame tracker pair in the detection frame tracker pair set comprises one human body detection frame and one tracker to be analyzed, and each detection frame tracker pair corresponds to one distance fusion result. The detection frame tracker has uniqueness to the human detection frame in the set, and the detection frame tracker has uniqueness to the tracker to be analyzed in the set.
The target detection frame tracker determines that matching of the detection frame matching result corresponding to the human body detection frame in the set is successful, and determines that matching of the target detection frame tracker is successful according to the tracker matching result corresponding to the tracker to be analyzed in the set. When the human body detection frame is not in the target detection frame tracker pair set, determining the detection frame matching result corresponding to the human body detection frame as matching failure; and when the tracker to be analyzed is not in the target detection frame tracker pair set, determining the tracker matching result corresponding to the tracker to be analyzed as matching failure.
Wherein, the step of selecting a set of detection frame tracker pairs from the plurality of sets of detection frame tracker pairs by using a minimum cost algorithm to obtain a set of target detection frame tracker pairs comprises: respectively carrying out summation calculation on distance fusion results of each detection frame tracker pair set in the detection frame tracker pair sets to obtain fusion result total values corresponding to the detection frame tracker pair sets in the detection frame tracker pair sets; finding out the minimum value from the total values of all the fusion results to obtain the total value of the target fusion result; and taking the detection frame tracker pair set corresponding to the target fusion result total value as the target detection frame tracker pair set.
In an embodiment, the step of performing distance fusion processing according to all the mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set includes:
s2331: acquiring a first distance threshold and a second distance threshold;
s2332: acquiring one human body detection frame from the human body detection frame set as a human body detection frame to be fused;
s2333: acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused;
s2334: taking the Mahalanobis distance corresponding to the tracker to be fused in the Mahalanobis distance set to be analyzed corresponding to the human body detection frame to be fused as the Mahalanobis distance to be fused;
s2335: taking the minimum cosine distance corresponding to the tracker to be fused in the minimum cosine distance set to be analyzed corresponding to the human body detection frame to be fused as the minimum cosine distance to be fused;
s2336: when the Mahalanobis distance to be fused is smaller than or equal to the first distance threshold and the minimum cosine distance to be fused is smaller than or equal to the second distance threshold, performing linear weighting on the Mahalanobis distance to be fused and the minimum cosine distance to be fused to obtain a corresponding distance fusion result between the human body detection frame to be fused and the tracker to be fused;
s2337: repeatedly executing the step of acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused until the extraction of all trackers to be analyzed in the tracker set to be analyzed is completed;
s2338: repeatedly executing the step of obtaining one human body detection frame from the human body detection frame set as the human body detection frame to be fused until the extraction of all the human body detection frames in the human body detection frame set is completed;
s2339: and determining a distance fusion result set according to all the distance fusion results.
According to the embodiment, only when the Mahalanobis distance to be fused is smaller than or equal to the first distance threshold and the minimum cosine distance to be fused is smaller than or equal to the second distance threshold, the Mahalanobis distance to be fused and the minimum cosine distance to be fused are subjected to linear weighting, so that the accuracy of cascade matching is improved, and the accuracy of target tracking is further improved.
For S2331, the first distance threshold and the second distance threshold may be obtained from a database, or the first distance threshold and the second distance threshold input by the user may be obtained, or the first distance threshold and the second distance threshold sent by the third-party application system may be obtained, or the first distance threshold and the second distance threshold may be written in a slave program file implementing the present application. The first distance threshold is a specific value. The second distance threshold is a specific value.
For S2336, when the mahalanobis distance to be fused is less than or equal to the first distance threshold, and the minimum cosine distance to be fused is less than or equal to the second distance threshold, it means that the mahalanobis distance to be fused and the minimum cosine distance to be fused simultaneously satisfy the requirement, at this time, the mahalanobis distance to be fused and the minimum cosine distance to be fused are linearly weighted, and data obtained by linear weighting is used as a corresponding distance fusion result between the human detection frame to be fused and the tracker to be fused.
When the mahalanobis distance to be fused is greater than the first distance threshold, or the minimum cosine distance to be fused is greater than the second distance threshold, it means that at least one of the mahalanobis distance to be fused and the minimum cosine distance to be fused does not meet the requirement at this time, and thus the mahalanobis distance to be fused and the minimum cosine distance to be fused are not linearly weighted.
For S2337, steps S2333 to S2337 are repeatedly performed until the extraction of all the trackers to be analyzed in the set of trackers to be analyzed is completed.
For S2338, the steps S2332 to S2338 are repeatedly performed until the extraction of all the human body detection frames in the human body detection frame set is completed.
For S2339, all the range fusion results are treated as a range fusion result set.
In an embodiment, the step of matching, by using a minimum cost algorithm, the human body detection frame in the human body detection frame set and the tracker to be analyzed in the tracker set to be analyzed according to the distance fusion result set to obtain the detection frame matching result corresponding to each human body detection frame in the human body detection frame set and the tracker matching result corresponding to each tracker to be analyzed in the tracker set to be analyzed includes:
s2341: sequencing the trackers to be analyzed in the tracker set to be analyzed by adopting a sequential sequencing method according to disappearance duration to obtain a sequenced tracker set;
s2342: and matching and calculating the human body detection frames in the human body detection frame set and the trackers to be analyzed in the sequenced tracker set according to a distance fusion result set by adopting the minimum cost algorithm to obtain the detection frame matching result corresponding to each human body detection frame in the human body detection frame set and the tracker matching result corresponding to each tracker to be analyzed in the tracker set to be analyzed.
According to the embodiment, the method for sequencing according to the disappearance duration and the minimum cost algorithm are used for cascade matching, so that the accuracy of cascade matching is further improved, and the accuracy of target tracking is further improved.
For S2341, a method of sorting sequentially according to disappearance duration is adopted, that is, the trackers to be analyzed that are long and short in disappearance duration are arranged in front, and the trackers to be analyzed that are long in disappearance duration are arranged in back.
For S2342, performing matching calculation on each human body detection frame in the human body detection frame set and each tracker to be analyzed in the ordered tracker set according to the numerical value of the distance fusion result in the distance fusion result set by using the minimum cost algorithm, so as to obtain the detection frame matching result corresponding to each human body detection frame in the human body detection frame set and the tracker matching result corresponding to each tracker to be analyzed in the tracker set to be analyzed.
Referring to fig. 2, the present application further provides a multi-target tracking apparatus, the apparatus including:
the data acquisition module 100 is used for acquiring a human body detection frame set and a tracker set to be analyzed of the target camera equipment;
the cascade matching module 200 is configured to perform cascade matching according to the human body detection frame set and the tracker set to be analyzed by using a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
the blocked area ratio determining module 300 is configured to calculate a blocked area ratio of a human detection frame to be analyzed according to the human detection frame set, so as to obtain a blocked area ratio, where the human detection frame to be analyzed is any one of the human detection frames whose detection frame matching result is successful;
the first updating module 400 is configured to obtain a blocked area threshold, and perform data updating on the tracker to be analyzed, which is successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed, the blocked area threshold, and the blocked area ratio.
In the embodiment, a multi-target tracking algorithm is adopted, cascade matching is carried out according to a human body detection frame set and a tracker set to be analyzed to obtain a plurality of detection frame matching results and a plurality of tracker matching results, then shielded area proportion calculation is carried out on the human body detection frame to be analyzed according to the human body detection frame set to obtain shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with successfully matched detection frame matching results, and finally data updating is carried out on the tracker to be analyzed which is successfully matched with the human body detection frame to be analyzed according to the human body detection frame to be analyzed, a shielded area threshold value and the shielded area proportion, so that different human body characteristic data updating modes are adopted on the tracker to be analyzed corresponding to the shielded and crossed human body detection frames according to the human body detection frame to be analyzed, the shielded area threshold value and the shielded area proportion, the human body characteristic data in the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, is prevented from being updated all the time during shielding and crossing, and the human body tracking accuracy is improved.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer equipment is used for storing data such as a multi-target tracking method and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a multi-objective tracking method. The multi-target tracking method comprises the following steps: acquiring a human body detection frame set and a tracker set to be analyzed of target camera equipment; performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results; according to the human body detection frame set, carrying out shielded area proportion calculation on a human body detection frame to be analyzed to obtain a shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with the detection frame matching result of successful matching; and acquiring a shielded area threshold, and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion.
In the embodiment, a multi-target tracking algorithm is adopted, cascade matching is carried out according to a human body detection frame set and a tracker set to be analyzed to obtain a plurality of detection frame matching results and a plurality of tracker matching results, then shielded area proportion calculation is carried out on the human body detection frame to be analyzed according to the human body detection frame set to obtain shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with successfully matched detection frame matching results, and finally data updating is carried out on the tracker to be analyzed which is successfully matched with the human body detection frame to be analyzed according to the human body detection frame to be analyzed, a shielded area threshold value and the shielded area proportion, so that different human body characteristic data updating modes are adopted on the tracker to be analyzed corresponding to the shielded and crossed human body detection frames according to the human body detection frame to be analyzed, the shielded area threshold value and the shielded area proportion, the human body characteristic data in the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, is prevented from being updated all the time during shielding and crossing, and the human body tracking accuracy is improved.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a multi-target tracking method, including the steps of: acquiring a human body detection frame set and a tracker set to be analyzed of target camera equipment; performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results; according to the human body detection frame set, carrying out shielded area proportion calculation on a human body detection frame to be analyzed to obtain a shielded area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with the detection frame matching result of successful matching; and acquiring a shielded area threshold, and updating data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion.
The executed multi-target tracking method obtains a plurality of detection frame matching results and a plurality of tracker matching results by adopting a multi-target tracking algorithm and performing cascade matching according to a human body detection frame set and a tracker set to be analyzed, then calculates the blocked area proportion of the human body detection frame to be analyzed according to the human body detection frame set to obtain the blocked area proportion, wherein the human body detection frame to be analyzed is any one of the human body detection frames with successfully matched detection frame matching results, and finally performs data updating on the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold value and the blocked area proportion, so that different human body characteristic data updating modes are adopted for the tracker to be analyzed corresponding to the blocked and crossed human body detection frames according to the human body detection frame to be analyzed, the blocked area threshold value and the blocked area proportion, the human body characteristic data in the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, is prevented from being updated all the time during shielding and crossing, and the human body tracking accuracy is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (9)

1. A method for multi-object tracking, the method comprising:
acquiring a human body detection frame set and a tracker set to be analyzed of target camera equipment;
performing cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
according to the human body detection frame set, calculating the shielded area proportion of the human body detection frame to be analyzed to obtain the shielded area proportion, wherein the human body detection frame to be analyzed is any human body detection frame of which the matching result of the detection frames in the human body detection frame set is successful;
acquiring a shielded area threshold, and updating data of a tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, in the tracker set to be analyzed according to the human body detection frame to be analyzed, the shielded area threshold and the shielded area proportion;
judging whether the shielded area proportion is larger than the shielded area threshold value or not;
when the shielded area proportion is larger than the shielded area threshold, updating Kalman filtering parameters and tracking loss counting parameters of the tracker to be analyzed, which are successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed;
when the shielded area proportion is smaller than or equal to the shielded area threshold, updating tracker human characteristic data, the Kalman filtering parameter and the tracking loss counting parameter of the tracker to be analyzed, which are successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed;
the step of calculating the shielded area proportion of the human body detection frame to be analyzed according to the human body detection frame set to obtain the shielded area proportion comprises the following steps:
extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed;
calculating the proportion of the area of the human body detection frame to be analyzed, which is covered by the human body detection frame except the human body detection frame to be analyzed in the human body detection frame set, in the area of the human body detection frame to be analyzed, and taking the calculated data as the covered area proportion corresponding to the human body detection frame to be analyzed;
and repeatedly executing the step of extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed until the human body detection frames in all the human body detection frames with the detection frame matching results of successful matching are extracted.
2. The multi-target tracking method according to claim 1, wherein after the step of obtaining the blocked area threshold and updating the data of the tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed, the blocked area threshold and the blocked area ratio, the method further comprises:
respectively establishing a tracker for each human body detection frame with failed matching according to the detection frame matching result to obtain a tracker set to be updated, and updating the tracker set to be updated into the tracker set to be analyzed;
acquiring a tracking loss time threshold;
adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed, the tracker matching result of which is matching failure, in the tracker set to be analyzed;
finding out the tracker with the tracking loss counting parameter larger than the tracking loss frequency threshold value from the tracker set to be analyzed to obtain a tracker set to be discarded;
and deleting the tracker set to be discarded from the tracker set to be analyzed.
3. The multi-target tracking method according to claim 2, wherein the step of adding 1 to the tracking loss count parameter corresponding to the tracker to be analyzed whose matching result is a matching failure in the set of trackers to be analyzed comprises:
acquiring a preset disappearing edge;
when the tracker to be analyzed with the tracker matching result of failed matching is crossed with the preset vanishing edge, taking the tracker to be analyzed as a tracker to be deleted;
when the tracker to be analyzed with the tracker matching result of matching failure does not intersect with the preset vanishing edge, taking the tracker to be analyzed as a reserved tracker;
deleting each tracker to be deleted from the tracker set to be analyzed;
and in the tracker set to be analyzed, adding 1 to the tracking loss count parameter of the tracker to be analyzed corresponding to each reserved tracker respectively.
4. The multi-target tracking method according to claim 1, wherein the step of obtaining a plurality of detection frame matching results and a plurality of tracker matching results by using a multi-target tracking algorithm and performing cascade matching according to the human body detection frame set and the tracker set to be analyzed comprises:
inputting each human body detection frame in the human body detection frame set into a preset feature extraction module for feature extraction, so as to obtain detection frame human body feature data corresponding to each human body detection frame in the human body detection frame set;
respectively performing position estimation according to Kalman filtering parameters corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain position estimation results corresponding to each tracker to be analyzed in the tracker set to be analyzed;
and adopting a Deep SORT algorithm to carry out cascade matching according to all the detection frame human characteristic data, all the position estimation results, the human detection frame set and the tracker set to be analyzed to obtain the detection frame matching results corresponding to the human detection frames in the human detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the tracker set to be analyzed.
5. The multi-target tracking method according to claim 4, wherein the step of obtaining the detection frame matching result corresponding to each human body detection frame in the human body detection frame set and the tracker matching result corresponding to each tracker to be analyzed in the tracker set to be analyzed by performing cascade matching on all the detection frame human body feature data, all the position estimation results, the human body detection frame set and the tracker set to be analyzed by using a Deep SORT algorithm includes:
performing mahalanobis distance calculation on each human body detection frame in the human body detection frame set and each position estimation result respectively to obtain a mahalanobis distance set to be analyzed, which corresponds to each human body detection frame in the human body detection frame set;
respectively carrying out minimum cosine distance calculation on the human body characteristic data of each detection frame and the human body characteristic data of the tracker corresponding to each tracker to be analyzed in the tracker set to be analyzed to obtain a minimum cosine distance set to be analyzed corresponding to each human body detection frame in the human body detection frame set;
performing distance fusion processing according to all the Mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set;
matching the human body detection frames in the human body detection frame set and the trackers to be analyzed in the trackers to be analyzed set according to the distance fusion result set by adopting a minimum cost algorithm to obtain the detection frame matching results corresponding to the human body detection frames in the human body detection frame set and the tracker matching results corresponding to the trackers to be analyzed in the trackers to be analyzed set.
6. The multi-target tracking method according to claim 5, wherein the step of performing distance fusion processing according to all the mahalanobis distance sets to be analyzed and all the minimum cosine distance sets to be analyzed to obtain a distance fusion result set comprises:
acquiring a first distance threshold and a second distance threshold;
acquiring one human body detection frame from the human body detection frame set as a human body detection frame to be fused;
acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused;
taking the Mahalanobis distance corresponding to the tracker to be fused in the Mahalanobis distance set to be analyzed corresponding to the human body detection frame to be fused as the Mahalanobis distance to be fused;
taking the minimum cosine distance corresponding to the tracker to be fused in the minimum cosine distance set to be analyzed corresponding to the human body detection frame to be fused as the minimum cosine distance to be fused;
when the Mahalanobis distance to be fused is smaller than or equal to the first distance threshold and the minimum cosine distance to be fused is smaller than or equal to the second distance threshold, performing linear weighting on the Mahalanobis distance to be fused and the minimum cosine distance to be fused to obtain a corresponding distance fusion result between the human body detection frame to be fused and the tracker to be fused;
repeatedly executing the step of acquiring one tracker to be analyzed from the tracker set to be analyzed as a tracker to be fused until the extraction of all trackers to be analyzed in the tracker set to be analyzed is completed;
repeatedly executing the step of obtaining one human body detection frame from the human body detection frame set as the human body detection frame to be fused until the extraction of all the human body detection frames in the human body detection frame set is completed;
and determining a distance fusion result set according to all the distance fusion results.
7. A multi-object tracking apparatus, the apparatus comprising:
the data acquisition module is used for acquiring a human body detection frame set and a tracker set to be analyzed of the target camera equipment;
the cascade matching module is used for carrying out cascade matching according to the human body detection frame set and the tracker set to be analyzed by adopting a multi-target tracking algorithm to obtain a plurality of detection frame matching results and a plurality of tracker matching results;
the shielded area proportion determining module is used for calculating the shielded area proportion of the human body detection frame to be analyzed according to the human body detection frame set to obtain the shielded area proportion, wherein the human body detection frame to be analyzed is any human body detection frame of which the matching result of the detection frames in the human body detection frame set is successful;
the first updating module is used for acquiring a blocked area threshold value, and updating data of a tracker to be analyzed, which is successfully matched with the human body detection frame to be analyzed, in the tracker set to be analyzed according to the human body detection frame to be analyzed, the blocked area threshold value and the blocked area proportion;
judging whether the shielded area proportion is larger than the shielded area threshold value or not;
when the shielded area proportion is larger than the shielded area threshold, updating Kalman filtering parameters and tracking loss counting parameters of the tracker to be analyzed, which are successfully matched with the human body detection frame to be analyzed, according to the human body detection frame to be analyzed;
when the shielded area proportion is smaller than or equal to the shielded area threshold, updating tracker human characteristic data, the Kalman filtering parameter and the tracking loss counting parameter of the tracker to be analyzed, which are successfully matched with the human detection frame to be analyzed, according to the human detection frame to be analyzed;
the step of calculating the shielded area proportion of the human body detection frame to be analyzed according to the human body detection frame set to obtain the shielded area proportion comprises the following steps:
extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed;
calculating the proportion of the area of the human body detection frame to be analyzed, which is covered by the human body detection frame except the human body detection frame to be analyzed in the human body detection frame set, in the area of the human body detection frame to be analyzed, and taking the calculated data as the covered area proportion corresponding to the human body detection frame to be analyzed;
and repeatedly executing the step of extracting one human body detection frame from all the human body detection frames with the detection frame matching results of successful matching as a human body detection frame to be analyzed until the human body detection frames in all the human body detection frames with the detection frame matching results of successful matching are extracted.
8. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202110640635.8A 2021-06-09 2021-06-09 Multi-target tracking method, device, equipment and storage medium Active CN113096160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110640635.8A CN113096160B (en) 2021-06-09 2021-06-09 Multi-target tracking method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110640635.8A CN113096160B (en) 2021-06-09 2021-06-09 Multi-target tracking method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113096160A CN113096160A (en) 2021-07-09
CN113096160B true CN113096160B (en) 2021-10-29

Family

ID=76664503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110640635.8A Active CN113096160B (en) 2021-06-09 2021-06-09 Multi-target tracking method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113096160B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629299A (en) * 2018-04-24 2018-10-09 武汉幻视智能科技有限公司 A kind of matched long-time multi-object tracking method of combination face and system
CN109816690A (en) * 2018-12-25 2019-05-28 北京飞搜科技有限公司 Multi-target tracking method and system based on depth characteristic
CN109886994A (en) * 2019-01-11 2019-06-14 上海交通大学 Adaptive sheltering detection system and method in video tracking
CN111652902A (en) * 2020-06-02 2020-09-11 浙江大华技术股份有限公司 Target tracking detection method, electronic equipment and device
CN111815674A (en) * 2020-06-23 2020-10-23 浙江大华技术股份有限公司 Target tracking method and device and computer readable storage device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106408591B (en) * 2016-09-09 2019-04-05 南京航空航天大学 A kind of anti-method for tracking target blocked
CN107657630A (en) * 2017-07-21 2018-02-02 南京邮电大学 A kind of modified anti-shelter target tracking based on KCF
CN110853078B (en) * 2019-10-30 2023-07-04 同济大学 On-line multi-target tracking method based on shielding pair
US11715213B2 (en) * 2020-06-26 2023-08-01 Intel Corporation Apparatus and methods for determining multi-subject performance metrics in a three-dimensional space
CN111862155B (en) * 2020-07-14 2022-11-22 中国电子科技集团公司第五十四研究所 Unmanned aerial vehicle single vision target tracking method aiming at target shielding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629299A (en) * 2018-04-24 2018-10-09 武汉幻视智能科技有限公司 A kind of matched long-time multi-object tracking method of combination face and system
CN109816690A (en) * 2018-12-25 2019-05-28 北京飞搜科技有限公司 Multi-target tracking method and system based on depth characteristic
CN109886994A (en) * 2019-01-11 2019-06-14 上海交通大学 Adaptive sheltering detection system and method in video tracking
CN111652902A (en) * 2020-06-02 2020-09-11 浙江大华技术股份有限公司 Target tracking detection method, electronic equipment and device
CN111815674A (en) * 2020-06-23 2020-10-23 浙江大华技术股份有限公司 Target tracking method and device and computer readable storage device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Simple Online and Realtime Tracking with a Deep Association Metric";Nicolai Wojke 等;《arXiv》;20170321;全文 *
"基于深度学习的车辆检测与跟踪***";谢金龙 等;《工业控制计算机》;20200731;第33卷(第7期);第2节 *

Also Published As

Publication number Publication date
CN113096160A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN108446585B (en) Target tracking method and device, computer equipment and storage medium
CN109035299B (en) Target tracking method and device, computer equipment and storage medium
CN107818573B (en) Target tracking method and device
US7940957B2 (en) Object tracker for visually tracking object motion
CN112288770A (en) Video real-time multi-target detection and tracking method and device based on deep learning
CN109492577B (en) Gesture recognition method and device and electronic equipment
JP5459674B2 (en) Moving object tracking system and moving object tracking method
CN109255360B (en) Target classification method, device and system
CN113192105B (en) Method and device for indoor multi-person tracking and attitude measurement
CN113191180B (en) Target tracking method, device, electronic equipment and storage medium
CN114429474A (en) Human body key point detection method and device and computer storage medium
CN113205138B (en) Face and human body matching method, equipment and storage medium
CN113033521B (en) Perimeter dynamic early warning method and system based on target analysis
CN112668524A (en) Multi-target tracking system and method
KR20230003346A (en) Target site tracking method, device, electronic device and readable storage medium
CN111402293A (en) Vehicle tracking method and device for intelligent traffic
CN112633205A (en) Pedestrian tracking method and device based on head and shoulder detection, electronic equipment and storage medium
CN110866428A (en) Target tracking method and device, electronic equipment and storage medium
CN113515977A (en) Face recognition method and system
CN113096160B (en) Multi-target tracking method, device, equipment and storage medium
CN112884804A (en) Action object tracking method and related equipment
CN112307897A (en) Pet tracking method based on local feature recognition and adjacent frame matching in community monitoring scene
CN112070035A (en) Target tracking method and device based on video stream and storage medium
CN110956649A (en) Method and device for tracking multi-target three-dimensional object
CN115410121A (en) Video-based automatic determination method for joint seal person, electronic device and storage medium

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
GR01 Patent grant
GR01 Patent grant