Behavior detection method and device of target object, equipment, storage medium and product

The target object behavior in the bank surveillance video is automatically detected through the target detection model, which solves the problems of high manual detection cost, low efficiency and low accuracy, and achieves efficient and accurate behavior detection and user experience improvement.

CN118587771APending Publication Date: 2024-09-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410748123.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, the behavior detection of target objects in the bank working area relies on manual viewing of surveillance videos, resulting in high cost, low efficiency, low accuracy, and reduced user experience.

Method used

The target detection model is used to automatically detect target objects in video frames, and behavioral prompts are generated through feature map extraction, attention mechanism and detection module to achieve automated target object behavior detection.

Benefits of technology

Save labor costs, improve the efficiency and accuracy of target object detection, and enhance user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587771A
    Figure CN118587771A
Patent Text Reader

Abstract

The invention provides a behavior detection method and device of a target object, equipment, a storage medium and a product, and relates to the field of artificial intelligence. The method comprises the following steps: inputting an acquired image frame of a to-be-detected video into a preset target detection model to obtain a plurality of feature maps; and then, based on a preset target detection model, processing the feature map to obtain key feature information. And processing the key feature information based on an attention mechanism module in a preset target detection model to obtain processed key feature information. And then, based on a detection module in a preset target detection model, carrying out detection processing on the processed key feature information to obtain the category of the target object in the image frame and a target detection frame. And finally, generating prompt information according to the relative relationship between the category of the target object and the target detection frame. According to the method, the labor cost is saved, the detection efficiency and accuracy of the target object are improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method, device, equipment, storage medium and product for detecting behavior of a target object. Background Art

[0002] As banking operations continue to evolve, there is a need to determine the behavior of objects in the bank's work area.

[0003] In the prior art, surveillance videos in the working area of ​​the bank are manually viewed to determine the behavior of the target object in the working area, for example, whether abnormal behavior occurs or whether the user needs help.

[0004] However, such a method of manually reviewing videos to determine the behavior of the target object requires high labor costs, and has low detection efficiency and accuracy, thereby reducing user experience. Summary of the invention

[0005] The present application provides a method, device, equipment, storage medium and product for detecting the behavior of a target object, so as to solve the technical problems of high labor cost, low detection efficiency and low accuracy in detecting the behavior of a target object.

[0006] In a first aspect, the present application provides a method for detecting behavior of a target object, the method comprising:

[0007] Input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different;

[0008] Based on the preset target detection model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame;

[0009] Based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map;

[0010] Based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target object is included in the target detection frame;

[0011] Prompt information is generated according to the category of the target object in the image frame and the target detection frame of the target object; wherein the prompt information represents the behavior of the target object.

[0012] In a second aspect, the present application provides a device for detecting a behavior of a target object, the device comprising:

[0013] An extraction module is used to input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different;

[0014] A first processing module is used to process each feature map of the image frame based on the preset target detection model to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame;

[0015] A second processing module is used to process the key feature information corresponding to each feature map based on the attention mechanism module corresponding to each feature map in the preset target detection model to obtain the processed key feature information corresponding to each feature map;

[0016] A detection module, configured to perform detection processing on the processed key feature information corresponding to each feature map based on the detection module corresponding to each feature map in the preset target detection model, to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object;

[0017] The generation module is used to generate prompt information according to the category of the target object and the target detection frame of the target object in the image frame; wherein the prompt information represents the behavior of the target object.

[0018] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0019] The memory stores computer-executable instructions;

[0020] The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect above.

[0021] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect above.

[0022] In a fifth aspect, a computer program product comprises a computer program, which, when executed by a processor, implements the method described in the first aspect above.

[0023] The behavior detection method, device, equipment, storage medium and product of the target object provided in the embodiment of the present application are obtained by automatically inputting the image frame of the video to be detected into the preset target detection model for feature map extraction, and obtaining multiple multi-scale feature maps of the image frame in the video to be detected; then, based on the preset target detection model, each feature map of the image frame is processed to obtain the key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame. Then, based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map. Then, based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object. Finally, according to the relative relationship between the category of the target object in the image frame and the target detection frame of the target object, prompt information is generated; wherein the prompt information represents the behavior of the target object.

[0024] Since the method provided in the embodiment of the present application can automatically detect the target object category and the target detection frame in the image frame of the video to be detected, labor costs can be saved.

[0025] Since the preset target detection model provided in the embodiment of the present application can provide a multi-scale feature map for each image frame, and each scale of the feature map includes both shallow semantic features and deep semantic features, it is possible to accurately detect both smaller target objects, such as mobile phones, and larger target objects, such as staff or users.

[0026] In addition, the preset target detection model includes an attention mechanism module, and the weight parameters determined by the attention mechanism module can be multiplied by the feature map. In the processed key feature information corresponding to each feature map, the important features can be better reflected according to the weight parameters, and the unimportant features can be suppressed. Therefore, the category of the target object subsequently detected by the important features and its corresponding target detection box can improve the accuracy of the target object detection.

[0027] Therefore, the method provided in the embodiment of the present application can improve the efficiency and accuracy of target object detection.

[0028] The method provided in the embodiment of the present application can automatically generate abnormal behavior alarm prompts for staff or prompts for users who need help based on the category of the detected target object and the relative relationship between each target detection frame, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0030] Figure 1 A schematic diagram of an application scenario of the target object behavior detection method provided in an embodiment of the present application;

[0031] Figure 2 A flowchart of a method for detecting a behavior of a target object provided in an embodiment of the present application;

[0032] Figure 3 A flowchart of another target object behavior detection method provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of a model training scenario for a target object behavior detection method provided in an embodiment of the present application;

[0034] Figure 5 A schematic diagram of the network structure of a preset target detection model provided in an embodiment of the present application;

[0035] Figure 6 A schematic diagram of the structure of a processing submodule provided in an embodiment of the present application;

[0036] Figure 7 A schematic diagram of the structure of another processing submodule provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of the structure of a depth residual module provided in an embodiment of the present application;

[0038] Fig. 9 A schematic diagram of the structure of a target object behavior detection device provided in an embodiment of the present application;

[0039] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0040] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0042] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0043] In addition, this application involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and the use of artificial intelligence technology for automated decision-making, and a technical solution for making decisions that have a significant impact on personal rights and interests based on the results of automated decision-making. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decision-making; if the user chooses to reject, the expert decision-making process will be entered.

[0044] It should be noted that the behavior detection method, device, equipment, storage medium and product of the target object of this application can be used in the field of artificial intelligence, and can also be used in any field other than artificial intelligence. The application field of the behavior detection method, device, equipment, storage medium and product of the target object of this application is not limited.

[0045] As the demand for bank branch services increases, there is a need to determine the behavior of objects within the bank branch.

[0046] For example, the specific application scenarios of this application can be understood in conjunction with the following examples.

[0047] In one example, if a staff member at a bank branch looks at his mobile phone for N1 minutes in a row, it is prompted that there is abnormal behavior. Wherein, N1 is a natural number greater than 0, which can be determined based on experience, and this embodiment does not limit this.

[0048] In another example, if a user is not received by a staff member at a bank branch for N2 consecutive minutes, a prompt is given that the user needs help. Wherein, N2 is a natural number greater than 0, which can be determined based on experience, and this embodiment does not limit this.

[0049] At present, in the related technologies, when determining the behavior of an object in a bank branch, the behavior of the target object in the working area is determined by manually viewing the surveillance video in the working area of ​​the bank branch.

[0050] However, the above manual method has the problems of high labor cost, low detection efficiency and low accuracy, thus reducing the user experience.

[0051] In response to the problems in the related technologies, this application proposes the following technical concept: automatically detect objects in bank surveillance videos, and automatically determine whether to give a prompt based on the relative relationship of the detected objects. This can save labor costs, increase the efficiency and accuracy of target object detection, and improve user experience.

[0052] First combine Figure 1 Taking the banking scenario as an example, the application scenario of the target object behavior detection method provided by the embodiment of the present application is introduced. Figure 1 A schematic diagram of an application scenario of the target object behavior detection method provided in an embodiment of the present application, such as Figure 1 As shown, the application scenario diagram includes a video to be detected 10 and a server 11, wherein the server 11 includes a frame extraction module 110, a preset target detection model 111 and a generation module 112, and the preset target detection model 111 includes a feature extraction module 1111, a feature processing module 1112, an attention mechanism module 1113 and a detection module 1114.

[0053] The video to be detected 10 may be understood as a surveillance video of a bank branch, for example.

[0054] The server 11 performs frame extraction processing on the collected video to be detected 10 based on the frame extraction module 110 to obtain multiple image frames.

[0055] Each image frame is then input into the feature extraction module 1111 in the preset target detection model 111 to extract feature maps, thereby obtaining multiple feature maps, such as 160×160 feature maps, 80×80 feature maps, 40×40 feature maps, and 20×20 feature maps.

[0056] Then, based on the feature processing module 1112, each feature graph is processed to obtain key feature information corresponding to each feature graph. For example, based on the feature processing module 1112, a 160×160 feature graph is processed to obtain key feature information related to the mobile phone. For another example, based on the feature processing module 1112, a 40×40 feature graph is processed to obtain key feature information related to the staff and key feature information related to the customer.

[0057] Afterwards, based on the attention mechanism module 1113 corresponding to each feature map, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map. For example, based on the attention mechanism module 1113 corresponding to the feature map of 160×160, the key feature information corresponding to the feature map of 160×160 is processed to obtain more key feature information related to the mobile phone than the key feature information related to the mobile phone output by the feature processing module 1112.

[0058] Then, based on the detection module 1114 corresponding to each feature map, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object. For example, based on the detection module 1114 corresponding to the 160×160 feature map, the processed key feature information corresponding to the 160×160 feature map is detected and processed to obtain the category of the target object in the image frame as a mobile phone, and obtain the target detection frame representing the position range of the mobile phone in the image frame. For another example, based on the detection module 1114 corresponding to the 40×40 feature map, the processed key feature information corresponding to the 40×40 feature map is detected and processed to obtain the category of the target object in the image frame as a staff member, and obtain the target detection frame representing the position range of the staff member in the image frame.

[0059] Then, based on the generation module 112, prompt information is generated according to the category of the target object in the image frame and the target detection frame of the target object. For example, based on the generation module 112, in 20 consecutive image frames, only two target objects are detected in each image frame, one of which is a staff member and the other is a mobile phone, then prompt information for abnormal behavior warning of the staff member is generated.

[0060] For another example, based on the generation module 112, in 20 consecutive image frames, only one target object is detected in each image frame, and its category is user, then prompt information of the user requiring help is generated for the user.

[0061] The above combination Figure 1 What is introduced is the application scenario of the behavior detection method of the target object in the banking scenario. It can be understood that the application scenarios of the behavior detection method of the target object in the business hall, service hall and other scenarios are similar to the application scenarios of the behavior detection method of the target object in the banking scenario. This embodiment will not introduce other scenarios in detail.

[0062] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0063] Figure 2 A flow chart of a method for detecting a behavior of a target object provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:

[0064] S201. Input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different.

[0065] Exemplarily, the execution subject of this embodiment can be a server, or a terminal device, or an electronic device, or a behavior detection device or device for a target object, or other devices or equipment that can implement the solution of this application, without limitation. Among them, the server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server can also be a server of a distributed system, or a server combined with a blockchain.

[0066] This embodiment is introduced with the execution subject being a server.

[0067] Exemplarily, the server performs frame extraction processing on the collected video to be detected to obtain multiple image frames, and then inputs each image frame into a preset target detection model in a time-ordered order to extract feature maps, thereby obtaining multiple feature maps of the image frames in the video to be detected. Among them, the feature map dimensions of the multiple feature maps are different, for example, it can also be understood that the number of channels of the multiple feature maps, and / or the number of horizontal pixels corresponding to the feature maps, and / or the number of vertical pixels corresponding to the feature maps are different.

[0068] In one example, for example, you can combine Figure 1 To understand, such as Figure 1 As shown, the server 11 performs frame extraction processing on the collected video 10 to be detected based on the frame extraction module 110 to obtain multiple image frames. The frame extraction module 110 can extract an image frame every N3 seconds (N3 is a natural number greater than 1, which can be determined based on experience and is not limited in this embodiment).

[0069] Then, in chronological order from front to back, each image frame is input into the feature extraction module 1111 in the preset target detection model 111 for feature map extraction, and multiple feature maps of the image frames in the video to be detected are obtained. Among them, the feature extraction module 1111 can be composed of a series of convolution layers, batch normalization, activation function layers, maximum pooling layers, and upsampling layers, which can extract feature maps of different scales from the input image frames for subsequent target object detection, and each scale of feature maps takes into account both deep semantic features and shallow semantic features. For example, a 160×160 feature map, an 80×80 feature map, a 40×40 feature map, and a 20×20 feature map can be obtained.

[0070] Since the receptive field of shallow features in the 160×160 feature map is small and contains more detailed features, it is suitable for detecting small target objects in the future, such as detecting mobile phones. The receptive field of shallow features in the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map are large and contain more overall features, so they are suitable for detecting large target objects in the future, such as detecting staff or users. Therefore, feature maps of different scales can be used to detect both small and large target objects in the future, thereby improving the efficiency and accuracy of target object detection.

[0071] S202. Based on a preset target detection model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame.

[0072] Exemplarily, after obtaining multiple feature maps of image frames in the video to be detected, the server can process each feature map of the image frame based on a preset target detection model to obtain key feature information corresponding to each feature map.

[0073] The key feature information includes the semantic features of the target object in the image frame, and the semantic features may include shallow semantic features and deep semantic features.

[0074] Specifically, shallow semantic features can be understood as semantic features obtained through fewer levels of processing in a preset target detection model, such as the contour, edge, color, texture, shape and other detailed features of the target object. Therefore, shallow semantic features can be used to detect the target detection frame of the target object in the future.

[0075] For example, deep semantic features can be understood as semantic features obtained through multiple levels of processing in a preset target detection model, such as abstract features that the target object is a mobile phone, a staff member, or a user. Therefore, deep semantic features can be used to detect the category of the target object in the future.

[0076] In one example, for example, you can combine Figure 1 To understand, such as Figure 1 As shown, it is assumed that the server 11 obtains a 160×160 feature map, an 80×80 feature map, a 40×40 feature map, and a 20×20 feature map of a certain image frame from the output of the feature extraction module 1111. Afterwards, the server 11 processes the 160×160 feature map, the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map based on the feature processing module 1112 in the preset target detection model 111, respectively, to obtain key feature information corresponding to each feature map.

[0077] For example, the server 11 processes the 160×160 feature map based on the feature processing module 1112 in the preset target detection model 111, and obtains that the key feature information corresponding to the 160×160 feature map is the outline, shape, and color features of the mobile phone, and the semantic feature that the target object is a mobile phone.

[0078] For another example, the server 11 processes the 40×40 feature map based on the feature processing module 1112 in the preset target detection model 111, and obtains that the key feature information corresponding to the 40×40 feature map is the outline, shape, and color features of the staff member, and the semantic features that the target object is the staff member.

[0079] Among them, the processing of the feature map by the feature processing module 1112 in the preset target detection model 111 can be achieved through multi-layer convolution, for example.

[0080] It can be understood that the implementation method of the server 11 processing the 80×80 feature map based on the feature processing module 1112 in the preset target detection model 111, and the implementation method of processing the 20×20 feature map are similar to the implementation methods introduced above and will not be repeated here.

[0081] Since the key feature information corresponding to each feature map includes both shallow semantic features and deep semantic features of the target object in the image frame, the shallow semantic features can be used to detect the target detection frame of the target object. At the same time, the deep semantic features can be used to detect the category of the target object, thereby improving the efficiency and accuracy of target object detection.

[0082] S203. Based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map.

[0083] Exemplarily, after obtaining the key feature information corresponding to each feature map, the server can process the key feature information corresponding to each feature map based on the attention mechanism module corresponding to each feature map in the preset target detection model to obtain the processed key feature information corresponding to each feature map.

[0084] Among them, the attention mechanism module can, for example, learn the weight parameters of each channel in the feature map, and fuse the weight parameters of each channel with the feature map, so that the processed key feature information corresponding to the feature map can better reflect the important features and suppress the unimportant features.

[0085] In one example, for example, you can combine Figure 1 To understand, such as Figure 1 As shown, assuming that after the server 11 obtains the key feature information corresponding to the 160×160 feature map, 80×80 feature map, 40×40 feature map and 20×20 feature map from the feature processing module 1112, it can process the key feature information corresponding to each feature map based on the attention mechanism sub-module corresponding to each feature map in the preset target detection model 111D attention mechanism module 1113 to obtain the processed key feature information corresponding to each feature map.

[0086] For example, after the server 11 obtains the key feature information corresponding to the 160×160 feature map from the feature processing module 1112, it can process the key feature information corresponding to the 160×160 feature map based on the attention mechanism sub-module corresponding to the 160×160 feature map in the attention mechanism module 1113 of the preset target detection model 111 to obtain the processed key feature information corresponding to the 160×160 feature map.

[0087] Among them, the implementation method of the attention mechanism sub-module corresponding to the 160×160 feature map, for example, can be: the server 11 can perform the first fully connected layer, the first activation function layer, the second fully connected layer, and the second activation function layer processing on the 160×160 feature map obtained from the feature processing module 1112 in sequence to obtain the weight parameters of each channel corresponding to the 160×160 feature map; the weight parameters of each channel represent the importance of the features corresponding to each channel.

[0088] Afterwards, the server 11 multiplies the 160×160 feature map obtained from the feature processing module 1112 by the weight parameter of each channel to obtain an output feature map, and uses the key feature information in the output feature map as the processed key feature information. For example, if the weight parameter of the mobile phone-related semantic feature determined based on the attention mechanism module is large, and the mobile phone-related semantic feature is more important, then the processed key feature information corresponding to the feature map can better reflect the mobile phone-related features and suppress unimportant features, so that it is easier to judge through the feature map that the corresponding image frame contains a mobile phone during subsequent detection.

[0089] It can be understood that the implementation methods of the attention mechanism sub-modules corresponding to the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map are similar to the implementation methods of the attention mechanism sub-modules corresponding to the 160×160 feature map introduced above, and will not be repeated here.

[0090] By multiplying the weight parameters determined by the attention mechanism module with the feature map, the processed key feature information corresponding to each feature map can better reflect important features and suppress unimportant features according to the weight parameters. Therefore, the category of the target object detected by the important features and its corresponding target detection box can improve the accuracy of target object detection.

[0091] S204. Based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object.

[0092] Exemplarily, after obtaining the processed key feature information corresponding to each feature map, the server can perform detection processing on the processed key feature information corresponding to each feature map based on the detection module corresponding to each feature map in the preset target detection model, and obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object, and a feature map can detect the category of one or more target objects and their corresponding target detection frames.

[0093] In one example, for example, you can combine Figure 1 To understand, such as Figure 1As shown, assuming that the server 11 obtains the processed key feature information corresponding to the 160×160 feature map, the 80×80 feature map, the 40×40 feature map and the 20×20 feature map from the attention mechanism module 1113, it can perform detection processing on the processed key feature information corresponding to each feature map based on the detection submodule corresponding to each feature map in the detection module 1114 of the preset target detection model 111 to obtain the category of the target object in the image frame and the target detection frame of the target object.

[0094] For example, after the server 11 obtains the processed key feature information corresponding to the 160×160 feature map from the attention mechanism module 1113, it can detect and process the processed key feature information corresponding to the 160×160 feature map based on the detection submodule corresponding to the 160×160 feature map in the detection module 1114 of the preset target detection model 111. Assuming that the processed key feature information corresponding to the 160×160 feature map reflects semantic features related to mobile phones, the corresponding image frame will display the target detection box of the mobile phone according to the shallow semantic features, and display its corresponding category as mobile phone according to the deep semantic features.

[0095] For another example, after the server 11 obtains the processed key feature information corresponding to the 40×40 feature map from the attention mechanism module 1113, it can detect and process the processed key feature information corresponding to the 40×40 feature map based on the detection submodule corresponding to the 40×40 feature map in the detection module 1114 of the preset target detection model 111. Assuming that the processed key feature information corresponding to the 40×40 feature map contains semantic features related to the staff and semantic features related to the user, the target detection frame of the staff member's mobile phone is displayed in the corresponding image frame according to the shallow semantic features, and its category is displayed as staff according to the deep semantic features; at the same time, the target detection frame of the user is displayed according to the shallow semantic features, and its category is displayed as user according to the deep semantic features.

[0096] It can be understood that the implementation methods of the detection submodules corresponding to the 80×80 feature map and the 20×20 feature map are similar to the implementation methods of the detection submodules introduced above, and will not be repeated here.

[0097] S205 . Generate prompt information according to the category of the target object in the image frame and the target detection frame of the target object; wherein the prompt information represents the behavior of the target object.

[0098] Exemplarily, after obtaining the category of the target object in the image frame and its corresponding target detection frame, the server can generate prompt information based on the category of the target object contained in the image frame and the relative relationship between the target objects, wherein the prompt information represents the behavior of the target object, and can also be understood as a prompt to warn staff of abnormal behavior or a prompt for users who need help.

[0099] Specifically, if in an image frame, the server only detects that the category of one target object is a staff member and the category of the other target object is a mobile phone, and determines that the target detection frame under the staff member intersects with the target detection frame under the mobile phone, then a prompt message of an abnormal behavior alarm for the staff member is generated.

[0100] If the server detects only one target object of the user category in an image frame, it generates prompt information for the user who needs help.

[0101] Among them, whether the target detection boxes intersect can be determined by the following process:

[0102] If the intersection over union (IoU) of the target detection frames of the two target objects is greater than a preset threshold, it is determined that the target detection frames of the two target objects intersect;

[0103] If the intersection over union (IoU) of the target detection frames of the two target objects is less than or equal to a preset threshold, it is determined that the target detection frames of the two target objects do not intersect;

[0104] Among them, the intersection over union (IoU) represents the intersection area of ​​the target detection boxes of two target objects divided by the union area.

[0105] In one example, for example, you can combine Figure 1 To understand, such as Figure 1 As shown, assuming that the generation module 112 of the server 11 obtains from the detection module 1114 that the target objects detected in a certain image frame only include a target object of the category of staff and a target object of the category of mobile phone, and the intersection over union (IoU) of the target detection frame under the staff and the target detection frame under the mobile phone is greater than the preset threshold, that is, it can be understood that the target detection frame under the staff intersects with the target detection frame under the mobile phone, then a prompt message for abnormal behavior alarm of the staff is generated.

[0106] In another example, assuming that the generating module 112 of the server 11 obtains from the detecting module 1114 that the target objects detected in a certain image frame only include a target object of the user category, prompt information of a user requiring help is generated for the user.

[0107] The behavior detection method of the target object provided in the embodiment of the present application automatically inputs the collected image frames of the video to be detected into the preset target detection model for feature map extraction, and obtains multiple multi-scale feature maps of the image frames in the video to be detected; then, based on the preset target detection model, each feature map of the image frame is processed to obtain the key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame. Then, based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map. Then, based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object. Finally, according to the relative relationship between the category of the target object in the image frame and the target detection frame of the target object, prompt information is generated; wherein the prompt information represents the behavior of the target object.

[0108] Since the method provided in the embodiment of the present application can automatically detect the target object category and the target detection frame in the image frame of the video to be detected, labor costs can be saved.

[0109] Since the preset target detection model provided in the embodiment of the present application can provide a multi-scale feature map for each image frame, and each scale of the feature map includes both shallow semantic features and deep semantic features, it is possible to accurately detect both smaller target objects, such as mobile phones, and larger target objects, such as staff or users.

[0110] In addition, the preset target detection model includes an attention mechanism module, and the weight parameters determined by the attention mechanism module can be multiplied by the feature map. In the processed key feature information corresponding to each feature map, the important features can be better reflected according to the weight parameters, and the unimportant features can be suppressed. Therefore, the category of the target object subsequently detected by the important features and its corresponding target detection box can improve the accuracy of the target object detection.

[0111] Therefore, the method provided in the embodiment of the present application can improve the efficiency and accuracy of target object detection.

[0112] The method provided in the embodiment of the present application can automatically generate abnormal behavior alarm prompts for staff or prompts for users who need help based on the category of the detected target object and the relative relationship between each target detection frame, thereby improving the user experience.

[0113] Based on the above embodiments, Figures 3 to 8Another target object behavior detection method provided in the present application is further introduced in detail.

[0114] Figure 3 A flowchart of another target object behavior detection method provided in an embodiment of the present application, such as Figure 3 As shown, the method includes:

[0115] S301. Input the image frames of the video to be trained into the initial model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be trained; wherein the video to be trained includes multiple image frames; and the feature map dimensions of the multiple feature maps are different.

[0116] Exemplarily, the execution subject of this embodiment can be a server, or a terminal device, or an electronic device, or a behavior detection device or device for a target object, or other devices or equipment that can implement the solution of this application, without limitation. Among them, the server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server can also be a server of a distributed system, or a server combined with a blockchain.

[0117] This embodiment is introduced with the execution subject being a server.

[0118] For example, in this embodiment, the server can use a preset target detection model to detect the target object. However, since the initial model has not learned the detection of the target object from similar videos in which the target object detection is performed in this embodiment, its ability to detect the target object based on such videos may be insufficient. Therefore, it is necessary to input the image frames of the video to be trained into the initial model for training processing, so that the initial model can quickly and accurately optimize the parameters according to the image frames of the video to be trained, thereby constructing a preset target detection model with good performance.

