Safety control method, system and storage medium for construction work
By adjusting the scaling factor and weight of the target detection model in real time, and combining the attention intensity and non-maximum suppression parameters of candidate targets, the candidate target processing is optimized, which solves the adaptability and accuracy problems of the building engineering safety monitoring system in a variable environment and achieves more efficient safety control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN SHANGDU ANCIENT CONSTR ENG CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-03
AI Technical Summary
Existing construction safety monitoring systems are not adaptable to changing environments, making it difficult to dynamically adjust their focus on potential risks. Furthermore, their non-maximum suppression processing is not flexible enough, resulting in insufficient accuracy and timeliness of target detection algorithms.
By sensing the light intensity and visibility at the construction site in real time, the scaling factor of the target detection model and the input weights of each level in the bidirectional feature pyramid are adjusted, and the attention intensity and non-maximum suppression parameters of candidate targets are calculated to dynamically optimize the processing of candidate targets in order to generate safety control instructions.
This enhances the model's adaptability and detection robustness in harsh environments, reduces false negatives and missed positives, and ensures the accuracy and timeliness of security monitoring.
Smart Images

Figure CN122336409A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of safety control, and in particular relates to safety control methods, systems and storage media for building engineering. Background Technology
[0002] Safety accidents not only cause casualties, delays in construction, and huge economic compensation, but also have a severe social impact. Construction sites are typically complex environments with multiple trades operating simultaneously, and are prone to accidents due to their dynamic nature. Existing safety controls mainly rely on dedicated safety officers conducting regular or irregular on-site patrols, carrying out safety education and training, and posting safety warning signs. However, it is difficult to achieve 24 / 7, all-round, and blind-spot-free real-time monitoring. Moreover, timeliness and accuracy are difficult to guarantee, especially on large construction sites. Intelligent monitoring systems based on computer vision deploy cameras on construction sites and use technologies such as target detection, image recognition, and behavior analysis to automatically identify potential safety risks, such as whether workers are wearing safety helmets, whether personnel have entered dangerous areas, and whether machinery is operating in violation of regulations. However, existing identification methods are easily affected by changes in lighting conditions and weather factors, which significantly reduce the accuracy of target detection algorithms and make it difficult to dynamically adapt to real-time changes in the site environment. Traditional non-maximum suppression (NMS) methods mostly use a fixed cross-union ratio (CUI) threshold to remove redundancy, which may lead to missed detections of important targets or false alarms of false alarm targets, thus affecting the accuracy of subsequent risk assessment. Furthermore, existing target identification methods struggle to accurately identify complex safety violations. For example, simply detecting workers and machinery does not necessarily constitute a risk; the key factors are the distance between them, their relative postures, etc. Summary of the Invention
[0003] To address the shortcomings of existing building engineering safety monitoring methods, such as poor adaptability to changing environments, lack of dynamic adjustment mechanisms for potential risk assessment, and insufficient flexibility in non-maximum suppression processing, this application proposes a safety control method for building engineering, comprising:
[0004] Acquire images of the construction site, and collect the light intensity and visibility of the construction site; calculate the scaling factor of the target detection model based on the light intensity, and determine the weight of each input in the preset level of the bidirectional feature pyramid in the target detection model based on the visibility; input the image into the target detection model to obtain candidate targets and the confidence scores of the candidate targets;
[0005] The attention intensity is calculated using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target. Based on the attention intensity and scaling factor, the non-maximum suppression parameter of each candidate target is obtained. The non-maximum suppression processing is performed on the candidate target using the non-maximum suppression parameter to obtain the optimized candidate target. The existence of a security violation event is determined according to the category and positional relationship of the optimized candidate target. If it exists, the corresponding security control instruction is generated.
[0006] Optionally, calculating the scaling factor of the target detection model based on the illumination intensity includes:
[0007] The light intensity is divided into three intervals based on the preset light intensity threshold: low light intensity interval, medium light intensity interval, and high light intensity interval; each light intensity interval corresponds to a scaling factor interval.
[0008] Determine the illumination range where the indicated light intensity is located, and then determine the scaling factor range;
[0009] The scaling factor is determined from the defined scaling factor range based on the dust concentration at the construction site.
[0010] Optionally, determining the weight of each input at a preset level in the bidirectional feature pyramid of the target detection model based on the visibility includes:
[0011] Visibility is encoded to obtain a visibility feature vector. The visibility feature vector is then input into a neural network corresponding to a preset level to obtain three weights: same-level weights, upper-level weights, and lower-level weights. The same-level weights are the weights of the inputs from the backbone network that are at the same level as the preset level. The upper-level weights are the weights of the inputs from the level above the preset level. The lower-level weights are the weights of the inputs from the level below the preset level.
[0012] Optionally, calculating the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target includes:
[0013] For each candidate target Obtain the detection category and central position The basic attention score is obtained from the category-basic attention score table based on the detection category;
[0014] With the central position Using the circle as the center, determine the neighborhood search radius R from the category-neighborhood radius table based on the detection category; identify all other candidate targets within the circular neighborhood to obtain the neighborhood target set;
[0015] Initialize cumulative neighborhood influence score For each neighboring target in the neighborhood target set : Get Detection categories and central position ,calculate and The Euclidean distance D between them is obtained through Calculate the impact value of a single concern ;in, yes and Relevant weighting factors, It is a monotonically non-increasing function of distance D. Accumulated to the neighborhood influence score middle;
[0016] Candidate targets The sum of the baseline attention score and the neighborhood influence score is used as the attention intensity of the candidate target. .
[0017] Optionally, obtaining the non-maximum suppression parameters for each candidate target based on the attention intensity and scaling factor includes:
[0018] pass Obtain candidate targets Adjusted confidence level ;in, The original confidence level. For the sake of focusing on intensity, SF is the scaling factor;
[0019] pass Obtain candidate targets IoU threshold ;in, To Normalize, The function constrains the calculated value to [min] within max], , This is the minimum value of the scaling factor. This is the maximum value of the scaling factor. , , For parameters.
[0020] Optionally, the step of performing non-maximum suppression processing on the candidate target using non-maximum suppression parameters to obtain an optimized candidate target includes:
[0021] Retrieve all candidate targets and add them to the pending list; each candidate target has a bounding box. Adjusted confidence level and IoU threshold ;
[0022] Initialize an empty list to store the optimized candidate objectives; iteratively select from the list of objectives to be processed. The highest-ranking candidate objective M is moved to the optimization objective list, and the objects with an IoU exceeding M in the pending list are removed. Candidate targets.
[0023] This application also proposes a safety control system for building construction projects, comprising:
[0024] The target recognition unit is used to acquire images of the construction site, collect the light intensity and visibility of the construction site; calculate the scaling factor of the target detection model based on the light intensity, determine the weight of each input in the preset level of the bidirectional feature pyramid in the target detection model based on the visibility; input the image into the target detection model to obtain candidate targets and the confidence level of the candidate targets;
[0025] The safety control unit is used to calculate the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target; obtain the non-maximum suppression parameter for each candidate target based on the attention intensity and scaling factor; perform non-maximum suppression processing on the candidate target using the non-maximum suppression parameter to obtain optimized candidate targets; determine whether there is a safety violation event based on the category and positional relationship of the optimized candidate targets; if so, generate corresponding safety control instructions.
[0026] Optionally, calculating the scaling factor of the target detection model based on the illumination intensity includes:
[0027] The light intensity is divided into three intervals based on the preset light intensity threshold: low light intensity interval, medium light intensity interval, and high light intensity interval; each light intensity interval corresponds to a scaling factor interval.
[0028] Determine the illumination range where the indicated light intensity is located, and then determine the scaling factor range;
[0029] The scaling factor is determined from the defined scaling factor range based on the dust concentration at the construction site.
[0030] Optionally, determining the weight of each input at a preset level in the bidirectional feature pyramid of the target detection model based on the visibility includes:
[0031] Visibility is encoded to obtain a visibility feature vector. The visibility feature vector is then input into a neural network corresponding to a preset level to obtain three weights: same-level weights, upper-level weights, and lower-level weights. The same-level weights are the weights of the inputs from the backbone network that are at the same level as the preset level. The upper-level weights are the weights of the inputs from the level above the preset level. The lower-level weights are the weights of the inputs from the level below the preset level.
[0032] Optionally, calculating the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target includes:
[0033] For each candidate target Obtain the detection category and central position The basic attention score is obtained from the category-basic attention score table based on the detection category;
[0034] With the central position Using the circle as the center, determine the neighborhood search radius R from the category-neighborhood radius table based on the detection category; identify all other candidate targets within the circular neighborhood to obtain the neighborhood target set;
[0035] Initialize cumulative neighborhood influence score For each neighboring target in the neighborhood target set : Get Detection categories and central position ,calculate and The Euclidean distance D between them is obtained through Calculate the impact value of a single concern ;in, yes and Relevant weighting factors, It is a monotonically non-increasing function of distance D. Accumulated to the neighborhood influence score middle;
[0036] Candidate targets The sum of the baseline attention score and the neighborhood influence score is used as the attention intensity of the candidate target. .
[0037] Optionally, obtaining the non-maximum suppression parameters for each candidate target based on the attention intensity and scaling factor includes:
[0038] pass Obtain candidate targets Adjusted confidence level ;in, The original confidence level. For the sake of focusing on intensity, SF is the scaling factor;
[0039] pass Obtain candidate targets IoU threshold ;in, To Normalize, The function constrains the calculated value to [min] within max], , This is the minimum value of the scaling factor. This is the maximum value of the scaling factor. , , For parameters.
[0040] Optionally, the step of performing non-maximum suppression processing on the candidate target using non-maximum suppression parameters to obtain an optimized candidate target includes:
[0041] Retrieve all candidate targets and add them to the pending list; each candidate target has a bounding box. Adjusted confidence level and IoU threshold ;
[0042] Initialize an empty list to store the optimized candidate objectives; iteratively select from the list of objectives to be processed. The highest-ranking candidate objective M is moved to the optimization objective list, and the objects with an IoU exceeding M in the pending list are removed. Candidate targets.
[0043] This application also proposes a computer-readable storage medium, characterized in that the storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method described above.
[0044] This application enhances the model's adaptability and robustness to different lighting and visibility conditions by real-time sensing of environmental factors such as light intensity, visibility, and dust concentration at the construction site. This ensures relatively reliable original detection results even in harsh environments. Furthermore, by calculating the attention intensity of each candidate target and combining it with the environmental scaling factor, this application dynamically generates adjusted confidence levels and non-maximum suppression cross-union thresholds for each candidate target, thereby reducing false negatives and false positives. Attached Figure Description
[0045] Figure 1This is a flowchart of Example 1;
[0046] Figure 2 This is a schematic diagram of the layers and weights of BiFPN;
[0047] Figure 3 A schematic diagram of a multilayer perceptron for calculating weights;
[0048] Figure 4 This is a schematic diagram of the candidate boxes and the adjusted confidence and IoU thresholds. Detailed Implementation
[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0050] In a specific embodiment, this application proposes a safety control method for building engineering, such as... Figure 1 As shown, it includes:
[0051] S1, acquire an image of the construction site, and collect the light intensity and visibility of the construction site; calculate the scaling factor of the target detection model based on the light intensity, and determine the weight of each input in the preset level of the bidirectional feature pyramid in the target detection model based on the visibility; input the image into the target detection model to obtain candidate targets and the confidence of the candidate targets;
[0052] Cameras are deployed at the construction site. Real-time video streams captured by multiple fixed or rotatable surveillance cameras or drones are extracted at a preset frequency to form images of the construction site. These image data are transmitted to a cloud processing server via wired or wireless networks. Simultaneously, light sensors, such as photoresistors and photodiodes, are deployed in the construction site area. Light data is transmitted synchronously with the image data using Internet of Things (IoT) technology. In another embodiment, light intensity is estimated by analyzing the acquired images, such as calculating the average brightness and brightness histogram distribution characteristics, and then mapped to a predefined light level. Since visibility estimation from images is prone to error, or the error can be significant, it is preferable to measure atmospheric visibility using a deployed visibility meter. However, when high visibility is not required, estimation from images can also be performed.
[0053] Using the collected illumination intensity information, a scaling factor is calculated. This scaling factor is a composite scaling factor that adjusts the EfficientDet model. The scaling factor controls the coordinated scaling of the model's depth, width, and input resolution, thus determining the model's size. For example, when poor lighting conditions lead to decreased image quality, a larger scaling factor is needed, such as D4-D7 in the EfficientDet series; conversely, when illumination is sufficient, the scaling factor is reduced, such as D0-D3. In one embodiment, illumination intensity is mapped to a preset scaling factor, or a scaling factor is output based on the illumination intensity level using a piecewise function. The higher the illumination intensity, the smaller the scaling factor, and the simpler the corresponding EfficientDet model. In another embodiment, the scaling factor is a positive integer, ranging from 0 to 7. A scaling factor of 0 corresponds to the EfficientDet-D0 model, and 7 corresponds to the EfficientDet-D7 model.
[0054] Using the collected visibility information, the input weights of specific levels in the Bidirectional Feature Pyramid (BiFPN) within the object detection model are adjusted, such as... Figure 2 As shown, Figure 2 In this context, w11-w33 represent weights. Before fusing feature inputs from different layers of the backbone network and other layers of BiFPN, the BiFPN multiplies these weights. This application adjusts these weights based on visibility, as changes in visibility affect the reliability of features at different scales. For example, in low visibility, the features of small objects in the distance may be blurry. In this case, the weights of inputs from deeper layers can be reduced, or the weights of inputs from shallower layers or the same layer can be increased, thereby optimizing the feature fusion effect under the current visibility conditions. In one embodiment, this is implemented using a multilayer perceptron. The multilayer perceptron takes visibility or its encoded features as input and outputs the weights of each input path corresponding to a specific layer of the BiFPN, such as... Figure 3 As shown.
[0055] The acquired raw image data undergoes preprocessing, including image resizing, normalization, and data augmentation. Then, the preprocessed image to be detected is input into a configured object detection model for forward propagation. The object detection model identifies various types of targets that may be present, such as workers, machinery, material piles, safety warning signs, and hazardous area boundaries, generating a bounding box for each identified candidate target and providing a confidence score.
[0056] S2, calculate the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target, obtain the non-maximum suppression parameter for each candidate target based on the attention intensity and scaling factor, perform non-maximum suppression processing on the candidate target using the non-maximum suppression parameter to obtain optimized candidate targets; determine whether there is a security violation event based on the category and positional relationship of the optimized candidate targets, and if so, generate corresponding security control instructions.
[0057] For each candidate target, the attention intensity is calculated, which integrates the category of the candidate target itself as well as the categories and spatial distribution of other candidate targets in its neighborhood. For example, a person's attention intensity will increase if there is an operating excavator or an unprotected pit edge nearby. Preferably, the contribution of neighborhood targets to the attention intensity is quantified using the distance, relative position, and preset category risk association weights between candidate targets. Based on the calculated attention intensity of each candidate target and the scaling factor of the target detection model determined in step S1, the parameters used in the NMS process are determined for each candidate target or candidate target pair. In one embodiment, the NMS parameters include the intersection-over-union (IoU) threshold, confidence adjustment factor, etc. The non-maximum suppression parameters calculated above make it more difficult to suppress candidate targets with high attention intensity in the NMS process, such as workers in high-risk situations, even if their IoU with other targets is high or their own confidence is slightly lower than other highly overlapping targets. Furthermore, when the scaling factor is high, the NMS process can impose higher requirements on the confidence and localization accuracy of candidate targets, employing stricter suppression criteria. Conversely, when the scaling factor is low, the NMS process may need to appropriately relax the criteria to avoid erroneously suppressing key targets that are already difficult to detect accurately in low-quality images, especially targets with high attention intensity. Using the NMS parameters determined for each candidate target, a non-maximum suppression operation is performed on all initial candidate targets to filter out redundant boxes, resulting in a set of candidate targets that highlight key security elements. In one embodiment, the average of the IOU thresholds of two candidate targets is determined. If the IOU of the two is greater than the IOU threshold, the candidate box with the lowest confidence is deleted.
[0058] Safety violations typically involve matching the category information of optimization candidate targets and their precise location relationships against a predefined safety rule base. An example of a safety rule base includes: "worker not wearing a safety helmet," "person in a hazardous area," "person standing under a robotic arm," and "worker at height without a safety harness." Once a safety violation is determined based on the above judgment logic, corresponding safety control instructions are generated. These instructions vary depending on the type, severity, and location of the violation, and may include: sending alarms to on-site management personnel, triggering audible and visual alarms, recording the event in a log, or linking it to control equipment.
[0059] In an optional embodiment, calculating the scaling factor of the target detection model based on the illumination intensity includes:
[0060] The light intensity is divided into three intervals based on the preset light intensity threshold: low light intensity interval, medium light intensity interval, and high light intensity interval; each light intensity interval corresponds to a scaling factor interval.
[0061] Determine the illumination range where the indicated light intensity is located, and then determine the scaling factor range;
[0062] The scaling factor is determined from the defined scaling factor range based on the dust concentration at the construction site.
[0063] Specifically, a light intensity threshold is preset based on historical data, for example... and By comparing the currently collected light intensity These thresholds precisely divide the lighting conditions into three or more specific intervals, for example, when When, it is defined as the low light range; when When, it is defined as the medium illumination range; when This is defined as a high-light interval. Each such light interval has a pre-configured corresponding scaling factor range. For example, the low-light range corresponds to a larger range of scaling factor values, such as... Corresponding to [4,6], the medium illumination interval corresponds to a medium range, such as... The corresponding area is [2,4], while the highlight area corresponds to a smaller range, such as... The range is [0, 2]. Then, the final scaling factor is further determined. In one embodiment, this is achieved through a predefined function or rule base. This function or rule base takes dust concentration as input and combines it with the currently determined scaling factor range to output a specific scaling factor value SF. If SF is not an integer, it is rounded down. Under the same lighting conditions, higher dust concentration means a further decrease in image quality. A relatively large scaling factor value is selected within the scaling factor range corresponding to this lighting condition to enhance the model's feature extraction capability. Conversely, if the dust concentration is low, a relatively small scaling factor value is selected within the range to optimize computational efficiency while ensuring detection performance. In a more specific embodiment, if the dust concentration is greater than a preset value, the maximum value of the determined scaling factor range is used as the final scaling factor. If the dust concentration is less than another preset value, the minimum value of the determined scaling factor range is used as the final scaling factor. Otherwise, the median value of the determined scaling factor range is used as the final scaling factor.
[0064] Changes in visibility can severely impact the quality and information content of features extracted from the original image at various levels. Under low visibility conditions, high-level semantic features may become unreliable due to blurred distant objects, while low-level detail features or features extracted directly from the backbone network at the same level may also be affected by noise. In an optional embodiment, determining the weight of each input at a preset level in the bidirectional feature pyramid of the target detection model based on the visibility includes:
[0065] Visibility is encoded to obtain a visibility feature vector. The visibility feature vector is then input into a neural network corresponding to a preset level to obtain three weights: same-level weights, upper-level weights, and lower-level weights. The same-level weights are the weights of the inputs from the backbone network that are at the same level as the preset level. The upper-level weights are the weights of the inputs from the level above the preset level. The lower-level weights are the weights of the inputs from the level below the preset level.
[0066] Specifically, the visibility corresponding to the image is obtained, and the visibility value is encoded into a visibility feature vector. The encoding process includes normalization followed by encoding, or discretization into visibility levels, followed by one-hot encoding or learnable embedding vectors for each level. For each preset layer in the BiFPN network, the generated visibility feature vector is input into a neural network, such as an MLP, bound to that layer. The MLP outputs three independent weight values, corresponding to the weights of the same layer, the upper layer, and the lower layer, respectively. These weights are multiplied by the input feature map from the corresponding path when feature summation and fusion are performed at the BiFPN nodes, thereby achieving adaptive weighted fusion based on visibility. For example, in a BiFPN node... In this process, the input includes features from the same level of the backbone network. Features from the previous layer after upsampling and features from the next layer after downsampling The three weights are then applied to the three input paths respectively. In one embodiment, the preset level is all the layers in the bidirectional feature pyramid except for the first and last layers.
[0067] In an optional embodiment, calculating the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target includes:
[0068] For each candidate target Obtain the detection category and central position The basic attention score is obtained from the category-basic attention score table based on the detection category;
[0069] With the central position Using the circle as the center, determine the neighborhood search radius R from the category-neighborhood radius table based on the detection category; identify all other candidate targets within the circular neighborhood to obtain the neighborhood target set;
[0070] Initialize cumulative neighborhood influence score For each neighboring target in the neighborhood target set : Get Detection categories and central position ,calculate and The Euclidean distance D between them is obtained through Calculate the impact value of a single concern ;in, yes and Relevant weighting factors, It is a monotonically non-increasing function of distance D. Accumulated to the neighborhood influence score middle;
[0071] Candidate targets The sum of the baseline attention score and the neighborhood influence score is used as the attention intensity of the candidate target. .
[0072] Specifically, for each candidate target initially identified by the target detection model... , obtain the detection category For example: worker, excavator, hard hat, foundation pit, and their center coordinates in the image. .based on The system queries a pre-built category-based attention score table, which assigns a base score to each possible target category. This score represents the inherent importance of that target category in a security monitoring scenario. For example, a worker's base attention score is higher than that of a static roadblock. Simultaneously, based on... Category It will also look up and determine a specific neighborhood search radius R from the category-neighborhood radius table. R defines a neighborhood search radius R. A central circular area is used to identify possible connections with... Other neighboring targets that are related or mutually influential are identified to form a neighborhood target set.
[0073] Initialize a cumulative neighborhood influence score for T_i If the value is 0, iterate through every neighboring target in the neighboring target set. For each Obtain its detection category and central position .calculate and The Euclidean distance D between them. (Using the formula...) calculate right The resulting single-item attention impact value .in, It is a predefined relevance weight factor that represents the category. Targets and Categories The degree of risk correlation when the objectives occur simultaneously, for example, when They are workers When the crane is in operation, the W value may be very high. F(D) is a monotonically non-increasing function of distance D, indicating that the influence intensity decreases with increasing distance; preferably, a Gaussian function or an inverse proportional function is used. Each calculated... All are accumulated to In the middle. Finally, the candidate targets The original basic attention score and its cumulative neighborhood influence score Add them together or add them with weights to get the final intensity of attention. .
[0074] In an optional embodiment, obtaining the non-maximum suppression parameters for each candidate target based on the attention intensity and scaling factor includes:
[0075] pass Obtain candidate targets Adjusted confidence level ;in, The original confidence level. For the sake of focusing on intensity, SF is the scaling factor;
[0076] pass Obtain candidate targets IoU threshold ;in, To Normalize, The function constrains the calculated value to [min] within max], , This is the minimum value of the scaling factor. This is the maximum value of the scaling factor. , , For parameters.
[0077] Specifically, for each candidate target Calculate its parameters in the NMS process: confidence level and IoU threshold Confidence level The calculation formula is: In the formula, It is the object detection model for candidate targets The output is the raw confidence score. It is the calculated attention intensity of the candidate target, parameter It is a preset positive constant used to control the intensity of attention. The enhancement of the original confidence level, SF, is a scaling factor previously determined based on light intensity and dust concentration. A target with high intensity of interest will see a significant increase in confidence; simultaneously, the scaling factor further adjusts this confidence value, allowing for a more accurate measurement of detection results under a specific model configuration. Of course, other calculation methods can also be used, such as... Then normalize it.
[0078] Candidate Targets IoU threshold Calculated using the following formula: In the formula, This is the basic IoU threshold, for example, 0.5. Intensity of attention The result of normalization This is a preset normal value that determines the extent to which a high-intensity-of-concern target can have its IoU threshold increased, thus making it more tolerant of other targets that overlap with it during the NMS process. It is the adverse condition factor calculated based on the scaling factor SF, and its calculation formula is as follows: ,in and These are the preset minimum and maximum values of the scaling factor, respectively. Preferably, , When SF is low, i.e., when the light intensity is high, Approaching 0; when SF is large, i.e., when the illumination difference is large, Approaching 1, It is a preset positive constant, preferably between 0 and 1, used to adjust the degree to which adverse conditions weaken the IoU threshold. The IoU threshold will increase due to high attention received by an item, while The term will lower the IoU threshold under unfavorable conditions.
[0079] In an optional embodiment, the step of performing non-maximum suppression processing on the candidate target using non-maximum suppression parameters to obtain an optimized candidate target includes:
[0080] Retrieve all candidate targets and add them to the pending list; each candidate target has a bounding box. Adjusted confidence level and IoU threshold ;
[0081] Initialize an empty list to store the optimized candidate objectives; iteratively select from the list of objectives to be processed. The highest-ranking candidate objective M is moved to the optimization objective list, and the objects with an IoU exceeding M in the pending list are removed. Candidate targets.
[0082] Specifically, obtain all raw candidate targets output by the object detection model. Each candidate target... Including bounding boxes and NMS parameters, such as Figure 4 As shown. All candidate targets are added to the pending list. Simultaneously, an empty optimization target list is initialized; this list will store the candidate targets that, after NMS filtering, are ultimately determined to be the optimal detection results.
[0083] NMS enters the iterative execution phase, which continues until the list of pending tasks is empty. In each iteration, the task with the highest adjusted confidence level is first selected from the list of pending tasks. The candidate targets are denoted as M. Candidate target M is the most reliable detection at present and is immediately removed from the pending list and added to the optimization target list. Next, all other remaining candidate targets in the pending list are traversed. For each Calculate its bounding box Boundary box of the selected optimal target M The intersection-union ratio between them. If the calculated result is... The value exceeds the IoU threshold of the currently selected target M. Then candidate target Since T_j highly overlaps with M and represents the same object, it is removed from the list of objects to be processed. This process continues until the list of objects to be processed is empty. At this point, the list of optimization targets contains the final candidate targets obtained after processing with the dynamic parameter NMS.
[0084] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. In addition, various different implementations of the embodiments of the present invention can be arbitrarily combined, as long as they do not violate the spirit of the embodiments of the present invention, and they should also be regarded as the content disclosed in the embodiments of the present invention.
Claims
1. A safety control method for construction engineering, characterized in that, include: Acquire images of the construction site, and collect data on the light intensity and visibility of the construction site; The scaling factor of the target detection model is calculated based on the illumination intensity, and the weight of each input in the preset layer of the bidirectional feature pyramid in the target detection model is determined based on the visibility. The image is input into the target detection model to obtain candidate targets and their confidence levels. The attention intensity is calculated using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target. Based on the attention intensity and scaling factor, the non-maximum suppression parameter of each candidate target is obtained. The non-maximum suppression processing is performed on the candidate target using the non-maximum suppression parameter to obtain the optimized candidate target. The existence of a security violation event is determined according to the category and positional relationship of the optimized candidate target. If it exists, the corresponding security control instruction is generated.
2. The method according to claim 1, characterized in that, The step of calculating the scaling factor of the target detection model based on the illumination intensity includes: The light intensity is divided into three intervals based on the preset light intensity threshold: low light intensity interval, medium light intensity interval, and high light intensity interval; each light intensity interval corresponds to a scaling factor interval. Determine the illumination range where the indicated light intensity is located, and then determine the scaling factor range; The scaling factor is determined from the defined scaling factor range based on the dust concentration at the construction site.
3. The method according to claim 1, characterized in that, The step of determining the weight of each input at a preset level in the bidirectional feature pyramid of the target detection model based on the visibility includes: Visibility is encoded to obtain a visibility feature vector. The visibility feature vector is then input into a neural network corresponding to a preset level to obtain three weights: same-level weights, upper-level weights, and lower-level weights. The same-level weights are the weights of the inputs from the backbone network that are at the same level as the preset level. The upper-level weights are the weights of the inputs from the level above the preset level. The lower-level weights are the weights of the inputs from the level below the preset level.
4. The method according to claim 1, characterized in that, The calculation of attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target includes: For each candidate target Obtain the detection category and central position The basic attention score is obtained from the category-basic attention score table based on the detection category; With the central position Using the circle as the center, determine the neighborhood search radius R from the category-neighborhood radius table based on the detection category; identify all other candidate targets within the circular neighborhood to obtain the neighborhood target set; Initialize cumulative neighborhood influence score For each neighboring target in the neighborhood target set : Get Detection categories and central position ,calculate and The Euclidean distance D between them is obtained through Calculate the impact value of a single concern ;in, yes and Relevant weighting factors, It is a monotonically non-increasing function of distance D. Accumulated to the neighborhood influence score middle; Candidate targets The sum of the baseline attention score and the neighborhood influence score is used as the attention intensity of the candidate target. .
5. The method according to claim 1, characterized in that, The non-maximum suppression parameters for each candidate target, obtained based on the attention intensity and scaling factor, include: pass Obtain candidate targets Adjusted confidence level ;in, The original confidence level. For the sake of focusing on intensity, SF is the scaling factor; pass Obtain candidate targets IoU threshold ;in, To Normalize, The function constrains the calculated value to [min] max], , This is the minimum value of the scaling factor. This is the maximum value of the scaling factor. , , For parameters.
6. The method according to claim 1, characterized in that, The step of performing non-maximum suppression processing on the candidate target using non-maximum suppression parameters to obtain optimized candidate targets includes: Retrieve all candidate targets and add them to the pending list; each candidate target has a bounding box. Adjusted confidence level and IoU threshold ; Initialize an empty list to store the optimized candidate objectives; iteratively select from the list of objectives to be processed. The highest-ranking candidate objective M is moved to the optimization objective list, and the objects with an IoU exceeding M in the pending list are removed. Candidate targets.
7. A safety control system for building construction projects, characterized in that, include: The target recognition unit is used to acquire images of the construction site and collect the light intensity and visibility of the construction site. The scaling factor of the target detection model is calculated based on the illumination intensity, and the weight of each input in the preset layer of the bidirectional feature pyramid in the target detection model is determined based on the visibility. The image is input into the target detection model to obtain candidate targets and their confidence levels. The safety control unit is used to calculate the attention intensity using the category of the candidate target and the spatial distribution of other candidate targets in the neighborhood of the candidate target; obtain the non-maximum suppression parameter for each candidate target based on the attention intensity and scaling factor; perform non-maximum suppression processing on the candidate target using the non-maximum suppression parameter to obtain optimized candidate targets; determine whether there is a safety violation event based on the category and positional relationship of the optimized candidate targets; if so, generate corresponding safety control instructions.
8. The system according to claim 7, characterized in that, The step of calculating the scaling factor of the target detection model based on the illumination intensity includes: The light intensity is divided into three intervals based on the preset light intensity threshold: low light intensity interval, medium light intensity interval, and high light intensity interval; each light intensity interval corresponds to a scaling factor interval. Determine the illumination range where the indicated light intensity is located, and then determine the scaling factor range; The scaling factor is determined from the defined scaling factor range based on the dust concentration at the construction site.
9. The system according to claim 7, characterized in that, The step of determining the weight of each input at a preset level in the bidirectional feature pyramid of the target detection model based on the visibility includes: Visibility is encoded to obtain a visibility feature vector. The visibility feature vector is then input into a neural network corresponding to a preset level to obtain three weights: same-level weights, upper-level weights, and lower-level weights. The same-level weights are the weights of the inputs from the backbone network that are at the same level as the preset level. The upper-level weights are the weights of the inputs from the level above the preset level. The lower-level weights are the weights of the inputs from the level below the preset level.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 6.