Construction site dynamic adaptive target detection method, device and equipment and storage medium

By using a dynamic adaptive attention module and a deformable feature pyramid network, combined with an adaptive overlap loss function, the problems of noise interference, difficulty in detecting targets at extreme scales, and high computational resource consumption in construction site safety supervision scenarios are solved, achieving high-precision target detection with low resource consumption.

CN121582877APending Publication Date: 2026-02-27THREE GORGES HI TECH INFORMATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511838336.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies in construction site safety monitoring scenarios suffer from problems such as environmental noise interference, difficulty in detecting targets at extreme scales, low efficiency of multi-scale feature fusion, poor adaptability of loss functions, and high consumption of computational resources, resulting in poor detection accuracy and efficiency.

Method used

A dynamic adaptive attention module is adopted, which combines channel attention and spatially deformable convolution. The channel weights are generated by the Sigmoid function and a learnable offset is introduced to dynamically adjust the receptive field of the convolution kernel. Combined with a deformable feature pyramid network and an adaptive overlap loss function, adaptive feature fusion and dynamic adjustment of the topological relationship between targets at multiple scales on the construction site are achieved.

Benefits of technology

It effectively suppresses noise interference from the construction site environment, improves detection accuracy and recognition rate, avoids misjudgment of highly overlapping targets, reduces computing resource consumption, ensures the accurate and reliable operation of safety monitoring functions, and improves detection speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582877A_ABST
    Figure CN121582877A_ABST
Patent Text Reader

Abstract

The invention discloses a construction site dynamic self-adaptive target detection method, device and equipment and a storage medium, and the method comprises the steps: combining channel attention and space deformable convolution through a dynamic self-adaptive attention module, generating a channel weight through a Sigmoid function, and introducing a learnable offset to dynamically adjust a convolution kernel receptive field, thereby achieving the target detection of a construction site. Obtaining key feature representation for inhibiting construction site environment noise interference; applying a deformable feature pyramid network according to the key feature representation, dynamically adjusting the size and position of a receptive field according to the target scale and shape in a feature fusion stage, and obtaining a scale-adaptive feature fusion representation suitable for the construction site multi-scale target; according to the feature fusion representation, calculating by applying an adaptive overlap loss function to obtain a topological relation weight between the targets, dynamically adjusting a regression gradient of the overlapped targets according to the topological relation weight between the targets, and obtaining a target detection result; noise suppression and target feature enhancement can be realized, and the detection precision and the recognition accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent safety monitoring technology for construction sites, and in particular to a dynamic adaptive target detection method, device, equipment, and storage medium for construction sites. Background Technology

[0002] In today's construction site safety monitoring scenarios, object detection technology plays a crucial role. Currently, the main object detection methods are based on traditional computer vision algorithms and improved models based on attention mechanisms. Among traditional computer vision algorithms, the YOLO series and Faster R-CNN are typical representatives. The YOLO series, with its high processing speed, can play a role in real-time detection scenarios. It achieves rapid object detection by dividing the image into a grid, with each grid responsible for predicting the bounding box and category of the object. Faster R-CNN uses a Region Proposal Network (RPN), which first generates candidate regions that may contain the object, and then classifies and regresses these candidate regions, achieving high detection accuracy. Improved models based on attention mechanisms, such as Transformer-based detectors, introduce attention mechanisms, enabling the model to pay more attention to key regions in the image, thereby improving detection performance. The core idea of ​​the attention mechanism is to allow the model to dynamically adjust the attention to different regions according to different task requirements when processing information, similar to how the human visual system automatically focuses on important parts when observing a scene.

[0003] 1.1 Multi-scale feature extraction To detect targets at different scales, existing techniques typically employ Feature Pyramid Networks (FPNs) to fuse feature maps from different levels. In deep convolutional neural networks, shallow networks extract feature maps with high resolution, capable of capturing detailed information about the target, making them suitable for detecting small targets. In contrast, deep networks extract feature maps with strong semantic information, making them suitable for detecting large targets. FPNs fuse feature maps from different levels through top-down and lateral connections, ensuring that each level of feature map contains information at different scales, thus enabling better detection of targets at different scales. Specifically, the top-down process upsamples the deep, high-semantic feature maps and then laterally connects them with the shallow, high-resolution feature maps. The fused feature map possesses both rich semantic information and high resolution.

[0004] 1.2 Attention Mechanism Attention mechanisms in object detection mainly take two forms: channel attention and spatial attention. Channel attention, such as the Squeeze-and-Excitation Module (SE), generates channel weights by performing global average pooling and fully connected operations on the channel dimension of the feature map. Then, it weights the features of each channel to enhance the feature response of key channels and suppress information from unimportant channels. The spatial attention part of the Convolutional Block Attention Module (CBAM) generates a spatial attention map by performing average pooling and max pooling on the spatial dimension of the feature map. Then, it weights each spatial location of the feature map to highlight the features of key regions and suppress interference from non-key regions.

[0005] 1.3 Loss Function In object detection, the design of the loss function directly affects the detection performance of the model. Existing techniques use CIoULoss or FocalLoss to address the problems of target scale differences and class imbalance. CIoULoss, based on Intersectionover Union (IoU), considers the distance to the center point of the target and the aspect ratio, and can more accurately measure the difference between the predicted box and the ground truth box, especially when dealing with scenes with large differences in target scale. FocalLoss, on the other hand, solves the class imbalance problem by reducing the weight of easily classified samples and increasing the weight of difficult-to-classify samples, making the model pay more attention to the minority class of targets.

[0006] Problems with existing technology: Although existing technologies have achieved certain results in target detection, they still have significant limitations in complex construction site environments, such as those with varying lighting, target occlusion, dust interference, and dense distribution of multi-scale targets. Variations in lighting cause changes in image brightness and contrast, making target features unstable and increasing detection difficulty. When targets are occluded, some target features are obscured by other targets, making it difficult for traditional algorithms to accurately detect occluded targets. Dust interference blurs images, reducing image quality and affecting feature extraction. When multi-scale targets are densely distributed, targets of different scales appear densely in the image, making it difficult for existing technologies to effectively detect targets of different scales simultaneously.

