Multi-target tracking method and device, electronic equipment and storage medium

By using multi-objective tracking method and position offset map correlation technology in hospital smart wards, the problems of slow speed of traditional methods and high computing power consumption are solved, efficient personnel tracking management is achieved, and nursing quality and accuracy are improved.

CN118918146APending Publication Date: 2024-11-08PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411059774.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The personnel tracking and management methods of traditional hospital smart wards are too slow and consume too much computing power, which is difficult to meet the needs.

Method used

Using a multi-objective tracking method, multiple tracking targets are associated with the position offset map, and a pre-trained target detection model is used to identify the tracking targets in the video frame, and the position offset map of each frame is predicted to achieve the correlation of the target.

Benefits of technology

It greatly improves the speed of the algorithm, reduces computing power consumption, meets the personnel tracking and management needs of the hospital's smart ward, and improves the quality and accuracy of nursing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918146A_ABST
    Figure CN118918146A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-target tracking method and device, electronic equipment and a storage medium, and belongs to the technical field of digital medical treatment. The method comprises the following steps: acquiring a video frame containing a plurality of detection targets; inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame; determining target tracking information of each detection target; generating a position offset graph of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; and associating the detection target of the previous frame based on the position offset graph of the current frame until all video frames are traversed, and obtaining a tracking result of a plurality of detection targets. Based on this, according to the embodiment of the invention, a plurality of tracking targets are associated through the position offset graph, the tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, and especially when the tracking strategy is applied to the field of digital medical treatment, the personnel tracking management requirement of an intelligent ward of a hospital can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital medical technology, and in particular to a multi-target tracking method and device, an electronic device, and a storage medium. Background Art

[0002] The personnel tracking management of hospital smart wards is of great significance to improving the accuracy, efficiency and safety of ward management. By collecting information such as the patient's movement trajectory, the patient's motor ability can be evaluated and monitored, and changes in the patient's condition can be discovered and recorded in time, thereby providing doctors with more accurate treatment plans. However, traditional tracking methods are too slow and consume too much computing power to meet the personnel tracking management needs of hospital smart wards. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a multi-target tracking method and device, an electronic device and a storage medium, which associate multiple tracking targets through a position offset map. This tracking strategy can greatly improve the algorithm speed and reduce computing power consumption, especially when applied in the field of digital medicine, and can meet the personnel tracking and management needs of hospital smart wards.

[0004] To achieve the above object, a first aspect of an embodiment of the present application proposes a multi-target tracking method, the method comprising:

[0005] Get a video frame containing multiple detected targets;

[0006] Inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame;

[0007] Determining target tracking information of each of the detected targets, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier;

[0008] Generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame;

[0009] The detection target of the previous frame is associated based on the position offset map of the current frame until all the video frames are traversed to obtain tracking results of multiple detection targets.

[0010] In some embodiments, generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame includes:

[0011] Determine the center position of the detection target in the current frame;

[0012] Determine the center position of the detection target in the previous frame;

[0013] Determine a lateral offset and a longitudinal offset of the detection target according to the center position of the current frame and the center position of the previous frame;

[0014] Obtaining a position offset matrix according to the lateral offset and the longitudinal offset;

[0015] The position offset map is generated based on the position offset matrix.

[0016] In some embodiments, associating the detected target of the previous frame based on the position offset map of the current frame includes:

[0017] Determine a first center position of each of the detected targets in the previous frame;

[0018] Determine a second center position of each of the detection targets corresponding to the current frame based on the position offset map of the current frame;

[0019] calculating a plurality of distance values ​​between the first center position and each of the second center positions;

[0020] Determine the target center position corresponding to the shortest distance value from the multiple distance values;

[0021] The detected target of the previous frame is associated according to the target center position.

[0022] In some embodiments, the method further comprises:

[0023] The position offset map is optimized using a regression algorithm until a preset optimization target is reached, wherein the preset optimization target is expressed as follows:

[0024]

[0025] Among them, the position offset map predicted by the tth frame is expressed as a matrix W and H represent the width and height of the position offset map, respectively, and R represents the downsampling scaling factor. For the i-th target detection point, the center position of the target detection is The position offset is indexed by the center position: represents the position offset of the i-th point at time t; the actual position offset of the t-th frame relative to the previous frame is: and represents the i-th tracking target, represents the position offset of the i-th point at time t, and N represents the N tracking targets.

[0026] In some embodiments, the method further comprises:

[0027] Obtain the number of target trajectories being tracked through a multi-target tracking algorithm;

[0028] When the first detection target is not associated with the position offset map within a preset range and the number of target tracks is greater than the number of detection targets detected in the current frame, it is determined that the tracking of the first detection target is lost.

[0029] In some embodiments, the method further comprises:

[0030] Obtain the number of target trajectories being tracked through a multi-target tracking algorithm;

[0031] When the second detection target is not associated with the position offset map and the number of the detection targets detected in the current frame is greater than the number of all target trajectories, the second detection target is determined to be a newly added detection target, and a new identifier is allocated to the second detection target.

[0032] In some embodiments, the target detection model is a CNN network model, and the CNN network model includes ResNet50.

[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a multi-target tracking device, the device comprising:

[0034] An acquisition module, used to acquire a video frame containing multiple detection targets;

[0035] A detection module, used for inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame;

[0036] A determination module, configured to determine target tracking information of each of the detected targets, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier;

[0037] A generating module, configured to generate a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame;

[0038] An association module is used to associate the detection target of the previous frame based on the position offset map of the current frame until all the video frames are traversed to obtain tracking results of multiple detection targets.

[0039] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0040] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0041] The multi-target tracking method and device, electronic device and storage medium proposed in the present application obtain a video frame containing multiple detection targets; input the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detect each detection target in the current frame and the previous frame; determine the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generate a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associate the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is the main flow chart of the multi-target tracking method provided by the embodiment of the present application;

[0043] Figure 2 yes Figure 1 Flow chart of step S104 in FIG.

[0044] Figure 3 yes Figure 1 Flow chart of step S105 in FIG.

[0045] Figure 4 is a flowchart from step S401 to step S402;

[0046] Figure 5 is a flowchart from step S501 to step S502;

[0047] Figure 6 is a schematic diagram of the structure of a multi-target tracking device provided in an embodiment of the present application;

[0048] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0052] First, some nouns involved in this application are analyzed:

[0053] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0054] Digital medicine: It is a new type of modern medical treatment that applies modern computer technology and information technology to the entire medical process. It is the development direction and management goal of public medical care. The emergence of digital medical equipment has greatly enriched the connotation and capacity of medical information. From the visualization of one-dimensional information, such as important electrophysiological information such as electrocardiogram (ECG) and electroencephalogram (EEG); to two-dimensional information, such as medical imaging information such as CT, MRI, color ultrasound, and digital X-ray (DR); and then three-dimensional visualization, and even four-dimensional information can be obtained, such as a three-dimensional heart displayed in real time. This information has greatly enriched the doctor's diagnostic technology and brought medicine into a new era of visualized information.

[0055] Object tracking: It is an important research direction in the field of computer vision, which aims to identify and track the position, shape and dynamic information of specific objects from continuous image sequences. Object tracking can be applied to many fields, such as video surveillance, autonomous driving, robot navigation, virtual reality, etc. Its main goal is to detect and track specific targets in the video in order to achieve target positioning, posture estimation and behavior analysis.

[0056] Greedy matching algorithm: It is a target association algorithm based on a greedy strategy, which is used to match the detection results of the current frame with the tracking targets of the previous frame to determine which detection targets are associated with which tracking targets.

[0057] The personnel tracking management of hospital smart wards is of great significance to improving the accuracy, efficiency and safety of ward management. By collecting information such as the patient's movement trajectory, the patient's motor ability can be evaluated and monitored, and changes in the patient's condition can be discovered and recorded in time, thereby providing doctors with more accurate treatment plans. However, traditional tracking methods are too slow and consume too much computing power to meet the personnel tracking management needs of hospital smart wards.

[0058] Based on this, the embodiment of the present application provides a multi-target tracking method and device, an electronic device and a storage medium, obtains a video frame containing multiple detection targets; inputs the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detects each detection target in the current frame and the previous frame; determines the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generates a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associates the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward.

[0059] The multi-target tracking method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the multi-target tracking method in the embodiments of the present application is described.

[0060] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0061] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0062] The multi-target tracking method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The multi-target tracking method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the multi-target tracking method, etc., but is not limited to the above forms.

[0063] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0064] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0065] Figure 1 is an optional flowchart of the multi-target tracking method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.

[0066] Step S101, obtaining a video frame containing multiple detection targets;

[0067] Step S102, inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame;

