Wavelet transform based cross-scale construction site dense occluded pedestrian detection method
Patent Information
- Application Number
- CN202611086060.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]尽管FPN、PANet、BiFPN等多尺度结构取得了显著成效,但其主要停留在空间域的建模与融合,缺乏对频带重要性与方向性的显式建模,难以在拥挤与模糊场景中针对性地强化高频细节、抑制低频干扰,这在处理边缘纹理模糊与细节弱化的图像时形成性能瓶颈,无法做到充分利用特征图中的频率成分
1)有效提升密集遮挡条件下行人特征的可分性,降低漏检与粘连误检:
Smart Images

Figure CN123016475A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of safety monitoring technology at construction sites, specifically to a cross-scale method for detecting densely occluded pedestrians at construction sites based on wavelet transform. Background Technology
[0002] Safety management at construction sites is crucial for the smooth progress of engineering projects. Pedestrian movement is a major cause of accidents. However, traditional manual supervision methods are costly, inefficient, and prone to omissions. With the development of computer vision technology, deep learning-based video object detection technology is widely used in safety monitoring to improve the safety supervision capabilities of construction sites.
[0003] Currently, much research focuses on deep learning-based methods, such as Faster R-CNN, YOLO, and SSD, which can quickly detect pedestrians. However, in dense object detection scenarios, problems exist such as overlapping boundaries between adjacent instances, feature interference, and blurred details at instance edges.
[0004] While existing traditional change detection methods are still applicable in certain scenarios, they are generally sensitive to factors such as lighting, shadows, and sensor differences. However, they have limitations when handling dense targets and complex urban environmental data. Deep learning-based methods have achieved success in some areas, but due to the limitations of convolutional operations, they often capture limited contextual information and lack global information capture. This results in shallow feature maps lacking the abstraction of deep features, and they still face challenges in detecting edge pixels of targets.
[0005] Although multi-scale structures such as FPN, PANet, and BiFPN have achieved remarkable results, they mainly focus on spatial domain modeling and fusion, lacking explicit modeling of frequency band importance and directionality. This makes it difficult to specifically enhance high-frequency details and suppress low-frequency interference in crowded and blurry scenes, which creates a performance bottleneck when processing images with blurred edge textures and weakened details, and makes it impossible to fully utilize the frequency components in the feature maps.
[0006] Chinese patent "A Construction Site Safety Helmet Detection Method Based on Multi-Task Learning" (application number: CN202110234567.8) proposes a method combining object detection and semantic segmentation, which enhances the robustness of safety helmet detection through multi-task learning. However, it still has shortcomings in detecting fast-moving targets and handling occlusion. Chinese patent "A Construction Site Safety Helmet Wearing Recognition Method Based on Deep Learning" (application number: CN202010987654.3) uses an improved YOLO network for safety helmet detection and combines region cropping and color feature analysis to improve detection accuracy. However, this method still relies on single-frame image information and has limited ability to handle dynamic changes in targets.
[0007] Existing pedestrian detection methods at construction sites mainly have the following shortcomings: 1) The scale of pedestrians in construction site videos varies greatly: pedestrians in the distance appear as small targets, while pedestrians nearby appear as large targets, and the scale fluctuates significantly with the camera's installation height and viewing angle, which weakens the ability to recognize pedestrians and increases the recognition error rate.
[0008] 2) Construction sites are frequently crowded with workers, resulting in widespread obstruction between pedestrians, between pedestrians and machinery, and between pedestrians and stacked materials. The obstruction ratio is high and the obstruction patterns are complex.
[0009] 3) The construction site background contains high-frequency textures and repetitive structures such as scaffolding, steel mesh, fence textures, warning signs, and mechanical structural components, which are easily confused with the outlines of pedestrians; at the same time, there are also imaging degradations such as dust, reflection, motion blur, low light and backlight.
[0010] Therefore, there is an urgent need for a detection method that can improve the accuracy and robustness of dense pedestrian detection in dense scenes to address the shortcomings of existing technologies. Summary of the Invention
[0011] To address the aforementioned technical problems, this invention provides a cross-scale construction site dense occlusion pedestrian detection method based on wavelet transform, which effectively improves the ability to distinguish adjacent pedestrians under dense occlusion conditions, reduces missed detections and false detections, and improves the stability and consistency of the localization box.
[0012] The technical solution adopted in this invention is as follows: A cross-scale pedestrian detection method based on wavelet transform in densely occluded construction sites includes the following steps: S1: Acquire images of the construction site scene, and use a feature extraction network to extract features from the images at multiple scales to obtain feature maps at multiple scales. ,in, Indicates the scale level number; S2: For each feature map Perform wavelet transform decomposition to obtain the corresponding low-frequency subband. and high-frequency subband ; S3: Based on cross-scale mapping rules, low-frequency subbands of different scales are... and high-frequency subband The signals are fed into frequency fusion modules at different levels; among them, high-frequency subbands containing more details are transmitted to high-resolution frequency fusion modules, while low-frequency subbands containing more structural semantics are transmitted to low-resolution frequency fusion modules. S4: In the frequency fusion module of each level, the received low-frequency sub-bands and high-frequency sub-bands from different scales are aligned and fused, and the enhanced feature map of that level is reconstructed using the low-frequency and high-frequency features obtained after fusion. ,in, Indicates the hierarchical number of the frequency fusion module; S5: Enhanced feature maps reconstructed at each level Input the detection head, perform pedestrian category prediction and bounding box regression, and output the pedestrian detection results.
[0013] S1 includes: S1.1: Input the construction site scene image into the feature extraction network; S1.2: Extracting features through a feature extraction network Feature maps at each scale And the first Feature map satisfy: ;in, For the number of channels, This represents the spatial resolution of the feature map.
[0014] In S2, for each feature map Wavelet transform decomposition is performed to obtain the initial low-frequency subband. and initial high-frequency subband , is represented as: ; And the initial low-frequency subband Includes horizontal component Vertical component and diagonal components ,Right now: .
[0015] In S2, the initial low-frequency sub-band and initial high-frequency subband Channel alignment and normalization are performed separately to obtain the low-frequency sub-band. and high-frequency subband ,Right now: ; ; in, and It is a mapping operator that includes convolution and normalization operations.
[0016] In S3, the cross-scale mapping rule includes: 3.1: Regarding the first The layer frequency fusion module defines a set of low-frequency cross-scale mapping indexes. and high-frequency cross-scale mapping index set The index set is used to indicate which scale levels The sub-bands are passed to the hierarchy. ; 3.2: Construct the input up to the index set. Low-frequency subband set of the layer frequency fusion module and high-frequency subband set .
[0017] In step S4, the aligned low-frequency sub-band set Adaptive fusion is performed to obtain fused low-frequency features. ; Set of aligned high-frequency subbands Adaptive fusion is performed to obtain fused high-frequency features. .
[0018] In S4, based on the fusion of low-frequency features and fusion of high-frequency features Perform frequency domain reconstruction to generate enhanced feature maps , is represented as: ; in, This is the inverse wavelet transform operation, or it is the operation of... and Reconstruction operation after convolution mapping following concatenation along the channel dimension.
[0019] The method also includes a training phase, which includes: S6: Input the sample image with pedestrian annotations into the detection model, and the detection model performs steps S1~S4 to obtain enhanced feature maps. And will enhance the feature map Input the detection head to obtain the prediction result; S7: Calculate the loss function based on the prediction results and the ground truth labels. And perform backpropagation to update the network parameters of the detection model; The loss function At least classification loss and regression loss ,in: The classification loss The cross-entropy loss is used, and its calculation formula is as follows: ; in, The number of samples used in a single training run. The total number of pedestrian categories. For the sign function, when the sample The true category is The value is 1 if the condition is met, and 0 otherwise. To predict samples for the detection model Category The probability of; The regression loss Smoothing Loss or IoU type loss; S8: Repeat the iterative training until the preset conditions are met to obtain the trained detection model.
[0020] A cross-scale pedestrian detection model based on wavelet transform in densely occluded construction sites, comprising: A feature extraction network is used to extract multi-scale features from an input construction site scene image, outputting feature maps at L scales. ,in: For scale level numbering, , For the number of channels, Spatial resolution; The wavelet eigenvalue decomposition module is used to process feature maps at various scales. Wavelet transform decomposition and feature mapping are performed to output the low-frequency subband. and high-frequency subband The wavelet transform decomposition is expressed as: ; For the initial low-frequency sub-band, This is the initial high-frequency subband, and It includes high-frequency components in the horizontal, vertical, and diagonal directions; The feature mapping is represented as follows: , ; in: and It is a mapping operator that includes convolution and normalization operations; Multiple frequency fusion modules are configured at different scale levels. The input of each frequency fusion module at level k is connected to the output of the wavelet feature decomposition module according to a cross-scale mapping rule, so that the k-th level frequency fusion module receives the set of low-frequency sub-bands. and high-frequency subband set ,in: and These are sets of cross-scale mapping indices for low-frequency and high-frequency data; the corresponding high-resolution levels. Includes more high-scale hierarchical indexes, and corresponding low-resolution hierarchical indexes. Includes more low-scale hierarchical indexes; Each frequency fusion module performs spatial and channel alignment on the received low-frequency subband set and high-frequency subband set to obtain the aligned low-frequency subband. and high-frequency subband Then, adaptive fusion is performed on the aligned subbands to obtain the fused low-frequency features. and fusion of high-frequency features ; based on and Frequency domain reconstruction is performed using inverse wavelet transform or channel concatenation convolution to generate enhanced feature maps. ,in: This is either an inverse wavelet transform operation or a convolution mapping operation after channel concatenation. The detection head is used to analyze the enhanced feature maps generated by the frequency fusion modules at each level. Perform pedestrian category prediction and bounding box regression, and output pedestrian detection results.
[0021] This invention provides a cross-scale pedestrian detection method based on wavelet transform for dense occlusion at construction sites, with the following technical advantages: 1) Effectively improves the separability of pedestrian features under conditions of dense occlusion, and reduces missed detections and false positives due to adhesion: To address the problems of densely populated construction sites, widespread occlusion, overlapping boundaries between adjacent instances, mutual interference of features, and blurred edge details, this invention uses a wavelet feature decomposition module to perform wavelet transform decomposition on the feature map: The system is explicitly decoupled into a low-frequency subband (structural semantic information) and a high-frequency subband (edge detail information). In densely occluded scenes, the visible part of a pedestrian is often only a local outline or edge. The high-frequency subband can enhance the response of these local details, while the low-frequency subband maintains the stability of the overall structure. This effectively enhances the expression of key pedestrian features, suppresses background interference, and solves the problems of missed detections caused by feature adhesion and false detections of multiple people being merged into a single person.
[0022] 2) Significantly improves cross-scale pedestrian detection capabilities, while maintaining detection accuracy for both large and small targets: To address the issue of weakened recognition capabilities caused by the wide range of pedestrian scales in construction site videos, with small targets at a distance and large targets up close, this invention constructs a low-frequency / high-frequency cross-scale index set through cross-scale mapping rules. , This allows more high-frequency subbands containing more details to be passed to the high-resolution level frequency fusion module to enhance the edge texture representation of small targets, while more low-frequency subbands containing more structural semantics are passed to the low-resolution level frequency fusion module to strengthen the overall contour consistency of large targets. This achieves cross-scale complementary enhancement of structural and detailed information, thus effectively taking into account both small and large target detection within the same model, and improving the overall detection mAP and recall rate.
[0023] 3) Effectively suppresses high-frequency interference in complex construction site backgrounds, reducing false detection rate: To address the issue that construction site backgrounds, containing high-frequency textures and repetitive structures such as scaffolding, rebar mesh, fencing textures, and mechanical structural components, are easily confused with pedestrian outlines, this invention adaptively fuses low-frequency / high-frequency sub-bands from different scales within a multi-level frequency fusion module. , After fusion, frequency domain reconstruction is performed to generate enhanced feature maps. This process can specifically enhance the frequency components related to pedestrian targets, suppress high-frequency spurious responses in the background, and avoid false detections caused by repetitive background textures, thereby effectively reducing false alarms and duplicate bounding boxes and improving the reliability of detection results.
[0024] 4) Enhance the robustness and stability of detection under imaging degradation conditions to meet the actual safety management needs of construction sites: This invention addresses imaging degradation issues at construction sites, including dust, glare, motion blur, low light, and backlighting. During the training phase, it jointly optimizes all learnable parameters in the wavelet feature decomposition and frequency fusion modules. Based on classification loss... and regression loss Backpropagation enables the detection model to learn robust feature representations under different imaging conditions, thus maintaining good detection stability and generalization ability under interference such as changes in illumination and motion blur, which meets the practical application needs of real-time monitoring and safety management of smart construction sites. Attached Figure Description
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Figure 1 This is a diagram illustrating the overall structure of the cross-scale construction site dense occlusion pedestrian detection method based on wavelet transform of this invention.
[0026] Figure 2 This is a structural diagram of the wavelet feature decomposition module in this invention.
[0027] Figure 3 This is a structural diagram of the frequency fusion module in this invention.
[0028] Figure 4 This is a network deployment structure diagram of the detection model of the present invention in a specific embodiment, which integrates the wavelet feature decomposition module and the frequency fusion module into the YOLOv8 framework.
[0029] Figure 5 This is a flowchart of the training phase of the detection model in this invention.
[0030] Figure 6 This is a flowchart of the preprocessing process of the present invention.
[0031] Figure 7 This is a flowchart of the inspection head of the present invention. Detailed Implementation
[0032] A cross-scale pedestrian detection method based on wavelet transform in densely occluded construction sites is proposed. This method improves the detection accuracy and robustness of pedestrians under different scales and dense occlusion conditions by constructing a wavelet feature decomposition module and a frequency fusion module, and introducing a cross-scale transfer and fusion mechanism. The overall process is as follows: Figure 1 As shown, the main stages include data input and preprocessing, multi-scale feature extraction, wavelet feature decomposition, cross-scale frequency fusion, detector output, and model training. The specific implementation methods of each component are described in detail below.
[0033] (I) Data Input and Preprocessing: This invention uses RGB image frames from construction site monitoring videos or RGB images collected on-site as input data. Due to common imaging degradation factors at construction sites, such as dust, backlighting, low illumination, rain, fog, reflections, and motion blur caused by equipment vibration, this embodiment first preprocesses the input images to improve the stability of the detection model in complex scenarios. The preprocessing process is as follows: Figure 6 As shown, the process includes: scaling the input image to a preset size, such as 640×640 pixels, to achieve size normalization; standardizing the image color channels, normalizing pixel values to the range of 0 to 1 or using the mean and standard deviation for normalization; enhancing brightness and contrast as needed; and optionally using data augmentation methods such as random scaling, random cropping, and random flipping to expand sample diversity.
[0034] Through the above preprocessing operations, the detection model can better adapt to the changes in data distribution caused by different construction scenarios, different camera installation locations, and different lighting conditions, providing high-quality input for subsequent feature extraction.
[0035] (II) Multi-scale feature extraction: The preprocessed image is fed into a feature extraction network to perform deep feature extraction on the entire image, thereby obtaining multi-level, multi-scale feature maps. In this embodiment, the feature extraction network can adopt existing mature convolutional neural network structures, such as ResNet or MobileNet, which can generate feature representations with different spatial resolutions through stepwise downsampling operations to simultaneously meet the detection needs of pedestrians at small scales in the distance and large scales in the vicinity. Let the feature extraction network output feature maps at L scales in total, and let the Lth feature map be... The feature map at each scale level is represented as follows: Its dimensions satisfy: ; in, Indicates the scale level number. This represents the number of channels in the feature map. This represents the spatial resolution of the feature map. In practical network architectures, it is typically numbered... The smaller the value, the higher the resolution of the feature map, for example... The shallow output of the backbone network has a downsampling factor of 8 times; while The larger the resolution, the lower the resolution, for example. For deep output, the downsampling factor is 32x. These multi-scale feature maps will form the input of the subsequent wavelet feature decomposition module, so as to represent pedestrian targets at different receptive fields and semantic levels.
[0036] (III) Wavelet Eigendecomposition: The wavelet feature decomposition module is one of the core components of the method of this invention. Its main function is to perform wavelet domain decomposition on feature maps of various scales from the feature extraction network, explicitly dividing the features into low-frequency structural information and high-frequency detail information. Through this decomposition, the key feature representation of pedestrians can be enhanced under conditions of dense occlusion and complex backgrounds, while suppressing high-frequency repetitive texture interference from scaffolding, steel mesh, etc. in the background. At the same time, it provides a controllable frequency domain input for subsequent cross-scale frequency fusion.
[0037] Specifically, for the feature map at each scale level First, perform discrete wavelet transform to obtain the initial low-frequency subband. and initial high-frequency subband This process can be represented as: ; Among them, the initial high-frequency sub-band Further includes horizontal components Vertical component and diagonal components ,Right now In the decomposition results, the low-frequency subband mainly represents the overall outline and structural semantic information of the pedestrian, while the high-frequency subband is responsible for capturing the pedestrian's edges, textures, and local details, thus achieving explicit decoupling between structural and detail information.
[0038] To ensure the decomposed subbands can adapt to the requirements of cross-scale transmission, further processing of the initial low-frequency and high-frequency subbands is needed, namely channel alignment and normalization. This embodiment accomplishes this step using a lightweight mapping operator, specifically: ; in, and This is a mapping operator that includes convolution and normalization operations. In implementation, a 1×1 convolutional layer can be used to adjust the number of channels, followed by batch normalization layers and activation functions such as ReLU to form a nonlinear mapping. After these operations, a low-frequency subband suitable for cross-scale transmission is obtained. and high-frequency subband Each scale level ultimately outputs a set of decomposition results. It is then fed into frequency fusion modules at different levels.
[0039] like Figure 2 As shown, wavelet feature decomposition separates low-frequency structures from high-frequency details. In densely occluded scenes, high-frequency responses such as edges and textures can still be extracted and enhanced independently, thereby reducing the phenomenon of overlapping features between adjacent pedestrians and lowering the risk of false detection by merging multiple pedestrians into a single target. At the same time, the suppression of repetitive high-frequency interference such as mechanical structural parts and fence textures that exist in a large number of construction site backgrounds is also conducive to reducing the probability of false alarms through subsequent fusion stage.
[0040] (iv) Cross-scale frequency fusion: A frequency fusion module is set at multiple scale levels of the detection network, such as different layers of the neck network, to perform cross-scale fusion and reconstruction of wavelet decomposition results from different scales. Unlike the simple addition or splicing of multi-scale features in existing technologies, the key feature of this invention is: Figure 1 As shown, the output of the wavelet feature decomposition module is fed into frequency fusion modules at different levels according to a preset cross-scale mapping rule, enabling different levels to obtain complementary frequency information. Shallow low-frequency features can be fused with deep high-frequency features, and deep low-frequency features can be fused with shallow high-frequency features in a complementary manner. This effectively improves the detection performance of pedestrians and occluded scenes across scales.
[0041] (1) Cross-scale mapping rules: For each frequency fusion module level, use symbols Indicates the level number, , This represents the total number of layers in the fusion module, typically consistent with the number of detection layers in the detection network. Define the low-frequency cross-scale mapping index set separately. and high-frequency cross-scale mapping index set These index sets are used to specify which scale levels The sub-bands are assigned to the hierarchy. Perform fusion. Then construct the input to the index set based on the index set. Subband set of the layer frequency fusion module: ; In the mapping rules, high-resolution levels, such as Used for detecting small targets, its corresponding high-frequency cross-scale mapping index set This will include more high-scale level indexes, allowing more high-frequency subbands with richer details to be passed to this level, thus enhancing the edge texture representation of small-scale pedestrians; while low-resolution levels, such as Used for detecting large targets, its low-frequency cross-scale mapping index set It will include more lower-scale level indexes, allowing more low-frequency subbands containing stronger structural semantics to be passed to this level, thereby enhancing the overall contour consistency of large-scale pedestrians. The specific mapping indexes can be flexibly set according to the detection network structure and actual needs.
[0042] (2) Alignment operation: For the The layer frequency fusion module combines the received low-frequency subbands. and high-frequency subband set Each sub-band in the process undergoes spatial alignment and channel alignment. Spatial alignment is achieved through upsampling or downsampling operations to ensure all sub-bands participating in the fusion have a uniform target spatial resolution; channel alignment is achieved through convolution operations to ensure that the number of channels in each sub-band remains consistent. Let the aligned low-frequency sub-band and high-frequency sub-band be denoted as follows: and , is represented as: ; in, The operations include resolution adjustment, such as using bilinear interpolation for upsampling, strided convolution or pooling for downsampling, and channel mapping via 1×1 convolution. Alignment operations ensure that frequency information from different sources can be subsequently fused in a unified tensor space, avoiding information loss due to scale and dimension mismatch.
[0043] (3) Adaptive fusion: After alignment, the aligned low-frequency subband set is... Adaptive fusion is performed to obtain fused low-frequency features. Simultaneously, the aligned high-frequency subband sets will be... Adaptive fusion is performed to obtain fused high-frequency features. : ; in, and For the fusion function, in practice, each sub-band can be concatenated along the channel dimension and then compressed using a 1×1 convolution. Alternatively, an attention mechanism, such as an SE module or spatial attention, can be introduced to perform a weighted summation of sub-bands from different sources, thereby adaptively selecting and enhancing useful information. After fusion, low-frequency features provide stable semantic support for the overall pedestrian structure, while high-frequency features enhance the expressive ability of pedestrian edges and local details; the two complement each other.
[0044] (4) Frequency domain reconstruction: Based on the low-frequency features obtained by fusion and high frequency characteristics Frequency domain reconstruction is performed to generate enhanced feature maps for this level. , is represented as: ; Reconstruction operation here It can be an inverse wavelet transform, directly reconstructing the feature map using the fused low-frequency and high-frequency components; or it can be a process of first... and By concatenating the data along the channel dimension and then mapping it to the desired feature space through several convolutional layers, this operation can be considered an equivalent frequency domain reconstruction. Enhanced Feature Map The information, which integrates complementary high and low frequency information across scales, will be fed into the detection head for target prediction.
[0045] Through the above "alignment-fusion-reconstruction" process, each frequency fusion module level can acquire complementary frequency information across scales, which not only improves the detection capability of small-scale pedestrians, but also enhances the separability of adjacent pedestrians in densely occluded scenes, ultimately improving the stability and consistency of detection box localization.
[0046] (v) Detection head and output: Enhanced feature maps output by frequency fusion modules at each level The data is input into the detection head of the object detection network. For example... Figure 7 As shown, the detection head typically consists of two parts: a classification branch and a regression branch. The classification branch is responsible for predicting the probability that each spatial location in the feature map belongs to the human category, while the regression branch is responsible for predicting the coordinate offset of the bounding box.
[0047] like Figure 5As shown, the detection head design in this embodiment can adopt an anchor-based or anchor-free detection paradigm. For example, the wavelet feature decomposition module and frequency fusion module can be embedded into the YOLOv8 framework to form an end-to-end dense pedestrian detection model.
[0048] In densely occluded scenes, to prevent adjacent pedestrian detection boxes from being incorrectly filtered due to non-maximum suppression, such as... Figure 7 As shown, this embodiment can employ suppression strategies more suitable for crowded targets, such as Soft-NMS or a suppression method combining center point distance, to reduce missed detections. Finally, after post-processing to remove redundant bounding boxes, the final detection results are output, including the bounding box location, class label, and confidence score for each pedestrian.
[0049] (vi) Model training: The detection model proposed in this invention requires end-to-end training, and the training process includes the following steps: S6.1: As Figure 5 As shown, construction site scene image samples with pedestrian bounding boxes are fed into the detection model. The samples sequentially pass through a feature extraction network, a wavelet feature decomposition module, frequency fusion modules at each level, and a detection head to obtain the model's output candidate detection boxes, class confidence scores, and bounding box regression results.
[0050] Common matching strategies include nearest neighbor assignment based on the distance to the center point or matching methods based on the intersection-union ratio of anchor boxes.
[0051] S6.2: Calculate the loss function (Loss) based on the prediction results and the ground truth labels to measure the prediction error and guide network parameter optimization. The loss function must include at least the classification loss. and regression loss Two parts. Classification loss. The cross-entropy loss is used, and its calculation formula is as follows: ; in, This represents the total number of positive and negative samples involved in a single training iteration. For example, the number of categories, such as pedestrian categories. As an indicator function, when the sample The true category is The value is 1 if the condition is met, and 0 otherwise. Predict samples for the model Category The probability of regression loss. To optimize bounding box localization accuracy, smoothed L1 loss or IoU-type losses, such as GIoU, DIoU, or CIoU loss, can be used. CIoU loss, in particular, comprehensively considers the overlap area between the predicted and ground truth boxes, the distance between their center points, and the aspect ratio, providing better guidance for bounding box regression under dense occlusion conditions. Furthermore, to alleviate the problem of imbalanced positive and negative samples, sample weighting strategies such as Focal Loss can be introduced into the classification loss to enhance the model's attention to difficult-to-classify samples and improve training stability.
[0052] S6.3: Backpropagation is performed based on the calculated Loss value, and all learnable parameters of the detection model are updated using optimizers such as Adam or SGD. During the update process, not only are the parameters of the feature extraction network and the detection head optimized, but the mapping operators in the wavelet feature decomposition module are also optimized. Learnable parameters, such as the fusion function in the frequency fusion module, also participate in joint optimization, thereby improving the overall cross-scale feature representation capability and robustness in occluded scenarios. The training process can employ learning rate decay strategies, such as cosine annealing or step decay, to help the model converge better.
[0053] S6.4: Determine whether the current iteration count has reached the preset training epoch. If not, return to S6.1 to continue iterative training; if it has, stop training and enter the model evaluation phase.
[0054] S6.5: After training, evaluate the model performance on the validation or test dataset, calculating various detection performance metrics to measure the model's generalization ability. Commonly used evaluation metrics include precision, recall, F1 score, mean precision (AP), and mean precision (mAP). AP measures the accuracy of object detection for a specific class and is defined as the area under the precision-recall curve. ; Indicates that the recall rate is The precision corresponding to the time interval. mAP, on the other hand, is the average AP calculated for all categories: ; This represents the total number of categories. Additionally, it indicates the number of model parameters. The size of a model is measured and defined as the total number of all learnable parameters in the network. If the... The layer parameter tensor is ,but: ; The computational cost of the model is expressed in floating-point operations (FLOPs). Taking a two-dimensional convolutional layer as an example, let the kernel size be... The number of input channels is The number of output channels is The output feature map size is The FLOPs of this convolutional layer are estimated as follows: ; The total computational cost of the model is the sum of the computational costs of each layer. If the evaluation results do not meet the needs of practical applications, hyperparameters such as learning rate, batch size, input image resolution, positive and negative sample matching threshold, cross-scale mapping index set, and fusion weights can be adjusted and optimized to obtain better detection results.
[0055] (vii) Verification Experiment: To verify the effectiveness of the proposed method, comparative experiments were conducted on publicly available dense pedestrian detection datasets CrowdHuman and WiderPerson, as well as a specially constructed dataset of densely occluded pedestrians at a construction site. The experiments used mean accuracy (mAP), number of model parameters, and computational cost as the main evaluation metrics to comprehensively measure the detection accuracy and computational overhead of the proposed method under conditions of dense targets and heavy occlusion. The experimental results are shown in Table 1 below:
[0056] As can be seen from the data in Table 1, the detection model of this invention achieved high mAP on several dense pedestrian datasets, while maintaining a low level of model parameters and computational cost. In particular, on the self-built dataset targeting densely occluded construction site scenarios, the mAP reached 94.5%, fully demonstrating that the wavelet domain frequency decomposition and cross-scale fusion mechanism can significantly improve the detection accuracy and robustness of densely occluded pedestrians, and has good practical deployment value.
Claims
1. A method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform, characterized in that... Includes the following steps: S1: Acquire images of the construction site scene, and use a feature extraction network to extract features from the images at multiple scales to obtain feature maps at multiple scales. ,in, Indicates the scale level number; S2: For each feature map Perform wavelet transform decomposition to obtain the corresponding low-frequency subband. and high-frequency subband ; S3: Based on cross-scale mapping rules, low-frequency subbands of different scales are mapped. and high-frequency subband The signals are fed into frequency fusion modules at different levels; among them, high-frequency subbands containing more details are transmitted to high-resolution frequency fusion modules, while low-frequency subbands containing more structural semantics are transmitted to low-resolution frequency fusion modules. S4: In the frequency fusion module of each level, the received low-frequency sub-bands and high-frequency sub-bands from different scales are aligned and fused, and the enhanced feature map of that level is reconstructed using the low-frequency and high-frequency features obtained after fusion. ,in, Indicates the hierarchical number of the frequency fusion module; S5: Enhanced feature maps reconstructed at each level Input the detection head, perform pedestrian category prediction and bounding box regression, and output the pedestrian detection results.
2. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 1, characterized in that: S1 includes: S1.1: Input the construction site scene image into the feature extraction network; S1.2: Extracting features through a feature extraction network Feature maps at each scale And the first Feature map satisfy: ;in, For the number of channels, This represents the spatial resolution of the feature map.
3. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 2, characterized in that: In S2, for each feature map Wavelet transform decomposition is performed to obtain the initial low-frequency subband. and initial high-frequency subband , is represented as: ; And the initial low-frequency subband Includes horizontal component Vertical component and diagonal components ,Right now: 。 4. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 3, characterized in that: In S2, the initial low-frequency sub-band and initial high-frequency subband Channel alignment and normalization are performed separately to obtain the low-frequency sub-band. and high-frequency subband ,Right now: ; ; in, and It is a mapping operator that includes convolution and normalization operations.
5. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 4, characterized in that: In S3, the cross-scale mapping rule includes: 3.1: Regarding the first The layer frequency fusion module defines a set of low-frequency cross-scale mapping indexes. and high-frequency cross-scale mapping index set The index set is used to indicate which scale levels The sub-bands are passed to the hierarchy. ; 3.2: Construct the input up to the index set. Low-frequency subband set of the layer frequency fusion module and high-frequency subband set .
6. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 5, characterized in that: In step S4, the aligned low-frequency sub-band set Adaptive fusion is performed to obtain fused low-frequency features. ; Aligned high-frequency subband set Adaptive fusion is performed to obtain fused high-frequency features. .
7. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 6, characterized in that: In S4, based on the fusion of low-frequency features and fusion of high-frequency features Perform frequency domain reconstruction to generate enhanced feature maps. , is represented as: ; in, This is the inverse wavelet transform operation, or it is the operation of... and Reconstruction operation after convolution mapping following concatenation along the channel dimension.
8. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 7, characterized in that: The method also includes a training phase, which includes: S6: Input the sample image with pedestrian annotations into the detection model, and the detection model performs steps S1~S4 to obtain enhanced feature maps. And will enhance the feature map Input the detection head to obtain the prediction result; S7: Calculate the loss function based on the prediction results and the ground truth labels. And perform backpropagation to update the network parameters of the detection model; S8: Repeat the iterative training until the preset conditions are met to obtain the trained detection model.
9. The method for detecting pedestrians in densely occluded construction sites across scales based on wavelet transform according to claim 8, characterized in that: The loss function At least classification loss and regression loss ,in: The classification loss The cross-entropy loss is used, and its calculation formula is as follows: ; in, The number of samples used in a single training run. The total number of pedestrian categories. For the sign function, when the sample The true category is The value is 1 if the condition is met, and 0 otherwise. To predict samples for the detection model Category The probability of.
10. A cross-scale pedestrian detection model based on wavelet transform in densely occluded construction sites, characterized in that: The model includes: A feature extraction network is used to extract multi-scale features from an input construction site scene image, outputting feature maps at L scales. ,in: For scale level numbering, , For the number of channels, Spatial resolution; The wavelet eigenvalue decomposition module is used to process feature maps at various scales. Wavelet transform decomposition and feature mapping are performed to output the low-frequency subband. and high-frequency subband The wavelet transform decomposition is expressed as: ; For the initial low-frequency sub-band, This is the initial high-frequency subband, and It includes high-frequency components in the horizontal, vertical, and diagonal directions; The feature mapping is represented as follows: , ; in: and It is a mapping operator that includes convolution and normalization operations; Multiple frequency fusion modules are configured at different scale levels. The input of each frequency fusion module at level k is connected to the output of the wavelet feature decomposition module according to a cross-scale mapping rule, so that the k-th level frequency fusion module receives the set of low-frequency sub-bands. and high-frequency subband set ,in: and These are sets of cross-scale mapping indices for low-frequency and high-frequency data; the corresponding high-resolution levels. Includes more high-scale hierarchical indexes, and corresponding low-resolution hierarchical indexes. Includes more low-scale hierarchical indexes; Each frequency fusion module performs spatial and channel alignment on the received low-frequency subband set and high-frequency subband set to obtain the aligned low-frequency subband. and high-frequency subband Then, adaptive fusion is performed on the aligned subbands to obtain the fused low-frequency features. and fusion of high-frequency features ; based on and Frequency domain reconstruction is performed using inverse wavelet transform or channel concatenation convolution to generate enhanced feature maps. ,in: This is either an inverse wavelet transform operation or a convolution mapping operation after channel concatenation. The detection head is used to analyze the enhanced feature maps generated by the frequency fusion modules at each level. Perform pedestrian category prediction and bounding box regression, and output pedestrian detection results.
Citation Information
Patent Citations
Preparation method and application of acid-resistant brick material
CN112110714A
Trapping system for vehicle airbag explosion test
CN115031936A
