+

CN113111823A - Abnormal behavior detection method and related device for building construction site - Google Patents

Abnormal behavior detection method and related device for building construction site Download PDF

Info

Publication number
CN113111823A
CN113111823A CN202110435672.5A CN202110435672A CN113111823A CN 113111823 A CN113111823 A CN 113111823A CN 202110435672 A CN202110435672 A CN 202110435672A CN 113111823 A CN113111823 A CN 113111823A
Authority
CN
China
Prior art keywords
key frame
frames
key
frame
abnormal behavior
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
Application number
CN202110435672.5A
Other languages
Chinese (zh)
Inventor
吴晓鸰
曹智雄
凌捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202110435672.5A priority Critical patent/CN113111823A/en
Publication of CN113111823A publication Critical patent/CN113111823A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Alarm Systems (AREA)

Abstract

本申请公开了一种建筑施工地的异常行为检测方法和相关装置,方法包括:获取建筑施工地的监控视频;通过帧间差分算法提取监控视频的若干第一关键帧;基于感知哈希算法提取各第一关键帧的指纹字符串,并基于指纹字符串对第一关键帧进行筛选,得到第二关键帧;将第二关键帧发送到边缘服务器,使得边缘服务器通过预置判别模型对第二关键帧进行异常行为检测,得到检测结果。本申请解决了现有技术中的传感器获得的视频中,重复的施工画面较多,长时间传输相同的视频或图像造成数据冗余,使得能耗较高,监控设备的使用寿命较短的技术问题。

Figure 202110435672

The present application discloses a method for detecting abnormal behavior of a building construction site and a related device. The method includes: acquiring a surveillance video of the building construction site; extracting several first key frames of the surveillance video through an inter-frame difference algorithm; extracting a number of first key frames of the surveillance video based on a perceptual hash algorithm The fingerprint string of each first key frame, and the first key frame is filtered based on the fingerprint string to obtain the second key frame; the second key frame is sent to the edge server, so that the edge server uses the preset discrimination model to identify the second key frame. The key frame is used for abnormal behavior detection, and the detection result is obtained. The present application solves the problem that in the video obtained by the sensor in the prior art, there are many repeated construction pictures, and the transmission of the same video or image for a long time causes data redundancy, resulting in high energy consumption and short service life of monitoring equipment. question.

Figure 202110435672

Description