[0068] Step S103, determining target tracking information of each detected target, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier;

[0069] Step S104, generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame;

[0070] Step S105 , associating the detection target of the previous frame based on the position offset map of the current frame, until all video frames are traversed to obtain tracking results of multiple detection targets.

[0071] In step S101 of some embodiments, a video frame containing multiple detection targets is obtained. As for the method of obtaining video frames, multiple detection targets can be photographed by a camera device to obtain a video frame containing multiple detection targets. In the scenario of a smart hospital ward, video frame data such as the patient's activity status, position, and leaving the room can be collected by a camera and other equipment. The collected video frame data can also be pre-processed to facilitate the subsequent use of a motion detection algorithm to analyze the collected video frame data to determine whether the patient in the ward has shifted or moved; or, through a target tracking algorithm, the collected video frame data is analyzed to detect whether the patient has left the bed or left the room. If the patient has left the bed or the room, an alarm can be sent to notify the nurse or doctor to handle it.

[0072] In step S102 of some embodiments, the current frame and the previous frame in the video frame are input into a pre-trained target detection model for target detection, and each detection target in the current frame and the previous frame is detected. The target detection model can be a CNN network model, and the CNN network model includes but is not limited to ResNet50. All possible detection targets are detected in the current frame and the previous frame using the pre-trained target detection model. In the scenario of a smart hospital ward, the current frame and the previous frame in the video frame captured by the camera device are input into a pre-trained target detection model for target detection to identify each patient in the current frame and the previous frame.

[0073] In step S103 of some embodiments, target tracking information of each detected target is determined, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier. The current frame can be represented as The previous frame is represented as Different from the traditional detection model, the target detection model of this application is used to track the detection target and output more target tracking information. If N is found at time t-1 t-1 The output of these tracking targets is as follows:

[0074]

[0075] Among them, p represents the center position of the detected target s represents the size of the detected target w represents the confidence of the detected target, and id represents the identifier of the detected target.

[0076] In step S104 of some embodiments, a position offset map of the current frame is generated based on the target tracking information of the current frame and the target tracking information of the previous frame. The position offset map can be represented as a matrix Where W and H represent the width and height of the image respectively, and R represents the downsampling scaling factor (default R = 4). is a matrix, each element of which contains two values, representing the distance of the horizontal offset and the vertical offset respectively. is a matrix that can index the position offset change through the position. Specifically, the position offset can be indexed based on the center position of the detected target at different times. The position offset of each detected target includes the horizontal offset distance value and the vertical offset distance value. The matrix Each element in contains two values: the horizontal offset distance value and the vertical offset distance value, thus obtaining the position offset matrix Based on the position offset matrix Generate the position offset map of the current frame. In the hospital smart ward scenario, the patient position offset map of the current frame is predicted based on the patient target information of the current frame and the patient target information of the previous frame, so as to track the patient and record the patient's position, time and other information.

[0077] In step S105 of some embodiments, the detection target of the previous frame is associated based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. A greedy matching algorithm can be used to achieve association. For example, for each target detected in the previous frame, by calculating the distance between its center point and the center points of all detected targets in the current frame, the closest point is always matched first to associate with each target detected in the previous frame until all video frames are traversed to obtain the tracking results of multiple detection targets. Associating the tracking targets through the position offset map can greatly improve the algorithm speed and reduce the computing power consumption.

[0078] The multi-target tracking method used in the embodiment of the present application can automatically complete the patient monitoring and tracking work, reduce the workload of medical staff, enable them to focus more on patient care, and improve the quality of care. By collecting information such as the patient's movement trajectory, the patient's motor ability can be evaluated and monitored, and the patient's condition changes can be discovered and recorded in time, thereby providing doctors with more accurate treatment plans.

[0079] Steps S101 to S105 shown in the embodiment of the present application are to obtain a video frame containing multiple detection targets; input the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detect each detection target in the current frame and the previous frame; determine the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generate a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associate the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward.

[0080] See also Figure 2 In some embodiments, step S104 may include but is not limited to steps S201 to S205:

[0081] Step S201, determining the center position of the detection target in the current frame;

[0082] Step S202, determining the center position of the detection target in the previous frame;

[0083] Step S203, determining the lateral offset and the longitudinal offset of the detection target according to the center position of the current frame and the center position of the previous frame;

[0084] Step S204, obtaining a position offset matrix according to the lateral offset and the longitudinal offset;