[0007] 2.1 Noise Interference Various noises exist in the construction site environment, such as shadows. Dust and other noises can cause problems. Traditional attention mechanisms are not good at suppressing local noise, leading to a higher false detection rate. For example, when a target is in a shadow area, its brightness and color will change. Traditional channel attention and spatial attention are difficult to distinguish between shadow areas and target areas, resulting in incorrect extraction of target features. Dust interference can cause a lot of noise in the image. This noise can interfere with the attention mechanism's focus on key areas, causing the model to mistakenly identify the noise as part of the target, thus resulting in false detection.

[0008] 2.2 Low efficiency of multi-scale feature fusion In construction site scenes, the scale of targets varies drastically. For example, a worker in the distance may only be a few pixels in size, while nearby machinery occupies most of the image area. Fixed-structure feature pyramids struggle to dynamically adapt to such extreme scale changes. Traditional FPNs use fixed fusion methods and cannot dynamically adjust the feature fusion strategy according to the actual situation of targets at different scales, resulting in unsatisfactory detection results for both small and large targets. For small targets, their features may become too abstract in deep networks, making it difficult to effectively fuse and detect them using fixed feature pyramids. For large targets, the features of shallow networks may be insufficient to capture their overall shape and structure, leading to a decrease in detection accuracy.

[0009] 2.3 Poor adaptability of the loss function In scenarios where targets overlap significantly, such as stacked building materials, the optimization effect of existing IoU-based loss functions is limited. When multiple targets overlap significantly, the IoU calculation between the predicted bounding box and the ground truth bounding box may not accurately reflect the actual position and shape differences of the targets. For example, two highly overlapping targets may have a high IoU between their predicted bounding boxes, but their actual positions and shapes may differ significantly. Existing loss functions cannot effectively distinguish this situation, resulting in low regression accuracy for overlapping targets and high false negative and false positive rates.

[0010] 2.4 High computational resource consumption As target detection models become increasingly complex, the consumption of computing resources also increases. Complex models are difficult to deploy in real time on edge devices at construction sites, such as embedded devices like security cameras. These edge devices typically have limited computing power and memory resources. Traditional target detection models, due to their large number of parameters and high computational complexity, cannot achieve real-time target detection on these devices, thus limiting their application in construction site safety monitoring scenarios. Summary of the Invention

[0011] The main objective of this invention is to provide a dynamic adaptive target detection method, device, equipment, and storage medium for construction sites, aiming to solve the technical problems in existing technologies for construction site safety supervision scenarios, such as difficulty in detecting targets under environmental noise interference and extreme scales, low accuracy in detecting highly overlapping targets, low efficiency in multi-scale feature fusion, poor adaptability of loss functions, and high consumption of computational resources.

[0012] In a first aspect, the present invention provides a dynamic adaptive target detection method for construction sites, the method comprising the following steps: By combining channel attention and spatially deformable convolution with a dynamic adaptive attention module, channel weights are generated using the Sigmoid function, and learnable offsets are introduced to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference. Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. Based on the feature fusion representation, the topological relationship weights between targets are calculated using an adaptive overlap loss function. The regression gradients of overlapping targets are then dynamically adjusted based on these topological relationship weights to obtain the target detection results.

[0013] Optionally, the step of combining channel attention and spatially deformable convolution through a dynamic adaptive attention module, generating channel weights using the Sigmoid function, and introducing learnable offsets to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations for suppressing construction site environmental noise interference, includes: The channel attention branch of the dynamic adaptive attention module uses the Sigmoid function to perform spatial dimension global average pooling and max pooling on the feature maps of video frames in the construction site monitoring video in the construction site safety monitoring scenario to obtain the channel weight matrix. The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolutional kernel, and obtain key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix.

[0014] Optionally, the step of dynamically adjusting the receptive field of the convolution kernel by learning offsets through the spatially deformable convolutional branch of the dynamic adaptive attention module, and obtaining key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix, includes: The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the position and shape of the receptive field of the convolutional kernel, thereby adjusting the sampling points of the convolutional kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains spatially deformable convolutional output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference:

[0015] in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

[0016] Optionally, the step of applying a deformable feature pyramid network based on the key feature representation, and dynamically adjusting the receptive field size and position according to the target scale and shape during the feature fusion stage to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site, includes: Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape of multi-scale targets on the construction site. The scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site is obtained through the following formula:

[0017] in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

[0018] Optionally, the step of calculating the topological relationship weights between targets using an adaptive overlap loss function based on the feature fusion representation, and dynamically adjusting the regression gradients of overlapping targets based on the topological relationship weights to obtain target detection results includes: Based on the feature fusion representation, the topological relationship weights between targets are calculated using the adaptive overlap loss function as follows:

[0019] in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

[0020] Optionally, the step of dynamically adjusting the regression gradient of overlapping targets based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result includes: The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function. The target detection result is obtained by the following formula:

[0021]

[0022] in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

[0023] Optionally, after calculating the topological relationship weights between targets using the adaptive overlap loss function based on the feature fusion representation, and dynamically adjusting the regression gradients of overlapping targets based on the topological relationship weights to obtain the target detection results, the construction site dynamic adaptive target detection method further includes: The model parameters of the deep learning object detection model used by the construction site dynamic adaptive object detection framework are searched by neural architecture, and the model structure of the deep learning object detection model is optimized by TensorRT, so that the optimized deep learning object detection model can achieve real-time inference on the construction site edge device.

[0024] Secondly, to achieve the above objectives, the present invention also proposes a construction site dynamic adaptive target detection device, the construction site dynamic adaptive target detection device comprising: The key feature acquisition module is used to combine channel attention and spatially deformable convolution with a dynamic adaptive attention module, generate channel weights using the Sigmoid function, and introduce learnable offsets to dynamically adjust the receptive field of the convolution kernel to obtain key feature representations that suppress construction site environmental noise interference. The feature fusion acquisition module is used to apply a deformable feature pyramid network based on the key feature representation. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. The detection result acquisition module is used to calculate the topological relationship weights between targets based on the feature fusion representation and an adaptive overlap loss function, and dynamically adjust the regression gradient of overlapping targets based on the topological relationship weights between targets to obtain the target detection results.