[0119] In one example, for example, you can combine Figure 4 To understand, Figure 4 A schematic diagram of a model training scenario for a target object behavior detection method provided in an embodiment of the present application, such as Figure 4 As shown, the server 41 extracts frames from the training video 40 based on the frame extraction module 410 to obtain multiple image frames. The frame extraction module 410 can extract an image frame every N4 seconds (N4 is a natural number greater than 1, which can be determined based on experience and is not limited in this embodiment). The training video can be understood as a historical surveillance video of a bank, for example.

[0120] Afterwards, the server annotates the correct target object of the mobile phone category and its corresponding target detection frame, the correct target object of the staff category and its corresponding target detection frame, the correct target object of the user category and its corresponding target detection frame for the image frame input by the frame extraction module 410 based on the annotation module 411. Among them, the staff category and the user category need to be divided into different people and annotated separately. For example, the category of staff G1 is different from the category of staff G2, so that when the prompt information is generated later, it can be obtained which specific person the prompt is for.

[0121] The server annotates the target objects of the mobile phone, staff, and user categories and their corresponding target detection frames in the image frames in the training video. The purpose is to update the initial model in the subsequent training process based on the differences between the target object categories and target detection frames predicted by the initial model and the correct target object categories and target detection frames.

[0122] After the server has annotated the target objects of the mobile phone, staff, and user categories and their corresponding target detection frames in the image frames in the training video, each image frame of the training video can be input into the feature extraction module 4121 in the initial model 412 in chronological order to extract feature maps, and obtain multiple feature maps of the image frames in the training video; wherein the training video includes multiple image frames; and the feature map dimensions of the multiple feature maps are different.

[0123] The feature extraction module 4121 may be composed of a series of convolution layers, batch normalization, activation function layers, maximum pooling layers, and upsampling layers, and can extract feature maps of different scales from the input image frame for subsequent target object detection, and each scale of the feature map takes into account both deep semantic features and shallow semantic features. For example, a 160×160 feature map, an 80×80 feature map, a 40×40 feature map, and a 20×20 feature map can be obtained.

[0124] Since the receptive field of shallow features in the 160×160 feature map is small and contains more detailed features, it is suitable for detecting small target objects in the future, such as detecting mobile phones. The receptive field of shallow features in the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map are large and contain more overall features, so they are suitable for detecting large target objects in the future, such as detecting staff or users. Therefore, feature maps of different scales can be used to detect both small and large target objects in the future, thereby improving the efficiency and accuracy of target object detection.

[0125] S302. Based on the initial model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame.

[0126] Exemplarily, after obtaining multiple feature maps of image frames in the video to be trained, the server can process each feature map of the image frame based on the initial model to obtain key feature information corresponding to each feature map.

[0127] The key feature information includes the semantic features of the target object in the image frame, and the semantic features may include shallow semantic features and deep semantic features.

[0128] Specifically, shallow semantic features can be understood as semantic features obtained through fewer levels of processing in a preset target detection model, such as the contour, edge, color, texture, shape and other detailed features of the target object. Therefore, shallow semantic features can be used to detect the target detection frame of the target object in the future.

[0129] For example, deep semantic features can be understood as semantic features obtained through multiple levels of processing in a preset target detection model, such as abstract features that the target object is a mobile phone, a staff member, or a user. Therefore, deep semantic features can be used to detect the category of the target object in the future.

[0130] In one example, for example, you can combine Figure 4 To understand, such as Figure 4 As shown, it is assumed that the server 41 obtains a 160×160 feature map, an 80×80 feature map, a 40×40 feature map, and a 20×20 feature map of a certain image frame from the output of the feature extraction module 4121. Afterwards, the server 41 processes the 160×160 feature map, the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map based on the feature processing module 4122 in the initial model 412 to obtain key feature information corresponding to each feature map.

[0131] For example, the server 41 processes the 160×160 feature map based on the feature processing module 4122 in the initial model 412, and obtains that the key feature information corresponding to the 160×160 feature map is the outline, shape, and color features of the mobile phone, and the semantic feature that the target object is a mobile phone.

[0132] For another example, the server 41 processes the 40×40 feature map based on the feature processing module 4122 in the initial model 412, and obtains that the key feature information corresponding to the 40×40 feature map is the outline, shape, and color features of the staff member, and the semantic features that the target object is the staff member.

[0133] Among them, the processing of the feature map by the feature processing module 4122 in the initial model 412 can be achieved through multi-layer convolution, for example.

[0134] It can be understood that the implementation method of the server 41 processing the 80×80 feature map based on the feature processing module 4122 in the initial model 412, and the implementation method of processing the 20×20 feature map are similar to the implementation methods introduced above and will not be repeated here.

[0135] Since the key feature information corresponding to each feature map includes both shallow semantic features and deep semantic features of the target object in the image frame, the shallow semantic features can be used to detect the target detection frame of the target object. At the same time, the deep semantic features can be used to detect the category of the target object, thereby improving the efficiency and accuracy of target object detection.

[0136] S303. Based on the attention mechanism module corresponding to each feature map in the initial model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map.

[0137] Exemplarily, after obtaining the key feature information corresponding to each feature map, the server can process the key feature information corresponding to each feature map based on the attention mechanism module corresponding to each feature map in the initial model to obtain the processed key feature information corresponding to each feature map.

[0138] Among them, the attention mechanism module can, for example, learn the weight parameters of each channel in the feature map, and fuse the weight parameters of each channel with the feature map, so that the processed key feature information corresponding to the feature map can better reflect the important features and suppress the unimportant features.

[0139] In one example, for example, you can combine Figure 4 To understand, such as Figure 4 As shown, assuming that after the server 41 obtains the key feature information corresponding to the 160×160 feature map, 80×80 feature map, 40×40 feature map and 20×20 feature map from the feature processing module 4122, it can process the key feature information corresponding to each feature map based on the attention mechanism sub-module corresponding to each feature map in the attention mechanism module 4123 of the initial model 412 to obtain the processed key feature information corresponding to each feature map.

[0140] For example, after the server 41 obtains the key feature information corresponding to the 160×160 feature map from the feature processing module 4122, it can process the key feature information corresponding to the 160×160 feature map based on the attention mechanism sub-module corresponding to the 160×160 feature map in the attention mechanism module 4123 of the initial model 412 to obtain the processed key feature information corresponding to the 160×160 feature map.

[0141] Among them, the implementation method of the attention mechanism sub-module corresponding to the 160×160 feature map can be, for example: the server 41 can perform the first fully connected layer, the first activation function layer, the second fully connected layer, and the second activation function layer processing on the 160×160 feature map obtained from the feature processing module 4122 in sequence to obtain the weight parameters of each channel corresponding to the 160×160 feature map; wherein the weight parameters of each channel represent the importance of the features corresponding to each channel.

[0142] Afterwards, the server 41 multiplies the 160×160 feature map obtained from the feature processing module 4122 by the weight parameter of each channel to obtain an output feature map, and uses the key feature information in the output feature map as the processed key feature information. For example, if the weight parameter of the mobile phone-related semantic feature determined by the attention mechanism submodule corresponding to the 160×160 feature map is large, indicating that the mobile phone-related semantic feature is more important, then the processed key feature information corresponding to the 160×160 feature map can better reflect the mobile phone-related features and suppress unimportant features, so that it is easier to judge that the corresponding image frame contains a mobile phone through the 160×160 feature map during subsequent detection.

[0143] It can be understood that the implementation methods of the attention mechanism sub-modules corresponding to the 80×80 feature map, the 40×40 feature map, and the 20×20 feature map are similar to the implementation methods of the attention mechanism sub-modules corresponding to the 160×160 feature map introduced above, and will not be repeated here.

[0144] By multiplying the weight parameters determined by the attention mechanism module with the feature map, the processed key feature information corresponding to each feature map can better reflect important features and suppress unimportant features according to the weight parameters. Therefore, the category of the target object detected by the important features and its corresponding target detection box can improve the accuracy of target object detection.

[0145] S304. Based on the detection module corresponding to each feature map in the initial model, the processed key feature information corresponding to each feature map is detected to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object.

[0146] Exemplarily, after obtaining the processed key feature information corresponding to each feature map, the server can perform detection processing on the processed key feature information corresponding to each feature map based on the detection module corresponding to each feature map in the initial model, and obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object, and a feature map can detect the category of one or more target objects and their corresponding target detection frames.

[0147] In one example, for example, you can combine Figure 4 To understand, such as Figure 4 As shown, assuming that after the server 41 obtains the processed key feature information corresponding to the 160×160 feature map, the 80×80 feature map, the 40×40 feature map and the 20×20 feature map from the attention mechanism module 4123, it can perform detection processing on the processed key feature information corresponding to each feature map based on the detection submodule corresponding to each feature map in the detection module 4124 of the initial model 412 to obtain the category of the target object in the image frame and the target detection frame of the target object.

[0148] For example, after the server 41 obtains the processed key feature information corresponding to the 160×160 feature map from the attention mechanism module 4123, it can detect and process the processed key feature information corresponding to the 160×160 feature map based on the detection submodule corresponding to the 160×160 feature map in the detection module 4124 of the initial model 412. Assuming that the processed key feature information corresponding to the 160×160 feature map reflects semantic features related to mobile phones, the corresponding image frame will display the target detection box of the mobile phone according to the shallow semantic features, and display its corresponding category as mobile phone according to the deep semantic features.

[0149] For another example, after the server 41 obtains the processed key feature information corresponding to the 40×40 feature map from the attention mechanism module 4123, it can detect and process the processed key feature information corresponding to the 40×40 feature map based on the detection submodule corresponding to the 40×40 feature map in the detection module 4124 of the initial model 412. Assuming that the processed key feature information corresponding to the 40×40 feature map contains semantic features related to the staff and semantic features related to the user, the target detection frame of the staff member's mobile phone is displayed in the corresponding image frame according to the shallow semantic features, and its category is displayed as staff according to the deep semantic features; at the same time, the target detection frame of the user is displayed according to the shallow semantic features, and its category is displayed as user according to the deep semantic features.

[0150] It can be understood that the implementation methods of the detection submodules corresponding to the 80×80 feature map and the 20×20 feature map are similar to the implementation methods of the detection submodules introduced above, and will not be repeated here.

[0151] S305: Update the initial model according to the category of the target object in the image frame and the target detection frame of the target object to obtain a preset target detection model.

[0152] Exemplarily, the server repeatedly executes steps S301-S304 N times, which can also be understood as performing N training processes (N is a natural number greater than 0, which can be determined based on experience, and this embodiment does not impose a limit on this). In each training process, the server executes steps S301-S304 to obtain the category of the target object predicted by the initial model and the target detection frame of the target object in each image frame in the video to be trained. Then, according to the difference between the target object category and the target detection frame predicted by the initial model in each image frame in the video to be trained and the correct target object category and target detection frame corresponding to the image frame, the server continuously learns during the training process and adjusts and optimizes parameters. For example, it can also be understood as updating the initial model so that the target object category and the target detection frame predicted by the initial model in each image frame in the video to be trained gradually approach the correct target object category and the target detection frame corresponding to the image frame.

[0153] After completing N trainings (N is a natural number greater than 0, which can be determined based on experience and is not limited in this embodiment), the server uses the updated initial model as the preset target detection model.

[0154] Since the video to be trained does not change frequently, for example, the process of step S301-step S305 can be executed every n1 months to update the preset target detection model (n1 is a natural number ≥1, and the specific implementation can be determined based on actual needs and experience, and this embodiment does not impose any restrictions on this).

[0155] Since the preset target detection model is an initial model that has been trained and parameter optimized, the target object detected by the preset target detection model is closer to the real result. Therefore, the subsequent use of the preset target detection model for target detection can improve the efficiency and accuracy of detection.

[0156] S306: The collected image frames of the video to be detected are input into the information extraction module and the processing module in the feature information extraction module in the preset target detection model for processing in sequence to obtain the image feature information of the image frames in the video to be detected.

[0157] For example, after obtaining the latest preset target detection model, the server can input each image frame of the video to be detected collected into the information extraction module and the processing module in the feature information extraction module in the latest preset target detection model in order from front to back in time, and obtain the image feature information of the image frame in the video to be detected. When extracting image frames from the collected video to be detected, for example, one image frame can be extracted every N5 seconds (N5 is a natural number greater than 1, which can be determined based on experience, and this embodiment does not limit this).

[0158] In one example, for example, you can combine Figure 5 To understand, Figure 5 A schematic diagram of the network structure of a preset target detection model provided in an embodiment of the present application, such as Figure 5 As shown, the network structure diagram includes: a feature information extraction module 51, a feature map extraction module 52, and a detection module 53.

[0159] Among them, the feature information extraction module 51 includes a first information extraction module 5101, a first information extraction module 5102, a processing module 5103, a second information extraction module 5104, a processing module 5105, a second information extraction module 5106, a processing module 5107, a second information extraction module 5108, and a processing module 5109.