Abnormal behavior detection method and related device for building construction site
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and a related apparatus for detecting abnormal behaviors in a building construction site.
Background
The construction industry develops rapidly, and the quantity of construction projects increases day by day. The method is not matched with the rapid development of the construction industry, the situation that the informatization degree and the datamation degree are not high generally exists in the construction engineering, the intellectualization still stays at the theoretical level, the construction accident happens sometimes, and the development of the safety management level of the construction engineering is hindered. The engineering construction industry has long-term problems of extensive industry development mode, low skill quality of construction workers, imperfect supervision system, laggard technical equipment and the like, and has negative influence on construction efficiency and management flow.
The current common measures are to improve the production and management processes by utilizing a new generation of information technology, such as a Building Information Model (BIM), mobile communication, intellectualization, the Internet of things and the like, so as to ensure the life and property safety of building employees, reduce the production cost and improve the profit margin of enterprises. In the existing building construction safety monitoring scheme, a video sensor module is arranged on a construction site through wiring, a site video or picture is collected, and image characteristics are extracted; the video sensor module compresses the collected video and image data, reduces the data amount of transmission, and sends the data to a terminal system through a line. And an operator beside the terminal system judges whether the construction site has a safety problem or not by analyzing the received video data and provides a warning. According to the scheme, in videos obtained by the sensor, repeated construction pictures are more, data redundancy is easily caused by long-time transmission of the same videos or images, energy consumption is higher, and the service life of monitoring equipment is shortened.
Disclosure of Invention
The application provides an abnormal behavior detection method and a related device for a building construction site, which are used for solving the technical problems that in videos obtained by a sensor in the prior art, repeated construction pictures are more, and data redundancy is caused by long-time transmission of the same videos or images, so that the energy consumption is higher, and the service life of monitoring equipment is shorter.
In view of the above, a first aspect of the present application provides a method for detecting abnormal behavior at a construction site, including:
acquiring a monitoring video of a building construction site;
extracting a plurality of first key frames of the monitoring video through an interframe difference algorithm;
extracting a fingerprint character string of each first key frame based on a perceptual hash algorithm, and screening the first key frames based on the fingerprint character string to obtain second key frames;
and sending the second key frame to an edge server, so that the edge server detects the abnormal behavior of the second key frame through a preset discrimination model to obtain a detection result.
Optionally, the extracting, by using an inter-frame difference algorithm, a plurality of first key frames of the surveillance video includes:
carrying out difference operation on two or three continuous frames of video images in the monitoring video to obtain gray difference;
and judging whether the absolute value of the gray difference is larger than a first threshold value, if so, taking the continuous two-frame or three-frame video image corresponding to the gray difference as a first key frame, and if not, taking only the first frame video image in the continuous two-frame or three-frame video image corresponding to the gray difference as the first key frame.
Optionally, the extracting the fingerprint character string of each first key frame based on the perceptual hash algorithm includes:
reducing the size of each first key frame;
graying each first key frame after being reduced to obtain a gray key frame;
and comparing the pixel values of the adjacent pixels in each gray key frame line by line, recording as 1 if the pixel value of the previous pixel is smaller than that of the next pixel, and recording as 0 if the pixel value of the previous pixel is larger than or equal to that of the next pixel, so as to generate the fingerprint character string of each first key frame.
Optionally, the screening the first keyframe based on the fingerprint character string to obtain a second keyframe includes:
calculating the Hamming distance between the fingerprint character strings of the first key frame of two continuous frames;
and judging whether the Hamming distance is larger than a second threshold value, if so, taking the first key frame of two continuous frames corresponding to the Hamming distance as a second key frame, and if not, taking only the previous frame of the first key frame of the two continuous frames corresponding to the Hamming distance as the second key frame.
Optionally, the edge server performs abnormal behavior detection on the second key frame through a preset discrimination model to obtain a detection result, and the method further includes:
the edge server reconstructs the second key frame through a preset countermeasure generation network model to obtain a reconstructed image, wherein the reconstructed image comprises reconstructed non-shielding constructors;
correspondingly, the edge server performs abnormal behavior detection on the second key frame through a preset discrimination model to obtain a detection result, including:
and the edge server detects abnormal behaviors of the non-shielding constructors in the reconstructed image through a preset discrimination model to obtain a detection result.
The present application provides in a second aspect an abnormal behavior detection apparatus at a construction site, comprising:
the system comprises an acquisition unit, a monitoring unit and a monitoring unit, wherein the acquisition unit is used for acquiring a monitoring video of a building construction site;
the extraction unit is used for extracting a plurality of first key frames of the monitoring video through an interframe difference algorithm;
the screening unit is used for extracting the fingerprint character string of each first key frame based on a perceptual hash algorithm and screening the first key frames based on the fingerprint character string to obtain second key frames;
and the sending unit is used for sending the second key frame to an edge server, so that the edge server detects the abnormal behavior of the second key frame through a preset discrimination model to obtain a detection result.
Optionally, the extracting unit is specifically configured to:
carrying out difference operation on two or three continuous frames of video images in the monitoring video to obtain gray difference;
and judging whether the absolute value of the gray difference is larger than a first threshold value, if so, taking the continuous two-frame or three-frame video image corresponding to the gray difference as a first key frame, and if not, taking only the first frame video image in the continuous two-frame or three-frame video image corresponding to the gray difference as the first key frame.
Optionally, the screening unit is specifically configured to:
reducing the size of each first key frame;
graying each first key frame after being reduced to obtain a gray key frame;
comparing the pixel values of adjacent pixels in each gray key frame line by line, recording as 1 if the pixel value of the previous pixel is smaller than that of the next pixel, and recording as 0 if the pixel value of the previous pixel is greater than or equal to that of the next pixel, so as to generate a fingerprint character string of each first key frame;
calculating the Hamming distance between the fingerprint character strings of the first key frame of two continuous frames;
and judging whether the Hamming distance is larger than a second threshold value, if so, taking the first key frame of two continuous frames corresponding to the Hamming distance as a second key frame, and if not, taking only the previous frame of the first key frame of the two continuous frames corresponding to the Hamming distance as the second key frame.
A third aspect of the present application provides an abnormal behaviour detection apparatus at a construction site, the apparatus comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the method for detecting abnormal behavior at a construction site according to any one of the first aspect according to instructions in the program code.
A fourth aspect of the present application provides a computer-readable storage medium for storing program code for executing the method for detecting abnormal behavior at a construction site according to any one of the first aspect.
According to the technical scheme, the method has the following advantages:
the application provides an abnormal behavior detection method for a building construction site, which comprises the following steps: acquiring a monitoring video of a building construction site; extracting a plurality of first key frames of the monitoring video through an interframe difference algorithm; extracting a fingerprint character string of each first key frame based on a perceptual hash algorithm, and screening the first key frames based on the fingerprint character string to obtain second key frames; and sending the second key frame to the edge server, so that the edge server detects the abnormal behavior of the second key frame through a preset discrimination model to obtain a detection result.
According to the method and the device, after the monitoring video is obtained, repeated video frames in the monitoring video are screened through an interframe difference algorithm and a perceptual hash algorithm, the key frames are extracted, the key frames are sent to an edge server to be detected for abnormal behaviors, the redundancy of transmitted data is reduced, the energy consumption is reduced, the technical problems that in the video obtained by a sensor in the prior art, repeated construction pictures are more, the data redundancy is caused by the fact that the same video or image is transmitted for a long time, the energy consumption is higher, and the service life of monitoring equipment is shorter are solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be 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 only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an abnormal behavior detection method for a construction site according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an abnormal behavior detection apparatus of a building construction site according to an embodiment of the present application.
Detailed Description
The application provides an abnormal behavior detection method and a related device for a building construction site, which are used for solving the technical problems that in videos obtained by a sensor in the prior art, repeated construction pictures are more, and data redundancy is caused by long-time transmission of the same videos or images, so that the energy consumption is higher, and the service life of monitoring equipment is shorter.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
In the monitoring video of the construction site, the building safety video monitoring return flow is large, and most monitoring pictures have low value, so that the significance of returning all monitoring data in real time is not great. Although the existing data compression technology can compress video or image data, the compression rate is not high, and the video data acquisition and the data compression are parallel, so that the performance of a video sensor is preempted.
In order to reduce data transmission of a construction site video monitoring network, reduce transmission cost and prolong the service life of the monitoring network, the embodiment of the application uses 5G combined with mobile edge computing on the premise of not changing original video or image information, utilizes an edge computing platform to analyze and process video data, filters low-value or non-value data, and transmits high-value data back to a cloud center for storage and utilization, thereby better ensuring the safety and privacy of information. The embedded intelligent processing equipment connected with the video sensor is used as an edge server; the edge server stores the video or the image, tests the video/image by using the trained network model, and automatically transmits the detected abnormal condition back to the cloud center server through the 5G network.
For ease of understanding, referring to fig. 1, the present application provides an embodiment of a method for detecting abnormal behavior at a construction site, including:
step 101, acquiring a monitoring video of a building construction site.
The embodiment of the application acquires the monitoring video of the construction site through the video sensor arranged on the construction site.
Step 102, extracting a plurality of first key frames of the monitoring video through an interframe difference algorithm.
The embodiment of the application considers that the video frames in the monitoring video have time redundancy, adjacent frames can contain the same information, whether the frames are key frames or not can be classified according to the maximum irrelevant principle, and meanwhile, the variety of the video frames is guaranteed. When the video frame is analyzed, the similarity of the previous frame and the next frame can be analyzed through image feature extraction and comparison so as to judge whether the information structure of the video frame is changed or not, if the information structure of the video frame is not changed, the frame is discarded, otherwise, the frame is retained.
Specifically, performing difference operation on two or three continuous frames of video images in the monitoring video to obtain gray difference; and judging whether the absolute value of the gray difference is larger than a first threshold value, if so, taking the continuous two-frame or three-frame video image corresponding to the gray difference as a first key frame, and if not, taking only the first frame video image in the continuous two-frame or three-frame video image corresponding to the gray difference as the first key frame. The absolute value of the gray difference of two or three continuous frames of video images in the monitoring video is larger than a first threshold value, which indicates that the frames of video images are obviously changed, and the frames of video images are kept if the monitoring picture has obvious motion, otherwise, indicates that the frames of video images are not obviously changed, only the first frame of the frames of video images is kept, and other frames of video images are redundant.
103, extracting the fingerprint character string of each first key frame based on a perceptual hash algorithm, and screening the first key frames based on the fingerprint character string to obtain second key frames.
In order to further determine whether redundant video frames exist in the retained first key frames, in the embodiment of the present application, a fingerprint character string of each first key frame is extracted based on a perceptual hash algorithm, so as to perform similarity determination. Specifically, the size of each first key frame is reduced, and the resolution of the first key frame is reduced; graying each first key frame after being reduced to obtain a gray key frame; and comparing the pixel values of adjacent pixel points in each gray key frame line by line, recording as 1 if the pixel value of the previous pixel point is smaller than that of the next pixel point, and recording as 0 if the pixel value of the previous pixel point is greater than or equal to that of the next pixel point, so as to generate a fingerprint character string of each first key frame, wherein the fingerprint character string consists of 0 and 1.
Calculating the Hamming distance between the fingerprint character strings of the first key frames of two continuous frames; and judging whether the Hamming distance is greater than a second threshold value, if so, indicating that the similarity of the first key frames of the two continuous frames is not high, taking the first key frames of the two continuous frames corresponding to the Hamming distance as second key frames, and if not, indicating that the similarity of the first key frames of the two continuous frames is high, and taking only the previous frame of the first key frames of the two continuous frames corresponding to the Hamming distance as the second key frame.
And step 104, sending the second key frame to the edge server, so that the edge server detects the abnormal behavior of the second key frame through a preset discrimination model to obtain a detection result.
After the second key frame is detected through the two modes, the video sensor sends the second key frame to the edge server through the 5G base station of the construction site, so that the edge server detects abnormal behaviors of the second key frame through a preset discrimination model to obtain a detection result.
Further, in the embodiment of the application, the situation that a lot of shelters exist in the construction environment is considered, and the detection effect is influenced by directly inputting the second key frame into the network for abnormal behavior detection. Therefore, the method and the device have the advantages that the countermeasure generation network is trained, so that the generator in the countermeasure generation network can reconstruct an image without shielding according to the input second key frame, abnormal behavior detection is carried out on the reconstructed image through the preset discrimination model, and the detection precision is improved by improving the quality of the input image of the preset discrimination model. Specifically, the edge server reconstructs the second key frame through a preset countermeasure generation network model to obtain a reconstructed image, wherein the reconstructed image comprises reconstructed non-shielding construction personnel; and the edge server detects abnormal behaviors of the non-shielding constructors in the reconstructed image through a preset discrimination model to obtain a detection result.
A preset confrontation generation network model and a preset discrimination model are arranged in the edge server, and the preset confrontation generation network model is a trained confrontation generation network model and is used for reconstructing an image; the preset discrimination model is a trained discrimination network, and the discrimination network preferably adopts GANOMlay for abnormal behavior detection.
Further, the configuration process of the preset countermeasure generation network model comprises the following steps: and acquiring an original training image, screening out part of non-shielded training images, adding random shielding, combining the images into a shielded and non-shielded image pair, and sending the images into a countermeasure generation network together for training.
The countermeasure generation network comprises a generator G and a discriminator D, wherein the generator G comprises 4 convolutional layers, 3 residual blocks and 3 deconvolution layers, each convolutional layer and deconvolution layer is followed by an example normalization layer and an activation layer, and the activation functions adopt Leaky ReLU functions. The structure of the discriminator D is 4 convolution layers, each convolution layer is followed by a batch normalization layer and an activation layer, the first three activation layers use ReLU functions, and the last activation layer uses Tanh functions.
The loss function of generator G is:
Lp=||X-E(Z)||1
wherein X is an unobstructed training image, Z is an obstructed training image, E (-) is a reconstruction mapping variation function, | | | | | sweet wind1Is the norm of L1.
The penalty function for discriminator D is:
Lw=Ex~p[D(X)]-Ez~p[G(Z)];
in the formula, Ex to p [ D (X)) ] are data distributions of the non-occlusion training image X, and Ex to p [ G (Z)) ] are data distributions of the occlusion training image Z.
The overall loss function against the generative network can be expressed as:
L=λLp+Lw
in the formula, λ is a weighting parameter, preferably 10.
Through alternate training of the generator G and the discriminator D, the finally trained generator G can reconstruct the non-shielding and non-shielding constructor.
And (3) inputting the reconstructed image into the GANOMlay to obtain an abnormal score, and comparing the set threshold phi with the abnormal score to judge whether abnormal behaviors occur or not, wherein the abnormal behaviors can comprise that a constructor does not wear a safety helmet, does not wear a safety belt and the like. And if the abnormal behavior occurs, sending the second key frame corresponding to the reconstructed image to the cloud center and marking a warning to improve the safety factor of the construction site and ensure the safety of constructors.
In the embodiment of the application, after the monitoring video is obtained, repeated video frames in the monitoring video are screened through an interframe difference algorithm and a perceptual hash algorithm, key frames are extracted, the key frames are sent to an edge server for abnormal behavior detection, the redundancy of transmitted data is reduced, the energy consumption is reduced, and the technical problems that in videos obtained by a sensor in the prior art, repeated construction pictures are more, data redundancy is caused by long-time transmission of the same video or image, the energy consumption is higher, and the service life of monitoring equipment is shorter are solved.
The above is an embodiment of the method for detecting abnormal behavior at a construction site provided by the present application, and the following is an embodiment of the apparatus for detecting abnormal behavior at a construction site provided by the present application.
Referring to fig. 2, an abnormal behavior detection apparatus for a building construction site according to an embodiment of the present application includes:
the system comprises an acquisition unit, a monitoring unit and a monitoring unit, wherein the acquisition unit is used for acquiring a monitoring video of a building construction site;
the extraction unit is used for extracting a plurality of first key frames of the monitoring video through an interframe difference algorithm;
the screening unit is used for extracting the fingerprint character string of each first key frame based on a perceptual hash algorithm and screening the first key frames based on the fingerprint character string to obtain second key frames;
and the sending unit is used for sending the second key frame to the edge server, so that the edge server detects the abnormal behavior of the second key frame through a preset discrimination model to obtain a detection result.
As a further refinement, the extraction unit is specifically configured to:
carrying out differential operation on two or three continuous frames of video images in the monitoring video to obtain gray difference;
and judging whether the absolute value of the gray difference is larger than a first threshold value, if so, taking the continuous two-frame or three-frame video image corresponding to the gray difference as a first key frame, and if not, taking only the first frame video image in the continuous two-frame or three-frame video image corresponding to the gray difference as the first key frame.
As a further improvement, the screening unit is specifically configured to:
reducing the size of each first key frame;
graying each first key frame after being reduced to obtain a gray key frame;
comparing the pixel values of adjacent pixels in each gray key frame line by line, if the pixel value of the previous pixel is smaller than that of the next pixel, marking as 1, if the pixel value of the previous pixel is larger than or equal to that of the next pixel, marking as 0, and generating a fingerprint character string of each first key frame;
calculating the Hamming distance between the fingerprint character strings of the first key frames of two continuous frames;
and judging whether the Hamming distance is larger than a second threshold value, if so, taking the two continuous first key frames corresponding to the Hamming distance as second key frames, and if not, taking only the previous frame of the two continuous first key frames corresponding to the Hamming distance as the second key frame.
As a further improvement, the sending unit is specifically configured to:
and sending the second key frame to an edge server, so that the edge server generates a network model through preset confrontation to reconstruct the second key frame to obtain a reconstructed image, wherein the reconstructed image comprises reconstructed non-shielding construction personnel, and abnormal behavior detection is carried out on the non-shielding construction personnel in the reconstructed image through a preset discrimination model to obtain a detection result.
In the embodiment of the application, after the monitoring video is obtained, repeated video frames in the monitoring video are screened through an interframe difference algorithm and a perceptual hash algorithm, key frames are extracted, the key frames are sent to an edge server for abnormal behavior detection, the redundancy of transmitted data is reduced, the energy consumption is reduced, and the technical problems that in videos obtained by a sensor in the prior art, repeated construction pictures are more, data redundancy is caused by long-time transmission of the same video or image, the energy consumption is higher, and the service life of monitoring equipment is shorter are solved.
The embodiment of the application also provides abnormal behavior detection equipment for the building construction site, which comprises a processor and a memory;
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is configured to execute the abnormal behavior detection method of the construction site in the foregoing method embodiment according to instructions in the program code.
The embodiment of the application also provides a computer readable storage medium, which is used for storing program codes, and the program codes are used for executing the abnormal behavior detection method of the building construction site in the method embodiment.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for executing all or part of the steps of the method described in the embodiments of the present application through a computer device (which may be a personal computer, a server, or a network device). And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 in the embodiments of the present application.

Claims (10)

1.一种建筑施工地的异常行为检测方法,其特征在于,包括:1. the abnormal behavior detection method of a construction site, is characterized in that, comprises: 获取建筑施工地的监控视频;Obtain surveillance video of the construction site; 通过帧间差分算法提取所述监控视频的若干第一关键帧;Extracting several first key frames of the surveillance video through an inter-frame difference algorithm; 基于感知哈希算法提取各所述第一关键帧的指纹字符串,并基于所述指纹字符串对所述第一关键帧进行筛选,得到第二关键帧;Extract the fingerprint string of each first key frame based on the perceptual hash algorithm, and filter the first key frame based on the fingerprint string to obtain a second key frame; 将所述第二关键帧发送到边缘服务器,使得所述边缘服务器通过预置判别模型对所述第二关键帧进行异常行为检测,得到检测结果。The second key frame is sent to the edge server, so that the edge server performs abnormal behavior detection on the second key frame through a preset discrimination model to obtain a detection result. 2.根据权利要求1所述的建筑施工地的异常行为检测方法,其特征在于,所述通过帧间差分算法提取所述监控视频的若干第一关键帧,包括:2. the abnormal behavior detection method of building construction site according to claim 1, is characterized in that, described extracting some first key frames of described surveillance video by frame difference algorithm, comprising: 对所述监控视频中的连续两帧或三帧视频图像进行差分运算,得到灰度差;Carrying out a differential operation on two consecutive frames or three frames of video images in the monitoring video to obtain a grayscale difference; 判断所述灰度差的绝对值是否大于第一阈值,若是,则将该灰度差对应的连续两帧或三帧视频图像作为第一关键帧,若否,则仅将该灰度差对应的连续两帧或三帧视频图像中的首帧视频图像作为第一关键帧。Judging whether the absolute value of the grayscale difference is greater than the first threshold, if so, then use the two consecutive frames or three video images corresponding to the grayscale difference as the first key frame, if not, only the grayscale difference corresponds to The first frame of video images in two consecutive frames or three frames of video images is taken as the first key frame. 3.根据权利要求1所述的建筑施工地的异常行为检测方法,其特征在于,所述基于感知哈希算法提取各所述第一关键帧的指纹字符串,包括:3. the abnormal behavior detection method of building construction site according to claim 1, is characterized in that, described extracting the fingerprint string of each described first key frame based on perceptual hash algorithm, comprising: 缩小各所述第一关键帧的尺寸;reducing the size of each of the first key frames; 对缩小后的各所述第一关键帧进行灰度化处理,得到灰度关键帧;Grayscale processing is performed on each of the reduced first key frames to obtain a grayscale key frame; 逐行比较各所述灰度关键帧中的相邻像素点的像素值大小,若前一像素点的像素值小于后一像素点的像素值,则记为1,若前一像素点的像素值大于或等于后一像素点的像素值,则记为0,生成各所述第一关键帧的指纹字符串。Compare the pixel values of adjacent pixels in each of the grayscale key frames line by line. If the pixel value of the previous pixel is smaller than the pixel value of the next pixel, it is recorded as 1. If the value is greater than or equal to the pixel value of the next pixel, it is recorded as 0, and the fingerprint string of each of the first key frames is generated. 4.根据权利要求1所述的建筑施工地的异常行为检测方法,其特征在于,所述基于所述指纹字符串对所述第一关键帧进行筛选,得到第二关键帧,包括:4. The abnormal behavior detection method at a construction site according to claim 1, wherein the first key frame is screened based on the fingerprint string to obtain a second key frame, comprising: 计算连续的两帧所述第一关键帧的指纹字符串之间的汉明距离;Calculate the Hamming distance between the fingerprint strings of the first key frame of two consecutive frames; 判断所述汉明距离是否大于第二阈值,若是,则将该汉明距离对应的连续的两帧所述第一关键帧作为第二关键帧,若否,则仅将该汉明距离对应的连续的两帧所述第一关键帧中的前一帧作为第二关键帧。Judging whether the Hamming distance is greater than the second threshold, if so, the first key frame of the two consecutive frames corresponding to the Hamming distance is used as the second key frame, if not, only the Hamming distance corresponding to the first key frame is used. The previous frame in the first key frame of the two consecutive frames is used as the second key frame. 5.根据权利要求1所述的建筑施工地的异常行为检测方法,其特征在于,所述边缘服务器通过预置判别模型对所述第二关键帧进行异常行为检测,得到检测结果,之前还包括:5. The abnormal behavior detection method of a construction site according to claim 1, wherein the edge server performs abnormal behavior detection on the second key frame through a preset discriminant model, and obtains a detection result, which also includes : 所述边缘服务器通过预置对抗生成网络模型对所述第二关键帧进行重构处理,得到重构图像,所述重构图像包括重构出的无遮挡施工人员;The edge server performs reconstruction processing on the second key frame by using a preset confrontation generation network model to obtain a reconstructed image, and the reconstructed image includes the reconstructed unobstructed construction personnel; 相应的,所述边缘服务器通过预置判别模型对所述第二关键帧进行异常行为检测,得到检测结果,包括:Correspondingly, the edge server performs abnormal behavior detection on the second key frame by using a preset discrimination model, and obtains a detection result, including: 所述边缘服务器通过预置判别模型对所述重构图像中的无遮挡施工人员进行异常行为检测,得到检测结果。The edge server detects the abnormal behavior of the unobstructed construction workers in the reconstructed image by using a preset discriminant model, and obtains the detection result. 6.一种建筑施工地的异常行为检测装置,其特征在于,包括:6. An abnormal behavior detection device at a construction site, characterized in that, comprising: 获取单元,用于获取建筑施工地的监控视频;The acquisition unit is used to acquire the surveillance video of the construction site; 提取单元,用于通过帧间差分算法提取所述监控视频的若干第一关键帧;an extraction unit, used for extracting several first key frames of the surveillance video through an inter-frame difference algorithm; 筛选单元,用于基于感知哈希算法提取各所述第一关键帧的指纹字符串,并基于所述指纹字符串对所述第一关键帧进行筛选,得到第二关键帧;a screening unit, configured to extract the fingerprint string of each of the first key frames based on a perceptual hash algorithm, and screen the first key frames based on the fingerprint strings to obtain a second key frame; 发送单元,用于将所述第二关键帧发送到边缘服务器,使得所述边缘服务器通过预置判别模型对所述第二关键帧进行异常行为检测,得到检测结果。A sending unit, configured to send the second key frame to the edge server, so that the edge server performs abnormal behavior detection on the second key frame through a preset discrimination model to obtain a detection result. 7.根据权利要求6所述的建筑施工地的异常行为检测装置,其特征在于,所述提取单元具体用于:7. The abnormal behavior detection device at a construction site according to claim 6, wherein the extraction unit is specifically used for: 对所述监控视频中的连续两帧或三帧视频图像进行差分运算,得到灰度差;Carrying out a differential operation on two consecutive frames or three frames of video images in the monitoring video to obtain a grayscale difference; 判断所述灰度差的绝对值是否大于第一阈值,若是,则将该灰度差对应的连续两帧或三帧视频图像作为第一关键帧,若否,则仅将该灰度差对应的连续两帧或三帧视频图像中的首帧视频图像作为第一关键帧。Judging whether the absolute value of the grayscale difference is greater than the first threshold, if so, then use the two consecutive frames or three frames of video images corresponding to the grayscale difference as the first key frame, if not, then only the grayscale difference corresponds to The first frame of video images in two consecutive frames or three frames of video images is taken as the first key frame. 8.根据权利要求6所述的建筑施工地的异常行为检测装置,其特征在于,所述筛选单元具体用于:8. The abnormal behavior detection device at a construction site according to claim 6, wherein the screening unit is specifically used for: 缩小各所述第一关键帧的尺寸;reducing the size of each of the first key frames; 对缩小后的各所述第一关键帧进行灰度化处理,得到灰度关键帧;Grayscale processing is performed on each of the reduced first key frames to obtain a grayscale key frame; 逐行比较各所述灰度关键帧中的相邻像素点的像素值大小,若前一像素点的像素值小于后一像素点的像素值,则记为1,若前一像素点的像素值大于或等于后一像素点的像素值,则记为0,生成各所述第一关键帧的指纹字符串;Compare the pixel values of adjacent pixels in each of the grayscale key frames line by line. If the pixel value of the previous pixel is smaller than the pixel value of the next pixel, it is recorded as 1. If the value is greater than or equal to the pixel value of the next pixel, it is recorded as 0, and the fingerprint string of each of the first key frames is generated; 计算连续的两帧所述第一关键帧的指纹字符串之间的汉明距离;Calculate the Hamming distance between the fingerprint strings of the first key frame of two consecutive frames; 判断所述汉明距离是否大于第二阈值,若是,则将该汉明距离对应的连续的两帧所述第一关键帧作为第二关键帧,若否,则仅将该汉明距离对应的连续的两帧所述第一关键帧中的前一帧作为第二关键帧。Judging whether the Hamming distance is greater than the second threshold, if so, the first key frame of the two consecutive frames corresponding to the Hamming distance is used as the second key frame, if not, only the Hamming distance corresponding to the first key frame is used. The previous frame in the first key frame of the two consecutive frames is used as the second key frame. 9.一种建筑施工地的异常行为检测设备,其特征在于,所述设备包括处理器以及存储器;9. A device for detecting abnormal behavior at a construction site, wherein the device comprises a processor and a memory; 所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;the memory is used to store program code and transmit the program code to the processor; 所述处理器用于根据所述程序代码中的指令执行权利要求1-5任一项所述的建筑施工地的异常行为检测方法。The processor is configured to execute the abnormal behavior detection method for a construction site according to any one of claims 1-5 according to the instructions in the program code. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储程序代码,所述程序代码用于执行权利要求1-5任一项所述的建筑施工地的异常行为检测方法。10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program codes, and the program codes are used to execute the abnormality of the construction site according to any one of claims 1-5 Behavioral detection methods.
CN202110435672.5A 2021-04-22 2021-04-22 Abnormal behavior detection method and related device for building construction site Pending CN113111823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110435672.5A CN113111823A (en) 2021-04-22 2021-04-22 Abnormal behavior detection method and related device for building construction site

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110435672.5A CN113111823A (en) 2021-04-22 2021-04-22 Abnormal behavior detection method and related device for building construction site

