Monitoring method and related device

By adopting an integrated model in the monitoring method, combined with twin network and multi-level cross-matching fusion technology, the independence problem of tracking and re-identification tasks is solved, the continuous tracking and identification of target monitoring objects is achieved, and the monitoring effect and stability are improved. It is suitable for a variety of target monitoring scenarios.

CN118570733APending Publication Date: 2024-08-30SHENZHEN LINKRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410752652.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing monitoring methods treat tracking and re-identification as two independent tasks, making it difficult to balance speed and accuracy requirements with limited computing power. Moreover, tracking is prone to failure when the subject target changes significantly in perspective, and there is a lack of effective solutions.

Method used

Using an integrated model, through joint training of tracking and re-identification tasks, a monitoring method that can output tracking results or re-identification results is constructed, and technologies such as twin networks, multi-level cross-matching fusion and feature mapping are used to achieve continuous monitoring of target monitoring objects.

Benefits of technology

It improves the monitoring effect, enhances the model's ability to distinguish similar targets, reduces the computational burden, improves the stability and reusability of tracking and re-identification, and is suitable for a variety of target monitoring scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570733A
    Figure CN118570733A
Patent Text Reader

Abstract

The invention discloses a monitoring method and a related device, which can be applied to the field of data processing, and the method comprises the steps: inputting a monitoring video frame into a pre-constructed integrated model, obtaining a monitoring result of the monitoring video frame output by the integrated model, and enabling the monitoring result to comprise a tracking result or a re-recognition result; the tracking result comprises information used for indicating a target bounding box of the target monitoring object, the integrated model is obtained by training based on a training sample data set, and the training sample data set comprises a training tracking data set and a training re-identification data set; the integrated model obtained through combined training of the tracking task and the re-recognition task can output the monitoring result including any one of the tracking result and the re-recognition result, and therefore continuous monitoring of the target monitoring object is achieved through the integrated model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a monitoring method and related devices. Background Art

[0002] Existing monitoring methods treat tracking and re-identification as two independent tasks, and use independent models and features for independent tasks, which significantly increases the computational burden. With limited computing power, it is difficult to balance the speed and accuracy requirements. In addition, tracking is prone to failure when the subject target undergoes obvious changes in perspective.

[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0004] The present application provides a monitoring method and related devices, the purpose of which is to achieve continuous monitoring of a target monitoring object by using an integrated model to improve the monitoring effect, as follows:

[0005] A monitoring method, comprising:

[0006] Get surveillance video frames;

[0007] Input the monitoring video frame into a pre-built integrated model monitoring video frame, and obtain a monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object;

[0008] The integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0009] Optionally, the monitoring method further includes:

[0010] Defining a search space of an integrated model; the search space of the integrated model includes multiple sub-networks of the integrated model, and the model structures of the multiple sub-networks are the same, but the structural hyperparameters and network parameters are different;

[0011] According to a sample data set for search, a sub-network search method is used to perform a sub-network search in the search space of the integrated model based on preset constraints to obtain an optimal sub-network, wherein the sample data set for search includes a tracking data set for search and a re-identification data set for search;

[0012] Training the optimal sub-network according to the training sample data set;

[0013] When the preset training completion condition is reached, the integrated model is constructed based on the trained optimal sub-network.

[0014] Optionally, the integrated model includes a twin network, and the twin network includes a first neural network and a second neural network that share network parameters and network structure; the method for the integrated model to output the monitoring result of the monitoring video frame includes:

[0015] Based on the monitoring result of the previous video frame of the monitoring video frame and the monitoring video frame, acquiring an image of the search area of ​​the monitoring video frame;

[0016] respectively using the first neural network and the second neural network to extract the template features of the target monitoring object and the search area features of the search area;

[0017] Based on the template features and the search area features, obtaining candidate tracking results of the surveillance video frame;

[0018] Determine whether the candidate tracking result meets a preset tracking condition, and if so, use the candidate tracking result as the monitoring result of the monitoring video frame;

[0019] If not satisfied, obtain at least one region of interest feature of the region of interest based on the search area feature; the region of interest is a region including a candidate target object; based on the template feature and at least one of the region of interest features, obtain a similarity measure between the candidate target object and the target monitoring object, and obtain a re-identification result based on the similarity measure as a monitoring result of the monitoring video frame.

[0020] Optionally, obtaining a candidate tracking result of the surveillance video frame based on the template feature and the search area feature includes:

[0021] Performing multi-level cross-matching fusion on the template features and the search area features to obtain relevant response features of the template features and the search area features;

[0022] generating a correlation response map based on the correlation response features of the template features and the search area features;

[0023] Based on the template features and the relevant response features of the search area features, generating a predicted bounding box for each feature point on the relevant response map;

[0024] The scores of the predicted bounding boxes are obtained, and the predicted bounding box with the highest score is selected as the candidate tracking result.

[0025] Optionally, based on the template feature and at least one feature of the region of interest, obtaining a similarity measure between the candidate target object and the target monitoring object includes:

[0026] Performing region of interest pooling on the template features and the region of interest features to obtain pooled features of the template features and pooled features of the region of interest features;

[0027] Performing multi-scale feature fusion on the pooled features of the template features and the pooled features of the region of interest features to obtain multi-scale fused features;

[0028] Performing feature mapping on the multi-scale fusion features to obtain multi-scale mapping features;