[0160] The feature map extraction module 52 includes a first information extraction module 5201, a feature information fusion module 5202, a first information extraction module 5203, an upsampling module 5204, a processing submodule 5205, a first information extraction module 5206, an upsampling module 5207, a processing submodule 5208, a first information extraction module 5209, an upsampling module 5210, a depth residual module 5212, an attention mechanism module 5213, a first information extraction module 5211, a first information extraction module 5214, a first information extraction module 5215, a depth residual module 5216, an attention mechanism module 5217, a first information extraction module 5218, a first information extraction module 5219, a depth residual module 5220, an attention mechanism module 5221, a first information extraction module 5222, a first information extraction module 5223, a depth residual module 5224, and an attention mechanism module 5225.

[0161] The detection module 53 includes a detection submodule 531 , a detection submodule 532 , a detection submodule 533 , and a detection submodule 534 .

[0162] It should be noted that in Figure 5 In the above modules, the Chinese names are the same. Figure 5The modules with different graph sizes in the figure represent that the network structures of these modules are the same, but the preset parameters are different, such as different convolution kernel sliding window steps or different numbers of convolution kernels. Among them, the preset parameters represent the optimized model parameters in the preset target detection model after the training process of the initial model.

[0163] In one example, the server obtains Figure 5 As shown, after the latest preset target detection model, each image frame of the video to be detected can be input into the information extraction module and the processing module in the feature information extraction module 51 in the latest preset target detection model in chronological order from front to back, and processed in sequence to obtain the image feature information of the image frame in the video to be detected.

[0164] The information extraction module includes Figure 5 The first information extraction module 5101, the first information extraction module 5102, the second information extraction module 5104, the second information extraction module 5106, and the second information extraction module 5108 in FIG. The first information extraction module may, for example, sequentially perform convolutional layer, batch normalization layer, and activation function layer processing. The second information extraction module may, for example, perform maximum pooling layer processing.

[0165] The processing module may include, for example, multiple convolutional layers.

[0166] For example, you can combine Figure 5 It is understood that each image frame of the video to be detected is input into the information extraction module and the processing module in the feature information extraction module 51 in the latest preset target detection model for processing in sequence to obtain the image feature information of the image frame in the video to be detected.

[0167] like Figure 5 As shown, the server inputs each image frame of the video to be detected collected into the first information extraction module 5101, and the first information extraction module 5102 and the processing module 5103 process it to obtain the first semantic feature, which can also be understood as the first feature map of the feature information extraction module; wherein the first semantic feature represents the meaning of the image frame, such as the contour, edge, color, texture, shape and other detailed features of the target object contained in the image frame, or the abstract feature that the target object is a mobile phone, a staff member, or a user. The first feature map of the feature information extraction module represents at least one two-dimensional array containing the features extracted from the image frame.

[0168] Afterwards, the server sequentially inputs the first semantic feature into the second information extraction module 5104 and the processing module 5105 for processing to obtain the second semantic feature, which can also be understood as the second feature map of the feature information extraction module; wherein the second semantic feature represents the meaning of the image frame, such as the contour, edge, color, texture, shape and other detailed features of the target object contained in the image frame, or the abstract feature that the target object is a mobile phone, a staff member, or a user. The second feature map of the feature information extraction module represents at least one two-dimensional array containing the features extracted from the image frame.

[0169] Then, the server sequentially inputs the second semantic feature into the second information extraction module 5106 and the processing module 5107 for processing to obtain a third semantic feature, which can also be understood as a third feature map of the feature information extraction module; wherein the third semantic feature represents the meaning of the image frame, such as the contour, edge, color, texture, shape and other detailed features of the target object contained in the image frame, or the abstract feature that the target object is a mobile phone, a staff member, or a user. The third feature map of the feature information extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0170] Afterwards, the server inputs the third semantic feature into the second information extraction module 5108 and the processing module 5109 in sequence for processing to obtain the fourth semantic feature, which can also be understood as the fourth feature map of the feature information extraction module. Among them, the fourth semantic feature represents the meaning of the image frame, such as the contour, edge, color, texture, shape and other detailed features of the target object contained in the image frame, or the abstract feature that the target object is a mobile phone, a staff member, or a user. The fourth feature map of the feature information extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0171] Among them, the first semantic feature, the second semantic feature, the third semantic feature, and the fourth semantic feature can also be understood as the first feature map of the feature information extraction module, the second feature map of the feature information extraction module, the third feature map of the feature information extraction module, and the fourth feature map of the feature information extraction module, which can all be used as image feature information of the image frame in the video to be detected.

[0172] S307. Based on the feature map extraction module in the preset target detection model, feature maps are extracted from the image feature information of the image frame to obtain multiple feature maps of the image frame in the video to be detected.

[0173] In one example, step S307 includes the following steps:

[0174] The first step of step S307: based on the first convolution layer of the processing submodule in the feature map extraction module, convolution processing is performed on the image feature information of the image frame to obtain the first convolution feature of the image feature information; wherein the first convolution layer of the processing submodule is a 1×1 convolution layer; the first convolution feature of the image feature information represents the image information in the image feature information.

[0175] The second step of step S307: based on the second convolution layer of the processing submodule in the feature map extraction module and the third convolution layer of the processing submodule, convolution processing is performed on the image feature information of the image frame to obtain the second convolution feature of the image feature information; wherein, the second convolution layer of the processing submodule is a 3×3 convolution layer, the third convolution layer of the processing submodule is a 3×3 convolution layer, and the second convolution feature of the image feature information represents the image information in the image feature information.

[0176] The third step of step S307: based on the second convolution layer of the processing submodule in the feature map extraction module, the third convolution layer of the processing submodule, and the fourth convolution layer of the processing submodule, convolution processing is performed on the image feature information of the image frame to obtain the third convolution feature of the image feature information; wherein the fourth convolution layer of the processing submodule is a 3×3 convolution layer, and the third convolution feature of the image feature information represents the image information in the image feature information.

[0177] The fourth step of step S307: based on the processing submodule in the feature map extraction module, the first convolution feature of the image feature information, the second convolution feature of the image feature information, and the third convolution feature of the image feature information are spliced ​​and convolved to obtain the spliced ​​feature of the image feature information.

[0178] The fifth step of step S307: based on the fifth convolution layer of the processing submodule in the feature map extraction module, convolution processing is performed on the image feature information of the image frame to obtain the fourth convolution feature of the image feature information; wherein the fourth convolution layer of the processing submodule is a 1×1 convolution layer, and the fourth convolution feature of the image feature information represents the image information in the image feature information.

[0179] The sixth step of step S307: based on the processing submodule in the feature map extraction module, perform feature fusion processing on the fourth convolution feature of the image feature information and the splicing feature of the image feature information to obtain the fusion feature of the image feature information.

[0180] The seventh step of step S307: based on the processing submodule in the feature map extraction module, feature map extraction is performed on the fusion features of the image feature information to obtain multiple feature maps of the image frames in the video to be detected.

[0181] Exemplarily, the image feature information of the image frame in the video to be detected obtained by the server based on the feature information extraction module, that is, the first semantic feature, the second semantic feature, the third semantic feature, and the fourth semantic feature, are obtained through fewer layers of processing in the preset target detection model, and the shallow receptive field is small. Therefore, it contains more shallow semantic features, which can also be understood as detail features, but contains fewer deep semantic features, that is, abstract features. However, it is necessary to rely on deep semantic features when detecting the category of the target object.

[0182] Therefore, after the server obtains the image feature information of the image frame in the video to be detected based on the feature information extraction module, it can perform feature map extraction on the image feature information of the image frame based on the feature map extraction module in the preset target detection model to obtain multiple feature maps of the image frame in the video to be detected.

[0183] In one example, for example, you can combine Figure 5 Understand. Figure 5 As shown, the server inputs the third semantic feature output by the processing module 5107 in the feature information extraction module 51 to the first information extraction module 5201 in the feature map extraction module 52 for processing to obtain the first feature map of the feature map extraction module. The first feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0184] The server sequentially inputs the fourth semantic feature output by the processing module 5109 in the feature information extraction module 51 to the feature information fusion module 5202, the first information extraction module 5203 in the feature map extraction module 52, and the upsampling module 5204 to obtain the second feature map of the feature map extraction module. The second feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0185] Among them, the feature information fusion module 5202 is used to improve the adaptability of the model to the input of feature maps of different scales. For example, the first part can be an SPP (Spatial Pyramid Pooling) layer, which can also be understood as a spatial pyramid pooling layer, which can be used to extract features of multiple sizes. The second part can be a CSPC (Cross-Stage Partial Connections) layer, which can also be understood as a cross-stage partial connection layer, which connects feature maps from different depths to increase the model's detection ability for target objects of different sizes.

[0186] The up-sampling module 5204 may be implemented, for example, by an image interpolation algorithm.

[0187] The server concatenates the first feature map of the feature map extraction module and the second feature map of the feature map extraction module to obtain a third feature map of the feature map extraction module, wherein the third feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0188] The server sequentially inputs the third feature map of the feature map extraction module into the processing submodule 5205 in the feature map extraction module 52, the first information extraction module 5206 in the feature map extraction module 52, the upsampling module 5207, the processing submodule 5208 in the feature map extraction module 52, the first information extraction module 5209 in the feature map extraction module 52, and the upsampling module 5210 for processing to obtain the fourth feature map of the feature map extraction module. The fourth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0189] The server inputs the first semantic feature output by the processing module 5103 in the feature information extraction module 51 to the first information extraction module 5211 in the feature map extraction module 52 to obtain the fifth feature map of the feature map extraction module. The fifth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0190] Since the fourth feature map of the feature map extraction module is obtained by the server after deep processing in the preset target detection model, it has a larger receptive field and contains more abstract semantic features. Therefore, it is suitable for subsequent detection of the category of the target object.

[0191] Since the fifth feature map of the feature map extraction module is obtained by the server in the preset target detection model after shallow processing, its receptive field is relatively small and contains more detailed semantic features. Therefore, it is suitable for subsequent use to detect the target detection frame of smaller target objects, such as detecting the target detection frame of a mobile phone.

[0192] The server concatenates the fourth feature map of the feature map extraction module and the fifth feature map of the feature map extraction module to obtain the sixth feature map of the feature map extraction module, which can take into account both the abstract semantic features of the smaller target object and the detailed semantic features, thereby more accurately detecting the category and target detection frame of the smaller target object. For example, the sixth feature map can be a 160×160 feature map, which can be used to detect the category and target detection frame of the mobile phone later.

[0193] At the same time, if Figure 5As shown, it is assumed that the processing submodule 5208 in the feature map extraction module 52 outputs the seventh feature map of the feature map extraction module, wherein the seventh feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame. The server can also input the seventh feature map of the feature map extraction module into the first information extraction module 5214 to obtain the eighth feature map of the feature map extraction module. The eighth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0194] Since the eighth feature map of the feature map extraction module is less processed by the upsampling module 5210 than the fourth feature map of the feature map extraction module, the eighth feature map of the feature map extraction module is a feature map with a smaller size than the fourth feature map of the feature map extraction module. For example, if the fourth feature map of the feature map extraction module is a 160×160 feature map, the eighth feature map of the feature map extraction module may be an 80×80 feature map.

[0195] The server inputs the second semantic feature output by the processing module 5105 in the feature information extraction module 51 to the first information extraction module 5215 in the feature map extraction module 52 to obtain the ninth feature map of the feature map extraction module. The ninth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0196] Since the eighth feature map of the feature map extraction module is obtained by the server after deep processing in the preset target detection model, it has a larger receptive field and contains more abstract semantic features. Therefore, it is suitable for subsequent detection of the category of the target object.

[0197] Since the ninth feature map of the feature map extraction module is obtained by the server in the preset target detection model after shallow processing, the receptive field of the ninth feature map of the feature map extraction module is relatively small and contains more detailed semantic features, but the processing of the ninth feature map of the feature map extraction module is deeper than the processing of the fifth feature map of the feature map extraction module. Therefore, the receptive field of the ninth feature map of the feature map extraction module is larger than the receptive field of the fifth feature map. Therefore, it is suitable for subsequent use to detect the target detection frame of medium to small target objects, such as detecting the target detection frame of medium to small staff or users in the image frame. Among them, the medium to small target object can be, for example, the target object in the image frame accounts for less than n2%, where n2 is a number greater than 0, which can be determined based on experience, and this embodiment does not limit this.

[0198] The server splices the eighth feature map of the feature map extraction module and the ninth feature map of the feature map extraction module to obtain the tenth feature map of the feature map extraction module. Among them, the tenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame. It is possible to take into account both the abstract semantic features of medium to small target objects and the semantic features of details, so as to more accurately detect the category and target detection frame of medium to small target objects. For example, the tenth feature map of the feature map extraction module can be an 80×80 feature map, which can be used later to detect the category and target detection frame of medium to small staff or users.

