Intelligent garbage classification method and system based on ARM architecture

By embedding the AlexNet neural network into the ARM architecture and combining it with multi-sensor and online knowledge distillation technology, the problems of insufficient computing power and limited resources of edge devices are solved, and efficient and accurate waste sorting is achieved.

CN117611915BActive Publication Date: 2026-07-07HUAZHONG NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG NORMAL UNIV
Filing Date
2023-12-13
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing smart waste sorting technologies suffer from insufficient computing power and limited resources in edge devices, as well as reliance on IoT transmission, resulting in low sorting accuracy, low efficiency, and slow recognition speed.

Method used

The AlexNet neural network is embedded into the ARM architecture, combined with multi-sensor multimodal feature acquisition, and an adaptive weighted fusion algorithm and online knowledge distillation technology are adopted. The weight calculation is optimized through the Q-learning algorithm to achieve incremental learning and weighted fusion decision-making.

Benefits of technology

In resource-constrained environments, we can improve the accuracy and efficiency of waste sorting, reduce computational complexity, avoid forgetting problems in incremental learning, and achieve fast and accurate waste sorting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117611915B_ABST
    Figure CN117611915B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent garbage classification method and system based on an ARM architecture, and belongs to the technical field of image processing.The application embeds an AlexNet neural network into the ARM architecture, and is used for garbage classification and identification, so that the requirements of high accuracy, short identification time and model updatable are met.Meanwhile, online knowledge distillation technology is used for category incremental learning, so that the performance of the embedded AlexNet network is further improved, and the forgetting problem caused by the incremental learning is avoided.In addition, a plurality of characteristic data are collected through an external multi-sensor, and a self-adaptive weighted fusion algorithm is used, wherein the weight uses a Q-learning algorithm to avoid misjudgment caused by hidden image information and unobvious image characteristics, and the accuracy and generalization ability of garbage classification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to an intelligent waste sorting method and system based on ARM architecture. Background Technology

[0002] Current intelligent waste sorting technologies generally adopt image recognition technology based on convolutional neural networks. This involves using a camera to collect image data of the waste to be sorted, and then inputting the image features into a convolutional neural network model to complete the sorting task. However, the problems include: low sorting accuracy when image features are not obvious or are hidden; and the high computing power and memory required for convolutional neural network models, making it difficult to embed them into edge devices.

[0003] To improve the classification accuracy of intelligent waste sorting technology, a technique combining multimodal features collected by multiple sensors for fusion recognition has been proposed. However, this technique introduces multiple sensors for fusion recognition, which requires more computing power on the basis of the convolutional neural network model, making it more difficult to apply to edge devices and reducing the efficiency of recognition and classification.

[0004] With the rise of the Internet of Things (IoT), IoT-based smart waste sorting technology has emerged. This technology connects backend servers and edge devices via IoT, transmitting data collected at the edge to the server's backend neural network model for identification, and then transmitting the identification results back to the edge devices. The drawbacks of this technology are its heavy reliance on IoT transmission and backend servers, resulting in slow identification speeds and high requirements for the backend servers.

[0005] Problems to be solved in existing technologies:

[0006] 1. The conflict between neural network models and ARM computing power. How to effectively embed the AlexNet neural network into the ARM architecture while ensuring high computing performance in resource-constrained environments.

[0007] 2. Incremental Learning Problem of Embedded Non-Dynamic Neural Networks. How to design and implement an online knowledge distillation algorithm to achieve incremental learning of an embedded AlexNet network, thereby avoiding the problem of performance degradation caused by directly training the model with new class samples when facing streaming data, which leads to the model forgetting old class data. It is necessary to ensure that the model can resist catastrophic forgetting while learning new classes, thereby further improving the network's performance.

[0008] 3. Implementation of a lightweight multi-sensor fusion algorithm. How to select and configure suitable sensors, and design an adaptive weighted fusion algorithm to obtain more accurate garbage classification results on a Raspberry Pi? Quantize and encode data from different sensors to enable weighted fusion. Calculate matching weights to avoid data divergence and low decision generalization ability. Summary of the Invention

[0009] This invention embeds the AlexNet neural network into an ARM architecture for waste classification and recognition, achieving high accuracy, short recognition time, and model updability. Simultaneously, online knowledge distillation technology is used for incremental category learning to further improve the performance of the embedded AlexNet network and avoid the forgetting problem associated with incremental learning. Furthermore, multiple external sensors are used to collect various feature data, and an adaptive weighted fusion algorithm is employed. The weights utilize Q-learning to avoid misjudgments caused by hidden image information and unclear image features, thereby improving the accuracy and generalization ability of waste classification.

