A construction dangerous behavior detection method, device and equipment and readable storage medium
By dividing the video stream at the construction site into image blocks and merging the model, the problems of insufficient recall rate for detecting small targets in the distance and the need for multi-dimensional detection are solved, achieving high recall rate for detecting dangerous behaviors while taking into account both equipment compliance and behavioral safety.
Patent Information
- Application Number
- CN202611337576.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies have insufficient recall rates for detecting small targets in the distance, and single visual models are insufficient to meet the needs of multi-dimensional safety detection, resulting in dangerous behaviors at construction sites not being detected in a timely manner.
By performing frame extraction on the target video stream, the image is divided into sub-image blocks with overlapping regions. Combined with target detection and human pose recognition models, duplicate detection boxes are merged to generate a danger alarm command.
It improves the recall rate of detecting small targets in the distance, comprehensively covers equipment compliance and behavioral safety detection, makes up for the structural blind spots of a single visual model, and achieves multi-dimensional dangerous behavior detection with high recall rate.
Smart Images

Figure CN123142118A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial vision, specifically to a method, apparatus, equipment, and readable storage medium for detecting hazardous behaviors during construction. Background Technology
[0002] With the rapid development of the construction industry, video surveillance technology has been widely applied to safety management at construction sites. Traditional construction safety supervision mainly relies on manual inspections or post-event traceability, which suffers from problems such as large blind spots, slow response, and high labor costs. Therefore, how to utilize computer vision technology to perform real-time analysis of video streams at construction sites, automatically detect dangerous behaviors such as personnel not wearing protective equipment, falls, and unauthorized climbing, and issue timely warnings has become an important need that urgently needs to be addressed in the field of safety technology. This is of great significance for reducing accident rates and improving management efficiency.
[0003] Existing intelligent monitoring technologies for construction safety typically employ a single visual model to achieve safety detection in a specific dimension. One approach is based on object detection models to identify personnel and protective equipment in video frames. By training object detection networks such as the YOLO series, it automatically determines the wearing status of personal protective equipment (PPE) such as safety helmets and reflective vests, triggering an alarm when personnel without PPE are detected. Another approach uses human posture estimation models to identify the movements and behaviors of construction workers. By extracting key points of the human skeleton and analyzing their spatial relationships, it identifies dangerous postures such as falls, climbing, and abnormal stillness. These two approaches provide automated monitoring methods for construction sites from the dimensions of equipment compliance and behavioral safety, respectively, playing a positive role in their respective application scenarios.
[0004] However, the aforementioned existing technical solutions still have the following technical problems in practical applications. First, monitoring cameras at construction sites typically cover a large area, and construction workers at a distance occupy a small percentage of pixels in the image, representing typical small targets in the distance. Existing target detection models have limited feature extraction capabilities for such small targets, resulting in insufficient recall and a high false negative rate, directly affecting the reliability of equipment compliance assessment. Second, single vision models have inherent structural blind spots: while target detection models can identify the wearing status of protective equipment, they cannot detect whether personnel are in abnormal states such as falls or fainting; while posture estimation models can identify abnormal behavior, they lack the ability to identify small protective equipment such as safety helmets and reflective vests. Relying solely on a single model cannot fully cover all the dimensions of construction safety monitoring needs, and blind spots can easily lead to dangerous situations not being detected in time. Therefore, a technical solution is needed that can improve the recall rate of detecting small targets in the distance while meeting multi-dimensional safety detection requirements to overcome the limitations of existing technologies. Summary of the Invention
[0005] This application provides a method, device, equipment, and readable storage medium for detecting hazardous behaviors during construction, which can solve the technical problems of insufficient recall rate for detecting small targets in the distance and the difficulty of a single model to meet the needs of multi-dimensional safety detection in the existing technology.
[0006] In a first aspect, embodiments of this application provide a method for detecting hazardous behavior during construction, including: The target video stream is acquired, and the target video stream is processed by frame extraction to obtain the image to be detected. The image to be detected is divided into multiple sub-image blocks, where there are overlapping areas between adjacent sub-image blocks. Personnel and protective equipment are detected in each sub-image block to obtain an initial detection result containing detection boxes, category labels and corresponding confidence scores. Based on the overlap and confidence scores of the detection boxes, duplicate detection boxes pointing to the same target are merged to obtain the deduplicated target detection result and the corresponding detection confidence score. Based on the target detection results, the personnel targets whose detection confidence meets the preset review threshold are selected as the personnel targets to be reviewed. Human posture recognition is performed on the personnel targets to be reviewed to obtain the posture type recognition result. Based on the target detection results and posture type recognition results, a danger alarm command is generated.
[0007] In conjunction with the first aspect, in one implementation, merging duplicate detection boxes pointing to the same target based on the overlap and confidence of the detection boxes includes: Unify the initial detection results of each sub-image patch to the same coordinate system; Under the same category label, calculate the cross-union ratio (CUR) between any two initial detection results. If the CUR is greater than the preset overlap threshold, the corresponding detection box is determined to be a duplicate detection box, and the detection box with higher confidence is retained as the merged result.
[0008] In conjunction with the first aspect, in one implementation, the image to be detected is divided into multiple sub-image blocks, including: The image to be detected is divided into multiple sub-image blocks according to a preset overlap rate, so that the ratio of the overlapping area between adjacent sub-image blocks to the total area of the sub-image blocks is a fixed value.
[0009] In conjunction with the first aspect, in one implementation, human posture recognition is performed on the target of the person to be reviewed to obtain posture type recognition results, including: The detection box corresponding to the target of the person to be reviewed is taken as the area to be reviewed, and the coordinates of the key points of the human body in the area to be reviewed are extracted. Based on the relative positional relationship of key points on the human body, a preset abnormal behavior posture template is matched to obtain the posture type recognition result.
[0010] In conjunction with the first aspect, in one implementation method, the construction hazard detection method further includes: If the number of extracted human body key point coordinates is less than the preset key point number threshold, the target of the person to be reviewed is marked as review failed, and cross-frame tracking and human pose recognition are performed again.
[0011] In conjunction with the first aspect, in one implementation, a hazard alarm command is generated based on the target detection result and the pose type recognition result, including: The wearing status of protective equipment and the confidence level of equipment detection are determined based on the target detection results. The wearing status of protective equipment is determined based on the positional correlation of the target detection results, and the confidence level of equipment detection is determined based on the detection confidence level corresponding to the target detection results that have positional correlation. If the protective equipment wearing status is non-compliant and the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, an equipment wearing alarm command will be generated. If the protective equipment is worn in compliance with regulations, the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, and the posture type recognition result is abnormal behavior, a composite alarm command is generated. If the equipment detection confidence is less than the preset equipment detection threshold, and the posture type recognition result is abnormal behavior, an abnormal behavior alarm command will be generated. If the equipment detection confidence level is less than the preset equipment detection threshold, and the posture type recognition result is normal behavior, then the protective equipment wearing status is corrected to compliance, and no danger alarm command is generated.
[0012] In conjunction with the first aspect, in one implementation method, the construction hazard detection method further includes: A structured alarm record is generated based on the hazard alarm command. The structured alarm record includes the alarm time, alarm location, alarm type and trigger model.
[0013] Secondly, embodiments of this application provide a construction hazard detection device, comprising: The image preprocessing module is used to acquire the target video stream, perform frame extraction on the target video stream to obtain the image to be detected, and divide the image to be detected into multiple sub-image blocks, wherein there are overlapping areas between adjacent sub-image blocks. The target detection module is used to detect personnel and protective equipment in each sub-image block to obtain an initial detection result containing detection boxes, category labels and corresponding confidence scores. Based on the overlap and confidence scores of the detection boxes, duplicate detection boxes pointing to the same target are merged to obtain the deduplicated target detection result and the corresponding detection confidence score. The posture recognition module is used to identify the human posture of the target to be reviewed based on the personnel targets whose detection confidence meets the preset review threshold in the target detection results, and to obtain the posture type recognition result. The decision output module is used to generate hazard alarm commands based on the target detection results and posture type recognition results.
[0014] Thirdly, this application provides a construction hazard behavior detection device, which includes a processor, a memory, and a construction hazard behavior detection program stored in the memory and executable by the processor. When the construction hazard behavior detection program is executed by the processor, it implements the steps of the construction hazard behavior detection method described above.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a construction hazard behavior detection program, wherein when the construction hazard behavior detection program is executed by a processor, it implements the steps of the construction hazard behavior detection method described above.
[0016] The beneficial effects of the technical solutions provided in this application include: This application effectively increases the proportion of effective features for distant small targets in the image by dividing the image to be detected into sub-image blocks with overlapping regions, thereby improving the detection recall rate in distant small target scenarios. Simultaneously, the overlapping regions prevent missed detections due to target truncation at image block edges. Furthermore, by performing human pose recognition on image regions containing personnel targets whose detection confidence meets a preset verification threshold, target detection and pose recognition are combined. This dual-model collaborative and complementary approach addresses both equipment compliance detection and behavioral safety detection dimensions, compensating for the structural blind spots of single vision models in security monitoring. Through these methods, this application provides a dangerous behavior detection solution with high detection recall and comprehensive detection dimensions. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating an embodiment of the construction hazard detection method of this application; Figure 2 This is a schematic diagram of the deduplication process for the detection frame in an embodiment of this application. Figure 3 This is a schematic diagram of the human posture recognition verification process in an embodiment of this application; Figure 4 This is a schematic diagram of the process for generating a hazard alarm command according to an embodiment of this application; Figure 5 This is a schematic diagram of the functional modules of an embodiment of the construction hazard detection device of this application; Figure 6This is a schematic diagram of the hardware structure of the construction hazard detection equipment involved in the embodiments of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0020] In one aspect, embodiments of this application provide a method for detecting hazardous behaviors during construction.
[0021] In one embodiment, reference is made to Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the construction hazard detection method of this application. Figure 1 As shown, the methods for detecting hazardous behaviors during construction include: S101. Obtain the target video stream, perform frame extraction on the target video stream to obtain the image to be detected, and divide the image to be detected into multiple sub-image blocks, wherein there is an overlapping area between adjacent sub-image blocks. S102. Perform personnel and protective equipment detection on each sub-image block to obtain an initial detection result containing detection boxes, category labels and corresponding confidence scores. Based on the overlap and confidence scores of the detection boxes, merge duplicate detection boxes pointing to the same target to obtain the deduplicated target detection result and the corresponding detection confidence score. S103. Based on the personnel targets whose detection confidence in the target detection results meets the preset review threshold, the personnel targets to be reviewed are used as the personnel targets to be reviewed. Human posture recognition is performed on the personnel targets to be reviewed to obtain the posture type recognition result. S104. Generate a hazard alarm command based on the target detection results and posture type recognition results.
[0022] Specifically, in the method for detecting hazardous behaviors during construction, the data source is the real-time video stream from the monitoring camera at the construction site, and the resulting image frames are used as the images to be detected after frame extraction and processing.
[0023] For each image to be detected, in order to increase the proportion of effective features of small distant targets in the image, the embodiment slices each image to be detected into multiple sub-image blocks. It should also be noted that when dividing the sub-image blocks, each sub-image block and its adjacent sub-image blocks are set with an overlap area according to a preset overlap ratio, so as to avoid the target at the edge being truncated and thus missed when dividing the sub-image blocks.
[0024] Next, the embodiment feeds each sub-image block into the target detection model (the embodiment uses the DINOv3 or LTDETR model based on the Transformer structure) to detect the location of the person and their protective equipment such as safety helmets and reflective vests. The output of the target detection model includes the detection box, category label and the initial detection result with corresponding confidence.
[0025] Meanwhile, considering that some duplicate detections exist in the initial output detection results, deduplication is also required. In this embodiment, the initial detection results of each sub-image block are first unified to the same coordinate system. Then, for the initial detection results under each category label, the embodiment calculates the intersection-union ratio (IUGR) between each detection box, and determines the detection results with an IUGR greater than a preset overlap threshold as duplicate detections, which are then merged for deduplication. During the deduplication process, the embodiment retains the detection boxes with higher confidence among the duplicate detections as the merged result.
[0026] After deduplication, the implementation example can obtain the detection results and confidence levels of personnel targets in the detection area, as well as the detection results and confidence levels of protective equipment. Based on the positional correlation between the detection results of personnel targets and the detection results of protective equipment, the equipment wearing status of each personnel target can be determined, thereby achieving equipment compliance detection.
[0027] Furthermore, considering the structural blind spots of a single visual model in security monitoring, for personnel targets whose detection confidence meets the preset review threshold in the target detection results, the embodiment also introduces a posture recognition model (the embodiment uses YOLO Pose, which outputs the coordinates of 17 human body key points) for further posture recognition. In the embodiment, based on the relative positional relationship between the coordinates of human body key points, and combined with a preset abnormal behavior posture template, the embodiment identifies whether there is an abnormal posture and outputs the posture type recognition result.
[0028] The final embodiment combines target detection results and posture type recognition results to generate a hazard alarm command. Specifically, when the equipment detection confidence level is higher than a preset equipment detection threshold: if the wearing status is non-compliant, an equipment wearing alarm command is directly generated; if the wearing status is compliant, posture recognition is performed; if the posture result is abnormal behavior, a composite alarm command is generated, and posture recognition continues until the abnormal behavior stops. When the equipment detection confidence level is lower than the preset equipment detection threshold, the wearing status is considered insufficiently reliable, and the posture recognition result takes precedence: if the posture result is abnormal behavior, an abnormal behavior alarm command is generated; if the posture result is normal behavior, the personnel's protective equipment wearing status is corrected to compliant, and no alarm command is generated.
[0029] It should also be noted that in the embodiment, the equipment detection threshold and the review threshold are two different thresholds, and the equipment detection threshold is greater than the review threshold: the equipment detection threshold is used to determine whether the wearing status is reliable, and the review threshold is used to determine whether it is worth reviewing. Low-confidence targets below the review threshold are regarded as misjudged or difficult-to-identify targets and do not need to be reviewed.
[0030] In this embodiment, by dividing the image to be detected into sub-image blocks with overlapping regions, the proportion of effective features of distant small targets in the image is effectively increased, improving the detection recall rate in distant small target scenarios. Simultaneously, the overlapping regions prevent missed detections due to target truncation at image block edges. Furthermore, by performing human pose recognition on the image regions containing personnel targets whose detection confidence meets a preset verification threshold, target detection and pose recognition are combined. This dual-model collaborative and complementary approach addresses both equipment compliance detection and behavioral safety detection dimensions, compensating for the structural blind spots of single visual models in security monitoring. This application provides a dangerous behavior detection scheme with high detection recall and comprehensive detection dimensions through the above methods.
[0031] Furthermore, in one embodiment, the image to be detected is divided into multiple sub-image blocks, including: The image to be detected is divided into multiple sub-image blocks according to a preset overlap rate, so that the ratio of the overlapping area between adjacent sub-image blocks to the total area of the sub-image blocks is a fixed value.
[0032] Specifically, in the data acquisition phase, the raw data is a real-time video stream from a construction site monitoring camera. In this embodiment, frames are extracted at a fixed frame rate (e.g., 2 frames per second) to obtain the image to be detected. For each image to be detected, the embodiment divides it into multiple sub-image blocks according to a preset overlap rate (e.g., 30%). The number of sub-image blocks for each image to be detected can be determined by considering device performance and the scaling factor required to identify common small targets.
[0033] In this embodiment, by dividing the image to be detected into sub-image blocks with overlapping regions, the proportion of effective features of distant small targets in the image can be effectively increased, the detection recall rate in distant small target scenes can be improved, and at the same time, the overlapping regions can prevent the target at the edge of the image block from being truncated and thus causing missed detection.
[0034] Furthermore, in one embodiment, Figure 2 This is a schematic diagram of the deduplication process for the detection boxes in an embodiment of this application, as shown below. Figure 2 As shown, duplicate detection boxes pointing to the same target are merged based on the overlap and confidence of the detection boxes, including: S201. Unify the initial detection results of each sub-image block to the same coordinate system; S202. Under the same category label, calculate the crossover ratio (CUP) between the detection boxes in any two initial detection results. If the CUP is greater than the preset overlap threshold, the corresponding detection box is determined to be a duplicate detection box, and the detection box with higher confidence is retained as the merged result.
[0035] Specifically, for each segmented sub-image block, the embodiment feeds each sub-image block into the target detection model, and each performs inference independently to detect and identify personnel and protective equipment. The target detection model in this embodiment uses the DINOv3 / LTDETR model based on the Transformer structure. The initial detection results output include the target's bounding box, category label, and corresponding confidence score. The category labels include personnel, safety helmets, reflective vests, or other protective equipment.
[0036] For the initial detection results of each sub-image patch, during the merging and deduplication process, the embodiment first needs to unify all initial detection results to the same coordinate system. For example, a coordinate system is constructed based on the image to be detected, and the initial detection results are unified to this coordinate system. Then, for the detection boxes under each category label, the embodiment needs to calculate the intersection-union ratio (IU / R) between two different detection boxes. When the IU / R is greater than a set overlap threshold (e.g., 0.5), the two detection results can be determined to be duplicate detections. For duplicate detections, the embodiment retains the detection box with the higher confidence level and discards the detection box with the lower confidence level, and uses the higher confidence level as the confidence level of the merged result.
[0037] In this embodiment, by merging the duplicate detection boxes across sub-image blocks, the ambiguity of duplicate detection caused by slice overlap is eliminated, and the same target is avoided from being repeatedly alarmed. At the same time, selecting detection boxes with higher confidence in duplicate detection can further improve the detection effect of small targets in the distance.
[0038] Furthermore, in one embodiment, Figure 3 This is a schematic diagram of the human posture recognition verification process in an embodiment of this application, as shown below. Figure 3 As shown, human posture recognition is performed on the target of the person to be reviewed, and the posture type recognition results are obtained, including: S301. Take the detection box corresponding to the target of the person to be reviewed as the area to be reviewed, and extract the coordinates of the key points of the human body in the area to be reviewed; S302. Based on the relative positional relationship of the coordinates of key points on the human body, match the preset abnormal behavior posture template to obtain the posture type recognition result.
[0039] Furthermore, in one embodiment, the method for detecting hazardous construction behaviors further includes: If the number of extracted human body key point coordinates is less than the preset key point number threshold, the target of the person to be reviewed is marked as review failed, and cross-frame tracking and human pose recognition are performed again.
[0040] Specifically, considering the structural blind spots in single-model recognition, after target detection, the embodiment further verifies the identified personnel targets through human posture recognition.
[0041] In human posture recognition, the embodiment uses the detection box corresponding to the target person to be reviewed as the region to be reviewed, and after cropping the region to be reviewed, it is fed into the human posture estimation model. In this embodiment, the human posture estimation model uses YOLO Pose, and the output is the coordinates of 17 human skeleton key points. Then, based on the spatial distribution of the output human key point coordinates, it is matched with a preset abnormal behavior posture template to determine whether it meets the abnormal behavior posture template. In this embodiment, the abnormal behavior posture template can be set in combination with common dangerous postures in the work process. For example, based on a single frame image, if the longitudinal coordinate of the head key point exceeds the threshold of the torso midline and the overall dispersion of the skeleton points is abnormally increased, a fall is determined; or based on multiple consecutive frames of images, if the change in the key point coordinates within N consecutive frames is lower than the static threshold and the posture is abnormally standing, it is determined to be an abnormal static posture; when the longitudinal coordinate of the ankle key point continues to rise and exceeds the threshold, and the relative height change between the head and torso is also on the rise, it is determined to be a climbing violation.
[0042] Furthermore, if the number of human keypoint coordinates extracted by the human pose estimation model is less than a preset keypoint number threshold, such as only recognizing a small number of skeletal keypoints or failing to recognize any skeletal keypoints, the embodiment will mark the person to be reviewed as having failed the review, maintain the pending review status, and record it in the log. For targets that fail the review, the embodiment can perform cross-frame tracking in subsequent image frames based on the detection box position information to obtain the area of the person target to be reviewed in the subsequent image frames, and then re-perform human pose recognition.
[0043] Furthermore, in one embodiment, Figure 4This is a schematic diagram of the process for generating a hazard alarm command according to an embodiment of this application, as shown below. Figure 4 As shown, based on the target detection results and pose type recognition results, a hazard alarm command is generated, including: S401. Determine the protective equipment wearing status and equipment detection confidence level based on the target detection results. The protective equipment wearing status is determined based on the positional correlation of the target detection results, and the equipment detection confidence level is determined based on the detection confidence level corresponding to the target detection results that have a positional correlation. S402. If the protective equipment wearing status is non-compliant and the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, generate an equipment wearing alarm command. S403. If the protective equipment is worn in compliance with regulations, the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, and the posture type recognition result is abnormal behavior, generate a composite alarm command. S404. If the equipment detection confidence is less than the preset equipment detection threshold and the posture type recognition result is abnormal behavior, generate an abnormal behavior alarm command. S405. If the equipment detection confidence level is less than the preset equipment detection threshold, and the posture type recognition result is normal behavior, then the protective equipment wearing status is corrected to compliance, and no danger alarm command is generated.
[0044] Specifically, in this embodiment, the danger alarm command makes a joint decision based on the results of the target detection model and the posture recognition model. The target detection model and the posture recognition model make bidirectional compensation decisions from two dimensions: equipment compliance detection and behavioral safety detection, respectively, to make up for the structural blind spots in safety monitoring that exist in a single vision model.
[0045] In this embodiment, the protective equipment wearing status and detection confidence level are first determined based on the target detection results. This includes determining the protective equipment wearing status of the personnel target based on the positional correlation between the detection frames of the personnel target and the detection frames of the protective equipment. Simultaneously, for each matched pair of personnel targets and protective equipment, the equipment detection confidence level of the protective equipment wearing status is determined by weighted summation based on the confidence levels of the personnel target and the protective equipment.
[0046] Then, when the equipment detection confidence level is higher than the preset equipment detection threshold, if the protective equipment wearing status is determined to be non-compliant, an equipment wearing alarm command can be directly generated. If the protective equipment wearing status is determined to be compliant, the embodiment can perform human posture recognition for further judgment. If the posture type recognition result is abnormal behavior, a composite alarm command is generated, that is, the equipment has been confirmed to be compliant, but there is abnormal behavior. Subsequently, only human posture recognition can be continuously performed until the abnormal behavior stops and the detection is passed.
[0047] When the equipment detection confidence level is lower than the preset equipment detection threshold, the embodiment considers the reliability of the protective equipment wearing status insufficient, and the embodiment takes the posture type recognition result as the standard. If the posture type recognition result is abnormal behavior, an abnormal behavior alarm command is generated; if the posture type recognition result is normal behavior, the personnel's protective equipment wearing status is considered compliant, and no danger alarm command is generated.
[0048] It is important to note that in this embodiment, the equipment detection threshold and the verification threshold are two different thresholds, and the equipment detection threshold is greater than the verification threshold. The equipment detection threshold is used to determine whether the protective equipment wearing status determined by the target recognition model is reliable, while the verification threshold is used to determine whether each category of target identified by the target recognition model is worth verifying. For low-confidence targets with a confidence level lower than the verification threshold, this embodiment considers such targets as misjudged or targets that are difficult to identify from the current camera's perspective, and therefore does not require verification.
[0049] In this embodiment, a balance is achieved between detection accuracy, real-time response, and computational efficiency through the bidirectional compensation decision of the above target detection model and posture recognition model. While making up for the structural blind spots of the single vision model, false alarms are avoided when the confidence of the protective equipment wearing detection is insufficient.
[0050] Furthermore, in one embodiment, the method for detecting hazardous construction behaviors further includes: A structured alarm record is generated based on the hazard alarm command. The structured alarm record includes the alarm time, alarm location, alarm type and trigger model.
[0051] Specifically, in the embodiment of construction hazard behavior detection, the embodiment also generates structured alarm information for each frame of processing results. The structured alarm information fields include: target ID, detection timestamp, alarm type, triggering model (target detection model, pose model, or dual-model linkage), confidence level, target area coordinates, etc. In this embodiment, the alarm information is pushed to the monitoring platform via a message queue, supporting visual annotation and feedback, and historical event backtracking query.
[0052] Meanwhile, based on the structured alarm information, the embodiment can also perform statistical analysis on the historical alarm contribution of each module, providing data support for the continuous optimization of the model and providing a complete judgment link record for the review and investigation of abnormal events.
[0053] Secondly, embodiments of this application also provide a construction hazard detection device.
[0054] In one embodiment, reference is made to Figure 5 , Figure 5 This is a functional module diagram of an embodiment of the construction hazard detection device of this application. Figure 5As shown, the construction hazard detection device includes: The image preprocessing module 501 is used to acquire the target video stream, perform frame extraction processing on the target video stream to obtain the image to be detected, and divide the image to be detected into multiple sub-image blocks, wherein there are overlapping areas between adjacent sub-image blocks. The target detection module 502 is used to detect personnel and protective equipment in each sub-image block to obtain an initial detection result containing detection boxes, category labels and corresponding confidence scores. Based on the overlap and confidence scores of the detection boxes, duplicate detection boxes pointing to the same target are merged to obtain the deduplicated target detection result and the corresponding detection confidence score. The posture recognition module 503 is used to identify the human posture of the target to be reviewed based on the personnel targets whose detection confidence meets the preset review threshold in the target detection results, and to obtain the posture type recognition result. The decision output module 504 is used to generate a hazard alarm command based on the target detection results and the posture type recognition results.
[0055] The functions of each module in the above-mentioned construction hazard behavior detection device correspond to the steps in the above-mentioned construction hazard behavior detection method embodiment, and their functions and implementation processes will not be described in detail here.
[0056] Thirdly, this application provides a construction hazard behavior detection device, which can be a personal computer (PC), laptop, server, or other device with data processing capabilities.
[0057] Reference Figure 6 , Figure 6 This is a schematic diagram of the hardware structure of the construction hazard detection device involved in the embodiments of this application. In this embodiment, the construction hazard detection device may include a processor, a memory, a communication interface, and a communication bus.
[0058] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0059] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the construction hazard detection equipment, as well as interfaces used for interconnecting the construction hazard detection equipment with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0060] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0061] The processor can be a general-purpose processor, which can call the construction hazard detection program stored in the memory and execute the construction hazard detection method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the construction hazard detection program is called can be referred to in the various embodiments of the construction hazard detection method of this application, and will not be repeated here.
[0062] Those skilled in the art will understand that Figure 6 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0063] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0064] The computer-readable storage medium of this application stores a construction hazard detection program, wherein when the construction hazard detection program is executed by a processor, it implements the steps of the construction hazard detection method as described above.
[0065] The method implemented when the construction hazard behavior detection procedure is executed can be referred to in the various embodiments of the construction hazard behavior detection method of this application, and will not be repeated here.
[0066] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0067] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0068] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0069] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0070] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods of the various embodiments of this application.
[0072] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting hazardous behaviors during construction, characterized in that, include: The target video stream is acquired, and the target video stream is subjected to frame extraction processing to obtain the image to be detected. The image to be detected is divided into multiple sub-image blocks, wherein there are overlapping areas between adjacent sub-image blocks. Personnel and protective equipment are detected in each sub-image block to obtain an initial detection result containing a detection box, category label and corresponding confidence score. Based on the overlap of the detection boxes and the confidence score, duplicate detection boxes pointing to the same target are merged to obtain the deduplicated target detection result and the corresponding detection confidence score. Based on the target detection results, the personnel targets whose detection confidence meets the preset review threshold are selected as the personnel targets to be reviewed. Human posture recognition is performed on the personnel targets to be reviewed to obtain the posture type recognition result. Based on the target detection results and the posture type recognition results, a danger alarm command is generated.
2. The method for detecting hazardous construction behaviors according to claim 1, characterized in that, The merging of duplicate detection boxes pointing to the same target based on the overlap of the detection boxes and the confidence level includes: Unify the initial detection results of each sub-image patch to the same coordinate system; Under the same category label, calculate the cross-union ratio (CUP) between any two initial detection results. If the CUP is greater than a preset overlap threshold, the corresponding detection box is determined to be a duplicate detection box, and the detection box with higher confidence is retained as the merged result.
3. The method for detecting hazardous construction behaviors according to claim 1, characterized in that, The step of dividing the image to be detected into multiple sub-image blocks includes: The image to be detected is divided into multiple sub-image blocks according to a preset overlap rate, such that the ratio of the overlapping area between adjacent sub-image blocks to the total area of the sub-image blocks is a fixed value.
4. The construction dangerous behavior detection method according to claim 1, characterized in that, The step of performing human posture recognition on the target person to be reviewed, and obtaining posture type recognition results, includes: The detection box corresponding to the person to be reviewed is taken as the area to be reviewed, and the coordinates of key human points in the area to be reviewed are extracted. Based on the relative positional relationship of the coordinates of the key points of the human body, a preset abnormal behavior posture template is matched to obtain the posture type recognition result.
5. The method for detecting hazardous construction behaviors according to claim 4, characterized in that, The method further includes: If the number of extracted human body key point coordinates is less than the preset key point number threshold, the target of the person to be reviewed is marked as review failed, and cross-frame tracking and human posture recognition are performed again.
6. The method for detecting hazardous construction behaviors according to claim 1, characterized in that, The step of generating a danger alarm command based on the target detection result and the pose type recognition result includes: The protective equipment wearing status and equipment detection confidence level are determined based on the target detection results, wherein the protective equipment wearing status is determined based on the positional correlation of the target detection results, and the equipment detection confidence level is determined based on the detection confidence level corresponding to the target detection results that have a positional correlation. If the protective equipment wearing status is non-compliant and the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, an equipment wearing alarm command is generated. If the protective equipment is worn in compliance with regulations, the equipment detection confidence level is greater than or equal to the preset equipment detection threshold, and the posture type recognition result is abnormal behavior, a composite alarm command is generated. If the equipment detection confidence is less than the preset equipment detection threshold, and the posture type recognition result is abnormal behavior, an abnormal behavior alarm command is generated. If the equipment detection confidence is less than the preset equipment detection threshold, and the posture type recognition result is normal behavior, then the protective equipment wearing status is corrected to compliance, and no danger alarm command is generated.
7. The method for detecting hazardous construction behaviors according to claim 1, characterized in that, The method further includes: A structured alarm record is generated based on the danger alarm command. The structured alarm record includes alarm time, alarm location, alarm type, and trigger model.
8. A construction hazard detection device, characterized in that, include: The image preprocessing module is used to acquire the target video stream, perform frame extraction processing on the target video stream to obtain the image to be detected, and divide the image to be detected into multiple sub-image blocks, wherein there are overlapping areas between adjacent sub-image blocks. The target detection module is used to detect personnel and protective equipment in each sub-image block to obtain an initial detection result containing a detection box, category label and corresponding confidence level. Based on the overlap of the detection boxes and the confidence level, duplicate detection boxes pointing to the same target are merged to obtain a deduplicated target detection result and corresponding detection confidence level. The posture recognition module is used to identify the human posture of the target to be reviewed based on the personnel targets whose detection confidence meets the preset review threshold in the target detection results, and to obtain the posture type recognition result. The decision output module is used to generate a danger alarm command based on the target detection result and the posture type recognition result.
9. A construction hazard detection device, characterized in that, The construction hazard detection device includes a processor, a memory, and a construction hazard detection program stored in the memory and executable by the processor, wherein when the construction hazard detection program is executed by the processor, it implements the steps of the construction hazard detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a construction hazard detection program, wherein when the construction hazard detection program is executed by a processor, it implements the steps of the construction hazard detection method as described in any one of claims 1 to 7.