[0029] Based on the multi-scale fusion features, a similarity measure between the candidate target object and the target monitoring object is calculated in a feature space based on cosine similarity and / or Euclidean distance.

[0030] Optionally, obtaining a re-identification result based on the similarity measurement as a monitoring result of the monitoring video frame includes:

[0031] Based on the similarity measurement between each of the candidate target objects and the target monitoring object, a re-identification result is obtained; the re-identification result includes a region of interest corresponding to the candidate target object with the highest similarity measurement;

[0032] The re-identification result is used as the monitoring result of the monitoring video frame.

[0033] A monitoring device, comprising:

[0034] A monitoring data acquisition unit, used to acquire monitoring video frames;

[0035] A model prediction unit, used to input the monitoring video frame into a pre-built integrated model monitoring video frame, and obtain a monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object;

[0036] The integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0037] A computer program product includes computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements various steps of a monitoring method.

[0038] An electronic device comprising: a memory and a processor;

[0039] The memory is used to store programs;

[0040] The processor is used to execute the program to implement each step of the monitoring method.

[0041] A readable storage medium stores a computer program, and when the computer program is executed by a processor, each step of a monitoring method is implemented.

[0042] It can be seen from the above technical scheme that the monitoring method and related devices provided in the embodiments of the present application input the monitoring video frame into a pre-built integrated model, and obtain the monitoring results of the monitoring video frame output by the integrated model, wherein the monitoring results include tracking results or re-identification results, and the tracking results include information of a target bounding box for indicating the target monitoring object, wherein the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set. The integrated model obtained by joint training of the tracking task and the re-identification task can output monitoring results including either tracking results or re-identification results. It can be seen that the present application realizes continuous monitoring of the target monitoring object by utilizing an integrated model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A block diagram of an implementation of a monitoring method provided in an embodiment of the present application;

[0045] Figure 2 A flow chart of a monitoring method provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the specific structure of an integrated model provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of a specific implementation flow of a monitoring method provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of a specific implementation process of a multi-level cross-matching fusion provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of a specific implementation process of a matching feature provided in an embodiment of the present application;

[0050] Figure 7 A schematic diagram of a specific implementation process of obtaining multi-scale fusion features provided in an embodiment of the present application;

[0051] Figure 8 A schematic diagram of a specific implementation process of feature mapping provided in an embodiment of the present application;

[0052] Fig. 9 A schematic diagram of a flow chart of a method for constructing an integrated model provided in an embodiment of the present application;

[0053] Fig.10 A schematic diagram of a specific implementation process of a method for constructing an integrated model provided in an embodiment of the present application;

[0054] Fig.11 A schematic diagram of the structure of a monitoring device provided in an embodiment of the present application;

[0055] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0057] In the tracking shooting scenario, the existing target object monitoring method treats tracking and re-identification as two independent tasks, and uses independent models and features for independent tasks. By using independently deployed tracking models and re-identification models to track and re-identify the target object, tracking and monitoring of the target object can be achieved. However, with limited computing power, it is difficult to achieve a good balance between performance and efficiency.

[0058] The current tracking models used to perform tracking tasks use correlation filter tracking methods based on manually designed features or matching tracking methods based on twin networks. Among them, the correlation filter tracking method uses manually designed features, such as HOG features, and its tracking stability is poor and it is difficult to cope with complex environments. The matching tracking method based on the twin network is easily disturbed by similar objects of the monitored object, resulting in tracking drift.

[0059] The current re-identification model used to perform re-identification tasks is based on deep features and calculates the Euclidean distance or cosine distance between target features. A deeper network model is needed for feature extraction to ensure the model's ability to distinguish similar targets. With limited computing power, it is difficult to obtain a re-identification model that meets real-time requirements.

[0060] Existing target object monitoring methods are optimized for specific targets, mainly tracking and re-identifying faces, bodies, etc., with poor reusability and limited application scenarios.

[0061] A monitoring method provided in an embodiment of the present application is applied to but not limited to scenarios of tracking and shooting a specified tracking object. By performing a tracking process, a detection process, and a re-identification process on the tracking object during the tracking and shooting process, continuous tracking of the tracking object is achieved, and when the tracking object is lost, the lost target is recovered, thereby improving the quality of the shot video and the content integrity.

[0062] Figure 1 A block diagram of an implementation of a monitoring method provided in an embodiment of the present application, such as Figure 1 As shown, in the preparation stage of video shooting, the specified monitoring object, that is, the target monitoring object, is obtained, and an object template of the target monitoring object is generated. In the video shooting stage, the integrated model is used to perform a tracking process on the target monitoring object based on the object template and the search area, and the tracking result is output if the target monitoring object is not lost. In the case that the target monitoring object is lost, a re-identification process is performed on the target monitoring object based on the object template and the detected candidate target object, and the re-identification result is output to achieve continuous tracking and monitoring of the target monitoring object.

[0063] Figure 2 A flow chart of a monitoring method provided in an embodiment of the present application is shown as follows: Figure 2 As shown,

[0064] S201, obtaining surveillance video frames.

[0065] In this embodiment, the monitoring device is used to collect monitoring video frames of the environment. This step continuously obtains the video stream of the monitoring video frames collected and returned by the monitoring device.