[0010] The overall objective of this invention is as follows: to apply deep learning methods to an intelligent waste sorting system based on ARM architecture, and to design a lightweight neural network algorithm by combining multi-sensor and incremental learning technologies. While ensuring high accuracy, the complexity of the network model is reduced and the computing speed is accelerated, so that the waste sorting system can efficiently sort waste.

[0011] The technical solution of this invention is an intelligent waste sorting method based on ARM architecture, comprising the following steps:

[0012] S1. Collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset, kitchen waste dataset, hazardous waste dataset, and other waste dataset; train the convolutional neural network based on the collected datasets;

[0013] S2, configures a Linux operating environment to embed convolutional neural networks into an ARM-based platform, and performs garbage classification based on image data in the dataset;

[0014] S3, based on online knowledge distillation, updates and optimizes the embedded convolutional neural network online through teacher and student models;

[0015] S4 uses multiple sensors to collect various features of the waste to be classified, and performs one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm.

[0016] S5 uses the Q-learning algorithm to perform adaptive weight calculation, assigning weights to each collected feature value and the garbage classification result obtained by the convolutional neural network based on image features; it then performs a weighted fusion algorithm, combining the recognition results of the convolutional neural network with features collected by other sensors to make fusion decisions, and finally provides the garbage classification result obtained by the garbage classification system.

[0017] Furthermore, the convolutional neural network is AlexNet, which contains 8 layers: the first five layers are convolutional layers, the remaining three are fully connected layers, and the output of the last fully connected layer is fed into softmax to generate a distribution of multi-class labels.

[0018] Furthermore, the mean squared error loss function is used in the training of convolutional neural networks, and its calculation formula is as follows:

[0019]

[0020] J(θ) represents the loss function, n represents the number of samples, and h θ Let represent a convolutional neural network model, where θ is any parameter of the model, and x (i) This indicates that the model is working on the i-th input sample, y (i) x represents (i) The corresponding real tags;

[0021] For training the parameters of a convolutional neural network, gradient descent is used to adjust the network parameters in the direction that decreases the value of the loss function, i.e., in the opposite direction of the gradient of the loss function. The training formula for gradient descent is expressed as:

[0022]

[0023] in, Represented as the learning rate, Let θ be the gradient of the loss function. t and θ t+1 These represent the network parameters before and after training, respectively.

[0024] Furthermore, the formula for online knowledge distillation in step S3 is as follows;

[0025]

[0026] Where C represents the number of predictions output by the last fully connected layer of the convolutional neural network, i.e., the number of image categories to be classified, and z i P represents the category prediction result corresponding to the i-th class. i This represents the classification probability corresponding to the image category, and T represents the temperature coefficient, which is used to control the degree of softening of the output probability.

[0027] Furthermore, in step S3, the online knowledge distillation uses the following loss function to train the teacher model and the student model;

[0028]

[0029]

[0030] Among them, P i T and qi T Let represent the probability distributions of the teacher model and the student model after distillation at temperature T, respectively. N represents the number of predictions output by the last fully connected layer of the convolutional neural network, i.e., the number of image categories classified. j The specific prediction results of the teacher model; the loss of the entire model consists of the loss L between the predicted values ​​and the actual values ​​of the student model. soft And the cross-entropy loss L after distillation of the teacher model and the student model hard The structure is as shown in the formula:

[0031] L=αL soft +(1-a)L hard

[0032] Where 'a' is the balance factor.

[0033] Furthermore, in step S4, multiple sensors are used to collect various characteristics of the waste to be sorted, including weight sensors and metal detection sensors. When the waste to be sorted is placed in the detection area, the sensors extract its weight and metal characteristics.

[0034] Furthermore, adaptive weight calculation based on the Q-learning algorithm includes:

[0035] 1) Define the State: Define the current input situation as the state, which consists of sensor data and the classification results of the convolutional neural network;

[0036] 2) Define Action: Define a set of possible weight adjustment actions, each action corresponding to a different way of adjusting the weights;

[0037] 3) Define Reward: Define a reward function to evaluate the quality of the current state and the action taken. The reward function is evaluated based on the classification accuracy and the confidence of the classification result.

[0038] 4) Construct the Q-Table: Create a Q-table to store the Q-values ​​of states and actions. The Q-value represents the expected long-term reward of taking a specific action in a given state.

[0039] 5) Initialize the Q-table: Initialize all Q-values ​​in the Q-table to their initial values;

[0040] 6) Iterative training: In each training iteration, select an action from the Q-table based on the current state. Use the ε-greedy strategy to select an exploratory action with a certain probability and the best action selected based on the current Q value with a higher probability.

[0041] 7) Perform actions and observe rewards: Adjust the weights based on the selected actions, perform the classification task, and observe the classification results and rewards.