[0085] Step S205: generating a position offset map based on the position offset matrix.

[0086] In some embodiments, the center position of the detection target in the current frame and the center position in the previous frame can be determined based on the current frame image and the previous frame image input to the target detection model, and then the lateral offset and longitudinal offset of the detection target can be determined based on the center position of the current frame and the center position of the previous frame, and a position offset matrix is ​​obtained based on the lateral offset and the longitudinal offset, and a position offset map is generated based on the position offset matrix. Taking the tth frame as an example, the predicted position offset map can be expressed as the position offset matrix Where W and H represent the width and height of the image, respectively, R represents the downsampling scaling factor (default R = 4), and the position offset matrix is a matrix, each element of which contains two values, representing the distance of the horizontal offset and the vertical offset respectively. is a matrix that can index the position offset change through the position. For example: for the i-th target detection point, the center position of the target detection is The position offset can be indexed through this center position, that is: Notice, Represents the position offset of the i-th point at time t.

[0087] Based on this, in the hospital smart ward scenario, the patient position offset map of the current frame is predicted according to the patient target information of the current frame and the patient target information of the previous frame, so as to track the patient and record the patient's location, time and other information.

[0088] See also Figure 3 In some embodiments, step S105 may include but is not limited to steps S301 to S305:

[0089] Step S301, determining the first center position of each detected target in the previous frame;

[0090] Step S302, determining a second center position of each detection target corresponding to the current frame based on the position offset map of the current frame;

[0091] Step S303, calculating a plurality of distance values ​​between the first center position and each second center position;

[0092] Step S304, determining the target center position corresponding to the shortest distance value from the multiple distance values;

[0093] Step S305, associating the detected target of the previous frame according to the target center position.

[0094] In some embodiments, a greedy matching algorithm can be used to associate the position offset map of the current frame with the detected target of the previous frame. Specifically, for each target detected in the previous frame, the first center position of each detected target in the previous frame is determined, and the second center position corresponding to each detected target in the current frame is determined in the position offset map of the current frame. The distance between the first center point and all the second center points detected in the current frame is calculated, and the target center position corresponding to the shortest distance value is determined from multiple distance values, that is, the closest point is always matched first, and the detected target of the previous frame is associated with the target center position to associate with each target detected in the previous frame until all video frames are traversed to obtain the tracking results of multiple detected targets. Associating tracking targets through position offset maps can greatly improve the algorithm speed and reduce computing power consumption.

[0095] In some embodiments, the multi-target tracking method of the embodiment of the present application may further include:

[0096] The position offset map is optimized using a regression algorithm until the preset optimization target is reached, where the preset optimization target is expressed as follows:

[0097]

[0098] Among them, the position offset map predicted by the tth frame is expressed as a matrix W and H represent the width and height of the position offset map, respectively. R represents the downsampling scaling factor. The default value is R = 4. For the i-th target detection point, the center position of the target detection is Index the position offset by the center position: represents the position offset of the i-th point at time t; the actual position offset of the t-th frame relative to the previous frame is: and represents the i-th tracking target, represents the position offset of the i-th point at time t, and N represents the N tracking targets.

[0099] In target tracking, regression algorithms can be used to predict the position, size, angle, and other information of the target. Using regression algorithms to optimize the position offset map can improve the accuracy, robustness, and tracking accuracy of target positioning, accelerate the convergence speed of the algorithm, and enhance the algorithm's adaptability to complex scenes, thereby improving the performance of target detection and target tracking.

[0100] See also Figure 4 In some embodiments, the multi-target tracking method of the embodiment of the present application may also include but is not limited to steps S401 to S402:

[0101] Step S401, obtaining the number of target trajectories being tracked by a multi-target tracking algorithm;

[0102] Step S402: If the first detected target is not associated with the position offset map within a preset range and the number of target tracks is greater than the number of detected targets in the current frame, it is determined that the tracking of the first detected target is lost.

[0103] In some embodiments, for data association, in addition to solving the above-mentioned target matching problem, it is also necessary to solve the target tracking loss problem. As for how to determine the target tracking loss, the number of target tracks being tracked can be obtained through a multi-target tracking algorithm. If the detected target is not associated with the position offset map within a preset range, such as a circle with a diameter of k, and the number of target tracks is greater than the number of detected targets detected in the current frame, then the detection target is considered to be lost.