[0199] At the same time, if Figure 5 As shown, the server can also input the tenth feature map of the feature map extraction module into the depth residual module 5216 to obtain the eleventh feature map of the feature map extraction module, which can also be understood as the key feature information corresponding to the eleventh feature map of the feature map extraction module. The eleventh feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0200] The server inputs the eleventh feature map of the feature map extraction module into the first information extraction module 5218 in the feature map extraction module 52 to obtain the twelfth feature map of the feature map extraction module. The twelfth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0201] Assuming that the output of the processing submodule 5205 of the server in the feature map extraction module 52 is the thirteenth feature map of the feature map extraction module, the thirteenth feature map of the feature map extraction module is input into the first information extraction module 5219 in the feature map extraction module 52 to obtain the fourteenth feature map of the feature map extraction module. The thirteenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame, and the fourteenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0202] Since the twelfth feature map of the feature map extraction module is obtained by deep processing in the preset target detection model by the server, the receptive field is relatively large and contains more abstract semantic features, but the level of processing the twelfth feature map of the feature map extraction module is deeper than the level of processing the eighth feature map of the feature map extraction module, therefore, the receptive field of the twelfth feature map of the feature map extraction module is larger than the receptive field of the eighth feature map of the feature map extraction module, and therefore, it is suitable for subsequent detection of the category of medium to large target objects. Among them, the medium to large target object can be, for example, the proportion of the target object in the image frame is greater than or equal to n3% and less than n4, where n3 and n4 are numbers greater than 0, and n3 is less than or equal to n4, which can be determined based on experience, and this embodiment does not impose any restrictions on this.

[0203] Since the fourteenth feature map of the feature map extraction module is obtained after shallow processing by the server in the preset target detection model, the receptive field of the fourteenth feature map of the feature map extraction module is relatively small and contains more detailed semantic features, but the level of processing the fourteenth feature map of the feature map extraction module is deeper than that of processing the ninth feature map of the feature map extraction module. Therefore, the receptive field of the fourteenth feature map of the feature map extraction module is larger than the receptive field of the ninth feature map of the feature map extraction module. Therefore, it is suitable for subsequent use in detecting target detection frames of medium to large target objects, such as detecting target detection frames of medium to large staff or users in image frames.

[0204] The server splices the twelfth feature map of the feature map extraction module and the fourteenth feature map of the feature map extraction module to obtain the fifteenth feature map of the feature map extraction module. Among them, the fifteenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame. It can take into account both the abstract semantic features of medium to large target objects and the semantic features of details, so as to more accurately detect the category and target detection frame of medium to large target objects. For example, the fifteenth feature map of the feature map extraction module can be a 40×40 feature map, which can be used later to detect the category and target detection frame of medium to large staff or users.

[0205] At the same time, if Figure 5 As shown, the server can also input the fifteenth feature map of the feature map extraction module into the depth residual module 5220 to obtain the sixteenth feature map of the feature map extraction module, which can also be understood as the key feature information corresponding to the sixteenth feature map of the feature map extraction module. Among them, the sixteenth feature map of the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame.

[0206] The server inputs the sixteenth feature map of the feature map extraction module into the first information extraction module 5222 in the feature map extraction module 52 to obtain the seventeenth feature map of the feature map extraction module. The seventeenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0207] Assuming that the output of the feature information fusion module 4202 in the feature map extraction module 52 of the server is the eighteenth feature map of the feature map extraction module, the eighteenth feature map of the feature map extraction module is input into the first information extraction module 5223 in the feature map extraction module 52 to obtain the nineteenth feature map of the feature map extraction module. The eighteenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame, and the nineteenth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0208] Since the seventeenth feature map of the feature map extraction module is obtained by the server in the preset target detection model after deep processing, the receptive field is relatively large and contains more abstract semantic features, but the level of processing the seventeenth feature map of the feature map extraction module is deeper than the level of processing the twelfth feature map, so the receptive field of the sixteenth feature map is larger than the receptive field of the twelfth feature map, and therefore, it is suitable for subsequent detection of the category of larger target objects. Among them, the larger target object can be, for example, the proportion of the target object in the image frame is greater than or equal to n5%, and n5 is a number greater than 0, which can be determined based on experience, and this embodiment does not limit this.

[0209] Since the nineteenth feature map of the feature map extraction module is obtained by the server after shallow processing in the preset target detection model, the receptive field of the nineteenth feature map of the feature map extraction module is relatively small and contains more detailed semantic features. Therefore, it is suitable for subsequent use in detecting target detection frames of larger target objects, such as detecting target detection frames of larger staff members or users in image frames.

[0210] The server concatenates the seventeenth feature map of the feature map extraction module and the nineteenth feature map of the feature map extraction module to obtain the twentieth feature map of the feature map extraction module, wherein the twentieth feature map of the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame. This processing can take into account both the abstract semantic features of the larger target object and the detailed semantic features, thereby more accurately detecting the category and target detection frame of the larger target object. For example, the twentieth feature map of the feature map extraction module can be a 20×20 feature map, which can be used later to detect the category and target detection frame of larger staff or users.

[0211] In the process of extracting feature maps from the image feature information of the image frame on the server to obtain multiple feature maps of the image frame in the video to be detected, the processing submodule in the feature map extraction module is mainly responsible for feature extraction. Figure 6 , specifically introduces the processing process of the processing sub-module in the feature map extraction module.

[0212] Figure 6 A schematic diagram of the structure of the processing submodule provided in the embodiment of the present application is shown in FIG. Figure 6 As shown, the server performs convolution processing on the image feature information 601 of the image frame based on the first convolution layer 602 of the processing submodule in the feature map extraction module to obtain the first convolution feature of the image feature information 601.

[0213] Among them, the first convolution layer 602 of the processing submodule in the feature map extraction module is a 1×1 convolution layer. The image feature information 601 of the image frame can be understood as the feature map of the first convolution layer 602 of the processing submodule in the feature map extraction module, for example. The first convolution feature of the image feature information 601 represents the image information in the image feature information 601, for example, it can also be understood as the first feature map of the processing submodule in the feature map extraction module obtained after the image feature information 601 of the image frame is convoluted based on the first convolution layer 602 of the processing submodule in the feature map extraction module. Among them, the first feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame.

[0214] At the same time, the server performs convolution processing on the image feature information 601 of the image frame based on the second convolution layer 603 of the processing submodule in the feature map extraction module and the third convolution layer 604 of the processing submodule to obtain the second convolution feature of the image feature information 601.

[0215] The second convolution layer 603 of the processing submodule in the feature map extraction module is a 3×3 convolution layer, the third convolution layer 604 of the processing submodule in the feature map extraction module is a 3×3 convolution layer, and the second convolution feature of the image feature information 601 represents the image information in the image feature information. For example, it can also be understood that the image feature information 601 of the image frame is convoluted based on the second convolution layer 603 of the processing submodule in the feature map extraction module and the third convolution layer 604 of the processing submodule, to obtain the second feature map of the processing submodule in the feature map extraction module. The second feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame.

[0216] At the same time, the server performs convolution processing on the image feature information 601 of the image frame based on the second convolution layer 603 of the processing submodule in the feature map extraction module, the third convolution layer 604 of the processing submodule in the feature map extraction module, and the fourth convolution layer 605 of the processing submodule in the feature map extraction module to obtain the third convolution feature of the image feature information 601.

[0217] The fourth convolution layer 605 of the processing submodule in the feature map extraction module is a 3×3 convolution layer, and the third convolution feature of the image feature information represents the image information in the image feature information. For example, it can also be understood that the image feature information 601 of the image frame is convoluted based on the second convolution layer 603 of the processing submodule in the feature map extraction module, the third convolution layer 604 of the processing submodule in the feature map extraction module, and the fourth convolution layer 605 of the processing submodule in the feature map extraction module to obtain the third feature map of the processing submodule in the feature map extraction module. The third feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0218] Based on the processing submodule in the feature map extraction module, the server performs splicing processing on the first convolution feature of the image feature information, the second convolution feature of the image feature information, and the third convolution feature of the image feature information, and then performs convolution processing to obtain the splicing feature of the image feature information.

[0219] For example, it can also be understood that the server performs splicing processing on the first feature map of the processing submodule in the feature map extraction module, the second feature map of the processing submodule in the feature map extraction module, and the third feature map of the processing submodule in the feature map extraction module based on the processing submodule in the feature map extraction module to obtain the fourth feature map 606 of the processing submodule in the feature map extraction module, and then performs convolution processing on the fourth feature map 606 based on the sixth convolution layer 607 of the processing submodule in the feature map extraction module to obtain the splicing feature of the image feature information 601, which can also be understood as the fifth feature map of the processing submodule in the feature map extraction module. Among them, the fourth feature map 606 of the processing submodule in the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame, and the fifth feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame.

[0220] At the same time, the server performs convolution processing on the image feature information 601 of the image frame based on the fifth convolution layer 608 of the processing submodule in the feature map extraction module to obtain a fourth convolution feature of the image feature information 601.

[0221] The fifth convolution layer of the processing submodule in the feature map extraction module is a 1×1 convolution layer, and the fourth convolution feature of the image feature information 601 represents the image information in the image feature information. For example, it can also be understood that the image feature information 601 of the image frame is convoluted based on the fifth convolution layer 608 of the processing submodule in the feature map extraction module to obtain the sixth feature map of the processing submodule in the feature map extraction module. The sixth feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array of features extracted from the image frame.

[0222] like Figure 6 As shown, since the fifth convolutional layer 608 of the processing submodule in the feature map extraction module is a short-circuited residual structure, the ability to extract shallow features can be further enhanced, which can also be understood as further enhancing the ability to extract detail features.

[0223] Afterwards, the server performs feature fusion processing on the fourth convolution feature of the image feature information 601 and the splicing feature of the image feature information 601 based on the processing submodule in the feature map extraction module to obtain the fusion feature of the image feature information 601. For example, it can also be understood that the server performs addition processing on the fifth feature map of the processing submodule in the feature map extraction module and the sixth feature map of the processing submodule in the feature map extraction module based on the processing submodule in the feature map extraction module to obtain the fusion feature of the image feature information 601, for example, it can also be understood as obtaining the seventh feature map of the processing submodule in the feature map extraction module. Among them, the seventh feature map of the processing submodule in the feature map extraction module represents at least one two-dimensional array containing features extracted from the image frame.

[0224] Furthermore, the server performs feature map extraction on the fused features of the image feature information based on the processing submodule in the feature map extraction module, and obtains a feature map 610 of the image frame in the video to be detected. For example, it can also be understood that the server performs convolution processing on the fused features of the image feature information 601 based on the seventh convolution layer 609 of the processing submodule in the feature map extraction module, which can also be understood as the seventh feature map of the processing submodule in the feature map extraction module, to obtain a feature map 610 of the image frame in the video to be detected. Among them, the seventh convolution layer 609 of the processing submodule in the feature map extraction module is a 1×1 convolution layer. Among them, the feature map 610 of the image frame in the video to be detected represents at least one two-dimensional array containing features extracted from the image frame.

[0225] Combine the following Figure 7 , specifically introduces the channel division processing process of the processing sub-module in the feature map extraction module.

[0226] Figure 7 A schematic diagram of the structure of another processing submodule provided in an embodiment of the present application, such as Figure 7As shown, assuming that the number of feature map channels input to the processing submodule 70 in the feature map extraction module is x, the server first divides the input feature map into x = [x0, x1] according to the number of channels; wherein the channel number x0 represents the first preset parameter in the preset target detection model, and the channel number x1 represents the second preset parameter in the preset target detection model.

[0227] The server performs convolution processing on the feature map with channel number x based on the fifth convolution layer 705 of the processing submodule in the feature map extraction module to obtain the feature Figure X Among them, the fifth convolution layer 705 of the processing submodule in the feature map extraction module is a 1×1 convolution layer.

[0228] The server performs convolution processing on the feature map with the number of channels x0 based on the first convolution layer 701 of the processing submodule in the feature map extraction module to obtain the feature map y0. The first convolution layer 701 of the processing submodule in the feature map extraction module is a 1×1 convolution layer.

[0229] The server performs convolution processing on the feature map with the number of channels x1 based on the second convolution layer 702 of the processing submodule in the feature map extraction module and the third convolution layer 703 of the processing submodule in the feature map extraction module, and obtains the second convolution layer 702 of the processing submodule in the feature map extraction module and the third convolution layer 703 of the processing submodule in the feature map extraction module. The feature map after convolution processing is further divided into the number of channels corresponding to the feature map as x1=[x1 0 ,x1 1 ]; Among them, the second convolution layer 702 of the processing submodule in the feature map extraction module is a 3×3 convolution layer, and the third convolution layer 703 of the processing submodule in the feature map extraction module is a 3×3 convolution layer; the number of channels is x1 0 Represents the third preset parameter and number of channels x1 in the preset target detection model 1 Characterizes a fourth preset parameter in a preset target detection model.

[0230] The server processes the submodules in the feature map extraction module and processes the number of channels x1 0 The feature map y1 is short-circuited from the third convolutional layer 703 of the processing submodule in the feature map extraction module to obtain the feature map y1 0 .

[0231] The server performs a multi-channel multiplication based on the fourth convolutional layer 704 of the processing submodule in the feature map extraction module. 1 The feature map of is convolved to obtain the feature map y1 1 Among them, the fourth convolution layer 704 of the processing submodule is a 3×3 convolution layer.

[0232] The server sends feature map y0, feature map y10 , feature map y1 1 Perform splicing processing to obtain feature map y;

[0233] The server performs convolution processing on the feature map y based on the sixth convolution layer 707 of the processing submodule in the feature map extraction module to obtain the feature map Y. The sixth convolution layer 707 of the processing submodule in the feature map extraction module is a 1×1 convolution layer.

[0234] Afterwards, the server sends the feature map Y and feature Figure X Add them together to obtain the feature map Z. Then, based on the seventh convolutional layer 709 of the processing submodule in the feature map extraction module, the feature map Z is convolved to obtain the output feature map of the processing submodule 70 in the feature map extraction module. Among them, the seventh convolutional layer 709 of the processing submodule in the feature map extraction module is a 1×1 convolutional layer.

[0235] It is worth noting that in Figure 5 The feature map extraction module 52 of the preset target detection model includes a processing submodule 5205 and a processing submodule 5208, and each processing submodule can output a feature map according to the above method.

[0236] The 160×160 feature map has a smaller receptive field of shallow features and contains more detailed features, so it is suitable for subsequent use to detect smaller target objects, such as detecting mobile phones. The 80×80 feature map, the 40×40 feature map, and the 20×20 feature map have a larger receptive field of shallow features and contain more overall features, so they are suitable for subsequent use to detect medium-small, and / or medium-large, and / or large target objects, such as detecting staff or users. Therefore, obtaining feature maps of different scales can achieve the subsequent use of them to detect smaller target objects, and can also be used to detect medium-small, and / or medium-large, and / or large target objects. And each scale of feature maps also contains deep features, so shallow features can be used for subsequent detection of target object detection frames, and deep features can be used for subsequent detection of target object categories, thereby improving the efficiency and accuracy of target object detection.

[0237] S308. For each feature map of the image frame, based on the depth residual module corresponding to each feature map in the preset target detection model, perform convolution processing on each feature map to obtain a first convolution feature of each feature map; wherein the first convolution feature of each feature map represents the image information in the feature map.

[0238] In one example, step S308 includes the following steps:

[0239] The first step of step S308: for each feature map of the image frame, based on the first convolution layer of the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain the second convolution feature of each feature map; wherein the first convolution layer of the depth residual module is a 1×1 convolution layer; the second convolution feature of each feature map represents the image information in the feature map.

[0240] The second step of step S308: for each feature map of the image frame, based on the second convolution layer of the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain the third convolution feature of each feature map; wherein the second convolution layer of the depth residual module is a 3×3 convolution layer; the third convolution feature of each feature map represents the image information in the feature map.

[0241] The third step of step S308: for each feature map of the image frame, based on the second convolution layer of the depth residual module corresponding to each feature map in the preset target detection model, and the third convolution layer of the depth residual module, convolution processing is performed on each feature map in turn to obtain the fourth convolution feature of each feature map; wherein the third convolution layer of the depth residual module is a 3×3 convolution layer; the fourth convolution feature of each feature map represents the image information in the feature map.

[0242] The fourth step of step S308: for each feature map of the image frame, the second convolution feature of each feature map, the third convolution feature of each feature map, and the fourth convolution feature of each feature map are subjected to feature splicing processing to obtain a splicing feature of each feature map.

[0243] The fifth step of step S308: for each feature map of the image frame, based on the fourth convolutional layer of the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on the splicing features of each feature map to obtain the first convolutional feature of each feature map; wherein the fourth convolutional layer of the depth residual module is a 1×1 convolutional layer.

[0244] Exemplarily, after the server obtains multiple feature maps of the image frame in the video to be detected, it can perform convolution processing on each feature map of the image frame based on the depth residual module corresponding to each feature map in the preset target detection model, to obtain the first convolution feature of each feature map, which can also be understood as the first feature map of the corresponding depth residual module; wherein the first convolution feature of each feature map represents the image information in the feature map, and the first feature map of the depth residual module represents at least one two-dimensional array containing features extracted from the image frame.

[0245] In one example, for example, you can combine Figure 5 To understand, such as Figure 5 As shown, assuming an image frame is input to Figure 5 After the preset target detection model shown, the server splices the fourth feature map of the feature map extraction module output by the upsampling module 5210 and the fifth feature map of the feature map extraction module output by the first information extraction module 5211 to obtain the sixth feature map of the feature map extraction module, assuming that the sixth feature map is a 160×160 feature map. Afterwards, the server performs convolution processing on the sixth feature map based on the depth residual module 5212 corresponding to the sixth feature map in the preset target detection model to obtain the first convolution feature of the sixth feature map, which can also be understood as the first feature map of the depth residual module 5212. Among them, the first feature map of the depth residual module 5212 represents at least one two-dimensional array containing features extracted from the image frame.

[0246] At the same time, it is assumed that the server performs splicing processing on the eighth feature map of the feature map extraction module output by the first information extraction module 5214 and the ninth feature map of the feature map extraction module output by the first information extraction module 5215 to obtain the tenth feature map of the feature map extraction module, assuming that the tenth feature map is an 80×80 feature map. Afterwards, the server performs convolution processing on the tenth feature map based on the depth residual module 5216 corresponding to the tenth feature map in the preset target detection model to obtain the first convolution feature of the tenth feature map, which can also be understood as the first feature map of the depth residual module 5216. Among them, the first feature map of the depth residual module 5216 represents at least one two-dimensional array containing features extracted from the image frame.

[0247] At the same time, it is assumed that the server concatenates the twelfth feature map of the feature map extraction module output by the first information extraction module 5218 and the fourteenth feature map of the feature map extraction module output by the first information extraction module 5219 to obtain the fifteenth feature map of the feature map extraction module, assuming that the fifteenth feature map is a 40×40 feature map. Afterwards, the server performs convolution processing on the fifteenth feature map based on the depth residual module 5220 corresponding to the fifteenth feature map in the preset target detection model to obtain the first convolution feature of the fifteenth feature map, which can also be understood as the first feature map of the depth residual module 5220. Among them, the first feature map of the depth residual module 5220 represents at least one two-dimensional array containing features extracted from the image frame.

[0248] At the same time, it is assumed that the server performs splicing processing on the seventeenth feature map of the feature map extraction module output by the first information extraction module 5222 and the nineteenth feature map of the feature map extraction module output by the first information extraction module 5223 to obtain the twentieth feature map of the feature map extraction module, assuming that the twentieth feature map is a 20×20 feature map. Afterwards, the server performs convolution processing on the twentieth feature map based on the depth residual module 5224 corresponding to the twentieth feature map in the preset target detection model to obtain the first convolution feature of the twentieth feature map, which can also be understood as the first feature map of the depth residual module 5224. Among them, the first feature map of the depth residual module 5224 represents at least one two-dimensional array containing features extracted from the image frame.

[0249] Among them, for each feature map of the image frame, based on the depth residual module corresponding to each feature map in the preset target detection model, each feature map is convolved to obtain the detailed processing process of the first convolution feature of each feature map, for example, it can be combined with Figure 8 and Figure 5 To explain, Figure 8 A schematic diagram of the structure of the depth residual module provided in the embodiment of the present application is shown in FIG. Figure 8 and Figure 5 As shown, Figure 8 The structural diagram corresponding to the depth residual module 80 is applicable to Figure 5 Depth residual module 5212, depth residual module 5216, depth residual module 5220, and depth residual module 5224 in.

[0250] Assume that an image frame is input to Figure 5 After the preset target detection model shown in Figure 5 As shown, the server splices the fourth feature map of the feature map extraction module output by the upsampling module 5210 and the fifth feature map of the feature map extraction module output by the first information extraction module 5211 to obtain the sixth feature map of the feature map extraction module, assuming that the sixth feature map is a 160×160 feature map. Afterwards, the server processes the sixth feature map based on the depth residual module 5212 corresponding to the sixth feature map in the preset target detection model, and the specific process includes:

[0251] like Figure 8 As shown, the server performs convolution processing on the sixth feature map 801 of the feature map extraction module based on the first convolution layer 802 of the depth residual module 80 corresponding to the sixth feature map 801 of the feature map extraction module in the preset target detection model, so as to obtain the second convolution feature of the sixth feature map 801 of the feature map extraction module, which can also be understood as the second feature map of the depth residual module 80.

[0252] Among them, the first convolution layer 802 of the depth residual module 80 is a 1×1 convolution layer; the second convolution feature of the sixth feature map 801 of the feature map extraction module represents the image information in the sixth feature map 801 of the feature map extraction module, and the second feature map of the depth residual module 80 represents at least one two-dimensional array containing features extracted from the image frame.

[0253] The server performs convolution processing on the sixth feature map 801 of the feature map extraction module based on the second convolution layer 803 of the depth residual module 80 corresponding to the sixth feature map 801 of the feature map extraction module in the preset target detection model, and obtains the third convolution feature of the sixth feature map 801 of the feature map extraction module, which can also be understood as the third feature map of the depth residual module 80.

[0254] Among them, the second convolution layer 803 of the depth residual module 80 is a 3×3 convolution layer; the third convolution feature of the sixth feature map 801 of the feature map extraction module represents the image information in the sixth feature map 801 of the feature map extraction module, and the third feature map of the depth residual module 80 represents at least one two-dimensional array containing features extracted from the image frame.

[0255] The server performs convolution processing on the sixth feature map 801 of the feature map extraction module in sequence based on the second convolution layer 803 of the depth residual module 80 corresponding to the sixth feature map 801 of the feature map extraction module in the preset target detection model, and the third convolution layer 804 of the depth residual module 80, to obtain the fourth convolution feature of the sixth feature map 801 of the feature map extraction module, which can also be understood as the fourth feature map of the depth residual module 80.

[0256] Among them, the third convolution layer 804 of the depth residual module 80 is a 3×3 convolution layer; the fourth convolution feature of the sixth feature map 801 of the feature map extraction module represents the image information in the sixth feature map 801 of the feature map extraction module, and the fourth feature map of the depth residual module 80 represents at least one two-dimensional array containing features extracted from the image frame.

[0257] The server performs feature splicing processing on the second convolution feature of the sixth feature map 801 of the feature map extraction module, the third convolution feature of the sixth feature map 801 of the feature map extraction module, and the fourth convolution feature of the sixth feature map 801 of the feature map extraction module to obtain the splicing feature of the sixth feature map 801 of the feature map extraction module.

[0258] For example, it can also be understood that the second feature map of the depth residual module 80, the third feature map of the depth residual module 80, and the fourth feature map of the depth residual module 80 are spliced ​​to obtain the splicing features of the sixth feature map 801 of the feature map extraction module, which can also be understood as obtaining the fifth feature map 805 of the depth residual module 80, wherein the fifth feature map of the depth residual module 80 represents at least one two-dimensional array containing features extracted from the image frame.

[0259] The server performs convolution processing on the splicing features of the sixth feature map 801 of the feature map extraction module based on the fourth convolutional layer 806 of the depth residual module 80 in the preset target detection model and the sixth feature map 801 of the feature map extraction module to obtain the first convolution feature of the sixth feature map 801 of the feature map extraction module.

[0260] For example, it can also be understood that, based on the fourth convolutional layer 806 of the depth residual module 80 corresponding to the sixth feature map 801 of the feature map extraction module in the preset target detection model, the fifth feature map 805 of the depth residual module 80 is convolved to obtain the first convolution feature of the sixth feature map 801 of the feature map extraction module, which can also be understood as the corresponding first feature map of the depth residual module 80; wherein the fourth convolutional layer 806 of the depth residual module 80 is a 1×1 convolutional layer, and the first feature map of the depth residual module 80 represents at least one two-dimensional array containing features extracted from the image frame.

[0261] At the same time, the server performs convolution processing on each feature map of the 80×80, 40×40, and 20×20 image frame based on the depth residual module corresponding to each feature map in the preset target detection model to obtain the first convolution feature of each feature map. The implementation method of performing convolution processing on the sixth feature map of the feature map extraction module based on the depth residual module corresponding to the sixth feature map of the feature map extraction module in the preset target detection model to obtain the first convolution feature of the sixth feature map of the feature map extraction module introduced above is similar, and will not be repeated here.

[0262] S309: For each feature map of the image frame, perform feature fusion processing on each feature map and the first convolution feature of each feature map to obtain a fusion feature of each feature map.

[0263] Exemplarily, the server performs convolution processing on each feature map of the image frame based on the depth residual module corresponding to each feature map in the preset target detection model, and obtains the first convolution feature of each feature map, which can also be understood as obtaining the first feature map of the depth residual module corresponding to each feature map. Then, for each feature map of the image frame, the server can perform addition processing on each feature map and the first feature map of the depth residual module corresponding to each feature map to obtain the fusion feature of each feature map, which can also be understood as obtaining the sixth feature map of the depth residual module corresponding to each feature map. The sixth feature map of the depth residual module represents at least one two-dimensional array containing features extracted from the image frame.