[0042] 8) Update Q-values: Based on the observed rewards, update the Q-values ​​in the Q-table using the Q-Learning algorithm. The update formula is as follows:

[0043] Q′=Q(s,a)+α*(r+γ*max(Q(s′,a′))-Q(s,a))

[0044] Where Q(s, a) represents the Q value of taking action a in state s, r is the observed reward, α is the learning rate, γ is the discount factor, s′ is the next state, a′ is the learning rate of the next state, and Q′ represents the updated Q value.

[0045] 9) Repeat steps 6) to 8) until the predetermined number of training rounds or convergence criteria are reached.

[0046] Furthermore, the formula for the weighted fusion algorithm is:

[0047] x_fusion=w_image*x_image+w_text*x_text+w_weiqht*x_weight

[0048] Where x_image represents the classification result of the convolutional neural network, x_text represents the encoding result of the metal sensor data, x_weight represents the processing result of the weight sensor data, and x_fusion represents the final weighted decision value; w_image, w_text, and w_weight are the weights.

[0049] This invention also provides an intelligent waste sorting system based on ARM architecture, comprising the following modules:

[0050] The first module is used to collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset, kitchen waste dataset, hazardous waste dataset, and other waste dataset; and to train the convolutional neural network based on the collected datasets.

[0051] The second module is used to configure the Linux operating environment, enabling the embedding of convolutional neural networks into an ARM-based platform, and to perform garbage classification based on image data in the dataset.

[0052] The third module is used for online knowledge distillation, which updates and optimizes the embedded convolutional neural network online through teacher and student models.

[0053] The fourth module is used to collect various features of the waste to be classified using multiple sensors, and to perform one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm.

[0054] The fifth module is used to perform adaptive weight calculation based on the Q-learning algorithm, assigning weights to the collected feature values ​​and the garbage classification results obtained by the convolutional neural network based on image features; performing a weighted fusion algorithm, combining the recognition results of the convolutional neural network with the features collected by other sensors to make fusion decisions, and giving the final garbage classification results obtained by the garbage classification system.

[0055] The objective of this invention is as follows:

[0056] 1. An Embeddable Garbage Classification and Recognition Method Based on AlexNet. This research will investigate how to embed the AlexNet neural network into the ARM architecture for garbage classification and recognition in resource-constrained environments. This will involve adapting and optimizing the AlexNet network structure to achieve high computational performance on the ARM architecture.

[0057] 2. Research on Incremental Learning Method of AlexNet Based on Online Knowledge Distillation. This study utilizes online knowledge distillation technology to incrementally learn from an already embedded AlexNet network, further improving its performance. Online knowledge distillation is a technique that gradually introduces new data samples into an existing model, reducing reliance on the original training data, improving the model's adaptability and generalization ability, and avoiding the forgetting problem during incremental learning.

[0058] 3. An optimized classification algorithm based on Q-learning adaptive weighted fusion. Multiple sensors, such as weight sensors and metal sensors, are connected to the Raspberry Pi to acquire multimodal features of the waste to be detected. Simultaneously, an adaptive weighted fusion algorithm is used to fuse the sensor data with the output of the embedded AlexNet network for decision-making, thereby improving the accuracy and robustness of waste classification.

[0059] 4. ARM-based Intelligent Waste Sorting System. This system implements the AlexNet neural network algorithm for waste sorting on the ARM architecture, based on knowledge distillation technology and a weighted fusion algorithm. While maintaining a certain level of sorting accuracy, it reduces the computational complexity of the neural network model, decreases memory consumption of network parameters, and simultaneously improves the network's computational speed. Attached Figure Description

[0060] Figure 1 Here is a diagram of the overall architecture of AlexNet;

[0061] Figure 2 Design a block diagram for the system hardware;

[0062] Figure 3 For Raspberry Pi 4B;

[0063] Figure 4 It is a metal sensor;

[0064] Figure 5 It is a weight sensor;

[0065] Figure 6 For testing purposes; (Image of the actual product)

[0066] Figure 7 This is a flowchart of the method of the present invention. Detailed Implementation

[0067] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0068] The technical solution provided by this invention is: an intelligent waste sorting method based on ARM architecture, comprising the following steps:

[0069] S1. Collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset; food waste dataset; hazardous waste dataset; and other waste dataset. Train the convolutional neural network based on the collected datasets.

[0070] S2, configured with a Linux operating environment, enables the embedding of a convolutional neural network into an ARM-based Raspberry Pi 4B platform for garbage classification based on image data in the dataset.

[0071] S3, based on online knowledge distillation, uses a teacher model to update and optimize the embedded convolutional neural network online.

[0072] S4 uses multiple sensors to collect various features of the waste to be classified, and performs one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm.