[0025] Thirdly, to achieve the above objectives, the present invention also proposes a construction site dynamic adaptive target detection device, which includes: a memory, a processor, and a construction site dynamic adaptive target detection program stored in the memory and executable on the processor. The construction site dynamic adaptive target detection program is configured to implement the steps of the construction site dynamic adaptive target detection method described above.

[0026] Fourthly, to achieve the above objectives, the present invention also proposes a storage medium storing a site dynamic adaptive target detection program, wherein the site dynamic adaptive target detection program, when executed by a processor, implements the steps of the site dynamic adaptive target detection method described above.

[0027] The proposed construction site dynamic adaptive target detection method combines channel attention and spatially deformable convolution with a dynamic adaptive attention module. It utilizes the Sigmoid function to generate channel weights and introduces learnable offsets to dynamically adjust the receptive field of the convolution kernel, obtaining key feature representations that suppress construction site environmental noise interference. Based on these key feature representations, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape, resulting in a scale-adaptive feature fusion representation suitable for multi-scale targets on construction sites. Based on the feature fusion representation, an adaptive overlap loss function is applied to calculate the topological relationship weights between targets. The regression gradients of overlapping targets are dynamically adjusted based on these topological relationship weights to obtain the target detection results. This method achieves noise suppression and target feature enhancement, effectively suppressing construction site environmental noise interference, significantly improving detection accuracy and recognition rate, avoiding misjudgment of highly overlapping targets and the high computational resource consumption of complex models on construction site edge devices, ensuring accurate and reliable operation of safety monitoring functions, and improving the speed and efficiency of construction site dynamic adaptive target detection. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the construction site dynamic adaptive target detection method of the present invention; Figure 3 This is a flowchart illustrating the second embodiment of the construction site dynamic adaptive target detection method of the present invention; Figure 4 This is a flowchart illustrating the third embodiment of the construction site dynamic adaptive target detection method of the present invention; Figure 5 This is a schematic diagram of the detection process framework in the construction site dynamic adaptive target detection method of the present invention; Figure 6 This is a functional block diagram of the first embodiment of the construction site dynamic adaptive target detection device of the present invention.

[0029] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0030] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0031] The solution of this invention mainly involves: combining channel attention and spatially deformable convolution with a dynamic adaptive attention module; generating channel weights using the Sigmoid function; and introducing learnable offsets to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference; applying a deformable feature pyramid network based on these key feature representations; dynamically adjusting the size and position of the receptive field according to the target scale and shape during the feature fusion stage to obtain scale-adaptive feature fusion representations suitable for multi-scale targets at construction sites; and calculating the topological relationship weights between targets using an adaptive overlap loss function based on these feature fusion representations. The regression gradient of overlapping targets is dynamically adjusted by relational weights to obtain target detection results. It can achieve noise suppression and target feature enhancement, effectively suppressing the interference of construction site environmental noise, significantly improving detection accuracy and recognition accuracy, avoiding misjudgment of highly overlapping targets and the problem of high computational resource consumption of complex models on construction site edge devices, and ensuring the accurate and reliable operation of safety monitoring functions. It improves the speed and efficiency of dynamic adaptive target detection on construction sites, and solves the technical problems of existing technologies in construction site safety supervision scenarios, such as difficulty in detecting targets under environmental noise interference and extreme scales, low detection accuracy of highly overlapping targets, low efficiency of multi-scale feature fusion, poor adaptability of loss functions, and high computational resource consumption.

[0032] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0033] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0034] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0035] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating device, a network communication module, a user interface module, and a site dynamic adaptive target detection program.

[0036] The device of this invention calls the construction site dynamic adaptive target detection program stored in the memory 1005 through the processor 1001 and performs the following operations: By combining channel attention and spatially deformable convolution with a dynamic adaptive attention module, channel weights are generated using the Sigmoid function, and learnable offsets are introduced to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference. Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. Based on the feature fusion representation, the topological relationship weights between targets are calculated using an adaptive overlap loss function. The regression gradients of overlapping targets are then dynamically adjusted based on these topological relationship weights to obtain the target detection results.

[0037] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: The channel attention branch of the dynamic adaptive attention module uses the Sigmoid function to perform spatial dimension global average pooling and max pooling on the feature maps of video frames in the construction site monitoring video in the construction site safety monitoring scenario to obtain the channel weight matrix. The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolutional kernel, and obtain key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix.

[0038] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the position and shape of the receptive field of the convolutional kernel, thereby adjusting the sampling points of the convolutional kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains spatially deformable convolutional output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference:

[0039] in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

[0040] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape of multi-scale targets on the construction site. The scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site is obtained through the following formula:

[0041] in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

[0042] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: Based on the feature fusion representation, the topological relationship weights between targets are calculated using the adaptive overlap loss function as follows:

[0043] in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

[0044] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function. The target detection result is obtained by the following formula:

[0045]

[0046] in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

[0047] The device of this invention, through processor 1001 calling the construction site dynamic adaptive target detection program stored in memory 1005, also performs the following operations: The model parameters of the deep learning object detection model used by the construction site dynamic adaptive object detection framework are searched by neural architecture, and the model structure of the deep learning object detection model is optimized by TensorRT, so that the optimized deep learning object detection model can achieve real-time inference on the construction site edge device.

[0048] This embodiment, through the above-described scheme, combines channel attention and spatially deformable convolution with a dynamic adaptive attention module. It utilizes the Sigmoid function to generate channel weights and introduces learnable offsets to dynamically adjust the receptive field of the convolution kernel, obtaining key feature representations that suppress construction site environmental noise interference. Based on these key feature representations, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape, obtaining a scale-adaptive feature fusion representation suitable for multi-scale targets at construction sites. Based on the feature fusion representation, an adaptive overlap loss function is applied to calculate the topological relationship weights between targets. The regression gradients of overlapping targets are dynamically adjusted based on these topological relationship weights to obtain the target detection results. This approach achieves noise suppression and target feature enhancement, effectively suppressing construction site environmental noise interference, significantly improving detection accuracy and recognition rate, avoiding misjudgments of highly overlapping targets and the high computational resource consumption of complex models on construction site edge devices, ensuring accurate and reliable operation of safety monitoring functions, and improving the speed and efficiency of dynamic adaptive target detection at construction sites.

