CN114429616A - Box abnormal state identification method based on computer vision - Google Patents
Box abnormal state identification method based on computer vision Download PDFInfo
- Publication number
- CN114429616A CN114429616A CN202210094293.9A CN202210094293A CN114429616A CN 114429616 A CN114429616 A CN 114429616A CN 202210094293 A CN202210094293 A CN 202210094293A CN 114429616 A CN114429616 A CN 114429616A
- Authority
- CN
- China
- Prior art keywords
- pictures
- door
- computer vision
- abnormal state
- identification method
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- 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)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Closed-Circuit Television Systems (AREA)
Abstract
The invention relates to the technical field of video monitoring, and particularly discloses a box abnormal state identification method based on computer vision, which comprises the following steps: s1, acquiring and decoding video data in a preset format; s2, framing the decoded video data to generate a plurality of pictures, S3, preprocessing the pictures, classifying and marking the pictures to construct a training picture set; the marks comprise an opened door and an unopened door; s4, inputting the training picture set into a neural network model for training; s5, judging by using the trained neural network model, and outputting a judgment result; and S6, when the door is opened, judging whether the door is opened abnormally or not based on the operation log, and if so, generating alarm information. By adopting the technical scheme of the invention, abnormal door opening can be automatically identified.
Description
Technical Field
The invention relates to the technical field of video monitoring, in particular to a box abnormal state identification method based on computer vision.
Background
In the construction of smart cities, some dangerous areas and important places are not allowed to enter by common people, such as a box-type transformer station with high voltage electricity, a microcomputer room for deploying important equipment and the like, and in order to avoid personnel safety accidents or loss of public equipment caused by abnormal opening of a box body, the abnormal opening state of the box body needs to be monitored and alarmed in real time.
The conventional scheme for monitoring abnormal door opening of the existing box at home and abroad is to use a door magnetic sensor, the monitoring scheme can only realize monitoring of the opening and closing state of the box door, real-time analysis of a split door scene cannot be realized, and the method has great limitation. For example, the box body may not have door magnet installation conditions, or door magnet data cannot be uploaded to a remote control center; the scene cannot be intelligently identified, and normal opening and abnormal opening cannot be identified; the door magnetic element is easy to damage, so that the door opening of the box body cannot be normally monitored.
In other schemes, video equipment can be linked, video monitoring equipment is installed to monitor the box body continuously for 24 hours, when the door magnetic sensor monitors that the box body is opened abnormally, an alarm message is pushed, and then a manager opens the corresponding video monitoring equipment to browse or playback historical video data in real time, but the monitoring method needs manual processing and is low in working efficiency.
Therefore, a method for recognizing abnormal state of a case based on computer vision, which can perform automatic recognition, is required.
Disclosure of Invention
The invention provides a box abnormal state identification method based on computer vision, which can automatically identify abnormal door opening.
In order to solve the technical problem, the present application provides the following technical solutions:
the method for identifying the abnormal state of the box body based on computer vision comprises the following steps:
s1, acquiring and decoding video data in a preset format;
s2, framing the decoded video data to generate a plurality of pictures,
s3, preprocessing the pictures, classifying and marking the pictures, and constructing a training picture set; the marks comprise a door opening and a door not opening;
s4, inputting the training picture set into a neural network model for training;
s5, judging by using the trained neural network model, and outputting a judgment result;
and S6, when the door is opened, judging whether the door is opened abnormally or not based on the operation log, and if so, generating alarm information.
The basic scheme principle and the beneficial effects are as follows:
because the video data can be encoded and compressed in order to reduce the volume of the video, each frame in the video data can be restored by decoding the video data, so that the subsequent framing is facilitated. Through framing, a large number of pictures can be obtained, and the sample richness of the training picture set is guaranteed. By preprocessing the picture, the purpose of optimizing the sample is achieved, and the training effect of neural network model identification can be improved. After the neural network model is trained successfully, whether the box body is opened or not can be judged in real time. When the door is opened, the operation log is combined, and whether the door is opened abnormally or not can be accurately judged.
In conclusion, the scheme can realize the automatic identification of the abnormal state of the box body.
Further, in S2, framing the decoded video data according to a first preset rule; the first preset rule comprises the interval of processing frames, the size of pictures and the storage path of the pictures.
By setting the interval of processing frames, the number of generated pictures can be adjusted.
Further, in S3, during the preprocessing, the image is converted into a gray image, the gray image is subjected to eight-bit plane decomposition, and one of the two-bit plane image classification flags is extracted.
By converting the image into a gray image and carrying out eight-bit plane decomposition, partial information can be filtered out, and the interference of excessive information on training is avoided.
Further, in S5, video data in a preset format is obtained in real time and decoded; and framing the decoded video data according to a second preset rule to generate a plurality of pictures, preprocessing the pictures and inputting the preprocessed pictures into the trained neural network model.
Compared with training, the number of generated pictures can be adjusted according to actual conditions by setting a second preset rule without needing excessive pictures in actual operation.
Further, in S6, the time of door opening is acquired, and it is determined whether or not a door opening plan corresponding to the time is described in the operation log, and if not, it is determined that the door is opened abnormally.
When the staff normally patrols or maintains, the door opening plan can be recorded in the operation log. And when the door opening plan corresponding to the time does not exist in the operation log, indicating that the non-working personnel normally operate, so that the abnormal door opening can be judged.
Further, in S3, after eight-bit plane decomposition is performed on the grayscale image, some bit plane images are discarded according to a preset standard, and one of the bit plane images is randomly extracted from the remaining bit plane images for classification and labeling.
And discarding a plurality of bit plane images according to a preset standard, so that the bit plane images which do not contain valid information can be removed, and invalid training is avoided.
Further, in S1, the preset format is an h.264 format.
The H.264 format has high compression rate, and the volume of video data can be reduced.
Further, in S1, decoding is performed by FFMpeg.
FFmpeg is a set of open source computer programs that can be used to convert digital video and can convert it into a stream, which contains a rich video decoding library.
Further, in S4, the neural network model is a convolutional neural network model.
In image recognition, the convolutional neural network model has higher accuracy than other neural networks.
Drawings
FIG. 1 is a flowchart illustrating a method for identifying abnormal conditions of a housing based on computer vision according to an embodiment.
Detailed Description
The following is further detailed by way of specific embodiments:
example one
As shown in fig. 1, the method for identifying an abnormal state of a box based on computer vision of the present embodiment includes the following steps:
and S1, acquiring the video data with the preset format and decoding. In this embodiment, the preset format is h.264 format, and decoding is performed by FFMpeg. In order to reduce the volume of the video and reduce the occupied bandwidth during transmission, the video is subjected to coding compression so as to reduce the volume. In the h.264 format, the encoding algorithm is intra-frame compression and inter-frame compression, the intra-frame compression is an algorithm for generating an I frame, the inter-frame compression is an algorithm for generating a B frame and a P frame, wherein the I frame is a key frame, the recorded information of the P frame is the difference between the frame and a previous key frame (or P frame), the B frame is a bidirectional difference frame, and the recorded information is the difference between the frame and previous and next frames. Decoding is required to recover each frame of video data.
And S2, framing the decoded video data according to a first preset rule to generate a plurality of pictures. In this embodiment, a segmentation component in OpenCV is used for framing. In this embodiment, the first preset rule includes an interval of processing frames, a size of a picture, and a storage path of the picture. The interval of processing frames, i.e. how many frames a picture is taken once. For example, 1 picture is generated at a frame rate of 25fps and an interval of 25 frames to be processed, i.e., 1 second.
S3, preprocessing the pictures, classifying and marking the pictures, and constructing a training picture set; the indicia include open doors and unopened doors. During preprocessing, the image is converted into a gray image, the gray image is subjected to eight-bit plane decomposition, and one bit plane image classification mark is extracted. Grayscale images, i.e., 8-bit 256 color images. By extracting each bit of the image respectively, one image can be decomposed into 8 images.
In this embodiment, during the preprocessing, after eight-bit plane decomposition is performed on the grayscale image, several bit plane images are discarded according to a preset standard, and one of the bit plane images is randomly extracted from the rest of the bit plane images for classification and labeling. The predetermined criterion is to discard the bit-plane image that does not contain valid information. For example, the 8-bit plane maps generated by decomposition are respectively denoted as bit plane map 1, bit plane map 2, bit plane map 3, and bit plane map 4 … … bit plane map 8. according to experience, bit plane map 1 and bit plane map 2 usually contain sufficient valid information for training, so the predetermined criteria is to discard bit plane map 3 to bit plane map 8 and randomly extract bit plane map 1 or bit plane map 2 for classification labeling.
S4, inputting the training picture set into a neural network model for training; the neural network model is a convolutional neural network model. In this embodiment, the convolutional neural network model is a convolutional neural network model component in OpenCV.
And S5, judging by using the trained neural network model, and outputting a judgment result. Specifically, video data in a preset format is acquired in real time and decoded; and framing the decoded video data according to a second preset rule to generate a plurality of pictures, preprocessing the pictures and inputting the preprocessed pictures into the trained neural network model. In this embodiment, the difference between the second preset rule and the first preset rule is that the interval of the processing frame is not needed any more, that is, compared with the recognition and training, a large number of pictures are not needed any more, and by increasing the interval of the processing frame, the number of generated pictures can be reduced.
And S6, when the door is opened, judging whether the door is opened abnormally or not based on the operation log, and if so, generating alarm information. Specifically, the door opening time is obtained, whether a door opening plan corresponding to the time is recorded in the operation log is judged, and if not, abnormal door opening is judged. In this embodiment, before the staff patrols and examines, maintains etc. the operation, have corresponding patrolling and examining schedule or maintenance schedule, wherein involve and get into the content of box and can draw out and add as the plan of opening the door and add in the operation log, as the foundation of judgement.
Example two
The difference between this embodiment and the first embodiment is that in S5 of this embodiment, whether there is a person in the monitored area is also determined by the face recognition module; when people exist in the monitoring area, face recognition is carried out, whether the people are on record or not is judged, if not, the corresponding video data is marked as high-priority video data, and if the people are on record, the corresponding video data is marked as low-priority video data. And during framing, performing framing processing on the high-priority video data corresponding to the camera in the preset area preferentially.
When no person exists in the monitoring area, the possibility of abnormal opening of the box door is low, pictures are extracted at preset time intervals and input into the neural network model for judgment, instead of judging the pictures in real time, and the pressure of processing by the neural network model can be reduced. The face data of the workers are collected in advance, and the workers can be accurately identified through face identification. When the staff appears in the monitoring area, namely near the box body, the possibility of maintenance or inspection is high, the corresponding video data is marked as low-priority video data, and the processing does not need to be carried out immediately when the framing module is busy.
EXAMPLE III
The difference between this embodiment and the first embodiment is that in S5 in this embodiment, when there is no person in the monitored area, pictures are extracted at preset time intervals, and the pictures are input into the trained neural network model for determination, and in this embodiment, 1 picture is extracted.
When people exist in the monitoring area, the number of preset pictures input into the neural network model is determined according to the high-priority video data and the low-priority video data, and the pictures corresponding to the high-priority video data are preferentially input into the neural network model for judgment. The number of the preset pictures corresponding to the high-priority video data is larger than that of the preset pictures corresponding to the low-priority video data. In this embodiment, when the analysis module inputs the pictures into the neural network model, one picture is extracted at intervals of a preset number and input into the neural network model until the number of the input pictures is equal to the preset number of pictures or the judgment result of the neural network model is that the door is opened.
For example, the number of the preset pictures corresponding to the high-priority video data is 20, and one picture is extracted every 5 pictures at intervals and input into the neural network model.
Sufficient recognition and judgment can be ensured when no worker is present near the box body.
The above are merely examples of the present invention, and the present invention is not limited to the field related to this embodiment, and the common general knowledge of the known specific structures and characteristics in the schemes is not described herein too much, and those skilled in the art can know all the common technical knowledge in the technical field before the application date or the priority date, can know all the prior art in this field, and have the ability to apply the conventional experimental means before this date, and those skilled in the art can combine their own ability to perfect and implement the scheme, and some typical known structures or known methods should not become barriers to the implementation of the present invention by those skilled in the art in light of the teaching provided in the present application. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.
Claims (9)
1. The method for identifying the abnormal state of the box body based on computer vision is characterized by comprising the following steps of:
s1, acquiring and decoding video data in a preset format;
s2, framing the decoded video data to generate a plurality of pictures,
s3, preprocessing the pictures, classifying and marking the pictures, and constructing a training picture set; the marks comprise a door opening and a door not opening;
s4, inputting the training picture set into a neural network model for training;
s5, judging by using the trained neural network model, and outputting a judgment result;
and S6, when the door is opened, judging whether the door is opened abnormally or not based on the operation log, and if so, generating alarm information.
2. The computer vision-based box abnormal state identification method according to claim 1, characterized in that: in S2, framing the decoded video data according to a first preset rule; the first preset rule comprises the interval of processing frames, the size of pictures and the storage path of the pictures.
3. The computer vision-based box abnormal state identification method according to claim 2, characterized in that: in S3, during preprocessing, the image is converted into a grayscale image, and the grayscale image is subjected to eight-bit plane decomposition to extract one-bit plane image classification flag.
4. The computer vision-based box abnormal state identification method according to claim 3, characterized in that: in S5, acquiring and decoding video data in a preset format in real time; and framing the decoded video data according to a second preset rule to generate a plurality of pictures, preprocessing the pictures and inputting the preprocessed pictures into the trained neural network model.
5. The computer vision-based box abnormal state identification method according to claim 4, characterized in that: in S6, the time of opening the door is obtained, and it is determined whether or not a door opening plan corresponding to the time is recorded in the operation log, and if not, it is determined that the door is opened abnormally.
6. The computer vision-based box abnormal state identification method according to claim 5, characterized in that: in S3, after eight-bit plane decomposition is performed on the grayscale image, several bit plane images are discarded according to a preset standard, and one of the bit plane images is randomly extracted from the remaining bit plane images for classification and labeling.
7. The computer vision-based box abnormal state identification method according to claim 6, characterized in that: in the S1, the preset format is h.264 format.
8. The computer vision-based box abnormal state identification method according to claim 7, characterized in that: in S1, decoding is performed by FFMpeg.
9. The computer vision-based box abnormal state identification method according to claim 8, characterized in that: in S4, the neural network model is a convolutional neural network model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210094293.9A CN114429616B (en) | 2022-01-26 | 2022-01-26 | Box abnormal state identification method based on computer vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210094293.9A CN114429616B (en) | 2022-01-26 | 2022-01-26 | Box abnormal state identification method based on computer vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114429616A true CN114429616A (en) | 2022-05-03 |
CN114429616B CN114429616B (en) | 2024-07-26 |
Family
ID=81313746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210094293.9A Active CN114429616B (en) | 2022-01-26 | 2022-01-26 | Box abnormal state identification method based on computer vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114429616B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115116005A (en) * | 2022-06-29 | 2022-09-27 | 济南银捷实业有限公司 | A method for closing cash box, on-site unmanned algorithm model training and logical judgment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018000116A1 (en) * | 2016-06-26 | 2018-01-04 | 康丰生 | Face recognition-based safe box |
CN109033993A (en) * | 2018-06-29 | 2018-12-18 | 南京行者易智能交通科技有限公司 | A kind of method and device of image recognition detection switch door |
CN110427815A (en) * | 2019-06-24 | 2019-11-08 | 特斯联(北京)科技有限公司 | Realize the method for processing video frequency and device of the effective contents interception of gate inhibition |
CN110647192A (en) * | 2019-09-03 | 2020-01-03 | 泰安东华合创软件有限公司 | Intelligent monitoring and management system for firearms |
US20200320311A1 (en) * | 2019-04-04 | 2020-10-08 | Icomera Ab | Systems and methods for door error detection |
CN112381066A (en) * | 2020-12-10 | 2021-02-19 | 杭州西奥电梯有限公司 | Abnormal behavior identification method for elevator riding, monitoring system, computer equipment and storage medium |
CN112542021A (en) * | 2020-12-18 | 2021-03-23 | 三门核电有限公司 | Normally closed fireproof door intelligent monitoring system and method |
CN113158888A (en) * | 2021-04-19 | 2021-07-23 | 广州咔隆安防科技有限公司 | Elevator abnormal video identification method |
CN113393625A (en) * | 2021-05-08 | 2021-09-14 | 中电海康集团有限公司 | Anti-theft alarm evidence obtaining method and system for intelligent lamp pole |
CN113901895A (en) * | 2021-09-18 | 2022-01-07 | 武汉未来幻影科技有限公司 | Door opening action recognition method and device for vehicle and processing equipment |
CN113923418A (en) * | 2021-10-28 | 2022-01-11 | 北京国基科技股份有限公司 | System and method for detecting abnormal opening of box door based on video analysis |
-
2022
- 2022-01-26 CN CN202210094293.9A patent/CN114429616B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018000116A1 (en) * | 2016-06-26 | 2018-01-04 | 康丰生 | Face recognition-based safe box |
CN109033993A (en) * | 2018-06-29 | 2018-12-18 | 南京行者易智能交通科技有限公司 | A kind of method and device of image recognition detection switch door |
US20200320311A1 (en) * | 2019-04-04 | 2020-10-08 | Icomera Ab | Systems and methods for door error detection |
CN110427815A (en) * | 2019-06-24 | 2019-11-08 | 特斯联(北京)科技有限公司 | Realize the method for processing video frequency and device of the effective contents interception of gate inhibition |
CN110647192A (en) * | 2019-09-03 | 2020-01-03 | 泰安东华合创软件有限公司 | Intelligent monitoring and management system for firearms |
CN112381066A (en) * | 2020-12-10 | 2021-02-19 | 杭州西奥电梯有限公司 | Abnormal behavior identification method for elevator riding, monitoring system, computer equipment and storage medium |
CN112542021A (en) * | 2020-12-18 | 2021-03-23 | 三门核电有限公司 | Normally closed fireproof door intelligent monitoring system and method |
CN113158888A (en) * | 2021-04-19 | 2021-07-23 | 广州咔隆安防科技有限公司 | Elevator abnormal video identification method |
CN113393625A (en) * | 2021-05-08 | 2021-09-14 | 中电海康集团有限公司 | Anti-theft alarm evidence obtaining method and system for intelligent lamp pole |
CN113901895A (en) * | 2021-09-18 | 2022-01-07 | 武汉未来幻影科技有限公司 | Door opening action recognition method and device for vehicle and processing equipment |
CN113923418A (en) * | 2021-10-28 | 2022-01-11 | 北京国基科技股份有限公司 | System and method for detecting abnormal opening of box door based on video analysis |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115116005A (en) * | 2022-06-29 | 2022-09-27 | 济南银捷实业有限公司 | A method for closing cash box, on-site unmanned algorithm model training and logical judgment |
Also Published As
Publication number | Publication date |
---|---|
CN114429616B (en) | 2024-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106408832B (en) | A kind of monitoring method and system of noiseless visitor | |
CN112001284A (en) | Labor service real-name system management system based on artificial intelligence | |
CN111985807A (en) | Campus security remote monitoring management system based on big data | |
CN109426798A (en) | A kind of border intrusion detection method, apparatus and system | |
CN111402532A (en) | Comprehensive security video management control system | |
CN211184122U (en) | Intelligent video analysis system for linkage of railway operation safety prevention and control and large passenger flow early warning | |
CN206271580U (en) | A switch based on image recognition position | |
CN114078224A (en) | A kind of infrastructure on-site monitoring system and method based on 5G network architecture | |
CN114429616A (en) | Box abnormal state identification method based on computer vision | |
CN114500950B (en) | Box abnormal state detection system and method based on smart city | |
CN115309871A (en) | Industrial big data processing method and system based on artificial intelligence algorithm | |
CN117197713A (en) | Extraction method based on digital video monitoring system | |
CN116343419A (en) | Intelligent video monitoring alarm management system | |
CN117879159A (en) | Comprehensive monitoring system of transformer substation for residential area | |
CN115512304B (en) | Image recognition-based subway station security monitoring system | |
CN114429617B (en) | Abnormal recognition result processing method applied to smart city box detection | |
CN114390260A (en) | Hazardous area and important place monitoring platform applied to smart city | |
CN118506273A (en) | Risk feature quantity twin method and system based on power monitoring video stream | |
CN118470636A (en) | Building site safety wearing detection method and system based on edge calculation | |
KR20130047131A (en) | Method and system for surveilling contents of surveillance using mobile terminal | |
CN113158888A (en) | Elevator abnormal video identification method | |
CN117201739A (en) | Real-time monitoring method, system and device for construction operation and storage medium | |
CN212754473U (en) | An artificial intelligence-based helmet recognition system | |
CN112669553A (en) | Unattended system and method for oil and gas station | |
CN115880821A (en) | Access control management method based on digital twin and AIoT technology |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |