Regional intrusion detection method and related device
By calculating the overlapping area between the target object and the warning area, the problem of computational complexity and long time of regional intrusion detection in the existing technology is solved, the real-time performance of the detection is improved, and it is suitable for intelligent monitoring systems.
Patent Information
- Application Number
- CN202010549904.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-16
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-06-16
AI Technical Summary
Existing regional intrusion detection methods have high computational complexity, long calculation time, and poor real-time performance, and cannot meet the real-time judgment needs of intelligent monitoring systems.
By obtaining the warning area integral map and target object frame of the current scene image, the overlapping area between the target object and the warning area is calculated, and whether the target object invades the warning area is determined, simplifying the calculation process and reducing calculation complexity and time.
It achieves low computational complexity and fast regional intrusion detection, improves the real-time performance of detection, and is suitable for high-resolution and high-frame-rate surveillance videos.
Smart Images

Figure CN111815570B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method for detecting regional intrusion and related devices thereof. Background Art
[0002] With the continuous development of intelligent monitoring technology and the increasing maturity of image processing technology, the original human judgment of whether the target object has invaded the warning area can no longer meet the needs. The intelligent monitoring system based on artificial intelligence and video analysis can largely make up for the problem of insufficient manpower and can automatically judge whether the target object has invaded the warning area through images. However, the existing regional intrusion detection method has high computational complexity, long computational time, and poor real-time performance. Summary of the invention
[0003] The present application provides a regional intrusion detection method and related devices thereof. The regional intrusion detection method of the present application can reduce computational complexity and computational time and improve detection real-time performance.
[0004] To solve the technical problem, the present application provides a regional intrusion detection method, the method comprising:
[0005] Get the current scene image;
[0006] Determine the warning area integral map corresponding to the current scene image, wherein the value of each pixel point in the warning area integral map is proportional to the area occupied by the warning area in the rectangular frame formed by the corresponding pixel point and the fixed pixel point in the current scene image;
[0007] Using the object detection model, obtain the target object frame belonging to the target object in the current scene image;
[0008] Calculate the overlapping area between the target object frame and the warning area according to the pixel values of the corresponding pixels of the vertices of the target object frame in the warning area integral image;
[0009] Determine whether the target object invades the warning area based on the overlapping area.
[0010] To solve the technical problem, the present application provides an area intrusion detection device, which includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the above-mentioned area intrusion detection method.
[0011] In order to solve the technical problem, the present application provides a computer storage medium, in which a computer program is stored, and when the computer program is executed, the steps in the above-mentioned regional intrusion detection method are implemented.
[0012] After the present application obtains the current scene image, it can first determine the warning area integral map corresponding to the current scene image, and then obtain the target object frame belonging to the target object in the current scene image through the object detection model, and then calculate the overlapping area of the target detection frame and the warning area through the pixel values of the pixel points corresponding to the four vertices of the target detection frame on the warning area integral map. The calculated overlapping area can be used to determine whether the target object has invaded the warning area. When the warning area integral map is set, the overlapping area can be calculated through the pixel values of the pixel points corresponding to the four vertices of the target detection frame on the warning area integral map. The calculation complexity is low, the calculation time is short, and the real-time performance is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the implementation modes of the present application, the drawings required for use in the description of the implementation modes will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 It is a flow chart of an implementation method of a regional intrusion detection method of the present application;
[0015] Figure 2 It is a schematic diagram of the warning area integral map in the regional intrusion detection method of the present application;
[0016] Figure 3 It is a schematic diagram of calculating the overlapping area in the regional intrusion detection method of the present application;
[0017] Figure 4 This is a schematic diagram of an application example of the regional intrusion detection method of the present application;
[0018] Figure 5 It is a structural diagram of an implementation scheme of a panoramic segmentation network of the present application;
[0019] Figure 6 It is a flow chart of an implementation method of a warning area division method in the regional intrusion detection method of the present application;
[0020] Figure 7 It is a structural schematic diagram of an implementation method of a regional intrusion detection device of the present application;
[0021] Figure 8 It is a structural schematic diagram of an implementation method of a computer storage medium of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solution of the present application, the regional intrusion detection method and related devices provided by the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0023] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of an implementation method of the regional intrusion detection method of the present application. Figure 1 As shown, the regional intrusion detection method of this embodiment specifically includes the following steps.
[0024] S110: Acquire the current scene image.
[0025] S120: Determine the warning area integral image corresponding to the current scene image.
[0026] The value of each pixel in the warning area integral map is proportional to the area occupied by the warning area in the rectangular frame formed by the corresponding pixel and the fixed pixel in the current scene image. The fixed pixel can be any pixel in the current scene image. Specifically, the fixed pixel can be the upper left vertex or the upper right vertex in the current scene image. Optionally, the value of each pixel in the warning area integral map can be the area occupied by the warning area in the rectangular frame formed by the corresponding pixel and the upper left vertex in the current scene image.
[0027] In one implementation, the warning area integral map corresponding to the current scene image can be directly obtained, that is, the overlapping area of the target detection box and the warning area can be calculated using the previously obtained warning area integral map. In this way, when judging whether the target object in the current scene image invades the warning area, it is only necessary to obtain the warning area integral map, and then by obtaining and calculating several pixel values in the warning area integral map, it is possible to judge whether the target object invades the warning area. The time overhead required to calculate the invasion result is not related to the size of the current scene image, the calculation time and complexity are low, and the real-time performance is high.
[0028] In another implementation, the warning area integral image can be obtained through the current scene image. Figure 2 As shown, the step of obtaining a warning area integral map through the current scene image may include: dividing the current scene image into warning areas to determine the warning areas in the current scene image; assigning pixels in the warning area to fixed values other than 0, for example, assigning pixels in the warning area to 1, and assigning pixels in areas other than the warning area in the current scene image to 0, to obtain an area division map; and taking the sum of all pixel values in a rectangular frame formed by each pixel in the area division map and the fixed pixel as the value of the corresponding pixel in the warning area integral map.
[0029] It can be understood that the rectangular frame formed by each pixel point and the fixed pixel value mentioned above may refer to: a rectangular frame obtained by taking each pixel point and the fixed pixel point as two diagonal vertices.
[0030] It is understandable that in actual application, if the monitoring area or scene has not changed, the warning area integral map can be formed only through the warning area division results of one or more frames of the current scene image, and the warning area integral map formed this time can be used to determine whether the target object in at least one subsequent frame of the current scene image has invaded the warning area until the monitoring area or scene changes. In this way, when the monitoring scene or area has not changed, the previously obtained warning area integral map can be used to determine whether the target object has invaded the warning area. In this way, the time cost required to calculate the intrusion result is not related to the size of the input image. The intrusion result can be obtained by the pixel values of the four vertices of the target detection box. Its time complexity is O(1), which saves computing time and can also save the space cost required by the regional intrusion detection method. It has obvious advantages in processing surveillance videos with high resolution and frame rate.
[0031] It is understandable that the warning area of the current scene image may be the same as the warning area in the current scene image used to obtain the warning area integral map. The warning area integral map may include pixel points corresponding to all pixel points of the current scene image, so that the overlapping area of the target object frame and the warning area can be calculated by the warning area integral map at any position of the target object in the current scene image.
[0032] S130: Obtain a target object frame belonging to the target object in the current scene image using the object detection model.
[0033] In this embodiment, a target object frame belonging to a target object in the current scene image may be detected by any object detection network.
[0034] For example, an object frame classification model may be used to determine a target object frame that can frame the target object in the current scene image. In this embodiment, the target object frame is rectangular.
[0035] In addition, the confidence corresponding to the target object frame can also be confirmed. In order to ensure that at least one target object frame finally obtained corresponds to different objects, the NMS non-maximum suppression algorithm can be used and the confidence corresponding to the target object frame can be used to remove redundant target object frames, so as to determine whether the target object invades the warning area according to the target object frame. Specifically, if the candidate target object frames are arranged according to the confidence, from large to small, there are A, B, C, D, E, and F. Select the target object frame A with the highest confidence, calculate the IOU of the remaining target object frames and A, and remove the target object frames B and C whose IOU is greater than a certain threshold (such as 0.6); remove A and store it as one of the target object frames; then continue to select the target object frame D with the highest confidence, calculate the IOU value of the remaining target object frames E and F with D, and remove the target object frames greater than the threshold; repeat this cycle until there are no candidate target frames remaining; the removed and saved target object frame is the final confirmed target object frame.
[0036] S140: Calculate the overlapping area between the target object frame and the warning area according to the pixel values of the pixels corresponding to the vertices of the target object frame in the warning area integral image.
[0037] Optionally, the overlapping area S of the target object and the warning area is calculated according to the pixel values of the corresponding pixels of the four vertices of the target object frame in the warning area integral image. 入侵 .
[0038] Optionally, the pixel values of the four vertices of the target object frame corresponding to the pixel points on the warning area integral map are first found, and then the overlapping area can be obtained by adding and subtracting the pixel values of the corresponding pixel points on the warning area integral map, which is simple and convenient with low computational complexity. Figure 3 As shown, Sintrusion = SDO-SBO-SCO+SAO, where Sintrusion is the overlapping area between the target object and the warning area, and SAO, SBO, SCO and SDO are the pixel values of the four vertices A, B, C and D of the target object box on the integral map of the warning area.
[0039] S150: Determine whether the target object invades the warning area based on the overlapping area.
[0040] In one implementation, it is possible to directly determine whether the target object has invaded the warning area based on the overlapping area. Specifically, if the overlapping area is greater than a first threshold, it is possible to determine that the target object has invaded the warning area. If the overlapping area is less than the first threshold, it is possible to determine that the target object has not invaded the warning area.
[0041] In another implementation, the ratio of the overlapping area to the corresponding area of the target object can be calculated, and then the ratio can be used to determine whether the target object has invaded the warning area. Specifically, if the ratio is greater than a second threshold, it can be determined that the target object has invaded the warning area, and if the ratio is less than the second threshold, it can be determined that the target object has not invaded the warning area.
[0042] In this embodiment, after obtaining the current scene image, the warning area integral map corresponding to the current scene image can be determined first, and then the target object frame belonging to the target object in the current scene image can be obtained through the object detection model, and then the overlapping area of the target detection frame and the warning area can be calculated through the pixel values of the pixel points corresponding to the four vertices of the target detection frame on the warning area integral map. The calculated overlapping area can be used to determine whether the target object invades the warning area. When the overlapping area is calculated through the warning area integral map, the overlapping area can be calculated through the pixel values of the pixel points corresponding to the four vertices of the target detection frame on the warning area integral map. The calculation complexity is low, the calculation time is short, and the real-time performance is high.
[0043] In an application scenario, such as Figure 4 As shown in FIG. 1 , the above-mentioned regional intrusion detection method can be applied to determine whether there is a vehicle intrusion in the high-speed checkpoint guide line area. First, the original image at the high-speed checkpoint is panorama segmented to confirm the warning area in the original image. For example, Figure 4 (f) The prohibited area of the guide line is divided into a warning area. The integral map of the warning area is calculated based on the divided warning area. After obtaining the vehicle detection frame of each frame, the overlapping area between the vehicle detection frame and the warning area can be quickly calculated. By calculating the ratio of the overlapping area / the area of the target object frame and combining it with the second threshold, it can be quickly determined whether the vehicle has invaded the warning area.
[0044] Furthermore, in step S120, in the process of determining the warning area integral map corresponding to the current scene image, the current scene image may be first divided into warning areas, and then the warning area integral map may be determined based on the divided warning areas. Optionally, the current scene image may be segmented using a trained panoramic segmentation network to obtain a warning image. Among them, a panoramic segmentation network may be trained using a plurality of current scene images that identify various semantic category areas (such as warning areas), so that the trained panoramic segmentation network can segment various current scene images and adaptively segment warning areas under changing scenes. Furthermore, the panoramic segmentation network may be trained using training samples that identify various semantic category areas and instance areas to obtain a trained panoramic segmentation network. Figure 5 As shown, the panoptic segmentation network may include a feature extraction layer, an object detection layer, and a panoptic segmentation layer. Specifically, Figure 6 As shown, dividing the current scene image into warning areas may include the following steps.
[0045] S121: Extracting a feature map of the current scene image through a feature extraction layer.
[0046] Optionally, the feature extraction layer may be a codec structure or a dilated convolution structure, which can generate richer semantic information and higher-resolution feature maps, thereby enhancing the ability to identify larger or smaller objects and enhancing the robustness of identifying larger or smaller objects.
[0047] Preferably, the feature extraction layer is a codec structure. The coding structure in the feature extraction layer may include a downsampling unit that calculates the current scene image and extracts the feature map of the current scene image. Optionally, the coding structure may include at least two downsampling units, so that multiple levels of feature maps of the current scene image can be obtained. The obtained multiple levels of feature maps correspond to features of different complexity, wherein the low-level feature maps correspond to features of relatively low complexity, such as basic points and lines in the image. The medium and high-level feature maps correspond to features of slightly higher complexity, such as medium-level features used to describe the outline of an object in the image, and high-level features can be used to describe semantic information in the image. Specifically, the downsampling unit may include a second convolutional layer and a downsampling layer. Among them, the downsampling layer may be a pooling layer.
[0048] The decoding structure may be connected to the encoding structure to output an output image having the same resolution as the current scene image. The decoding structure includes an upsampling unit. At least two upsampling units may be provided in the decoding structure. Optionally, the upsampling unit may include an upsampling layer and a third convolution layer. The upsampling layer may be an interpolation layer.
[0049] In addition, the feature extraction layer may include an inter-layer jump connection layer. The inter-layer jump connection layer may jump-connect the input feature map of the downsampling layer in the encoding structure with the output feature map of the same resolution of the upsampling layer in the decoding structure, so that the feature map containing low-level information in the encoding structure and the feature map containing high-level information in the decoding structure may be fused, so that the final feature map of the network contains both image detail information and high-level semantic information. The number of inter-layer jump connection layers may be the same as the number of downsampling units and the number of upsampling units in the feature extraction layer.
[0050] Furthermore, the feature extraction layer may also include a first convolution layer. The first convolution layer is connected after all downsampling units and before all upsampling units. The first convolution layer may process the output feature map of the last downsampling unit to obtain a feature map having the same resolution as the output feature map of the last downsampling unit.
[0051] For example, Figure 5As shown in the figure, the feature extraction layer includes 3 downsampling units, 2 first convolutional layers, 3 upsampling units and 3 inter-layer skip connection layers. The downsampling unit is a Conv3-Conv3-Maxpooling structure. The upsampling unit is an Upsampling-Conv3-Conv3 structure, that is, the upsampling unit includes a bilinear interpolation layer and a third convolutional layer. The inter-layer skip connection layer adds or directly connects the input feature map of the pooling layer with the feature map of the same resolution output by the interpolation layer in the upsampling unit point by point. The first convolutional layer is a Conv3 structure. In an application scenario, an image with a resolution of 512×512 can be input into the feature extraction layer. After each downsampling unit, the resolution of the feature map is halved, for example, the resolution changes from 512×512 to 256×256; after each upsampling unit, the resolution of the feature map is doubled, for example, the resolution changes from 256×256 to 512×512.
[0052] The feature map extracted by the feature extraction layer can be input into the object detection layer and the panoramic segmentation layer, which can realize parameter sharing between the panoramic segmentation layer and the object detection layer, enable the panoramic segmentation network to effectively integrate instance information and semantic category area information, and better eliminate the interference of instances on semantic category area segmentation, making the segmentation result more robust.
[0053] S122: Perform object frame detection on the feature map through the object detection layer to obtain at least one object frame.
[0054] The object detection layer can be any model that implements the object detection function. The object detection layer is pre-trained based on the label map of the annotated object. In the pre-training stage, the object is first annotated in the image, and the object detection layer is trained using the label map of the annotated object, so that a trained object detection layer can be obtained.
[0055] The trained object detection layer can perform object detection on the feature map of the current scene image extracted by the feature extraction layer to confirm the object box that can select each object. The object box can be a rectangular box that can select the object on the current scene image.
[0056] In addition, the confidence level of the object frame can be confirmed. To ensure that at least one object frame obtained in the end corresponds to different objects, the NMS non-maximum suppression algorithm can be used to remove redundant object frames according to the confidence level of the object frame to obtain the final confirmed object frame.
[0057] Of course, after confirming the object frame that each object finally corresponds to, the object type and / or instance category corresponding to each object frame can also be recorded so that the panoramic segmentation layer can distinguish which instance the pixel belongs to. Specifically, using the object detection layer, the probability that the area selected by the object frame in the current scene image belongs to various instances can be obtained, that is, the confidence of each object frame corresponding to various instances can be obtained. The instance with the highest confidence corresponding to each object frame can be used as the instance corresponding to the object frame.
[0058] S123: Process the feature map according to the detected object frame to obtain an attention mask map.
[0059] An attention mask may be obtained based on the at least one object box obtained in step S122.
[0060] In one implementation, a heat map corresponding to each object frame may be directly obtained according to the at least one object frame obtained in step S122 to obtain an attention mask.
[0061] In another implementation, a predetermined number of detected object frames can be selected from at least one object frame obtained in step S122, and the feature map can be processed according to the selected predetermined number of object frames. If the predetermined number is greater than the number of object frames detected, a heat map corresponding to each object frame is obtained according to the object frames detected, and the feature map corresponding to the excess number of object frames is set to zero to obtain an attention mask. If the predetermined number is less than the number of object frames detected, a predetermined number of object frames with the highest confidence are selected from the number of object frames detected. Specifically, a predetermined number of object frames can be selected in sequence according to the confidence of the object frame detection from large to small, so as to select a predetermined number of object frames with the highest confidence from the object frames detected. After selecting the predetermined number of object frames, a heat map corresponding to each object frame in the predetermined number of object frames can be obtained according to the selected predetermined number of object frames to obtain an attention mask.
[0062] It can be understood that the pixel values of the pixels on the heat map corresponding to the redundant number of object frames are all zero, that is, the feature maps corresponding to the redundant number of object frames are set to zero.
[0063] Optionally, corresponding to the detected object frame, a heat map corresponding to each object frame can be generated based on the position and size of each object frame. Specifically, a two-dimensional Gaussian kernel function with a mean of the coordinates of the center point of the object and a covariance matrix diagonal element of 1 / 4 of the width and height of the object can be used to obtain the pixel value of each pixel point on the heat map, that is, a two-dimensional Gaussian kernel function can be used to obtain the heat map corresponding to each object.
[0064] In one implementation, the heat maps corresponding to each object box can be directly connected to obtain an attention mask.
[0065] In another implementation, the pixel values on each heat map may be normalized to 0 to 1, and then all normalized heat maps may be directly connected to obtain an attention mask.
[0066] S124: Process the attention mask map and the feature map through the panoramic segmentation layer to obtain a segmentation result.
[0067] In one implementation, the feature map and the attention mask may be uniformly processed in terms of dimensional channels to obtain a feature map including the attention mask.
[0068] In another implementation, the feature maps of multiple resolutions extracted by the feature extraction layer can be aggregated at multiple scales to obtain an aggregated feature map, which is convenient for combining deep features and shallow features to obtain detail information and semantic information. Then, the aggregated feature map and the attention mask are uniformly processed in the dimensional channel to obtain a feature map including the attention mask.
[0069] Specifically, the output feature maps of all upsampling units in the decoding structure may be multi-scale aggregated to obtain an aggregated feature map. Specifically, the output feature maps of all upsampling units in the decoding structure may be converted into feature maps of the same resolution, and then these feature maps of the same resolution may be directly connected or added point by point to obtain an aggregated feature map. It is understood that the output feature maps of all upsampling units include feature maps output by the feature extraction layer.
[0070] After obtaining the feature map including the attention mask in the above manner, the feature map including the attention mask can be processed by the panoptic segmentation layer to obtain the segmentation result. Specifically, the probability that each pixel in the current scene image belongs to each instance and each semantic segmentation category can be determined based on the feature map including the attention mask, and then the category of each pixel in the current scene image can be determined based on the probability, so as to obtain the segmentation result by comprehensively analyzing the categories to which all pixels in the current scene image belong.
[0071] Among them, the panoramic segmentation layer can perform multi-step convolution operations on the feature map including the attention mask through multiple convolution layers to generate a feature map with a dimension of (50 + number of semantic segmentation categories). The width and height of the (50 + number of semantic segmentation categories) layer feature map are the same as the width and height of the current scene image, respectively. The pixel value of each pixel on each layer feature map is the probability that each pixel in the current scene image belongs to the instance or semantic segmentation category corresponding to the layer feature map.
[0072] The panoptic segmentation layer can determine the category to which each pixel in the current scene image belongs based on probability through the Argmax function. Specifically, the category with the highest probability corresponding to each pixel can be used as the category to which each pixel belongs.
[0073] In addition, because there may be a situation where an instance in the current scene image occludes the area corresponding to the semantic segmentation category, multiple current scene images can be segmented, and the segmentation results in multiple current scene images can be combined to obtain the final panoramic segmentation result. Specifically, the union of the areas of each semantic segmentation category in multiple current scene images can be used as the area corresponding to each semantic segmentation category to obtain the final segmentation result.
[0074] In the process of the panoramic segmentation network segmenting the current scene image, the feature extraction layer first extracts the feature map of the current scene image, and then the object detection layer can detect at least one object frame based on the feature map, and can confirm the attention mask based on at least one frame, and then the panoramic segmentation layer processes the attention mask and the feature map to obtain the segmentation result. In this way, the feature extraction layer can extract the feature map that can be used by both the object detection layer and the panoramic segmentation layer, realize parameter sharing, reduce the amount of calculation, and extract the attention mask input to the panoramic segmentation layer through the object detection layer, so that the panoramic segmentation layer can not only determine the semantic category to which each pixel in the current scene image belongs, but also distinguish the instance to which each pixel in the current scene image belongs. Semantic segmentation and instance segmentation can be achieved through the panoramic segmentation network of the present application without relying on two independent networks, reducing the amount of calculation.
[0075] The above-mentioned regional intrusion detection method is generally implemented by a regional intrusion detection device, so the present application also proposes a regional intrusion detection device. Figure 7 , Figure 7 The regional intrusion detection device 10 of the present application comprises a processor 12 and a memory 11; the memory 11 stores a computer program, and the processor 12 is used to execute the computer program to implement the steps in the regional intrusion detection method as described above.
[0076] The logical process of the above-mentioned regional intrusion detection method can be presented in a computer program. In terms of the computer program, if it is sold or used as an independent software product, it can be stored in a computer storage medium. Therefore, this application proposes a computer storage medium. Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer storage medium of the present application. In this embodiment, a computer storage medium 20 stores a computer program 21, and when the computer program is executed by a processor, the steps in the above-mentioned regional intrusion detection method are implemented.
[0077] The computer storage medium 20 may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., which can store computer programs, or may be a server storing the computer program, which can send the stored computer program to other devices for execution, or can also execute the stored computer program itself. From a physical entity point of view, the computer storage medium 20 may be a combination of multiple entities, such as multiple servers, a server plus a memory, or a memory plus a mobile hard disk, etc.
[0078] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A regional intrusion detection method, characterized in that: The regional intrusion detection method comprises: Get the current scene image; Determine a warning area integral map corresponding to the current scene image, wherein the value of each pixel point of the warning area integral map is proportional to the area occupied by the warning area in a rectangular frame formed by the corresponding pixel point and the fixed pixel point in the current scene image; Using the object detection model, obtaining a target object frame belonging to the target object in the current scene image; Calculate the overlapping area between the target object frame and the warning area according to the pixel values of the corresponding pixels in the warning area integral image at the vertices of the target object frame; Determining whether the target object invades the warning area based on the overlapping area; Wherein, the step of determining the warning area integral map corresponding to the current scene image comprises: dividing the current scene image into warning areas to determine the warning areas in the current scene image; The dividing the current scene image into warning areas includes: Segmenting the current scene image using a trained panoramic segmentation network to obtain a warning area, wherein the panoramic segmentation network includes a feature extraction layer, an object detection layer, and a panoramic segmentation layer; The step of segmenting the current scene image using the trained panoramic segmentation network includes: Extracting a feature map of the current scene image through the feature extraction layer; Performing object frame detection on the feature map by the object detection layer to obtain at least one object frame; Processing the feature map according to the detected object frame to obtain an attention mask map; The attention mask map and the feature map are processed by the panoramic segmentation layer to obtain a segmentation result.
2. The regional intrusion detection method according to claim 1, characterized in that: The step of determining the warning area integral image corresponding to the current scene image includes: Assigning a fixed value other than 0 to the pixel points in the warning area, and assigning a fixed value other than 0 to the pixel points in the area other than the warning area in the current scene image, to obtain an area division map; The sum of all pixel values in the rectangular frame formed by each pixel point and the fixed pixel point in the area division map is used as the value of the corresponding pixel point in the warning area integral map.
3. The regional intrusion detection method according to claim 1, characterized in that: The processing of the attention mask map and the feature map by the panoptic segmentation layer includes: Performing unified dimension channel processing on the attention mask map and the feature map; The feature map including the attention mask map is processed by the panoptic segmentation layer.
4. The regional intrusion detection method according to claim 3, characterized in that: The feature extraction layer includes at least two downsampling units, a first convolutional layer connected to the at least two downsampling units, at least two inter-layer jump connection layers and at least two upsampling units connected to the first convolutional layer, and the inter-layer jump connection layer is used to perform inter-layer jump connection between the feature map obtained by the downsampling unit and the feature map obtained by the corresponding upsampling unit.
5. The regional intrusion detection method according to claim 4, characterized in that: The unified processing of the dimension channels of the attention mask map and the feature map includes: Performing a multi-scale aggregation operation on the feature maps output by all upsampling units to obtain an aggregated feature map, wherein the feature maps output by all upsampling units include the feature map; The aggregated feature map and the attention mask map are uniformly processed in terms of dimensional channels.
6. The regional intrusion detection method according to claim 1, characterized in that: The processing of the feature map according to the detected object frame includes: A predetermined number of detected object frames are selected, and the feature map is processed according to the selected predetermined number of object frames.
7. The regional intrusion detection method according to claim 6, characterized in that: The selecting a predetermined number of detected object frames, and processing the feature map according to the selected predetermined number of object frames, comprises: If the predetermined number is greater than the number of object frames obtained by detection, the feature map corresponding to the excess number of object frames is reset to zero.
8. The regional intrusion detection method according to claim 6, characterized in that: The selecting a predetermined number of detected object frames comprises: The predetermined number of object frames are selected in sequence according to the order of confidence of the object frame detection from large to small.
9. The regional intrusion detection method according to claim 1, characterized in that: The step of processing the feature map according to the detected object frame to obtain an attention mask map includes: The feature map is processed by taking the center point coordinates of the detected object frame as the mean and one quarter of the width and height as the diagonal elements of the covariance matrix as a two-dimensional Gaussian kernel function to obtain a thermal mask map; The thermal mask image is normalized to obtain an attention mask image.
10. A regional intrusion detection device, characterized in that: The area intrusion detection device includes a memory and a processor; the memory stores a computer program, and the processor is used to execute the computer program to implement the steps of the area intrusion detection method as described in any one of claims 1-9.
11. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in any one of the methods of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Motion detection method and device
CN103700087A
Analysis Method of Security Video Surveillance
CN109257569A
