Target intrusion detection method and system, program product and equipment
By performing object detection and calibration of target size data on the image of the monitoring area, the existing target has problems such as sensor false alarms and limited accuracy, and achieving higher accuracy and larger range of target intrusion detection.
Patent Information
- Application Number
- CN202510284886.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-27
AI Technical Summary
The existing targets have sensors, such as millimeter-wave radars, which have problems such as false alarms, limited perception accuracy, large interference from environmental factors, inability to identify object types and limited perception range.
By acquiring the current image of the monitoring area, target detection is performed on the image, target detection data is obtained, the position and category of the monitoring target is determined, and target intrusion detection is performed based on the calibration target size data, reducing false positives and improving perception accuracy.
It effectively reduces false positives for target existence detection, improves perception accuracy, can identify object categories, and monitors a larger area range.
Smart Images

Figure CN120220054A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and particularly to a target intrusion detection method, a target intrusion detection method system, a target intrusion detection device, and a computer program product. Background Art
[0002] With the development of technology, smart homes have gradually entered thousands of households. The establishment of the overall smart home ecosystem relies on a variety of different sensors. Among them, target presence sensors play an important role. Currently, target presence sensors are divided into two categories: low-precision sensors and high-precision sensors. Low-precision sensors can only sense the presence of a target and cannot sense the exact location. In contrast, high-precision sensors can not only sense the specific location but also track multiple targets simultaneously. In the prior art, millimeter-wave radar is generally used as a solution for high-precision sensors. The applicant found that there are obvious disadvantages in using millimeter-wave radar to sense the presence of a target during the research and development process, and the problems are as follows: frequent false alarms, limited sensing accuracy; environmental factors will cause disturbances, such as air conditioner outlets and curtain airflows, which will affect the sensing accuracy; it is impossible to identify the object category, and the movement of pets is likely to trigger false alarms; the sensing result is limited, and the solutions in the prior art can only sense a stationary human body about 4 meters away. Summary of the Invention
[0003] In order to solve the existing technical problems, the present invention provides a target intrusion detection method, a target intrusion detection method system, a target intrusion detection device, a monitoring device, and a computer program product, which reduce false alarms in target presence detection and improve sensing accuracy.
[0004] In a first aspect, a target intrusion detection method is provided, including: obtaining a current image of monitoring a monitoring area; performing target detection on the current image to obtain target detection data, and obtaining a first detection result based on the target detection data; in the case where the first detection result indicates that there is a monitoring target in the current image, determining a sub-region in the monitoring area where the monitoring target is located, and obtaining calibrated target size data of the monitoring target in the sub-region; and determining a target intrusion detection result in the monitoring area based on the calibrated target size data of the monitoring target.
[0005] In a second aspect, a computer program product is provided, including a computer program, which when executed by a processor, implements the target intrusion detection method as described in any item of the first aspect of the present application.
[0006] In a third aspect, a target intrusion detection system is provided, including: the target intrusion detection device as described in the second aspect and a terminal device, where the terminal device is used to assist in calibrating the calibrated target size data of the monitoring target in each sub-region of the monitoring area.
[0007] In a fourth aspect, a target intrusion detection device is provided, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the target intrusion detection method as described in any one of the first aspects of this application.
[0008] This application obtains the current image of the monitored area; performs target detection on the current image to obtain target detection data, and based on the target detection data, obtains a first detection result. By collecting images within the monitored area, interference from environmental factors to target intrusion detection can be reduced. At the same time, the image collection method can monitor a larger area range, and target detection can also output the category of the target. For moving objects, accurate detection can also be performed. In the case where the first detection result preliminarily determines that there is a monitored target in the current image, the sub-region where the monitored target is located is determined, and the calibrated target size data of the monitored target within the sub-region is obtained; based on the calibrated target size data of the monitored target within the sub-region, the monitored target in the first detection result is determined again to determine whether the monitored target in the first detection result is a target intrusion within the monitored area, and finally the target intrusion detection result within the monitored area is determined, thereby reducing false alarms in target presence detection and improving perception accuracy. Description of the Drawings
[0009] Figure 1 It is an application environment diagram of the target intrusion detection method in an embodiment;
[0010] Figure 2 It is a schematic diagram of the target intrusion detection device in an embodiment;
[0011] Figure 3 It is a flowchart of the target intrusion detection method in an embodiment;
[0012] Figure 4 It is a schematic diagram of the calibration of the target size in an embodiment;
[0013] Figure 5 It is a schematic diagram of the original image and the super-resolution image in an embodiment;
[0014] Figure 6 It is a schematic diagram of the process of determining the first detection result based on the connected region contour and the reference target size data in an embodiment;
[0015] Figure 7 It is a schematic diagram of adaptive threshold segmentation in an embodiment;
[0016] Figure 8 It is a schematic diagram of the target intrusion detection device in an embodiment;
[0017] Figure 9 It is a schematic diagram of a target intrusion detection device in an embodiment. Specific implementation manners
[0018] The technical solution of the present invention will be further elaborated in detail below in conjunction with the accompanying drawings of the specification and specific embodiments.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the specification of this invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the protection scope of this invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0020] In the following description, the expression "some embodiments" is mentioned, which describes a subset of all possible embodiments. However, it should be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0021] Refer to Figure 1 , which is an application environment diagram of a target intrusion detection method in an embodiment. This application environment diagram includes a target intrusion detection device 10. The target intrusion detection method is applied to the target intrusion detection device 10. The target intrusion detection device 10 includes a memory 14, a processor 13, and an image acquisition device 15. The memory 14 stores a computer program. When the computer program is executed by the processor, the processor 13 executes the steps of the target intrusion detection method provided in any embodiment of this application. The image acquisition device 15 acquires images in the monitoring area, and the processor 13 processes the images to detect whether there is a monitoring target intrusion in the monitoring area. The monitoring target is a target under one category or multiple categories, and the monitoring target includes, but is not limited to, targets under categories such as people, animals, etc. For example, when the target intrusion detection device 10 is used to sense the scene of the presence of a human body in the monitoring area, the target intrusion detection device 10 can sense whether there is a human body in the monitoring area. Therefore, the target intrusion detection device 10 can be a human sensor or a human presence sensor that can implement the target intrusion detection method provided in any embodiment of this application. The target intrusion detection device 10 can be an integrated device. The memory 14 and the processor 13 are integrated in the target intrusion detection device 10. Through the target intrusion detection device 10, the target intrusion detection method provided in any embodiment of this application can be directly implemented. The target intrusion detection device 10 is also installed in other devices. As Figure 2 shown, it is a schematic diagram of a target intrusion detection device in an embodiment. The target intrusion detection device is a camera device. The image acquisition device 15 uses a 256*192 infrared detector. The target intrusion detection device is interconnected with the app program on the terminal device through wifi.
[0022] The image acquisition device 15 can be a combination of one or more sensor modules 12. The image acquisition device can be a monocular vision sensor or a multiocular vision sensor. For example, it can be a combination of one or more sensors such as a thermal imaging sensor, a visible light image sensor, a millimeter wave sensor, a lidar sensor, an infrared thermal imaging sensor, and a depth sensor.
[0023] A human motion sensor, also known as a motion sensor, mainly triggers relevant response mechanisms by detecting the movement of the human body. Such sensors can only sense changes in the environment. A human presence sensor, on the other hand, can sense the presence of a human body. Such sensors can not only detect movement but also sense a stationary human body.
[0024] Currently, human presence sensors are divided into two categories: low-precision human-in sensors and high-precision human-in sensors. Low-precision human-in sensors can only sense the presence of a human body and cannot sense the exact position. In contrast, high-precision human-in sensors can not only sense the specific position but also track multiple targets simultaneously. In the market, millimeter wave radar is generally used as a solution for high-precision human-in sensors. During the R & D process, the applicant found that there are obvious disadvantages in the millimeter wave radar for sensing the presence of a target, and the problems are as follows: frequent false alarms, limited sensing accuracy; environmental factors will cause disturbances, such as the air outlet of the air conditioner and the air flow of the curtain, which will affect the sensing accuracy; it is impossible to identify the object category, and the movement of pets is likely to trigger false alarms; the sensing result is limited, and the existing solutions in the prior art can only sense a stationary human body about 4 meters away.
[0025] Please refer to Figure 3 , which is a flowchart of a target intrusion detection method provided by an embodiment of the present application. The target intrusion detection method is applied to a target intrusion detection device. The target intrusion detection method includes the following steps:
[0026] S11. Obtain the current image of the monitored area.
[0027] In this embodiment, the monitored area indicates the area range that can be covered by the shooting field of view of the image acquisition device 15 in the target intrusion detection device 10. This area range is all or part of the environmental space where the target intrusion detection device 10 is installed. For example, the monitored area is a room area. Compared with the method of sensing a target based on a millimeter wave radar sensor in the prior art, processing the image collected by the image acquisition device 15 can have a wider shooting range and a larger monitored area. Moreover, by collecting images, the disturbances caused by environmental factors, such as the air outlet of the air conditioner and the air flow of the curtain, can be reduced.
[0028] The current image can be the original image captured by the image acquisition device 15, or the image after preprocessing the original image. The preprocessing operations include but are not limited to any one of the following: preprocessing includes but is not limited to denoising, enhancing contrast, adjusting brightness, histogram equalization, edge sharpening, and obtaining a super-resolution image based on the original image and a pre-trained super-resolution image processing model. The current image is one frame or multiple frames of images.
[0029] In this embodiment, the current image can be an infrared image, or an infrared image and a visible light image. The current image can be the current frame image, or a continuous frame image. By processing in the real-time frame image, the subsequent real-time performance and the timeliness of detection can be ensured. Traditional visible light cameras can capture the light visible to the human eye, thus providing rich visual information. However, traditional visible light cameras have some significant deficiencies. They are very sensitive to lighting conditions, and their performance drops significantly in strong light, backlight, or low light environments, and it is easy to have blurred or distorted images, affecting the reliability of the system; in bad weather such as rain and haze, the effect of visible light cameras will also be significantly reduced, and accurate environmental perception cannot be provided. However, infrared cameras are not limited by visible light conditions and can effectively penetrate obstacles such as rain and haze, ensuring normal operation in bad weather. Therefore, infrared image sensors can work in the full spectral range, especially in low light or night environments, and can still provide clear images. This makes infrared image sensors have higher accuracy and reliability in identifying vehicles, pedestrians, animals, and other obstacles. By collecting infrared images, the temperature information of the target can be captured, so as to achieve precise positioning. Since the temperature information is quite different when the monitored target categories are different, for example, there are differences between human body temperature and animal temperature information. When the target intrusion detection device 10 is used to detect people, the pixel values of the pixel points in the infrared image can be used to accurately identify the human target.
[0030] S12. Perform target detection on the current image to obtain target detection data, and based on the target detection data, obtain a first detection result.
[0031] In an optional implementation manner, input data of a pre-trained target detection model is formed based on the current image, feature maps are extracted from the input data by the target detection model, and based on the extracted feature maps, target detection data is output. The target detection data includes but is not limited to at least one of the following: the position data of the target in the current image, the target category, and the confidence of the target. The position data includes but is not limited to the position data of the target box, the boundary coordinates of the target box, etc. The target is divided into at least one of the following according to different categories: people, animals, etc. The confidence of the target represents the confidence score of the target detection model for each target, reflecting the reliability of recognition. The boundary coordinates indicate the position of the target box of the target in the current image.
[0032] The object detection model is obtained based on a training data set. Each training sample in the training data set includes a training image and corresponding label data in the training image. The label data includes the position data of the sample object and the category of the sample object. The sample object includes a person, an animal, etc. For example, the object detection model can be a network structure model of the YOLO (You Only Look Once) algorithm series.
[0033] The first detection result is used to preliminarily determine whether there is a monitored object in the current image based on the object detection data. For example, it is preliminarily determined whether there is a human body in the monitored area. Since the monitored object is an object under the monitored object category, for example, the monitored object is a human body or an animal under the animal category, etc. Compared with the method of sensing objects based on millimeter-wave radar sensors in the prior art, the embodiment of the present application can accurately detect the category of the object. The monitored object can be one or more. When there are multiple monitored objects, multiple monitored objects in the current image can be monitored simultaneously, thereby improving the application range of the perceived environment. By collecting images in the monitored area, the interference of environmental factors on the detection of target intrusion can be reduced.
[0034] S13. When the first detection result indicates that there is a monitored object in the current image, determine the sub-region where the monitored object is located, and obtain the calibrated target size data of the monitored object in the sub-region.
[0035] In this embodiment, when it is preliminarily determined that there is a monitoring target in the current image according to the first detection result, it is necessary to further obtain the sub-region where the monitoring target is located and the calibrated target size data of the monitoring target in the sub-region. The sub-region is a part of the monitoring region. Multiple sub-regions can be customized in the monitoring region, and the target size data can be calibrated in each sub-region. Since the installation position of the target detection intrusion device 10 is fixed, some sub-regions in the monitoring region are far from the installation position, and some sub-regions are close to the installation position. For the same type of monitoring target, when the monitoring target is located in different sub-regions, the size data of the monitoring target in the captured image is different. Therefore, in order to improve the accuracy of target intrusion detection, it is necessary to calibrate the target size data of the same type of monitoring target in each sub-region, so as to obtain the calibrated target size data of the same type of monitoring target in each sub-region. The calibrated size data of the monitoring target under each monitoring target category in each sub-region is pre-stored in the memory. For example, there are three sub-regions, sub-region A, sub-region B, and sub-region C, and the monitoring target category is the human body. Then, it is pre-calibrated in sub-region A to obtain the calibrated size data of the human body in sub-region A, pre-calibrated in sub-region B to obtain the calibrated size data of the human body in sub-region B, and pre-calibrated in sub-region C to obtain the calibrated size data of the human body in sub-region C. In the same sub-region, different monitoring target categories correspond to different calibrated size data. Since the categories are different, the sizes of the monitoring targets under the categories are different, and separate calibration is required.
[0036] As Figure 4 shown, Figure 4 FIG. is a schematic diagram of the calibration of the target size in an embodiment; a room area is the monitoring area, the red sub-region is the customized laundry area, and the yellow sub-region is the customized sofa area, that is, two sub-regions are customized in the monitoring area.
[0037] After the configuration of each sub-region is completed, each sub-region has corresponding region coordinate data in the image coordinate system. For example, the position data of each sub-region is represented by the region boundary coordinates. Therefore, the position data of the target box of the monitoring target can be obtained from the target detection data, and the position data of the target box of the monitoring target is compared with the pre-stored region coordinate data of each sub-region to find the sub-region that contains the most of the target boxes as the sub-region where the monitoring target is located. For example, if the target box overlaps with two sub-regions, and the overlapping area of the target box with the first sub-region is more than the overlapping area of the target box with the second sub-region, it is considered that the target box is located in the first sub-region.
[0038] S14. Based on the calibrated target size data of the monitoring target, determine the target intrusion detection result in the monitoring area.
[0039] In this embodiment, after obtaining the calibrated target size data of the monitored target, based on the calibrated target size data of the monitored target, the size data of the monitored target determined in the first detection result is determined again to judge whether the size data of the monitored target determined in the first detection result conforms to the calibrated target size data of the monitored target, so as to exclude false alarms.
[0040] In this embodiment, the monitored target may be multiple targets under one category or multiple targets under multiple categories. For each monitored target in the first detection result, performing the above steps S13 and S14 can achieve the target intrusion detection result of the monitored target in the monitoring area. When there are multiple monitored targets in the first detection result, the above S13 and S14 can be executed simultaneously to judge whether the monitored target is a target intrusion in the monitoring area.
[0041] In the above embodiment, the current image of the monitored area is obtained; target detection is performed on the current image to obtain target detection data, and based on the target detection data, a first detection result is obtained. By collecting images in the monitored area, the interference of environmental factors on target intrusion detection can be reduced. At the same time, the image collection method can monitor a larger area range, and target detection can also output the category of the target. For moving objects, accurate detection can also be performed. In the case where the first detection result preliminarily determines that there is a monitored target in the current image, the sub-region where the monitored target is located is determined, and the calibrated target size data of the monitored target in the sub-region is obtained; based on the calibrated target size data of the monitored target in the sub-region, the monitored target in the first detection result is determined again to judge whether the monitored target in the first detection result is a target intrusion in the monitoring area, and finally the target intrusion detection result in the monitoring area is determined, so as to reduce false alarms in target presence detection and improve the perception accuracy.
[0042] In some embodiments, the obtaining of the current image of the monitored area includes:
[0043] Obtaining the original image collected from the monitored area;
[0044] Based on the original image, the input data of a pre-trained super-resolution image processing model is formed, and a super-resolution image is output through the super-resolution image processing model, and the super-resolution image is used as the current image, where the super-resolution image processing model is trained based on a training data set, and each training sample in the training data set includes a sample image and a super-resolution label image corresponding to the sample image.
[0045] In this embodiment, the original image is the image captured by the image acquisition device 15. After preprocessing the original image, it can be input into a pre-trained super-resolution image processing model. The preprocessing operations include, but are not limited to: denoising, enhancing contrast, adjusting brightness, histogram equalization, and edge sharpening. The target detection model is obtained based on a training sample set, and each training sample in the training sample set includes a sample image and a corresponding super-resolution label image in the sample image. Based on the training sample set and using a training iteration method to train the super-resolution image processing model, a pre-trained super-resolution image processing model is obtained. For example, the super-resolution image processing model can be the real-esrgan model. As Figure 5 shown, Figure 5 FIG. is a schematic diagram of the original image and the super-resolution image in an embodiment. By comparing the super-resolution image with the original image, it can be seen that the details of the super-resolution image are clearer and the image is sharper.
[0046] In the above embodiment, by processing the original image with a pre-trained super-resolution image processing model, a super-resolution high-definition image can be obtained, making the detailed features more obvious and facilitating the improvement of the accuracy of subsequent target intrusion detection.
[0047] In some embodiments, as Figure 6 shown, Figure 6 FIG. is a schematic flowchart of determining the first detection result based on the connected region contour and the reference target size data in an embodiment, including:
[0048] S61. When the target detection data indicates the existence of a monitored target category, obtain the initial monitored target belonging to the monitored target category from the target detection data and obtain the pixel values of the pixel points in the target box of the initial monitored target from the current image.
[0049] In this embodiment, the monitored target category indicates the category to be monitored in the monitoring area, such as the human category or the animal category. The target detection data includes the position data and the target category of the target. The position data of the target includes the position coordinates of the target box. According to the target category in the target detection data, it can be judged whether there is a monitored target category in the target detection data. When there is a monitored target category in the target detection data, obtain the target under the monitored target category from the target detection data as the initial monitored target. Whether the initial monitored target is a target under the real monitored category still needs to be further determined later. After obtaining the initial monitored target, the position coordinates of the target box of the initial monitored target can be obtained from the target detection data, and the image area corresponding to the target box can be obtained from the current image. For example, as Figure 7 shown, Figure 7It is a schematic diagram of adaptive threshold segmentation in an embodiment. The monitoring target is the human category. After obtaining the target box of the human body from the target detection data, the human body image area can be obtained, and thus the pixel values of the pixel points in the obtained human body box.
[0050] S62. Extract the connected region contour based on the pixel values of the pixel points in the target box of the initial monitoring target.
[0051] Optionally, the extracting the connected region contour based on the pixel values of the pixel points in the target box of the initial monitoring target includes:
[0052] Since the temperature information of each target category is different and the pixel values of the pixel points indicate the temperature information, based on the pixel values of the pixel points in the target box of the initial monitoring target, perform binary segmentation on the current image to obtain a binary image. In the binary image, the binary region of the monitoring target can be obtained, and by extracting the edge features of the binary region, the connected region contour can be obtained.
[0053] In this embodiment, first perform binary segmentation on the current image based on the pixel values of the pixel points in the target box of the initial monitoring target.
[0054] Optionally, the performing binary segmentation on the current image based on the pixel values of the pixel points in the target box of the initial monitoring target to obtain a binary image includes:
[0055] Calculate the pixel mean value of the pixel points in the target box of the initial monitoring target;
[0056] Based on the pixel mean value, obtain a binary threshold, and based on the binary threshold, perform binary segmentation on the current image to obtain the binary image.
[0057] In this embodiment, based on the pixel values of the pixel points in the target box of the initial monitoring target, a binary threshold can be calculated, thereby performing adaptive threshold segmentation on the current image. Since the body temperatures of different monitoring target categories are different, when the current image includes an infrared image, the binary threshold can be calculated according to the pixel values indicating the temperature information of the initial monitoring target, and the current image can be segmented again to filter out the targets of non-monitoring target categories. As Figure 7 shown, the monitoring target category is the human category, the monitoring target is a human, extract the pixel values of the pixel points in the human body box, calculate the segmentation mean value, that is, calculate the binary threshold. Since the human body temperature information is different from the temperature information of animals and the pixel values of the pixel points indicate the temperature information, therefore, calculating the human pixel mean value as the binary threshold for adaptive threshold segmentation can obtain the human connected region, and the contours of other categories can be filtered out to a certain extent through binary segmentation. As Figure 7As shown, after binarization, two connected region contours are obtained.
[0058] S63. Obtain the reference target size data.
[0059] In this embodiment, the reference target size data may be the calibrated target size data of the monitoring target in the sub-region, or may be the preset target size data. The reference target size data includes, but is not limited to, width data, length data, area data, etc.
[0060] S64. Determine the first detection result based on the connected region contour and the reference target size data.
[0061] Optionally, the determining the first detection result based on the connected region contour and the reference target size data includes:
[0062] When there is a target connected region contour that meets the reference size condition in the connected region contour, it is determined that the first detection result indicates that the monitoring target exists in the current image, where the reference size condition is determined according to the reference target size data;
[0063] When there is no target connected region contour that meets the reference size condition in the connected region contour, it is determined that the first detection result indicates that the monitoring target does not exist in the current image.
[0064] In this embodiment, the reference size condition represents the size range indicated by the reference target size data. The reference size condition includes, but is not limited to, at least one of the following: the proportional floating range corresponding to the ratio of length to width in the reference target size data, the length floating range corresponding to the length in the reference target size data, the width floating range corresponding to the width in the reference target size data, the area floating range corresponding to the area in the reference target size data, etc. The size data of the target connected region contour is the connected region contour that meets the reference size condition.
[0065] In the above embodiment, after performing target detection on the current image to obtain the target detection data, then based on the pixel values of the pixel points in the target box of the initial monitoring target in the target detection data, an adaptive segmentation threshold is obtained, and the current image is segmented to obtain multiple connected region contours, and the first detection result is obtained by judging through the size data of the connected region contours; combining the target detection data with the binarized contour to judge whether the monitoring target exists in the current image can improve the accuracy of subsequent target intrusion detection.
[0066] In some embodiments, obtaining the calibrated target size data of the monitoring target in the sub-region includes:
[0067] Obtain the monitoring image of the monitored area, and send the monitoring image to the terminal device communicating with the target intrusion detection device so that the terminal device calibrates the sub-area in the monitoring image;
[0068] Obtain the calibration start information sent by the terminal device and obtain the configured sub-area data;
[0069] When it is determined that the calibration target is within the sub-area, take a picture of the monitored area to obtain a calibration image;
[0070] Identify the calibration target from the calibration image, and determine the calibration target size data of the calibration target, and use the calibration target size data of the calibration target as the calibration target size data of the monitoring target within the sub-area.
[0071] In this embodiment, the monitoring image is an image taken of the monitored area. When the terminal device receives the monitoring image, the monitoring image can be displayed through the user interface on the terminal device. The user can trigger the mode control displayed on the user interface to select the calibration mode, and then the terminal device generates calibration start information based on the trigger operation of the selected calibration mode, so that the target intrusion detection device can know that the user of the terminal device is ready to start calibrating the calibration target size data of the monitoring target category within the sub-area. The user customizes the sub-area on the monitoring image. For example, draw a frame on the monitoring image and enter a sub-area identifier, where the sub-area identifier uniquely identifies the sub-area, and the sub-area identifier can be a number, a name, etc. When the user customizes and draws a frame of a sub-area on the monitoring image, the area coordinate data of the sub-area can be determined, and the area coordinate data includes the boundary coordinates of the area frame, etc. The sub-area data includes the area coordinate data of each sub-area. After the user completes the configuration of the sub-area on the monitoring image, the terminal device sends the obtained sub-area data to the target intrusion detection device.
[0072] In one implementation, the method for determining that the calibration target is within the sub-area can be: after the calibration target moves to the sub-area to be calibrated, the user can send a confirmation message through the terminal device so that the target intrusion detection device knows that the calibration target is already within the sub-area to be calibrated. The calibration target is a target of the same category as the monitoring target. For example, if the monitoring target category is a human body, the calibration target is a person.
[0073] After the calibration target is located within the sub-region to be calibrated, the monitoring region is photographed again to obtain a calibration image, and the image of the calibration target is in the sub-region to be calibrated in the calibration image. Perform object detection on the sub-region to be calibrated in the calibration image. As described in the above embodiments, detection can be performed through an object detection model, so as to obtain the calibration target size data of the calibration target in the sub-region to be calibrated in the calibration image. The calibration target size data includes but is not limited to: the size data of the target box, the boundary coordinate data of the target box, and so on. According to the above method, the calibration target size data of the calibration target in each customized sub-region can be obtained.
[0074] In the above embodiments, the monitoring region is customized into multiple different sub-regions, and the target size of the monitoring target category is calibrated in each sub-region, so that for the same monitoring target category, different sub-regions at different distances from the target intrusion detection device correspond to different calibration target size data. Therefore, when determining whether a monitoring target has intruded subsequently, it is possible to determine again whether the monitoring target truly belongs to the monitoring target category according to the calibration target size data corresponding to the sub-region where the monitoring target is located, thereby improving the accuracy of target intrusion detection.
[0075] In some embodiments, determining the target intrusion detection result in the monitoring region based on the calibration target size data of the monitoring target in the sub-region includes:
[0076] Obtain the target box of the monitoring target from the first detection result, and determine a second detection result based on the overlapping state between the target box and the sub-region;
[0077] When the second detection result indicates that there is a monitoring target intrusion in the sub-region, compare the size data of the target box with the calibration target size data of the monitoring target to determine a third detection result, and use the third detection result as the target intrusion detection result.
[0078] Optionally, the determining the second detection result based on the overlapping state between the target box and the sub-region includes at least one of the following:
[0079] When the ratio of the overlapping part between the target box and the sub-region to the target box is greater than a preset ratio, and / or the center of the target box is located in the sub-region, determine that the second detection result indicates that there is a monitoring target intrusion in the sub-region. For example, the preset ratio is greater than 50%.
[0080] The comparing the size data of the target box with the calibration target size data of the monitoring target to determine a third detection result includes:
[0081] Compare the size data of the target box with the calibrated target size data of the monitored target. When the size data of the target box meets the preset conditions, determine that the third detection result indicates that there is an intrusion of a monitored target in the sub-region, where the preset conditions include at least one of the following: the height of the target box is within the height range indicated by the calibrated target size data of the monitored target, the width of the target box is within the width range indicated by the calibrated target size data of the monitored target, and the area of the target box is within the area range indicated by the calibrated target size data of the monitored target.
[0082] In this embodiment, after determining the second detection result based on the overlapping state between the target box and the sub-region, when the second detection result indicates that there is an intrusion of a monitored target in the sub-region, in order to reduce false positives, the calibrated target size data of the monitored target in the sub-region is used again to compare with the size data of the target box to determine the third detection result. Only when the third detection result indicates an intrusion of a monitored target will it be determined that there is a target intrusion. The height range is a preset height percentage floating up and down from the height indicated by the calibrated target size data. For example, if the height in the calibrated target size data is 1 meter and the preset height percentage is 10%. The width range is a preset width percentage floating up and down from the width indicated by the calibrated target size data. The area range is a preset area percentage floating up and down from the area indicated by the calibrated target size data. For example, the preset width percentage is within 20% and the preset area percentage is within 30%.
[0083] Since the installation position of the target detection intrusion device 10 is fixed, some sub-regions in the monitored area are far from the installation position and some are close to the installation position. That is, for the same type of target, the corresponding depth of field in different sub-regions is different, and for the same type of monitored target, the corresponding calibrated target size data in different sub-regions is also different. Therefore, for the same type of monitored target, using different calibrated target size data in different sub-regions can reduce the influence of the depth of field on the target size, thereby reducing false positives.
[0084] In the above embodiment, when the first detection result indicates that there is a monitored target in the current image, after determining the second detection result based on the overlapping state between the target box and the sub-region, when the second detection result indicates that there is an intrusion of a monitored target in the sub-region, in order to reduce false positives, the calibrated target size data of the monitored target in the sub-region where the monitored target is located is used again to compare with the size data of the target box to determine the third detection result. Only when the third detection result indicates an intrusion of a monitored target will it be determined that there is a target intrusion, improving the accuracy of target intrusion detection. Using different calibrated target size data in different sub-regions can reduce the influence of the depth of field on the target size, thereby reducing false positives.
[0085] In some embodiments, the method further includes at least one of the following:
[0086] When it is detected multiple times within a preset time period that the target intrusion detection result indicates that a monitored target has intruded, continuously upload a monitored target presence signal;
[0087] When it is detected in a preset continuous sequence of frame images that the target intrusion detection result indicates that a monitored target has intruded, continuously upload a monitored target presence signal;
[0088] When it is not detected multiple times within a preset time period that the target intrusion detection result indicates that a monitored target has intruded, stop uploading a monitored target presence signal;
[0089] When it is not continuously detected in a preset continuous sequence of frame images that the target intrusion detection result indicates that a monitored target has intruded, stop uploading a monitored target presence signal.
[0090] In this embodiment, the target intrusion detection device can be connected to other devices, and the other devices include but are not limited to terminal devices, servers, etc. When a target intrusion is detected, a monitored target presence signal is uploaded to other devices to timely alert the user.
[0091] In the above embodiment, when a target intrusion is detected, a monitored target presence signal is uploaded to other devices to timely alert the user and improve the timely warning of target intrusion.
[0092] On the other hand, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the target intrusion detection method described in any embodiment of the present application.
[0093] Among them, in the computer program product, an optional implementation form of the program module architecture of the computer program for implementing each step of the target intrusion detection method can be a target intrusion detection device.
[0094] Please refer to Figure 8 , an embodiment of the present application provides a target intrusion detection device, including: an acquisition module 81, configured to acquire a current image of monitoring a monitoring area; a detection module 82, configured to perform target detection on the current image to obtain target detection data, and based on the target detection data, obtain a first detection result; the acquisition module 81 is further configured to, when the first detection result indicates that there is a monitored target in the current image, determine a sub-region in the monitoring area where the monitored target is located, and acquire calibrated target size data of the monitored target in the sub-region; the detection module 82 is further configured to determine a target intrusion detection result in the monitoring area based on the calibrated target size data of the monitored target.
[0095] Optionally, the obtaining module 81 is further configured to:
[0096] Obtain the original image collected for the monitored area;
[0097] Based on the original image, form the input data of a pre-trained super-resolution image processing model, and output a super-resolution image through the super-resolution image processing model, and use the super-resolution image as the current image, where the super-resolution image processing model is obtained by training based on a training data set, and each training sample in the training data set includes a sample image and a super-resolution label image corresponding to the sample image.
[0098] Optionally, the detection module 82 is further configured to:
[0099] When the target detection data indicates the existence of a monitored target category, obtain the initial monitored target belonging to the monitored target category from the target detection data and obtain the pixel values of the pixel points in the target box of the initial monitored target from the current image;
[0100] Extract the connected region contour based on the pixel values of the pixel points in the target box of the initial monitored target;
[0101] Obtain the reference target size data;
[0102] Determine a first detection result based on the connected region contour and the reference target size data.
[0103] Optionally, the detection module 82 is further configured to:
[0104] When there is a target connected region contour that meets the reference size condition in the connected region contour, determine that the first detection result indicates the existence of the monitored target in the current image, where the reference size condition is determined according to the reference target size data;
[0105] When there is no target connected region contour that meets the reference size condition in the connected region contour, determine that the first detection result indicates the non-existence of the monitored target in the current image.
[0106] Optionally, the detection module 82 is further configured to:
[0107] Perform binary segmentation on the current image based on the pixel values of the pixel points in the target box of the initial monitored target to obtain a binary image, and extract the connected region contour from the binary image.
[0108] Optionally, the detection module 82 is further configured to:
[0109] Calculate the pixel mean value of the pixel points in the target box of the initial monitored target;
[0110] Based on the pixel mean, obtain a binarization threshold, and based on the binarization threshold, perform binarization segmentation on the current image to obtain the binarized image.
[0111] Optionally, the acquisition module 81 is further configured to:
[0112] Acquire a monitoring image of the monitoring area, and send the monitoring image to a terminal device communicating with the target intrusion detection device so that the terminal device calibrates the sub-region in the monitoring image;
[0113] Acquire the calibration start information sent by the terminal device and obtain the configured sub-region data;
[0114] When it is determined that the calibration target is within the sub-region, photograph the monitoring area to obtain a calibration image;
[0115] Identify the calibration target from the calibration image, and determine the calibration target size data of the calibration target, and use the calibration target size data of the calibration target as the calibration target size data of the monitoring target within the sub-region.
[0116] Optionally, the detection module 82 is further configured to:
[0117] Obtain the target box of the monitoring target from the first detection result, and determine a second detection result based on the overlapping state between the target box and the sub-region;
[0118] In the case where the second detection result indicates that there is a monitoring target intrusion in the sub-region, compare the size data of the target box with the calibration target size data of the monitoring target to determine a third detection result, and use the third detection result as the target intrusion detection result.
[0119] Optionally, the detection module 82 is further configured to:
[0120] When the ratio of the overlapping part between the target box and the sub-region to the target box is greater than a preset ratio, and / or the center of the target box is within the sub-region, determine that the second detection result indicates that there is a monitoring target intrusion in the sub-region.
[0121] Optionally, the detection module 82 is further configured to:
[0122] Compare the size data of the target box with the calibrated target size data of the monitoring target. When the size data of the target box meets the preset conditions, determine that the third detection result indicates that there is a monitoring target intrusion in the sub-region, where the preset conditions include at least one of the following: the height of the target box is within the height range indicated by the calibrated target size data of the monitoring target, the width of the target box is within the width range indicated by the calibrated target size data of the monitoring target, and the area of the target box is within the area range indicated by the calibrated target size data of the monitoring target.
[0123] Optionally, the detection module 82 is further configured to:
[0124] When it is detected multiple times within a preset time period that the target intrusion detection result indicates that there is a monitoring target intrusion, continuously upload a monitoring target presence signal;
[0125] When it is detected in a preset number of consecutive frame images that the target intrusion detection result indicates that there is a monitoring target intrusion, continuously upload a monitoring target presence signal;
[0126] When it is not detected multiple times within a preset time period that the target intrusion detection result indicates that there is a monitoring target intrusion, stop uploading a monitoring target presence signal;
[0127] When it is not continuously detected in a preset number of consecutive frame images that the target intrusion detection result indicates that there is a monitoring target intrusion, stop uploading a monitoring target presence signal.
[0128] Those skilled in the art can understand that Figure 8 the structure of the target intrusion detection device does not limit the target intrusion detection device, and each of the modules can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the controller of the device in hardware form or independent of it, or stored in the memory of the device in software form, so that the controller can call and execute the operations corresponding to each of the above modules. In other embodiments, the target intrusion detection device may include more or fewer modules than those shown in the figure.
[0129] Please refer to Figure 9 , on the other hand, an embodiment of the present application further provides a target intrusion detection device 10, including a memory 14 and a processor 13. The memory 14 stores a computer program. When the computer program is executed by the processor, the processor 13 executes the steps of the target intrusion detection method provided in any one of the above embodiments of the present application.
[0130] Among them, the processor 13 is the control center, which connects various parts of the entire device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 14, and by calling the data stored in the memory 14, it executes various functions of the device and processes data. Optionally, the processor 13 may include one or more processing cores; preferably, the processor 13 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interfaces, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 13 either.
[0131] The memory 14 can be used to store software programs and modules. The processor 13 executes various functional applications and data processing by running the software programs and modules stored in the memory 14. The memory 14 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.); the data storage area can store the data created according to the use of the device. In addition, the memory 14 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory 14 may also include a memory controller to provide the processor 13 with access to the memory 14.
[0132] On the other hand, an embodiment of the present application also provides a storage medium storing a computer program. When the computer program is executed by a processor, the processor is caused to execute the steps of the target intrusion detection method provided in any one of the above embodiments of the present application.
[0133] On the other hand, a target intrusion detection system according to an embodiment of the present application includes: the target intrusion detection device and the terminal device described in any one of the embodiments of the present application, and the terminal device is used to assist in calibrating the calibrated target size data of the monitoring target in each sub-region of the monitoring area.
[0134] Those of ordinary skill in the art can understand that all or part of the processes in the methods provided in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0135] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. The protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A target intrusion detection method, characterized in that: include: Get the current image of the monitoring area; Performing target detection on the current image to obtain target detection data, and obtaining a first detection result based on the target detection data; In a case where the first detection result indicates that there is a monitoring target in the current image, determining a sub-region in which the monitoring target is located in the monitoring region, and obtaining calibrated target size data of the monitoring target in the sub-region; Based on the calibrated target size data of the monitored target, a target intrusion detection result within the monitored area is determined.
2. The target intrusion detection method according to claim 1, characterized in that: The obtaining of the current image of the monitoring area includes: Obtaining the original image collected from the monitoring area; Based on the original image, input data of a pre-trained super-resolution image processing model is formed, and a super-resolution image is output through the super-resolution image processing model, and the super-resolution image is used as the current image, wherein the super-resolution image processing model is trained based on a training data set, and each training sample in the training data set includes a sample image and a super-resolution label image corresponding to the sample image.
3. The target intrusion detection method according to claim 1, characterized in that: The obtaining a first detection result based on the target detection data includes: When the target detection data indicates that a monitoring target category exists, obtaining an initial monitoring target belonging to the monitoring target category from the target detection data and obtaining pixel values of pixel points in a target frame of the initial monitoring target from the current image; Extracting the connected area contour based on the pixel values of the pixel points in the target frame of the initial monitoring target; Obtain reference target size data; Based on the connected area contour and the reference target size data, a first detection result is determined.
4. The target intrusion detection method according to claim 3, characterized in that: The determining of the first detection result based on the connected region contour and the reference target size data comprises: When there is a target connected region contour that meets a reference size condition in the connected region contour, determining that the first detection result indicates that the monitored target exists in the current image, wherein the reference size condition is determined based on the reference target size data; When there is no target connected region contour meeting the reference size condition in the connected region contour, it is determined that the first detection result indicates that the monitored target does not exist in the current image.
5. The target intrusion detection method according to claim 3, characterized in that: The extracting the connected region contour based on the pixel values of the pixel points in the target frame of the initial monitoring target comprises: Based on the pixel values of the pixel points in the target frame of the initial monitoring target, the current image is subjected to binary segmentation to obtain a binary image, and the connected region contour is extracted from the binary image.
6. The target intrusion detection method according to claim 5, characterized in that: The performing binary segmentation on the current image based on the pixel values of the pixel points in the target frame of the initial monitoring target to obtain a binary image comprises: Calculate the pixel mean of the pixel points in the target frame of the initial monitoring target; A binarization threshold is obtained based on the pixel mean value, and based on the binarization threshold, binarization segmentation is performed on the current image to obtain the binarized image.
7. The target intrusion detection method according to claim 1, characterized in that: The obtaining of the calibrated target size data of the monitoring target in the sub-area includes: Acquire a monitoring image of the monitoring area, and send the monitoring image to a terminal device that communicates with a target intrusion detection device so that the terminal device can mark the sub-area in the monitoring image; Obtaining calibration start information sent by the terminal device and obtaining configured sub-area data; When it is determined that the calibration target is located in the sub-area, photographing the monitoring area to obtain a calibration image; The calibration target is identified from the calibration image, and calibration target size data of the calibration target is determined, and the calibration target size data of the calibration target is used as the calibration target size data of the monitoring target in the sub-area.
8. The target intrusion detection method according to claim 1, characterized in that: The determining of the target intrusion detection result in the monitoring area based on the calibrated target size data of the monitoring target in the sub-area includes: Acquire a target frame of the monitored target from the first detection result, and determine a second detection result based on an overlapping state between the target frame and the sub-region; When the second detection result indicates that a monitored target has intruded into the sub-area, the size data of the target frame is compared with the calibrated target size data of the monitored target to determine a third detection result, which is used as the target intrusion detection result.
9. The target intrusion detection method according to claim 8, characterized in that: The determining of the second detection result based on the overlapping state between the target frame and the sub-region includes at least one of the following: When the ratio of the overlapping part of the target frame and the sub-region to the target frame is greater than a preset ratio, and / or the center of the target frame is located in the sub-region, it is determined that the second detection result indicates that a monitored target has intruded into the sub-region.
10. The target intrusion detection method according to claim 8, characterized in that: The step of comparing the size data of the target frame with the calibrated target size data of the monitored target to determine the third detection result includes: The size data of the target frame is compared with the calibrated target size data of the monitoring target. When the size data of the target frame meets a preset condition, it is determined that the third detection result indicates that there is an intrusion of the monitoring target in the sub-area, wherein the preset condition includes at least one of the following: the height of the target frame is within the height range indicated by the calibrated target size data of the monitoring target, the width of the target frame is within the width range indicated by the calibrated target size data of the monitoring target, and the area of the target frame is within the area range indicated by the calibrated target size data of the monitoring target.
11. The target intrusion detection method according to claim 1, characterized in that: The method further comprises at least one of the following: When the target intrusion detection result indicates that the monitored target has intruded for multiple times within a preset time period, continuously uploading the monitored target existence signal; When the target intrusion detection result indicates that the monitored target has intruded in preset continuous frame images, continuously uploading the monitored target existence signal; When the target intrusion detection result indicating that the monitored target has intruded is not detected multiple times within a preset time period, stopping uploading the monitored target existence signal; When the target intrusion detection result indicating the intrusion of the monitoring target is not detected continuously in the preset continuous frame images, the uploading of the monitoring target existence signal is stopped.
12. A target intrusion detection device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the target intrusion detection method as claimed in any one of claims 1 to 11.
13. A target intrusion detection system, characterized in that: include: The target intrusion detection device and terminal device as described in claim 12, wherein the terminal device is used to assist in calibrating the calibrated target size data of the monitored target in each of the sub-areas in the monitored area.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the target intrusion detection method as described in any one of claims 1 to 11 is implemented.