[0049] Based on the above hardware structure, an embodiment of the construction site dynamic adaptive target detection method of the present invention is proposed.

[0050] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the construction site dynamic adaptive target detection method of the present invention.

[0051] In the first embodiment, the construction site dynamic adaptive target detection method includes the following steps: Step S10: By combining channel attention and spatially deformable convolution with a dynamic adaptive attention module, channel weights are generated using the Sigmoid function, and learnable offsets are introduced to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference.

[0052] It should be noted that by fusing channel attention mechanism and spatially deformable convolution technology through dynamic adaptive attention module, channel weights can be dynamically generated using Sigmoid function, and learnable offsets can be introduced to dynamically adjust the receptive field of convolution kernel. This effectively filters noise interference such as dust and strong light in construction site environment, accurately extracts high signal-to-noise ratio features of key targets such as wearing safety helmets, and provides a reliable input basis for subsequent detection.

[0053] Step S20: Apply a deformable feature pyramid network based on the key feature representation. During the feature fusion stage, dynamically adjust the size and position of the receptive field according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site.

[0054] It should be understood that in the scenario of real-time monitoring of construction site safety, the deformable feature pyramid network dynamically adjusts the size and position of the receptive field of the convolution kernel during the feature fusion stage, thereby obtaining a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site.

[0055] In practice, for small targets (such as safety helmets), the receptive field is reduced to focus on local details, which can prevent features from being diluted by downsampling; for large targets (such as excavators), the receptive field is expanded to capture the overall outline, preventing features from being blurred by upsampling. This generates a scale-adaptive feature fusion representation that is suitable for targets of multiple scales on the construction site, which significantly improves the detection accuracy of targets such as safety helmet wearing and machinery crossing boundaries.

[0056] Step S30: Based on the feature fusion representation, apply the adaptive overlap loss function to calculate the topological relationship weights between targets, and dynamically adjust the regression gradient of overlapping targets according to the topological relationship weights between targets to obtain the target detection result.

[0057] Understandably, in real-time monitoring scenarios for construction site safety, based on feature fusion representation, the topological relationship weights between targets can be dynamically calculated using an adaptive overlap loss function. This can effectively reduce the regression gradient of highly overlapping targets (such as multiple people wearing safety helmets or machinery obstructing personnel), avoid misjudgments caused by target occlusion, and significantly improve the accuracy and reliability of safety helmet wearing detection and machinery boundary crossing identification.

[0058] This embodiment, through the above-described scheme, combines channel attention and spatially deformable convolution with a dynamic adaptive attention module. It utilizes the Sigmoid function to generate channel weights and introduces learnable offsets to dynamically adjust the receptive field of the convolution kernel, obtaining key feature representations that suppress construction site environmental noise interference. Based on these key feature representations, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape, obtaining a scale-adaptive feature fusion representation suitable for multi-scale targets at construction sites. Based on the feature fusion representation, an adaptive overlap loss function is applied to calculate the topological relationship weights between targets. The regression gradients of overlapping targets are dynamically adjusted based on these topological relationship weights to obtain the target detection results. This approach achieves noise suppression and target feature enhancement, effectively suppressing construction site environmental noise interference, significantly improving detection accuracy and recognition rate, avoiding misjudgments of highly overlapping targets and the high computational resource consumption of complex models on construction site edge devices, ensuring accurate and reliable operation of safety monitoring functions, and improving the speed and efficiency of dynamic adaptive target detection at construction sites.

[0059] Furthermore, Figure 3 This is a flowchart illustrating the second embodiment of the construction site dynamic adaptive target detection method of the present invention, as shown below. Figure 3As shown, based on the first embodiment, a second embodiment of the construction site dynamic adaptive target detection method of the present invention is proposed. In this embodiment, step S10 specifically includes the following steps: Step S11: Using the channel attention branch of the dynamic adaptive attention module, the Sigmoid function is used to perform spatial dimension global average pooling and max pooling on the feature maps of video frames in the construction site monitoring scene to obtain the channel weight matrix.

[0060] It should be noted that in the real-time scenario of construction site safety monitoring, the channel attention branch of the dynamic adaptive attention module generates a channel weight matrix by performing spatial dimension global average pooling and max pooling on the feature map of the video frame. After processing by the Sigmoid function, it accurately highlights key channel features such as the orange reflective material of the safety helmet (e.g., the weight is increased to 0.9), while suppressing noise interference channels such as dust and strong light (e.g., the weight is reduced to 0.1), thereby stably outputting a high signal-to-noise ratio feature representation in noisy environments.

[0061] Step S12: The receptive field of the convolution kernel is dynamically adjusted by the spatial deformable convolution branch of the dynamic adaptive attention module, and the key feature representation for suppressing construction site environmental noise interference is obtained according to the channel weight matrix.

[0062] It should be understood that the spatially deformable convolutional branch of the dynamic adaptive attention module dynamically adjusts the receptive field of the convolutional kernel through learnable offsets, so that the feature extraction process automatically avoids noise interference areas such as dust and strong light reflection (such as the sudden light change point during tower crane operation), and accurately focuses on key target areas such as the edge contour of the safety helmet; at the same time, this branch is fused with the channel weight matrix (from the channel attention branch, highlighting the orange reflective material channel of the safety helmet) to effectively suppress noise interference and generate key feature representations with high signal-to-noise ratio.

[0063] Furthermore, step S12 specifically includes the following steps: The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the position and shape of the receptive field of the convolutional kernel, thereby adjusting the sampling points of the convolutional kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains spatially deformable convolutional output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference:

[0064] in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

[0065] In specific implementations, a hybrid domain attention mechanism is embedded in the backbone network (such as CSPDarknet). This mechanism combines channel attention and spatial deformable convolution. Traditional channel attention and spatial attention usually work independently, while the hybrid domain attention mechanism organically combines the two to form a new attention mechanism that can more effectively suppress noisy regions and enhance key features.