[0104] In the target tracking system, by determining when the tracking of old targets should be ended, it helps to maintain the accuracy of tracking and prevent the tracker from continuing to track targets that have disappeared or are no longer visible. Through this mechanism, the target tracking system can release resources in time and stop tracking old targets that cannot be matched in the new frame, so as to better deal with the appearance, disappearance or occlusion of the target and improve the efficiency and accuracy of the tracking system. Based on this, determining that the tracking of old detected targets is lost is a strategy for determining when the tracking of old targets should be stopped to ensure that the tracking system can effectively deal with the dynamic changes and appearance of targets. This tracking strategy can greatly improve the algorithm speed and reduce computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of smart wards in hospitals.

[0105] See also Figure 5 In some embodiments, the multi-target tracking method of the embodiment of the present application may also include but is not limited to steps S501 to S502:

[0106] Step S501, obtaining the number of target trajectories being tracked by a multi-target tracking algorithm;

[0107] Step S502: when the second detection target is not associated with the position offset map and the number of detection targets detected in the current frame is greater than the number of all target trajectories, determine that the second detection target is a newly added detection target and assign a new identifier to the second detection target.

[0108] In some embodiments, for data association, in addition to solving the above-mentioned target matching problem, it is also necessary to solve the problem of adding new targets. As for how to determine the presence of new targets, the number of target tracks being tracked can be obtained through a multi-target tracking algorithm. If the detected target is not associated with a position offset map, and the number of detected targets detected in the current frame is greater than the number of all target track tracks, the detected target is regarded as a new detected target, and a new identifier ID is assigned to the detected target.

[0109] Based on this, the target tracking system can effectively handle newly appeared targets in the current frame and ensure accurate tracking of these targets. This helps the tracking system to promptly identify and assign new IDs to new targets and start tracking them. Assigning new IDs ensures that the system can correctly distinguish and track each newly appeared target and avoids confusion between tracking information between different targets, thereby improving the accuracy and stability of the entire target tracking system. Therefore, assigning IDs to newly detected targets is an important strategy in the target tracking system, which is used to handle newly appeared targets, assign new IDs to them, and ensure that the target tracking system can effectively track these new targets, thereby improving the performance and efficiency of the target tracking system. This tracking strategy can greatly increase the speed of the algorithm and reduce computing power consumption, especially when applied in the field of digital medicine, and can meet the personnel tracking management needs of smart wards in hospitals.

[0110] The multi-target tracking method of the present application is further explained below in conjunction with specific embodiments.

[0111] The personnel tracking management of hospital smart wards is of great significance to improving the accuracy, efficiency and safety of ward management. The multi-target tracking process for hospital ward management is as follows:

[0112] (1) Data collection and processing: Data such as patient activity status, location, and leaving the room are collected through cameras and other equipment, and the collected data are pre-processed.

[0113] (2) Motion detection: The collected data is analyzed using motion detection algorithms to determine whether the patients in the ward have shifted or moved.

[0114] (3) Target tracking: Target tracking is performed on the motion detection results. The patient is tracked through a multi-target tracking algorithm, and the patient's location, time, and other information are recorded.

[0115] (4) Bed or room leaving detection: Through the target tracking algorithm, it is detected whether the patient has left the bed or room. If so, an alarm is sent to notify the nurse or doctor to handle the situation.

[0116] (5) Data storage and analysis: The collected video data and patient information are stored in the database, and historical data can be viewed at any time for statistical analysis and optimization management.

[0117] (6) System feedback: Based on the output results of multi-target tracking, the system will provide visual feedback, such as displaying the patient’s real-time location and movement trajectory, to help medical staff better manage the ward.

[0118] Among them, in steps (2), (3), and (4), the traditional tracking method is too slow and consumes too much computing power. To address this problem, this paper proposes a tracking algorithm based on "position offset prediction". First, the target detection algorithm is used to identify all tracking targets. Then, the position offset map of each frame is predicted, and the tracking target is associated with the position offset map. This strategy can greatly improve the algorithm speed and reduce computing power consumption.

[0119] The first step is target detection for tracking: use the pre-trained target detection model to detect all possible targets in the current frame and the previous frame, and calculate their center points. The current frame is represented by The previous frame is represented by Different from the traditional detection model, the target detection used for tracking has more output content. If N is found at time t-1 t-1 The output of these tracking targets is as follows:

[0120]

[0121] Where p represents the center position of the detected target s represents the size of the detected target w represents the confidence of the detection and id represents the identifier.

[0122] The second step is to associate the target based on "position offset prediction". This article associates the detected target of the previous frame through "position offset prediction", as follows:

[0123] In step 2.1, we design a neural network based method to predict the position offset.

[0124] (1) The current frame of the neural network input Image, detection target, previous frame images and predicted targets.

[0125] (2) Output of the neural network: position offset map of the current frame.

[0126] (3) The structure of the neural network: ordinary CNN network, such as ResNet50.

[0127] (1) For the tth frame, the predicted position offset map is represented as a matrix Where W and H represent the width and height of the image respectively, and R represents the downsampling scaling factor (default R = 4). is a matrix, each element of which contains two values, representing the distance of the horizontal offset and the vertical offset respectively. is a matrix that can index the position offset change through the position. For example: for the i-th target detection point, the center position of the target detection is The position offset can be indexed through this center position, that is: Notice, represents the position offset of the i-th point at time t,

[0128] (2) The actual position offset of the tth frame relative to the previous frame is: in, and represents the i-th tracking target.

[0129] Then, using this position offset map, the regression algorithm can be optimized. The optimization goal is as follows:

[0130]

[0131] Where N represents N tracking targets.

[0132] Step 2.2: Association based on greedy matching algorithm. Through step 2.1, we can get the optimized position offset prediction map. Then, a greedy matching algorithm can be used to achieve association. For each object detected in the previous frame, the distance between its center point and the center points of all detected objects in the current frame is calculated, and the closest point is always matched first.

[0133] Step 2.3, target loss and target addition. Data association solves three states: target loss, target matching, and target addition. Step (2.2) only solves the data matching problem, but does not solve the target loss and target addition problems:

[0134] (1) Old track lost: If there is no matching prior detection within the circle of diameter k, and the number of tracks is greater than the number of detected objects, then the old track is considered lost.

[0135] (2) New track assignment: For unassociated targets with more targets than tracks, they are considered as newly appeared targets and assigned a new ID.

[0136] Step 3: Repeat the above steps until all video frames are processed.

[0137] The multi-target tracking method used in the embodiment of the present application can automatically complete the patient monitoring and tracking work, reduce the workload of medical staff, enable them to focus more on patient care, and improve the quality of care. By collecting information such as the patient's movement trajectory, the patient's motor ability can be evaluated and monitored, and the patient's condition changes can be discovered and recorded in time, thereby providing doctors with more accurate treatment plans.

[0138] The embodiment of the present application obtains a video frame containing multiple detection targets; inputs the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detects each detection target in the current frame and the previous frame; determines the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generates a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associates the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward.

[0139] See also Figure 6 The embodiment of the present application also provides a multi-target tracking device, which can implement the above multi-target tracking method, and the device includes:

[0140] An acquisition module 610 is used to acquire a video frame containing multiple detection targets;

[0141] A detection module 620 is used to input the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detect each detection target in the current frame and the previous frame;

[0142] A determination module 630, configured to determine target tracking information of each detected target, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier;

[0143] A generating module 640, configured to generate a position offset map of a current frame according to target tracking information of a current frame and target tracking information of a previous frame;

[0144] The association module 650 is used to associate the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain tracking results of multiple detection targets.

[0145] In some embodiments of the present application, the acquisition module 610 acquires a video frame containing multiple detection targets; the detection module 620 inputs the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detects each detection target in the current frame and the previous frame; the determination module 630 determines the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; the generation module 640 generates a position offset map of the current frame based on the target tracking information of the current frame and the target tracking information of the previous frame; the association module 650 associates the detection target of the previous frame based on the position offset map of the current frame, until all video frames are traversed to obtain the tracking results of multiple detection targets.

[0146] In some embodiments of the present application, a video frame containing multiple detection targets is obtained. As for the method of obtaining video frames, multiple detection targets can be photographed by a camera device to obtain a video frame containing multiple detection targets. In the scenario of a smart hospital ward, video frame data such as the patient's activity status, position, and leaving the room can be collected by a camera and other equipment, and the collected video frame data can also be pre-processed to facilitate the subsequent use of a motion detection algorithm to analyze the collected video frame data to determine whether the patient in the ward has shifted or moved; or, through a target tracking algorithm, the collected video frame data is analyzed to detect whether the patient has left the bed or left the room. If the patient has left the bed or room, an alarm can be sent to notify the nurse or doctor to handle it.

[0147] In some embodiments of the present application, the current frame and the previous frame in the video frame are input into a pre-trained target detection model for target detection, and each detection target in the current frame and the previous frame is detected. The target detection model can be a CNN network model, and the CNN network model includes but is not limited to ResNet50. All possible detection targets are detected in the current frame and the previous frame using a pre-trained target detection model. In the scenario of a smart hospital ward, the current frame and the previous frame in the video frame captured by the camera device are input into a pre-trained target detection model for target detection to identify each patient in the current frame and the previous frame.

[0148] In some embodiments of the present application, target tracking information of each detected target is determined, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier. The current frame can be represented as The previous frame is represented as Different from the traditional detection model, the target detection model of this application is used to track the detection target and output more target tracking information. If N is found at time t-1 t-1 The output of these tracking targets is as follows:

[0149]

[0150] Among them, p represents the center position of the detected target s represents the size of the detected target w represents the confidence of the detected target, and id represents the identifier of the detected target.

[0151] In some embodiments of the present application, a position offset map of the current frame is generated based on the target tracking information of the current frame and the target tracking information of the previous frame. The position offset map can be represented as a matrix Where W and H represent the width and height of the image respectively, and R represents the downsampling scaling factor (default R = 4). is a matrix, each element of which contains two values, representing the distance of the horizontal offset and the vertical offset respectively. is a matrix that can index the position offset change through the position. Specifically, the position offset can be indexed based on the center position of the detected target at different times. The position offset of each detected target includes the horizontal offset distance value and the vertical offset distance value. The matrix Each element in contains two values: the horizontal offset distance value and the vertical offset distance value, thus obtaining the position offset matrix Based on the position offset matrix Generate the position offset map of the current frame. In the hospital smart ward scenario, the patient position offset map of the current frame is predicted based on the patient target information of the current frame and the patient target information of the previous frame, so as to track the patient and record the patient's position, time and other information.

[0152] In some embodiments of the present application, the detection target of the previous frame is associated based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. A greedy matching algorithm can be used to achieve association. For example, for each target detected in the previous frame, by calculating the distance between its center point and the center points of all detected targets in the current frame, the closest point is always matched to associate with each target detected in the previous frame until all video frames are traversed to obtain the tracking results of multiple detection targets. Associating tracking targets through position offset maps can greatly increase the algorithm speed and reduce computing power consumption.

[0153] Based on this, in the multi-target tracking device of an embodiment of the present application, the acquisition module 610 acquires a video frame containing multiple detection targets; the detection module 620 inputs the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detects each detection target in the current frame and the previous frame; the determination module 630 determines the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; the generation module 640 generates a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; the association module 650 associates the detection target of the previous frame based on the position offset map of the current frame, until all video frames are traversed to obtain the tracking results of multiple detection targets. The present application obtains a video frame containing multiple detection targets; inputs the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detects each detection target in the current frame and the previous frame; determines the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generates a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associates the detection target of the previous frame based on the position offset map of the current frame until all video frames are traversed to obtain the tracking results of multiple detection targets. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward.

[0154] The specific implementation of the multi-target tracking device is basically the same as the specific implementation of the multi-target tracking method described above, and will not be repeated here.

[0155] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned multi-target tracking method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0156] See also Figure 7 , Figure 7 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0157] The processor 701 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0158] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 702 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 702, and the processor 701 is used to call and execute the multi-target tracking method of the embodiment of the present application, that is, by obtaining a video frame containing multiple detection targets; inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame; determining the target tracking information of each detection target, wherein the target tracking information includes a center position, size, confidence and identifier; generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associating the detection target of the previous frame based on the position offset map of the current frame, until all video frames are traversed, and tracking results of multiple detection targets are obtained. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated through the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of hospital smart wards.

[0159] The input / output interface 703 is used to implement information input and output.

[0160] The communication interface 704 is used to realize the communication interaction between this device and other devices. Communication can be realized through wired methods (such as USB, network cable, etc.) or wireless methods (such as mobile network, WI FI, Bluetooth, etc.).

[0161] The bus transmits information between various components of the device (eg, the processor 701 , the memory 702 , the input / output interface 703 , and the communication interface 704 ).

[0162] The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 are connected to each other in communication within the device via a bus.

[0163] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned multi-target tracking method is implemented.