[0264] For example, you can combine Figure 7 For understanding, it is assumed that the server performs convolution processing on the concatenated features of the sixth feature map 701 of the feature map extraction module based on the fourth convolution layer 706 of the depth residual module 70 corresponding to the sixth feature map 701 of the feature map extraction module in the preset target detection model, and obtains the first convolution feature of the sixth feature map 701 of the feature map extraction module, which can also be understood as obtaining the corresponding first feature map of the depth residual module 70. Assume that the sixth feature map of the feature map extraction module is a 160×160 feature map.

[0265] Afterwards, the server can add the sixth feature map 701 of the feature map extraction module of the image frame and the corresponding first feature map of the depth residual module 70 to obtain the fusion feature of the sixth feature map 701 of the feature map extraction module. For example, it can also be understood as obtaining the sixth feature map of the depth residual module 70 corresponding to the sixth feature map 701 of the feature map extraction module.

[0266] At the same time, the server performs feature fusion processing on each feature map and the first convolution feature of each feature map for the feature map of the 80×80 image frame, the 40×40 feature map, and the 20×20 feature map to obtain the fused feature of each feature map. This is similar to the above-mentioned implementation method of performing feature fusion processing on each feature map and the first convolution feature of each feature map for the sixth feature map of the feature map extraction module to obtain the fused feature of each feature map, and will not be repeated here.

[0267] S310: For each feature map of the image frame, semantic feature processing is performed on the fusion features of each feature map to obtain key feature information corresponding to each feature map.

[0268] Exemplarily, the server performs feature fusion processing on each feature map and the first convolution feature of each feature map for each feature map of the image frame, and after obtaining the fusion feature of each feature map, the server can perform semantic feature processing on the fusion feature of each feature map for each feature map of the image frame to obtain key feature information corresponding to each feature map. Among them, the semantic feature processing can be understood as convolution processing based on a 1×1 convolution layer, and the key feature information includes the semantic features of the target object in the image frame, and the semantic features can include shallow semantic features and deep semantic features.

[0269] Specifically, shallow semantic features can be understood as semantic features obtained through fewer levels of processing in a preset target detection model, such as the contour, edge, color, texture, shape and other detailed features of the target object. Therefore, shallow semantic features can be used to detect the target detection frame of the target object in the future.

[0270] For example, deep semantic features can be understood as semantic features obtained through multiple levels of processing in a preset target detection model, such as abstract features that the target object is a mobile phone, a staff member, or a user. Therefore, deep semantic features can be used to detect the category of the target object in the future.

[0271] For example, you can combine Figure 7 For understanding, it is assumed that the server targets the sixth feature map 701 of the feature map extraction module, and it is assumed that the sixth feature map 701 of the feature map extraction module is a 160×160 feature map. The server performs feature fusion processing on the sixth feature map 701 of the feature map extraction module and the first convolution feature of the sixth feature map 701 of the feature map extraction module, and obtains the fused feature of the sixth feature map 701 of the feature map extraction module. For example, it can also be understood that the sixth feature map of the depth residual module 70 corresponding to the sixth feature map 701 of the feature map extraction module is obtained.

[0272] The server can perform convolution processing on the sixth feature map 70 of the depth residual module 70 based on the fifth convolution layer 707 of the depth residual module 70 for the fusion feature of the sixth feature map 701 of the feature map extraction module of the image frame, which can also be understood as the sixth feature map of the depth residual module 70 corresponding to the sixth feature map 701 of the feature map extraction module, to obtain key feature information corresponding to the sixth feature map 701 of the feature map extraction module, for example, it can also be understood as obtaining the output feature map 708 of the depth residual module 70. Among them, the output feature map 708 of the depth residual module 70 represents at least one two-dimensional array containing features extracted from the image frame.

[0273] At the same time, the server performs semantic feature processing on the fused features of each feature map of the image frame 80×80, 40×40, and 20×20, respectively, to obtain the key feature information corresponding to each feature map. This is similar to the above-mentioned implementation method of performing semantic feature processing on the fused features of each feature map of the sixth feature map of the feature map extraction module to obtain the key feature information corresponding to each feature map, and will not be repeated here.

[0274] Since a short-circuit connection is introduced from the input end in the deep residual module, and a short-circuit connection is also introduced after the input end is convolved based on a 3×3 convolutional layer, more shallow semantic features can be extracted, such as the contour, edge, color, texture, shape and other detail features of the target object. Therefore, shallow semantic features can be used to detect the target detection frame of the target object in the future.

[0275] At the same time, in the deep residual module, there are also multiple layers of convolution processing, so deep semantic features can also be extracted, such as the abstract features of the target object being a mobile phone, a staff member, or a user. Therefore, deep semantic features can be used to detect the category of the target object in the future.

[0276] Therefore, the preset target detection model that extracts features through the deep residual module can improve the efficiency and accuracy of target object detection.

[0277] S311. Based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map.

[0278] Exemplarily, the implementation of step S311 is similar to that of step S203. For a detailed description, please refer to the description of step S203, which will not be repeated here.

[0279] S312. Based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object.

[0280] Exemplarily, the implementation of step S312 is similar to that of step S204. For a detailed description, please refer to the description of step S204, which will not be repeated here.

[0281] S313. Generate prompt information according to the category of the target object in the image frame and the target detection frame of the target object; wherein the prompt information represents the behavior of the target object.

[0282] In one example, step S313 includes the following process:

[0283] For a continuous multi-frame image frame, if it is obtained that the category of one target object in each of the continuous multi-frame image frames is a staff member and the category of the other target object is a mobile phone, and it is determined that the target detection frame under the staff member only intersects with the target detection frame under the mobile phone, then a prompt message of an abnormal behavior alarm for the staff member is generated.

[0284] For a continuous multi-frame image frame, if the category of the target object in each image frame in the continuous multi-frame image frame is a user, and it is determined that there is no target detection frame under the staff that intersects with the target detection frame under the user, a prompt message for the user requiring help is generated.

[0285] Exemplarily, after obtaining the category of the target object and the target detection frame of the target object in the image frame, the server can generate prompt information based on the category of the target object and the target detection frame of the target object in the image frame; wherein the prompt information represents the behavior of the target object, such as a prompt to warn staff of abnormal behavior or a prompt for users who need help.

[0286] In an example, suppose that in the image frames of a bank surveillance video for N6 consecutive minutes (where N6 is a natural number greater than 0, which can be determined based on experience and is not limited in this embodiment), staff member G1 is playing with a mobile phone, staff member G2 is serving user Y2 using a mobile phone, staff member G3 is serving user Y3, and user Y1 has no staff help.

[0287] At this time, after the server detects the target object in each image frame of the multiple image frames for N6 consecutive minutes, it judges the target object of each staff category one by one. If the target detection frame under the staff only intersects with the target detection frame under the mobile phone, a prompt message of abnormal behavior alarm is generated for the staff.

[0288] For example, if the server detects that the target detection frame under the worker G1 only intersects with the target detection frame under the mobile phone, a prompt message for abnormal behavior warning of the worker G1 is generated. For example, it can be understood that the worker is playing with the mobile phone, so a prompt message needs to be generated.

[0289] For example, if the server detects that the target detection frame under the staff member G2 not only intersects with the target detection frame under the mobile phone, but also intersects with the target detection frame under the user Y2, then no prompt information for abnormal behavior warning of the staff member G2 is generated. For example, it can be understood that the staff member is instructing the user Y2 to use the mobile phone, so there is no need to generate prompt information.

[0290] For example, if the server detects that the target detection box under staff member G3 only intersects with the target detection box under user Y3, no prompt information is generated to warn of abnormal behavior of staff member G3. For example, it can be understood that staff member G3 is helping user Y3, so there is no need to generate prompt information.

[0291] At the same time, the server judges the target objects of each user category one by one. If the target detection box under the user does not intersect with the target detection box under any staff member, a prompt message of "user in need of help" is generated for the user. For example, it can be understood that the user needs help from the staff.

[0292] For example, if the server detects that the target detection box under user Y1 does not intersect with the target detection box under any staff member, a prompt message indicating that help is needed is generated for user Y1.

[0293] For example, if the server detects that the target detection box under user Y2 intersects with the target detection box under staff member G2, no prompt information is generated for user Y2 that needs help. For example, it can be understood that staff member G2 is helping user Y2, so there is no need to generate prompt information.

[0294] For example, if the server detects that the target detection box under user Y3 intersects with the target detection box under staff member G3, no prompt information is generated for user Y3 that needs help. For example, it can be understood that staff member G3 is helping user Y3, so there is no need to generate prompt information.

[0295] Among them, whether the target detection boxes intersect can be determined by the following process:

[0296] If the intersection over union (IoU) of the target detection frames of the two target objects is greater than a preset threshold, it is determined that the target detection frames of the two target objects intersect;

[0297] If the intersection over union (IoU) of the target detection frames of the two target objects is less than or equal to a preset threshold, it is determined that the target detection frames of the two target objects do not intersect;

[0298] Among them, the intersection over union (IoU) represents the intersection area of ​​the target detection boxes of two target objects divided by the union area.

[0299] The target object behavior detection method provided by the embodiment of the present application can obtain a preset target detection model after adjusting and optimizing parameters by inputting the image frames of the video to be trained into the initial model for training processing. Therefore, the target object detected by using the preset target detection model is closer to the real result. Furthermore, the subsequent use of the preset target detection model for target detection can improve the efficiency and accuracy of detection.

[0300] In the method provided by the embodiment of the present application, since the processing submodule and the deep residual module in the preset target detection model include both shallow convolution processing and deep convolution processing, both shallow semantic features and deep semantic features can be extracted through the processing submodule and the deep residual module, and then, a more accurate target detection frame of the target object can be detected through the shallow semantic features, and a more accurate category of the target object can be detected through the deep semantic features. Thus, the efficiency and accuracy of target object detection are improved.

[0301] In the method provided in the embodiment of the present application, since the preset target detection model can output multi-scale feature maps, both smaller targets, such as mobile phones, and larger targets, such as staff and users, can be detected, thereby improving the efficiency and accuracy of target object detection.

[0302] In the method provided in the embodiment of the present application, by determining the target object category of each image frame and whether the target detection frames intersect in multiple consecutive image frames, prompt information can be automatically and accurately generated, thereby improving the user experience.

[0303] Fig. 9 A schematic diagram of the structure of a target object behavior detection device provided in an embodiment of the present application, such as Fig. 9 As shown, the device 90 comprises:

[0304] The extraction module 901 is used to input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different;

[0305] The first processing module 902 is used to process each feature map of the image frame based on a preset target detection model to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame;

[0306] The second processing module 903 is used to process the key feature information corresponding to each feature map based on the attention mechanism module corresponding to each feature map in the preset target detection model to obtain the processed key feature information corresponding to each feature map;

[0307] A detection module 904 is used to detect the processed key feature information corresponding to each feature map based on the detection module corresponding to each feature map in the preset target detection model, and obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object;

[0308] The generating module 905 is used to generate prompt information according to the category of the target object and the target detection frame of the target object in the image frame; wherein the prompt information represents the behavior of the target object.

[0309] In a possible implementation, the generating module 905 is specifically configured to:

[0310] For a continuous multi-frame image, if it is obtained that the category of one target object in each of the continuous multi-frame image is a staff member and the category of another target object is a mobile phone, and it is determined that the target detection frame under the staff member only intersects with the target detection frame under the mobile phone, a prompt message of an abnormal behavior alarm for the staff member is generated;

[0311] For a continuous multi-frame image frame, if the category of the target object in each image frame in the continuous multi-frame image frame is a user, and it is determined that there is no target detection frame under the staff that intersects with the target detection frame under the user, a prompt message for the user requiring help is generated.

[0312] In a possible implementation, the extraction module 901 is specifically configured to:

[0313] The collected image frames of the video to be detected are input into the information extraction module and the processing module in the feature information extraction module in the preset target detection model for processing in sequence to obtain the image feature information of the image frames in the video to be detected;

[0314] Based on the feature map extraction module in the preset target detection model, feature maps are extracted from the image feature information of the image frame to obtain multiple feature maps of the image frame in the video to be detected.

[0315] In a possible implementation, the extraction module 901 performs feature map extraction on the image feature information of the image frame based on the feature map extraction module in the preset target detection model to obtain multiple feature maps of the image frame in the video to be detected, which is specifically used for:

[0316] Based on the first convolution layer of the processing submodule in the feature map extraction module, convolution processing is performed on the image feature information of the image frame to obtain a first convolution feature of the image feature information; wherein the first convolution layer of the processing submodule is a 1×1 convolution layer; and the first convolution feature of the image feature information represents the image information in the image feature information;