[0066] The channel attention component processes the input feature x using the sigmoid function σ to generate channel weights. Specifically, the input feature x is first subjected to global average pooling and global max pooling in the spatial dimension to obtain two different statistics. These two statistics are then input into two fully connected layers, and after processing by the ReLU activation function and the sigmoid function, the channel weights are obtained. The channel weights are used to weight each channel of the input feature, highlighting important channel features and suppressing unimportant channel features.

[0067] The spatially deformable convolution part introduces learnable offsets, enabling the convolutional kernel to dynamically adjust the position and shape of its receptive field; traditional convolution samples features at fixed grid points (such as a 3x3 grid), while deformable convolution learns offsets. This allows the sampling points to be dynamically adjusted. , ( For the original grid points, (For learnable offset); Effect: Adapts to target deformation (such as a worker bending over, a robotic arm rotating, etc.), focuses on irregular target areas, and avoids noisy areas (such as dust-covered areas).

[0068] in This is the Sigmoid function, used to generate channel weights; and These are learnable weight matrices, used to transform the input feature x in both channel and spatial dimensions. Element-wise multiplication is used to fuse the channel attention weights and the output of the spatially deformable convolution. In this way, the Dynamic Adaptive Detection Framework (DAAM) module can simultaneously optimize features from both channel and spatial dimensions, thereby suppressing noisy regions and enhancing key features.

[0069] Accordingly, step S20 specifically includes the following steps: Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape of multi-scale targets on the construction site. The scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site is obtained through the following formula:

[0070] in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

[0071] It should be noted that the traditional FPN structure is improved by introducing deformable convolutional kernels in the feature fusion stage. Traditional FPN uses fixed convolutional kernels for upsampling and lateral connections during feature fusion, which cannot dynamically adapt to changes in the target's scale. In contrast, DFPN, ​​through deformable convolutional kernels, can dynamically adjust the size and position of the receptive field according to the actual scale and shape of the target, thereby improving the detection capability for targets with extreme scales.

[0072] Deformable convolutional kernels learn offsets during feature fusion. This allows the sampling points of the convolution kernel to no longer be limited to fixed grid positions, but to be sampled over a wider area. For small targets, deformable convolution kernels can reduce the receptive field and focus on the local features of small targets. For large targets, deformable convolution kernels can expand the receptive field and capture the overall features of large targets. This ability to dynamically adjust the receptive field enables DFPN to better adapt to extreme scale changes of targets in construction site scenes.

[0073] Indicates the location The feature values ​​at that location are obtained by introducing a learnable offset. DFPN can dynamically adjust the sampling position based on the input features, thereby achieving effective fusion of target features at different scales. This dynamic adjustment mechanism enables DFPN to optimize small and large targets separately when dealing with scenarios where workers at a distance and machinery at a distance are detected simultaneously, thereby improving the overall detection accuracy.

[0074] When detecting distant workers (small pixel size), the learnable offset This causes the sampling points of the convolution kernel to cluster towards local regions of small targets, reducing the receptive field and avoiding sampling irrelevant background; when detecting nearby machinery (large pixel size), This expands the sampling points to the surrounding areas, increasing the receptive field and capturing the global structure of large targets. When performing lateral connections (fusing shallow high-resolution features with deep high-semantic features), deformable convolutions dynamically adjust the sampling positions according to the target scale, avoiding the problems of "small target features being downsampled and diluted" or "large target features being upsampled and blurred" in traditional FPN.

[0075] Accordingly, step S30 specifically includes the following steps: Based on the feature fusion representation, the topological relationship weights between targets are calculated using the adaptive overlap loss function as follows:

[0076] in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

[0077] Furthermore, the step of dynamically adjusting the regression gradient of overlapping targets based on the topological relationship weights between the targets reduces the contribution of the loss function and obtains the target detection result. Specifically, this includes the following steps: The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function. The target detection result is obtained by the following formula:

[0078]

[0079] in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

[0080] It should be noted that the Complete Intersection over Union Loss (CUI) function... Function: Optimizes the regression accuracy of target bounding boxes, considering center point distance, aspect ratio, and overlap rate; Classification Loss with Focal Loss. Function: Improves the accuracy of target classification, especially for difficult-to-classify samples (such as distinguishing between safety helmets and ordinary hats); Overlapping Target Adaptive Loss function. Function: Dynamically suppresses the regression gradient of highly overlapping targets, solving the problem of multiple people gathering or mechanical occlusion.

[0081] Understandably, to address the shortcomings of existing loss functions in scenarios with highly overlapping targets, the aforementioned composite loss function can be designed, where, This method is used to handle bounding box regression problems for targets. It takes into account factors such as the distance from the target's center point and aspect ratio, and can more accurately measure the difference between the predicted box and the ground truth box. Used to handle target classification problems, ensuring that the model can correctly classify the targets; By calculating the topological relationship weights between targets, the regression gradient of highly overlapping targets is dynamically adjusted. In scenarios where targets are highly overlapping, the mutual influence between different targets is significant, and traditional loss functions cannot distinguish the contributions of different targets in the overlapping region. By analyzing the degree of overlap and positional relationship between targets, different weights are assigned to each target. This allows the model to pay more attention to targets that were not correctly detected in overlapping regions during training, thereby improving the detection accuracy of overlapping targets. Based on the improved IoU loss, a dynamic weighting factor is introduced. and This is a hyperparameter that controls the weighting ratio between distance and overlap rate.

[0082] This embodiment utilizes the aforementioned scheme, employing the channel attention branch of the dynamic adaptive attention module to perform spatial-dimensional global average pooling and max pooling on the feature maps of video frames in the construction site safety monitoring scenario using the Sigmoid function, thereby obtaining a channel weight matrix. The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolutional kernel. Based on the channel weight matrix, key feature representations that suppress construction site environmental noise interference are obtained, significantly improving detection accuracy, reducing the false positive rate, effectively suppressing environmental noise interference such as dust and strong light reflection, accurately extracting key target features, providing a high signal-to-noise ratio input basis for real-time safety alarms, and ensuring the reliability and accuracy of construction site safety monitoring.

[0083] Furthermore, Figure 4 This is a flowchart illustrating the third embodiment of the construction site dynamic adaptive target detection method of the present invention, as shown below. Figure 4 As shown, based on the first embodiment, a third embodiment of the construction site dynamic adaptive target detection method of the present invention is proposed. In this embodiment, after step S30, the construction site dynamic adaptive target detection method further includes the following steps: Step S40: Search the model parameters of the deep learning target detection model used by the construction site dynamic adaptive target detection framework through neural architecture search, optimize the model structure of the deep learning target detection model through TensorRT, and enable the optimized deep learning target detection model to achieve real-time inference on the construction site edge device.

[0084] It should be noted that by automatically compressing the model parameters of the construction site dynamic adaptive object detection framework through Neural Architecture Search (NAS) (e.g., reducing the number of channels from 256 to 64), and by combining TensorRT INT8 quantization technology to optimize the model structure, the inference speed of the deep learning object detection model on construction site edge devices (such as AI cameras) has been increased from 15FPS to 30FPS. This enables real-time and smooth operation of safety monitoring functions such as safety helmet wearing detection and machinery boundary crossing alarms, while maintaining detection accuracy, effectively solving the monitoring latency problem caused by insufficient computing power of construction site equipment.

[0085] Understandably, Neural Architecture Search (NAS) is used to compress model parameters. NAS automatically searches for the optimal network architecture, reducing the number of model parameters and computational complexity while ensuring model performance. Combined with TensorRT quantization technology, the model is quantized, converting high-precision floating-point operations into low-precision integer operations, thereby improving the model's inference speed while maintaining high detection accuracy. Through the above lightweight deployment optimization techniques, the model can achieve end-to-end detection on construction site edge devices. This enables the target detection system to monitor the construction site scene in real time, promptly detect safety hazards, and improve the efficiency and accuracy of construction site safety supervision.

[0086] In the specific implementation, see Figure 5 , Figure 5 This is a schematic diagram of the detection process framework in the construction site dynamic adaptive target detection method of the present invention, as shown below. Figure 5 As shown, the Dynamic Adaptive Attention Module (DAAM) jointly optimizes deformable convolution and the attention mechanism, effectively suppressing the interference of local noise such as dust and shadows in the construction site environment on feature extraction. The Deformable Feature Pyramid Network (DFPN) introduces deformable convolution kernels to dynamically adjust the receptive field, solving the problem of low fusion efficiency of traditional fixed-structure feature pyramids for extreme-scale targets in construction sites (such as small workers in the distance and large machinery nearby), significantly improving the detection accuracy (AP50), especially improving the detection of small targets such as workers in the distance. The Adaptive Overlap Loss (AOLoss) dynamically adjusts the regression gradient of highly overlapping targets by calculating the topological relationship weights between targets, significantly reducing the false negative rate in scenarios with a target overlap rate >60%. The lightweight deployment optimization adopts neural architecture search and TensorRT quantization technology to compress the number of model parameters and realize real-time inference on edge devices, solving the problem of high computational resource consumption of complex models on edge devices in construction sites.

[0087] The Dynamic Adaptive Detection Framework (DADF) proposed in this embodiment overcomes the core challenges of target deformation, extreme scale, dense overlap, and limited computing power of edge devices in construction site scenarios through a full-process design of "feature enhancement → multi-scale fusion → dynamic optimization → lightweight deployment". After the input image extracts initial features through the CSPDarknet backbone network, it first enters the Dynamic Adaptive Attention Module (DAAM). This module achieves noise suppression and target feature enhancement through the synergistic effect of channel attention mechanism and spatial deformable convolution: the channel branch uses dual pooling (global average / max pooling) to generate channel weight matrix, highlighting key features such as safety helmets and mechanical parts; the spatial branch dynamically adjusts the sampling points of the convolution kernel through learnable offsets, so that feature extraction focuses on the key areas of deformable targets (such as bent-over workers) while avoiding noise interference such as dust; after the outputs of the two branches are fused, a high signal-to-noise ratio hybrid domain feature is formed, laying the foundation for subsequent processing.

[0088] The enhanced data enters the Deformable Feature Pyramid Network (DFPN), where multi-scale dynamic fusion is achieved through deformable convolution. Traditional FPN's fixed sampling grid easily leads to feature dilution for small targets (e.g., distant workers) or blurring for large targets (e.g., nearby cranes) in construction site scenarios. DFPN, ​​however, dynamically adjusts the receptive field of the convolutional kernel by learning offsets: shrinking the sampling range for small targets to capture local details and expanding the sampling region for large targets to integrate the global structure. During lateral connections, deep semantic features (e.g., machinery categories) and shallow detail features (e.g., human contours) are precisely aligned through deformable convolution, avoiding feature misalignment caused by upsampling / downsampling. This mechanism improves the detection accuracy for both large and small targets, significantly enhancing adaptability to scenarios such as simultaneous detection of tower cranes and workers.

[0089] To further address the issue of target overlap, the Adaptive Overlap Loss (AOLoss) introduces topology-aware weights and gradient redistribution strategies during the training phase. By calculating the ratio of the center distance between targets to the minimum bounding rectangle, the loss contribution of overlapping regions is dynamically adjusted: when the crane boom and worker bounding boxes overlap, the model prioritizes optimizing incorrectly detected target boxes rather than evenly distributing gradients. An improved IoU loss adds an aspect ratio penalty term, improving the distinguishability between the crane and tower crane frames by 18%. Finally, the model compresses model parameters through Neural Architecture Search (NAS) and combines TensorRT's INT8 quantization technology to achieve 30FPS real-time inference on edge devices. In actual deployment, the system achieves an average detection accuracy (mAP@0.5) of 89.7% and a false alarm rate reduction of 58% in complex construction site environments. It successfully supports key functions such as helmet wearing detection and machinery boundary crossing warnings, demonstrating the closed-loop collaborative advantages of "feature optimization supporting dynamic fusion, dynamic loss feedback network training, and lightweight design ensuring real-time deployment" between modules.

[0090] This embodiment, through the above-described scheme, uses a neural architecture to search and compress the model parameters of the deep learning target detection model used by the construction site dynamic adaptive target detection framework, and optimizes the model structure of the deep learning target detection model through TensorRT. This enables the optimized deep learning target detection model to achieve real-time inference on edge devices at the construction site, realizing real-time and accurate triggering of core safety monitoring functions such as safety helmet wearing monitoring and machinery boundary crossing alarms. This effectively solves the monitoring delay problem caused by insufficient computing power of construction site equipment, ensuring the smooth and reliable operation of the safety monitoring system.

[0091] Accordingly, the present invention further provides a construction site dynamic adaptive target detection device.

[0092] Reference Figure 6 , Figure 6 This is a functional block diagram of the first embodiment of the construction site dynamic adaptive target detection device of the present invention.

[0093] In a first embodiment of the construction site dynamic adaptive target detection device of the present invention, the construction site dynamic adaptive target detection device includes: The key feature acquisition module 10 is used to combine channel attention and spatially deformable convolution through a dynamic adaptive attention module, generate channel weights using the Sigmoid function, and introduce learnable offsets to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference.

[0094] The feature fusion acquisition module 20 is used to apply a deformable feature pyramid network based on the key feature representation. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site.

[0095] The detection result acquisition module 30 is used to calculate the topological relationship weights between targets by applying an adaptive overlap loss function based on the feature fusion representation, and dynamically adjust the regression gradient of overlapping targets according to the topological relationship weights between targets to obtain the target detection result.

[0096] The key feature acquisition module 10 is further configured to use the channel attention branch of the dynamic adaptive attention module to perform spatial dimension global average pooling and max pooling on the feature maps of video frames of construction site monitoring videos in the construction site safety monitoring scenario using the Sigmoid function, thereby obtaining a channel weight matrix; the spatial deformable convolution branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolution kernel, and obtain key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix.

[0097] The key feature acquisition module 10 is also used to dynamically adjust the position and shape of the receptive field of the convolution kernel through the learnable offset of the spatial deformable convolution branch of the dynamic adaptive attention module, thereby adjusting the sampling points of the convolution kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains the spatial deformable convolution output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference:

[0098] in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

[0099] The feature fusion acquisition module 20 is further configured to apply a deformable feature pyramid network based on the key feature representation. During the feature fusion stage, the receptive field size and position are dynamically adjusted for the target scale and shape of the multi-scale target at the construction site. The scale-adaptive feature fusion representation suitable for the multi-scale target at the construction site is obtained by the following formula:

[0100] in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

[0101] The detection result acquisition module 30 is further configured to calculate the topological relationship weights between targets using the adaptive overlap loss function based on the feature fusion representation, according to the following formula:

[0102] in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

[0103] The detection result acquisition module 30 is further configured to dynamically adjust the regression gradient of overlapping targets based on the topological relationship weights between targets, so as to reduce the contribution value of the loss function, and obtain the target detection result by the following formula:

[0104]

[0105] in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

[0106] The detection result acquisition module 30 is also used to search the model parameters of the deep learning target detection model used by the construction site dynamic adaptive target detection framework through neural architecture, optimize the model structure of the deep learning target detection model through TensorRT, and enable the optimized deep learning target detection model to achieve real-time inference on the construction site edge device.

[0107] The steps for implementing each functional module of the construction site dynamic adaptive target detection device can be referred to in the various embodiments of the construction site dynamic adaptive target detection method of the present invention, and will not be repeated here.

[0108] Furthermore, this embodiment of the invention also proposes a storage medium storing a construction site dynamic adaptive target detection program, which, when executed by a processor, performs the following operations: By combining channel attention and spatially deformable convolution with a dynamic adaptive attention module, channel weights are generated using the Sigmoid function, and learnable offsets are introduced to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference. Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. Based on the feature fusion representation, the topological relationship weights between targets are calculated using an adaptive overlap loss function. The regression gradients of overlapping targets are then dynamically adjusted based on these topological relationship weights to obtain the target detection results.

[0109] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: The channel attention branch of the dynamic adaptive attention module uses the Sigmoid function to perform spatial dimension global average pooling and max pooling on the feature maps of video frames in the construction site monitoring video in the construction site safety monitoring scenario to obtain the channel weight matrix. The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolutional kernel, and obtain key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix.

[0110] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the position and shape of the receptive field of the convolutional kernel, thereby adjusting the sampling points of the convolutional kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains spatially deformable convolutional output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference:

[0111] in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

[0112] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape of multi-scale targets on the construction site. The scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site is obtained through the following formula:

[0113] in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

[0114] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: Based on the feature fusion representation, the topological relationship weights between targets are calculated using the adaptive overlap loss function as follows:

[0115] in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

[0116] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function. The target detection result is obtained by the following formula:

[0117]

[0118] in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

[0119] Furthermore, when the site dynamic adaptive target detection program is executed by the processor, it also performs the following operations: The model parameters of the deep learning object detection model used by the construction site dynamic adaptive object detection framework are searched by neural architecture, and the model structure of the deep learning object detection model is optimized by TensorRT, so that the optimized deep learning object detection model can achieve real-time inference on the construction site edge device.

[0120] Those skilled in the art will understand that all or part of the steps in the methods described above can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium is a computer-readable storage medium, including: a USB flash drive, a portable hard drive, and a read-only memory (ROM). Various media that can store program code, such as only memory, random access memory (RAM), magnetic disks or optical disks.

[0121] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0122] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0123] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A dynamic adaptive target detection method for construction sites, characterized in that, The construction site dynamic adaptive target detection method includes: By combining channel attention and spatially deformable convolution with a dynamic adaptive attention module, channel weights are generated using the Sigmoid function, and learnable offsets are introduced to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference. Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the size and position of the receptive field are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. Based on the feature fusion representation, the topological relationship weights between targets are calculated using an adaptive overlap loss function. The regression gradients of overlapping targets are then dynamically adjusted based on these topological relationship weights to obtain the target detection results.