[0066] S202: Input the monitoring video frame into the pre-built integrated model to obtain the monitoring result of the monitoring video frame output by the integrated model.

[0067] In this embodiment, the surveillance video frames collected in real time are sequentially input into the integrated model, and the surveillance results include tracking results or re-identification results, and the tracking results include information of a target bounding box for indicating the target surveillance object.

[0068] In this embodiment, the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0069] The training tracking dataset includes a video sequence and a label of each video frame in the video sequence, the label is a target bounding box indicating a sample monitoring object, and the video sequence includes video frames arranged in chronological order. The training re-identification dataset includes: sample monitoring object images and labels, and the label of the sample monitoring object is an object identifier used to distinguish the sample monitoring object.

[0070] It can be seen from the above technical solution that a monitoring method provided by an embodiment of the present application inputs a monitoring video frame into a pre-built integrated model to obtain a monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object, wherein the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set. The integrated model obtained by joint training of the tracking task and the re-identification task can output a monitoring result including either a tracking result or a re-identification result. It can be seen that the present application realizes continuous monitoring of the target monitoring object by utilizing an integrated model.

[0071] Figure 3 A specific structural diagram of an integrated model provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the integrated model includes a twin network, a multi-level cross-matching fusion module, an instance classification branch, a bounding box regression branch, a monitoring result output module, a region of interest pooling module, a multi-scale feature fusion module, and a feature mapping module. Among them, the twin network includes two neural networks with the same structure and shared network parameters, denoted as the first neural network and the second neural network, the instance classification branch includes the first forward propagation network, and the bounding box regression branch includes the second forward propagation network.

[0072] In this embodiment, the input of the integrated model is the image of the target monitoring object and the monitoring video frame, and the output is the monitoring result of the monitoring video frame, and the monitoring result includes one of the tracking result or the re-identification result. That is, the integrated model is used to track and re-identify the target monitoring object at the same time. Specifically, the first neural network in the twin network is used to output the template feature Z of the target monitoring object, and the second neural network is used to output the search area feature X of the search area. The multi-level cross-matching fusion module is used to output the relevant response feature Y based on Z and X. The first forward propagation network in the instance classification branch is used to output the relevant response map based on Y, and the bounding box regression branch is used to generate the predicted bounding box of each feature point (one position corresponds to one feature point) on the relevant response map based on Y and the relevant response map output. The region of interest pooling module is used to output the pooling feature of Z and the pooling feature of the region of interest feature K, the multi-scale feature fusion module is used to output the multi-scale fusion feature E based on the pooling feature of the template feature and the pooling feature of the region of interest feature, and the feature mapping module is used to output the multi-scale mapping feature based on E. The monitoring result output module is used to output the monitoring result of the monitoring video frame based on the multi-scale fusion feature or the predicted bounding box.

[0073] Combination Figure 3 The specific structure of the integrated model shown in Figure 4An example of a specific implementation process of a monitoring method is shown below. Figure 4 As shown, this method specifically includes:

[0074] S401, the twin network extracts the template features of the target monitoring object and the search area features of the search area, and inputs the template features and the search area features into a multi-level cross-matching fusion module.

[0075] In this embodiment, the image of the target monitoring object is input into the first neural network, and the first neural network extracts the features of the target monitoring object through multiple feature layers to obtain a template feature Z, and the template feature Z includes the features of the target monitoring object on multiple feature layers. The image of the search area is input into the second neural network, and the second neural network extracts the features of the search area through multiple feature layers to obtain a search area feature X, and the search area feature includes the features of the search area on multiple feature layers.

[0076] In this embodiment, the template feature and the search area feature have three dimensions, namely, two spatial dimensions (identified by h and w) and one channel dimension (identified by c). Taking the number of feature layers as n as an example, the template feature of the i-th (i∈[1, n]) feature layer is recorded as , the search area feature of the i-th feature layer .

[0077] In this embodiment, the image of the search area is acquired based on the monitoring result of the previous video frame of the current monitoring video frame and the current monitoring video frame.

[0078] S402, the multi-level cross-matching fusion module performs multi-level cross-matching fusion on the template features and the search area features to obtain relevant response features of the template features and the search area features, and inputs the relevant response features into the instance classification branch and the bounding box regression branch respectively.

[0079] In this embodiment, both the template features and the search area features include features of multiple feature layers, and the multi-level cross-matching fusion module obtains relevant response features of the template features and the search area features through preset convolution operations and feature fusion on each feature layer.

[0080] In this embodiment, Figure 5 A specific method of performing multi-level cross-matching fusion on template features and search area features by a multi-level cross-matching fusion module is illustrated, such as Figure 5 As shown, the method includes:

[0081] The template features and search area features of the same feature layer are matched to obtain the matching features of the feature layer, and the matching features of each feature layer are pyramid fused to obtain the relevant response features of the template features and the search area features.

[0082] like Figure 5 As shown, taking the number of feature layers n as an example, the template features and search area features of each feature layer (including the 1st feature layer to the nth feature layer) are matched respectively to obtain the matching features of each feature layer. Figure 5 Example of template features for the first feature layer and search area features Perform matching to obtain the matching features of the first feature layer , for the template features of the second feature layer and search area features Perform matching to obtain the matching features of the second feature layer , for the template features of the nth feature layer and search area features Perform matching to obtain the matching features of the nth feature layer . Matching features of each feature layer (including ~ ) Perform pyramid fusion to obtain the relevant response features of the template features and the search area features .

[0083] like Figure 6 As shown, taking the i-th feature layer as an example, the template feature of the i-th feature layer and search area features Match and get matching features The specific methods include:

[0084] Will Corresponding Split into indivual The template sub-vectors are calculated, and the correlation responses of each template sub-vector and the search area feature are calculated to obtain the correlation response values ​​corresponding to each template sub-vector. The correlation response values ​​corresponding to each template sub-vector are reorganized in the channel dimension to obtain the response matching features. ,Will Input the convolution layer to obtain the matching features on the i-th feature layer .

[0085] In this embodiment, the specific method of performing pyramid fusion on the matching features of each feature layer to obtain the relevant response features of the template features and the search area features includes:

[0086] The pyramid fusion method is used to unify the size of the relevant response feature values ​​on each feature layer by upsampling or downsampling, and then the relevant response feature values ​​on each feature layer are fused to generate the relevant response features of the template feature and the search area feature. .

[0087] S403: The instance classification branch generates a correlation response graph based on the correlation response features of the template features and the search area features.

[0088] In this embodiment, the instance classification branch is constructed based on the first forward propagation network, the relevant response features are input into the first forward propagation network, the first forward propagation network outputs the first branch response features with a channel number of 1, and the relevant response graph is generated based on the first branch response features.

[0089] In this embodiment, the instance classification branch sends the relevant response map to the bounding box regression branch.

[0090] S404, the bounding box regression branch generates a predicted bounding box for each feature point on the relevant response map based on the relevant response features of the template features and the search area features.

[0091] In this embodiment, the bounding box regression branch is constructed based on the second forward propagation network, the relevant response features are input into the second forward propagation network, the second forward propagation network outputs the second branch response features with a channel number of 4, and based on the second branch response features and the relevant response graph, the predicted bounding boxes of each feature point on the relevant response graph are generated.

[0092] S405 , the monitoring result output module obtains the score of the predicted bounding box of each feature point, and selects the predicted bounding box with the highest score as the candidate tracking result.

[0093] In this embodiment, the score of the predicted bounding box of any feature point (position) is obtained based on the similarity between the predicted bounding box and the template feature of the target monitoring object, and the higher the similarity, the higher the score.

[0094] S406: The monitoring result output module determines whether the candidate tracking result meets the preset tracking condition.

[0095] In this embodiment, the tracking condition includes: the score is greater than a preset score threshold.

[0096] S407: If yes, the monitoring result output module uses the candidate tracking result as the tracking result and outputs the monitoring result.

[0097] In this embodiment, the monitoring result includes the tracking result.

[0098] S408: If not, the monitoring result output module sends a re-identification instruction to the region of interest pooling module.

[0099] In this embodiment, if the monitoring result output module determines that the candidate tracking result does not meet the tracking condition, it is determined that the target monitoring object is lost, and the re-identification instruction issued is used to instruct the target monitoring object to be re-identified.

[0100] S409 . In response to receiving the re-identification instruction, the interest pooling module performs interest region pooling on the template features and the interest region features respectively to obtain pooled features of the template features and pooled features of the interest region features.

[0101] In this embodiment, the region of interest feature K is the region feature of the region of interest, and the method for obtaining the region feature of the region of interest is: based on the detected candidate target object, a candidate frame is obtained, and the area enclosed by the candidate frame is used as the region of interest, and based on the search area feature of the search area and the candidate frame, the region feature of the region of interest is obtained.

[0102] It should be noted that the specific method for the interest pooling module to perform interest region pooling on the template features and the interest region features respectively can be found in the prior art.

[0103] S410, the multi-scale feature fusion module performs multi-scale feature fusion on the pooled features of the template features and the pooled features of the region of interest features to obtain multi-scale fusion features.

[0104] In this embodiment, Figure 7 An optional method for generating multi-scale fusion features is illustrated, such as Figure 7 As shown, the pooled feature Z' of the template feature obtained after pooling is convolved and up-sampled, the pooled feature K' of the region of interest feature is convolved, the processed Z' and K' are concatenated to obtain the feature ZK, the feature ZK is subjected to channel attention processing, and the feature ZK and the feature ZK after the channel attention processing are operated (multiplication or weighted processing) to obtain the multi-scale fusion feature E.

[0105] S411. The feature mapping module performs feature mapping on the multi-scale fusion features to obtain multi-scale mapping features.

[0106] In this embodiment, Figure 8 An optional specific method for feature mapping of multi-scale fusion features is illustrated, such as Figure 8 As shown, the multi-scale fusion features are processed by channel averaging, reconstruction reshape, full connection layer, and reconstruction reshape in sequence to obtain spatial position weights, and the multi-scale fusion features after convolution layer processing are subjected to spatial position weighted summation operation based on the spatial position weights to obtain the original mapping features. The original mapping feature generation process is performed four times based on the multi-scale fusion features to obtain 4 original mapping features, which are then spliced ​​and the spliced ​​original mapping features are processed by the full connection layer to obtain the multi-scale mapping features.

[0107] S412. The monitoring result output module calculates the similarity measure of the object template of the candidate target object and the target monitoring object in the feature space based on the multi-scale fusion feature.

[0108] In this embodiment, the similarity metric includes cosine similarity and / or Euclidean distance. For specific similarity metric calculation methods, reference may be made to the prior art.

[0109] S413: The monitoring result output module obtains the re-identification result and outputs the monitoring result based on the similarity measurement between the object templates of each candidate target object and the target monitoring object.

[0110] In this embodiment, if the similarity measure between the candidate target object and the object template of the target monitoring object is greater than a preset similarity threshold, the candidate box corresponding to the candidate target object is used as the re-identification result, and the monitoring result includes the re-identification result.

[0111] It can be seen from the above technical scheme that a monitoring method provided by an embodiment of the present application, an integrated model is trained based on a training sample data set, the training sample data set includes a training tracking data set and a training re-identification data set, and the integrated model obtained by joint training of the tracking task and the re-identification task can output a monitoring result including either a tracking result or a re-identification result. It can be seen that a monitoring method provided by an embodiment of the present application tracks and re-identifies a target monitoring object based on an integrated model, thereby realizing continuous monitoring of the target monitoring object, wherein the target monitoring object can be temporarily configured before video shooting, thereby solving the shortcomings of poor reusability and limited application scenarios of existing tracking algorithms.

[0112] In the training process of the integrated model, the target tracking and re-identification capabilities are learned simultaneously, forming a multi-task learning paradigm, which can further improve the model's ability to distinguish similar targets and improve the stability of target tracking and re-identification. In addition, in the model training process, the use of sub-network search strategies can significantly reduce the model's computational workload and improve the model's operating efficiency. Specifically, Fig. 9 A schematic diagram of a specific implementation flow of a method for constructing an integrated model provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the method for constructing an integrated model includes: a sub-network search stage and a sub-network training stage, wherein the sub-network search stage obtains the target sub-network based on the search space of the integrated model, and further, the integrated model is obtained through the sub-network training stage based on the target sub-network.

[0113] Specifically, Fig.10 The specific implementation process of the integrated model building method provided in the embodiment of the present application is as follows: Fig.10 As shown, the training process of the integrated model includes a sub-network search phase and a sub-network training phase.

[0114] In this embodiment, the sub-network search phase includes:

[0115] S1001. Define the search space of the integrated model.

[0116] In this embodiment, the search space includes multiple sub-networks of an integrated model. The model structures of the sub-networks are the same, but the structural hyperparameters and network parameters are different. The model structure of the sub-networks of the integrated model is a network structure composed of a backbone network, a connection module, and a task head.

[0117] In this embodiment, each sub-network in the search space is defined based on multiple structural hyperparameters and network parameters, wherein the structural hyperparameters include one or more of the convolution kernel size, the convolution step size, and the channel expansion coefficient, and the network parameters include but are not limited to whether to use separable convolution, whether to use residual connection, and multiple activation functions.

[0118] Specifically, the backbone network of the integrated model is a twin network, and the basic unit is a mobile inverted bottleneck convolution module. The searchable structural hyperparameters of the backbone network include convolution kernel size, convolution step size, and channel expansion coefficient, where the optional convolution kernel size is one of 3x3, 5x5, or 7x7, the optional convolution step size is one of 1 or 2, and the optional channel expansion coefficient is one of 4 or 6. A stage module in the backbone network is formed by stacking a target number of mobile inverted bottleneck convolution modules. Optionally, the target number is 5, that is, the backbone network consists of 5 stage modules, and the number of output channels of each stage is 9, 16, 27, 54, and 65 respectively.

[0119] The connection module of the integrated model includes the region of interest pooling module and the multi-level cross-matching fusion module. The connection module does not contain searchable structural hyperparameters.

[0120] The task head of the integrated model includes three branches, namely the instance classification branch and the bounding box regression branch for processing the tracking task, and the re-identification branch for processing the re-identification task. Among them, the basic unit of the instance classification branch and the bounding box regression branch is a separable convolution module, and its searchable structural hyperparameters include: convolution kernel size and output channel number, where the convolution kernel size is one of 3x3 or 5x5, and the output channel number is one of 108, 144 or 196. The re-identification branch consists of a multi-scale feature fusion module and a feature mapping module, in which the convolution layers are all searchable layers, the convolution kernel size is one of 1x1, 3x3 or 5x5, and the output channel number is one of 96, 108 or 144.

[0121] It should be noted that any sub-network of the model to be searched is a solution of the search space of the model to be searched. Taking the network structure of the model to be searched as a two-layer convolutional network as an example, the method of defining the search space of the model to be searched includes: defining the convolution kernel size (kernel size) of the first layer of convolution of the sub-network to be any one of 1x1, 3x3, and 5x5, and the convolution step (stride) to be any one of 1, 2, and 3, and the convolution kernel size of the second layer of convolution is any one of 3x3 and 5x5, and the convolution step can be 1 / 2. Optionally, the convolution layer is represented by "convolution kernel size_convolution step", for example, "1x1_S4" represents a convolution layer with a convolution kernel size of 1x1 and a convolution step of 2. It can be understood that there are many combinations of two-layer convolutional networks, such as 1x1_s1+3x3_s1, 1x1_s1+3x3_S4, 1x1_S4+3x3_s1, etc. Any of these combinations constitutes a subnetwork in the search space of the model to be searched whose network structure is a two-layer convolutional network.

[0122] In this embodiment, the specific method of defining the search space of the integrated model can refer to the prior art.