[0073] S5 uses the Q-learning algorithm to perform adaptive weight calculation, assigning weights to each collected feature value and the garbage classification result obtained by the convolutional neural network based on image features. A weighted fusion algorithm is then applied, combining the convolutional neural network recognition results with features collected from other sensors to make a fusion decision, and finally providing the garbage classification result obtained by the garbage classification system.

[0074] Furthermore, in S1, the garbage images are divided into four categories: recyclables, kitchen waste, hazardous waste, and other waste. Recyclable waste mainly includes waste paper and bottle caps; kitchen waste mainly consists of fruit peels; hazardous waste includes used batteries and masks; and other waste includes other household waste not listed above, mainly packaging bags and waste toilet paper. When collecting the dataset, it is necessary to ensure the completeness of the collected data, encompassing all situations within the garbage detection range to avoid classification blind spots or unclassifiable issues. Therefore, during data collection, garbage is randomly thrown within the camera's capture range, and images are captured from different angles, while ensuring the randomness of image position and shape.

[0075] The convolutional neural network is AlexNet, which features a small model size, high accuracy in classification and recognition, and fast classification speed. Figure 1 The overall architecture of AlexNet is described. For example... Figure 1 As shown, the network consists of 8 layers; the first five are convolutional layers, and the remaining three are fully connected layers. The output of the last fully connected layer is fed into a 1000-channel softmax, which produces a distribution of 1000 class labels.

[0076] The kernels of the second, fourth, and fifth convolutional layers are connected only to the kernel mappings of the previous layer located on the same GPU. The kernel of the third convolutional layer is connected to all kernel mappings of the second layer. Neurons in the fully connected layers are connected to all neurons in the previous layer. The response normalization layer follows the first and second convolutional layers. ReLU nonlinearity is applied to the output of each convolutional and fully connected layer.

[0077] The first convolutional layer filters a 224×224×3 input image using 96 kernels of size 11×11×3, with a stride of 4 pixels (the distance between the centers of the receptive fields of adjacent neurons in the kernel map). The second convolutional layer takes the output of the first convolutional layer (response normalization and pooling) as input and filters it using 256 kernels of size 5×5×48. The third, fourth, and fifth convolutional layers are interconnected without any intermediate pooling or normalization layers. The third convolutional layer has 384 kernels of size 3×3×256, which are connected to the (normalized, pooled) output.

[0078] To optimize PC performance and model size, training will be performed on a GPU, but testing will be conducted on the CPU. The required environment is as follows:

[0079] Keras: 2.2.0

[0080] OpenCV: 3.4

[0081] Python: 3.6

[0082] Numpy: 1.16

[0083] In neural network training, a loss function is used to measure the difference between the network model's predicted values ​​and the true values ​​of input samples, evaluating the model's ability to predict samples. By training and optimizing the neural network model, the value of the loss function can be reduced, thereby narrowing the gap between the predicted and true values. When the value of the loss function decreases, the performance of the neural network model also improves. The mean squared error loss function used in training is the mean of the sum of squares of the errors between the predicted and true values ​​of the corresponding samples. The mean squared error loss function is as follows:

[0084]

[0085] J(θ) represents the loss function, n represents the number of samples, and h θ Let θ represent a neural network model, where θ is any parameter of that model. (i) This indicates that the model is working on the i-th input sample, y (i) x represents (i) The corresponding real tags.

[0086] For training neural network parameters, gradient descent is used to adjust the parameters in the direction that decreases the value of the loss function, i.e., the opposite direction of the loss function's gradient. The training formula for gradient descent is expressed as:

[0087]

[0088] in, This is expressed as the learning rate. Let θ be the gradient of the loss function. t and θ t+1 These represent the network parameters before and after training, respectively.

[0089] Furthermore, in S2, the system software controls the entire system and is implemented under an embedded Linux operating system. In the system software design, image acquisition is achieved by calling OpenCV library functions within the Linux system, and the images are cropped to the size of the neural network input; the TensorFlow library is then used to run a convolutional neural network model for recognition.

[0090] The principles of each part of a convolutional neural network are as follows:

[0091] Convolutional layers: The weights of all convolutional kernels are trained and optimized using the backpropagation algorithm. In a convolutional neural network, high-level features of an image, such as color, texture, and shape, are extracted progressively through multiple convolutional layers.

[0092] The convolution operation formula is as follows, where w represents a convolution kernel of size (j, k), x represents an input feature map of size (R, C), and b represents the bias. After the input feature map x undergoes the convolution operation, the output feature map y is obtained.

[0093]

[0094] Activation Layer: Since convolution is a linear operation, it is difficult to fit complex data. Therefore, non-linear activation is needed to improve the expressive power of the neural network and fit complex datasets. In this invention, the ReLU function is used as the activation function, and its function curve is shown below. Figure 3 As shown, its expression is as follows:

[0095]

[0096] Fully connected layers: After convolutional layers in a convolutional neural network extract features from an image, a classifier is needed to classify the image based on the extracted features. In a convolutional neural network, fully connected layers are used after the network to synthesize the local features extracted by the convolutional layers, calculate and compare the scores of the input image in each category, and determine the category to which the input image belongs.

[0097] In multi-class image classification tasks, the classification results are converted into the probability of an image belonging to each category. The Softmax function normalizes the classification results of the last fully connected layer of the network, constraining all classification results to the range (0, 1), thus obtaining the classification probabilities for multiple categories. The formula for the Softmax function is:

[0098]

[0099] Where C represents the number of predictions output by the last fully connected layer, i.e., the number of image categories to be classified, and z i P represents the category prediction result corresponding to the i-th class. i This represents the classification probability corresponding to the image category. In AlexNet, the parameters of fully connected layers account for approximately 90% of the total network parameters.

[0100] Furthermore, knowledge distillation is performed on the embedded convolutional neural network in S3.

[0101] Output layer distillation mainly involves softening the learned output layer knowledge in a certain way and using it as the learning target of the student model. Temperature is introduced to soften the Softmax output classification information.

[0102]

[0103] Among them, P iFor each category's output probability, T represents a temperature coefficient that controls the degree of softening of the output probability. When T = 1, the formula degenerates into a softmax function. When T is larger, a softer probability distribution is obtained.

[0104] The teacher model used in the distillation framework is a pre-trained model with excellent learning, representation, and generalization capabilities. During training, the student model softens its learned classification predictions to fit the teacher model, while simultaneously fitting its unsoftened classification predictions to the sample labels. The probability distributions obtained after softmaxing the teacher-student networks represent the information distributions of their respective predictions for the classification task. Therefore, optimizing the cross-entropy loss between the two models is used to measure the goal of knowledge transfer, guiding the student model to learn and fit the probability distribution of the teacher model. i T and q i T Let T represent the probability distributions of the teacher and student models after distillation at a temperature T.

[0105]

[0106]

[0107] Where N represents the number of prediction results output by the last fully connected layer, i.e., the number of image categories to be classified, and c j The specific prediction results of the teacher model are typically one-hot encoded for each category, which are the hard label values ​​(0 or 1) of the corresponding category in the teacher model. j 1 This represents the case where the temperature is T=1. The loss of the entire model consists of the loss L between the student model's predicted value and the actual value. soft And the cross-entropy loss L after distillation of the teacher model and the student model hard The structure is as shown in the formula:

[0108] L=αL soft +(1-a)L hard

[0109] Where 'a' is the balance factor.

[0110] Furthermore, as described in S4, multiple sensors are used to collect various characteristics of the waste to be sorted, including weight sensors (such as...). Figure 5 ) and metal detection sensors (such as Figure 4When the waste to be detected is placed in the detection area, the sensor extracts its weight and metal features. Since the AlexNet classification results and metal features are text, they need to be converted into numerical representations using one-hot encoding. One-hot encoding: Each classification result is represented as a binary vector, with the vector length equal to the number of categories. The corresponding category position is set to 1, and other positions are set to 0. For example, assuming there are 3 categories: A, B, and C, and the classification result is B, then the one-hot encoded representation is [0, 1, 0].

[0111] Furthermore, in S5, adaptive weight calculation is performed based on the Q-learning algorithm to assign weights to the collected feature values ​​and the garbage classification results obtained by the convolutional neural network based on image features.

[0112] Weights play a decisive role in classification decisions, therefore an adaptive weighting algorithm is needed. A feedback mechanism and learning algorithm are introduced to adaptively adjust the weights. The Q-Learning algorithm is employed to adjust the weights based on model performance and the confidence level of the classification results.

[0113] The Q-value represents the expected long-term reward of taking a certain action in a given state. It measures how good or bad it is to take a particular action in a specific state. There is a corresponding Q-value for each state-action pair.

[0114] A Q-table is a two-dimensional table used to store the Q-values ​​of states and actions. Rows represent different states, columns represent different actions, and each cell stores the Q-value for the corresponding state-action pair. By updating and iterating the Q-table, the optimal Q-value for taking different actions in different states can be learned.

[0115] The following is a process of adaptive weight adjustment based on feedback mechanism and Q-Learning algorithm:

[0116] 1) Define the State: Define the current input state. The state can consist of sensor data, AlexNet classification results, and other relevant information. For example, sensor data and AlexNet classification results can be used as part of the state.

[0117] 2) Define Actions: Define a set of possible weight adjustment actions. Each action corresponds to a different way of adjusting the weights. For example, increasing the weight of a specific category, decreasing the weight of a specific category, or adjusting the overall weight.

