Abnormal event detection method, system, computing device and storage medium

By constructing a background model and using a convolutional neural network for feature extraction and comparison, combined with the attention mechanism, the problem of large error in abnormal event detection in the existing technology is solved, and the accuracy and adaptability of detection are improved.

CN114299410BActive Publication Date: 2025-03-14HITACHI LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010994286.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-21
Publication Date
2025-03-14
Estimated Expiration
2040-09-21

AI Technical Summary

Technical Problem

The abnormal event detection method in the prior art has problems such as large error and low accuracy, mainly because the background difference method cannot accurately detect abnormal events under the situation of large changes in light and shadows.

Method used

By obtaining the video stream, a background model is constructed, including background pictures at multiple moments, feature extraction is performed on the first background picture and the second background picture respectively, and then feature comparison is performed to determine whether there is an abnormal event. This method uses convolutional neural network for feature extraction and comparison, and combines attention mechanism to reduce the influence of factors such as light and shadow.

Benefits of technology

This method can reduce the error of abnormal event detection, improve the accuracy rate, and enhance the adaptability of the detection method, especially in environments where light and shadow changes are large.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299410B_ABST
    Figure CN114299410B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal events, comprising the following steps: obtaining a video stream; constructing a background model according to the video stream, the background model including background images at multiple moments; obtaining a first background image corresponding to a first moment and a second background image corresponding to a second moment from the background model; extracting features from the first background image and the second background image respectively, and then performing feature comparison; determining whether an abnormal event exists according to the result of the feature comparison. The present invention adopts the above technical solution to reduce the error of abnormal event detection and improve the accuracy. The present invention also provides an abnormal event detection system, a computing device and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video monitoring, and in particular to an abnormal event detection method, system, computing device and storage medium. Background Art

[0002] At present, there is a need for security monitoring in places with large traffic or cargo flow, such as factories, subways, and shopping malls. In the prior art, various abnormal events are often detected by installing cameras to collect video streams, including various abnormal items, such as stranded objects, lost objects, etc., as well as abnormal behaviors of some personnel, such as theft, failure to work according to dress standards, etc. With the development of technology, in order to solve the problems of high cost and low efficiency of a large number of monitoring personnel manually judging based on detectors in real time, intelligent detection and analysis came into being.

[0003] Patent document CN101727672A discloses a method for detecting, tracking and identifying object retention / theft events, which detects moving targets through background difference, and further tracks and identifies them. Summary of the invention

[0004] The applicant found that the abnormal event detection method in the prior art has the problem of large error and low accuracy. The applicant further studied and found that this is because the prior art often uses the background difference method to process images when detecting abnormalities. Once the illumination and shadow changes greatly when obtaining different images, the background difference method cannot accurately detect abnormal events, resulting in large errors and low accuracy.

[0005] To solve the above technical problems, an embodiment of the present invention discloses an abnormal event detection method, comprising the following steps: obtaining a video stream; constructing a background model based on the video stream, the background model including background pictures at multiple moments; obtaining a first background picture corresponding to a first moment and a second background picture corresponding to a second moment from the background model; performing feature extraction on the first background picture and the second background picture respectively, and then performing feature comparison; determining whether there is an abnormal event based on the result of the feature comparison.

[0006] The adoption of the above technical solution can reduce the error of abnormal event detection and improve the accuracy.

[0007] Optionally, the steps of respectively extracting features from the first background image and the second background image and then performing feature comparison include: using a first convolutional neural network to respectively extract features from the first background image and the second background image to obtain corresponding first features and second features; connecting the first features and the second features to obtain a third feature with two channels; and inputting the third feature into a second convolutional neural network for feature comparison.

[0008] Optionally, when performing feature comparison, both channels of the third feature and the output of the second convolutional neural network use an attention mechanism.

[0009] Optionally, the detection method further includes the following steps: when an abnormal event exists, displaying a background image where the abnormal event is located, marking the abnormal event, and / or displaying a corresponding abnormal type.