[0123] S1002: Obtain a sample data set for search.

[0124] In this embodiment, a sample data set for search is obtained based on tracking and re-identification tasks, and the sample data set for search includes a tracking data set for search and a re-identification data set for search.

[0125] The tracking dataset for search includes a video sequence and a label of each video frame in the video sequence, the label is a target bounding box indicating a sample monitoring object, and the video sequence includes video frames arranged in chronological order. The re-identification dataset for search includes: sample monitoring object images and labels, and the label of the sample monitoring object is the sample monitoring object identifier.

[0126] S1003. Based on the sample data set for search, use a sub-network search method to search for a sub-network in the search space based on constraints to obtain an optimal sub-network.

[0127] In this embodiment, the constraints include optimal training performance, high precision, and small number of parameters. That is, the goal of the subnetwork search algorithm is to obtain a subnetwork that performs best on the training data set in a predefined search space by adjusting the network model parameters and structure, and the subnetwork has the advantages of high precision and small number of parameters. Since the subnetwork search algorithm is trained based on the search tracking data set and the search re-identification data set, the target subnetwork obtained by the algorithm is a network model that is optimized and compressed for tracking and re-identification tasks.

[0128] In this embodiment, the subnetwork search algorithm searches for the optimal subnetwork in the search space. Considering the comprehensive performance of model accuracy and efficiency, the process of searching for the optimal subnetwork is to determine all searchable structural hyperparameters to optimize the comprehensive performance of the model. After all structural hyperparameters are determined, the optimal subnetwork is obtained, and the optimal subnetwork is used as the target subnetwork of the integrated model. The target subnetwork of the integrated model can handle tracking tasks and re-identification tasks at the same time.

[0129] The sub-network search algorithm (Network Architecture Search, NAS) includes the Differentiable Architecture Search method (DARTS) or other sub-network search methods. The specific algorithm implementation process can refer to the prior art.

[0130] In this embodiment, in the sub-network training stage, the target sub-network of the integrated model, that is, the optimal sub-network, is trained, and the trained optimal sub-network is used as the integrated model. Specifically, the process of training the target sub-network includes:

[0131] S1004: Obtain a sample data set for training.

[0132] In this embodiment, the training sample data set includes a training tracking data set and a training re-identification data set.

[0133] The training tracking dataset includes sample video sequences and corresponding annotations. The annotations of the sample video sequences are target bounding boxes for each video frame. The target bounding boxes are used to mark the positions of sample monitored objects in the video frames. The sample video sequences include video frames sorted by time.

[0134] In this embodiment, for the same sample video sequence, the template area and the search area are respectively captured in different video frames according to the position of the sample monitoring object to form a tracking data sample pair for training.

[0135] In this embodiment, the training re-identification data set includes: sample surveillance object images and labels, and the labels of the sample surveillance objects are sample surveillance object identifiers. Specifically, the sample surveillance object identifiers marked in different sample video sequences are all different, and positive and negative sample pairs are constructed for the sample surveillance objects in different sample video sequences to obtain training re-identification data including positive and negative samples.

[0136] S1005. Input the sample video sequence into the target sub-network, use the weighted cross entropy loss as the response image prediction loss, use the L1 loss as the bounding box regression loss, and use the triplet loss as the loss of the re-identification task branch to train the target sub-network.

[0137] In this embodiment, the response map prediction loss is the loss of the instance classification branch, and the bounding box regression loss is the loss of the bounding box regression branch. In the feature space, the same target is brought closer, different targets are pushed further away, and the target sub-network is trained to obtain the final tracking and re-identification integrated model to enhance the model's ability to distinguish different monitored objects.

[0138] S1006: When the preset training completion condition is reached, an integrated model is constructed based on the trained optimal sub-network.

[0139] In this embodiment, when the preset training completion condition is reached, the trained target sub-network is used as an integrated model.

[0140] In this embodiment, the training completion condition includes that the number of iterations reaches a preset number threshold and / or the training time reaches a preset duration threshold. For specific training methods, reference may be made to the prior art.

[0141] It can be seen from the above technical solutions that a monitoring method provided by the embodiment of the present application has at least the following technical effects:

[0142] 1. Train a highly robust general target tracking model with good reusability and the ability to flexibly specify the target to be tracked. The "high robustness" is reflected in the fact that it is not easy to lose or mistrack. Due to the joint training of tracking and re-identification tasks, the model's ability to distinguish similar targets is enhanced. In addition, sub-network search can obtain a network structure that is more suitable for the target task from the search space, which is better than manually designed networks. Through two-stage training, the model can track any specified target with good reusability. It only needs to give the model a template image, and it can track animals, people, cars, etc.

[0143] 2. Use an integrated model to train tracking and re-identification tasks, which improves the model's ability to distinguish instances.

[0144] Specifically, the advantage of multi-task training is that when tasks with certain correlation are jointly trained, better training results are more likely to be obtained. Tracking and re-identification tasks have certain correlations. Both need to distinguish different target instances, and the focus is on identifying objects with similar appearances. Therefore, it is reasonable to integrate tracking and re-identification with multi-task training, which can improve the network's ability to distinguish instances.

[0145] 3. Targeted compression and optimization are carried out through sub-network search, which significantly reduces the amount of model calculation and improves the model operation efficiency.