Publications (1)

Publication Number Publication Date
CN113111823A true CN113111823A (en) 2021-07-13

Family

ID=76719392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110435672.5A Pending CN113111823A (en) 2021-04-22 2021-04-22 Abnormal behavior detection method and related device for building construction site

Country Status (1)

Country Link
CN (1) CN113111823A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743224A (en) * 2021-08-04 2021-12-03 国网福建省电力有限公司信息通信分公司 Ascending operator safety belt wearing monitoring method and system based on edge calculation
CN113965728A (en) * 2021-10-20 2022-01-21 深圳龙岗智能视听研究院 A dual-stream video privacy protection method
CN116668473A (en) * 2023-05-05 2023-08-29 仲恺农业工程学院 Edge recognition method, system, equipment and medium for agricultural abnormal data
CN117173572A (en) * 2023-09-08 2023-12-05 景德镇鸿兴智能科技有限公司 Method and system for collecting building informatization data
CN118334594A (en) * 2024-06-14 2024-07-12 深圳市迈腾电子有限公司 Target area security monitoring method and device, electronic equipment and readable medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573222A (en) * 2018-03-28 2018-09-25 中山大学 Pedestrian Image Occlusion Detection Method Based on Recurrent Adversarial Generative Network
CN109905675A (en) * 2019-03-13 2019-06-18 武汉大学 A computer vision-based monitoring system and method for mine personnel
CN110599486A (en) * 2019-09-20 2019-12-20 福州大学 Method and system for detecting video plagiarism
CN110659566A (en) * 2019-08-15 2020-01-07 重庆特斯联智慧科技股份有限公司 Target tracking method and system in shielding state
CN111369561A (en) * 2020-05-26 2020-07-03 北京小米移动软件有限公司 Image processing method and device, electronic device and storage medium
CN112183417A (en) * 2020-09-30 2021-01-05 重庆天智慧启科技有限公司 Business consultant service capability evaluation system and method
CN112333467A (en) * 2020-11-27 2021-02-05 中国船舶工业系统工程研究院 Method, system, and medium for detecting keyframes of a video
CN112507842A (en) * 2020-12-01 2021-03-16 宁波多牛大数据网络技术有限公司 Video character recognition method and device based on key frame extraction

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573222A (en) * 2018-03-28 2018-09-25 中山大学 Pedestrian Image Occlusion Detection Method Based on Recurrent Adversarial Generative Network
CN109905675A (en) * 2019-03-13 2019-06-18 武汉大学 A computer vision-based monitoring system and method for mine personnel
CN110659566A (en) * 2019-08-15 2020-01-07 重庆特斯联智慧科技股份有限公司 Target tracking method and system in shielding state
CN110599486A (en) * 2019-09-20 2019-12-20 福州大学 Method and system for detecting video plagiarism
CN111369561A (en) * 2020-05-26 2020-07-03 北京小米移动软件有限公司 Image processing method and device, electronic device and storage medium
CN112183417A (en) * 2020-09-30 2021-01-05 重庆天智慧启科技有限公司 Business consultant service capability evaluation system and method
CN112333467A (en) * 2020-11-27 2021-02-05 中国船舶工业系统工程研究院 Method, system, and medium for detecting keyframes of a video
CN112507842A (en) * 2020-12-01 2021-03-16 宁波多牛大数据网络技术有限公司 Video character recognition method and device based on key frame extraction

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王德青 等: "场景文字识别技术研究综述", 《计算机工程与应用》, no. 18, 30 September 2020 (2020-09-30), pages 1 - 15 *
邓开发 等: "基于深度学习的安全帽佩戴检测实现与分析", 《计算机时代》, no. 7, 31 July 2020 (2020-07-31), pages 12 - 15 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743224A (en) * 2021-08-04 2021-12-03 国网福建省电力有限公司信息通信分公司 Ascending operator safety belt wearing monitoring method and system based on edge calculation
CN113743224B (en) * 2021-08-04 2023-05-23 国网福建省电力有限公司信息通信分公司 Method and system for monitoring wearing of safety belt of ascending operator based on edge calculation
CN113965728A (en) * 2021-10-20 2022-01-21 深圳龙岗智能视听研究院 A dual-stream video privacy protection method
CN116668473A (en) * 2023-05-05 2023-08-29 仲恺农业工程学院 Edge recognition method, system, equipment and medium for agricultural abnormal data
CN117173572A (en) * 2023-09-08 2023-12-05 景德镇鸿兴智能科技有限公司 Method and system for collecting building informatization data
CN117173572B (en) * 2023-09-08 2025-05-16 上海颛创电子科技有限公司 A method and system for collecting building information data
CN118334594A (en) * 2024-06-14 2024-07-12 深圳市迈腾电子有限公司 Target area security monitoring method and device, electronic equipment and readable medium