[0164] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0165] The multi-target tracking method, multi-target tracking device, electronic device and storage medium provided by the embodiment of the present application, by obtaining a video frame containing multiple detection targets; inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame; determining the target tracking information of each detection target, wherein the target tracking information includes the center position, size, confidence and identifier; generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; associating the detection target of the previous frame based on the position offset map of the current frame, until all video frames are traversed, and the tracking results of multiple detection targets are obtained. By using the target detection model to identify the tracking target of the video frame, and then predicting the position offset map of each frame, the tracking target is associated with the position offset map. Therefore, the multi-target tracking strategy of the present invention can greatly improve the algorithm speed and reduce the computing power consumption. Based on this, the embodiment of the present application can associate multiple tracking targets through the position offset map. This tracking strategy can greatly improve the algorithm speed and reduce the computing power consumption, especially when applied in the field of digital medicine, it can meet the personnel tracking management needs of the hospital smart ward.

[0166] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as a computer-readable program, a data structure, a program module or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer-readable programs, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0167] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0168] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0169] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0171] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0172] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0173] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0174] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0177] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A multi-target tracking method, characterized in that: The method comprises: Get a video frame containing multiple detected targets; Inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame; Determining target tracking information of each of the detected targets, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier; Generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; The detection target of the previous frame is associated based on the position offset map of the current frame until all the video frames are traversed to obtain tracking results of multiple detection targets.

2. The method according to claim 1, characterized in that The generating a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame includes: Determine the center position of the detection target in the current frame; Determine the center position of the detection target in the previous frame; Determine a lateral offset and a longitudinal offset of the detection target according to the center position of the current frame and the center position of the previous frame; Obtaining a position offset matrix according to the lateral offset and the longitudinal offset; The position offset map is generated based on the position offset matrix.

3. The method according to claim 1, characterized in that: The associating the detection target of the previous frame based on the position offset map of the current frame comprises: Determine a first center position of each of the detected targets in the previous frame; Determine a second center position of each of the detection targets corresponding to the current frame based on the position offset map of the current frame; calculating a plurality of distance values ​​between the first center position and each of the second center positions; Determine the target center position corresponding to the shortest distance value from the multiple distance values; The detected target of the previous frame is associated according to the target center position.

4. The method according to claim 1, characterized in that: The method further comprises: The position offset map is optimized using a regression algorithm until a preset optimization target is reached, wherein the preset optimization target is expressed as follows: Among them, the position offset map predicted by the tth frame is expressed as a matrix W and H represent the width and height of the position offset map, respectively, and R represents the downsampling scaling factor. For the i-th target detection point, the center position of the target detection is The position offset is indexed by the center position: represents the position offset of the i-th point at time t; the actual position offset of the t-th frame relative to the previous frame is: and represents the i-th tracking target, represents the position offset of the i-th point at time t, and N represents the N tracking targets.

5. The method according to claim 1, characterized in that: The method further comprises: Obtain the number of target trajectories being tracked through a multi-target tracking algorithm; When the first detection target is not associated with the position offset map within a preset range and the number of target tracks is greater than the number of detection targets detected in the current frame, it is determined that the tracking of the first detection target is lost.

6. The method according to claim 1, characterized in that The method further comprises: Obtain the number of target trajectories being tracked through a multi-target tracking algorithm; When the second detection target is not associated with the position offset map and the number of the detection targets detected in the current frame is greater than the number of all target trajectories, the second detection target is determined to be a newly added detection target, and a new identifier is allocated to the second detection target.

7. The method according to any one of claims 1 to 6, characterized in that: The target detection model is a CNN network model, and the CNN network model includes ResNet50.

8. A multi-target tracking device, characterized in that: The device comprises: An acquisition module, used to acquire a video frame containing multiple detection targets; A detection module, used for inputting the current frame and the previous frame in the video frame into a pre-trained target detection model for target detection, and detecting each detection target in the current frame and the previous frame; A determination module, configured to determine target tracking information of each of the detected targets, wherein the target tracking information includes a center position, a size, a confidence level, and an identifier; A generating module, configured to generate a position offset map of the current frame according to the target tracking information of the current frame and the target tracking information of the previous frame; An association module is used to associate the detection target of the previous frame based on the position offset map of the current frame until all the video frames are traversed to obtain tracking results of multiple detection targets.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the multi-target tracking method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the multi-target tracking method according to any one of claims 1 to 7 is implemented.