[0146] Specifically, the loss function of the first-stage subnetwork search is the loss function of the tracking task. Simply put, the goal of the first-stage subnetwork search is to find a subnetwork structure that makes the tracking task loss function value lower. During the subnetwork search process, parameter quantity limits, precision limits, etc. can be set. Therefore, the searched subnetwork is usually lighter and more suitable for specific tasks, achieving targeted optimization and compression.

[0147] 4. It adopts miniaturized and low-power hardware and software design, can be deployed on mobile and server ends, has high scalability and low computing burden.

[0148] Fig.11 A schematic diagram of the structure of a monitoring device provided in an embodiment of the present application is shown. Fig.11 As shown, the device may include:

[0149] The monitoring data acquisition unit 1101 is used to acquire monitoring video frames;

[0150] The model prediction unit 1102 is used to input the monitoring video frame into a pre-built integrated model monitoring video frame, and obtain the monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object;

[0151] The integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0152] Optionally, the monitoring device also includes: a model construction unit, used to define the search space of the integrated model; the search space of the integrated model includes multiple sub-networks of the integrated model, the model structures of the multiple sub-networks are the same, and the structural hyperparameters and network parameters are different; based on the search sample data set, a sub-network search method is used to perform a sub-network search in the search space of the integrated model based on preset constraints to obtain an optimal sub-network, and the search sample data set includes a search tracking data set and a search re-identification data set; based on the training sample data set, the optimal sub-network is trained; when the preset training completion condition is reached, the integrated model is constructed based on the trained optimal sub-network.

[0153] Optionally, the monitoring device further includes an integrated model, wherein the integrated model includes a twin network, wherein the twin network includes a first neural network and a second neural network that share network parameters and network structure;

[0154] When the integrated model is used to output the monitoring result of the monitoring video frame, it is specifically used to:

[0155] Based on the monitoring result of the previous video frame of the monitoring video frame and the monitoring video frame, acquiring an image of the search area of ​​the monitoring video frame;

[0156] respectively using the first neural network and the second neural network to extract the template features of the target monitoring object and the search area features of the search area;

[0157] Based on the template features and the search area features, obtaining candidate tracking results of the surveillance video frame;

[0158] Determine whether the candidate tracking result meets a preset tracking condition, and if so, use the candidate tracking result as the monitoring result of the monitoring video frame;

[0159] If not satisfied, obtain at least one region of interest feature of the region of interest based on the search area feature; the region of interest is a region including a candidate target object; based on the template feature and at least one of the region of interest features, obtain a similarity measure between the candidate target object and the target monitoring object, and obtain a re-identification result based on the similarity measure as a monitoring result of the monitoring video frame.

[0160] Optionally, when the integrated model is used to obtain the candidate tracking result of the surveillance video frame based on the template feature and the search area feature, it is specifically used to:

[0161] Performing multi-level cross-matching fusion on the template features and the search area features to obtain relevant response features of the template features and the search area features;

[0162] generating a correlation response map based on the correlation response features of the template features and the search area features;

[0163] Based on the template features and the relevant response features of the search area features, generating a predicted bounding box for each feature point on the relevant response map;

[0164] The scores of the predicted bounding boxes are obtained, and the predicted bounding box with the highest score is selected as the candidate tracking result.

[0165] Optionally, when the integrated model is used to obtain a similarity measure between the candidate target object and the target monitoring object based on the template feature and at least one feature of the region of interest, it is specifically used to:

[0166] Performing region of interest pooling on the template features and the region of interest features to obtain pooled features of the template features and pooled features of the region of interest features;

[0167] Performing multi-scale feature fusion on the pooled features of the template features and the pooled features of the region of interest features to obtain multi-scale fused features;

[0168] Performing feature mapping on the multi-scale fusion features to obtain multi-scale mapping features;

[0169] Based on the multi-scale fusion features, a similarity measure between the candidate target object and the target monitoring object is calculated in a feature space based on cosine similarity and / or Euclidean distance.

[0170] Optionally, when the integrated model is used to obtain a re-identification result based on the similarity metric as a monitoring result of the monitoring video frame, it is specifically used to:

[0171] Based on the similarity measurement between each of the candidate target objects and the target monitoring object, a re-identification result is obtained; the re-identification result includes a region of interest corresponding to the candidate target object with the highest similarity measurement;

[0172] The re-identification result is used as the monitoring result of the monitoring video frame.

[0173] Fig.12 A schematic diagram of the structure of the electronic device is shown, and the device may include: at least one processor 1201, at least one communication interface 1202, at least one memory 1203 and at least one communication bus 1204;

[0174] In the embodiment of the present application, the number of the processor 1201, the communication interface 1202, the memory 1203, and the communication bus 1204 is at least one, and the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204;

[0175] The processor 1201 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0176] The memory 1203 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0177] The memory stores a program, and the processor can execute the program stored in the memory to implement various steps of a monitoring method provided in an embodiment of the present application, as follows:

[0178] Acquire a surveillance video frame; input the surveillance video frame into a pre-built integrated model surveillance video frame, and obtain a surveillance result of the surveillance video frame output by the integrated model, wherein the surveillance result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box indicating a target surveillance object; wherein the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0179] It should be noted that the specific implementation method of each step of the above-mentioned monitoring method can be referred to the above-mentioned embodiment, and this embodiment will not be repeated. The embodiment of the present application also provides a readable storage medium, which can store a computer program suitable for execution by a processor. When the computer program is executed by the processor, each step of a monitoring method provided in the embodiment of the present application is implemented as follows:

[0180] Acquire a surveillance video frame; input the surveillance video frame into a pre-built integrated model surveillance video frame, and obtain a surveillance result of the surveillance video frame output by the integrated model, wherein the surveillance result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box indicating a target surveillance object; wherein the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0181] It should be noted that the specific implementation method of each step of the above monitoring method can be found in the above embodiment, and this embodiment will not elaborate on it.

[0182] The embodiment of the present application further provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the steps of the monitoring method as follows:

[0183] Acquire a surveillance video frame; input the surveillance video frame into a pre-built integrated model surveillance video frame, and obtain a surveillance result of the surveillance video frame output by the integrated model, wherein the surveillance result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box indicating a target surveillance object; wherein the integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

[0184] It should be noted that the specific implementation method of each step of the above monitoring method can be found in the above embodiment, and this embodiment will not elaborate on it.

[0185] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0186] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0187] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those 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 application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A monitoring method, It is characterized in that include: Get surveillance video frames; Input the monitoring video frame into a pre-built integrated model monitoring video frame, and obtain a monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object; The integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

2. The monitoring method according to claim 1, It is characterized in that The monitoring method further comprises: Defining a search space of an integrated model; the search space of the integrated model includes multiple sub-networks of the integrated model, and the model structures of the multiple sub-networks are the same, but the structural hyperparameters and network parameters are different; According to a sample data set for search, a sub-network search method is used to perform a sub-network search in the search space of the integrated model based on preset constraints to obtain an optimal sub-network, wherein the sample data set for search includes a tracking data set for search and a re-identification data set for search; Training the optimal sub-network according to the training sample data set; When the preset training completion condition is reached, the integrated model is constructed based on the trained optimal sub-network.

3. The monitoring method according to claim 1, It is characterized in that The integrated model includes a twin network, and the twin network includes a first neural network and a second neural network that share network parameters and network structure; The method for the integrated model to output the monitoring result of the monitoring video frame includes: Based on the monitoring result of the previous video frame of the monitoring video frame and the monitoring video frame, acquiring an image of the search area of ​​the monitoring video frame; respectively using the first neural network and the second neural network to extract the template features of the target monitoring object and the search area features of the search area; Based on the template features and the search area features, obtaining candidate tracking results of the surveillance video frame; Determine whether the candidate tracking result meets a preset tracking condition, and if so, use the candidate tracking result as the monitoring result of the monitoring video frame; If not satisfied, obtain at least one region of interest feature of the region of interest based on the search area feature; the region of interest is a region including a candidate target object; based on the template feature and at least one of the region of interest features, obtain a similarity measure between the candidate target object and the target monitoring object, and obtain a re-identification result based on the similarity measure as a monitoring result of the monitoring video frame.

4. The method according to claim 3, It is characterized in that The step of obtaining a candidate tracking result of the surveillance video frame based on the template feature and the search area feature includes: Performing multi-level cross-matching fusion on the template features and the search area features to obtain relevant response features of the template features and the search area features; generating a correlation response map based on the correlation response features of the template features and the search area features; Based on the template features and the relevant response features of the search area features, generating a predicted bounding box for each feature point on the relevant response map; The scores of the predicted bounding boxes are obtained, and the predicted bounding box with the highest score is selected as the candidate tracking result.

5. The method according to claim 4, It is characterized in that The obtaining of the similarity measure between the candidate target object and the target monitoring object based on the template feature and at least one feature of the region of interest comprises: Performing region of interest pooling on the template features and the region of interest features to obtain pooled features of the template features and pooled features of the region of interest features; Performing multi-scale feature fusion on the pooled features of the template features and the pooled features of the region of interest features to obtain multi-scale fused features; Performing feature mapping on the multi-scale fusion features to obtain multi-scale mapping features; Based on the multi-scale fusion features, a similarity measure between the candidate target object and the target monitoring object is calculated in a feature space based on cosine similarity and / or Euclidean distance.

6. The method according to claim 5, It is characterized in that The obtaining of the re-identification result based on the similarity measurement as the monitoring result of the monitoring video frame includes: Based on the similarity measurement between each of the candidate target objects and the target monitoring object, a re-identification result is obtained; the re-identification result includes a region of interest corresponding to the candidate target object with the highest similarity measurement; The re-identification result is used as the monitoring result of the monitoring video frame.

7. A monitoring device, It is characterized in that include: A monitoring data acquisition unit, used to acquire monitoring video frames; A model prediction unit, used for inputting the monitoring video frame into a pre-built integrated model monitoring video frame, and obtaining a monitoring result of the monitoring video frame output by the integrated model, wherein the monitoring result includes a tracking result or a re-identification result, and the tracking result includes information of a target bounding box for indicating a target monitoring object; The integrated model is trained based on a training sample data set, and the training sample data set includes a training tracking data set and a training re-identification data set.

8. A computer program product, It is characterized in that The method comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements each step of the monitoring method as described in any one of claims 1 to 6.

9. An electronic device, It is characterized in that include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the monitoring method according to any one of claims 1 to 6.

10. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, each step of the monitoring method according to any one of claims 1 to 6 is implemented.