Similar Documents

Publication Publication Date Title
CN113111823A (en) Abnormal behavior detection method and related device for building construction site
CN110163143A (en) Unlawful practice recognition methods, device and terminal device
CN108012121A (en) A kind of edge calculations and the real-time video monitoring method and system of cloud computing fusion
CN112580523A (en) Behavior recognition method, behavior recognition device, behavior recognition equipment and storage medium
CN105844238A (en) Method and system for discriminating videos
Bora et al. Human suspicious activity detection system using CNN model for video surveillance
CN108174198B (en) Video image quality diagnosis analysis detection device and application system
CN117576632B (en) Multi-mode AI large model-based power grid monitoring fire early warning system and method
Ahmad et al. Person re-identification without identification via event anonymization
CN112422909B (en) Video behavior analysis management system based on artificial intelligence
CN111369521A (en) Image filtering method based on image quality and related device
Ren et al. Towards Efficient Video Detection Object Super‐Resolution with Deep Fusion Network for Public Safety
CN118135480A (en) Visual image processing method and system for electromechanical construction of tunnel
CN113591681A (en) Face detection and protection method and device, electronic equipment and storage medium
CN111950457A (en) Oilfield Safety Production Image Recognition Method and System
CN117892292A (en) Abnormal process detection device and method based on sandbox
Hu et al. UAV image high fidelity compression algorithm based on generative adversarial networks under complex disaster conditions
CN119179309A (en) Industrial field automatic monitoring method and system based on cloud edge cooperative detection
Taj-Eddin et al. A new compression technique for surveillance videos: evaluation using new dataset
Yang et al. 3d u-net for video anomaly detection
CN116631172B (en) Early warning method and device based on linkage of door lock and electronic doorbell
CN119205839A (en) Monitoring image processing system and method based on big data
CN104219491A (en) Image analysis function based video monitoring system and storage method thereof
CN116109963A (en) Risk identification method, system, equipment and medium for distribution network uninterrupted operation
CN113537086A (en) Image recognition method and device, electronic equipment and storage medium

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载