[0010] Optionally, the detection method also includes the following steps: obtaining a first scene picture of each scene, wherein the first scene picture does not include people; performing lighting processing and / or shadow processing on the first scene picture to obtain a second scene picture; adding possible abnormal event pictures to the second scene picture to obtain a third scene picture; using the first scene picture and the third scene picture as input to construct a positive sample set; using the first scene picture and the second scene picture as input to construct a negative sample set; training the positive sample set and the negative sample set to obtain a first convolutional neural network and a second convolutional neural network.

[0011] Optionally, the detection method also includes the following steps: when an abnormal event exists, taking the first background image and the second background image as input and adding them to the positive sample set; when the abnormal event does not exist, taking the first background image and the second background image as input and adding them to the negative sample set; updating the first convolutional neural network and the second convolutional neural network.

[0012] Optionally, a background model is constructed according to the video stream, and the background model includes the steps of background pictures at multiple moments, including: obtaining an initial frame picture of the video stream as the background picture at the initial moment; determining the background pictures at other moments in chronological order, setting the moment corresponding to the (N+1)th frame picture in the video stream to t, when the (N+1)th frame picture has an abnormal change compared with the Nth frame picture, and the frame pictures of the video stream remain stable from moment t to moment (t+m), using the (N+1)th frame picture as the background picture at moment (t+m), wherein N is a natural number, and t and m are positive numbers; the background model is composed of background pictures at multiple moments.

[0013] An embodiment of the present invention also discloses an abnormal event detection system, including: an acquisition module, used to acquire a video stream; a processing module, which is communicatively connected to the acquisition module, and the processing module is used to process the video stream using any of the aforementioned detection methods to determine whether an abnormal event occurs.

[0014] The adoption of the above technical solution can reduce the error of abnormal event detection and improve the accuracy.

[0015] The embodiment of the present invention further discloses a computing device, including: a processor, suitable for implementing various instructions; a memory, suitable for storing multiple instructions, and the instructions are suitable for being loaded by the processor and executing any of the aforementioned detection methods.

[0016] The embodiment of the present invention further discloses a storage medium, wherein the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any of the aforementioned detection methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart showing an abnormal event detection method according to an embodiment of the present invention;

[0018] Figure 2 A flowchart showing step S3 in one embodiment of the present invention is shown;

[0019] Figure 3 A flowchart showing step S2 in one embodiment of the present invention is shown;

[0020] Figure 4 A schematic block diagram of an abnormal event detection system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0021] The following specific embodiments illustrate the implementation of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Although the description of the present invention will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to this implementation. On the contrary, the purpose of introducing the invention in conjunction with the implementation is to cover other options or modifications that may extend based on the claims of the present invention. In order to provide a deep understanding of the present invention, the following description will include many specific details. The present invention can also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present invention, some specific details will be omitted in the description. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0022] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0023] The terms “first”, “second”, “third”, etc. are only used for distinguishing descriptions and should not be understood as indicating or implying relative importance.

[0024] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0025] Reference Figure 1As shown, an embodiment of the present invention discloses an abnormal event detection method, including the following steps, S1: obtaining a video stream; S2: constructing a background model according to the video stream, the background model including background pictures at multiple moments; S3: obtaining a first background picture corresponding to a first moment and a second background picture corresponding to a second moment from the background model; S4: extracting features from the first background picture and the second background picture respectively, and then performing feature comparison; S5: determining whether there is an abnormal event based on the result of the feature comparison.