[0118] 3) Define the reward: Define a reward function to evaluate the quality of the current state and the action taken. The reward function should be evaluated based on classification accuracy and the confidence level of the classification results.

[0119] 4) Construct the Q-Table: Create a Q-table to store the Q-values ​​of states and actions. The Q-value represents the expected long-term reward of taking a specific action in a given state.

[0120] 5) Initialize the Q table: Initialize all Q values ​​in the Q table to their initial values.

[0121] 6) Iterative training: In each training iteration, an action is selected from the Q-table based on the current state. An ε-greedy strategy can be used to select an exploratory action with a certain probability, while selecting the best action based on the current Q-value with a higher probability.

[0122] 7) Perform the action and observe the reward: Adjust the weights based on the selected action and perform the classification task. Observe the classification results and the reward.

[0123] 8) Update Q-values: Based on the observed rewards, update the Q-values ​​in the Q-table using the Q-Learning algorithm. The update formula is as follows:

[0124] Q(s,a)=Q(s,a)+α*(r+γ*max(Q(s′,a′))-Q(s,a))

[0125] Where Q(s, a) represents the Q value of taking action a in state s, r is the observed reward, α is the learning rate, γ is the discount factor, s′ is the next state, and a′ is the learning rate of the next state.

[0126] 9) Repeat steps 6 to 8 until the predetermined number of training rounds or convergence criteria are reached.

[0127] The learned weights are applied during the application phase. These weights are then used to weightedly fuse sensor data and AlexNet classification results for garbage classification decisions. Through iterative training and Q-value updates, the algorithm gradually adjusts the weights, resulting in better performance and adaptability under different input conditions.

[0128] A weighted fusion algorithm is used to combine the results of convolutional neural network recognition with features collected from other sensors to make a fusion decision, and the final waste sorting result obtained by the waste sorting system is given. The steps are as follows:

[0129] 1) Data acquisition by multiple sensors

[0130] 2) Image classification – x_image

[0131] 3) Metal sensor data encoding – x_text

[0132] 4) Weight sensor data processing – x_weight

[0133] 5) Weight allocation: w_image, w_text, w_weight, which is the Q value obtained earlier;

[0134] 6) Weighted fusion: x_fusion = w_image*x_image + w_text*x_text + w_weight*x_weight, where x_fusion represents the final weighted decision value;

[0135] 7) Perform final decision classification based on x_fusion

[0136] First, the convolutional neural network is trained using a dataset. The training is performed on a PC-based GPU. The training dataset is shown in Table 1 below, and the number of training iterations is set to 5000.

[0137] Table 1

[0138]

[0139] Using CoatNet as the knowledge distillation teacher model, the teacher model was trained 5000 times using the same training dataset. Online knowledge distillation was then performed on the embedded AlexNet, with the distillation temperature T = 0.85 and the balancing factor a = 0.6 to complete incremental learning. The test datasets in Table 2 below were used for testing.

[0140] Table 2

[0141]

[0142]

[0143] The test results are shown in Table 3:

[0144] Table 3

[0145]

[0146] The test results show that using online knowledge distillation improves the recognition and classification accuracy of the embedded AlexNet without causing knowledge forgetting problems due to incremental learning.

[0147] Next, multi-sensor features were used, and a weighted fusion algorithm was employed for weighted fusion decision-making. Testing was conducted with physical objects, including 96 items across four waste categories: recyclable waste (milk cartons, mineral water bottles, etc.), kitchen waste (apples, bananas, etc.), hazardous waste (batteries, light bulbs, etc.), and other waste (toilet paper, ceramics, etc.). The test results showed a classification accuracy of 96.8% and an average time of 0.12 seconds to identify a single piece of waste.

[0148] Key points of the invention

[0149] 1. A Garbage Classification and Recognition Method Based on AlexNet. This study embeds the AlexNet neural network into the ARM architecture to perform garbage classification and recognition in resource-constrained environments. The AlexNet network structure is adapted and optimized to achieve high computational performance on the ARM architecture.

[0150] 2. Incremental Learning Method for AlexNet Based on Online Knowledge Distillation. This method utilizes online knowledge distillation to incrementally learn from the already embedded AlexNet network, further improving its performance. Online knowledge distillation is a technique that gradually introduces new data samples into the existing model, reducing reliance on the original training data, improving the model's adaptability and generalization ability, and avoiding the forgetting problem during incremental learning.

[0151] 3. An optimized classification algorithm based on Q-learning adaptive weighted fusion. Multiple sensors, such as weight sensors and metal sensors, are connected to the Raspberry Pi to acquire multimodal features of the waste to be detected. Simultaneously, an adaptive weighted fusion algorithm is used to fuse the sensor data with the output of the embedded AlexNet network for decision-making, thereby improving the accuracy and robustness of waste classification.

