Deep learning-based methods, devices, electronic equipment, and software products for identifying randomly piled materials.
By introducing the MGCA module and the C3k2-ASL module into the random material identification model, the problem of insufficient accuracy and robustness of existing technologies in identifying random materials in complex backgrounds is solved, and high-precision and high-reliability random material identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STREAMAP TECHNOLOGY CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-05-05
AI Technical Summary
Existing deep learning technologies struggle to accurately and robustly identify diverse, randomly piled materials in urban environments under complex conditions. Traditional convolutional neural networks lack the ability to perceive diverse materials, making it difficult for existing methods to meet the application requirements of high accuracy and high reliability in actual urban management.
A deep learning-based model for identifying randomly piled materials is adopted, and a multidimensional global cross attention (MGCA) module and a C3k2-ASL module are introduced. The feature response is enhanced through dynamic attention mechanism. Combined with the YOLOv8s network structure, the model’s ability to perceive and identify the overall spatial distribution features of randomly piled materials is improved.
It significantly improves the accuracy and robustness of identifying randomly piled materials, reduces the false judgment rate, and meets the high-precision and high-reliability identification requirements in actual urban management scenarios.
Smart Images

Figure CN121415262B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, and in particular relates to a method, device, electronic device and computer program product for identifying randomly piled materials based on deep learning. Background Technology
[0002] With the improvement of urban construction and refined management, the problem of haphazardly piled construction waste, discarded furniture, household garbage, and other debris in public spaces such as roads, sidewalks, and green belts has become increasingly prominent. This not only affects the city's appearance but may also cause traffic congestion, sanitation, and safety hazards. Traditional methods relying on manual patrols are inefficient and costly, making it difficult to achieve real-time and comprehensive monitoring of haphazard dumping.
[0003] Although deep learning technology has been used for debris pile identification, existing methods generally use convolutional neural networks (CNNs), which lack the ability to perceive diverse materials in complex contexts. As a result, existing technologies still cannot meet the application requirements of high accuracy and high robustness in actual urban management. Summary of the Invention
[0004] This application provides a deep learning-based method, device, electronic device, and computer program product for identifying randomly piled materials. It can effectively perceive the key features of various types of randomly piled materials under complex background conditions, improve the model's recognition accuracy and robustness for randomly piled materials, and thus meet the application requirements for high-precision and high-reliability recognition in actual urban management scenarios.
[0005] Firstly, this application provides a deep learning-based method for identifying randomly piled materials, including:
[0006] The backbone network based on the pre-trained random material identification model extracts features from the images to be identified, obtaining image features; the images to be identified include urban public spaces.
[0007] The neck network based on the random material identification model fuses image features to obtain target fused features;
[0008] The recognition network based on the random material recognition model identifies the target fusion features and obtains the recognition result of the random material in the image to be identified.
[0009] The neck network includes the MGCA module, which is used to extract global contextual information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism.
[0010] Furthermore, the MGCA module includes a segmentation layer, a first branch, a second branch, an activation layer, and a first fusion layer; for the first input feature:
[0011] The segmentation layer performs a segmentation operation on the first input feature to obtain G sets of segmentation features;
[0012] For each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; feature extraction and fusion operations are performed on the segmentation features in the width direction through the second branch;
[0013] By performing the first activation operation on the first branch output and the second branch output corresponding to each group of segmentation features through the activation layer, the height direction weight and width direction weight corresponding to each group of segmentation features are obtained respectively.
[0014] The first fusion layer fuses the height and width weights of each group of segmentation features with the first input features based on residual propagation to obtain the corresponding first output features.
[0015] Furthermore, the first branch and the second branch have similar branching structures; the branching structure includes a first global average pooling layer, a global max pooling layer, a convolutional structure, and a first concatenation layer; for each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; feature extraction and fusion operations are performed on the segmentation features in the width direction through the second branch, including:
[0016] Based on the branching structure, the segmentation features for each group are as follows:
[0017] The first global average pooling layer and the global max pooling layer perform global average pooling and global max pooling operations on the segmentation features in the corresponding directions, respectively, to obtain average pooling features and max pooling features. Through a convolutional structure, the average pooling features and max pooling features are respectively subjected to the first convolution operation, batch normalization operation, and second activation operation, respectively, to obtain two convolutional features. The two convolutional features are concatenated through the first concatenation layer to obtain the output in the corresponding direction.
[0018] Specifically, for the first branch, the corresponding direction is the height direction; for the second branch, the corresponding direction is the width direction.
[0019] Furthermore, the backbone network includes the C3k2-ASL module, which is an improvement on C3k2 based on the ASL Block. The ASL Block includes an SSA submodule, an RCA submodule, a spatial-channel joint layer, a second concatenation layer, a feature extraction structure, and a third concatenation layer; the second input feature is used to input the ASL Block.
[0020] The SSA submodule performs spatial structural modeling and weighted fusion on the second input feature to obtain the corresponding spatial fusion feature.
[0021] The channel attention mechanism is executed on the spatial fusion features through the RCA submodule, and the obtained channel weights are fused with the spatial fusion features to obtain the channel fusion features.
[0022] Spatial-channel fusion features are obtained by fusing spatial fusion features and channel fusion features through a spatial-channel fusion layer;
[0023] Based on the second stitching layer, the spatial-channel fusion features processed by the first scaling factor are stitched together with the second input features to obtain the first-stage features;
[0024] Based on the feature extraction structure, batch normalization and MPL operations are performed on the first-stage features to obtain the second-stage features.
[0025] The second output feature is obtained by concatenating the second-stage features processed by the second scaling factor with the first-stage features based on the third concatenation layer.
[0026] Furthermore, the SSA submodule includes a Batch Normalization (BN) layer, parallel width-direction separable depthwise convolutional fusion layers, height-direction separable depthwise convolutional fusion layers, and a fourth concatenation layer. The SSA submodule performs spatial structural modeling and weighted fusion on the second input features to obtain the corresponding spatial fusion features, including:
[0027] Batch normalization is performed on the second input feature by the BN layer to obtain the batch normalization result;
[0028] A width-direction separable depthwise convolutional fusion layer is used to perform width-direction separable depthwise convolutional operations on the batch normalized results, and the resulting convolutional results are weighted and fused using width-direction learnable fusion weights to obtain width-direction fused features.
[0029] The batch normalization results are subjected to a high-direction separable deep convolutional fusion layer, and the resulting convolutional results are weighted and fused using high-direction learnable fusion weights to obtain high-direction fused features.
[0030] The spatial fusion feature is obtained by stitching the width-direction fusion feature and the height-direction fusion feature together through the fourth stitching layer.
[0031] Furthermore, the RCA submodule includes a second global average pooling layer, a channel attention mechanism layer, and a second fusion layer. The RCA submodule executes the channel attention mechanism on the spatial fusion features, fusing the obtained channel weights with the spatial fusion features to obtain the channel fusion features, including:
[0032] The spatial fusion features are subjected to global average pooling operation through the second global average pooling layer to obtain the pooling result;
[0033] Based on the channel attention mechanism layer, the pooling results are sequentially subjected to the second convolution operation, the third activation operation, the third convolution operation, and the fourth activation operation to obtain the channel weights;
[0034] In the second fusion layer, spatial fusion features are weighted and fused based on channel weights to obtain channel fusion features.
[0035] Furthermore, the loss function used to train the disordered material identification model includes CLRW-BCE Loss; the formula for CLRW-BCELoss is as follows:
[0036]
[0037]
[0038]
[0039]
[0040] in, Represents the binary cross-entropy loss CLRW-BCELoss with constrained log-weighted modulation; Represents the weight; where, This indicates the sensitivity to several terms. Indicates the number of samples raised to a power; Indicates the inverse frequency modulation intensity ( Degenerates into log-weighted only). This represents the total number of samples in the training set; Indicates the total number of categories; Indicates category frequency; Indicates the highest frequency of the category; L BCE For binary classification, cross-entropy loss, n The number of image samples for all urban facility anomalies. For the first i The true category of each image sample For the first i Predicted category for each image sample.
[0041] Secondly, this application provides a device for identifying randomly piled materials, comprising:
[0042] The extraction module is used to extract features from the image to be identified based on the backbone network of the pre-trained random material identification model; the image to be identified includes urban public spaces.
[0043] The fusion module is used to fuse image features based on the neck network of the random material identification model to obtain the target fused features;
[0044] The recognition module is used to identify the target fusion features based on the recognition network of the random material recognition model to obtain the recognition result of the random material in the image to be recognized.
[0045] The neck network includes the MGCA module, which is used to extract global contextual information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism.
[0046] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.
[0047] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.
[0048] Fifthly, this application provides a computer program product comprising a computer program that, when executed by one or more processors, implements the steps of the method described in the first aspect.
[0049] The advantages of this application compared with the prior art are as follows: the recognition process is realized based on the pre-trained random material recognition model: first, the backbone network extracts features from the image to be recognized containing the street block to obtain image features; then, the neck network effectively fuses the image features to form a target fusion feature containing rich discriminative information; finally, the recognition network analyzes the fusion feature and outputs the recognition result, and can give the corresponding prediction result when there is a random material target.
[0050] The disorderly pile material identification model introduces a novel multi-dimensional global cross attention (MGCA) module in the neck network, which can globally model features in the width and height dimensions. This enables the model to explicitly perceive the overall spatial distribution characteristics of large-scale disorderly pile materials such as stacked building materials and continuously scattered garbage along the street, thereby making up for the deficiency of local feature extraction methods in perceiving global structural information and improving the ability to identify the overall shape of disorderly pile materials.
[0051] Meanwhile, addressing the issues of traditional convolution using fixed weights, lacking content-adaptive adjustment capabilities, and being prone to false detections in complex urban scenarios, this MGCA module uses a dynamic attention mechanism to adaptively adjust the feature response intensity based on the contextual semantic information of the input image. This allows the model to focus on enhancing the feature representation of truly illegally dumped areas and effectively suppress interference from normal objects in scenarios such as sidewalks, green belts, or shop entrances, thereby reducing the false judgment rate and significantly improving the accuracy and robustness of haphazardly dumped material identification in complex backgrounds. This meets the application requirements for high-precision and high-reliability identification in actual urban management scenarios.
[0052] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of the network structure of the disordered material identification model provided in the embodiments of this application;
[0055] Figure 2 This is a flowchart illustrating the deep learning-based method for identifying randomly piled materials provided in an embodiment of this application.
[0056] Figure 3 This is a schematic diagram of the network structure of the MGCA module provided in the embodiments of this application;
[0057] Figure 4 This is a schematic diagram of the network structure of the C3k2-ASL module and ASL Block provided in the embodiments of this application;
[0058] Figure 5 This is a schematic diagram of the structure of the disorderly pile material identification device provided in the embodiments of this application;
[0059] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0060] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0061] Deep learning technology has been used for debris pile identification, but existing methods generally use convolutional neural networks (CNNs), which lack the ability to perceive diverse materials in complex backgrounds. As a result, existing technologies still cannot meet the application requirements of high precision and high robustness in actual urban management.
[0062] To address this issue, this study found that CNNs have significant shortcomings in the task of identifying illegally piled materials. First, their inherent local receptive field is insufficient to effectively model the long-distance spatial context required for large-scale piled areas (such as piles of building materials along the street or continuously scattered garbage), resulting in insufficient perception of the overall distribution pattern of materials. Second, traditional convolution uses fixed weights to uniformly process all spatial locations and channels, lacking the ability to dynamically adjust feature responses based on the content of the input image. This makes it difficult to highlight truly illegally piled debris in complex urban scenes (such as sidewalks, green belts, and shop entrances), and easily misclassifies normal objects (such as temporarily placed express boxes or debris on the edge of flower beds) as abnormal. Finally, even with the introduction of attention mechanisms, if only the channel dimension (such as the SE module) or a single spatial dimension (such as spatial attention in CBAM) is focused on, it is still difficult to simultaneously capture the structural characteristics of materials in multiple directions, such as width extensibility (such as horizontally stacked wooden boards) and height aggregation (such as bagged garbage piled in a corner), thus limiting the model's overall discrimination ability for irregular, multi-scale piles of debris. These factors collectively limit the practicality and robustness of existing methods in real-world urban management scenarios.
[0063] To meet the application requirements for high-precision and high-reliability identification in practical urban management scenarios, this application proposes a model for identifying randomly piled materials. This model includes a backbone network, a neck network, and a recognition network. Specifically, the backbone network extracts features from the input image to obtain image features; the neck network fuses these image features to obtain target fused features; and the recognition network identifies the target fused features to obtain the identification result of randomly piled materials in the image to be processed. In the presence of randomly piled materials, the model can provide corresponding predicted bounding boxes and predicted categories.
[0064] Among them, the MGCA module introduced in the neck network of the random material pile recognition model can perform global modeling of features in the width and height dimensions, enabling the model to explicitly perceive the overall spatial distribution characteristics of large-scale random materials piled up along the street, such as building materials piled up in a strip and continuously scattered garbage. In particular, it can simultaneously capture the structural characteristics of materials in multiple directions, such as horizontal extensibility (e.g., horizontally stacked wooden boards) and vertical aggregation (e.g., bagged garbage piled up in the corner), thereby making up for the deficiency of local feature extraction methods in perceiving global structural information and improving the ability to recognize the overall shape of random materials.
[0065] Meanwhile, addressing the issues of traditional convolution using fixed weights, lacking content-adaptive adjustment capabilities, and being prone to false detections in complex urban scenarios, this MGCA module uses a dynamic attention mechanism to adaptively adjust the feature response intensity based on the contextual semantic information of the input image. This allows the model to focus on enhancing the feature representation of truly illegally dumped areas and effectively suppress interference from normal objects in scenarios such as sidewalks, green belts, or shop entrances, thereby reducing the false positive rate and significantly improving the accuracy and robustness of haphazardly dumped material identification in complex backgrounds. This meets the application requirements for high-precision and high-reliability identification in actual urban management scenarios.
[0066] In some embodiments, the MGCA module includes a segmentation layer, a first branch, a second branch, an activation layer, and a first fusion layer. Specifically, the segmentation layer divides the first input features input to the MGCA module into several groups of segmentation features according to the channel dimension, reducing the computational complexity of a single group of features while retaining the ability to represent fine-grained features of different types of randomly piled materials (such as metal, plastic, wood, etc.). Each group of segmentation features is input to the first branch and the second branch, respectively, where the first branch and the second branch extract and fuse features along the width and height directions, respectively, thereby effectively capturing the differentiated contextual information of randomly piled materials in terms of lateral extension and vertical aggregation. After processing by the activation layer, attention weights corresponding to the height and width directions are generated, forming complementary attention maps in the two directions. Finally, the first fusion layer performs adaptive weighted fusion of the first input features based on the two attention weights to enhance the feature response of truly illegally piled areas (such as the edge areas of disorderly stacked waste and isolated scattered objects), while effectively suppressing background interference information such as road texture, vehicle projection, and green vegetation.
[0067] In some embodiments, the first branch and the second branch are used to extract and fuse features from different directions, and both adopt the same branch structure, including a first global average pooling layer, a global max pooling layer, a convolutional structure, and a first concatenation layer. Based on the branch structure, global average pooling and global max pooling operations are performed on each group of segmented features in the corresponding direction, and the pooling results are input into the convolutional structure for feature transformation to fully extract significant convolutional features in that direction. Subsequently, the two convolutional features are concatenated through the first concatenation layer to obtain the output features in the corresponding direction, which are then used for subsequent activation processing to generate attention weights in the corresponding direction.
[0068] Specifically, when the segmentation features are input into the first branch for processing, the corresponding feature extraction direction is the height direction; when the segmentation features are input into the second branch for processing, the corresponding feature extraction direction is the width direction.
[0069] The MGCA module performs global average pooling and global max pooling operations in the height and width spatial dimensions, respectively, effectively capturing differentiated contextual cues of haphazardly piled materials in the vertical aggregation and lateral extension directions. Subsequently, based on the pooling features of each dimension, cross-dimensional dependencies are modeled by sharing a lightweight convolutional structure, generating complementary attention maps in the width and height directions. Adaptive weighting of input features based on these attention maps enhances the response to truly illegal dumping areas while suppressing interfering information. In other words, by integrating multi-dimensional global context and dynamic attention mechanisms, the MGCA module significantly improves the model's ability to accurately identify and robustly discriminate haphazardly piled materials in complex urban scenarios.
[0070] This application's statistical analysis reveals that in the task of identifying illegally dumped materials in urban areas, the forms of these materials exhibit a high degree of diversity, particularly characterized by slender, scattered, and low-contrast structures. Examples include steel bars, scattered wooden planks, and plastic pipes found in construction waste, or woven bags and scraps of discarded furniture piled up in street corners. These materials typically feature scattered spatial distribution, blurred edges, and colors highly similar to the background (such as sidewalks, green belts, vehicles, or billboards), extending along a specific direction. These slender or linear debris are easily obscured by complex urban scenes (such as ground textures, pedestrian occlusion, lighting changes, or reflective interference), making it difficult for traditional convolutional networks to effectively extract their discriminative features. Meanwhile, another type of material (such as piles of slag, concentrated discarded construction waste, or large discarded items) exhibits large-scale, irregular spatial extension, requiring broad-area contextual information for accurate semantic discrimination. The significant scale and geometric differences, ranging from microscopic linear debris to macroscopic irregular aggregates, pose a serious challenge to existing methods in simultaneously achieving orientation-sensitive fine-grained detection capabilities and global semantic robustness.
[0071] In some embodiments, to simultaneously ensure the model's orientation-sensitive fine-grained detection capabilities and global semantic robustness, a C3k2-ASL module can be introduced into the backbone network. This module is constructed by embedding a lightweight adaptive strip learning module (ASL Block) for orientation-sensitive feature enhancement into C3k2. The ASL Block includes an SSA submodule, an RCA submodule, a spatial-channel joint layer, a second concatenation layer, a feature extraction structure, and a third concatenation layer.
[0072] Unlike mainstream structural improvement methods that rely on large-kernel convolutions, deformable convolutions, or complex attention mechanisms, the SSA submodule can explicitly construct long-range structural dependencies in different spatial directions (e.g., height and width) with low overhead, effectively capturing highly directional materials. The RCA submodule, based on the output of the SSA submodule, adaptively enhances semantically relevant channels and suppresses background noise, then fuses them back to the backbone features in a residual manner through a spatial-channel joint layer. Finally, a multi-stage fusion mechanism between the enhanced path and the original path is constructed through a second concatenation layer, a feature extraction structure, and a third concatenation layer. In this process, two control strategies, Layer Scale and Drop Path, are introduced to dynamically adjust the feature information flow in different paths. Layer Scale, by introducing a learnable scaling factor on the enhanced path, finely controls the magnitude of the enhanced features, ensuring that the network primarily transmits stable features from the original path in the early stages of training, avoiding excessive amplitude of enhanced branch features that could interfere with the backbone information. As training progresses, the scaling factor can be adaptively adjusted, allowing the enhanced path to gradually take effect, thereby improving the model's ability to express complex features while ensuring training stability. Meanwhile, DropPath randomly discards augmentation paths during training, allowing the model to alternate between the original and augmentation paths for feature learning across different training iterations. This effectively reduces over-reliance on a single augmentation path, mitigating overfitting risks and significantly improving generalization ability in scenarios with small sample sizes or long-tailed distributions. By synergistically applying Layer Scale and Drop Path to the second concatenation layer, the feature extraction structure, and the third concatenation layer, dynamic control over the intensity and timing of augmentation feature introduction is achieved. This significantly improves the stability, robustness, and generalization performance in complex real-world scenarios while ensuring rich feature representation.
[0073] This design abandons high-parameter cross-scale fusion or deformation modeling, and instead adopts a three-in-one strategy of "spatial orientation perception attention + channel selective modulation + dynamic residual balancing". This significantly enhances the sensitivity and robustness to small, fuzzy, low-contrast randomly piled material regions without increasing inference latency.
[0074] In some embodiments, the SSA submodule includes a Batch Normalization (BN) layer, parallel width-direction depth-separable convolutional fusion layers, height-direction depth-separable convolutional fusion layers, and a fourth concatenation layer. These layers are used to perform spatial structural modeling and weighted fusion of the second input features, generating corresponding spatial fusion features. To improve training stability, the SSA submodule first performs batch normalization on the input features; then, it introduces a dual-path strip convolution branch to model the features along the width and height directions respectively. This modeling process includes: using strip-shaped depth-separable convolutions, employing a 1×19 kernel in the height direction and a 19×1 kernel in the width direction, thereby constructing an ultra-long linear receptive field in two orthogonal directions, effectively capturing the features of slender, randomly piled materials with significant directional characteristics, such as horizontally scattered pipes and vertically stacked plates. Furthermore, considering the dynamic changes in the importance of width and height structures in different urban scenarios, learnable fusion weights in the corresponding directions are introduced to adaptively weight the convolution results of the two branches. Finally, the fourth concatenation layer concatenates the fusion features from the two directions to obtain the spatial fusion features.
[0075] In some embodiments, the RCA submodule includes a second global average pooling layer, a channel attention mechanism layer, and a second fusion layer. After the spatial fusion features are processed by the second global average pooling layer, a lightweight channel attention mechanism is applied to the spatially enhanced output through the channel attention mechanism layer to enhance semantically relevant channels and suppress background interference. It is worth noting that the final spatial-channel joint output is constructed in a residual form, which, while preserving the original spatial structure information, only superimposes channel modulation terms, effectively avoiding the problem of over-covering key details.
[0076] In some embodiments, given the advantages of the YOLO series models, the random material identification model can be improved based on the YOLO series models:
[0077] All three are end-to-end, single-stage recognition frameworks, enabling efficient target recognition. Compared to two-stage recognizers (such as Faster R-CNN), YOLO directly regresses bounding boxes and categories through a single forward propagation, improving recognition speed and making it suitable for real-time applications. Its structure is continuously optimized, with features such as Anchor-Free mechanisms and Feature Pyramids (FPN, PAN) enhancing its ability to recognize small and multi-scale targets. Furthermore, the YOLO series models are continuously optimized in terms of lightweight design, computational efficiency, and robustness, making them well-suited for both embedded devices and cloud inference scenarios. YOLOv8 is a major upgrade to the YOLO series, supporting tasks such as target recognition, image classification, and instance segmentation. Its architecture consists of a backbone network, a neck network, and a head network. The backbone network uses a C2f module to improve feature extraction efficiency, the neck network uses a PANet structure to enhance multi-scale feature fusion, and the head network introduces an Anchor-Free design and DFL loss to improve recognition accuracy and flexibility. In addition, YOLOv8 offers five model variants (n / s / m / l / x) to adapt to different scenarios. In the task of identifying randomly piled materials, YOLOv8s is selected for optimization to balance accuracy and real-time performance, thereby improving recognition results.
[0078] Therefore, YOLOv8s is a preferred choice when constructing a random material identification model. For example, if YOLOv8s is used as the base network, and its structure is improved using C3k2-ASL and MGCA modules, the network structure of the random material identification model can be found in [reference needed]. Figure 1 .
[0079] This model for identifying randomly piled materials adopts a modular design, with each sub-module working together to balance lightweight design, high accuracy, and robustness. The backbone network incorporates a C3k2-ASL module, whose ASL Block can model long-range structural dependencies in the width and height directions with low computational cost, enhancing the model's ability to perceive and identify elongated, dispersed, and low-contrast randomly piled materials. To improve the model's ability to model the overall spatial distribution of randomly piled materials, an MGCA module is introduced into the neck network. By extracting multi-dimensional global contextual information and fusing it through a dynamic attention mechanism, this improves the model's accuracy in identifying different types of randomly piled materials in complex urban scenarios.
[0080] In some embodiments, to ensure that the trained disorderly material recognition model can meet expectations and accurately understand and identify disorderly materials of different scales in different scenarios, a dedicated dataset can be created for training the disorderly material recognition model. Specifically, a dataset named Urban Disorderly Material Dataset (UDMD) is created, which is collected by a vehicle-mounted camera under various environmental conditions.
[0081] The UDMD dataset focuses on the phenomenon of various illegally dumped materials in urban public spaces. These materials include construction waste, discarded furniture, household garbage, temporary sand and gravel piles, damaged packaging materials, and other disorderly piled debris. This scenario is highly typical in urban environmental management and smart city visual supervision, representing a challenge in real-world governance. To improve governance effectiveness, this dataset focuses on collecting real-world cases of disorderly dumping in sidewalks, green belts, street corners, and undesignated areas. All images are sourced from first-hand urban management practices, collected on-site through vehicle-mounted cameras, drone aerial photography, and fixed urban monitoring equipment, ensuring the data's authenticity, scenario diversity, and real-world representativeness.
[0082] To enhance the comprehensiveness of the UDMD dataset, it covers various urban functional areas (such as old city areas, commercial districts, residential communities, and urban-rural fringe areas) and / or different ground materials (such as permeable bricks, cement, asphalt, and lawn edges) and / or diverse lighting conditions (dawn and dusk, noon, and cloudy days) as well as complex weather conditions (sunny days, light rain, and fog) for randomly piled materials. It also takes into account key variables such as the scale of the pile (scattered vs. large-area piles) and / or material type (rigid vs. flexible, regular vs. disordered) and the degree of occlusion (partial occlusion, shadow coverage, and vegetation interference), providing rich and challenging visual resources for model training and evaluation.
[0083] The entire dataset contains 3,000 high-quality images, covering scenes of haphazardly piled materials in urban public spaces under different time periods, weather conditions, and lighting conditions, providing a solid visual foundation for related research. Some sample examples are shown below. Figure 1 As shown. To ensure the effectiveness and generalization ability of the algorithm model, this application adopts a classic 8:1:1 partitioning ratio, dividing the dataset into three parts: a training set containing 2400 images for model parameter learning and optimization; a validation set containing 300 images for hyperparameter tuning, ablation experiments, and model selection; and a test set containing 300 images for independently evaluating the algorithm's detection accuracy, robustness, and practical deployment potential on completely unseen samples. This scientifically rigorous data partitioning strategy not only improves the stability and convergence efficiency of model training but also provides a reliable evaluation benchmark for the algorithm's application in smart city urban management systems.
[0084] Preferably, during the process of dividing the datasets, special attention is paid to maintaining the balance of sample distribution among the datasets, ensuring that both datasets have similar statistical characteristics in terms of the type, size, and background environment of the randomly piled materials. This can avoid evaluation bias caused by uneven sample distribution, making the validation results more representative and reliable.
[0085] In some embodiments, to improve the recognition accuracy and convergence speed of the disordered material identification model, the loss function during the training of the disordered material identification model mainly consists of two parts: regression loss and classification loss. The classification loss is the binary cross-entropy loss (BCE Loss), used to determine the specific category within the anchor box. The regression loss consists of Focal-EIoULoss and DFL loss, used to calculate the error between the predicted bounding box and the ground truth box. Simultaneously, the matching strategy between positive and negative samples adopts a dynamic matching method (TAL).
[0086] The traditional binary classification cross-entropy loss (BCE) is:
[0087]
[0088] L BCE For binary classification, cross-entropy loss, n The number of image samples for all urban facility anomalies. For the first i The true category of each image sample For the first i Predicted category for each image sample.
[0089] There are generally two methods to address class imbalance: resampling and reweighting. Resampling methods involve undersampling the majority class (removing some samples), oversampling the minority class (adding duplicate samples), or both, directly changing the number of training samples. In Convolutional Neural Networks (CNNs) for feature learning, resampling can introduce a large number of duplicate samples, increasing training time. Oversampling can easily lead to overfitting, while undersampling may lose valuable sample data for feature learning. Reweighting, on the other hand, works by adjusting the loss function, assigning relatively higher weights to the minority class loss to balance the losses across classes. Reweighting methods have gradually become the mainstream approach for addressing class imbalance.
[0090] The basic idea of reweighted loss is to assign different weights to training samples. An intuitive approach is to determine sample weights based on the number of classes, i.e., inverse class frequency weighting, as follows:
[0091]
[0092] in, This represents the total number of samples in the training set; Indicates the total number of categories; Indicates the frequency of the category.
[0093] In addition, there is the method of exponentially decaying weights, as shown below.
[0094]
[0095] To address the issues of weak stability, significant accuracy fluctuations, and unsatisfactory detection results associated with current reweighted loss functions used to resolve class imbalance, this application proposes a Constrained Logarithmic Re-weighting with Weight Modulation (CLRW) method, which achieves accurate class weight allocation through constraint boundaries and modulated intensity.
[0096]
[0097]
[0098]
[0099] This represents the constrained log-weighted modulation binary cross-entropy loss CLRW-BCE Loss; Represents the weight; where, This indicates the sensitivity to several terms. Indicates the number of samples raised to a power; Indicates the inverse frequency modulation intensity ( (Degenerates into log-weighted only).
[0100] Constrained logarithmic reweighted modulation (CRM) offers significant advantages in addressing class imbalance: it adaptively generates weights positively correlated with class rarity by taking the logarithm of class frequency and combining it with an exponential mapping, effectively mitigating the model's neglect of tail classes; simultaneously, its built-in linear boundary mapping mechanism ensures that the final weights are strictly limited to a preset range (e.g., ...). This method avoids training instability caused by excessive weights. It combines scale invariance, distribution adaptability, and degradation consistency—automatically degrading to uniform weighting when the data is balanced, and maintaining robust response under extreme long tails. It is both smooth and controllable, significantly improving the model's generalization ability and training stability in real imbalanced scenarios.
[0101] The CIoU Loss regression is an improved version of the previous L1, L2, IoU and GIoU loss functions. CIoU adds a penalty term for aspect ratio, which can better distinguish the error in different cases when the center point of the predicted bounding box and the ground truth bounding box coincide, and has scale invariance.
[0102]
[0103] in, Used to measure the consistency of the relative proportions of two rectangles. These are weighting coefficients:
[0104]
[0105]
[0106] in, and This indicates the center point of the two rectangles. This represents the Euclidean distance between two rectangles. This represents the distance between the diagonals of the enclosing regions of the two rectangles.
[0107] DFL Loss (Regression Loss)
[0108]
[0109] in, The cross-entropy loss is the difference between the true and predicted values on the left. The cross-entropy loss is the difference between the true and predicted values on the right.
[0110] Accordingly, the total loss is:
[0111]
[0112] in, , This is the balance coefficient.
[0113] In some embodiments, an experimental platform was established to verify the effectiveness of the proposed algorithm. Specifically, the model running environment of this experimental platform included an Intel Xeon Platinum 8255C processor, 314 GB of memory, an NVIDIA Tesla V100 32 GB graphics card, and CentOS 8.5.2 (64-bit) operating system. The deep neural network was built based on the PyTorch framework, with an input image size of [640, 640], and a multi-scale training strategy was adopted. The batch size was set to 64, the training lasted for 200 epochs, the SGD optimizer was used, the initial learning rate was 0.01, and a cosine decay strategy was combined for optimization.
[0114] In some embodiments, to comprehensively evaluate the detection performance of the model, this experiment selected four metrics: F1-Score, mean average precision (mAP), number of parameters (params), and gross computational cost (GFLOPs). The F1-Score combines precision and recall to measure the overall performance and stability of the model. Mean precision (AP) is calculated by covering the area under the precision-recall curve, while mAP is the average of AP across all classes. The number of parameters reflects the complexity of the model, and gross computational cost measures the computational complexity of the model. The calculation process of these metrics will be described in detail below.
[0115]
[0116] TP, FP, and FN represent the number of correctly predicted, misjudged, and missed positive samples, respectively.
[0117] In other words, after validating each version of the random material identification model through the validation set, the random material identification model of each version can be comprehensively evaluated based on the above-mentioned indicators, so as to determine the best-performing random material identification model from each version as the completed random material identification model.
[0118] Based on the network structure of the disordered material identification model in the previous embodiments, this application proposes a deep learning-based disordered material identification method.
[0119] The deep learning-based random material identification method provided in this application can be applied to electronic devices such as mobile phones, tablets, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not impose any restrictions on the specific type of electronic device.
[0120] To illustrate the technical solutions proposed in this application, the following description will use an electronic device as the execution subject to illustrate various embodiments.
[0121] Figure 2 A schematic flowchart of the deep learning-based random material identification method provided in this application is shown. The deep learning-based random material identification method includes:
[0122] Step 210: The electronic device extracts features from the image to be identified based on the backbone network of the pre-trained random material recognition model.
[0123] Step 220: The electronic device fuses image features based on the neck network of the random material identification model to obtain target fused features.
[0124] Step 230: The electronic device uses the recognition network based on the random material recognition model to recognize the target fusion features and obtain the recognition result of the random material in the image to be recognized.
[0125] The neck network includes the MGCA module, which is used to extract global contextual information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism.
[0126] In this embodiment, the recognition process based on the pre-trained random material identification model is as follows: First, the backbone network extracts features from the image to be identified, including the street scene, to obtain multi-level image features; then, the neck network effectively fuses the features of each layer to form a target fusion feature containing rich discriminative information; finally, the recognition network analyzes the fusion feature and outputs the recognition result, providing a corresponding prediction when random material targets are present. To improve the ability to identify large-scale, structured random materials, the model introduces an MGCA module in the neck network. By performing global modeling in the width and height dimensions, the model can explicitly perceive the overall spatial distribution characteristics of random materials such as building materials piled in strips along the street and continuously scattered garbage, thereby making up for the deficiency of traditional local feature extraction methods in perceiving global structural information. Meanwhile, the MGCA module uses a dynamic attention mechanism to adaptively adjust the feature response intensity based on the contextual semantic information of the input image, focusing on enhancing the feature representation of real illegally dumped areas and effectively suppressing interference from normal objects in scenes such as sidewalks, green belts, or shop entrances. This reduces the false judgment rate and significantly improves the accuracy and robustness of randomly dumped material recognition in complex backgrounds, meeting the application requirements of high-precision and high-reliability recognition in actual urban management scenarios.
[0127] In some embodiments, based on the specific structure of the aforementioned MGCA module, the electronic device may perform the following operations for the first input feature:
[0128] Step A1: The electronic device performs a segmentation operation on the first input feature through the segmentation layer to obtain G groups of segmentation features.
[0129] The first input feature is typically a multi-channel feature map output by the backbone network, for example, with C=256 channels. The segmentation layer divides the first input feature into G groups of segmentation features according to the channel dimension. For example, when G=8, the number of channels corresponding to each group of segmentation features is 256 / 8=2. In this way, different channel subsets can be used for subsequent modeling without changing the feature space resolution, thereby reducing the computational complexity of a single group while retaining the ability to express fine-grained features of materials with different materials and shapes (such as metal pipes, wood boards, plastic strips, etc.).
[0130] Step A2: For each group of segmentation features, the electronic device performs feature extraction and fusion operations on the segmentation features in the height direction through the first branch; and performs feature extraction and fusion operations on the segmentation features in the width direction through the second branch.
[0131] The first branch models the segmentation features in the height direction, and the second branch models the segmentation features in the width direction. This dual-branch structure captures the structural features of randomly piled materials in both the longitudinal aggregation and lateral extension directions. For example, for slender piles of materials such as pipes and wooden strips scattered laterally along a sidewalk, the width branch effectively detects their continuous extension characteristics; while for materials such as boards and bagged garbage stacked longitudinally against a corner, the height branch helps capture their vertical aggregation characteristics, thereby improving the detection capability for randomly piled materials with strong directionality and irregular shapes.
[0132] Step A3: The electronic device performs the first activation operation on the first branch output and the second branch output corresponding to each group of segmentation features through the activation layer, and obtains the height direction weight and width direction weight corresponding to each group of segmentation features respectively.
[0133] The activation operation maps the extracted directional features to learnable weight coefficients, enabling the model to adaptively adjust the importance of different directional features according to the current scene. For example, in a street scene with a large number of horizontally stacked building materials, the width direction weight can be automatically enhanced; while in a scene where vertically stacked clutter is the main feature, the height direction weight accounts for a larger proportion, thus achieving dynamic adaptation to different stacking patterns.
[0134] Step A4: The electronic device fuses the height and width weights corresponding to each group of segmentation features with the first input features based on residual propagation through the first fusion layer to obtain the corresponding first output features.
[0135] By weighting the first input features based on directional weights, the electronic device can enhance the response intensity of truly illegally dumped areas (such as the edges of disorderly stacked waste or isolated scattered objects) while preserving the semantic information of the original features, and suppress background interference information such as road texture, shadows, and vegetation. Through this residual fusion method, the stability of feature representation can be guaranteed, and the model's recognition accuracy and robustness for randomly dumped materials can be improved.
[0136] In this embodiment, the electronic device can significantly improve the recognition effect of randomly piled materials while ensuring computational efficiency: First, by grouping and segmenting along the channel dimension, the model can reduce the computational complexity of a single group while retaining the ability to represent materials of different materials and shapes with fine granularity; Second, by extracting and fusing features in both the height and width directions, the structural features of randomly piled materials in the longitudinal aggregation and lateral extension directions are explicitly modeled, effectively enhancing the perception ability of long, thin strips and strip-shaped piled materials; Third, by adaptively generating directional weights, the model can dynamically adjust the importance of spatial directional features according to different urban scenarios, reducing false detections and false negatives; Finally, by residual weighted fusion, while maintaining the stable transmission of the original semantic information, the feature response of the illegally piled area is strengthened, thereby improving the overall recognition accuracy, robustness, and generalization ability of the model for randomly piled materials in complex backgrounds.
[0137] In some embodiments, based on the branching structure of the first and second branches described above, step A2 specifically includes the following for each group of segmentation features:
[0138] Step A21: The electronic device performs global average pooling and global max pooling operations on the segmentation features in corresponding directions through a first global average pooling layer and a global max pooling layer, respectively, to obtain average pooling features and max pooling features. Through a convolutional structure, the average pooling features and max pooling features are sequentially subjected to a first convolution operation, a batch normalization operation, and a second activation operation, respectively, to obtain two convolutional features. The two convolutional features are then concatenated through a first concatenation layer to obtain the output in the corresponding direction. Specifically, for the first branch, the corresponding direction is the height direction; for the second branch, the corresponding direction is the width direction.
[0139] After each set of segmentation features enters a branch, pooling operations are first performed in the "corresponding direction" using a first global average pooling layer and a global max pooling layer, respectively, to obtain average pooled features and max pooled features. Here, "corresponding direction" refers to the spatial dimension modeled by the branch: when a segmentation feature enters the first branch, the corresponding direction is the height direction; when a segmentation feature enters the second branch, the corresponding direction is the width direction. By performing global pooling along a single direction, spatial information in that direction can be aggregated into a compact directional description, thereby capturing the overall distribution and extension trend of randomly piled materials in that direction. For example, pooling along the width direction is more conducive to expressing the characteristics of slender materials such as pipes and wood strips that are "scattered laterally"; while pooling along the height direction is more conducive to expressing the structural characteristics of "vertically stacked and aggregated" materials such as boards and bagged waste.
[0140] It should be noted that average pooling focuses on reflecting the overall response level in that direction, making it more effective at characterizing weak signals in low-contrast, scattered regions; while max pooling focuses on preserving significant response points in that direction, making it more effective at highlighting stacked edges, sharp contours, or locally high-response targets. Therefore, the two types of pooling outputs are complementary in their representation.
[0141] Subsequently, feature transformations are performed on the average pooling features and max pooling features using convolutional structures. Specifically, a first convolution operation, a batch normalization operation, and a second activation operation are executed sequentially to obtain two convolutional features. The first convolution is used to perform inter-channel information interaction and re-encoding on the directional description after pooling; batch normalization is used to stabilize the feature distribution and improve training convergence stability; and the second activation is used to introduce non-linear expressive power, making the convolutional features better able to distinguish between "real stacked targets" and "background noise."
[0142] Finally, the two convolutional features are concatenated through the first concatenation layer to obtain the output features in the corresponding directions. The concatenation operation can preserve the directional features of the "overall trend" (from the average pooling operation) and the "significant response" (from the max pooling operation) without losing information, providing a more sufficient basis for subsequent activation to generate directional weights, thereby improving the reliability and interpretability of attention weights.
[0143] In this embodiment, by introducing global average pooling and global max pooling in the height or width directions respectively, and then performing convolution transformation on the outputs of the two before splicing and fusing them, the directional complementary features of "global distribution trend" and "local significant response" can be obtained simultaneously. This allows for a more accurate characterization of the structural regularity of randomly piled materials in lateral extension or vertical aggregation, enhancing the perception ability of slender strips, scattered or stacked materials, and reducing the risk of false detection caused by textures, shadows, etc. in complex backgrounds, thereby improving the overall accuracy and robustness of model recognition.
[0144] In some embodiments, see Figure 3 , Figure 3 The diagram shows the network structure of the MGCA module, focusing on the first input feature of the MGCA module. The features are divided into G groups based on the number of channels, with each group containing C / G channels. Here, B is the batch size, C is the number of channels, and H and W are the height and width of the feature, respectively. Each group of segmentation features is represented as follows:
[0145]
[0146] For each set of segmentation features, global average pooling and global max pooling operations are performed in the height and width directions, respectively, through two branches:
[0147]
[0148]
[0149]
[0150]
[0151] For each pooled feature obtained, a shared convolutional structure is applied for feature processing. This shared convolutional layer consists of two 1×1 convolutional layers, a batch normalization layer, and a ReLU activation function, used to reduce and restore channel dimensions. Therefore, four convolutional features can be obtained based on the convolutional structure in two directions.
[0152]
[0153]
[0154]
[0155]
[0156] The convolutional features corresponding to each branch are concatenated and an attention weight in the height and width directions are generated by applying a sigmoid activation function:
[0157]
[0158]
[0159] Where σ represents the Sigmoid activation function.
[0160] Finally, the input feature maps are weighted according to the attention weights to obtain the output feature maps:
[0161]
[0162] Among them, attention weight and It will expand in both the height and width directions to match the size of the input feature map.
[0163] In some embodiments, the C3k2 module, by lightweighting and reorganizing the traditional C3 structure, effectively reduces the computational complexity and parameter size of the model while ensuring feature representation capabilities. It achieves efficient extraction of multi-scale features through more compact convolutional combinations, which is beneficial to improving feature reuse rate while maintaining network depth and receptive field. At the same time, the C3k2 structure is more direct in information transmission path, which helps to alleviate gradient vanishing and improve training stability. This allows the model to more fully represent targets such as piled-up materials in complex urban scenarios, balancing recognition accuracy and inference efficiency, and is suitable for deployment on edge devices with limited computing power.
[0164] The C3k2-ASL module, an improvement on C3k2 based on ASL Block, not only possesses the advantages of C3k2, but ASLBlock also abandons cross-scale fusion or deformation modeling with high parameter counts. Instead, it adopts a three-in-one strategy of "direction-aware strip attention + channel-selective modulation + dynamic residual balancing". This significantly enhances the sensitivity and robustness to small, fuzzy, and low-contrast randomly packed material regions without increasing inference latency.
[0165] Based on the specific structure of the aforementioned ASL Block, the electronic device performs the following operations on the second input feature of the input ASL Block:
[0166] Step B1: The electronic device performs spatial structural modeling and weighted fusion of the second input features through the SSA submodule to obtain the corresponding spatial fusion features.
[0167] Spatial orientation primarily refers to the height and width directions. The SSA submodule models the long-range spatial dependencies of features along the height and width directions, enabling the model to explicitly perceive the spatial arrangement and distribution of randomly piled materials, such as laterally extending strips of material or vertically stacked areas of miscellaneous items. Through a weighted mechanism based on orientation perception, the SSA submodule can highlight stacking areas with significant spatial structure while suppressing ineffective responses from background areas.
[0168] Step B2: The electronic device performs a channel attention mechanism on the spatial fusion features through the RCA submodule, and fuses the obtained channel weights with the spatial fusion features to obtain the channel fusion features.
[0169] The RCA submodule is used to model the differences in importance of different channel features, enabling the model to adaptively emphasize channel features that are semantically related to the randomized material, such as those related to the material properties of metal, wood, or plastic, while weakening channel responses related to background texture, shadows, or noise, thereby improving the discriminativeness of feature representation.
[0170] Step B3: The electronic device fuses the spatial fusion features and the channel fusion features through the spatial-channel fusion layer to obtain the spatial-channel fusion features.
[0171] The space-channel fusion layer jointly models spatial structure information and channel semantic information, enabling features to have both clear spatial positioning capabilities and rich semantic discrimination capabilities, which helps to more accurately distinguish between randomly piled materials and normal objects in complex urban scenarios.
[0172] Step B4: The electronic device splices the spatial-channel fusion features processed by the first scaling factor with the second input features based on the second splicing layer to obtain the first-stage features.
[0173] By introducing a scaling factor to adjust the amplitude of the fused features, the enhanced attention features can be residually concatenated with the original input features while ensuring training stability. This allows for the introduction of more discriminative enhanced features while preserving the original semantic information.
[0174] Step B5: The electronic device performs batch normalization and MPL operations on the first-stage features based on the feature extraction structure to obtain the second-stage features.
[0175] Batch normalization is used to stabilize feature distribution and accelerate model convergence, while MPL operation further enhances the expressive power of features through nonlinear mapping, enabling features to have stronger discriminative power while maintaining stability.
[0176] Step B6: The electronic device concatenates the second-stage features processed by the second scaling factor with the first-stage features based on the third concatenation layer to obtain the corresponding second output features.
[0177] Multi-stage splicing can fully integrate feature information from different levels and semantic depths, enhancing high-level discrimination capabilities while preserving low-level detail information, which is beneficial for improving the model's detection performance on multi-scale and morphologically diverse randomized materials.
[0178] In this embodiment, the model sequentially completes spatial structure modeling, channel semantic enhancement, spatial-channel joint fusion, and multi-stage feature residual splicing. While ensuring training stability and complete information transmission, it significantly improves the discriminative power and expressive richness of features. This process not only strengthens the salient features of randomly piled materials in terms of spatial distribution and structural morphology but also enhances the model's ability to distinguish semantic information of different materials, thereby effectively improving the model's accuracy, robustness, and generalization performance in identifying randomly piled materials in complex urban scenarios.
[0179] In some embodiments, based on the specific structure of the SSA submodule, the electronic device may perform the following steps:
[0180] Step B11: The electronic device performs batch normalization on the second input feature through the BN layer to obtain the batch normalization result.
[0181] Electronic devices can effectively reduce distribution differences between different samples and channels by normalizing the feature distribution, thus mitigating the vanishing or exploding gradient problem and improving the stability and convergence speed of the model training process. Simultaneously, this operation provides a more stable and standardized input feature base for subsequent directional convolution feature extraction.
[0182] Step B12: The electronic device performs a separable depthwise convolution operation in the width direction on the batch normalized results through a width-direction separable depthwise convolutional fusion layer, and weights and fuses the obtained convolution results through learnable fusion weights in the width direction to obtain width-direction fused features.
[0183] Electronic devices effectively capture the structural features of randomly piled materials in the lateral direction by constructing elongated receptive fields along the width, such as pipes, wooden strips, or linearly stacked debris scattered along a road. Simultaneously, learnable fusion weights are introduced, enabling the model to dynamically adjust the importance of width-direction features according to different scenarios.
[0184] Step B13: The electronic device performs a height-separable depth convolution operation on the batch normalized results through a height-separable depth convolution fusion layer, and weights and fuses the obtained convolution results through height-learnable fusion weights to obtain height-fused features.
[0185] Electronic devices can effectively characterize the structural characteristics of randomly piled materials in vertical stacking or aggregation scenarios by modeling long-range dependencies of features along the height direction, such as boards stacked against a wall or piles of bagged garbage, thereby enhancing the model's ability to perceive salient targets in the vertical structure.
[0186] Step B14: The electronic device stitches the width-direction fusion features and the height-direction fusion features together through the fourth stitching layer to obtain spatial fusion features.
[0187] By splicing and fusing features from two orthogonal directions, information on lateral extension and vertical aggregation can be retained simultaneously in the same feature representation, giving spatial fusion features a more complete and comprehensive ability to express spatial structure, and providing more sufficient feature support for subsequent identification and discrimination.
[0188] In this embodiment, the model can model the long-range spatial structural features of randomly piled materials from both the width and height directions, based on a stable feature distribution. Through directional adaptive weighting and splicing fusion, multi-directional spatial information is organically integrated into a unified spatial fusion feature. This process effectively enhances the perception capability of randomly piled materials in different shapes, such as long strips, ribbons, and vertical stacks, while suppressing interference from complex backgrounds, thereby improving the overall recognition accuracy and robustness of the model in complex urban scenarios.
[0189] In some embodiments, Figure 4 A schematic diagram of the C3k2-ASL module and the ASL Block is shown. The second input feature is for input to the ASL Block. ASL Block enhances the directional sensitivity and discriminative ability of features by fusing a direction-aware strip attention mechanism with a dynamic residual control strategy. The specific implementation process is as follows:
[0190] First, to improve training stability, the second input feature is batch normalized to obtain the batch normalization result:
[0191]
[0192] Subsequently, to further explicitly model the spatial directional structure, a dual-path strip convolution branch is introduced to capture long-range dependencies in the width and height directions, respectively. Each branch employs depthwise separable convolution to significantly reduce computational overhead while maintaining the receptive field.
[0193]
[0194]
[0195] in, It is a learnable kernel.
[0196] Considering that the importance of width and height structures may change dynamically in different scenarios, learnable fusion weights are further introduced. (Initialized to 1) Perform adaptive combination:
[0197]
[0198] Building upon this, to enhance semantically relevant channels and suppress background interference, a lightweight channel attention mechanism is applied to the spatially enhanced output:
[0199]
[0200]
[0201]
[0202] Where: W1 and W2 respectively represent Conv2d-based... The linear mapping implemented using 1×1 convolution based on 2D feature maps is equivalent to performing a linear transformation on the channel dimension at each spatial location. , , , For Sigmoid, ElementWiseMul (element-wise multiplication) means multiplying the weighted features element-wise with the input features.
[0203] It is worth noting that the final space-channel joint output is constructed using residuals:
[0204]
[0205] This design preserves the original spatial structure information and only overlays channel modulation terms, effectively avoiding the problem of key details being over-covered.
[0206] Next, to improve training robustness and control the information flow intensity, a first residual connection is constructed using LayerScale and DropPath:
[0207]
[0208] in, Learnable scaling vector (initial value) ), and broadcast to the shape during the operation. .
[0209] Finally, to further enhance the nonlinear expressive power, for Proceed to the second stage of feature refinement:
[0210]
[0211] MLP is defined as:
[0212]
[0213] In some embodiments, the above embodiments are all based on the trained random material recognition model. Through the synergistic optimization of the model structure and training strategy, the recognition accuracy, robustness and practicality of random materials in complex urban scenarios are effectively improved.
[0214] First, a C3k2-ASL module is introduced into the model's backbone network. The ASL Block, through its strip-structure modeling and lightweight design, explicitly models long-range structural dependencies in the width and height directions with low computational overhead. Compared to traditional convolutions, which rely solely on local receptive fields, the ASL Block can more fully capture the overall spatial arrangement and extension of randomly piled materials, such as pipes and wooden strips scattered laterally along roads, and boards and bagged garbage stacked vertically at corners or near fences. This structure significantly enhances the model's ability to perceive key features of elongated, scattered, and low-contrast randomly piled materials, enabling the model to maintain stable recognition performance even in complex backgrounds and with irregular targets. Simultaneously, the introduction of the C3k2 structure reduces parameter size and computational complexity while maintaining feature representation capabilities, facilitating efficient deployment of the model on edge devices or in environments with limited computing power.
[0215] Secondly, to further enhance the model's ability to understand the overall spatial distribution pattern of haphazardly piled materials, an MGCA module is introduced into the neck network. This module models global contextual information in both the width and height dimensions and combines it with a dynamic attention mechanism to achieve adaptive feature enhancement for key stacking areas. Compared to attention methods that only focus on local areas or a single dimension, the MGCA module can simultaneously integrate global structural information from multiple directions and scales. This allows the model to not only focus on local salient features but also understand the distribution pattern of haphazardly piled materials in the entire scene. This enables the model to effectively distinguish genuinely illegally piled materials from normally placed objects in complex backgrounds such as shop entrances, sidewalks, and green belts, significantly reducing the false detection rate and improving discrimination robustness.
[0216] Furthermore, addressing the common problem of imbalanced class distribution in the detection of randomly piled materials, this application improves the binary cross-entropy loss function based on a constrained logarithmic reweighting modulation mechanism. This loss function is designed to be scale-invariant, distribution-adaptive, and degradation-consistent: when the training data distribution is relatively balanced, the loss function automatically degenerates into a uniformly weighted form, avoiding the introduction of unnecessary bias; when the data exhibits a significant long-tail distribution, an adaptive reweighting mechanism enhances the learning ability for classes with fewer samples, while maintaining the smoothness and controllability of the gradient response. This improvement effectively alleviates the overfitting or underlearning problems that easily occur in extremely imbalanced scenarios, significantly improving the stability of the model training process and its generalization performance in real-world urban management scenarios.
[0217] In other words, by introducing a lightweight long-range modeling module with orientation awareness at the network structure level, introducing a multi-dimensional global attention mechanism at the feature fusion level, and designing an improved loss function adapted to imbalanced data distribution at the training level, the electronic device's proposed solution outperforms existing technologies in terms of recognition accuracy, robustness, computational efficiency, and engineering deployability, and can better meet the application needs of intelligent supervision of illegally dumped materials in actual cities.
[0218] Overall, through multi-dimensional network structure improvements, the model has enhanced recognition accuracy, robustness, and efficiency in complex urban environments, making it particularly suitable for high-precision, real-time target detection of randomly piled materials.
[0219] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0220] Corresponding to the deep learning-based method for identifying randomly piled materials in the above embodiments, Figure 5 The diagram shows a structural block diagram of the disordered material identification device 5 provided in the embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.
[0221] Reference Figure 5 The disorderly pile material identification device 5 includes:
[0222] Extraction module 51 extracts features from the image to be identified based on the backbone network of the pre-trained random material identification model; the image to be identified includes urban public spaces.
[0223] Fusion module 52 fuses image features based on the neck network of the random material identification model to obtain target fused features;
[0224] The identification module 53 uses an identification network based on the random material identification model to identify the target fusion features and obtain the identification result of the random material in the image to be identified.
[0225] The neck network includes the MGCA module, which is used to extract global contextual information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism.
[0226] Optionally, the MGCA module includes a segmentation layer, a first branch, a second branch, an activation layer, and a first fusion layer; the fusion module 52 includes a fusion unit, which is used for:
[0227] The segmentation layer performs a segmentation operation on the first input feature to obtain G sets of segmentation features;
[0228] For each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; feature extraction and fusion operations are performed on the segmentation features in the width direction through the second branch;
[0229] By performing the first activation operation on the first branch output and the second branch output corresponding to each group of segmentation features through the activation layer, the height direction weight and width direction weight corresponding to each group of segmentation features are obtained respectively.
[0230] The first fusion layer fuses the height and width weights of each group of segmentation features with the first input features based on residual propagation to obtain the corresponding first output features.
[0231] Optionally, the first branch and the second branch have similar branching structures; the branching structure includes a first global average pooling layer, a global max pooling layer, a convolutional structure, and a first concatenation layer; for each group of segmentation features, the fusion unit is specifically used for:
[0232] Based on the branching structure, the segmentation features for each group are as follows:
[0233] The first global average pooling layer and the global max pooling layer perform global average pooling and global max pooling operations on the segmentation features in the corresponding directions, respectively, to obtain average pooling features and max pooling features. Through a convolutional structure, the average pooling features and max pooling features are respectively subjected to the first convolution operation, batch normalization operation, and second activation operation, respectively, to obtain two convolutional features. The two convolutional features are concatenated through the first concatenation layer to obtain the output in the corresponding direction.
[0234] Specifically, for the first branch, the corresponding direction is the height direction; for the second branch, the corresponding direction is the width direction.
[0235] Optionally, the backbone network includes a C3k2-ASL module, which is an improvement on C3k2 based on the ASL Block. The ASL Block includes an SSA submodule, an RCA submodule, a spatial-channel joint layer, a second splicing layer, a feature extraction structure, and a third splicing layer; the extraction module 51 includes an extraction unit, which is used for:
[0236] The SSA submodule performs spatial structural modeling and weighted fusion on the second input feature to obtain the corresponding spatial fusion feature.
[0237] The channel attention mechanism is executed on the spatial fusion features through the RCA submodule, and the obtained channel weights are fused with the spatial fusion features to obtain the channel fusion features.
[0238] Spatial-channel fusion features are obtained by fusing spatial fusion features and channel fusion features through a spatial-channel fusion layer;
[0239] Based on the second stitching layer, the spatial-channel fusion features processed by the first scaling factor are stitched together with the second input features to obtain the first-stage features;
[0240] Based on the feature extraction structure, batch normalization and MPL operations are performed on the first-stage features to obtain the second-stage features.
[0241] The second output feature is obtained by concatenating the second-stage features processed by the second scaling factor with the first-stage features based on the third concatenation layer.
[0242] Optionally, the SSA submodule includes a BN layer, parallel width-direction separable depthwise convolutional fusion layers, height-direction separable convolutional fusion layers, and a fourth concatenation layer. The extraction unit is specifically used for:
[0243] Batch normalization is performed on the second input feature by the BN layer to obtain the batch normalization result;
[0244] A width-direction separable depthwise convolutional fusion layer is used to perform width-direction separable depthwise convolutional operations on the batch normalized results, and the resulting convolutional results are weighted and fused using width-direction learnable fusion weights to obtain width-direction fused features.
[0245] The batch normalization results are subjected to a high-direction separable deep convolutional fusion layer, and the resulting convolutional results are weighted and fused using high-direction learnable fusion weights to obtain high-direction fused features.
[0246] The spatial fusion feature is obtained by stitching the width-direction fusion feature and the height-direction fusion feature together through the fourth stitching layer.
[0247] Optionally, the RCA submodule includes a second global average pooling layer, a channel attention mechanism layer, and a second fusion layer. The RCA submodule performs the channel attention mechanism on the spatially fused features. The extraction unit is specifically used for:
[0248] The spatial fusion features are subjected to global average pooling operation through the second global average pooling layer to obtain the pooling result;
[0249] Based on the channel attention mechanism layer, the pooling results are sequentially subjected to the second convolution operation, the third activation operation, the third convolution operation, and the fourth activation operation to obtain the channel weights;
[0250] In the second fusion layer, spatial fusion features are weighted and fused based on channel weights to obtain channel fusion features.
[0251] Optionally, the loss function used to train the random material identification model includes the CLRW-BCE Loss; the formula for the CLRW-BCE Loss is as follows:
[0252]
[0253]
[0254]
[0255]
[0256] in, This represents the constrained log-weighted modulation binary cross-entropy loss CLRW-BCE Loss; Represents the weight; where, This indicates the sensitivity to several terms. Indicates the number of samples raised to a power; Indicates the inverse frequency modulation intensity ( Degenerates into log-weighted only). This represents the total number of samples in the training set; Indicates the total number of categories; Indicates category frequency; Indicates the highest frequency of the category; L BCE For binary classification, cross-entropy loss, n The number of image samples for all urban facility anomalies. For the first i The true category of each image sample For the first i Predicted category for each image sample.
[0257] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0258] Figure 6 This is a schematic diagram of the physical layer structure of an electronic device provided in an embodiment of this application. For example... Figure 6 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 6 The diagram shows only one processor, memory 61, and a computer program 62 stored in memory 61 that can run on at least one processor 60. When processor 60 executes computer program 62, it implements the steps in any of the above embodiments of the deep learning-based random material identification method. Figure 2 Steps 210-230 are shown.
[0259] The processor 60 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0260] In some embodiments, memory 61 may be an internal storage unit of electronic device 6, such as a hard disk or memory of electronic device 6. In other embodiments, memory 61 may also be an external storage device of electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 6.
[0261] Furthermore, memory 61 may include both internal storage units and external storage devices of electronic device 6. Memory 61 is used to store operating devices, application programs, bootloaders, data, and other programs, such as program code for computer programs. Memory 61 can also be used to temporarily store data that has been output or will be output.
[0262] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0263] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0264] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0265] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.
[0266] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0267] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0268] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0269] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0270] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for identifying randomly piled materials based on deep learning, characterized in that, include: The backbone network based on the pre-trained random material identification model extracts features from the image to be identified, thereby obtaining image features; the image to be identified includes urban public spaces. The image features are fused based on the neck network of the disordered material identification model to obtain the target fused features; The recognition network based on the disordered material recognition model identifies the target fusion features to obtain the recognition result of disordered material in the image to be identified. The neck network includes an MGCA module, which is used to extract global context information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism. The MGCA module includes a segmentation layer, a first branch, a second branch, an activation layer, and a first fusion layer; for the first input feature input to the MGCA module: The segmentation layer performs a segmentation operation on the first input feature to obtain G sets of segmentation features; For each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; feature extraction and fusion operations are performed on the segmentation features in the width direction through the second branch; The activation layer performs a first activation operation on the first branch output and the second branch output corresponding to each group of segmentation features to obtain the height direction weight and width direction weight corresponding to each group of segmentation features respectively. The first fusion layer fuses the height and width weights corresponding to each group of segmentation features with the first input features based on residual propagation to obtain the corresponding first output features. The backbone network includes a C3k2-ASL module, which is an improvement on C3k2 based on the ASL Block. The ASL Block includes an SSA submodule, an RCA submodule, a spatial-channel joint layer, a second concatenation layer, a feature extraction structure, and a third concatenation layer. For the second input feature input to the ASL Block: The SSA submodule performs spatial structural modeling and weighted fusion on the second input feature to obtain the corresponding spatial fusion feature. The RCA submodule executes a channel attention mechanism on the spatial fusion feature to fuse the obtained channel weights with the spatial fusion feature to obtain the channel fusion feature. The spatial fusion feature is obtained by fusing the spatial fusion feature and the channel fusion feature through a spatial-channel fusion layer; Based on the second stitching layer, the spatial-channel fusion features processed by the first scaling factor are stitched together with the second input features to obtain a first-stage feature; Based on the feature extraction structure, batch normalization and MPL operations are performed on the first-stage features to obtain the second-stage features; Based on the third splicing layer, the second-stage features processed by the second scaling factor are spliced with the first-stage features to obtain the corresponding second output features.
2. The method for identifying randomly piled materials as described in claim 1, characterized in that, The first branch and the second branch have similar branch structures; the branch structure includes a first global average pooling layer, a global max pooling layer, a convolutional structure, and a first concatenation layer; for each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; The second branch performs feature extraction and fusion operations on the segmented features in the width direction, including: Based on the branching structure, the segmentation features for each group are as follows: The first global average pooling layer and the global max pooling layer perform global average pooling and global max pooling operations on the segmentation features in corresponding directions, respectively, to obtain average pooling features and max pooling features. Through the convolutional structure, the average pooling features and max pooling features are respectively subjected to a first convolution operation, a batch normalization operation, and a second activation operation, respectively, to obtain two convolutional features. The two convolutional features are concatenated through the first concatenation layer to obtain the output in the corresponding direction. Specifically, for the first branch, the corresponding direction is the height direction; for the second branch, the corresponding direction is the width direction.
3. The method for identifying randomly piled materials as described in claim 1, characterized in that, The SSA submodule includes a Batch Normalization (BN) layer, parallel width-direction separable depthwise convolutional fusion layers, height-direction separable depthwise convolutional fusion layers, and a fourth concatenation layer. The SSA submodule performs spatial structural modeling and weighted fusion on the second input features to obtain the corresponding spatial fusion features, including: The batch normalization operation is performed on the second input feature through the BN layer to obtain the batch normalization result; A width-direction separable depth convolutional fusion layer is used to perform a width-direction separable depth convolution operation on the batch normalization result, and the obtained convolution result is weighted and fused using a width-direction learnable fusion weight to obtain the width-direction fused feature. The batch normalization result is subjected to a height-separable depth convolutional fusion layer, and the resulting convolutional result is weighted and fused using height-direction learnable fusion weights to obtain height-direction fused features. The spatial fusion feature is obtained by stitching the width-direction fusion feature and the height-direction fusion feature together through the fourth stitching layer.
4. The method for identifying randomly piled materials as described in claim 1, characterized in that, The RCA submodule includes a second global average pooling layer, a channel attention mechanism layer, and a second fusion layer. The RCA submodule executes the channel attention mechanism on the spatial fusion features, fusing the obtained channel weights with the spatial fusion features to obtain the channel fusion features, including: The spatial fusion features are subjected to global average pooling operation through the second global average pooling layer to obtain the pooling result; Based on the channel attention mechanism layer, the pooling result is sequentially subjected to a second convolution operation, a third activation operation, a third convolution operation, and a fourth activation operation to obtain the channel weights; In the second fusion layer, the spatial fusion features are weighted and fused based on the channel weights to obtain the channel fusion features.
5. The method for identifying randomly piled materials as described in claim 1 or 2, characterized in that, The loss function used to train the disordered material identification model includes the CLRW-BCE Loss; the formula for the CLRW-BCE Loss is as follows: Among them, the This represents the constrained log-weighted modulation binary cross-entropy loss CLRW-BCE Loss; Represents the weight; where, This indicates the sensitivity to several terms. Indicates the inverse frequency modulation intensity, when When the value is 0, it degenerates into a log-weighted system only; Indicates the total number of categories; Indicates category frequency; Indicates the highest frequency of the category; L BCE For binary classification, cross-entropy loss, n The number of image samples for all randomly piled materials. For the first i The true category of each image sample For the first i Predicted category for each image sample.
6. A device for identifying randomly piled materials, characterized in that, include: The extraction module is used to extract features from the image to be identified based on the backbone network of a pre-trained random material identification model, thereby obtaining image features; the image to be identified includes urban public spaces. The fusion module is used to fuse the image features based on the neck network of the disordered material identification model to obtain the target fused features; The identification module is used to identify the target fusion features based on the identification network of the disordered material identification model, and obtain the identification result of the disordered material in the image to be identified; The neck network includes an MGCA module, which is used to extract global context information of the corresponding first input features in the width and height dimensions, and enhance the feature response of the stacked region through a dynamic attention mechanism. The MGCA module includes a segmentation layer, a first branch, a second branch, an activation layer, and a first fusion layer; for the first input feature input to the MGCA module: The segmentation layer performs a segmentation operation on the first input feature to obtain G sets of segmentation features; For each group of segmentation features: feature extraction and fusion operations are performed on the segmentation features in the height direction through the first branch; feature extraction and fusion operations are performed on the segmentation features in the width direction through the second branch; The activation layer performs a first activation operation on the first branch output and the second branch output corresponding to each group of segmentation features to obtain the height direction weight and width direction weight corresponding to each group of segmentation features respectively. The first fusion layer fuses the height and width weights corresponding to each group of segmentation features with the first input features based on residual propagation to obtain the corresponding first output features. The backbone network includes a C3k2-ASL module, which is an improvement on C3k2 based on the ASL Block. The ASL Block includes an SSA submodule, an RCA submodule, a spatial-channel joint layer, a second splicing layer, a feature extraction structure, and a third splicing layer. The extraction module includes an extraction unit, which is used for: For the second input feature input to the ASL Block, the SSA submodule performs spatial structural modeling and weighted fusion on the second input feature to obtain the corresponding spatial fusion feature; The RCA submodule executes a channel attention mechanism on the spatial fusion feature to fuse the obtained channel weights with the spatial fusion feature to obtain the channel fusion feature. The spatial fusion feature is obtained by fusing the spatial fusion feature and the channel fusion feature through a spatial-channel fusion layer; Based on the second stitching layer, the spatial-channel fusion features processed by the first scaling factor are stitched together with the second input features to obtain a first-stage feature; Based on the feature extraction structure, batch normalization and MPL operations are performed on the first-stage features to obtain the second-stage features; Based on the third splicing layer, the second-stage features processed by the second scaling factor are spliced with the first-stage features to obtain the corresponding second output features.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the deep learning-based method for identifying randomly piled materials as described in any one of claims 1 to 5.
8. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the deep learning-based method for identifying randomly piled materials as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Pedestrian and vehicle detection method based on improved YOLOv10
CN119625783A
Dynamic risk event identification method and device based on deep learning, electronic equipment and program product
CN120510577A
Road surface scattering detection method and device based on deep learning, electronic equipment and program product
CN121121507A