CN113837001A - Method and device for detecting abnormal intruding object in real time under monitoring scene - Google Patents
Method and device for detecting abnormal intruding object in real time under monitoring scene Download PDFInfo
- Publication number
- CN113837001A CN113837001A CN202110948248.0A CN202110948248A CN113837001A CN 113837001 A CN113837001 A CN 113837001A CN 202110948248 A CN202110948248 A CN 202110948248A CN 113837001 A CN113837001 A CN 113837001A
- Authority
- CN
- China
- Prior art keywords
- abnormal
- intruding object
- monitoring
- detecting
- data set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 194
- 238000012544 monitoring process Methods 0.000 title claims abstract description 140
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000001514 detection method Methods 0.000 claims abstract description 76
- 238000004422 calculation algorithm Methods 0.000 claims description 27
- 238000012549 training Methods 0.000 claims description 25
- 238000002372 labelling Methods 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 11
- 238000006243 chemical reaction Methods 0.000 claims description 10
- 230000002401 inhibitory effect Effects 0.000 claims description 10
- 238000010801 machine learning Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 238000009432 framing Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000010276 construction Methods 0.000 claims description 6
- 230000005764 inhibitory process Effects 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 5
- 238000011897 real-time detection Methods 0.000 claims description 4
- 238000003860 storage Methods 0.000 claims description 4
- 238000004519 manufacturing process Methods 0.000 abstract description 6
- 230000001629 suppression Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 238000005070 sampling Methods 0.000 description 5
- 238000013135 deep learning Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000011176 pooling Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 238000011895 specific detection Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computational Linguistics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Biology (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a method and a device for detecting abnormal intrusions in real time in a monitoring scene, which comprises the following steps: acquiring a monitoring video in real time; and inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object exists in the monitoring image corresponding to the monitoring video, obtaining the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object. The invention can monitor whether an abnormal intruding object which can obstruct normal production, affect safety and cause information leakage exists in the environment within the monitoring range in real time, thereby timely carrying out voice and video marking frame reminding when the abnormal intruding object exists, and ensuring the safety of the monitoring area.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for detecting abnormal intrusions in a monitoring scene in real time.
Background
Safety is a focus of social attention in modern life, all places establish an all-round monitoring system to ensure stable and orderly operation of the society, and a video monitoring system is one of the most widely applied systems. Along with the popularization of high-definition cameras and the development of mobile networks, video monitoring systems are gradually applied to various scenes in current production and life, and particularly, the video monitoring coverage rate is extremely high in sensitive and high-risk areas. Thanks to the continuous breakthrough of computer vision technology, especially deep learning technology in recent years, the computer can analyze and process video images under the guidance of an algorithm model, extract valuable information from the video images for judgment and output, understand pictures like people, complete some tedious tasks instead of workers, and improve efficiency and accuracy. However, these massive video data also pose a great challenge to real-time intelligent monitoring, and it is difficult for the conventional method to achieve high detection and identification accuracy under the condition of real-time processing.
The foreign matter intrusion detection method applied to the visual monitoring in the security field can be divided into two types: one approach is a moving object detection algorithm based on background modeling, such as static differencing, gaussian mixture models, and ViBe algorithms. The algorithm needs to establish a background model, the pixel points which accord with the background model are the background, meanwhile, the pixel points which accord with the background model are used as the background input to update the background model, and the pixel points which do not accord with the background model are the foreground, namely, the detection target. The algorithm based on background modeling has the advantages of high operation speed and good generalization, but has the defects of high false alarm rate and poor detection effect on long-distance smaller targets in complex scenes; another approach is the deep learning based target detection algorithm, such as the fast RCNN, SSD and YOLO families. The target detection algorithm based on deep learning does not depend on information among video frames, and can perform target detection on a single image. The target detection algorithm based on deep learning has the advantages of high detection precision, low false alarm rate, poor target detection effect on long distance and small pixel points, more occupied computer resources and low instantaneity.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a device for detecting an abnormal intruding object in a monitoring scene in real time.
In a first aspect, an embodiment of the present invention provides a method for detecting an abnormal intruding object in a monitoring scene in real time, including:
acquiring a monitoring video in real time;
inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when detecting that an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, obtaining a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
Further, still include:
constructing an abnormal intruding object data set, and marking to determine the category of the abnormal intruding object;
performing expansion enhancement on the abnormal intruding object data set;
acquiring the size of an anchor point frame which accords with the scale characteristics of a preset target to be detected by adopting a clustering algorithm based on the abnormal invader data set subjected to expansion and enhancement;
based on the clustered abnormal invader data set, inhibiting a redundant frame by improving a non-maximum inhibition method;
and training and detecting the abnormal intruding object data set based on a YOLO _ v4 and/or a YOLO _ v5 neural network.
Further, still include:
calculating the distance between the center points of the two anchor point frames;
and inhibiting the redundant frame in the anchor point frame according to the calculation result.
Further, the expanding and enhancing the abnormal intruding object data set specifically includes:
and carrying out expansion enhancement on the abnormal intruding object data set by adopting a conversion mode of rotation, brightness, scale and angle conversion and noise and fuzzy processing.
In a second aspect, an embodiment of the present invention provides a device for detecting an abnormal intruding object in a monitoring scene in real time, including:
the acquisition module is used for acquiring the monitoring video in real time;
the detection module is used for inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object are obtained; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
Further, the method also comprises the following steps:
the construction model module is used for constructing an abnormal intruding object data set and marking to determine the category of the abnormal intruding object;
performing expansion enhancement on the abnormal intruding object data set;
acquiring the size of an anchor point frame which accords with the scale characteristics of a preset target to be detected by adopting a clustering algorithm based on the abnormal invader data set subjected to expansion and enhancement;
based on the clustered abnormal invader data set, inhibiting a redundant frame by improving a non-maximum inhibition method;
and training and detecting the abnormal intruding object data set based on a YOLO _ v4 and/or a YOLO _ v5 neural network.
Further, the build model module is further configured to:
calculating the distance between the center points of the two anchor point frames;
and inhibiting the redundant frame in the anchor point frame according to the calculation result.
Further, when performing the extended enhancement on the abnormal intruding object data set, the construction model module is specifically configured to:
and carrying out expansion enhancement on the abnormal intruding object data set by adopting a conversion mode of rotation, brightness, scale and angle conversion and noise and fuzzy processing.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method for detecting an abnormal intruding object in a monitoring scene in real time according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for detecting an abnormal intruding object in a monitoring scene in real time as described in the first aspect above.
According to the technical scheme, the method and the device for detecting the abnormal intruding object in the monitoring scene in real time acquire the monitoring video in real time; and inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object exists in the monitoring image corresponding to the monitoring video, obtaining the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object. The invention can monitor whether an abnormal intruding object which can obstruct normal production, affect safety and cause information leakage exists in the environment within the monitoring range in real time, thereby timely carrying out voice and video marking frame reminding when the abnormal intruding object exists, and ensuring the safety of the monitoring area.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for detecting an abnormal intruding object in real time in a monitoring scene according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an abnormal intruding object real-time detection device in a monitoring scene according to an embodiment of the present invention;
fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The method for detecting an abnormal intruding object in real time under a monitoring scene provided by the invention will be explained and explained in detail through specific embodiments.
Fig. 1 is a schematic flow chart of a method for detecting an abnormal intruding object in real time in a monitoring scene according to an embodiment of the present invention; as shown in fig. 1, the method includes:
step 101: and acquiring the monitoring video in real time.
Step 102: inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when detecting that an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, obtaining a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
In this embodiment, it should be noted that abnormal intrusions, such as unmanned aerial vehicles, balloons, kites, air floats (such as plastic belts/bags, etc.), etc., may obstruct normal production, affect safety of personnel and machines, and cause foreign objects that may cause information leakage.
In this embodiment, it should be noted that, for a preset abnormal intruding object detection model, the preset abnormal intruding object detection model is used for monitoring and early warning foreign matters such as unmanned aerial vehicles, balloons, kites, air floats, and the like, and the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by using monitoring video samples as input data, monitoring images corresponding to the monitoring video samples and containing abnormal intruding objects, and the belonged categories of the abnormal intruding objects as output data. For example, if a corresponding data set is firstly constructed for a foreign object possibly intruding into a scene, the data set source can include real data under a monitoring scene, related data on the internet can be collected through a web crawler technology, data is expanded in a data enhancement mode to improve the diversity of the data, then a clustering algorithm is used for obtaining the size of an anchor point frame according with the scale characteristics of a target to be detected, non-maximum value inhibition is improved to inhibit a redundant frame, and finally training and testing are completed on a YOLO _ v4 and/or a YOLO _ v5 network architecture, so that the constructed preset abnormal intruding object detection model can simultaneously monitor various abnormal intrusions, the real-time performance can be maintained, and the detection accuracy can be improved.
According to the technical scheme, the abnormal intruding object real-time detection method in the monitoring scene provided by the embodiment of the invention obtains the monitoring video in real time; and inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object exists in the monitoring image corresponding to the monitoring video, obtaining the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object. The invention can monitor whether an abnormal intruding object which can obstruct normal production, affect safety and cause information leakage exists in the environment within the monitoring range in real time, thereby timely carrying out voice and video marking frame reminding when the abnormal intruding object exists, and ensuring the safety of the monitoring area.
On the basis of the above embodiment, in this embodiment, an abnormal intruding object data set is constructed, and a label is given to determine the category to which the abnormal intruding object belongs;
performing expansion enhancement on the abnormal intruding object data set;
acquiring the size of an anchor point frame which accords with the scale characteristics of a preset target to be detected by adopting a clustering algorithm based on the abnormal invader data set subjected to expansion and enhancement;
based on the clustered abnormal invader data set, inhibiting a redundant frame by improving a non-maximum inhibition method;
and training and detecting the abnormal intruding object data set based on a YOLO _ v4 and/or a YOLO _ v5 neural network.
In this embodiment, it can be understood that constructing the abnormal intruding object data set includes constructing a training set and a testing set, labeling the training set and the testing set, and generating an xml file, where the xml file includes coordinate information of a labeling box and a category to which the labeling box belongs.
In this embodiment, it can be understood that the enhancement is extended in the following manner: the method comprises the steps of rotation, brightness, angle, scale transformation and transformation modes of noise and fuzzy processing, so that limited data (namely original data samples) are fully utilized to perform data expansion on the original data samples to form enhanced training samples.
In this embodiment, it should be noted that the clustering algorithm is used to automatically classify similar samples into a category and obtain the size of the anchor point box according with the scale characteristics of the target to be detected.
In this embodiment, it should be noted that the anchor point frame design of the current target scale characteristic is obtained by determining whether there is a target object in the fixed grid and the distance between the prediction frame and the real target.
In this embodiment, it should be noted that the backbone network of YOLO _ v4 and/or YOLO _ v5 adopts a CSPDarknet53(BottlenneckCSP) network structure, so as to solve repeated learning of gradient information during a network penetration process and improve a detection speed. And an SPP structure is added behind the network structure, so that a prediction frame can obtain a larger receptive field, and important characteristic information in data is effectively separated. The PANet path aggregation adopts a mode of combining up-sampling and down-sampling, improves the detection effect of a small target detection object through up-sampling, strengthens a characteristic pyramid through down-sampling, and finally carries out prediction through a multi-scale characteristic layer.
In this embodiment, it should be noted that, on the basis of a network of YOLOv4 and/or YOLOv5, an abnormal intruding object data set conforming to a monitoring scene is constructed, the data set may be acquired from a real visual monitoring video, or may be acquired through the internet, and data enhancement is performed on the data set, so that feature information can be fully acquired from limited data, and a model can be helped to be generalized better; the size of the anchor point frame which accords with the scale characteristics of the target to be detected is obtained by using a clustering algorithm, so that the detection precision of the model can be improved. The method for detecting the abnormal intruding object in the monitoring scene in real time provided by the embodiment of the invention can keep higher accuracy and ensure real-time performance.
On the basis of the above embodiment, in this embodiment, the method further includes:
calculating the distance between the center points of the two anchor point frames;
and inhibiting the redundant frame in the anchor point frame according to the calculation result.
In the present embodiment, it is understood that the present embodiment improves non-maximum suppression to suppress redundant frames in consideration of information of the two-frame center point positions. The original IoU (cross-over ratio) is replaced in the non-maximum suppression process, which is more suitable for the actual situation.
In the present embodiment, it should be noted that not only the overlapping area but also the distance between the center points of the two bounding boxes should be considered in the suppression criterion, and the non-maximum suppression should be improved to suppress the redundant boxes.
For example, the improved non-maximum suppression can better reflect the contact ratio between two frames, establish association on factors such as the distance between a prediction frame and a real frame, the overlapping rate and the scale, and directly minimize the distance between the central points of the prediction frame and the real frame.
On the basis of the foregoing embodiment, in this embodiment, the performing expansion enhancement on the abnormal intruding object data set specifically includes:
and carrying out expansion enhancement on the abnormal intruding object data set by adopting a conversion mode of rotation, brightness, scale and angle conversion and noise and fuzzy processing.
According to the technical scheme, the method for detecting the abnormal intruding object in the monitoring scene in real time is beneficial to fully utilizing limited data (namely the original data sample) to perform data expansion on the original data sample to form the enhanced training sample.
In order to better understand the present invention, the following examples are further provided to illustrate the content of the present invention, but the present invention is not limited to the following examples.
Firstly, constructing an abnormal invader detection model:
according to the embodiment of the invention, the abnormal invader is trained to obtain the training weight aiming at the abnormal invader, so that the abnormal invader detection model is constructed. Wherein the training stage is divided into the following steps:
step S1: constructing 5 types of data sets representative of the unmanned surrounding environment, namely an unmanned aerial vehicle, a balloon, a kite and an aerial floater, dividing a training set and a testing set, labeling the data by using LabelImg or Labelme, and generating a labeling file containing coordinate information of a labeling frame and the category of the data.
Step S2: the data enhancement processing is carried out on the current data set, the data enhancement mode comprises the transformation modes of rotation, brightness, scale, angle transformation and noise and fuzzy processing, the data is expanded through the data enhancement mode, the phenomenon that the learning characteristic is stopped due to overfitting is prevented, and the generalization capability and the robustness of the data are improved.
Step S3: using a clustering algorithm to obtain the size of an anchor point frame which accords with the scale characteristics of the target to be detected, wherein the specific calculation steps are as follows:
properly and randomly selecting initial centers of k classes;
in each iteration, respectively solving Euclidean distances from any sample to k centers, and classifying the sample into a class where the center with the shortest distance is located;
updating the values of the centers of the k classes by using a mean value method;
and repeating the second step and the third step for all k clustering centers, and finishing iteration when the moving distance of the center value of the class meets a certain condition to finish the classification.
Step S4: the method comprises the following steps of improving non-maximum value suppression to suppress redundant frames, considering information of central point positions of two frames, and suppressing the redundant frames according to the distance between the central points of two anchor point frames, wherein the specific calculation method is shown in the following formula:
improved non-maxima suppression removes box B by simultaneously considering the overlap region and the distance between the center points of the two boxesi. Prediction box M and other boxes B when score is highestiWhen the difference between the distances of the center points is small, BiScore value s ofiStill remain; otherwise, siIs 0, i.e. isAnd filtering out. Wherein s isiRepresenting the confidence score of each class, IOU is cross-over ratio, representing the degree of overlap of the predicted box and the real box, RDIoUIs the penalty term of the DIoU (normalized distance of two boxes) loss function, M represents the box with highest confidence in all prediction boxes, BiRepresenting all the compared prediction boxes in the current class, and epsilon represents an artificially set threshold, typically 0.5.
Step S5: the improved algorithm is applied to a network of YOLOv4 or YOLOv5, and data are trained. In the embodiment of the invention, 5 types of data are collected. The whole training process is as follows: an input image enters a YOLOv4 network at a resolution of 608 x 608, and enters an SPP network after passing through a backbone network CSPDarknet53, the SPP network is used for increasing the receptive field of the network in a YOLO, the maximum pooling of 5 x 5, 9 x 9 and 13 x 13 is realized on the upper layer, Concat (tensor splicing can expand the dimensionality of two tensors) is performed after the pooling is completed, and the Concat is connected into an eigen map which is reduced to 512 channels through 1 x 1; sampling by using a PANet for final feature splicing; finally, 76 × 76 × 30, 38 × 38 × 30 and 19 × 19 × 30 are output through YOLOv3 Head.
Secondly, detecting the constructed abnormal invader detection model:
in the detection stage of the embodiment of the invention, the abnormal intruding object is detected by applying the trained weight, and the specific detection principle is as follows: the detection flow of the YOLOv4 detection model is described by taking an example that the resolution of an input image is 608 × 608 and the characteristic scale is 19 × 19. The model evenly divides the whole image into 19 x 19 networks, when a certain target center falls into the networks, the networks are responsible for detecting the targets, each grid can predict 3 boundary frames with different scales, each boundary frame needs to predict the coordinates, width, height, confidence and the probability that the target belongs to each category, the size of the boundary frame which is more in line with the target data is obtained through the clustering method in the training stage step S3, and then the redundant prediction is removed through the improved non-maximum suppression method in the training stage step S4, so that the final target detection frame is obtained.
The principle is utilized to detect the constructed abnormal invader model:
acquiring a monitoring video in real time;
and inputting the monitoring video into a preset abnormal intruding object detection model for detection, and if an abnormal intruding object (unmanned aerial vehicle) exists in a monitoring image corresponding to the monitoring video at a certain moment, obtaining the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model, and the category of the abnormal intruding object (namely the output monitoring image contains the unmanned aerial vehicle in a framed object).
Thirdly, applying the constructed abnormal invader detection model:
the embodiment of the invention can detect and identify the abnormal intrusion object in the security monitoring scene and the relative position of the object in the image. And comprehensively analyzing the identified result, thereby sensing the external environment well and ensuring the safety of a monitoring area.
Fig. 2 is a schematic structural diagram of an abnormal intruding object real-time detection apparatus in a monitoring scene according to an embodiment of the present invention, as shown in fig. 2, the apparatus includes: an acquisition module 201 and a detection module 202, wherein:
the acquiring module 201 is configured to acquire a monitoring video in real time;
the detection module 202 is configured to input the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object is detected in a monitoring image corresponding to the monitoring video, obtain a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model, and a category to which the abnormal intruding object belongs; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
The device for detecting an abnormal intruding object in a monitoring scene in real time provided by the embodiment of the invention can be specifically used for executing the method for detecting an abnormal intruding object in a monitoring scene in real time of the embodiment, the technical principle and the beneficial effect are similar, and reference can be specifically made to the embodiment, and details are not repeated here.
Based on the same inventive concept, an embodiment of the present invention provides an electronic device, which specifically includes the following components, with reference to fig. 3: a processor 301, a communication interface 303, a memory 302, and a communication bus 304;
the processor 301, the communication interface 303 and the memory 302 complete mutual communication through the communication bus 304; the communication interface 303 is used for realizing information transmission between related devices such as modeling software, an intelligent manufacturing equipment module library and the like; the processor 301 is used for calling the computer program in the memory 302, and the processor executes the computer program to implement the method provided by the above method embodiments, for example, the processor executes the computer program to implement the following steps: acquiring a monitoring video in real time; inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when detecting that an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, obtaining a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
Based on the same inventive concept, another embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the methods provided by the above method embodiments when executed by a processor, for example, acquiring a monitoring video in real time; inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when detecting that an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, obtaining a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
In addition, in the present invention, terms such as "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for detecting abnormal intrusions in a monitoring scene in real time is characterized by comprising the following steps:
acquiring a monitoring video in real time;
inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when detecting that an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, obtaining a monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
2. The method for detecting the abnormal intruding object in the monitoring scene in real time according to claim 1, further comprising:
constructing an abnormal intruding object data set, and marking to determine the category of the abnormal intruding object;
performing expansion enhancement on the abnormal intruding object data set;
acquiring the size of an anchor point frame which accords with the scale characteristics of a preset target to be detected by adopting a clustering algorithm based on the abnormal invader data set subjected to expansion and enhancement;
based on the clustered abnormal invader data set, inhibiting a redundant frame by improving a non-maximum inhibition method;
and training and detecting the abnormal intruding object data set based on a YOLO _ v4 and/or a YOLO _ v5 neural network.
3. The method for detecting the abnormal intruding object in the monitoring scene in real time according to claim 2, further comprising:
calculating the distance between the center points of the two anchor point frames;
and inhibiting the redundant frame in the anchor point frame according to the calculation result.
4. The method for detecting an abnormal intruding object in a monitored scene in real time according to claim 2, wherein the expanding enhancement of the abnormal intruding object data set specifically comprises:
and carrying out expansion enhancement on the abnormal intruding object data set by adopting a conversion mode of rotation, brightness, scale and angle conversion and noise and fuzzy processing.
5. The utility model provides an unusual invader real-time detection device under control scene which characterized in that includes:
the acquisition module is used for acquiring the monitoring video in real time;
the detection module is used for inputting the monitoring video into a preset abnormal intruding object detection model for detection, and when an abnormal intruding object exists in a monitoring image corresponding to the monitoring video, the monitoring image containing the abnormal intruding object and output by the abnormal intruding object detection model and the category of the abnormal intruding object are obtained; the monitoring image containing the abnormal intruding object carries a labeling frame, and the labeling frame is used for framing the abnormal detecting object; the preset abnormal intruding object detection model is obtained by training based on a machine learning algorithm by adopting a monitoring video sample as input data, a monitoring image which corresponds to the monitoring video sample and contains an abnormal intruding object and the category of the abnormal intruding object as output data.
6. The apparatus for detecting an abnormal intruding object in a monitoring scene according to claim 5, further comprising a construction model module:
the construction model module is used for constructing an abnormal intruding object data set and marking to determine the category of the abnormal intruding object;
performing expansion enhancement on the abnormal intruding object data set;
acquiring the size of an anchor point frame which accords with the scale characteristics of a preset target to be detected by adopting a clustering algorithm based on the abnormal invader data set subjected to expansion and enhancement;
based on the clustered abnormal invader data set, inhibiting a redundant frame by improving a non-maximum inhibition method;
and training and detecting the abnormal intruding object data set based on a YOLO _ v4 and/or a YOLO _ v5 neural network.
7. The apparatus for detecting an abnormal intruding object in a monitored scene according to claim 6, wherein the construction model module is further configured to:
calculating the distance between the center points of the two anchor point frames;
and inhibiting the redundant frame in the anchor point frame according to the calculation result.
8. The method for detecting an abnormal intruding object in a monitored scene in real time according to claim 6, wherein the construction model module is specifically configured to, when performing the extended enhancement on the abnormal intruding object data set:
and carrying out expansion enhancement on the abnormal intruding object data set by adopting a conversion mode of rotation, brightness, scale and angle conversion and noise and fuzzy processing.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the method for detecting an abnormal intruding object in real time under the monitoring scene according to any one of claims 1 to 4 when executing the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for detecting an abnormal intruding object in a monitoring scenario according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110948248.0A CN113837001A (en) | 2021-08-18 | 2021-08-18 | Method and device for detecting abnormal intruding object in real time under monitoring scene |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110948248.0A CN113837001A (en) | 2021-08-18 | 2021-08-18 | Method and device for detecting abnormal intruding object in real time under monitoring scene |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113837001A true CN113837001A (en) | 2021-12-24 |
Family
ID=78960751
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110948248.0A Pending CN113837001A (en) | 2021-08-18 | 2021-08-18 | Method and device for detecting abnormal intruding object in real time under monitoring scene |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113837001A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115190277A (en) * | 2022-09-08 | 2022-10-14 | 中达安股份有限公司 | Safety monitoring method, device and equipment for construction area and storage medium |
-
2021
- 2021-08-18 CN CN202110948248.0A patent/CN113837001A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115190277A (en) * | 2022-09-08 | 2022-10-14 | 中达安股份有限公司 | Safety monitoring method, device and equipment for construction area and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102382693B1 (en) | Learning method and learning device of pedestrian detector for robust surveillance based on image analysis by using gan and testing method and testing device using the same | |
CN112308019B (en) | SAR ship target detection method based on network pruning and knowledge distillation | |
CN111178183B (en) | Face detection method and related device | |
CN107123131B (en) | Moving target detection method based on deep learning | |
CN107609512A (en) | A kind of video human face method for catching based on neutral net | |
CN107273832B (en) | License plate recognition method and system based on integral channel characteristics and convolutional neural network | |
CN109460787B (en) | Intrusion detection model establishing method and device and data processing equipment | |
Qu et al. | Moving vehicle detection with convolutional networks in UAV videos | |
CN107545263A (en) | A kind of object detecting method and device | |
CN111368634B (en) | Human head detection method, system and storage medium based on neural network | |
CN105868734A (en) | Power transmission line large-scale construction vehicle recognition method based on BOW image representation model | |
CN116824335A (en) | YOLOv5 improved algorithm-based fire disaster early warning method and system | |
CN115512387A (en) | Construction site safety helmet wearing detection method based on improved YOLOV5 model | |
CN113065379B (en) | Image detection method and device integrating image quality and electronic equipment | |
CN106446784A (en) | Image detection method and apparatus | |
CN115496971A (en) | Infrared target detection method and device, electronic equipment and storage medium | |
CN116469020A (en) | Unmanned aerial vehicle image target detection method based on multiscale and Gaussian Wasserstein distance | |
CN113963333B (en) | Traffic sign board detection method based on improved YOLOF model | |
Lyu et al. | Visual early leakage detection for industrial surveillance environments | |
CN113837001A (en) | Method and device for detecting abnormal intruding object in real time under monitoring scene | |
CN113936299A (en) | Method for detecting dangerous area in construction site | |
CN117787690A (en) | Hoisting operation safety risk identification method and identification device | |
CN110334703B (en) | Ship detection and identification method in day and night image | |
Wu et al. | Research on asphalt pavement disease detection based on improved YOLOv5s | |
Lestari et al. | Comparison of two deep learning methods for detecting fire |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |