Behavior recognition method, system and electronic device based on cross-camera multi-target tracking
Through the cross-camera multi-target tracking method, continuous data from multiple cameras are used for behavior recognition, which solves the problems of missed detection and false detection in single-frame image technology, improves the accuracy and reliability of behavior recognition, and provides solutions for operation scenarios such as power infrastructure. Provides efficient security management and control solutions.
Patent Information
- Application Number
- CN202410117750.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-01-29
AI Technical Summary
Existing behavior recognition technology based on single-frame images has problems with high missed detections and high false detections in complex operating environments, resulting in insufficient accuracy and reliability, and requires a lot of manual inspection and determination of recognition results.
A cross-camera multi-target tracking method is used to identify behaviors through continuous time series data from multiple cameras. The Hungarian algorithm and greedy algorithm are used for target matching. Combined with pedestrian detection and re-identification models, unified numbers are assigned and comprehensive behavioral discrimination is performed.
It significantly improves the accuracy of behavior recognition, reduces the possibility of misjudgment and missed detection, provides highly reliable safety management and control technology, reduces dependence on manual labor, and improves safety management levels.
Smart Images

Figure CN117953580B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of behavior recognition technology, and more specifically to a behavior recognition method, system and electronic equipment based on cross-camera multi-target tracking. Background Art
[0002] With the rapid development of society, the situation of personnel safety management and control in working scenarios such as power infrastructure is becoming increasingly severe. Especially in complex working scenarios, ensuring the safety of workers has become a huge challenge. Compared with the traditional manual inspection method, there are currently behavioral recognition methods based on computer vision. Although they can reduce certain labor costs, most of the existing technologies are based on single-frame images, which show obvious deficiencies when dealing with dynamic and changeable complex working environments. Due to the lack of in-depth analysis of the time dimension, these technologies often have problems with high missed detections and high false detections, resulting in limited accuracy and reliability. Safety supervisors are still required to conduct a lot of manual investigations and determine the recognition results.
[0003] Therefore, in view of these limitations of the prior art, how to provide a behavior recognition method, system and electronic device based on cross-camera multi-target tracking is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] In view of this, the present invention provides a behavior recognition method, system and electronic device based on cross-camera multi-target tracking. The method utilizes the multi-camera multi-view monitoring system commonly present in power operation scenes, and associates the same personnel captured by different cameras through a cross-camera multi-target tracking algorithm, and assigns a unified personnel number, thereby realizing comprehensive judgment using the behavior information of personnel with the same number in a specific time period. The advantage of this method is that it does not rely solely on static single-frame images, but combines multi-frame data in a continuous time series of multiple cameras, thereby providing more comprehensive contextual information for behavior recognition, effectively improving the accuracy of behavior recognition, and greatly reducing the possibility of misjudgment and missed detection, providing highly reliable technical support for safety management and control in operation scenes such as power infrastructure.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A behavior recognition method based on cross-camera multi-target tracking, comprising:
[0007] S100: Acquire real-time video image data of multiple cameras in the scene;
[0008] S200: regionally locating the targets in all frames of all cameras by using the trained pedestrian detection model to obtain the regional coordinates of all targets;
[0009] S300: For a single camera, the regional coordinates of all targets in the current frame and the regional coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera, and the matching targets are assigned the same personnel number to obtain the target information of the current frame;
[0010] For cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are used to calculate the appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, and the target's personnel number is corrected according to the matching result;
[0011] S400: performing behavior recognition on all targets in the current frames of all cameras, and assigning a corresponding preliminary behavior label to each target;
[0012] S500: combining preliminary behavior labels of the same person number in previous adjacent specific frames of multiple cameras, determining the person behavior category according to a preset comprehensive discrimination strategy, and obtaining a comprehensive behavior discrimination result;
[0013] S600: Modify the preliminary behavior labels of the targets in the current frames of all cameras according to the comprehensive behavior identification results, and output the target areas and behavior labels involved in the behaviors in a visual manner in the image.
[0014] Preferably, the multi-camera setting of S100 is as follows: for a specific application scenario, multiple cameras are arranged at different positions and heights to obtain real-time video image data of different viewing angles of the scene and provide more comprehensive spatial information.
[0015] Preferably, the S200 includes:
[0016] Build a pedestrian detection model based on the F2DNet pedestrian detection framework;
[0017] Obtain the COCO dataset and pre-train the pedestrian detection model;
[0018] Acquire CrowdHuman pedestrian dataset, Cityperson pedestrian dataset, ETHZ pedestrian dataset, MOT17 multi-target tracking data, and MOT20 multi-target tracking data, and train the pedestrian detection model to obtain a trained pedestrian detection model;
[0019] Input the current frame image of any camera into the trained pedestrian detection model, and output the area coordinates of all targets in the current frame, expressed as:
[0020]
[0021] Among them, i represents the i-th target in the current frame, c represents the c-th camera in the current frame, and They are the horizontal and vertical coordinates of the lower left corner of the target area of the current frame, and They are respectively the length and width of the target area of the current frame.
[0022] Preferably, in S300, for a single camera, the region coordinates of all targets in the current frame and the region coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera, including:
[0023] S310: For target matching within a single camera, input the region coordinates of all targets in the current frame and the previous frame. The region coordinates of the target in the previous frame are:
[0024]
[0025] Among them, j represents the jth target in the previous frame, v represents the vth camera in the current frame, and are the horizontal and vertical coordinates of the lower left corner of the target area in the previous frame, and are the length and width of the target area in the previous frame respectively;
[0026] S311: Use the configured Kalman filter to predict the positions of all targets in the previous frame, and obtain the regional coordinates of the predicted targets as follows:
[0027]
[0028] in, and are the horizontal and vertical coordinates of the lower left corner of the predicted target area of the previous frame, and The length and width of the target area predicted in the previous frame respectively;
[0029] S312: Use IoU as a measurement function to calculate the position similarity of all targets in the current frame and all predicted targets in the previous frame:
[0030]
[0031] Among them, for single-camera target matching, c and v in the function are equal;
[0032] S313: Using the position similarity as the matching basis, the Hungarian method is used to calculate the matching degree between the targets. The matched targets are regarded as the same person and are assigned the same personnel number. The primary target information after the target matching in the single camera of the current frame is output as follows:
[0033]
[0034] in, The personnel number.
[0035] Preferably, in S300, for cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are calculated for appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, including:
[0036] S320: inputting the area coordinates and personnel numbers of all targets after the current frame of the multi-cameras is matched with the targets in the single camera;
[0037] S321: extracting the appearance features of pedestrians in all target areas through the trained pedestrian re-identification model and adding them to the primary target information of the current frame to obtain the secondary target information of the current frame;
[0038] S322: according to the camera number sequence, all the targets in the first camera are respectively compared with all the targets in other cameras one by one according to the appearance features to calculate the cosine similarity as the appearance similarity;
[0039] S323: Using appearance similarity as a matching basis, a greedy algorithm is used to complete target matching between different cameras. The matched targets are regarded as the same person, and the personnel numbers of the targets in other cameras are corrected based on the personnel number of the target in the first camera.
[0040] Preferably, the S321 includes:
[0041] Build a person re-identification model based on the CAL framework;
[0042] Obtaining an LTCC re-identification dataset and a PRCC re-identification dataset, training the pedestrian re-identification model, and obtaining a trained pedestrian re-identification model,
[0043] Extracting target appearance features through the pedestrian re-identification model;
[0044] Add the target appearance features to the primary target information of the current frame, and obtain the secondary target information of the current frame:
[0045]
[0046] in, is the target appearance feature.
[0047] Preferably, the S400 includes:
[0048] The YOLOX target detection model is used for frame-by-frame action recognition, and the COCO dataset is used to pre-train weights;
[0049] Acquire a behavior recognition data set, wherein the behavior recognition data set includes: falling, smoking, and leaping;
[0050] Training the YOLOX target detection model using the behavior recognition dataset;
[0051] The preliminary behavior labels obtained through the trained YOLOX target detection model will be merged into the three-level target information in the form of:
[0052]
[0053] in, It is a preliminary behavior label, including specific behavior category labels such as falling, smoking, and crossing, as well as non-existent behavior category labels.
[0054] Preferably, the S500 includes:
[0055] S510: input all targets with the same personnel number in the current frame of multiple cameras;
[0056] S520: Count the number of preliminary behavior label categories of all input targets, and use the category with the largest number as the behavior category to be determined under the same personnel number in the current frame;
[0057] S530: Obtain preliminary behavior labels of all targets with the same personnel number in adjacent previous frames within a specific time interval of multiple cameras, and calculate the proportion of preliminary behavior labels that are the same as the behavior category to be determined in the current frame;
[0058] S540: If the label ratio is greater than the preset ratio, the behavior category under the same personnel number is the behavior category to be determined in the current frame, otherwise, no relevant behavior is performed under the same personnel number;
[0059] S550: Based on S510-S540, the personnel behavior category is determined according to a preset comprehensive identification strategy to obtain a comprehensive behavior identification result.
[0060] Preferably, the parameters of the comprehensive discrimination strategy include:
[0061] The default parameter of time interval is set to 16 frames;
[0062] The default ratio parameter is set to 90%.
[0063] A behavior recognition system based on cross-camera multi-target tracking, comprising:
[0064] Video image acquisition module: obtains real-time video image data from multiple cameras in the scene;
[0065] Personnel area positioning module: Use the trained pedestrian detection model to perform area positioning on the targets in the current frame of all cameras to obtain the area coordinates of all targets;
[0066] Dual target tracking module: For a single camera, the regional coordinates of all targets in the current frame and the regional coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera. The matching targets are assigned the same personnel number to obtain the target information of the current frame;
[0067] For cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are used to calculate the appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, and the target's personnel number is corrected according to the matching result;
[0068] Behavior preliminary recognition module: It recognizes the behavior of all targets in the current frame of all cameras and assigns a corresponding preliminary behavior label to each target;
[0069] Comprehensive behavior identification module: Combines the preliminary behavior labels of the same person number in the previous adjacent specific frames of multiple cameras, determines the person's behavior category according to the preset comprehensive identification strategy, and obtains the comprehensive behavior identification result;
[0070] Recognition result output module: According to the comprehensive behavior identification results, the preliminary behavior labels of the targets in the current frame of all cameras are corrected, and the target areas and behavior labels involved in the behavior are visually output in the image.
[0071] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a behavior recognition method based on cross-camera multi-target tracking is implemented.
[0072] It can be known from the above technical solutions that compared with the prior art, the present invention discloses a behavior recognition method, system and electronic device based on cross-camera multi-target tracking, which can effectively identify and track the same person from different perspectives in a changing environment, ensure continuous and consistent behavior analysis, and effectively overcome the misjudgment and missed detection problems in traditional single-frame image behavior recognition methods, significantly improve the accuracy of behavior recognition, further reduce dependence on manual labor, and thus significantly reduce the demand for human resources; the implementation of this technology can not only improve the level of safety management, but also effectively reduce the risk of safety accidents caused by monitoring blind spots or recognition errors. This allows the present invention to be applied in operating scenarios such as power infrastructure, to achieve efficient and reliable personnel behavior safety management tasks based on video monitoring, and to provide more reliable and advanced operator safety management solutions for operating scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0074] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0075] Figure 2 A schematic diagram of visualizing the personnel area positioning result provided by an embodiment of the present invention;
[0076] Figure 3 A flow chart of target matching within a single camera provided by an embodiment of the present invention;
[0077] Figure 4 A flow chart of target matching across cameras provided by an embodiment of the present invention;
[0078] Figure 5 A schematic diagram of a visualization of dual target tracking results provided by an embodiment of the present invention;
[0079] Figure 6 A flow chart of comprehensive behavior identification provided by an embodiment of the present invention;
[0080] Figure 7 A schematic diagram of visualizing the output of recognition results provided by an embodiment of the present invention;
[0081] Figure 8 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0082] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] The purpose of the present invention is to provide a behavior recognition method, system and electronic device based on cross-camera multi-target tracking, which obtains real-time video image data of multiple cameras in a scene; uses pedestrian detection algorithm to accurately locate the personnel targets in the current video frame of all cameras, and outputs the regional coordinates of all targets; performs dual target tracking, uses position similarity and Hungarian algorithm to complete target matching within a single camera, uses appearance similarity and greedy algorithm to complete target matching across cameras, and assigns personnel numbers; performs behavior recognition on all personnel targets in the current frame, and assigns corresponding preliminary behavior labels to each target; combines the preliminary behavior labels of the same numbered targets in the previous adjacent specific frames of multiple cameras, and determines the personnel behavior category according to the comprehensive discrimination strategy; corrects the preliminary behavior labels of the targets in the current frames of all cameras according to the comprehensive behavior discrimination results, and visually outputs the target area and behavior labels involving the behavior in the image. Provides a solution to the problem of high missed detection rate and high false detection rate based on single-frame image recognition.
[0084] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0085] The embodiment of the present invention discloses a behavior recognition method based on cross-camera multi-target tracking, combining Figure 1 It can be seen that the embodiment of the present invention includes the following steps:
[0086] S100 video image acquisition:
[0087] Obtain real-time video image data from multiple cameras in the scene;
[0088] S200 personnel area positioning:
[0089] Use the trained pedestrian detection algorithm to accurately locate the human targets in all frames of all cameras and output the regional coordinates of all targets;
[0090] S300 Dual Target Tracking:
[0091] The position similarity of all targets in the current frame and all targets in the previous frame is calculated based on the regional coordinates, and the Hungarian algorithm is used to complete the target matching within a single camera; the appearance similarity of all targets in the current frame and all targets in other camera video frames is calculated based on the appearance features, and the greedy algorithm is used to complete the target matching across cameras; the targets that match each other belong to the same person and are given the same person number;
[0092] S400 initial behavior identification:
[0093] Perform behavior recognition on all human targets in the current frame. If there is a behavior category involved, assign a preliminary behavior label of the corresponding category to each target. Otherwise, the preliminary behavior label is set to no behavior.
[0094] S500 comprehensive behavior judgment:
[0095] Since the method is performed frame by frame, all targets in the current frame and previous frames already contain the corresponding personnel numbers and preliminary behavior labels. For a certain person in the current frame, it is necessary to combine the preliminary behavior labels of the same numbered targets in the previous adjacent specific frames of multiple cameras and determine the personnel behavior category according to the comprehensive discrimination strategy.
[0096] S600 recognition result output:
[0097] According to the comprehensive behavior identification results, the preliminary behavior labels of the targets in the current frames of all cameras are corrected, and the target areas and behavior labels involved in the behaviors are visually output in the image.
[0098] In a specific embodiment, the multi-camera setting of S100 is as follows: for a specific application scenario, multiple cameras are arranged at different positions and heights to obtain real-time video image data of different perspectives of the scene and provide more comprehensive spatial information.
[0099] In a specific embodiment, the pedestrian detection of S200 is as follows: the present invention adopts the advanced F2DNet pedestrian detection algorithm, which designs feature extraction, focus detection and detection generation strategies, detects the head for precise positioning and high classification recall, and uses a lightweight suppressed head to handle false alarms, so it has the characteristics of high efficiency and accuracy, and its computational complexity is small and suitable for deployment in actual scenarios; after the pedestrian detection algorithm is pre-trained using the COCO dataset, it is trained on the pedestrian datasets CrowdHuman, Cityperson, ETHZ and multi-target tracking data MOT17 and MOT20; the specific training parameters are shown in Table 1, the training sample input size is 1440×800, and the training is performed on 4 NVIDIA A100 GPUs. The number of input samples in each batch is 24, and the SGD optimizer is used, and the initial learning rate is 1e -3, a total of 120 rounds of training.
[0100] Table 1 Pedestrian detection algorithm training parameter settings
[0101]
[0102] The coordinates of the target area of the current frame output by pedestrian detection are:
[0103]
[0104] Among them, i represents the i-th target in the current frame, c represents the c-th camera in the current frame, and They are the horizontal and vertical coordinates of the lower left corner of the target area of the current frame, and are the length and width of the target area in the current frame respectively; the visualization diagram of the personnel area positioning result is as follows Figure 2 As shown, taking the smoking, falling, crossing and making phone calls behavior category scenes as examples, the rectangular box is the visualization result of the target area coordinates.
[0105] In a specific embodiment, after the dual target tracking in S300, a visualization diagram of the result can be obtained as follows: Figure 5 As shown, taking the smoking behavior category scene as an example, there is a person number above each rectangular box, and people with the same person number are the same person; each row of images represents that they come from the same camera, visualizing the previous frames (-4, -8, -12, -16 frames) and the current frame (0 frame).
[0106] In a specific embodiment, the single-camera target matching in S300 is specifically as follows: For the single-camera target matching, in fact, the video image of each camera is processed separately. The single-camera target matching flow chart is as follows: Figure 3 As shown, the target matching steps are:
[0107] S310: Input all target information of the current frame and the previous frame, that is, the target area coordinate information of each target. The target area coordinates of the previous frame are:
[0108]
[0109] Among them, j represents the jth target in the previous frame, v represents the vth camera in the current frame, and are the horizontal and vertical coordinates of the lower left corner of the target area in the previous frame, and They are respectively the length and width of the target area in the previous frame.
[0110] S311: For all targets in the previous frame, the configured Kalman filter is used to predict the position of the target, and the predicted target area coordinates are obtained as follows:
[0111]
[0112] in, and are the horizontal and vertical coordinates of the lower left corner of the predicted target area of the previous frame, and The length and width of the target area are predicted for the previous frame respectively.
[0113] S312: Calculate the position similarity of all targets in the current frame and all predicted targets in the previous frame, using IoU as the measurement function:
[0114]
[0115] Among them, for single-camera target matching, c and v in the function are equal;
[0116] S313: Using the position similarity as the matching basis, the Hungarian algorithm is used to complete the matching between the targets. The matched targets are the same person, and the same person number is assigned. The primary target information after the target matching in the single camera of the current frame is output as follows:
[0117]
[0118] in, The personnel number.
[0119] In a specific embodiment, the cross-camera target matching flow chart of S300 is as follows: Figure 4 As shown, specifically:
[0120] S320: inputting all target information after the target matching in a single camera of the current frame of the multi-camera, that is, including the target area coordinate information and the personnel number of each target;
[0121] S321: The pedestrian appearance features in all target areas are extracted through the trained pedestrian re-identification model, and the secondary target information of the current frame is obtained as follows:
[0122]
[0123] in, is the target appearance feature;
[0124] S322: according to the camera number sequence, all the targets in the first camera are respectively compared with all the targets in other cameras one by one according to the appearance features to calculate the cosine similarity as the appearance similarity;
[0125] S323: using the appearance similarity as a matching basis, using a greedy algorithm to complete the target matching between different cameras, the matched targets are the same person, and based on the personnel number of the target in the first camera, the personnel numbers of the targets in other cameras are corrected, so that the numbers of the same person in multiple cameras are unified;
[0126] In a specific embodiment, the pedestrian re-identification model in S321: is specifically: an advanced CAL pedestrian re-identification model is used to extract target appearance features. This is a model designed for the task of pedestrian re-identification when changing clothes, which can extract more effective appearance features that are not related to clothing, and is suitable for application scenarios of the present invention such as personnel wearing similar work clothes; the module is trained on the LTCC and PRCC re-identification datasets, and the specific training parameters are shown in Table 2. The input size of the training sample is 384×192, and the training is performed on a single NVIDIA A100 GPU. The number of input samples in each batch is 64, and the learning rate is 3.5e -4 , trained with Adam for 60 epochs.
[0127] Table 2 Pedestrian re-identification algorithm training parameter settings
[0128]
[0129]
[0130] In a specific embodiment, the behavior recognition of S400 is specifically as follows: YOLOX target detection algorithm is used to realize frame-by-frame behavior recognition, COCO pre-trained weights are used, and training is performed on the collected behavior recognition data set, which contains high-quality annotations of 7 types of human behaviors, including falling, smoking, crossing, etc., and is collected by 6 cameras with different perspectives, covering image data samples in 4 scenes from daytime to dusk; the specific training parameters are shown in Table 3, the input size of the training sample is 448×448, the training is performed on a single NVIDIA A100 GPU, the number of input samples in each batch is 32, and the learning rate is from {1e -2 ,5e -3 ,1e -3}, and random depth is used as the regularization method, with a total of 80 rounds of training; the preliminary behavior labels obtained by behavior recognition will be merged into the target information, and the three-level target information form is:
[0131]
[0132] in, It is a preliminary label for the behavior, including specific behavior category labels such as failing, smoking, crossing, and non-existent behavior (none).
[0133] Table 3 Behavior recognition algorithm training parameter settings
[0134]
[0135] In a specific embodiment, the comprehensive identification strategy of S500 is as follows: for a certain person in all current frames of multiple cameras, that is, the target with the same person number, the following comprehensive identification steps are performed. The behavior comprehensive identification flow chart is as follows: Figure 6 As shown:
[0136] S510: input all targets with the same personnel number in the current frame of multiple cameras;
[0137] S520: Count the number of preliminary label categories of all input targets’ behaviors, and obtain the category with the largest number as the behavior category to be determined in the current frame of the person;
[0138] S530: Obtain preliminary behavior labels of all targets with the same personnel number in adjacent previous frames within a specific time interval of multiple cameras, and calculate the proportion of preliminary behavior labels that are the same as the behavior category to be determined in the current frame;
[0139] S540: If the label ratio is greater than the specified ratio, the behavior category of the person is the behavior category to be determined in the current frame; otherwise, the person has not performed the relevant behavior.
[0140] Specifically, it also includes: S550: based on S510-S540, the personnel behavior category is determined according to the preset comprehensive judgment strategy to obtain the comprehensive judgment result of the behavior.
[0141] Specifically, the parameter settings of the comprehensive discrimination strategy are as follows: the default parameter of the time interval is set to 16 frames. Since the input video frame rate is 16 frames per second, the recognition results of the adjacent previous frames within 1 second are comprehensively considered; the default parameter of the proportion is set to 90%; the time interval and proportion can be fine-tuned according to the actual scenario and specific tasks to achieve more accurate results.
[0142] In a specific embodiment, the preliminary label correction of S600 is specifically: the preliminary behavior labels of all targets of each person in the current frame are corrected by the behavior categories of each person in the current frame determined by the comprehensive discrimination strategy in S500, as a basis for visualization output and subsequent comprehensive discrimination reference. Figure 7 As shown, taking the smoking behavior category as an example, a comparison is made to show the effect of the method. The first behavior is the preliminary label of the behavior before correction, and the second behavior is the output after correction.
[0143] See also Figure 8 As shown, the embodiment of the present invention also discloses a behavior recognition system based on cross-camera multi-target tracking, including:
[0144] Video image acquisition module: obtains real-time video image data from multiple cameras in the scene;
[0145] Personnel area positioning module: Use the trained pedestrian detection model to perform area positioning on the targets in the current frame of all cameras to obtain the area coordinates of all targets;
[0146] Dual target tracking module: For a single camera, the regional coordinates of all targets in the current frame and the regional coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera. The matching targets are assigned the same personnel number to obtain the target information of the current frame;
[0147] For cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are used to calculate the appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, and the target's personnel number is corrected according to the matching result;
[0148] Behavior preliminary recognition module: It recognizes the behavior of all targets in the current frame of all cameras and assigns a corresponding preliminary behavior label to each target;
[0149] Comprehensive behavior identification module: Combines the preliminary behavior labels of the same person number in the previous adjacent specific frames of multiple cameras, determines the person's behavior category according to the preset comprehensive identification strategy, and obtains the comprehensive behavior identification result;
[0150] Recognition result output module: According to the comprehensive behavior identification results, the preliminary behavior labels of the targets in the current frame of all cameras are corrected, and the target areas and behavior labels involved in the behavior are visually output in the image.
[0151] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a behavior recognition method based on cross-camera multi-target tracking is implemented.
[0152] In a specific embodiment, in order to verify the performance of the present invention, an experimental verification was conducted on a behavior recognition data set collected and produced for the present invention. The pedestrian detection model, pedestrian re-identification model and behavior detection model involved in the present invention were trained according to the settings in the relevant steps, and reasoning verification was performed on a single GPU. The specific experimental settings and results are as follows:
[0153] This dataset contains the area and number annotations of 7 types of personnel behaviors. The dataset information such as specific categories and sample numbers is shown in Table 4.
[0154] Table 4. Sample size of the dataset of the present invention
[0155] Behavior Category Area Labeling Numbering Sample size Falling √ √ 3241 Smoking √ √ 4381 Cross √ √ 5314 Hold the rod √ √ 2143 Climb √ √ 2841 Ladder √ √ 3195 Call up √ √ 4952
[0156] The missed detection rate, false detection rate and accuracy are used to measure the effectiveness of the method. The experimental verification results of the method are shown in Table 5. In order to illustrate the advantages of the method, the table lists the recognition results using only the behavior recognition module (YOLOX) in this method, that is, the uncorrected results.
[0157] Table 5 Method experimental verification results
[0158]
[0159] Specifically, the present invention provides a behavior recognition method, system and electronic device based on cross-camera multi-target tracking, which determines the target area through pedestrian detection, realizes the assignment of target personnel numbers across multiple cameras through dual target tracking, and performs preliminary analysis of the target behavior by the behavior recognition algorithm, and realizes the determination of the target behavior based on the behavior comprehensive discrimination strategy in combination with multiple cameras and multiple adjacent frames. The verification results on the behavior recognition data set show that by introducing cross-camera multi-target tracking, the problem of missed detection and false detection of behavior recognition is effectively solved by utilizing the multi-camera multi-different perspective information and multi-frame data in a continuous time series, and the accuracy of recognition is significantly improved. At the same time, the present invention utilizes the multi-camera multi-perspective monitoring system commonly present in operation scenes such as power infrastructure, and associates the same personnel captured by different cameras through the cross-camera multi-target tracking algorithm, and assigns a unified personnel number, thereby realizing comprehensive discrimination using the behavior information of personnel with the same number in a specific time period. The advantage of this method is that it does not rely solely on static single-frame images, but combines multi-frame data in a continuous time series of multiple cameras, thereby providing more comprehensive contextual information for behavior recognition, effectively improving the accuracy of behavior recognition, and greatly reducing the possibility of misjudgment and missed detection. It provides highly reliable technical support for safety management in operational scenarios such as power infrastructure, and can promote the technical application of behavior recognition methods in personnel safety management.
[0160] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0161] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A behavior recognition method based on cross-camera multi-target tracking, characterized in that: include: S100: Acquire real-time video image data of multiple cameras in the scene; S200: regionally locating the targets in all frames of all cameras by using the trained pedestrian detection model to obtain the regional coordinates of all targets; S300: For a single camera, the regional coordinates of all targets in the current frame and the regional coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera, and the matching targets are assigned the same personnel number to obtain the target information of the current frame; For cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are used to calculate the appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, and the target's personnel number is corrected according to the matching result; S400: performing behavior recognition on all targets in the current frames of all cameras, and assigning a corresponding preliminary behavior label to each target; S500: Combine the preliminary behavior labels of the same person number in the previous adjacent specific frames of multiple cameras, determine the person behavior category according to the preset comprehensive identification strategy, and obtain the comprehensive behavior identification result, including: S510: input all targets with the same personnel number in the current frame of multiple cameras; S520: Count the number of preliminary behavior label categories of all input targets, and use the category with the largest number as the behavior category to be determined under the same personnel number in the current frame; S530: Obtain preliminary behavior labels of all targets with the same personnel number in adjacent previous frames within a specific time interval of multiple cameras, and calculate the proportion of preliminary behavior labels that are the same as the behavior category to be determined in the current frame; S540: If the label ratio is greater than the preset ratio, the behavior category under the same personnel number is the behavior category to be determined in the current frame, otherwise, no relevant behavior is performed under the same personnel number; S550: Based on S510-S540, determine the personnel behavior category according to the preset comprehensive judgment strategy to obtain a comprehensive judgment result of the behavior; The parameters of the comprehensive discrimination strategy include: The default parameter of time interval is set to 16 frames; The default ratio parameter is set to 90%; S600: Modify preliminary behavior labels of targets in current frames of all cameras according to comprehensive behavior identification results, and output target areas and behavior labels involving behaviors in a visual manner in the image.
2. The behavior recognition method based on cross-camera multi-target tracking according to claim 1 is characterized in that: The S200 includes: Build a pedestrian detection model based on the F2DNet pedestrian detection framework; Obtain the COCO dataset and pre-train the pedestrian detection model; Acquire CrowdHuman pedestrian dataset, Cityperson pedestrian dataset, ETHZ pedestrian dataset, MOT17 multi-target tracking data, and MOT20 multi-target tracking data, and train the pedestrian detection model to obtain a trained pedestrian detection model; The current frame image of any camera is input into the trained pedestrian detection model, and the regional coordinates of all targets in the current frame are output, expressed as: Among them, i represents the i-th target in the current frame, c represents the c-th camera in the current frame, and They are the horizontal and vertical coordinates of the lower left corner of the target area of the current frame, and They are respectively the length and width of the target area of the current frame.
3. The behavior recognition method based on cross-camera multi-target tracking according to claim 2 is characterized in that: In S300, for a single camera, the regional coordinates of all targets in the current frame and the regional coordinates of all targets in the previous frame are calculated for position similarity, and the Hungarian algorithm is used to complete the target matching within the single camera, including: S310: For target matching within a single camera, input the region coordinates of all targets in the current frame and the previous frame. The region coordinates of the target in the previous frame are: Among them, j represents the jth target in the previous frame, v represents the vth camera in the current frame, and are the horizontal and vertical coordinates of the lower left corner of the target area in the previous frame, and are the length and width of the target area in the previous frame respectively; S311: Use the configured Kalman filter to predict the positions of all targets in the previous frame, and obtain the regional coordinates of the predicted targets as follows: in, and are the horizontal and vertical coordinates of the lower left corner of the predicted target area of the previous frame, and The length and width of the target area predicted in the previous frame respectively; S312: Use IoU as a measurement function to calculate the position similarity of all targets in the current frame and all predicted targets in the previous frame: Among them, for single-camera target matching, c and v in the function are equal; S313: Using the position similarity as the matching basis, the Hungarian method is used to calculate the matching degree between the targets. The matched targets are regarded as the same person and are assigned the same personnel number. The primary target information after the target matching in the single camera of the current frame is output as follows: in, The personnel number.
4. The behavior recognition method based on cross-camera multi-target tracking according to claim 3 is characterized in that: In S300, for cross-camera, all targets in the current frame of any camera and all targets in the current frames of the remaining cameras are calculated for appearance similarity using appearance features, and a greedy algorithm is used to complete cross-camera target matching, including: S320: inputting the area coordinates and personnel numbers of all targets after the current frame of the multi-cameras is matched with the targets in the single camera; S321: extracting the appearance features of pedestrians in all target areas through the trained pedestrian re-identification model and adding them to the primary target information of the current frame to obtain the secondary target information of the current frame; S322: according to the camera number sequence, all the targets in the first camera are respectively compared with all the targets in other cameras one by one according to the appearance features to calculate the cosine similarity as the appearance similarity; S323: Using appearance similarity as a matching basis, a greedy algorithm is used to complete target matching between different cameras. The matched targets are regarded as the same person, and the personnel numbers of the targets in other cameras are corrected based on the personnel number of the target in the first camera.
5. The behavior recognition method based on cross-camera multi-target tracking according to claim 4 is characterized in that: The S321 includes: Build a person re-identification model based on the CAL framework; Obtaining an LTCC re-identification dataset and a PRCC re-identification dataset, training the pedestrian re-identification model, and obtaining a trained pedestrian re-identification model, Extracting target appearance features through the pedestrian re-identification model; Add the target appearance features to the primary target information of the current frame, and obtain the secondary target information of the current frame: in, is the target appearance feature.
6. The behavior recognition method based on cross-camera multi-target tracking according to claim 5 is characterized in that: The S400 includes: The YOLOX target detection model is used for frame-by-frame action recognition, and the COCO dataset is used to pre-train weights; Acquire a behavior recognition data set, wherein the behavior recognition data set includes: falling, smoking, and leaping; Training the YOLOX target detection model using the behavior recognition dataset; The preliminary behavior labels obtained through the trained YOLOX target detection model will be merged into the three-level target information in the form of: in, It is a preliminary behavior label, including specific behavior category labels such as falling, smoking, and crossing, as well as non-existent behavior category labels.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the behavior recognition method based on cross-camera multi-target tracking is implemented as described in any one of claims 1 to 6.
