Construction site danger area identification method and system based on improved YOLOv8
By improving the YOLOv8 model, the capabilities of feature extraction, multi-scale fusion and attention mechanism are enhanced, and the problems of limited feature extraction capabilities, insufficient multi-scale object detection effect and insufficient application of attention mechanism in the construction site hazardous area identification method are solved, and more accurate and robust hazard zone identification effect.
Patent Information
- Application Number
- CN202411367619.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-14
AI Technical Summary
The existing construction site hazardous area identification method has limited feature extraction capabilities, insufficient multi-scale object detection effect and insufficient application of attention mechanisms, resulting in poor recognition effect.
Improve the YOLOv8 model, by adding convolutional layer and pooling layer to the feature extraction module, introducing FPN structure and adaptive weighting mechanism, using SE module and position attention mechanism, enhance the feature extraction, multi-scale fusion and attention mechanism of the model ability.
It improves the accuracy and robustness of the identification of hazardous areas on construction sites, and can more effectively monitor hazardous areas in complex construction sites environments, reduce misidentification, and improve safety management level.
Smart Images

Figure CN119445467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of danger zone identification, and in particular to a construction site danger zone identification method and system based on improved YOLOv8. Background Art
[0002] Computer vision technology is increasingly being used in safety monitoring of dangerous areas such as construction sites. Using deep learning technology, especially real-time target detection algorithms (such as the YOLO series of models), can effectively improve safety management and reduce the incidence of accidents. These methods rely on the YOLO model to extract image feature information for target detection. However, these methods still have limitations such as limited feature extraction capabilities, insufficient multi-scale target detection, and insufficient application of attention mechanisms, resulting in poor recognition results. Summary of the invention
[0003] In view of this, the purpose of the present invention is to propose a construction site danger zone identification method and system that improves YOLOv8, so as to solve the problems that the current identification methods still have limited feature extraction capability, insufficient multi-scale target detection effect and insufficient application of attention mechanism, resulting in poor recognition effect.
[0004] Based on the above objectives, the present invention provides a method for identifying dangerous areas in construction sites by improving YOLOv8, comprising:
[0005] Collecting video information, extracting video frames from the video information, and obtaining first image information;
[0006] Preprocessing the first image information to obtain processed second image information;
[0007] Inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model through a feature extraction module, a multi-scale fusion module, and an attention module based on the second image information to obtain a trained second YOLOv8 model;
[0008] The real-time second image information is detected through the second YOLOv8 model to determine whether there is anyone entering the dangerous area. When it is determined that no one has entered the dangerous area, monitoring continues and the video frame extraction and detection process is repeated. When it is determined that there is someone entering the dangerous area, the alarm system is triggered.
[0009] Optionally, when it is determined that a person has entered a dangerous area, the method further includes:
[0010] Through the posture estimation algorithm, the skeleton points of the person are detected and their posture is identified;
[0011] Based on the posture and deep learning methods of people, the direction of people is determined by the orientation of the head, torso and key points;
[0012] Based on the person's posture and the direction they are facing, it is determined whether the person meets the safety requirements. If they do not meet the safety requirements, the alarm system is triggered.
[0013] Optionally, the feature extraction module includes additional convolutional layers and pooling layers added to the YOLOv8 infrastructure, and the additional convolutional layers and pooling layers achieve deeper feature extraction through the following formula: F = f(W c ·F+b c )
[0014] Among them, F′ represents the improved feature map, Wc and bc are the weight and bias of the convolutional layer respectively, f represents the activation function, and F represents the original feature map.
[0015] Optionally, the multi-scale fusion module introduces an FPN structure and an adaptive weighting mechanism. The feature fusion formula of the multi-scale fusion module after the FPN structure and the adaptive weighting mechanism are introduced is as follows:
[0016] Among them, P1 represents the first layer feature map, F1 represents the original feature of the first layer, W1 and W2 are adaptive weights, and P l+1 It represents the feature map of the l+1th layer in the FPN structure.
[0017] Optionally, the attention module uses the SE module and introduces a position attention mechanism. The attention calculation formula of the attention module is as follows:
[0018] Z=σ(W2·δ(W1·U))
[0019] Among them, U is the input feature map, W1 and W2 are the weights of the fully connected layer, δ represents the ReLU activation function, and σ represents the Sigmoid activation function.
[0020] Optionally, the method further includes saving the detection results and video records in a database for subsequent playback and analysis.
[0021] Optionally, the alarm system includes sounding an alarm through an on-site speaker and notifying relevant security personnel via text message or mobile APP.
[0022] Based on the same invention, the present invention also provides a system for improving the method for identifying dangerous areas in construction sites of YOLOv8, which is characterized by comprising:
[0023] Acquisition module: used to acquire video information, extract video frames from the video information, and obtain first image information;
[0024] Preprocessing module: preprocessing the first image information to obtain processed second image information;
[0025] Training module: inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model;
[0026] Detection and recognition module: The real-time second image information is detected through the second YOLOv8 model to determine whether anyone has entered the dangerous area. When it is determined that no one has entered the dangerous area, monitoring continues and the video frame extraction and detection process is repeated. When it is determined that someone has entered the dangerous area, the alarm system is triggered.
[0027] When using this method to identify dangerous areas on a construction site, firstly, video information is collected, video frames are extracted from the video information to obtain first image information, then the first image information is preprocessed to obtain processed second image information, the second image information is input into a first YOLOv8 model, the first YOLOv8 model is trained based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model, the real-time second image information is detected through the second YOLOv8 model to determine whether anyone has entered the dangerous area, when it is determined that no one has entered the dangerous area, monitoring is continued, the video frame extraction and detection process is repeated, and when it is determined that someone has entered the dangerous area, an alarm system is triggered.
[0028] From the above, it can be seen that this method solves the problems of limited feature extraction ability, insufficient multi-scale target detection effect and insufficient application of attention mechanism in current recognition methods through the design of feature extraction module, multi-scale fusion module and attention module. It can accurately identify and monitor various dangerous areas in complex construction site environments, and improve the accuracy and robustness of detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 The figure is a flow chart of an identification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0032] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0033] like Figure 1 As shown, a method for identifying dangerous areas in construction sites by improving YOLOv8 includes:
[0034] S1: Collecting video information, which may be collected by a high-definition camera, extracting video frames from the video information, and obtaining first image information;
[0035] S2: preprocessing the first image information to obtain processed second image information, where the preprocessing at least includes image denoising, enhancement, correction and normalization processing, etc.;
[0036] S3: inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model;
[0037] S4: The real-time second image information is detected through the second YOLOv8 model to determine whether there is anyone entering the dangerous area. When it is determined that no one has entered the dangerous area, monitoring is continued, and the video frame extraction and detection process is repeated. When it is determined that there is someone entering the dangerous area, the alarm system is triggered.
[0038] When using this method to identify dangerous areas on a construction site, firstly, video information is collected, video frames are extracted from the video information to obtain first image information, then the first image information is preprocessed to obtain processed second image information, the second image information is input into a first YOLOv8 model, the first YOLOv8 model is trained based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model, the real-time second image information is detected through the second YOLOv8 model to determine whether anyone has entered the dangerous area, when it is determined that no one has entered the dangerous area, monitoring is continued, the video frame extraction and detection process is repeated, and when it is determined that someone has entered the dangerous area, an alarm system is triggered.
[0039] From the above, it can be seen that this method solves the problems of limited feature extraction ability, insufficient multi-scale target detection effect and insufficient application of attention mechanism in current recognition methods through the design of feature extraction module, multi-scale fusion module and attention module. It can accurately identify and monitor various dangerous areas in complex construction site environments, and improve the accuracy and robustness of detection results.
[0040] In some embodiments, after determining that a person has entered a dangerous area, the method further includes:
[0041] Through posture estimation algorithms (such as OpenPose and HRNet), the skeleton points of people are detected and their postures (standing, bending, squatting, lying down, etc.) are identified. The acquisition of posture information can help the system determine the specific behavior of people in dangerous areas.
[0042] Based on the posture and deep learning methods of people, the direction of people is determined by the orientation of the head, torso and key points;
[0043] Based on the person's posture and the direction they are facing, it is determined whether the person meets the safety requirements. If they do not meet the safety requirements, the alarm system is triggered.
[0044] In some cases, such as maintenance inspections, personnel need to go to dangerous areas. By combining the posture and direction of the personnel with the dangerous area, through predefined rules, it is possible to identify which behaviors are dangerous in the dangerous area.
[0045] For example, when working at height or near equipment, certain postures (such as bending over) may increase the danger. The system assesses the danger in real time by detecting these postures; in some scenarios, workers are required to face the equipment when operating. If the system detects that the worker is facing away from the danger source, it will trigger an early warning; in the excavation area, the system detects whether the worker maintains an upright posture to avoid bending over to get close to the excavator; in dynamic danger areas, such as within the working range of mobile machinery or lifting equipment, the system will update the danger zone in real time and check the direction the worker is facing to ensure that they are in a safe state.
[0046] Optionally, the posture algorithm is as follows:
[0047] Pose = PoseNet(I) = {(x i ,y i )} n i=1
[0048] Where (x i ,y i ) are the coordinates of the key points, PoseNet is the pose estimation network, and I is the input image.
[0049] In some embodiments, the feature extraction module includes additional convolutional layers and pooling layers added to the YOLOv8 infrastructure, and the additional convolutional layers and pooling layers achieve deeper feature extraction through the following formula:
[0050] F′=f(W c ·F+b c )
[0051] Among them, F′ represents the improved feature map, Wc and bc are the weight and bias of the convolutional layer respectively, f represents the activation function, and F represents the original feature map.
[0052] The additional convolutional layers and pooling layers are used to achieve deeper feature extraction, thereby enhancing the model's ability to adapt to complex environments.
[0053] Among them, Wc and bc are initialized using pre-trained weights: through transfer learning, they are initialized using weights pre-trained on a large dataset and fine-tuned on a dataset specific to the construction site environment to improve the adaptability and generalization ability of the model.
[0054] In some embodiments, the multi-scale fusion module introduces an FPN structure and an adaptive weighting mechanism. The feature fusion formula of the multi-scale fusion module after the introduction of the FPN structure and the adaptive weighting mechanism is as follows:
[0055] P1=W1·F1+W2·P l+1
[0056] Among them, P1 represents the first layer feature map, F1 represents the original feature of the first layer, W1 and W2 are adaptive weights, and P l+1 It represents the feature map of the l+1th layer in the FPN structure.
[0057] By introducing the FPN structure and adaptive weighting mechanism, the model's detection capability for targets of different scales is improved, and the recognition effect for small targets and long-distance targets is enhanced.
[0058] In some embodiments, the attention module uses the SE module and introduces a position attention mechanism. The attention calculation formula of the attention module is as follows:
[0059] Z=σ(W2·δ(W1·U))
[0060] Among them, U is the input feature map, W1 and W2 are the weights of the fully connected layer, δ represents the ReLU activation function, and σ represents the Sigmoid activation function.
[0061] The SE module and position attention mechanism are used to enhance the model's attention to key areas and improve the accuracy and robustness of detection.
[0062] In some embodiments, the method further includes saving the detection results and video records into a database for subsequent playback and analysis.
[0063] In some embodiments, the alarm system includes sounding an audible alarm through an on-site speaker and notifying relevant security personnel via text message or mobile APP.
[0064] In order to further implement the present invention, the present invention also provides a system for executing the construction site dangerous area identification method of improving YOLOv8, comprising:
[0065] Acquisition module: used to acquire video information, extract video frames from the video information, and obtain first image information;
[0066] Preprocessing module: preprocessing the first image information to obtain processed second image information;
[0067] Training module: inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model;
[0068] Detection and recognition module: The real-time second image information is detected through the second YOLOv8 model to determine whether anyone has entered the dangerous area. When it is determined that no one has entered the dangerous area, monitoring continues and the video frame extraction and detection process is repeated. When it is determined that someone has entered the dangerous area, the alarm system is triggered.
[0069] Through the design of feature extraction module, multi-scale fusion module and attention module, this system solves the problems of limited feature extraction capability, insufficient multi-scale target detection effect and insufficient application of attention mechanism in current recognition methods. It can accurately identify and monitor various dangerous areas in complex construction site environments, and improve the accuracy and robustness of detection results.
[0070] It should be understood by those skilled in the art that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention (including the claims) is limited to these examples. Within the scope of the present invention, the technical features in the above embodiments or in different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the above aspects of the present invention, which are not provided in detail for the sake of simplicity.
[0071] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying dangerous areas in construction sites based on improved YOLOv8, characterized in that: include: Collecting video information, extracting video frames from the video information, and obtaining first image information; Preprocessing the first image information to obtain processed second image information; Inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model through a feature extraction module, a multi-scale fusion module, and an attention module based on the second image information to obtain a trained second YOLOv8 model; The real-time second image information is detected through the second YOLOv8 model to determine whether there is anyone entering the dangerous area. When it is determined that no one has entered the dangerous area, monitoring continues and the video frame extraction and detection process is repeated. When it is determined that there is someone entering the dangerous area, the alarm system is triggered.
2. According to claim 1, a method for identifying dangerous areas in construction sites by improving YOLOv8, characterized in that: When it is determined that a person has entered the dangerous area, the following steps are also included: Through the posture estimation algorithm, the skeleton points of the person are detected and their posture is identified; Based on the posture and deep learning methods of people, the direction of people is determined by the orientation of the head, torso and key points; Whether the person meets the safety requirements is determined based on the person's posture and the direction the person is facing. If the person does not meet the safety requirements, the alarm system is triggered.
3. A construction site dangerous area identification method based on an improved YOLOv8 according to claim 1, characterized in that: The feature extraction module includes additional convolutional layers and pooling layers added on the YOLOv8 infrastructure. The additional convolutional layers and pooling layers achieve deeper feature extraction through the following formula: F′=f(W c ·F+b c ) Among them, F′ represents the improved feature map, Wc and bc are the weight and bias of the convolutional layer respectively, f represents the activation function, and F represents the original feature map.
4. A construction site dangerous area identification method based on improved YOLOv8 according to claim 1, characterized in that: The multi-scale fusion module introduces the FPN structure and the adaptive weighting mechanism. The feature fusion formula of the multi-scale fusion module after the FPN structure and the adaptive weighting mechanism are introduced is as follows: P1=W1·F1+W2·P l+1 Among them, P1 represents the first layer feature map, F l represents the original features of the first layer, W1 and W2 are adaptive weights, P l+1 It represents the feature map of the l+1th layer in the FPN structure.
5. A construction site dangerous area identification method based on improved YOLOv8 according to claim 1, characterized in that: The attention module uses the SE module and introduces the position attention mechanism. The attention calculation formula of the attention module is as follows: Z=σ(W2·δ(W1·U)) Among them, U is the input feature map, W1 and W2 are the weights of the fully connected layer, δ represents the ReLU activation function, and σ represents the Sigmoid activation function.
6. A construction site dangerous area identification method based on improved YOLOv8 according to claim 1, characterized in that: The method also includes saving the detection results and video records into a database for subsequent playback and analysis.
7. The method for identifying dangerous areas in construction sites by improving YOLOv8 according to claim 1, characterized in that: The alarm system includes sounding an alarm through an on-site speaker and notifying relevant security personnel via text message or mobile APP.
8. A system for executing the method for identifying dangerous areas in construction sites using an improved YOLOv8 as described in any one of claims 1 to 7, characterized in that: include: Acquisition module: used to acquire video information, extract video frames from the video information, and obtain first image information; Preprocessing module: preprocessing the first image information to obtain processed second image information; Training module: inputting the second image information into the first YOLOv8 model, training the first YOLOv8 model based on the second image information through a feature extraction module, a multi-scale fusion module and an attention module to obtain a trained second YOLOv8 model; Detection and recognition module: The real-time second image information is detected through the second YOLOv8 model to determine whether anyone has entered the dangerous area. When it is determined that no one has entered the dangerous area, monitoring continues and the video frame extraction and detection process is repeated. When it is determined that someone has entered the dangerous area, the alarm system is triggered.
Citation Information
Cited By
Vision-based method and system for identifying dangerous goods transportation drivers and conductors in service area
CN121280996A
Image data acquisition method under dangerous condition
CN121811318A