[0026] In S1, the video stream can be acquired by the same camera within a period of time, or by multiple cameras, and can be set as needed, and the present invention does not limit this. At the same time, the video stream can be acquired originally, or it can be acquired after sampling the original video, and the present invention does not limit this. In S2, a background model is constructed based on the video stream, and the background model includes background pictures at multiple times. In one embodiment, taking the video stream from the same camera as an example, assuming that the acquisition frequency of the camera is 50Hz, and the total duration of the video stream is 10 minutes, then the video stream contains 30,000 frames of pictures, and the background model corresponding to the video stream is constructed by 30,000 frames of pictures. In one embodiment, the background model is obtained by sampling 30,000 frames of pictures at 1 / 300, that is, the time period corresponding to each background picture is 6s, and the background picture at T=0s~6s corresponds to the first frame of the video stream. In another embodiment, the first frame of the video stream can be used as the background image at the initial moment in the background model. If the second frame has no significant change from the first frame, the first frame continues to be the background image at the corresponding moment of the second frame. When a certain frame has significant change from the previous frame, and the change lasts for a certain period of time, the certain frame is used as the background image at the next moment. Whether there is significant change can be quantified by a corresponding algorithm. In other embodiments, the background model can also be constructed by other methods.

[0027] In S3, a first background image corresponding to the first moment and a second background image corresponding to the second moment are obtained from the background model. The specific time interval between the first moment and the second moment can be set according to the frame rate of the video stream, different application scenarios and different abnormal events to be detected.

[0028] In S4, feature extraction is performed on the first background image and the second background image respectively, and then feature comparison is performed. That is, in S4, feature extraction is first performed on the two background images respectively, features corresponding to the two images are obtained, and then the obtained features are compared. The specific methods used for feature extraction and comparison may be restricted Boltzmann machine (RBM), deep belief network (DBN), convolutional neural network (CNN), etc. By first extracting features from the background images respectively, instead of differentiating the two background images, the influence of environmental factors such as light and shadow on the detection can be avoided.

[0029] For example, when the illumination of two images is obviously different, if the background difference is directly performed on the two images, the difference result will include the influence of all illumination factors on the images. When the judgment threshold is small, even if there is no abnormal event in the two images, and there is only a difference in illumination, it may be judged that there is an abnormal event. When the judgment threshold is large, the two images with no illumination change but abnormal events will be judged as no abnormal event after the background difference method because the abnormal proportion is small, such as when a small residue appears. The judgment threshold cannot be reached after the difference method, resulting in large errors and low accuracy. When the two background images are first extracted separately, if the two images only have different illumination, the feature extraction will not be affected by the illumination on the overall image, and it will still extract the corresponding part of the prominent features of the image. At this time, the results of feature extraction of the two images are basically the same. Then, even if the judgment threshold is small, it can still accurately judge that there is no abnormal event and avoid misjudgment. When there is an abnormal event, for example, there is a small retained object in the second background image, when the feature extraction is performed on the corresponding image with the retained object, the retained object will still be extracted as a prominent feature, and since there is no retained object in the first background image, the extracted features will be completely different from the retained object. When performing feature comparison at this time, even if the judgment threshold is large, it is still possible to accurately judge that there is an abnormal event and avoid misjudgment. Therefore, by first extracting features from the background images separately and then performing feature comparison, it is possible to eliminate misjudgment of non-abnormal factors such as illumination and shadow, reduce the error of abnormal event detection, improve the accuracy, and enhance the adaptability of the detection method.

[0030] In S5, it is determined whether there is an abnormal event based on the result of the feature comparison. In simple terms, when the result of the feature comparison is greater than the set threshold, it means that the first background image and the second background image are significantly different due to the influence of the abnormal event. At this time, it is determined that the abnormal event exists. When the result of the feature comparison is less than the set threshold, it is determined that there is no abnormal event. Abnormal events can be the existence of stranded objects, lost objects, failure to wear safety clothing and helmets as required, abnormal intrusions, abnormal fireworks, etc., which can be set and adjusted according to the needs of the application scenario. The detection method in this embodiment is particularly suitable for dangerous areas of factories. Through this detection method, all-round monitoring of dangerous behaviors, operating specifications, leaving and arriving at work, abnormal items, etc. is completed to ensure operational safety.

[0031] The adoption of the above technical solution can reduce the error of abnormal event detection and improve the accuracy.

[0032] Reference Figure 2 As shown, another embodiment of the present invention further discloses an abnormal event detection method, step S3 includes, S31: using a first convolutional neural network to extract features of a first background image and a second background image respectively to obtain corresponding first features and second features; S32: connecting the first feature and the second feature to obtain a third feature with two channels; S33: inputting the third feature into a second convolutional neural network for feature comparison.

[0033] In S31, the first convolutional neural network is used to extract features from the first background image and the second background image respectively, and obtain the corresponding first features and second features. The specific forms of the first features and the second features can be feature images, feature matrices, etc. Convolutional neural networks have the advantages of local perception, weight sharing, multiple convolution kernels, dimensionality reduction, and multi-level structures. Different convolutional neural networks can be obtained by image training as needed. When the convolutional neural network processes the background image through the characteristics of local perception, it can better extract local features, so it is suitable for detecting abnormal events. When processing images, especially for high-definition color background images, the dimension of its feature vector is higher. If traditional full connection is used for image processing, it will lead to large amount of calculation, low efficiency, and easy to overfitting. The convolutional neural network can greatly reduce the amount of calculation through convolution with weight sharing and local connection characteristics. Therefore, using convolutional neural networks for feature extraction can also greatly reduce the computational load for abnormal event detection, and is particularly suitable for detecting and processing background models of multiple video streams or larger video streams.

[0034] In S31, the first feature and the second feature are connected to obtain a third feature with two channels. The connection does not change the original features, but arranges the two features in a specific way. Taking a matrix as an example, assuming that the first feature is a first feature matrix of 100×100×1, and the second feature is a second feature matrix of 100×100×1, connecting the two matrices in sequence can obtain a third feature matrix of 100×100×2 representing the third feature. Among them, in the third feature matrix, the first 100×100×1 is the first channel, and the last 100×100×1 is the second channel.

[0035] In S33, the third feature is input into the second convolutional neural network for feature comparison. Taking the aforementioned matrix as an example, when the third feature matrix is ​​input into the second convolutional network, the feature comparison is performed through the second convolutional neural network, and the difference between the first channel and the second channel can be output, that is, the difference between the first feature of the first background image and the second feature of the second background image, and the output is the result features after the corresponding areas of the two different images are compared on the feature plane, and these features represent the differences between pixels.

[0036] Another embodiment of the present invention also discloses a method for detecting abnormal events. When performing feature comparison, the two channels of the third feature and the output of the second convolutional neural network all use an attention mechanism. By using the attention mechanism for feature comparison, it is possible to determine which channel the feature comparison result output by the second convolutional neural network comes from, thereby determining the background image and position where the output is located. Taking the first background image as an example, when there is no retention in the first background image and there is a retention in the middle of the second background image, the result of feature extraction is a picture. After feature extraction, the first feature output by the first background image is a feature image that does not contain retention, and the second feature output by the second background image is a feature image that contains retention. The two feature images are connected as the third feature with two channels, and the attention mechanism is used on the two input channels and the output feature images. At this time, the output of the second convolutional neural network using the attention mechanism is the difference judgment result of whether there is an object (i.e., retention) in the two feature images. At the same time, due to the use of the attention mechanism, the second convolutional neural network can determine that the retention in the output comes from the second background image, and the original position is located in the middle of the second feature image, so that it can help monitoring personnel quickly and accurately determine the existence and specific location of abnormal events, and improve the processing efficiency of abnormal events.

[0037] Another embodiment of the present invention also discloses a method for detecting abnormal events, and the detection method further includes the following steps: when an abnormal event exists, displaying the background image where the abnormal event is located, marking the abnormal event, and / or displaying the corresponding abnormal type. In this embodiment, due to the use of the attention mechanism, the corresponding background image and position can be determined when an abnormal event exists. In one embodiment, taking the presence of a stranded object in the second background image as an example, the second background image can be displayed by a remote terminal or a field monitoring display, and the stranded object therein is marked with a frame line. Preferably, in a multi-video stream application scenario, the camera position corresponding to the video stream source of the background image where the abnormal event exists is displayed at the same time, so that the monitoring personnel can handle the abnormality in a timely and accurate manner. In addition, since there may be multiple abnormal events, this embodiment can also determine the type of abnormal event and display it according to the result of feature comparison. Taking lost objects and stranded objects as an example, when the first moment is earlier than the second moment, if the result of the feature comparison is greater than the threshold, an object image is output, and the object comes from the first background image, but not on the second background image, then the object is a lost object at this time, and the abnormal type at this time is displayed as the lost item, and the cause may be theft of the item. Correspondingly, when the result of feature comparison is greater than the threshold, an object image is output and the object comes from the second background image but not on the first background image, then the object is a retained object, which may be caused by the object being forgotten.

[0038] Another embodiment of the present invention also discloses a method for detecting abnormal events, which further includes the following steps: obtaining a first scene image of each scene, wherein the first scene image does not include a person; performing illumination processing and / or shadow processing on the first scene image to obtain a second scene image; adding a possible abnormal event image to the second scene image to obtain a third scene image; using the first scene image and the third scene image as input to construct a positive sample set; using the first scene image and the second scene image as input to construct a negative sample set; training the positive sample set and the negative sample set to obtain a first convolutional neural network and a second convolutional neural network. In this embodiment, the first scene image is first collected, and then the first scene image is subjected to illumination processing and / or shadow processing, so that a variety of samples can be quickly constructed to improve efficiency. The problems of low efficiency, long time consumption, and incomplete samples existing in the acquisition of samples with different illumination and different shadows by the camera are avoided. Then, according to the detection needs, possible abnormal event images are added to the second scene image. When only retained objects and lost objects need to be detected, only common object images need to be used as possible abnormal event images, and added to each possible position of the second scene image in the form of a map to quickly construct a variety of samples. When other tests are required at the same time, such as safety clothing that does not meet the standards, safety helmets that are not worn properly, abnormal open flames, etc., the corresponding pictures are added to the second scene pictures to obtain the corresponding third scene pictures. Then the convolutional neural network model is trained. The first scene picture and the second scene picture only differ in lighting and / or shadows, and there are no abnormal events that need to be detected, so they are input as negative samples. Correspondingly, the first scene picture and the third scene picture contain both lighting and / or shadow changes and abnormal event pictures, so they are input as positive samples. Then the positive sample set and the negative sample set are trained to obtain the first convolutional neural network and the second convolutional neural network. The sample construction and training method in this embodiment can further reduce the influence of factors such as lighting and shadows on abnormal event detection, and further improve the accuracy of detection.

[0039] Another embodiment of the present invention also discloses a method for detecting abnormal events, and the detection method further includes the following steps: when an abnormal event exists, taking the first background image and the second background image as input and adding them to the positive sample set; when an abnormal event does not exist, taking the first background image and the second background image as input and adding them to the negative sample set; updating the first convolutional neural network and the second convolutional neural network. In this embodiment, by adding the background images in the background model to the sample set, the number of sample sets can be increased, the convolutional neural network can be updated, and the detection accuracy can be improved. Preferably, the first convolutional neural network and the second convolutional neural network are updated according to a fixed update cycle. It can avoid too many samples, and can also improve the adaptability of the convolutional neural network to the scene by using the background images contained in the background model in the collected video stream as the sample set, continuously optimize the convolutional neural network, and improve the detection accuracy.

[0040] Another embodiment of the present invention also discloses a method for detecting abnormal events, and a background model is constructed according to a video stream, and the background model includes a step S2 of background pictures at multiple moments, including: S21: obtaining the initial frame picture of the video stream as the background picture at the initial moment; S22: determining the background pictures at other moments in chronological order, setting the moment corresponding to the (N+1)th frame picture in the video stream as t, when the (N+1)th frame picture has an abnormal change compared with the Nth frame picture, and the frame picture of the video stream remains stable from moment t to moment (t+m), the (N+1)th frame picture is used as the background picture at moment (t+m), wherein N is a natural number, and t and m are positive numbers; S23: the background model is composed of background pictures at multiple moments. In this embodiment, by setting the value of m, it can be set that when the duration of a certain abnormality exceeds m, it is determined as an abnormal event, which simply avoids misjudgment and further improves the accuracy.

[0041] In one embodiment, a video stream with a duration of 10 minutes and 100 frames of images is obtained as an example. The first frame of the image is used as the initial moment, that is, the background image at time T=0. If the second frame of the image has no abnormal changes compared to the first frame of the image, the first frame of the image is still used as the background image at the moment corresponding to the second frame of the image, that is, T=6s. If the third frame of the image has no abnormal changes compared to the second frame of the image, the background images at T=0, T=6s and T=12s are all the first frame of the image. Assuming that a certain abnormal change, such as the judgment time threshold m of the presence of a retained object, is 180 seconds, if the fourth frame of the picture shows an abnormal change compared to the third frame of the picture, such as the appearance of a new object, that is, N = 3, then t = 18s, and the frame pictures of the video stream remain stable from T = t = 18s to T = t + m = 198s, that is, the new object continues to exist in the fourth frame of the video stream to the thirty-fourth frame, then the background picture of T = 198s is the fourth frame, and the background pictures before T = 198s are all the first frame. If the thirty-fifth frame has no abnormal change compared to the thirty-fourth frame, the background picture of T = 204s is the same as that of T = 198s, both of which are the fourth frame. Thus, the background pictures of each moment corresponding to the entire video stream are determined in chronological order, and the background model is composed of the background pictures of each moment. By setting the time threshold of the background picture in the background model for conditional update, the time thresholds of different abnormal changes can be set differently according to the different abnormal changes corresponding to different abnormal events, thereby improving the accuracy of detection. At the same time, it can also avoid misjudgment caused by short-term intervention factors. That is, in the detection method of this embodiment, if only a new object passes by, that is, it briefly appears and disappears in the video stream, at this time, since the set time threshold is not reached, the background picture at the corresponding moment will not contain the new object, thereby avoiding misjudgment.

[0042] The embodiment of the present invention also discloses an abnormal event detection system 1, including: an acquisition module 2, for acquiring a video stream; a processing module 3, which is in communication with the acquisition module 2 and is used to process the video stream using any detection method in the aforementioned embodiment to determine whether an abnormal event exists. The acquisition module 2 can acquire the video stream through a camera or other photographic device with a picture shooting function, and transmit the acquired video stream to the processing module 3, and the processing module 3 can use any detection method in the aforementioned embodiment to determine whether an abnormal event exists.

[0043] The adoption of the above technical solution can reduce the error of abnormal event detection and improve the accuracy.

[0044] Preferably, when an abnormal event is confirmed, the processing module can remind the abnormal event as needed, for example, the abnormal event detection system 1 is provided with a display module, and the display module displays the type of abnormal event, the corresponding background picture, etc. Certain alarms can also be made, such as pop-up message prompts, on-site buzzer alarms, indicator light alarms, to promptly remind monitoring personnel to handle the abnormality.

[0045] An embodiment of the present invention further discloses a computing device, comprising: a processor, adapted to implement various instructions; a memory, adapted to store a plurality of instructions, wherein the instructions are adapted to be loaded by the processor and execute any one of the detection methods in the aforementioned embodiments.

[0046] The embodiments of the present invention further disclose a storage medium, wherein the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the detection methods in the aforementioned embodiments.

[0047] The various embodiments disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, and the programmable system includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage element), at least one input device and at least one output device. Program code can be applied to input instructions to perform each function described in the present application and generate output information. Output information can be applied to one or more output devices in a known manner. For the purpose of the present application, the processing system includes any system with a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC) or a microprocessor.

