Pedestrian identification method and related device
By performing pedestrian detection and re-identification of the surveillance video stream and combining behavioral data analysis, the problem that traditional monitoring systems cannot identify abnormal behaviors in advance is solved, and the intelligent upgrade of the monitoring system is realized, which can promptly identify and alarm abnormal behaviors.
Patent Information
- Application Number
- CN202411738923.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional monitoring systems cannot identify abnormal behaviors in advance, resulting in low efficiency and inability to alarm in time. How to improve the intelligence level of monitoring systems has become an urgent problem.
By performing pedestrian detection on the surveillance video stream, obtaining pedestrian detection results, and inputting the image and detection results of the target person into the pedestrian re-identification model, identifying the target person in the current scene, counting their behavior data, and determining whether there are behavioral abnormalities through the analysis model, and then alarm reminding.
The statistics and analysis of pedestrian behavior data are realized, pedestrians with abnormal behavior can be identified in a timely manner, and alarm reminders are made without manual investigation, which improves the intelligence of the monitoring system.
Smart Images

Figure CN119649407A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of neural network technology, and in particular to a pedestrian recognition method and related devices. Background Art
[0002] With the continuous advancement of science and technology and the growing demand for public security, security monitoring systems play a vital role in maintaining public order and safety. Traditional monitoring systems mainly rely on manual monitoring and post-event playback, which is not only inefficient, but also unable to identify abnormal behavior in advance and issue alarms. How to improve the intelligence level of monitoring systems is an urgent problem to be solved. Summary of the invention
[0003] In view of the above problems, the present application provides a pedestrian recognition method and related devices to solve at least part of the above problems. The specific solution is as follows:
[0004] In a first aspect, the present application provides a pedestrian recognition method, comprising:
[0005] Performing pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result, wherein the first pedestrian detection result includes behavior information of all pedestrians in the current scene;
[0006] Inputting the first pedestrian detection result and the target person image into a pedestrian re-identification model to identify the target person in the current scene;
[0007] Counting the behavior information corresponding to the target person to obtain the behavior data corresponding to the target person, wherein the behavior data includes the behavior trajectory and the stay time at each location;
[0008] The behavior data of the target personnel are analyzed to obtain analysis results, wherein the analysis results include at least one of the following: whether there are personnel with abnormal behavior, the business needs of the customer, employee attendance and whether there is abnormal leave from work.
[0009] In a possible implementation, performing pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result includes:
[0010] The local information and the whole body information corresponding to the pedestrian contained in the monitoring video stream to be detected are detected respectively, and the obscured pedestrians are detected according to the local information and the whole body information, and the behavior information of all pedestrians in the current scene is detected to obtain the first pedestrian detection result.
[0011] In a possible implementation, respectively detecting the local information and the whole body information corresponding to the pedestrian contained in the surveillance video stream to be detected, detecting the obscured pedestrian according to the local information and the whole body information, and detecting the behavior information of all pedestrians in the current scene, includes:
[0012] Respectively detecting the head information and the whole body information corresponding to the pedestrian contained in the image frame of the monitoring video stream to be detected;
[0013] Calculate the matching loss value between the head position and the whole body position within the same position range, if the matching loss value is greater than a threshold, determine that the head information and the whole body information belong to two different people respectively, if the matching loss value is less than the threshold, determine that the head information and the whole body information belong to the same person;
[0014] All pedestrians included in each image frame in the video stream to be detected are detected to obtain behavior information of all pedestrians in the current scene.
[0015] In a possible implementation, inputting the first pedestrian detection result and the target person image into a pedestrian re-recognition model to identify the target person in the current scene includes:
[0016] Inputting the target person image and the first pedestrian detection result into the pedestrian re-identification model, and identifying whether the current scene contains the target person based on the target person image and the head features and the whole body features corresponding to each pedestrian to obtain a first recognition result;
[0017] After determining that the current scene contains a pedestrian matching the target person based on the first recognition result, determining whether the pedestrian matching the target person in the current scene is blocked;
[0018] After determining that the pedestrian is blocked, predicting whether the current pedestrian matches the target person based on the first recognition result of the time series to obtain a second recognition result, and determining the second recognition result as the pedestrian re-recognition result of the current scene;
[0019] After determining that the pedestrian is not blocked, determining the first recognition result as the pedestrian re-recognition result of the current scene.
[0020] In a possible implementation, the step of identifying whether the current scene contains the target person based on the target person image and the head features and the whole body features corresponding to each pedestrian to obtain a first recognition result includes:
[0021] For any pedestrian in the current scene, the loss value between the head feature corresponding to the target person and the head feature of any pedestrian is calculated to obtain a head loss value, and the loss value between the whole body feature corresponding to the target person and the whole body feature of any pedestrian is calculated to obtain a whole body loss value;
[0022] Based on the head loss value and the whole body loss value corresponding to any pedestrian, a first recognition result of whether any pedestrian matches the target person is obtained.
[0023] In a possible implementation, the predicting whether the current pedestrian matches the target person based on the first recognition result of the time series to obtain the second recognition result includes:
[0024] Based on the LSTM network, the context information of the first recognition result of the time series is learned and predicted to obtain whether the current pedestrian matches the target person and obtain the second recognition result.
[0025] In a possible implementation, the target person is any pedestrian in the current scene;
[0026] The analysis results obtained by analyzing the behavior data of the target person include:
[0027] Inputting the behavior data and normal behavior data of the target person into an anomaly detection model to obtain reconstructed data corresponding to the behavior data of the target person;
[0028] Calculating a reconstruction error between the reconstructed data and the normal behavior data;
[0029] If the reconstruction error is greater than the error threshold, it is determined that the behavior of the target person is abnormal;
[0030] If the reconstruction error is less than or equal to the error threshold, it is determined that the behavior of the target person is normal.
[0031] In a possible implementation, the target person is an employee; and the step of analyzing the behavior data of the target person to obtain the analysis result includes:
[0032] Determine whether the target person appears within a preset position range according to the behavior trajectory data of the target person;
[0033] If the target person is not present within the preset location range, it is determined that the target person is absent;
[0034] If the target person appears within the preset position range, it is determined that the target person is on duty, and whether the target person appears within the preset time range;
[0035] If the target person is not late within the preset time range, it is determined that the target person is late;
[0036] If the target person is determined to be on duty within the preset time range, and whether the target person leaves the working position range;
[0037] If the target person leaves the working position range, determine whether the leaving time exceeds the time threshold;
[0038] If the departure time exceeds the time threshold, it is determined that the target person has abnormal departure;
[0039] If the target person has not left the work location range, or the departure time does not exceed the time threshold, it is determined that the target person has not left the work abnormally.
[0040] In a possible implementation, the target person is any person currently in the network, and the behavior data of the target person includes current behavior data and historical behavior data corresponding to the target person;
[0041] The analysis results obtained by analyzing the behavior data of the target person include:
[0042] Count the historical behavior data corresponding to the target person to obtain the visit frequency of the target person;
[0043] Classifying the target personnel according to the access frequency and obtaining the preference characteristics of the target personnel;
[0044] Predicting the probability of the target person responding to a preset activity according to the preference characteristics of the target person;
[0045] A matching marketing strategy is determined based on the predicted results of the target person's corresponding response to the preset activity.
[0046] In a second aspect, the present application also provides a pedestrian recognition device, comprising
[0047] A pedestrian detection module, configured to perform pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result, wherein the first pedestrian detection result includes behavior information of all pedestrians in the current scene;
[0048] A pedestrian re-identification module, used to input the first pedestrian detection result and the target person image into a pedestrian re-identification model to identify the target person in the current scene;
[0049] A statistical module is used to collect statistics on the behavior information corresponding to the target person to obtain the behavior data corresponding to the target person, wherein the behavior data includes the behavior trajectory and the stay time at each location;
[0050] The analysis module is used to analyze the behavior data of the target personnel to obtain analysis results, and the analysis results include at least one of the following: whether there are personnel with abnormal behavior, customer business needs, employee attendance and whether there is abnormal leave.
[0051] In a third aspect, the present application further provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0052] The memory is used to store computer programs;
[0053] The processor is used to execute the computer program so that the electronic device can implement the pedestrian recognition method as described in any possible implementation manner of the first aspect.
[0054] In a fourth aspect, the present application also provides a computer program product, comprising computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the pedestrian recognition method of the first aspect or any implementation of the first aspect.
[0055] In a fifth aspect, the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the pedestrian recognition method of the above-mentioned first aspect or any implementation method of the first aspect.
[0056] By means of the above technical scheme, the pedestrian recognition method and related devices provided by the present application input the video stream information captured by the monitoring system into the pedestrian detection algorithm model to detect all pedestrians in the current scene. Then, the target pedestrian image and the pedestrian detection result are input into the pedestrian re-identification algorithm model for comparison to identify the target pedestrian in the monitoring scene. The recognition result of the identified target pedestrian is input into the data statistical model to obtain the behavior data of the target pedestrian, and the behavior data of the target pedestrian is further input into the data analysis model for analysis to obtain the analysis result. This scheme can count and analyze the behavior data of the identified pedestrians, thereby analyzing the pedestrians with abnormal behavior, and further can issue an alarm reminder without manual investigation, thereby improving the intelligence of the monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0058] Figure 1 A schematic diagram of a pedestrian recognition network provided for this application;
[0059] Figure 2 A flow chart of a pedestrian recognition method provided for this application;
[0060] Figure 3 A schematic diagram of the structure of a pedestrian detection algorithm model provided in this application;
[0061] Figure 4 A schematic diagram of the structure of a pedestrian re-identification algorithm model provided in this application;
[0062] Figure 5A schematic diagram of the trend between samples during a training loss function provided in this application;
[0063] Figure 6 A flowchart of a process for analyzing abnormal behavior provided for this application;
[0064] Figure 7 A flowchart of the process of recording employee attendance behavior provided for this application;
[0065] Figure 8 A flowchart of the process of analyzing customer preferences and providing marketing suggestions provided for this application;
[0066] Fig. 9 A schematic diagram of the structure of a pedestrian recognition device provided in this application;
[0067] Fig.10 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0068] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0069] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0070] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0071] Before introducing the pedestrian recognition method provided by the embodiment of the present application in detail, the related technologies involved in the present application are first introduced:
[0072] Pedestrian detection: Pedestrian detection is an important branch of target detection and a research hotspot in the field of computer vision. Its main task is to detect pedestrians in images or video signals and locate them.
[0073] Pedestrian Re-Identification (ReID) technology has been widely used in public security video surveillance systems. This technology uses computer vision and deep learning technology to automatically identify and match the same pedestrian from different camera perspectives.
[0074] This application can be used to detect and identify pedestrians in customer service scenarios (such as bank branches or other types of business halls). The following will introduce multiple application scenarios of the product using the customer service scenario as an example.
[0075] As a special public place, the customer service scene has extremely high requirements for pedestrian recognition accuracy and real-time performance in its monitoring system. Traditional pedestrian recognition methods are difficult to cope with complex monitoring environments and changeable pedestrian postures, and cannot meet the requirements of recognition accuracy and real-time performance.
[0076] The embodiment of the present application provides a pedestrian recognition method, which can be applied to a real-time video monitoring system with complex and dense personnel in a customer service scene. Specifically, the video stream information captured by the monitoring system is input into the pedestrian detection algorithm model to detect all pedestrians in the current scene. Then, the target pedestrian image and the pedestrian recognition result are input into the pedestrian re-recognition algorithm model for comparison to identify the target pedestrian in the monitoring scene. The recognition result of the identified target pedestrian is input into the data statistical model to obtain the behavior data of the target pedestrian, such as the pedestrian's ID tag, location information, timestamp information, etc., and the behavior data of the target pedestrian is further input into the data analysis model for analysis to obtain the analysis result. Among them, the business needs and preferences of the user can be analyzed according to the user's movement trajectory, residence time and visit frequency in the current scene, and corresponding business marketing suggestions can be provided. The movement trajectory and residence time of the personnel can also be analyzed to obtain personnel with abnormal behaviors such as long-term stay and frequent wandering, and alarm notifications can be issued. In addition, the employee's movement trajectory can also be analyzed for attendance and to determine whether there are abnormal behaviors such as leaving the post.
[0077] Let's combine Figure 1 A schematic diagram of a pedestrian recognition network provided in an embodiment of the present application is introduced.
[0078] like Figure 1 As shown in the figure, the pedestrian recognition network mainly includes three parts: pedestrian detection algorithm model, pedestrian re-identification algorithm model and data statistics and analysis model.
[0079] First, obtain the video signal corresponding to the surveillance scene captured by the camera, for example, the surveillance video signal captured by the camera in the lobby of a bank branch. Input the video stream information into the pedestrian detection algorithm model to detect all pedestrians in the current scene. Further, input the behavior information of all pedestrians (such as ID tags, locations, timestamp information, etc.) and the target person image into the pedestrian re-identification algorithm model for comparison to identify the target person in the current scene. Count the behavior information of pedestrians in the current scene and input it into the data analysis model for data analysis. Finally, analyze the business needs and preferences of the personnel based on their behavior trajectory and stay time in the current scene, and provide matching marketing suggestions. It is also possible to analyze the behavior trajectory and stay time of personnel, identify abnormal behaviors such as long stays and frequent wanderings, and issue an alarm. It is also possible to analyze the behavior trajectory and stay time of employees, conduct attendance, and determine whether they leave their posts abnormally.
[0080] See also Figure 2 , shows a flowchart of a pedestrian recognition method provided by an embodiment of the present application, the method is applied to Figure 1 In the network shown, Figure 2 As shown, the method may include the following steps:
[0081] S101, performing pedestrian detection on a surveillance video stream to be detected to obtain a first pedestrian detection result. The first pedestrian detection result includes behavior information of all pedestrians in the current scene.
[0082] In some embodiments, the video stream of the current scene is input into the pedestrian detection algorithm model for pedestrian detection to obtain a first pedestrian detection result. Exemplarily, the pedestrian detection algorithm model can respectively detect the local information and the whole body information corresponding to the pedestrian contained in the monitoring video stream to be detected, and detect the obscured pedestrians according to the local information and the whole body information, and detect the behavior information of all pedestrians in the current scene to obtain the first pedestrian detection result.
[0083] In some embodiments, the behavior information may include ID, location information, location timestamp, dwell time, etc. Among them, ID is the unique identifier of the pedestrian, and the pedestrian detection algorithm model can assign a unique ID to each pedestrian. The location information is the physical location information of the pedestrian in the current scene. Each location information records a timestamp. For the same pedestrian, when the pedestrian is detected to move from one location to another, the corresponding timestamp when moving to the new location is recorded. Furthermore, the dwell time of the pedestrian at a certain location can be calculated through two adjacent timestamps.
[0084] S102, inputting the first pedestrian detection result and the target person image into a pedestrian re-identification algorithm model to identify the target person in the current scene.
[0085] In some embodiments, the input of the pedestrian re-identification algorithm model is the image of the target person to be identified and the pedestrian detection result of the pedestrian detection algorithm model. After making full use of the time-series context information, the pedestrian re-identification algorithm model can accurately identify the target person from the real-time monitoring screen or surveillance video at any time.
[0086] S103, collecting statistics on the behavior information corresponding to the target person to obtain the behavior data corresponding to the target person, where the behavior data includes the behavior trajectory and the stay time at each location.
[0087] In some embodiments, a data statistical model may be used to collect statistics on the behavior information corresponding to the target person identified by the pedestrian re-identification algorithm model, such as the pedestrian's ID tag, location information, location timestamp, dwell time, etc. The behavior trajectory and dwell time of the same pedestrian may be collected.
[0088] S104, analyzing the behavior data of the target person to obtain analysis results.
[0089] The analysis results include at least one of the following: whether there are people with abnormal behavior, customer business needs, employee attendance and whether there are abnormal leave from work.
[0090] The pedestrian recognition method provided in this embodiment inputs the video stream information captured by the monitoring system into the pedestrian detection algorithm model to detect all pedestrians in the current scene. Then, the target pedestrian image and the pedestrian detection result are input into the pedestrian re-identification algorithm model for comparison to identify the target pedestrian in the monitoring scene. The recognition result of the identified target pedestrian is input into the data statistical model to obtain the behavior data of the target pedestrian, and the behavior data of the target pedestrian is further input into the data analysis model for analysis to obtain the analysis result. This solution can count and analyze the behavior data of the identified pedestrians, thereby analyzing pedestrians with abnormal behavior, and further can issue an alarm reminder without manual investigation, thereby improving the intelligence level of the monitoring system.
[0091] See also Figure 3 , shows a structural schematic diagram of a pedestrian detection algorithm model provided in an embodiment of the present application.
[0092] The pedestrian detection algorithm model of the embodiment of the present application is implemented based on the improved Faster RCNN algorithm. In order to solve the occlusion problem in crowded monitoring scenes, the Faster RCNN algorithm is improved to detect the local (such as the head) and the whole body of pedestrians at the same time. Specifically, two fully connected layers can be used after the pooling layer to learn local features and whole body features, and the matching loss between the local recognition results and the whole body recognition results can be calculated. In the case of occlusion, the use of local information is increased, thereby improving the detection accuracy.
[0093] like Figure 3As shown, the pedestrian detection algorithm model may include a feature extraction network, a candidate window network (Region Proposal Network, RPN), a pooling layer and a recognition network, wherein the recognition network includes a head detection branch and a full body detection branch.
[0094] The image frames in the video stream are input into the feature extraction network for feature extraction, and the extracted features are input into the RPN network and the pooling layer. Among them, the feature extraction network adopts a convolutional neural network structure and improves accuracy and robustness through multi-scale feature representation.
[0095] The RPN network is a generative model that can automatically generate candidate regions on the input image. The candidate box region extracted by the RPN network is input to the pooling layer.
[0096] The pooling operation reduces the spatial size of the feature and reduces the computational complexity. At the same time, the pooling operation helps to retain the main features in the feature image and is conducive to extracting information useful for the classification task. In the embodiment of the present application, the pedestrian features with lower dimensions can be obtained through the pooling operation.
[0097] The recognition network is used to classify and detect features within the candidate box area.
[0098] The head detection branch in the recognition network uses two fully connected layers FC3 and FC4 to learn the head features of pedestrians, thereby obtaining a head detection result, which includes head category information and head position information.
[0099] The full-body detection branch uses two fully connected layers FC1 and FC2 to learn the full-body features of pedestrians and obtain full-body detection results, which include full-body category information and full-body position information.
[0100] Finally, the matching loss value between the head position information and the whole body position information within the same position range (e.g., the distance between the whole body position rectangular frame and the head position rectangular frame is less than a preset distance) is calculated. If the matching loss value is greater than the threshold, it is determined that the head feature and the whole body feature do not belong to the same person. If the matching loss value is less than or equal to the threshold, it is determined that the head feature and the whole body feature belong to the same person. The matching loss value between the head position and the whole body position can be used to identify obscured pedestrians, thereby improving the accuracy of pedestrian detection in crowded scenes.
[0101] See also Figure 4 , showing a structural schematic diagram of a pedestrian re-identification algorithm model provided in an embodiment of the present application.
[0102] For customer service scenarios, pedestrian re-identification technology can quickly and accurately identify specific persons, such as suspects, thieves, etc., in a large number of surveillance videos. It can also perform data analysis on regular personnel, thereby greatly improving monitoring efficiency and accuracy.
[0103] The pedestrian re-identification algorithm model in the embodiment of the present application is implemented based on the Strong Baseline algorithm. Among them, the Strong Baseline algorithm uses ResNet50 as the basic network and modifies it appropriately to adapt to the ReID task. In addition, the Strong Baseline algorithm model also uses a global feature extractor to obtain global features through global average pooling (GlobalAverage Pooling, GAP), so that the network learns the similarity between the pedestrian to be detected and all pedestrians, and then obtains the most similar result by comparing the similarity.
[0104] In order to solve the impact of occlusion on the re-identification efficiency, improvements were made. The main idea of the improvement is to increase the use of contextual information of time series to improve the recognition accuracy of pedestrians.
[0105] like Figure 4 As shown in the figure, the pedestrian re-identification algorithm model includes a feature extraction network, a BNNeck network, a long short-term memory network (Long Short-Term Memory, LSTM) network and a classifier.
[0106] The feature extraction network uses the ResNet-50 network to extract the whole body features and local features (such as head features) of the input image and input them into the BNNeck network. In this embodiment, the feature extraction network in the pedestrian re-identification algorithm model extracts the whole body features of the pedestrian in the input image (the whole body features include head features). In addition, the head detection results detected by the pedestrian detection algorithm model are used separately, that is, the features of the head detection results are extracted separately, which is equivalent to increasing the weight of the head similarity comparison when the overall image similarity is relatively heavy. Thereby improving the accuracy of pedestrian re-identification in the presence of occlusion.
[0107] The BNNeck network is a commonly used structure in pedestrian re-identification (ReID) tasks, mainly used between feature extraction networks and classifiers. It enhances the generalization ability and robustness of the model by inserting a batch normalization layer (BatchNormalization, referred to as BN) between the feature extractor and the classifier.
[0108] The fully connected layers (FC layers) act as classifiers in the entire neural network. The features output by the BNNeck network are input to the fully connected layer to obtain the confidence of whether the pedestrian in the input image of the entire neural network and the target pedestrian are the same person. In this embodiment, the classifier can also obtain the confidence of whether the pedestrian is occluded.
[0109] The LSTM network is a time-recurrent neural network that is used to predict pedestrians in an input image based on contextual information of a time series and obtain prediction results.
[0110] LSTM includes multiple LSTM blocks (or intelligent network units), and LSTM blocks can remember values of indefinite time lengths. In this embodiment, the input of the LSTM block is x, and x is the classification result of the pedestrian in the current input image output by the classifier and the location information of the pedestrian, wherein the location information is the location area of the pedestrian in the current input image. The classification result is the probability value of whether the pedestrian is the target pedestrian. The larger the probability value, the greater the possibility that the pedestrian is the target pedestrian. In addition, h is short-term memory and c is long-term memory.
[0111] If the classifier identifies that the current pedestrian in the input image is occluded, the prediction result of the LSTM network is output as the recognition result of the pedestrian re-identification algorithm model. If the classifier identifies that the current pedestrian in the input image is not occluded, the classification result output by the classifier is directly output as the recognition result.
[0112] In addition, the embodiment of the present application also improves the loss function of the Strong Baseline algorithm model. The triplet loss based on metric learning before improvement has the following meaning: Figure 5 As shown in (1), the triplet loss mainly targets the relationship between the target sample, the positive sample, and the negative sample. Through training and learning with the triplet loss function, the target sample can be gradually approached to the positive sample and gradually away from the negative sample.
[0113] In actual situations, positive samples and negative samples will also affect each other, such as Figure 5 As shown in (2), after the network is trained, although the target is closer to the positive sample and farther from the negative sample, the distance between the positive and negative samples is also closer. This situation will increase the error rate of re-identification. Obviously, this situation needs to be suppressed during network training. Therefore, this system improves the calculation method of the triplet loss Triplet loss and defines the triplet loss Ltriplet(a,p,n) as:
[0114] L triplet(a, pn)=max(d(a,p)-d(a,n)-λd(p,n)+margin,0) (1)
[0115] Among them, a is the target sample, n is the negative sample, p is the positive sample, d is the distance between samples, λ is a non-negative number, which participates in back propagation as a hyperparameter of the neural network, thereby acting on the weight update in the training of the pedestrian re-identification algorithm model, and margin is the initial fixed offset.
[0116] It can be seen that the pedestrian re-identification algorithm model provided in the embodiment of the present application simultaneously utilizes the local information of pedestrians in the monitoring scene and the time series information of the context, obtains more information for auxiliary judgment, and improves the loss function, thereby improving the accuracy and efficiency of pedestrian re-identification.
[0117] The following will be combined Figure 6 Introduce the process of identifying people with abnormal behavior based on surveillance video stream analysis, such as Figure 6 As shown, the method may include the following steps:
[0118] S201, input the video stream into the pedestrian detection algorithm model to perform pedestrian detection, and obtain the pedestrian detection result of the current scene.
[0119] The detection process of the pedestrian detection algorithm model can be found in Figure 3 The relevant description in the illustrated embodiment will not be repeated here.
[0120] S202, input the pedestrian detection results into a data statistical model to obtain the behavior data of each pedestrian.
[0121] The data statistical model obtains the behavior trajectory of the same pedestrian based on the ID and location timestamp corresponding to the same pedestrian in the pedestrian detection results. At the same time, it can also obtain the residence time of the pedestrian at the current location based on the difference between the current location timestamp and the previous location timestamp of the same pedestrian.
[0122] S203, inputting each person's behavior data and normal behavior data into a data analysis model to identify persons with abnormal behavior.
[0123] In some embodiments, the process of identifying abnormal behavior is as follows: input the target person's behavior data and normal behavior data into an anomaly detection model to obtain reconstructed data corresponding to the target person's behavior data; calculate the reconstruction error between the reconstructed data and the normal behavior data; if the reconstruction error is greater than the error threshold, determine that the target person's behavior is abnormal; if the reconstruction error is less than or equal to the error threshold, determine that the target person's behavior is normal.
[0124] For example, the data analysis model can perform anomaly detection through an autoencoder, taking the normal person's behavior trajectory data X as input, and converting the input data x i Encoded as the hidden layer representation h i =f encoder (x i ), and then the hidden layer h i Decode to reconstruct data Finally, the mean square error As the loss function, at the same time, calculate the reconstructed data With the original data x i The reconstruction error between Perform model training.
[0125] After the model training is completed, when the model is used, the behavior data of the pedestrian to be identified is used as the model input to obtain the reconstruction data corresponding to the pedestrian, and the reconstruction error L between the behavior data of the pedestrian to be identified and the normal behavior data is calculated, and it is determined whether the reconstruction error L is higher than the error threshold. If it is higher than the error threshold, it is determined that the behavior of the pedestrian to be identified is abnormal (such as staying for a long time, frequent wandering, etc.), and an alarm is issued for abnormal behavior. If it is less than or equal to the error threshold, it is determined that the behavior of the pedestrian to be identified is normal.
[0126] In addition, this method can be used to identify people with abnormal behavior, and then record the person's image and behavior data to facilitate subsequent monitoring of the person's reappearance and record his or her behavior trajectory, or to help security focus on screening out people with abnormal behavior during subsequent monitoring and playback.
[0127] This embodiment provides a pedestrian recognition method, which analyzes pedestrians with abnormal behavior and can further issue alarm reminders without the need for manual investigation, thereby improving the intelligence level of the monitoring system.
[0128] See also Figure 7 , showing a flow chart of another pedestrian recognition method provided in an embodiment of the present application. This embodiment can record employee attendance based on pedestrian re-recognition technology and identify abnormal off-duty behaviors.
[0129] S301, input the video stream into the pedestrian detection algorithm model to perform pedestrian detection, and obtain the pedestrian detection result of the current scene.
[0130] S302, input the target person image and the pedestrian recognition result of the current scene into a pedestrian re-identification algorithm model to obtain a pedestrian recognition result.
[0131] The implementation process of S301 and S302 can be found in Figure 2 The relevant steps in will not be repeated here.
[0132] S303, judging whether the target person is on duty according to the pedestrian recognition result, if yes, executing S304; if not, executing S309.
[0133] In some embodiments, it can be determined whether the target person appears within a preset location range based on the target person's behavior trajectory data. If yes, it is determined that the target person is on duty; if not, it is determined that the target person is absent.
[0134] S304, determine whether the target person appears within the preset time range, if yes, execute S305; if not, execute S310.
[0135] According to the location information and location timestamp in the behavior data of the target person, it is determined whether the person appears in the preset location range within the preset time range. If so, it is determined that the target person is on duty normally. Otherwise, it is determined that the target person is late.
[0136] S305, confirming that the target personnel are on duty normally.
[0137] S306, determine whether the target person has left the working range, if yes, execute S307; if not, execute S311.
[0138] Determine whether the target person has left the preset working range, such as the office area, based on the location information in the target person's behavior data.
[0139] S307, determine whether the target person's departure time exceeds the time threshold, if yes, execute S308, if not, execute S311.
[0140] The time threshold can be set according to actual needs, for example, 30 minutes. It is determined whether the time when the target person leaves the working area exceeds the time threshold.
[0141] S308, determining that the target personnel is off duty abnormally.
[0142] If the target person's absence from the work scope reaches a time threshold, it is determined that the employee has abnormal off-duty behavior.
[0143] S309, determining whether the target person is absent.
[0144] S310, determining that the target person is late.
[0145] S311, confirm that the target personnel have not left their posts abnormally.
[0146] If the time that the target person leaves the work scope is less than the time threshold, it is determined that the employee does not have abnormal off-duty behavior.
[0147] The pedestrian recognition method provided in this embodiment improves the intelligence level of the monitoring scene by analyzing the trajectory data of the target person and collecting statistics on the employee's attendance information, abnormal off-duty behavior, etc.
[0148] See also Figure 8 , shows a flowchart of another pedestrian recognition method, which identifies customers based on pedestrian re-identification technology, analyzes customer behavior data to obtain business needs and preferences, and provides corresponding marketing suggestions. Figure 8 As shown, the method may include the following steps:
[0149] S401, input the current video stream and the historical video stream into the pedestrian detection algorithm model to perform pedestrian detection, and obtain the pedestrian detection results corresponding to the current scene and the historical scene.
[0150] In some embodiments, the current video stream may be a real-time monitoring video stream, and the historical video stream may be a video stream shot in the past period of time. The past period of time here may be the past week, two weeks, one month, three months, etc., and this application does not impose any restrictions on this.
[0151] All persons in the current scene are detected based on the current video stream. In addition, all persons in the historical scene are detected based on the historical video stream.
[0152] S402: input the pedestrian image of the current scene as the target customer image and the pedestrian detection results of the historical scenes into the pedestrian re-identification algorithm model to identify the historical visit behavior data of each target customer.
[0153] The pedestrians detected in the current scene are input as target pedestrians into the pedestrian re-identification algorithm model. At the same time, the pedestrian detection results corresponding to the historical scenes are input into the pedestrian re-identification algorithm model. That is, the target pedestrians in the historical scenes are identified through the pedestrian re-identification algorithm model, that is, whether the pedestrians in the current scene have appeared in the historical time period, and finally the historical access behavior data of each target pedestrian is obtained.
[0154] S403, inputting the historical visit behavior data of the target customers into the data statistical model to obtain the visit frequency of the target customers.
[0155] For any customer in the current scenario (or a specific customer), the historical access behavior data of the customer is counted using a data statistical model to obtain the access frequency of the customer, which may refer to the number of visits within a period of time.
[0156] S404, classify the customers in the current scenario according to the access frequency, and obtain the preference characteristics of each type of customers.
[0157] According to the customer's visit frequency, the Kmeans algorithm is used for clustering, and users are divided into high-frequency visitors, low-frequency visitors, visitors in a specific time period, etc. For each user category, the preference is calculated based on the visit frequency, and the formula is:
[0158]
[0159] Among them, P in formula (2) k is the preference of the K-th user, f i is the access frequency of any user in the Kth category, and U is the set of all users.
[0160] S405, for any customer, predict the probability of the customer responding to a preset activity according to the customer's preference characteristics.
[0161] Based on the results of user preference analysis, targeted marketing suggestions can be specified for each type of user. The user type, preference, active time, etc. are used as feature vectors x, and the probability of whether a customer will respond to a certain activity is predicted through a logistic regression model. The formula is:
[0162]
[0163] Where P(y=1|x) is the probability of responding to a marketing campaign given that user y=1 has feature vector x, β 0 ~β n is the model parameter obtained through training, x 1 ~x n is the user feature vector.
[0164] S406: Determine a matching marketing strategy based on the prediction result of the customer.
[0165] For example, for users with a high probability of response, you can increase investment in marketing activities and provide personalized recommendations or discounts. For users with a low probability of response, you can try different marketing strategies to increase user participation and response rate.
[0166] The pedestrian recognition method provided in this embodiment can analyze the customer preferences in the customer service scenario and provide corresponding marketing strategies based on the customer preferences, thereby improving user participation and response rate.
[0167] The above describes the pedestrian recognition method provided in the embodiments of the present application. The following describes a device for executing the above pedestrian recognition method.
[0168] See also Fig. 9 , Fig. 9 This is a schematic diagram of the structure of a pedestrian recognition device provided in an embodiment of the present application. Fig. 9 As shown, the device comprises:
[0169] The pedestrian detection module 101 is used to perform pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result, where the first pedestrian detection result includes behavior information of all pedestrians in the current scene.
[0170] In one possible implementation, the pedestrian detection module 101 is specifically used to: respectively detect the local information and the whole body information corresponding to the pedestrians contained in the monitoring video stream to be detected, and detect the obscured pedestrians based on the local information and the whole body information, and detect the behavior information of all pedestrians in the current scene to obtain the first pedestrian detection result.
[0171] In a possible implementation, the pedestrian detection module 101 is used to respectively detect the local information and the whole body information corresponding to the pedestrian contained in the surveillance video stream to be detected, and detect the obscured pedestrian according to the local information and the whole body information, and when the behavior information of all pedestrians in the current scene is detected to obtain the first pedestrian detection result, it is specifically used to:
[0172] Respectively detecting the head information and the whole body information corresponding to the pedestrian contained in the image frame of the surveillance video stream to be detected;
[0173] Calculate the matching loss value between the head position and the whole body position within the same position range. If the matching loss value is greater than the threshold, it is determined that the head information and the whole body information belong to two different people. If the matching loss value is less than the threshold, it is determined that the head information and the whole body information belong to the same person.
[0174] All pedestrians contained in each image frame in the video stream to be detected are detected to obtain the behavior information of all pedestrians in the current scene.
[0175] The pedestrian re-identification module 102 is used to input the first pedestrian detection result and the target person image into the pedestrian re-identification model to identify the target person in the current scene.
[0176] In a possible implementation, the pedestrian re-identification module 102 is specifically configured to:
[0177] The target person image and the first pedestrian detection result are input into the pedestrian re-identification model, and based on the target person image and the head features and whole body features corresponding to each pedestrian, whether the current scene contains the target person is identified to obtain a first recognition result;
[0178] After determining that the current scene contains a pedestrian matching the target person based on the first recognition result, determining whether the pedestrian matching the target person in the current scene is blocked;
[0179] After determining that the pedestrian is blocked, predicting whether the current pedestrian matches the target person based on the first recognition result of the time series to obtain a second recognition result, and determining the second recognition result as the pedestrian re-recognition result of the current scene;
[0180] After determining that the pedestrian is not blocked, the first recognition result is determined as the pedestrian re-recognition result of the current scene.
[0181] In a possible implementation, the pedestrian re-identification module 102 is used to identify whether the current scene contains the target person based on the target person image and the head features and the whole body features corresponding to each pedestrian to obtain a first recognition result, specifically for:
[0182] For any pedestrian in the current scene, the loss value between the head feature corresponding to the target person and the head feature of any pedestrian is calculated to obtain the head loss value, and the loss value between the whole body feature corresponding to the target person and the whole body feature of any pedestrian is calculated to obtain the whole body loss value;
[0183] Based on the head loss value and the whole body loss value corresponding to any pedestrian, a first recognition result of whether any pedestrian matches the target person is obtained.
[0184] The statistical module 103 is used to collect statistics on the behavior information corresponding to the target person and obtain the behavior data corresponding to the target person. The behavior data includes the behavior trajectory and the stay time at each location.
[0185] The analysis module 104 is used to analyze the behavior data of the target personnel to obtain analysis results, and the analysis results include at least one of the following: whether there are personnel with abnormal behavior, customer business needs, employee attendance and whether there is abnormal leave.
[0186] In a possible implementation, the analysis module 104 is used to analyze the behavior data of pedestrians in the video stream to obtain persons with abnormal behavior. In this scenario, the target person can be any pedestrian in the current scene, that is, any pedestrian in the pedestrian detection result is used as the target person, and the behavior data of the target person is extracted from the pedestrian detection result and input into the analysis module 104 for analysis. When the analysis module 104 is used to analyze the behavior data of the target person to obtain the analysis result, it is specifically used to:
[0187] Inputting the target person's behavior data and normal behavior data into the anomaly detection model to obtain reconstructed data corresponding to the target person's behavior data;
[0188] Calculate the reconstruction error between the reconstructed data and the normal behavior data;
[0189] If the reconstruction error is greater than the error threshold, it is determined that the behavior of the target person is abnormal;
[0190] If the reconstruction error is less than or equal to the error threshold, it is determined that the behavior of the target person is normal.
[0191] In another possible implementation, the target person is an employee; when the analysis module is used to analyze the behavior data of the target person to obtain the analysis result, it is specifically used to:
[0192] Determine whether the target person appears within the preset location range based on the target person's behavior trajectory data;
[0193] If the target personnel absence is not identified within the preset location range;
[0194] If the target person appears within the preset position range, it is determined that the target person is on duty, and it is determined whether the target person appears within the preset time range;
[0195] If the target person is late within the preset time range;
[0196] If the target person is confirmed to be on duty within the preset time range, and whether the target person leaves the working location range is determined;
[0197] If the target person leaves the working position range, determine whether the leaving time exceeds the time threshold;
[0198] If the departure time exceeds the time threshold, it is determined that the target person has abnormal absence from work;
[0199] If the target person has not left the work location range, or the departure time does not exceed the time threshold, it is determined that the target person has not left the job abnormally.
[0200] In a possible implementation, the target person is any person in the current system, and the behavior data of the target person includes the current behavior data and historical behavior data corresponding to the target person. When the analysis module 104 is used to analyze the behavior data of the target person to obtain the analysis result, it is specifically used to:
[0201] Collect historical behavior data corresponding to the target person and obtain the target person's access frequency;
[0202] Classify target personnel according to visit frequency and obtain their preference characteristics;
[0203] Predict the probability of the target person responding to a preset activity based on the target person's preference characteristics;
[0204] Determine the matching marketing strategy based on the predicted results of the target person's corresponding response to the preset activities.
[0205] The pedestrian re-identification device provided in this embodiment inputs the video stream information captured by the monitoring system into the pedestrian detection module to detect all pedestrians in the current scene. Then, the target pedestrian image and the pedestrian detection result are input into the pedestrian re-identification module for comparison to identify the target pedestrian in the monitoring scene. The identification result of the identified target pedestrian is input into the statistical module to obtain the behavior data of the target pedestrian, and the behavior data of the target pedestrian is further input into the analysis model for analysis to obtain the analysis result. This solution can count and analyze the behavior data of the identified pedestrians, thereby analyzing pedestrians with abnormal behavior, and further can issue an alarm reminder, which does not require manual investigation and improves the intelligence of the monitoring system.
[0206] The present application also provides an electronic device in an embodiment. Fig.10 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, desktop computers, servers, monitoring terminals, mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), etc. Fig.10 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0207] like Fig.10 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 202 or a program loaded from a storage device 208 to a random access memory (RAM) 203. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 203. The processing device 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0208] Typically, the following devices may be connected to the I / O interface 205: an input device 206 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 208 including, for example, a memory card, a hard disk, etc.; and a communication device 209. The communication device 209 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0209] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any pedestrian recognition method provided in the embodiment of the present application.
[0210] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any pedestrian recognition method provided in the embodiment of the present application.
[0211] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0212] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0213] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0214] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A pedestrian recognition method, characterized in that: include: Performing pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result, wherein the first pedestrian detection result includes behavior information of all pedestrians in the current scene; Inputting the first pedestrian detection result and the target person image into a pedestrian re-identification model to identify the target person in the current scene; Counting the behavior information corresponding to the target person to obtain the behavior data corresponding to the target person, wherein the behavior data includes the behavior trajectory and the stay time at each location; The behavior data of the target personnel are analyzed to obtain analysis results, wherein the analysis results include at least one of the following: whether there are personnel with abnormal behavior, the business needs of the customer, employee attendance and whether there is abnormal leave from work.
2. The method according to claim 1, characterized in that The step of performing pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result includes: The local information and the whole body information corresponding to the pedestrian contained in the monitoring video stream to be detected are detected respectively, and the obscured pedestrians are detected according to the local information and the whole body information, and the behavior information of all pedestrians in the current scene is detected to obtain the first pedestrian detection result.
3. The method according to claim 2, characterized in that The method of respectively detecting the local information and the whole body information corresponding to the pedestrians contained in the surveillance video stream to be detected, detecting the blocked pedestrians according to the local information and the whole body information, and detecting the behavior information of all pedestrians in the current scene includes: Respectively detecting the head information and the whole body information corresponding to the pedestrian contained in the image frame of the monitoring video stream to be detected; Calculate the matching loss value between the head position and the whole body position within the same position range, if the matching loss value is greater than a threshold, determine that the head information and the whole body information belong to two different people respectively, if the matching loss value is less than the threshold, determine that the head information and the whole body information belong to the same person; All pedestrians included in each image frame in the video stream to be detected are detected to obtain behavior information of all pedestrians in the current scene.
4. The method according to any one of claims 1 to 3, characterized in that: The step of inputting the first pedestrian detection result and the target person image into a pedestrian re-identification model to identify the target person in the current scene includes: Inputting the target person image and the first pedestrian detection result into the pedestrian re-identification model, and identifying whether the current scene contains the target person based on the target person image and the head features and whole body features corresponding to each pedestrian to obtain a first recognition result; After determining that the current scene contains a pedestrian matching the target person based on the first recognition result, determining whether the pedestrian matching the target person in the current scene is blocked; After determining that the pedestrian is blocked, predicting whether the current pedestrian matches the target person based on the first recognition result of the time series to obtain a second recognition result, and determining the second recognition result as the pedestrian re-recognition result of the current scene; After determining that the pedestrian is not blocked, determining the first recognition result as the pedestrian re-recognition result of the current scene.
5. The method according to claim 4, characterized in that The step of identifying whether the current scene contains the target person based on the target person image and the head features and the whole body features corresponding to each pedestrian to obtain a first recognition result includes: For any pedestrian in the current scene, the loss value between the head feature corresponding to the target person and the head feature of any pedestrian is calculated to obtain a head loss value, and the loss value between the whole body feature corresponding to the target person and the whole body feature of any pedestrian is calculated to obtain a whole body loss value; Based on the head loss value and the whole body loss value corresponding to any pedestrian, a first recognition result of whether any pedestrian matches the target person is obtained.
6. The method according to any one of claims 1 to 3, characterized in that: The target person is any pedestrian in the current scene; The analysis results obtained by analyzing the behavior data of the target person include: Inputting the behavior data and normal behavior data of the target person into an anomaly detection model to obtain reconstructed data corresponding to the behavior data of the target person; Calculating a reconstruction error between the reconstructed data and the normal behavior data; If the reconstruction error is greater than the error threshold, it is determined that the behavior of the target person is abnormal; If the reconstruction error is less than or equal to the error threshold, it is determined that the behavior of the target person is normal.
7. The method according to any one of claims 1 to 3, characterized in that: The target person is an employee; the analysis result obtained by analyzing the behavior data of the target person includes: Determine whether the target person appears within a preset position range according to the behavior trajectory data of the target person; If the target person is not present within the preset location range, it is determined that the target person is absent; If the target person appears within the preset position range, it is determined that the target person is on duty, and whether the target person appears within the preset time range; If the target person is not late within the preset time range, it is determined that the target person is late; If the target person is determined to be on duty within the preset time range, and whether the target person leaves the working position range; If the target person leaves the working position range, determine whether the leaving time exceeds the time threshold; If the departure time exceeds the time threshold, it is determined that the target person has abnormal departure; If the target person has not left the work location range, or the departure time does not exceed the time threshold, it is determined that the target person has not left the work abnormally.
8. The method according to claim 1, characterized in that The target person is any person currently in the network, and the behavior data of the target person includes the current behavior data and historical behavior data corresponding to the target person; The analysis results obtained by analyzing the behavior data of the target person include: Count the historical behavior data corresponding to the target person to obtain the visit frequency of the target person; Classifying the target persons according to the access frequency and obtaining the preference characteristics of the target persons; Predicting the probability of the target person responding to a preset activity according to the preference characteristics of the target person; A matching marketing strategy is determined based on the predicted results of the target person's corresponding response to the preset activity.
9. A pedestrian recognition device, characterized in that: include A pedestrian detection module, configured to perform pedestrian detection on the surveillance video stream to be detected to obtain a first pedestrian detection result, wherein the first pedestrian detection result includes behavior information of all pedestrians in the current scene; A pedestrian re-identification module, used to input the first pedestrian detection result and the target person image into a pedestrian re-identification model to identify the target person in the current scene; A statistical module is used to collect statistics on the behavior information corresponding to the target person to obtain the behavior data corresponding to the target person, wherein the behavior data includes the behavior trajectory and the stay time at each location; The analysis module is used to analyze the behavior data of the target personnel to obtain analysis results, and the analysis results include at least one of the following: whether there are personnel with abnormal behavior, customer business needs, employee attendance and whether there is abnormal leave.
10. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the pedestrian recognition method as described in any one of claims 1 to 8.