Automatic image recognition garbage classification whole process implementation method based on AI calculation
Patent Information
- Application Number
- CN202411632048.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-18
AI Technical Summary
The existing garbage recognition system relies on a single image feature for classification, ignoring other physical features of garbage, such as weight and material, resulting in limited classification accuracy. Especially when dealing with garbage with similar shapes but different attributes, the classification results are inaccurate.
Using an automated image recognition method based on AI computing, through multimodal data acquisition (image, weight, spectral data), combining semantic features and detailed feature extraction, attention mechanism enhancement and multi-level feature processing, to realize the automatic classification of the whole process of garbage .
It improves the accuracy and reliability of garbage classification, solves the problems of small target size and inconspicuous characteristics, enhances the positioning ability of garbage at different scales, and provides a more comprehensive garbage feature expression through multimodal data fusion.
Smart Images

Figure CN119478531A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method for realizing the entire process of automated image recognition and garbage classification based on AI calculation. Background Art
[0002] Garbage classification and treatment has become an important part of environmental protection and resource recycling. Traditional garbage classification methods mainly rely on manual identification and processing, which is not only inefficient, but also easily affected by subjective factors, making it difficult to ensure the accuracy and consistency of classification.
[0003] The current garbage identification system mainly relies on a single image feature for classification, ignoring other physical features of the garbage, such as weight, material and other information, resulting in limited classification accuracy. Especially when dealing with garbage of similar shapes but different properties, it is difficult to make accurate judgments based solely on visual features. In addition, the existing garbage classification system faces many challenges when dealing with garbage identification in complex scenarios, such as large changes in target size, severe background interference, and unstable lighting conditions. At the same time, due to the lack of effective feature fusion and optimization mechanisms, the system is unable to fully utilize the complementary information in multimodal data, affecting the robustness and accuracy of classification. Summary of the invention
[0004] The present invention provides a method for realizing the whole process of automated image recognition garbage classification based on AI calculation, which solves the problems of small target size and unclear features and ensures the reliability of classification results.
[0005] In a first aspect, the present invention provides a method for realizing the whole process of automatic image recognition and garbage classification based on AI computing, and the method for realizing the whole process of automatic image recognition and garbage classification based on AI computing includes: Multimodal data collection is performed on the garbage to be identified to obtain image data matrix, weight data vector and spectrum data matrix; Extracting semantic features and detail features from the image data matrix to obtain a fused feature map; Performing channel attention and spatial attention mechanism enhancement on the fused feature map, and performing feature shuffling to obtain an enhanced feature map; Inputting the enhanced feature map into three parallel target detection units to generate candidate regions, and performing overlap calculation and region merging on the candidate regions to obtain garbage location data; Based on the garbage location data, the weight data vector and the spectral data matrix, probability density distribution data of garbage category nodes are calculated; Multi-level feature processing and effective feature screening are performed based on the probability density distribution data of the garbage category nodes to output the target garbage classification result.
[0006] In a second aspect, the present invention provides a device for realizing the whole process of automatic image recognition and garbage classification based on AI computing, and the device for realizing the whole process of automatic image recognition and garbage classification based on AI computing includes: The acquisition module is used to collect multimodal data of the garbage to be identified, and obtain image data matrix, weight data vector and spectrum data matrix; An extraction module, used for extracting semantic features and detail features from the image data matrix to obtain a fused feature map; An enhancement module, used to enhance the fused feature map by channel attention and spatial attention mechanisms, and perform feature shuffling to obtain an enhanced feature map; A detection module, used for inputting the enhanced feature map into three parallel target detection units, generating candidate regions, and performing overlap calculation and region merging on the candidate regions to obtain garbage location data; A calculation module, used for calculating the probability density distribution data of the garbage category nodes based on the garbage location data, the weight data vector and the spectrum data matrix; The output module is used to perform multi-level feature processing and effective feature screening based on the probability density distribution data of the garbage category nodes, and output the target garbage classification results.
[0007] The third aspect of the present invention provides an AI-based full-process automated image recognition and garbage classification implementation device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the AI-based full-process automated image recognition and garbage classification implementation device to execute the above-mentioned AI-based full-process automated image recognition and garbage classification implementation method.
[0008] The fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the above-mentioned method for implementing the entire process of automated image recognition and garbage classification based on AI calculation.
[0009] In the technical solution provided by the present invention, by designing a double-sampling fusion deep network and a multi-level feature processing unit, the semantic features and detail features of garbage are fully extracted and fused, and the problems of small target size and unclear features are solved; a dual-attention shuffling module is used to enhance and reorganize the features, effectively suppressing background interference and enhancing the expression ability of target features; three parallel target detection units and a soft non-maximum suppression algorithm are introduced to accurately locate garbage targets of different scales and reduce the interference of overlapping detection frames; based on a factor graph model, deep fusion of multimodal data such as image, weight and spectrum is achieved, providing a more comprehensive garbage feature expression; a multi-level feature processing unit is constructed, and the most discriminative feature combination is screened out through feature mapping and selection mechanism, reducing feature redundancy; a multi-branch classification network and a weighted voting strategy are adopted to comprehensively consider the prediction results of multiple models and ensure the reliability of the classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0011] Figure 1 A flowchart of a method for implementing the entire process of automated image recognition and garbage classification based on AI computing provided in an embodiment of the present application; Figure 2 A schematic block diagram of the structure of a device for implementing the entire process of automated image recognition and garbage classification based on AI computing provided in an embodiment of the present application; Figure 3 A schematic block diagram of the structure of a device for implementing the entire process of automated image recognition and garbage classification based on AI computing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0013] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change based on actual conditions.
[0014] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0015] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0016] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0017] See also Figure 1 , Figure 1 A flowchart of a method for implementing the entire process of automated image recognition and garbage classification based on AI computing provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method for implementing the entire process of automated image recognition garbage classification based on AI computing provided in an embodiment of the present application includes steps S100 to S600.
[0018] Step S100, performing multimodal data collection on the garbage to be identified to obtain an image data matrix, a weight data vector and a spectrum data matrix; It is understandable that the execution subject of the present invention can be a device for realizing the whole process of automatic image recognition and garbage classification based on AI calculation, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0019] Specifically, a camera is used to collect the original image of the garbage to be identified under natural lighting conditions. In order to effectively extract the color and texture features of the image, the original image is converted to RGB color space to obtain RGB image data, which effectively expresses the color information of the object. The RGB image data is processed by Gaussian filtering to remove the noise in the image and retain the main structural information of the object. Gaussian filtering is an effective image smoothing technology that can reduce the impact of illumination changes and sensor noise on image features and improve the quality of image data. White balance correction and gamma correction are performed on the filtered image data. White balance correction can adjust the color in the image so that it still maintains natural color performance under different lighting conditions and avoids the impact of light color cast on the classification results. Gamma correction is used to adjust the brightness distribution of the image so that the details of the dark and bright parts can be displayed evenly, enhancing the contrast and clarity of the image. Through these two correction operations, corrected image data with balanced color and brightness is obtained. The corrected image data is converted into a fixed-size data matrix, and the image size is set to 224×224 to unify the specifications of the image input. The corrected image data is normalized to eliminate the amplitude changes caused by shooting conditions and object surface differences, making the data more standardized to obtain an image data matrix. The weight value of the garbage to be identified is collected using a weight sensor. The collected weight values are tested for outliers using the 3σ criterion to eliminate extreme outliers caused by measurement errors and other reasons. The 3σ criterion is a statistical method used to determine and exclude outliers in the data to ensure the accuracy and stability of the data. The weight data after outlier detection is normalized to the minimum and maximum value, scaling the weight data to a fixed range to eliminate the influence of the data magnitude and obtain a standardized weight data vector. At the same time, a near-infrared spectrometer is used to collect spectral data of the garbage to be identified. Near-infrared spectral data can reflect the chemical composition of garbage materials and help distinguish garbage with similar materials but different compositions. The original spectral data is subjected to polynomial fitting baseline correction. Since spectral data are usually affected by background noise and instrument drift, baseline correction effectively removes these effects, making the spectral signal smoother and highlighting important absorption peak features. The spectral data after baseline correction is obtained by polynomial fitting baseline correction. The baseline-corrected spectral data is subjected to standard normal transformation and mean centering to obtain a spectral data matrix. The standard normal transformation can remove the amplitude differences in the spectral data caused by sample particle size or other external factors, making the spectral data between different samples comparable. Mean centering adjusts the mean of the data to zero, making the spectral signal more balanced in subsequent analysis, making it easier for the machine learning model to effectively extract and utilize data features.
[0020] Step S200, extracting semantic features and detail features from the image data matrix to obtain a fused feature map; Specifically, the image data matrix is input into the semantic feature extraction network, which contains five convolutional layers to extract high-level semantic information of junk images. In the five convolutional layers of the semantic feature extraction network, the number of convolution kernels from the first to the fifth layers are 64, 128, 256, 512 and 512 respectively, and the size of the convolution kernel is 3×3. By increasing the number of convolution kernels layer by layer, the network gradually captures the high-level features in the image. Each convolution operation uses the ReLU activation function to introduce nonlinearity, so that the network can learn complex mapping relationships. Each convolution layer is connected to a batch normalization layer. The batch normalization operation is used to standardize the features of each layer, reduce internal covariate shift, improve the training efficiency and stability of the network, and obtain a multi-layer semantic feature map. The multi-layer semantic feature map is processed by feature pyramid. Feature pyramid is a multi-scale feature fusion method that can capture feature information of different scales in the image. In pyramid processing, the 1×1 convolution layer is used to unify the number of channels of the feature maps of the third, fourth and fifth layers, and their feature channel numbers are unified to 256. The role of the 1×1 convolution operation is to reduce the number of channels while retaining key information and reducing computational complexity. The deconvolution operation is used to upsample the feature map so that the feature map has the same resolution in the spatial dimension for feature fusion. After this process, the pyramid feature map is obtained. At the same time, the image data matrix is input into the detail feature extraction network, which focuses on extracting detail information in the garbage image, especially low-level features such as edges and textures. The detail feature extraction network contains two convolution layers with 32 and 64 convolution kernels respectively. The size of the convolution kernel is 3×3 and the step size is 1 to ensure that the subtle changes and detail features in the image can be captured finely. The detail feature extraction network is connected to the PReLU activation function after each convolution layer. Compared with ReLU, the PReLU activation function has adaptive parameters and more flexible control of the passage of the negative value part, introducing richer information in the feature extraction process to obtain the detail feature map. The pyramid feature map and the detail feature map are spliced in the channel dimension through the feature adaptive fusion module to obtain a fused feature map. The feature adaptive fusion module contains three branches, of which the first branch is an identity mapping, that is, the input features are directly kept unchanged to ensure that the original information is not lost. The second branch contains two layers of 3×3 convolutional layers in series, which are used to extract local information from the spliced features and enhance the features. The third branch is a dilated convolution layer with a dilated rate of 2. The receptive field of the convolution kernel is expanded through dilated convolution, and a wider range of contextual information is captured without increasing the number of parameters. The feature adaptive fusion module can enhance features at different spatial scales, so that the final fused feature map has stronger expressive power.
[0021] Step S300, performing channel attention and spatial attention mechanism enhancement on the fused feature map, and performing feature shuffling to obtain an enhanced feature map; Specifically, the fused feature map is divided into 8 feature groups according to the channel dimension, and each feature group contains 64 channels. A 128-dimensional feature vector is generated for each feature group through global average pooling and global maximum pooling. Global average pooling and global maximum pooling can effectively capture the overall information and maximum response information in the feature group. The 128-dimensional feature vector is reduced and increased in dimension to generate a more compact channel weight vector, thereby reducing the computational overhead and improving the computational efficiency. The channel weight vector is normalized within the group through the softmax function, so that each channel weight is in the range of 0 to 1, so that the channel weights between different feature groups are at a comparable level. The weight coefficients and the corresponding feature groups are weighted by channel. By weighting each feature channel, the features that play an important role in identifying the garbage category are effectively highlighted, while suppressing noise features or irrelevant features. The weighted feature groups are reorganized in the original order to obtain primary channel enhancement features. The feature response of the primary channel enhancement feature is calculated in the spatial dimension. The mean and standard deviation statistics are calculated for the feature value at each position to capture the spatial variation trend of the feature and characterize the importance of the local area. The mean and standard deviation statistics are concatenated and input into a 3×3 convolution layer to generate a two-dimensional spatial weight matrix to obtain the spatial attention map. The spatial attention map is used to weight the feature map in the spatial dimension. By assigning different weights to features at different positions, the spatial regions that contribute significantly to the classification results are highlighted. Based on the spatial attention map, the primary channel enhancement feature is spatially weighted, and the attention value is multiplied by the feature vector at the corresponding position to obtain the spatial enhancement feature. The spatial enhancement feature is cross-channel information exchanged to improve the feature recognition. The spatial enhancement feature is randomly divided into 16 groups, each containing 4 channels. By performing random channel permutation in each group, the information between channels can be more evenly exchanged and fused, reducing the redundancy and limitations between channels. The channel group is reconstructed through a 3×3 convolution layer to obtain shuffled features. The shuffled features are input into the dual-branch attention network. The first branch of the dual-branch attention network calculates the channel attention score through global pooling and 1×1 convolution, aiming to quantify and evaluate the importance of different feature channels and give higher weights to important channels. The second branch calculates the spatial attention score through spatial pooling and 7×7 convolution, which improves the selectivity of features in the spatial dimension and ensures that the focus on the target object is more focused. The channel attention score and the spatial attention score calculated in the two branches are multiplied to obtain the joint attention weight. The shuffled features are weighted according to the joint attention weight. By multiplying the joint attention weight with the corresponding feature, important features can be effectively strengthened and interference with irrelevant features can be reduced. Through feature transformation and channel reorganization operations, an enhanced feature map is finally obtained.
[0022] Step S400: input the enhanced feature map into three parallel target detection units to generate candidate regions, and perform overlap calculation and region merging on the candidate regions to obtain garbage location data; Specifically, the enhanced feature map is input into the first target detection unit, which includes four convolution layers, each of which has a convolution kernel size of 3×3, a number of channels of 256, 256, 128 and 128, and a receptive field size of 16×16. Through this target detection unit, a small target feature map is extracted, so that the network pays attention to small-sized targets in junk images. The enhanced feature map is input into the second target detection unit, which also includes four convolution layers, each of which has a convolution kernel size of 3×3, a number of channels of 512, 512, 256 and 256, and a receptive field size of 32×32. Through this target detection unit, a medium-sized target feature map is obtained to capture medium-sized targets in the image. The enhanced feature map is input into the third target detection unit, and the structure of the third target detection unit includes four convolution layers, each of which has a convolution kernel size of 3×3, a number of channels of 1024, 1024, 512 and 512, and a receptive field size of 64×64. Through this target detection unit, large target feature maps can be extracted to effectively detect large-sized garbage targets. The small target feature map, medium target feature map and large target feature map are processed by two parallel 1×1 convolutional layers respectively. One of the 1×1 convolutional layers is used to generate category confidence scores for 2K channels, and the other is used to generate bounding box regression parameters for 4K channels, where K is the number of preset anchor boxes. The purpose of the convolution operation is to generate prediction results at different scales, where the category confidence is used to determine whether each anchor box contains garbage targets, and the bounding box regression parameters are used to correct the position and size of the candidate area to obtain multi-scale prediction results. Based on the multi-scale prediction results, the coordinate offsets and confidence scores of the four vertices are calculated for each preset anchor box. Different anchor box sizes are used for targets of different scales, where the anchor box size of small targets is set to {16×16, 32×16, 16×32}, the anchor box size of medium targets is set to {32×32, 64×32, 32×64}, and the anchor box size of large targets is set to {64×64, 128×64, 64×128}. In this way, preliminary original candidate regions are generated for junk targets of different scales. After prediction, these candidate regions contain preliminary positioning information of the target. In order to improve the accuracy of the candidate regions, the original candidate regions are screened. The regions with confidence scores greater than 0.3 in the original candidate regions are screened, and the regions with higher confidence scores are retained. The intersection over union (IoU) between the screened regions is calculated, and the soft non-maximum suppression algorithm is used to screen the regions with an IoU greater than 0.5, and the locally optimal candidate boxes are retained. The soft non-maximum suppression algorithm gradually reduces the confidence of the overlapping areas to avoid overly aggressive suppression in the high overlapping areas, retains valuable candidate areas, and obtains the filtered candidate areas. The filtered candidate areas are merged.Based on the confidence of detection units of different scales, different weight coefficients are set for the detection results of each scale, which are 0.2, 0.3 and 0.5 respectively. The weight reflects the importance of different detection units in target positioning. For overlapping candidate regions, a more accurate merged candidate region is obtained by weighted averaging the bounding box coordinates. The merged candidate region is input into the boundary refinement network to improve the accuracy of target positioning. The boundary refinement network contains three fully connected layers, and the number of neurons in each layer is 1024, 512 and 256 respectively. Each layer is followed by a ReLU activation function to introduce nonlinearity so that the network can better learn complex boundary adjustment mappings. In order to prevent overfitting, each layer is followed by a Dropout layer to randomly discard some neurons and enhance the generalization ability of the network. Through the processing of the boundary refinement network, accurate garbage positioning data is finally obtained.
[0023] Step S500, based on the garbage location data, the weight data vector and the spectrum data matrix, the probability density distribution data of the garbage category nodes is calculated; Specifically, the garbage location data is used as the state input to construct the state transition equation of the second-order Markov process. In this model, the state vector contains two parts: the position coordinates and the category label. The position coordinates are represented by a four-dimensional vector, including the four vertex coordinates of the target box, while the category label is represented by one-hot encoding. One-hot encoding effectively distinguishes different categories, so that the category label can be understood by the machine learning model. By modeling the state, the location data is combined with the category information to construct a state space model that describes the garbage classification process. The state transition probability is modeled by a 128-dimensional hidden state space, so that the model can capture the dynamic relationship between states and obtain an accurate state space model. The weight data vector is feature expanded. The weight feature is expanded using a three-layer fully connected network with 64, 128 and 256 neurons in the network. Each layer uses the tanh activation function to introduce nonlinearity, so that the network can capture the complex relationship in the weight feature. The selection of the tanh activation function helps to maintain the continuity and symmetry of the feature, so that the network can learn a more effective representation. Through this process, the weight feature is mapped to the same dimension as the state space to obtain a weight observation model. At the same time, the spectral data matrix is processed to extract its effective features. Spectral data can provide detailed information on the composition of garbage materials. The spectral data is feature decomposed by wavelet transform. Wavelet transform can decompose the spectral signal into different frequency ranges and extract the main features of the spectral signal. Wavelet coefficients with energy accounting for more than 95% are selected to retain most of the useful information while reducing data redundancy. The wavelet coefficients are feature mapped through a 256-dimensional fully connected layer to obtain the spectral observation model. The state space model, weight observation model and spectral observation model are used as the basic elements of the factor graph to construct a three-layer factor graph structure. The factor graph is a graphical model used to represent probabilistic relationships and effectively describes the complex relationship between multimodal information. In this factor graph structure, the first layer is the state node layer, which represents the garbage location state; the second layer is the feature conversion layer, which is responsible for fusing different feature inputs; and the third layer is the observation node layer, which contains observation information such as weight and spectrum. The nodes are connected by factor functions to form an overall multimodal factor graph. Based on the multimodal factor graph, the local likelihood estimation method is used to initialize the probability of the nodes. For state nodes, Gaussian distribution is used for initialization to describe the initial uncertainty of position coordinates and category labels, while for observation nodes, t distribution is used for initialization to deal with abnormal observations. The message transmission weight between nodes is determined by the maximum entropy criterion, which can ensure that the probability distribution maintains maximum uniformity in the absence of prior knowledge and avoids information bias. The initial probability model is optimized by the variational inference algorithm. The variational inference algorithm continuously optimizes the node probability distribution by minimizing the KL divergence, so that the inferred result gradually approaches the true distribution.In the variational inference process, the convergence threshold is set to 1e-6, and the maximum number of iterations is set to 100 to ensure that the algorithm can be optimized efficiently under convergence conditions. Through variational inference, the optimal probability relationship between nodes can be found on a complex multimodal factor graph, and the probability density distribution data of garbage category nodes can be obtained.
[0024] Step S600: Perform multi-level feature processing and effective feature screening based on the probability density distribution data of the garbage category nodes, and output the target garbage classification result.
[0025] Specifically, the probability density distribution data of the garbage category nodes is input into the feature mapping layer of the first feature calculation module, which consists of three fully connected layers in series, with the number of neurons being 1024, 512, and 256, respectively. Each layer is connected to a parameterized ReLU activation function and a batch normalization layer, in which the negative slope parameter is set to 0.2. By parameterizing the ReLU (PReLU) activation function, adaptive parameters are introduced for the negative part to enhance the network's expressiveness. At the same time, batch normalization is used to standardize the features of each layer, reduce internal covariate shift, stabilize the network training process, and obtain the first feature transformation data. Feature selection is performed on the first feature transformation data. In the feature selection layer of the first feature calculation module, the feature correlation matrix is calculated, and the Spearman rank correlation coefficient is used to evaluate the correlation between each feature. The Spearman rank correlation coefficient can capture the monotonic relationship between features and is suitable for nonlinear correlation. Based on the maximum spanning tree algorithm, feature subsets are selected, redundant features with correlation greater than 0.85 are eliminated, the multicollinearity problem of features is effectively reduced, and features with stronger independence are retained to obtain the first screening features. The first screened features are input into the feature mapping layer in the second feature calculation module. This layer adopts a self-attention architecture, with the number of attention heads set to 8, the dimension of each head to 64, the dropout ratio to 0.1, and the residual connection coefficient to 0.5. The self-attention mechanism assigns different weights to each feature, allowing the network to pay more attention to those features that are more critical to garbage classification. Through multiple attention heads, the relationship between features is captured from different angles to obtain richer feature expressions. At the same time, the introduction of residual connections can help the network retain part of the information of the original input features, making feature learning more robust and avoiding the problem of gradient disappearance. Through this level of processing, the second feature transformation data is obtained. The feature importance of the second feature transformation data is evaluated in the feature selection layer of the second feature calculation module. The importance of the features is evaluated by combining the Shapley value and the LASSO regularization method. The Shapley value is a feature importance measurement method based on game theory that can calculate the contribution of each feature to the overall model performance. The LASSO regularization reduces the weight of unimportant features by introducing sparsity constraints to screen out the most representative features. The feature importance threshold is set to 0.4, and features with weights greater than the threshold are retained to obtain the second screening features. The second screening features are input into the feature mapping layer in the third feature calculation module. This layer uses a bidirectional gated recurrent unit network with a hidden layer dimension of 256 and 2 layers, and adds layer normalization and residual connections to each layer. The bidirectional GRU captures the forward and backward dependencies in the feature sequence to better understand the timing and correlation between features. Through layer normalization, the network can standardize the input of each time step and improve the stability of training.The residual connection helps to retain the original information, so that the model can still perform efficient feature learning in the case of multi-layer stacking, and obtain the third feature transformation data. The third feature transformation data is subjected to conditional mutual information maximization analysis in the feature selection layer of the third feature calculation module. The conditional mutual information measures the dependency between features and target variables, and can select the features that contribute most to classification, especially when other features are taken into account. The baseline mutual information value is set to 0.25, and the feature subset is iteratively selected through the greedy search algorithm to retain the feature combination that can maximize the category distinction, and the third screening feature is obtained. The category probability of the third screening feature is calculated, and a prediction structure with multiple branches is used to predict the garbage category for each branch, and the prediction results of all branches are comprehensively analyzed. Through the integrated method, the deviation caused by a single model is reduced, the robustness and accuracy of the classification results are improved, and finally the target garbage classification result is obtained.
[0026] In the embodiment of the present invention, by designing a double-sampling fusion deep network and a multi-level feature processing unit, the semantic features and detail features of garbage are fully extracted and fused, and the problems of small target size and unclear features are solved; a dual-attention shuffling module is used to enhance and reorganize the features, effectively suppressing background interference and enhancing the expression ability of target features; three parallel target detection units and a soft non-maximum suppression algorithm are introduced to accurately locate garbage targets of different scales and reduce the interference of overlapping detection frames; based on a factor graph model, deep fusion of multimodal data such as image, weight and spectrum is achieved, providing a more comprehensive garbage feature expression; a multi-level feature processing unit is constructed, and the most discriminative feature combination is screened out through feature mapping and selection mechanism, reducing feature redundancy; a multi-branch classification network and a weighted voting strategy are adopted to comprehensively consider the prediction results of multiple models to ensure the reliability of the classification results.
[0027] In a specific embodiment, the process of executing step S100 may specifically include the following steps: Use a camera to collect the original image of the garbage to be identified under natural lighting conditions, perform RGB color space conversion on the original image, and obtain RGB image data; Performing Gaussian filtering on the RGB image data to obtain filtered image data, and performing white balance correction and gamma correction on the filtered image data to obtain corrected image data; The corrected image data is converted into a fixed-size data matrix, the image size is set to 224×224, and the corrected image data is normalized to obtain an image data matrix; The weight sensor is used to collect the weight value of the garbage to be identified, and the weight value is subjected to 3σ criterion outlier detection and minimum-maximum normalization processing to obtain a weight data vector; Using a near-infrared spectrometer to collect spectral data of the garbage to be identified, obtaining original spectral data, and performing polynomial fitting baseline correction on the original spectral data to obtain spectral data after baseline correction; The baseline-corrected spectral data were subjected to standard normal transformation and mean centering to obtain the spectral data matrix.
[0028] Specifically, the original image of the garbage to be identified under natural lighting conditions is collected through a camera. Collection under natural lighting conditions can better simulate the actual environment, making the collected images more universal. The original image is converted to RGB color space to obtain RGB image data. The RGB color space is a standard color space in image processing, which can describe the color characteristics of the image through three color channels: red (R), green (G), and blue (B). In order to reduce the noise in the image and make the target garbage clearer in the image, the RGB image data is Gaussian filtered to remove random noise in the image and retain the main structural information of the object. The calculation formula of Gaussian filtering is: ; in, represents the pixel value after filtering, and is the pixel position in the image, is the standard deviation of the Gaussian kernel, which is used to control the blur degree of the filter. Through Gaussian filtering, the noise caused by changes in illumination and background is effectively removed, making the target in the image clearer. White balance correction and gamma correction are performed on the filtered image to adjust the color and brightness of the image. The purpose of white balance correction is to make the white objects in the image still look white under various lighting conditions to ensure the accuracy of the image color. Gamma correction is used to adjust the overall brightness of the image so that the contrast of the image is more suitable for human eye perception. The formula for gamma correction is: ; in, is the corrected pixel value, is the input pixel value, is the gamma correction factor. By adjusting The value of changes the brightness and contrast of the image to make the details more obvious. Convert the corrected image data into a fixed-size data matrix to meet the input requirements of the AI model. Set the image size to 224×224 and normalize the corrected image data to obtain an image data matrix. Map the image pixel values to a fixed range (usually [0,1]) to eliminate the amplitude difference caused by changes in image brightness. The normalization formula is: ; in, is the normalized pixel value, is the original pixel value, and are the minimum and maximum pixel values of the image, respectively. The normalized data matrix can speed up the training of the model and improve the stability of the model. The weight value of the garbage to be identified is collected using a weight sensor, and the collected weight data is subjected to 3σ criterion outlier detection and minimum-maximum normalization. The 3σ criterion is used to detect outliers in weight data. Assuming that the data conforms to the normal distribution, if the deviation of a data point from the mean exceeds 3 times the standard deviation, the data point is considered an outlier. The reliability of the weight data is ensured by eliminating outliers. After outlier detection, the weight data is subjected to minimum-maximum normalization, and the weight value is mapped to the range of [0,1] to obtain a standardized weight data vector. The spectral data of the garbage to be identified is collected using a near-infrared spectrometer to obtain the original spectral data. The spectral data provides information on the material and chemical composition of the garbage. The original spectral data is subjected to polynomial fitting baseline correction to remove the baseline drift in the spectral data, which is caused by changes in the light source or measurement errors. Through baseline correction, the features in the spectral signal are made more prominent. After baseline correction, the spectral data is subjected to standard normal transformation and mean centering to obtain a spectral data matrix. The standard normal transformation is used to adjust the spectral data of each sample to a mean of zero and a standard deviation of one to eliminate the amplitude differences between different samples and make the features more comparable. Mean centering adjusts the mean of the spectral data to zero, allowing subsequent machine learning models to more easily capture the changing trends and key features of the spectral signal.
[0029] In a specific embodiment, the process of executing step S200 may specifically include the following steps: The image data matrix is input into the semantic feature extraction network. The semantic feature extraction network contains five convolutional layers. The number of convolution kernels from the first to the fifth layer are 64, 128, 256, 512 and 512 respectively. The size of the convolution kernel is 3×3. After each layer, a ReLU activation function and a batch normalization layer are connected to obtain a multi-layer semantic feature map. Perform feature pyramid processing on the multi-layer semantic feature map, use a 1×1 convolution layer to unify the number of feature channels in the third, fourth and fifth layers to 256, and use deconvolution operation to upsample to obtain a pyramid feature map; The image data matrix is input into the detail feature extraction network. The detail feature extraction network contains two convolution layers. The number of convolution kernels is 32 and 64 respectively. The convolution kernel size is 3×3 and the step size is 1. A PReLU activation function is connected after each layer to obtain a detail feature map. The pyramid feature map and the detail feature map are spliced in the channel dimension through the feature adaptive fusion module to obtain a fused feature map. The first branch in the feature adaptive fusion module is the identity mapping, the second branch is two layers of 3×3 convolutional layers in series, and the third branch is a hole convolution layer with a hole rate of 2.
[0030] Specifically, the image data matrix is input into the semantic feature extraction network to extract high-level semantic features of the junk image. The semantic feature extraction network contains five convolutional layers. The number of convolution kernels from the first to the fifth layer are 64, 128, 256, 512 and 512 respectively, and the size of the convolution kernel is 3×3. By increasing the number of convolution kernels layer by layer, the network can gradually extract high-level semantic information (such as shape and object relationship) from low-level features (such as edges and colors). The ReLU activation function is connected to each convolution operation to introduce nonlinearity. The formula of ReLU is: ; in, represents the output after activation, is the input value of the convolution layer. If the input value is positive, it remains unchanged; if the input value is negative, it is set to 0. ReLU can break the linear relationship, allowing the model to learn more complex features. Each layer of convolution operation is connected to a batch normalization layer, which standardizes the features, accelerates the convergence of the model and enhances the stability of the model to obtain a multi-layer semantic feature map. Feature pyramid processing is performed on the multi-layer semantic feature map to enhance the model's ability to express objects of different scales. Feature pyramid is a multi-scale feature fusion method that effectively captures image information of different scales. In this process, the The convolutional layer unifies the number of feature channels of the third, fourth and fifth layers, and adjusts their channel numbers to The formula for convolution is: ; in, is the output feature after convolution, Indicates that the input feature map is at position The The value of the channel, for The weight of the convolution kernel, is the number of channels of the input feature map. Convolution can effectively reduce the number of feature channels and the amount of calculation while maintaining the integrity of feature information. Deconvolution operation is used to upsample the feature map to obtain a pyramid feature map with the same spatial size. The role of deconvolution is to restore the feature map to a higher resolution, thereby ensuring that features at different scales can be fully expressed. At the same time, the detail information of the image is extracted, and the image data matrix is input into the detail feature extraction network. The network contains two convolution layers with 32 and 64 convolution kernels respectively, a convolution kernel size of 3×3, and a step size of 1. The detail feature extraction network is used to capture low-level features such as edges and textures in the image. The parameterized ReLU (PReLU) activation function is connected to each layer of convolution operation. The formula of PReLU is: ; in, is a learnable parameter used to control the passage of the negative part. is the input value of the convolution layer. The introduction of PReLU makes the network more flexible when processing negative input, maintains the continuity of features, and improves the expression ability of detail features. After being processed by the detail feature extraction network, a detail feature map is obtained. The pyramid feature map and the detail feature map are spliced in the channel dimension through the feature adaptive fusion module. The feature adaptive fusion module contains three branches. The first branch is the identity mapping, that is, the input feature is directly kept unchanged. This branch ensures that the original feature information is not lost. The second branch contains two layers of 3×3 convolution layers in series. Through multi-layer convolution operations, local information in the features is extracted and the features are enhanced. The third branch is a dilated convolution layer. The dilated convolution rate is set to 2 to expand the receptive field of the convolution kernel. The role of the dilated convolution is to enable the convolution kernel to capture a wider range of contextual information without increasing the number of parameters, thereby enhancing the model's expression ability for global features. Through the feature adaptive fusion module, a fused feature map is obtained. For example, when identifying plastic bottles in garbage, the pyramid feature map can capture the overall outline and shape of the bottle, while the detail feature map can capture the surface texture and label information of the bottle. Through the feature adaptive fusion module, multiple features are effectively fused, allowing the model to accurately identify plastic bottles in complex backgrounds. Even if the bottle is partially blocked or affected by light, the fused features can still provide enough information for accurate classification.
[0031] In a specific embodiment, the process of executing step S300 may specifically include the following steps: The fused feature map is divided into 8 feature groups according to the channel dimension. Each feature group contains 64 channels. A 128-dimensional feature vector is generated for each feature group through global average pooling and global maximum pooling. The 128-dimensional feature vector is then reduced and increased in dimension to obtain a channel weight vector. The channel weight vector is normalized within the group through the softmax function to generate a weight coefficient in the range of 0-1, the weight coefficient and the corresponding feature group are weighted by channel, and the weighted features are reorganized in the original order to obtain the primary channel enhancement features; The feature response of the primary channel enhancement feature is calculated in the spatial dimension, and the mean and standard deviation statistics are calculated for the feature value at each position. The mean and standard deviation statistics are concatenated and input into the 3×3 convolution layer to generate a two-dimensional spatial weight matrix to obtain a spatial attention map; The primary channel enhanced features are spatially weighted according to the spatial attention map, and the attention value is multiplied by the feature vector at the corresponding position to obtain the spatial enhanced features; The spatial enhancement features are interacted across channels, and the features are randomly divided into 16 groups, each with 4 channels. The channels are randomly permuted within the group, and the features are reconstructed through a 3×3 convolutional layer to obtain shuffled features. The shuffled features are input into a two-branch attention network. The first branch in the two-branch attention network calculates the channel attention score through global pooling and 1×1 convolution, and the second branch calculates the spatial attention score through spatial pooling and 7×7 convolution. The attention scores of the two branches in the two-branch attention network are multiplied to obtain the joint attention weight; The shuffled features are weighted according to the joint attention weights, and the enhanced feature maps are obtained through feature transformation and channel reorganization operations.
[0032] Specifically, the fused feature map is divided into 8 feature groups according to the channel dimension, and each feature group contains 64 channels. For each feature group, global average pooling and global maximum pooling operations are performed to generate a 128-dimensional feature vector. Global average pooling and global maximum pooling capture the overall mean information and the strongest response information of the feature respectively. The calculation formula of global average pooling is: ; in, represents the value after average pooling, The feature map is at position The pixel value at and are the height and width of the feature map, respectively. Similarly, global maximum pooling takes the maximum value of all pixels in the feature map. Through these two pooling methods, an overall description of the feature group is obtained and combined to form a 128-dimensional feature vector. The 128-dimensional feature vector is reduced and increased in dimension to reduce redundancy and strengthen important features to obtain the channel weight vector. The channel weight vector is normalized within the group through the softmax function to standardize the weight to the range of 0 to 1. The formula of the softmax function is: ; in, Indicates The weight of each channel, is the corresponding input value, is the total number of channels. The normalized weight coefficient is used to perform a weighted operation on each feature group by channel. By multiplying the weight coefficient by the feature group channel by channel, the feature channels that make important contributions to the classification are highlighted, and noise or irrelevant features are suppressed. The weighted feature groups are reorganized in the original order to obtain the primary channel enhanced features. The primary channel enhanced features are enhanced in the spatial dimension. The feature response of the primary channel enhanced features is calculated in the spatial dimension, that is, the mean and standard deviation statistics are calculated for the feature values at each spatial position to obtain the importance of each position. The calculation formulas for the mean and standard deviation are: ; ; in, Indicates location The mean of represents the standard deviation, Indicates at location The The value of the channel, is the number of channels. The mean and standard deviation are concatenated and input into a 3×3 convolutional layer to generate a two-dimensional spatial weight matrix, namely the spatial attention map. The role of the spatial attention map is to assign weights to each spatial position and highlight the areas that are important for the object classification. The primary channel-enhanced features are spatially weighted according to the generated spatial attention map, and the spatially enhanced features are obtained by multiplying the attention value with the feature vector of the corresponding position. The spatially enhanced features are subjected to cross-channel information interaction and randomly divided into 16 groups, each containing 4 channels. By randomly permuting channels within the group, the fixed order between channels is broken, so that the model can better learn the correlation and complementarity between different channels. The features of these groups are reconstructed through a 3×3 convolutional layer to obtain shuffled features. In order to enhance the expressive power of the features, the shuffled features are input into the two-branch attention network. The first branch in the two-branch attention network calculates the channel attention score through global pooling and 1×1 convolution operations. Global pooling is used to aggregate the overall information of each channel, while 1×1 convolution is used to generate the weight of each channel. The second branch calculates the spatial attention score through spatial pooling and 7×7 convolution operations. Spatial pooling is used to obtain global information in the spatial dimension, while 7×7 convolution has a larger receptive field and captures a wider range of spatial relationships. The attention scores of these two branches are multiplied to obtain the joint attention weight. The shuffled features are weighted according to the joint attention weight, and the weighted features are obtained by multiplying the joint attention weight with the corresponding features. The order of feature channels is reorganized through feature transformation and channel reorganization operations to obtain the final enhanced feature map.
[0033] In a specific embodiment, the process of executing step S400 may specifically include the following steps: The enhanced feature map is input into the first target detection unit. The first target detection unit contains four convolutional layers. The convolution kernel size of each layer is 3×3, the number of channels is 256, 256, 128, and 128 respectively, and the receptive field size is 16×16 to obtain a small target feature map. The enhanced feature map is input into the second target detection unit, which contains four convolutional layers. The convolution kernel size of each layer is 3×3, the number of channels is 512, 512, 256, 256, and the receptive field size is 32×32, and the mid-target feature map is obtained. The enhanced feature map is input into the third target detection unit, which contains four convolutional layers. The convolution kernel size of each layer is 3×3, the number of channels is 1024, 1024, 512, 512, and the receptive field size is 64×64, so as to obtain a large target feature map. The small object feature map, medium object feature map, and large object feature map are respectively passed through two parallel 1×1 convolutional layers, one for generating the category confidence scores of 2K channels, and the other for generating the bounding box regression parameters of 4K channels, where K is the preset number of anchor boxes, to obtain multi-scale prediction results; According to the multi-scale prediction results, the four vertex coordinate offsets and confidence scores are calculated for each preset anchor box. The anchor box size of the small target is set to {16×16, 32×16, 16×32}, the anchor box size of the medium target is set to {32×32, 64×32, 32×64}, and the anchor box size of the large target is set to {64×64, 128×64, 64×128} to obtain the original candidate region; For the regions with confidence scores greater than 0.3 in the original candidate regions, the intersection-and-union ratios between the two regions are calculated. For the regions with an intersection-and-union ratio greater than 0.5, the soft non-maximum suppression algorithm is used to filter them, and the locally optimal candidate boxes are retained to obtain the filtered candidate regions. The filtered candidate regions are merged, and the weight coefficients are set to 0.2, 0.3, and 0.5 respectively according to the confidence of the detection units of different scales. The bounding box coordinates of the overlapping regions are weighted averaged to obtain the merged candidate regions. The merged candidate region is input into the boundary refinement network, which contains three fully connected layers with 1024, 512 and 256 neurons respectively. Each layer is followed by a ReLU activation function and a Dropout layer to obtain garbage location data.
[0034] Specifically, the enhanced feature map is input into the first target detection unit, which includes four convolution layers, each with a convolution kernel size of 3×3 and a number of channels of 256, 256, 128, and 128, respectively. These convolution layers are used to extract small target features in the enhanced feature map and obtain a small target feature map. The receptive field size is set to 16×16, that is, the receptive field of the model will gradually increase in each convolution operation, and eventually it can cover small objects in the input image. The receptive field is the perception area of the convolution kernel on the input image in the convolutional neural network, and its increase enables the network to capture more contextual information. The enhanced feature map is input into the second target detection unit, which includes four convolution layers, each with a convolution kernel size of 3×3, a number of channels of 512, 512, 256, and 256, and a receptive field size of 32×32. By increasing the number of convolution kernels and adjusting the number of channels, the second target detection unit can better handle medium-sized targets, extract features containing medium-scale information, and obtain a medium-sized target feature map. Similarly, the enhanced feature map is input into the third target detection unit, which contains four convolutional layers with the number of channels being 1024, 1024, 512, and 512, respectively. The receptive field size is set to 64×64, which is mainly used to extract the features of large targets. The small target feature map, medium target feature map, and large target feature map are respectively passed through two parallel 1×1 convolutional layers, one for generating the category confidence scores of 2K channels and the other for generating the bounding box regression parameters of 4K channels, where K is the preset number of anchor boxes. The role of the 1×1 convolution is to perform a linear combination of each feature channel to generate the category confidence and bounding box regression parameters of each anchor box. The operation of these two parallel convolutional layers is expressed by the following formula: ; ; in, is the category confidence score, is the bounding box regression parameter, represents the input feature map, and are the convolution kernel weights used to generate category confidence and bounding box parameters, respectively. Through these two convolutional layers, the model predicts the category and location of garbage objects on each anchor box. Based on the multi-scale prediction results, the coordinate offsets and confidence scores of the four vertices are calculated for each preset anchor box. The anchor box size of small objects is set to , the anchor box size of medium targets is {32×32, 64×32, 32×64}, while the anchor box size of large targets is {64×64, 128×64, 64×128}. The vertex coordinates of each anchor box are regressed using the following formula: ; in, is the center coordinate of the anchor box after regression, are the regressed width and height, is the offset predicted by the model. By regressing the coordinates of the anchor box, the target is located in the image and the original candidate region is obtained. The regions with confidence scores greater than 0.3 in the original candidate region are screened and candidate boxes with higher confidence are retained. The intersection-over-union ratio is calculated between the candidate regions. The intersection-over-union ratio is used to measure the overlap between two bounding boxes. The calculation formula is: ; in, and are the areas of the two bounding boxes, represents the overlapping area of two bounding boxes, Represents the union area of two bounding boxes. For areas with an intersection-over-union ratio greater than 0.5, a soft non-maximum suppression algorithm is used for screening. By gradually reducing the confidence of the overlapping area, valuable information is retained and false suppression is reduced to obtain the screened candidate area. The screened candidate areas are merged. According to the confidence of the detection units of different scales, different weight coefficients are set for the detection results of each scale, which are 0.2, 0.3 and 0.5 respectively. The bounding box coordinates of the overlapping area are weighted averaged to obtain a more accurate merged candidate area. The formula for weighted average is: ; in, are the combined coordinates, For the The coordinates of the bounding box, is the weight corresponding to the scale. Through weighted merging, the detection results of detection units of different scales are effectively combined to obtain a more accurate and stable target position. The merged candidate area is input into the boundary refinement network for refinement. The boundary refinement network contains three fully connected layers with 1024, 512 and 256 neurons respectively. Each layer is followed by a ReLU activation function and a Dropout layer. The role of the ReLU activation function is to introduce nonlinearity, and the formula is: ; in, Represents the output value after activation, The Dropout layer is used to randomly discard some neurons to reduce the overfitting of the model and improve the generalization ability of the model. Through the processing of the boundary refinement network, the final garbage location data is obtained, which includes the location and shape information of the target garbage.
[0035] In a specific embodiment, the process of executing step S500 may specifically include the following steps: The garbage location data is used as the state input to construct the state transition equation of the second-order Markov process. The state vector contains two parts: the location coordinates and the category label. The location coordinates are represented by a four-dimensional vector, and the category label is represented by a one-hot encoding. The state transition probability is modeled through a 128-dimensional hidden state space to obtain a state space model. The weight data vector is feature expanded through a three-layer fully connected network with 64, 128 and 256 neurons respectively. Each layer uses the tanh activation function to map the weight feature to the same dimension as the state space to obtain the weight observation model. The spectral data matrix is decomposed by wavelet transform, and the wavelet coefficients with energy accounting for more than 95% are selected. Feature mapping is performed through a 256-dimensional fully connected layer to obtain a spectral observation model. The state space model, weight observation model and spectral observation model are used as the basic elements of the factor graph to construct a three-layer factor graph structure. The first layer is the state node layer, the second layer is the feature conversion layer, and the third layer is the observation node layer. The nodes are connected by factor functions to obtain a multimodal factor graph. Based on the multimodal factor graph, the local likelihood estimation method is used to initialize the node probability. The state node is initialized with Gaussian distribution, and the observation node is initialized with t distribution. The message transmission weight between nodes is determined by the maximum entropy criterion to obtain the initial probability model. The variational inference algorithm is applied to the initial probability model, and the node probability distribution is iteratively optimized by minimizing the KL divergence. The convergence threshold is set to 1e-6 and the maximum number of iterations is 100 to obtain the probability density distribution data of the garbage category nodes.
[0036] Specifically, the garbage location data is used as the state input to construct the state transition equation of the second-order Markov process. The garbage location data contains the location and category information of the target object. In the model, the state vector consists of two parts: the location coordinates and the category label. The location coordinates are represented by a four-dimensional vector, usually expressed as ,in and is the center coordinate of the garbage target, and is the width and height. The category label is represented by one-hot encoding, and each category is described by a one-hot encoding vector. For example, if there are three garbage categories A, B, and C, A is represented as [1,0,0], B is represented as [0,1,0], and C is represented as [0,0,1]. With this information, the state transition equation of the second-order Markov process is constructed to describe the relationship between the state changes over time. The hidden state space dimension is set to 128 dimensions, which means that a 128-dimensional vector is used to describe the implicit state at each moment, thereby modeling the probability of state transition. The state transition equation is expressed as: ; in, Indicates time status, and Represent the states of the first two time steps respectively, is the state transfer function, are model parameters, is Gaussian noise, which is used to represent the uncertainty of the system. This modeling method can capture the dynamic changes of garbage targets in the image and obtain a state space model. The weight data is feature expanded to be integrated with the state space. The weight data vector is input into a three-layer fully connected network with 64, 128 and 256 neurons respectively. The tanh activation function is used after each layer. The formula of the tanh activation function is: ; in, is the output after activation, is the input value. The output range of the tanh activation function is (-1,1). Compared with the ReLU function, it can make the features more continuous and has nonlinear processing for both positive and negative input values. The weight features are mapped to the same dimension as the state space, that is, 128 dimensions, through a three-layer fully connected network, so as to be fused with the state space model to obtain a weight observation model. The spectral data is processed and the spectral data is feature decomposed by wavelet transform. Wavelet transform is a tool for signal processing that decomposes the signal into components of different frequencies to extract important features. In garbage classification, wavelet transform effectively removes noise from spectral signals and retains the main features useful for classification. In the feature decomposition process, wavelet coefficients with an energy share of more than 95% are selected to retain the most representative part of the spectral data. Then, the wavelet coefficients are feature mapped through a 256-dimensional fully connected layer to obtain a spectral observation model. The state space model, weight observation model and spectral observation model are used as the basic elements of the factor graph to construct a three-layer factor graph structure. The factor graph is a probabilistic graph model used to represent the interdependence between variables. In this factor graph structure, the first layer is the state node layer, which represents the location status of the garbage, including location and category; the second layer is the feature conversion layer, which converts the observation information into feature representation associated with the state; the third layer is the observation node layer, which contains observation information such as weight and spectrum. Nodes are connected through factor functions, which define the probability relationship between adjacent nodes. For example, if the node state vector is and , and its probability relationship is expressed as: ; in, For Node and The conditional probability of is the energy function, which is used to measure the mismatch between states. is a normalization constant. Through the factor graph structure, multimodal information is uniformly modeled to obtain a multimodal factor graph that describes the relationship between state and observation. Based on the multimodal factor graph, the local likelihood estimation method is used to initialize the probability of the node. For the state node. Use Gaussian distribution for initialization to represent the initial uncertainty of the position and category. For the observation node, the t distribution is used for initialization to deal with anomalies in the observed data. The long tail characteristic of the t distribution makes it more robust to outliers. The message passing weight between nodes is determined by the maximum entropy criterion. The maximum entropy criterion is used to ensure that the probability distribution remains as uniform as possible in the absence of prior knowledge, thereby reducing the bias of the model. Through this step, an initial probability model is generated. The variational inference algorithm is applied to the initial probability model. Variational inference is a method of approximating the posterior distribution through optimization, and its goal is to minimize the KL divergence between the true posterior distribution and the approximate distribution. The formula for KL divergence is: ; in, Represents the true distribution With approximate distribution The degree of difference between is the value of the random variable. By minimizing the KL divergence, the approximate distribution is close to the true distribution. In the implementation process, the convergence threshold is set to The maximum number of iterations is 100, ensuring that the algorithm can converge efficiently with sufficient accuracy. Through iterative optimization, the probability density distribution data of garbage category nodes is finally obtained.
[0037] In a specific embodiment, the process of executing step S600 may specifically include the following steps: The probability density distribution data of garbage category nodes is input into the feature mapping layer in the first feature calculation module. The feature mapping layer contains three fully connected layers in series, with the number of neurons being 1024, 512, and 256 respectively. Each layer is connected to a parameterized ReLU activation function and a batch normalization layer, with the negative slope parameter set to 0.2, to obtain the first feature transformation data; The feature correlation matrix is calculated for the first feature transformation data in the feature selection layer of the first feature calculation module, the Spearman rank correlation coefficient is used for calculation, and the feature subset is selected based on the maximum spanning tree algorithm, and the redundant features with correlation greater than 0.85 are eliminated to obtain the first screening features; The first filtered features are input into the feature mapping layer in the second feature calculation module. This layer adopts a self-attention architecture, the number of attention heads is set to 8, the dimension of each head is 64, the dropout ratio is 0.1, and the residual connection coefficient is 0.5 to obtain the second feature transformation data; The feature importance of the second feature transformation data is evaluated in the feature selection layer of the second feature calculation module. The feature weight is calculated by combining the Shapley value and LASSO regularization. The importance threshold is set to 0.4, and the features with weights greater than the threshold are retained to obtain the second screening features. The second screening features are input into the feature mapping layer in the third feature calculation module. This layer constructs a bidirectional gated recurrent unit network with a hidden layer dimension of 256 and a layer number of 2. Each layer adds layer normalization and residual connection, and the timing step length is 8 to obtain the third feature transformation data. The conditional mutual information maximization analysis is performed on the third feature transformation data in the feature selection layer of the third feature calculation module, the baseline mutual information value is set to 0.25, and the feature subset is iteratively selected through the greedy search algorithm to retain the feature combination that maximizes the category distinction, and the third screening feature is obtained; The category probability is calculated for the third screening features to obtain the prediction results of multiple branches, and the prediction results of multiple branches are comprehensively analyzed to obtain the target garbage classification results.
[0038] Specifically, the probability density distribution data of the garbage category nodes is input into the feature mapping layer of the first feature calculation module. The feature mapping layer contains three fully connected layers in series, with the number of neurons being 1024, 512, and 256 respectively. After each fully connected layer, a parameterized ReLU (PReLU) activation function and a batch normalization layer are used. The formula of the PReLU activation function is: ; in, is the output after activation, is the input value, is the negative slope parameter, set to 0.2. PReLU adaptively adjusts the slope of the negative part to give the network higher learning flexibility and maintain richer feature expression in the negative area. A batch normalization layer is connected after each layer to standardize the data so that the output mean of each layer is 0 and the variance is 1, which accelerates the training process of the network and improves the convergence stability. After three layers of full connection, PReLU activation and batch normalization, the first feature transformation data is obtained. The feature correlation matrix of the first feature transformation data is calculated in the feature selection layer of the first feature calculation module. The Spearman rank correlation coefficient is used to evaluate the correlation between features. The Spearman correlation coefficient can capture the nonlinear correlation between features by sorting the features and calculating the rank relationship between two sets of data. The calculation formula of the Spearman correlation coefficient is: ; in, represents the Spearman correlation coefficient, For the The difference between the two feature rankings of samples, is the number of samples. Based on the feature correlation matrix, the maximum spanning tree algorithm is used to select a feature subset, and redundant features with a correlation greater than 0.85 are eliminated to obtain the first screening features. The maximum spanning tree algorithm can reduce redundant information while retaining the main features, ensuring that the model is more efficient in subsequent processing. The first screening features are input into the feature mapping layer of the second feature calculation module. The feature mapping layer adopts the self-attention mechanism to enhance the expressiveness of the features. In the self-attention module, the number of attention heads is set to 8, the dimension of each head is 64, the dropout ratio is 0.1, and the residual connection coefficient is 0.5. The self-attention mechanism assigns weights to each feature by calculating the similarity between features, ensuring that the network can pay more attention to the features that contribute to the classification task. The calculation formula for the attention score is: ; in, , , They are query, key and value matrices respectively. is the dimension of the key vector. Through self-attention calculation, the network can dynamically adjust the importance of the feature and obtain the second feature transformation data. For the second feature transformation data, the feature importance is evaluated in the feature selection layer of the second feature calculation module. The feature weight is calculated by combining Shapley value and LASSO regularization. Shapley value is a feature contribution measurement method derived from game theory, which is used to evaluate the contribution of each feature to the overall model, while LASSO regularization reduces the weight of unimportant features by introducing sparsity constraints. Through this combination, the comprehensive importance of each feature is obtained. The importance threshold is set to 0.4, and features with weights greater than the threshold are retained to obtain the second screening features. The second screening features are input into the feature mapping layer in the third feature calculation module, which constructs a bidirectional gated recurrent unit (Bi-GRU) network with a hidden layer dimension of 256 and a layer number of 2. Bidirectional GRU can capture the front-to-back dependency between features. Layer normalization and residual connection are added after each layer to make the model more robust and efficient in processing temporal information. The role of layer normalization is to standardize the input of each time step to stabilize the training process, while the residual connection retains the original input information to avoid the gradient disappearance problem. The third feature transformation data is obtained. The conditional mutual information maximization analysis is performed on the third feature transformation data in the feature selection layer of the third feature calculation module. Conditional mutual information is used to measure the dependency between features and target categories, especially to find the most helpful features for classification tasks when considering other features. The calculation formula of conditional mutual information is: ; in, Representation characteristics With category Given other features The conditional mutual information in the case of Entropy is used to represent uncertainty. The feature subset is iteratively selected through the greedy search algorithm, and the feature combination that can maximize the category distinction is retained until the third screening feature. The category probability is calculated for the third screening feature, and a prediction structure with multiple branches is adopted. Each branch makes an independent prediction for the garbage category, and then the prediction results are comprehensively analyzed. The comprehensive analysis adopts a weighted average or voting method to combine the prediction results of each branch to obtain the final garbage classification result.
[0039] See also Figure 2 , Figure 2 A schematic block diagram of the structure of the device 200 for realizing the whole process of automated image recognition and garbage classification based on AI computing provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the device 200 for realizing the whole process of automated image recognition and garbage classification based on AI calculation includes: The acquisition module 210 is used to collect multimodal data of the garbage to be identified, and obtain an image data matrix, a weight data vector and a spectrum data matrix; An extraction module 220 is used to extract semantic features and detail features from the image data matrix to obtain a fused feature map; An enhancement module 230 is used to enhance the fused feature map by using a channel attention and a spatial attention mechanism, and perform feature shuffling to obtain an enhanced feature map; The detection module 240 is used to input the enhanced feature map into three parallel target detection units, generate candidate regions, and perform overlap calculation and region merging on the candidate regions to obtain garbage location data; A calculation module 250, for calculating probability density distribution data of garbage category nodes based on the garbage location data, the weight data vector and the spectrum data matrix; The output module 260 is used to perform multi-level feature processing and effective feature screening based on the probability density distribution data of the garbage category nodes, and output the target garbage classification result.
[0040] Through the collaborative cooperation of the above components, by designing a double-sampling fusion deep network and a multi-level feature processing unit, the semantic features and detail features of garbage are fully extracted and fused, solving the problems of small target size and unclear features; the dual-attention shuffling module is used to enhance and reorganize the features, effectively suppressing background interference and enhancing the expressiveness of target features; three parallel target detection units and a soft non-maximum suppression algorithm are introduced to accurately locate garbage targets of different scales and reduce the interference of overlapping detection frames; based on the factor graph model, deep fusion of multimodal data such as image, weight and spectrum is realized, providing a more comprehensive expression of garbage features; a multi-level feature processing unit is constructed, and the most discriminative feature combination is screened out through feature mapping and selection mechanism, reducing feature redundancy; a multi-branch classification network and a weighted voting strategy are used to comprehensively consider the prediction results of multiple models to ensure the reliability of the classification results.
[0041] See also Figure 3 , Figure 3 A schematic block diagram of the structure of an AI-based full-process automated image recognition and garbage classification implementation device 300 is provided in an embodiment of the present application. The AI-based full-process automated image recognition and garbage classification implementation device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected via a device bus 303, wherein the memory 302 may include a non-volatile storage medium and an internal memory.
[0042] The non-volatile storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed by the processor 301, the processor 301 can execute any of the above-mentioned methods for realizing the entire process of automated image recognition and garbage classification based on AI calculation.
[0043] Processor 301 is used to provide computing and control capabilities to support the operation of the entire AI-based automated image recognition and garbage classification process of device 300.
[0044] The internal memory provides an environment for the operation of computer programs in non-volatile storage media. When the computer program is executed by the processor 301, the processor 301 can execute any of the above-mentioned methods for implementing the entire process of automated image recognition and garbage classification based on AI calculation.
[0045] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the full-process implementation device 300 of automated image recognition and garbage classification based on AI computing involved in the present application scheme. The specific full-process implementation device 300 of automated image recognition and garbage classification based on AI computing may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0046] It should be understood that the processor 301 may be a central processing unit (CPU), and the processor 301 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0047] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described automatic image recognition and garbage classification full-process implementation device 300 based on AI calculation can refer to the corresponding process of the aforementioned automatic image recognition and garbage classification full-process implementation method based on AI calculation, and will not be repeated here.
[0048] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement the method for realizing the entire process of automated image recognition and garbage classification based on AI calculation as provided in an embodiment of the present application.
[0049] The computer-readable storage medium may be an internal storage unit of the device 300 for realizing the whole process of automated image recognition and garbage classification based on AI calculation in the aforementioned embodiment, such as a hard disk or memory of the device 300 for realizing the whole process of automated image recognition and garbage classification based on AI calculation. The computer-readable storage medium may also be an external storage device of the device 300 for realizing the whole process of automated image recognition and garbage classification based on AI calculation, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the device 300 for realizing the whole process of automated image recognition and garbage classification based on AI calculation.
[0050] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0051] If the integrated unit is implemented in the form of 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, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0052] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for realizing the whole process of automated image recognition and garbage classification based on AI computing, characterized in that: include: Multimodal data collection is performed on the garbage to be identified to obtain image data matrix, weight data vector and spectrum data matrix; Extracting semantic features and detail features from the image data matrix to obtain a fused feature map; Performing channel attention and spatial attention mechanism enhancement on the fused feature map, and performing feature shuffling to obtain an enhanced feature map; Inputting the enhanced feature map into three parallel target detection units to generate candidate regions, and performing overlap calculation and region merging on the candidate regions to obtain garbage location data; Based on the garbage location data, the weight data vector and the spectral data matrix, probability density distribution data of garbage category nodes are calculated; Multi-level feature processing and effective feature screening are performed based on the probability density distribution data of the garbage category nodes to output the target garbage classification result.
2. The method for realizing the whole process of automated image recognition garbage classification based on AI calculation according to claim 1 is characterized in that: The multimodal data collection of the garbage to be identified is performed to obtain an image data matrix, a weight data vector and a spectrum data matrix, including: Using a camera to collect an original image of the garbage to be identified under natural lighting conditions, and performing RGB color space conversion on the original image to obtain RGB image data; Performing Gaussian filtering on the RGB image data to obtain filtered image data, and performing white balance correction and gamma correction on the filtered image data to obtain corrected image data; Converting the corrected image data into a fixed-size data matrix, setting the image size to 224×224, and normalizing the corrected image data to obtain an image data matrix; Using a weight sensor to collect the weight value of the garbage to be identified, performing 3σ criterion outlier detection and minimum-maximum normalization processing on the weight value to obtain a weight data vector; Using a near-infrared spectrometer to collect spectral data of the garbage to be identified, obtaining original spectral data, and performing polynomial fitting baseline correction on the original spectral data to obtain spectral data after baseline correction; The baseline-corrected spectral data are subjected to standard normal transformation and mean centering to obtain a spectral data matrix.
3. The method for realizing the whole process of automated image recognition and garbage classification based on AI calculation according to claim 2 is characterized in that: The step of extracting semantic features and detail features from the image data matrix to obtain a fused feature map includes: Input the image data matrix into a semantic feature extraction network, wherein the semantic feature extraction network comprises five convolutional layers, the number of convolutional kernels from the first layer to the fifth layer are 64, 128, 256, 512 and 512 respectively, the size of the convolutional kernel is 3×3, and a ReLU activation function and a batch normalization layer are connected after each layer to obtain a multi-layer semantic feature map; Performing feature pyramid processing on the multi-layer semantic feature map, unifying the number of feature channels of the third layer, the fourth layer, and the fifth layer to 256 using a 1×1 convolution layer, and performing upsampling using a deconvolution operation to obtain a pyramid feature map; Input the image data matrix into a detail feature extraction network, wherein the detail feature extraction network comprises two convolution layers, the number of convolution kernels is 32 and 64 respectively, the size of the convolution kernel is 3×3, the step length is 1, and a PReLU activation function is connected after each layer to obtain a detail feature map; The pyramid feature map and the detail feature map are spliced in the channel dimension through a feature adaptive fusion module to obtain a fused feature map, wherein the first branch in the feature adaptive fusion module is an identity mapping, the second branch is two layers of 3×3 convolutional layers in series, and the third branch is a hole convolution layer with a hole rate of 2.
4. The method for realizing the whole process of automated image recognition and garbage classification based on AI calculation according to claim 3 is characterized in that: The fusion feature map is enhanced by channel attention and spatial attention mechanism, and feature shuffling is performed to obtain an enhanced feature map, including: The fused feature map is divided into 8 feature groups according to the channel dimension, each feature group contains 64 channels, a 128-dimensional feature vector is generated for each feature group through global average pooling and global maximum pooling, and the 128-dimensional feature vector is reduced and increased in dimension to obtain a channel weight vector; Normalizing the channel weight vector within the group by a softmax function to generate a weight coefficient in the range of 0-1, weighting the weight coefficient and the corresponding feature group by channel, and reorganizing the weighted features in the original order to obtain primary channel enhancement features; The feature response of the primary channel enhancement feature is calculated in the spatial dimension, the mean and standard deviation statistics are calculated for the feature value at each position, and the mean and standard deviation statistics are concatenated and input into a 3×3 convolutional layer to generate a two-dimensional spatial weight matrix to obtain a spatial attention map; Performing spatial weighting on the primary channel enhancement feature according to the spatial attention map, multiplying the attention value with the feature vector at the corresponding position to obtain a spatial enhancement feature; Perform cross-channel information interaction on the spatial enhancement features, randomly divide the features into 16 groups, each with 4 channels, perform random channel permutation within the group, reconstruct the features through a 3×3 convolutional layer, and obtain shuffled features; Input the shuffled features into a two-branch attention network, wherein the first branch in the two-branch attention network calculates the channel attention score through global pooling and 1×1 convolution, and the second branch calculates the spatial attention score through spatial pooling and 7×7 convolution, and the attention scores of the two branches in the two-branch attention network are multiplied to obtain a joint attention weight; The shuffled features are weighted according to the joint attention weights, and an enhanced feature map is obtained through feature transformation and channel reorganization operations.
5. The method for realizing the whole process of automated image recognition and garbage classification based on AI calculation according to claim 4 is characterized in that: The step of inputting the enhanced feature map into three parallel target detection units to generate candidate regions, and performing overlap calculation and region merging on the candidate regions to obtain garbage location data includes: Inputting the enhanced feature map into a first target detection unit, the first target detection unit comprises four convolutional layers, each of which has a convolution kernel size of 3×3, a channel number of 256, 256, 128, and 128, respectively, and a receptive field size of 16×16, to obtain a small target feature map; Inputting the enhanced feature map into a second target detection unit, the second target detection unit comprises four convolutional layers, each of which has a convolution kernel size of 3×3, a number of channels of 512, 512, 256, and 256, respectively, and a receptive field size of 32×32, to obtain a mid-target feature map; Inputting the enhanced feature map into a third target detection unit, the third target detection unit comprises four convolution layers, each of which has a convolution kernel size of 3×3, a channel number of 1024, 1024, 512, 512, and a receptive field size of 64×64, to obtain a large target feature map; The small target feature map, the medium target feature map, and the large target feature map are respectively passed through two parallel 1×1 convolutional layers, one for generating category confidence scores of 2K channels, and the other for generating bounding box regression parameters of 4K channels, where K is the preset number of anchor boxes, to obtain a multi-scale prediction result; According to the multi-scale prediction results, four vertex coordinate offsets and confidence scores are calculated for each preset anchor box, wherein the size of the small target anchor box is set to {16×16, 32×16, 16×32}, the size of the medium target anchor box is set to {32×32, 64×32, 32×64}, and the size of the large target anchor box is set to {64×64, 128×64, 64×128}, to obtain the original candidate region; For regions in the original candidate region with confidence scores greater than 0.3, the intersection-and-union ratios between the two regions are calculated, and the regions with intersection-and-union ratios greater than 0.5 are screened using a soft non-maximum suppression algorithm, and the locally optimal candidate boxes are retained to obtain the screened candidate regions; The screened candidate regions are merged, weight coefficients are set to 0.2, 0.3 and 0.5 respectively according to the confidence of detection units of different scales, and the bounding box coordinates of the overlapping regions are weighted averaged to obtain a merged candidate region; The merged candidate region is input into a boundary refinement network, which includes three fully connected layers, the number of neurons is 1024, 512 and 256 respectively, and each layer is followed by a ReLU activation function and a Dropout layer to obtain garbage location data.
6. The method for realizing the whole process of automated image recognition and garbage classification based on AI calculation according to claim 5 is characterized in that: The calculating the probability density distribution data of the garbage category nodes based on the garbage location data, the weight data vector and the spectrum data matrix includes: The garbage location data is used as state input to construct a state transition equation of a second-order Markov process. The state vector includes two parts: position coordinates and category labels. The position coordinates are represented by a four-dimensional vector, and the category labels are represented by one-hot encoding. The state transition probability is modeled through a 128-dimensional hidden state space to obtain a state space model. The weight data vector is feature expanded by using a three-layer fully connected network with 64, 128 and 256 neurons respectively, and each layer uses a tanh activation function to map the weight feature to the same dimension as the state space, thereby obtaining a weight observation model; The spectral data matrix is subjected to feature decomposition by wavelet transform, wavelet coefficients with energy accounting for more than 95% are selected, and feature mapping is performed through a 256-dimensional fully connected layer to obtain a spectral observation model; The state space model, the weight observation model and the spectral observation model are used as basic elements of a factor graph to construct a three-layer factor graph structure, wherein the first layer is a state node layer, the second layer is a feature conversion layer, and the third layer is an observation node layer, and the nodes are connected by factor functions to obtain a multimodal factor graph; Based on the multimodal factor graph, a local likelihood estimation method is used to initialize node probabilities, Gaussian distribution is used for state nodes, and t distribution is used for observation nodes. The message transmission weights between nodes are determined by the maximum entropy criterion to obtain an initial probability model. The variational inference algorithm is applied to the initial probability model, and the node probability distribution is iteratively optimized by minimizing the KL divergence. The convergence threshold is set to 1e-6 and the maximum number of iterations is set to 100, so as to obtain the probability density distribution data of the garbage category nodes.
7. The method for realizing the whole process of automated image recognition and garbage classification based on AI calculation according to claim 6 is characterized in that: The method of performing multi-level feature processing and effective feature screening based on the probability density distribution data of the garbage category nodes and outputting the target garbage classification results includes: The probability density distribution data of the garbage category node is input into the feature mapping layer in the first feature calculation module, wherein the feature mapping layer comprises three fully connected layers in series, and the number of neurons is 1024, 512 and 256 respectively, and each layer is connected to a parameterized ReLU activation function and a batch normalization layer, and the negative slope parameter is set to 0.2, to obtain the first feature transformation data; Calculating a feature correlation matrix for the first feature transformation data in the feature selection layer of the first feature calculation module, using the Spearman rank correlation coefficient for calculation, and selecting a feature subset based on a maximum spanning tree algorithm, eliminating redundant features with a correlation greater than 0.85, to obtain a first screening feature; Input the first screening features into the feature mapping layer in the second feature calculation module, which adopts a self-attention architecture, the number of attention heads is set to 8, the dimension of each head is 64, the dropout ratio is 0.1, and the residual connection coefficient is 0.5, to obtain the second feature transformation data; The feature importance of the second feature transformation data is evaluated in the feature selection layer of the second feature calculation module, the feature weight is calculated by combining the Shapley value and LASSO regularization, the importance threshold is set to 0.4, and the features with weights greater than the threshold are retained to obtain the second screening features; The second screening features are input into the feature mapping layer in the third feature calculation module, which constructs a bidirectional gated recurrent unit network with a hidden layer dimension of 256 and a layer number of 2. Each layer adds layer normalization and residual connection, and the timing step length is 8, to obtain the third feature transformation data; The conditional mutual information maximization analysis is performed on the third feature transformation data in the feature selection layer of the third feature calculation module, the benchmark mutual information value is set to 0.25, and the feature subset is iteratively selected through the greedy search algorithm to retain the feature combination that maximizes the category distinction, so as to obtain the third screening feature; The category probability is calculated for the third screening feature to obtain prediction results of multiple branches, and the prediction results of the multiple branches are comprehensively analyzed to obtain the target garbage classification result.
8. A device for realizing the whole process of automated image recognition and garbage classification based on AI computing, characterized in that: A method for implementing the entire process of automated image recognition and garbage classification based on AI computing as described in any one of claims 1 to 7, comprising: The acquisition module is used to collect multimodal data of the garbage to be identified, and obtain image data matrix, weight data vector and spectrum data matrix; An extraction module, used for extracting semantic features and detail features from the image data matrix to obtain a fused feature map; An enhancement module, used to enhance the fused feature map by channel attention and spatial attention mechanisms, and perform feature shuffling to obtain an enhanced feature map; A detection module, used for inputting the enhanced feature map into three parallel target detection units, generating candidate regions, and performing overlap calculation and region merging on the candidate regions to obtain garbage location data; A calculation module, used for calculating the probability density distribution data of the garbage category nodes based on the garbage location data, the weight data vector and the spectrum data matrix; The output module is used to perform multi-level feature processing and effective feature screening based on the probability density distribution data of the garbage category nodes, and output the target garbage classification results.
9. An AI-based automated image recognition garbage classification full-process implementation device, characterized in that: The device for realizing the whole process of automated image recognition and garbage classification based on AI calculation includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory so that the device for implementing the entire process of automated image recognition and garbage classification based on AI computing executes the method for implementing the entire process of automated image recognition and garbage classification based on AI computing as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for realizing the entire process of automated image recognition and garbage classification based on AI calculation as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Ecological environment protection system for sorting management of historical remaining solid wastes
CN119549428A
Method, device and equipment for generating image from text and medium
CN119722875A
Data analysis system based on mass spectrum detection platform
CN119936168A
Intelligent household garbage sorting system and method based on machine vision
CN120001667A
Ship power data processing system and method and medium
CN120086695A