[0317] Based on the second convolution layer of the processing submodule in the feature map extraction module and the third convolution layer of the processing submodule, convolution processing is performed on the image feature information of the image frame to obtain a second convolution feature of the image feature information; wherein the second convolution layer of the processing submodule is a 3×3 convolution layer, the third convolution layer of the processing submodule is a 3×3 convolution layer, and the second convolution feature of the image feature information represents the image information in the image feature information;

[0318] Based on the second convolution layer of the processing submodule in the feature map extraction module, the third convolution layer of the processing submodule, and the fourth convolution layer of the processing submodule, convolution processing is performed on the image feature information of the image frame to obtain a third convolution feature of the image feature information; wherein the fourth convolution layer of the processing submodule is a 3×3 convolution layer, and the third convolution feature of the image feature information represents the image information in the image feature information;

[0319] Based on the processing submodule in the feature map extraction module, a first convolution feature of the image feature information, a second convolution feature of the image feature information, and a third convolution feature of the image feature information are spliced ​​and convoluted to obtain a spliced ​​feature of the image feature information;

[0320] Based on the fifth convolution layer of the processing submodule in the feature map extraction module, convolution processing is performed on the image feature information of the image frame to obtain a fourth convolution feature of the image feature information; wherein the fifth convolution layer of the processing submodule is a 1×1 convolution layer, and the fourth convolution feature of the image feature information represents the image information in the image feature information;

[0321] Based on the processing submodule in the feature map extraction module, feature fusion processing is performed on the fourth convolution feature of the image feature information and the splicing feature of the image feature information to obtain a fusion feature of the image feature information;

[0322] Based on the processing submodule in the feature map extraction module, feature map extraction is performed on the fusion features of the image feature information to obtain multiple feature maps of the image frames in the video to be detected.

[0323] In a possible implementation, the first processing module 902 is specifically configured to:

[0324] For each feature map of the image frame, based on the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a first convolution feature of each feature map; wherein the first convolution feature of each feature map represents the image information in the feature map;

[0325] For each feature map of the image frame, perform feature fusion processing on each feature map and the first convolution feature of each feature map to obtain a fusion feature of each feature map;

[0326] For each feature map of the image frame, semantic feature processing is performed on the fusion features of each feature map to obtain the key feature information corresponding to each feature map.

[0327] In a possible implementation, the first processing module 902 performs convolution processing on each feature map of the image frame based on a depth residual module corresponding to each feature map in a preset target detection model to obtain a first convolution feature of each feature map, specifically for:

[0328] For each feature map of the image frame, based on the first convolution layer of the deep residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a second convolution feature of each feature map; wherein the first convolution layer of the deep residual module is a 1×1 convolution layer; the second convolution feature of each feature map represents the image information in the feature map;

[0329] For each feature map of the image frame, based on the second convolution layer of the deep residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain the third convolution feature of each feature map; wherein the second convolution layer of the deep residual module is a 3×3 convolution layer; the third convolution feature of each feature map represents the image information in the feature map;

[0330] For each feature map of the image frame, based on the second convolution layer of the deep residual module corresponding to each feature map in the preset target detection model and the third convolution layer of the deep residual module, each feature map is sequentially convolved to obtain a fourth convolution feature of each feature map; wherein the third convolution layer of the deep residual module is a 3×3 convolution layer; the fourth convolution feature of each feature map represents the image information in the feature map;

[0331] For each feature map of the image frame, a second convolution feature of each feature map, a third convolution feature of each feature map, and a fourth convolution feature of each feature map are subjected to feature splicing processing to obtain a splicing feature of each feature map;

[0332] For each feature map of the image frame, based on the fourth convolutional layer of the deep residual module corresponding to each feature map in the preset target detection model, the splicing features of each feature map are convolved to obtain the first convolutional features of each feature map; wherein the fourth convolutional layer of the deep residual module is a 1×1 convolutional layer.

[0333] In a possible implementation, the device 90 is further configured to:

[0334] Inputting the image frames of the video to be trained into the initial model to extract feature maps, and obtaining multiple feature maps of the image frames in the video to be trained; wherein the video to be trained includes multiple image frames; and the feature map dimensions of the multiple feature maps are different;

[0335] Based on the initial model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame;

[0336] Based on the attention mechanism module corresponding to each feature map in the initial model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map;

[0337] Based on the detection module corresponding to each feature map in the initial model, the processed key feature information corresponding to each feature map is detected to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object;

[0338] According to the category of the target object in the image frame and the target detection frame of the target object, the initial model is updated to obtain a preset target detection model.

[0339] For example, this embodiment can refer to the above method embodiment, and its principles and technical effects are similar and will not be described in detail.

[0340] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.10 As shown, the electronic device 100 provided in this embodiment includes: at least one processor 1001 and a memory 1002. Optionally, the electronic device 100 also includes a communication interface 1003. The processor 1001, the memory 1002 and the communication interface 1003 are connected via a bus 1004.

[0341] In a specific implementation process, at least one processor 1001 executes the computer-executable instructions stored in the memory 1002, so that at least one processor 1001 executes the above method.

[0342] The specific implementation process of the processor 1001 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0343] In the above-mentioned embodiments, it should be understood that the processor 1001 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0344] The memory 1002 may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0345] The bus 1004 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1004 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus 1004 in the drawings of the present application is not limited to only one bus or one type of bus.

[0346] The electronic device provided in this embodiment may be the server in the above embodiment.

[0347] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0348] The present application also provides a computer program product, which includes a computer program, and the computer program implements the above method when executed by a processor.

[0349] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0350] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0351] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0352] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0353] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

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

[0355] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0356] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0357] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for detecting behavior of a target object, characterized in that: The method comprises: Input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different; Based on the preset target detection model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame; Based on the attention mechanism module corresponding to each feature map in the preset target detection model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map; Based on the detection module corresponding to each feature map in the preset target detection model, the processed key feature information corresponding to each feature map is detected and processed to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target object is included in the target detection frame; Prompt information is generated according to the category of the target object in the image frame and the target detection frame of the target object; wherein the prompt information represents the behavior of the target object.

2. The method according to claim 1, characterized in that Generate prompt information based on the category of the target object in the image frame and the target detection frame of the target object, including: For a continuous multi-frame image, if it is obtained that the category of one target object in each of the continuous multi-frame image is a staff member and the category of another target object is a mobile phone, and it is determined that the target detection frame under the staff member only intersects with the target detection frame under the mobile phone, a prompt message of an abnormal behavior alarm for the staff member is generated; For a continuous multi-frame image frame, if the category of the target object in each image frame in the continuous multi-frame image frame is a user, and it is determined that there is no target detection frame under the staff that intersects with the target detection frame under the user, a prompt message for the user requiring help is generated.

3. The method according to claim 1, characterized in that: The collected image frames of the video to be detected are input into a preset target detection model to extract feature maps, and multiple feature maps of the image frames in the video to be detected are obtained, including: The collected image frames of the video to be detected are input into the information extraction module and the processing module in the feature information extraction module in the preset target detection model for processing in sequence to obtain the image feature information of the image frames in the video to be detected; Based on the feature map extraction module in the preset target detection model, feature map extraction is performed on the image feature information of the image frame to obtain multiple feature maps of the image frame in the video to be detected.

4. The method according to claim 3, characterized in that Based on the feature map extraction module in the preset target detection model, feature map extraction is performed on the image feature information of the image frame to obtain multiple feature maps of the image frame in the video to be detected, including: Based on the first convolution layer of the processing submodule in the feature map extraction module, the image feature information of the image frame is convolved to obtain a first convolution feature of the image feature information; wherein the first convolution layer of the processing submodule is a 1×1 convolution layer; the first convolution feature of the image feature information represents the image information in the image feature information; Based on the second convolution layer of the processing submodule in the feature map extraction module and the third convolution layer of the processing submodule, the image feature information of the image frame is convolutionally processed to obtain a second convolution feature of the image feature information; wherein the second convolution layer of the processing submodule is a 3×3 convolution layer, the third convolution layer of the processing submodule is a 3×3 convolution layer, and the second convolution feature of the image feature information represents the image information in the image feature information; Based on the second convolution layer of the processing submodule in the feature map extraction module, the third convolution layer of the processing submodule, and the fourth convolution layer of the processing submodule, the image feature information of the image frame is convolutionally processed to obtain a third convolution feature of the image feature information; wherein the fourth convolution layer of the processing submodule is a 3×3 convolution layer, and the third convolution feature of the image feature information represents the image information in the image feature information; Based on the processing submodule in the feature map extraction module, a first convolution feature of the image feature information, a second convolution feature of the image feature information, and a third convolution feature of the image feature information are spliced ​​and convoluted to obtain a spliced ​​feature of the image feature information; Based on the fifth convolution layer of the processing submodule in the feature map extraction module, the image feature information of the image frame is convolved to obtain a fourth convolution feature of the image feature information; wherein the fifth convolution layer of the processing submodule is a 1×1 convolution layer, and the fourth convolution feature of the image feature information represents the image information in the image feature information; Based on the processing submodule in the feature map extraction module, feature fusion processing is performed on the fourth convolution feature of the image feature information and the splicing feature of the image feature information to obtain a fusion feature of the image feature information; Based on the processing submodule in the feature map extraction module, feature map extraction is performed on the fusion features of the image feature information to obtain multiple feature maps of the image frames in the video to be detected.

5. The method according to claim 1, characterized in that Based on the preset target detection model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, including: For each feature map of the image frame, based on the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a first convolution feature of each feature map; wherein the first convolution feature of each feature map represents the image information in the feature map; For each feature map of the image frame, perform feature fusion processing on each feature map and the first convolution feature of each feature map to obtain a fusion feature of each feature map; For each feature map of the image frame, semantic feature processing is performed on the fusion features of each feature map to obtain the key feature information corresponding to each feature map.

6. The method according to claim 5, characterized in that For each feature map of the image frame, based on the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a first convolution feature of each feature map, including: For each feature map of the image frame, based on the first convolution layer of the deep residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a second convolution feature of each feature map; wherein the first convolution layer of the deep residual module is a 1×1 convolution layer; and the second convolution feature of each feature map represents the image information in the feature map; For each feature map of the image frame, based on the second convolution layer of the deep residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on each feature map to obtain a third convolution feature of each feature map; wherein the second convolution layer of the deep residual module is a 3×3 convolution layer; the third convolution feature of each feature map represents the image information in the feature map; For each feature map of the image frame, based on the second convolution layer of the depth residual module corresponding to each feature map in the preset target detection model and the third convolution layer of the depth residual module, each feature map is sequentially convolved to obtain a fourth convolution feature of each feature map; wherein the third convolution layer of the depth residual module is a 3×3 convolution layer; and the fourth convolution feature of each feature map represents the image information in the feature map; For each feature map of the image frame, a second convolution feature of each feature map, a third convolution feature of each feature map, and a fourth convolution feature of each feature map are subjected to feature splicing processing to obtain a splicing feature of each feature map; For each feature map of the image frame, based on the fourth convolutional layer of the depth residual module corresponding to each feature map in the preset target detection model, convolution processing is performed on the splicing features of each feature map to obtain the first convolutional feature of each feature map; wherein the fourth convolutional layer of the depth residual module is a 1×1 convolutional layer.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Inputting the image frames of the video to be trained into the initial model to extract feature maps, and obtaining multiple feature maps of the image frames in the video to be trained; wherein the video to be trained includes multiple image frames; and the multiple feature maps have different feature map dimensions; Based on the initial model, each feature map of the image frame is processed to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame; Based on the attention mechanism module corresponding to each feature map in the initial model, the key feature information corresponding to each feature map is processed to obtain the processed key feature information corresponding to each feature map; Based on the detection module corresponding to each feature map in the initial model, the processed key feature information corresponding to each feature map is detected to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target object is included in the target detection frame; The initial model is updated according to the category of the target object in the image frame and the target detection frame of the target object to obtain the preset target detection model.

8. A target object behavior detection device, characterized in that: The device comprises: An extraction module is used to input the collected image frames of the video to be detected into a preset target detection model to extract feature maps, and obtain multiple feature maps of the image frames in the video to be detected; wherein the video to be detected includes multiple image frames; and the feature map dimensions of the multiple feature maps are different; A first processing module is used to process each feature map of the image frame based on the preset target detection model to obtain key feature information corresponding to each feature map, wherein the key feature information represents the semantic features of the target object in the image frame; A second processing module is used to process the key feature information corresponding to each feature map based on the attention mechanism module corresponding to each feature map in the preset target detection model to obtain the processed key feature information corresponding to each feature map; A detection module, configured to perform detection processing on the processed key feature information corresponding to each feature map based on the detection module corresponding to each feature map in the preset target detection model, to obtain the category of the target object in the image frame and the target detection frame of the target object; wherein the target detection frame includes the target object; The generation module is used to generate prompt information according to the category of the target object and the target detection frame of the target object in the image frame; wherein the prompt information represents the behavior of the target object.

9. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.