2. The construction site dynamic adaptive target detection method as described in claim 1, characterized in that, The method combines channel attention and spatially deformable convolution through a dynamic adaptive attention module, uses the sigmoid function to generate channel weights, and introduces learnable offsets to dynamically adjust the receptive field of the convolution kernel, thereby obtaining key feature representations that suppress construction site environmental noise interference. This includes: The channel attention branch of the dynamic adaptive attention module uses the Sigmoid function to perform spatial dimension global average pooling and max pooling on the feature maps of video frames in the construction site monitoring video in the construction site safety monitoring scenario to obtain the channel weight matrix. The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the receptive field of the convolutional kernel, and obtain key feature representations for suppressing construction site environmental noise interference based on the channel weight matrix.

3. The construction site dynamic adaptive target detection method as described in claim 2, characterized in that, The receptive field of the convolution kernel is dynamically adjusted by the learnable offset of the spatially deformable convolutional branch of the dynamic adaptive attention module, and key feature representations for suppressing construction site environmental noise interference are obtained based on the channel weight matrix, including: The spatially deformable convolutional branch of the dynamic adaptive attention module can learn offsets to dynamically adjust the position and shape of the receptive field of the convolutional kernel, thereby adjusting the sampling points of the convolutional kernel so that the visual feature extraction of the target object is focused on the key region of the target and obtains spatially deformable convolutional output. The channel weight matrix is ​​fused with the spatially deformable convolution output using the following formula to obtain key feature representations for suppressing construction site environmental noise interference: in, Key features are represented. For the Sigmoid function, Here is the learnable weight matrix for the channel attention branch. For the input feature map, This is an element-wise multiplication operation. This is a spatially deformable convolution operation. is the learnable weight matrix for spatially deformable convolutional branches.

4. The construction site dynamic adaptive target detection method as described in claim 1, characterized in that, The process of applying a deformable feature pyramid network based on the key feature representation, and dynamically adjusting the receptive field size and position according to the target scale and shape during the feature fusion stage to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on construction sites, includes: Based on the key feature representation, a deformable feature pyramid network is applied. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape of multi-scale targets on the construction site. The scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site is obtained through the following formula: in, This represents a scale-adaptive feature fusion representation for multi-scale targets on a construction site. This represents the total number of sampling points for the deformable convolution kernel. For the index variable in the summation process, For learnable convolutional kernel weights, For the input feature map, To output the coordinates on the feature map, For the fixed sampling point offset of the standard convolution kernel, This is a learnable offset.

5. The construction site dynamic adaptive target detection method as described in claim 1, characterized in that, The step of calculating the topological relationship weights between targets using an adaptive overlap loss function based on the feature fusion representation, and dynamically adjusting the regression gradients of overlapping targets based on these topological relationship weights to obtain target detection results includes: Based on the feature fusion representation, the topological relationship weights between targets are calculated using the adaptive overlap loss function as follows: in, The weights represent the topological relationships between the targets. For spatial distance weighting hyperparameters, The overlap ratio weight hyperparameter, For prediction boxes With real frame The square of the Euclidean distance from the center point. The length of the diagonal of the smallest bounding rectangle. It is a natural exponential function. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box. The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function and obtain the target detection result.