[0152] Based on knowledge distillation technology and weighted fusion algorithm, an AlexNet neural network algorithm for waste classification was implemented on the ARM architecture. Data tests were conducted on the system's accuracy, incremental learning curve, and time required per detection. Compared with mainstream visual recognition algorithms, this intelligent waste identification system can reduce the computational complexity of the neural network model, reduce network parameter memory consumption, and improve network computation speed while maintaining a certain level of classification accuracy.

[0153] This invention also provides an intelligent waste sorting system based on ARM architecture, including the following modules:

[0154] The first module is used to collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset, kitchen waste dataset, hazardous waste dataset, and other waste dataset; and to train the convolutional neural network based on the collected datasets.

[0155] The second module is used to configure the Linux operating environment, enabling the embedding of convolutional neural networks into an ARM-based platform, and to perform garbage classification based on image data in the dataset.

[0156] The third module is used for online knowledge distillation, which updates and optimizes the embedded convolutional neural network online through teacher and student models.

[0157] The fourth module is used to collect various features of the waste to be classified using multiple sensors, and to perform one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm.

[0158] The fifth module is used to perform adaptive weight calculation based on the Q-learning algorithm, assigning weights to the collected feature values ​​and the garbage classification results obtained by the convolutional neural network based on image features; performing a weighted fusion algorithm, combining the recognition results of the convolutional neural network with the features collected by other sensors to make fusion decisions, and giving the final garbage classification results obtained by the garbage classification system.

[0159] The specific implementation methods of each module are the same as those of each step, and will not be described in this invention.

[0160] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the invention.

Claims

1. An intelligent waste sorting method based on ARM architecture, characterized in that, Includes the following steps: S1. Collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset, kitchen waste dataset, hazardous waste dataset, and other waste dataset; train the convolutional neural network based on the collected datasets; S2, configures a Linux operating environment to embed convolutional neural networks into an ARM-based platform, and performs garbage classification based on image data in the dataset; S3, based on online knowledge distillation, updates and optimizes the embedded convolutional neural network online through teacher and student models; The formula for online knowledge distillation in step S3 is as follows; Where C represents the number of predictions output by the last fully connected layer of the convolutional neural network, i.e., the number of image categories to be classified, and z i P represents the category prediction result corresponding to the i-th class. i This represents the classification probability corresponding to the image category, and T represents the temperature coefficient, which is used to control the degree of softening of the output probability. S4 uses multiple sensors to collect various features of the waste to be classified, and performs one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm. S5 uses the Q-learning algorithm to perform adaptive weight calculation, assigning weights to each collected feature value and the garbage classification result obtained by the convolutional neural network based on image features; it then performs a weighted fusion algorithm, combining the recognition results of the convolutional neural network with features collected by other sensors to make fusion decisions and give the final garbage classification result. Adaptive weight calculation based on the Q-learning algorithm includes: 1) Define State: Define the current input situation as the state, which consists of sensor data and the classification results of the convolutional neural network; 2) Define Action: Define a set of possible weight adjustment actions, each action corresponding to a different way of adjusting the weights; 3) Define Reward: Define a reward function to evaluate the quality of the current state and the action taken. The reward function is evaluated based on the classification accuracy and the confidence of the classification result. 4) Construct the Q-Table: Create a Q-table to store the Q-values ​​of states and actions. The Q-values ​​represent the expected long-term reward of taking a specific action in a given state. 5) Initialize the Q-table: Initialize all Q-values ​​in the Q-table to their initial values; 6) Iterative training: In each training iteration, select an action from the Q-table based on the current state. Use the ε-greedy strategy to select an exploratory action with a certain probability and the best action selected based on the current Q value with a higher probability. 7) Perform actions and observe rewards: Adjust the weights based on the selected actions, perform the classification task, and observe the classification results and rewards; 8) Update Q-values: Based on the observed rewards, update the Q-values ​​in the Q-table using the Q-Learning algorithm. The update formula is as follows: in, Representing state Take action below of value, It is the observed reward. It's the learning rate. It is a discount factor. The next state is... It is the learning rate for the next state. This represents the updated Q value; 9) Repeat steps 6) to 8) until the predetermined number of training rounds or convergence criteria are reached.

2. The intelligent waste sorting method based on ARM architecture as described in claim 1, characterized in that: The convolutional neural network is AlexNet, which contains 8 layers: the first five layers are convolutional layers, the remaining three are fully connected layers, and the output of the last fully connected layer is fed into softmax to generate a distribution of multi-class labels.