[0048] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0049] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0050] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0051] It should be noted that the modules / units mentioned in the various device embodiments of the present application are all logical modules / units. Physically, a logical module / unit can be a physical module / unit, or a part of a physical module / unit, or can be implemented as a combination of multiple physical modules / units. The physical implementation method of these logical modules / units themselves is not the most important. The combination of functions implemented by these logical modules / units is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce modules / units that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other modules / units in the above-mentioned device embodiments.

[0052] Although the present invention has been illustrated and described with reference to certain preferred embodiments of the present invention, it should be understood by those skilled in the art that the above is a further detailed description of the present invention in conjunction with specific embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. Those skilled in the art may make various changes in form and details, including making several simple deductions or substitutions, without departing from the spirit and scope of the present invention.

Claims

1. A method for detecting abnormal events, characterized in that: The following steps are involved: Get the video stream; Constructing a background model according to the video stream, wherein the background model includes background images at multiple moments; Acquire a first background picture corresponding to a first moment and a second background picture corresponding to a second moment from the background model; Extracting features from the first background image and the second background image respectively, and then performing feature comparison; Determine whether the abnormal event exists according to the result of the feature comparison, The step of constructing a background model according to the video stream, wherein the background model includes background images at multiple moments, comprises: Obtaining an initial frame image of the video stream as a background image at an initial moment; Determine the background images at other moments in chronological order, set the moment corresponding to the (N+1)th frame image in the video stream as t, and when the (N+1)th frame image has an abnormal change compared with the Nth frame image, and the frame images of the video stream remain stable from moment t to moment (t+m), use the (N+1)th frame image as the background image at moment (t+m). Wherein, N is a natural number, t and m are positive numbers; The background model is composed of the background images at multiple moments.

2. The detection method according to claim 1, characterized in that The steps of respectively extracting features from the first background image and the second background image and then comparing the features include: Using a first convolutional neural network to extract features from the first background image and the second background image respectively, to obtain corresponding first features and second features; Connecting the first feature and the second feature to obtain a third feature having two channels; The third feature is input into the second convolutional neural network for feature comparison.

3. The detection method according to claim 2, characterized in that When performing the feature comparison, the two channels of the third feature and the output of the second convolutional neural network both use an attention mechanism.

4. The detection method according to claim 3, characterized in that The following steps are also included: When the abnormal event exists, the background image where the abnormal event is located is displayed, and the abnormal event is marked, and / or the corresponding abnormal type is displayed.

5. The detection method according to claim 2, characterized in that: The following steps are also included: Acquire a first scene picture of each scene, wherein the first scene picture does not include a person; Performing illumination processing and / or shadow processing on the first scene image to obtain a second scene image; Adding a possible abnormal event picture to the second scene picture to obtain a third scene picture; Taking the first scene picture and the third scene picture as input, constructing a positive sample set; Taking the first scene picture and the second scene picture as input, constructing a negative sample set; The positive sample set and the negative sample set are trained to obtain the first convolutional neural network and the second convolutional neural network.

6. The detection method according to claim 5, characterized in that The following steps are also included: When the abnormal event exists, taking the first background image and the second background image as input, and adding them to the positive sample set; When the abnormal event does not exist, taking the first background image and the second background image as input, and adding them to the negative sample set; Update the first convolutional neural network and the second convolutional neural network.

7. An abnormal event detection system, characterized in that: include: An acquisition module is used to acquire video streams; A processing module is communicatively connected to the acquisition module, and the processing module is used to process the video stream using the detection method according to any one of claims 1 to 6 to determine whether there is an abnormal event.

8. A computing device, characterized in that include: A processor, suitable for implementing various instructions; A memory, adapted to store a plurality of instructions, wherein the instructions are adapted to be loaded by the processor and execute the detection method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for detecting, tracking and identifying object abandoning / stealing event

    CN101727672A

  • Remaining object and stolen moving object detection method and equipment and storage medium

    CN110321808A

  • Monitoring video leaf shielding detection method based on scene depth information perception

    CN111582074A

  • Automatic alarm method and system based on video stream image

    CN111601011A