6. The construction site dynamic adaptive target detection method as described in claim 5, characterized in that, The step of dynamically adjusting the regression gradient of overlapping targets based on the topological relationship weights between targets to reduce the contribution of the loss function and obtain target detection results includes: The regression gradient of overlapping targets is dynamically adjusted based on the topological relationship weights between the targets to reduce the contribution of the loss function. The target detection result is obtained by the following formula: in, For the total loss function, The weighting coefficients for the CIoU loss term. For the complete intersection-union loss function, These are the weighting coefficients for the CLs loss term. For classification loss functions with focus loss, The weighting coefficients for the overlap loss term. For overlapping targets, an adaptive loss function is used. For the total target number, With the goal, For the goal Overlapping targets, For the first A set of ground truth boxes that overlap with the predicted boxes. The weights represent the topological relationships between the targets. This is the intersection-union ratio (IU) between the predicted bounding box and the ground truth bounding box.

7. The construction site dynamic adaptive target detection method as described in claim 1, characterized in that, The method for dynamic adaptive target detection at construction sites further includes: calculating the topological relationship weights between targets using an adaptive overlap loss function based on the feature fusion representation, dynamically adjusting the regression gradients of overlapping targets based on the topological relationship weights, and obtaining the target detection results. The model parameters of the deep learning object detection model used by the construction site dynamic adaptive object detection framework are searched by neural architecture, and the model structure of the deep learning object detection model is optimized by TensorRT, so that the optimized deep learning object detection model can achieve real-time inference on the construction site edge device.

8. A dynamic adaptive target detection device for construction sites, characterized in that, The construction site dynamic adaptive target detection device includes: The key feature acquisition module is used to combine channel attention and spatially deformable convolution with a dynamic adaptive attention module, generate channel weights using the Sigmoid function, and introduce learnable offsets to dynamically adjust the receptive field of the convolution kernel to obtain key feature representations that suppress construction site environmental noise interference. The feature fusion acquisition module is used to apply a deformable feature pyramid network based on the key feature representation. During the feature fusion stage, the receptive field size and position are dynamically adjusted according to the target scale and shape to obtain a scale-adaptive feature fusion representation suitable for multi-scale targets on the construction site. The detection result acquisition module is used to calculate the topological relationship weights between targets based on the feature fusion representation and an adaptive overlap loss function, and dynamically adjust the regression gradient of overlapping targets based on the topological relationship weights between targets to obtain the target detection results.

9. A dynamic adaptive target detection device for construction sites, characterized in that, The construction site dynamic adaptive target detection device includes: a memory, a processor, and a construction site dynamic adaptive target detection program stored in the memory and executable on the processor, wherein the construction site dynamic adaptive target detection program is configured to implement the steps of the construction site dynamic adaptive target detection method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a site dynamic adaptive target detection program, which, when executed by a processor, implements the steps of the site dynamic adaptive target detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Target detection method and device based on weighted deformable convolution

    CN115620141A

  • Multi-target multi-size image detection method and system under complex background, electronic equipment and storage medium

    CN116229086A

  • Real-time risk identification method for substation near-electricity operation site

    CN117523437A

  • Vehicle target detection and identification method based on attention mechanism and dynamic convolution

    CN118015595A

  • Construction site safety helmet wearing detection method in complex environment based on improved YOLOv8n

    CN118470501A