3. The intelligent waste sorting method based on ARM architecture as described in claim 1, characterized in that: The mean squared error loss function is used in the training of convolutional neural networks, and its calculation formula is as follows: Let n represent the loss function, and n represent the number of samples. This represents a convolutional neural network model. Let be any parameter of the model. This indicates that the model is working on the i-th input sample. express The corresponding real tags; For training the parameters of a convolutional neural network, gradient descent is used to adjust the network parameters in the direction that decreases the value of the loss function, i.e., in the opposite direction of the gradient of the loss function. The training formula for gradient descent is expressed as: in, Represented as the learning rate, The gradient of the loss function. and These represent the network parameters before and after training, respectively.

4. The intelligent waste sorting method based on ARM architecture as described in claim 1, characterized in that: In step S3, online knowledge distillation uses the following loss function to train the teacher model and the student model; in, as well as Let T represent the probability distributions of the teacher model and the student model after distillation at temperature T, respectively. N represents the number of prediction results output by the last fully connected layer of the convolutional neural network, i.e., the number of image categories classified. The specific prediction results of the teacher model; the loss of the entire model consists of the loss between the predicted values ​​and the actual values ​​of the student model. And the cross-entropy loss after distillation of the teacher model and the student model. The structure is as shown in the formula: in, It is a balancing factor.

5. The intelligent waste sorting method based on ARM architecture as described in claim 1, characterized in that: In step S4, multiple sensors are used to collect various characteristics of the waste to be sorted, including weight sensors and metal detection sensors. When the waste to be sorted is placed in the detection area, the sensors extract its weight and metal characteristics.

6. The intelligent waste sorting method based on ARM architecture as described in claim 1, characterized in that: The formula for the weighted fusion algorithm is: in, This represents the classification result of the convolutional neural network. This represents the encoded data result from the metal sensor. weight This indicates the results of weight sensor data processing. This represents the final weighted decision value; For weights.

7. An intelligent waste sorting system based on ARM architecture, characterized in that, Includes the following modules: The first module is used to collect the datasets needed to train the convolutional neural network, including: recyclable waste dataset, kitchen waste dataset, hazardous waste dataset, and other waste dataset; and to train the convolutional neural network based on the collected datasets. The second module is used to configure the Linux operating environment, enabling the embedding of convolutional neural networks into an ARM-based platform, and to perform garbage classification based on image data in the dataset. The third module is used for online knowledge distillation, which updates and optimizes the embedded convolutional neural network online through teacher and student models. The formula for online knowledge distillation is as follows; Where C represents the number of predictions output by the last fully connected layer of the convolutional neural network, i.e., the number of image categories to be classified, and z i P represents the category prediction result corresponding to the i-th class. i This represents the classification probability corresponding to the image category, and T represents the temperature coefficient, which is used to control the degree of softening of the output probability. The fourth module is used to collect various features of the waste to be classified using multiple sensors, and to perform one-hot encoding and normalization quantization on the feature values ​​so that they can be used as input values ​​for the weighted fusion algorithm. The fifth module is used to perform adaptive weight calculation based on the Q-learning algorithm, assigning weights to the collected feature values ​​and the garbage classification results obtained by the convolutional neural network based on image features; performing a weighted fusion algorithm, combining the recognition results of the convolutional neural network and the features collected by other sensors to make fusion decisions, and giving the final garbage classification result; Adaptive weight calculation based on the Q-learning algorithm includes: 1) Define State: Define the current input situation as the state, which consists of sensor data and the classification results of the convolutional neural network; 2) Define Action: Define a set of possible weight adjustment actions, each action corresponding to a different way of adjusting the weights; 3) Define Reward: Define a reward function to evaluate the quality of the current state and the action taken. The reward function is evaluated based on the classification accuracy and the confidence of the classification result. 4) Construct the Q-Table: Create a Q-table to store the Q-values ​​of states and actions. The Q-values ​​represent the expected long-term reward of taking a specific action in a given state. 5) Initialize the Q-table: Initialize all Q-values ​​in the Q-table to their initial values; 6) Iterative training: In each training iteration, select an action from the Q-table based on the current state. Use the ε-greedy strategy to select an exploratory action with a certain probability and the best action selected based on the current Q value with a higher probability. 7) Perform actions and observe rewards: Adjust the weights based on the selected actions, perform the classification task, and observe the classification results and rewards; 8) Update Q-values: Based on the observed rewards, update the Q-values ​​in the Q-table using the Q-Learning algorithm. The update formula is as follows: in, Representing state Take action below of value, It is the observed reward. It's the learning rate. It is a discount factor. The next state is... It is the learning rate for the next state. This represents the updated Q value; 9) Repeat steps 6) to 8) until the predetermined number of training rounds or convergence criteria are reached.