Introduction

As urban populations continue to grow, the need for smarter and more efficient waste management systems has become increasingly critical1. The integration of IoT and AI offers a transformative solution for creating greener, safer, and more efficient cities2,3,4. This research proposes an innovative, IoT-based smart container system, designed to optimize waste collection processes and reduce environmental and operational inefficiencies.

The smart container is equipped with an ultrasonic sensor that automatically and periodically scans the fill level inside the waste container, providing real-time updates on waste accumulation5. Once the sensor detects that the container has reached a certain fill threshold, it sends an immediate notification to the waste collector, allowing for more responsive and timely waste collection. This real-time data-driven approach minimizes unnecessary collection trips, ensuring that waste collection vehicles only operate when needed, thereby saving fuel, labor, and time.

Furthermore, AI enhances the system by optimizing collection routes in real-time, helping waste collection vehicles to follow the most efficient paths6. This improvement not only speeds up the collection process but also contributes to reducing carbon emissions, preserving the city’s landscape, and mitigating health and environmental risks associated with waste accumulation.

One of the key components of the proposed system is the use of convolutional neural networks (CNNs) for waste classification. CNNs are a powerful deep learning model specifically designed for image recognition tasks. They are chosen for their ability to efficiently learn patterns from visual data, making them particularly effective for classifying waste materials into categories such as recyclable and non-recyclable. CNNs have been widely used in similar applications due to their high accuracy and ability to generalize from labeled datasets. The choice of CNNs over other AI models, such as recurrent neural networks (RNNs) or transformers, is based on their superior performance in processing and classifying visual data, which is critical for this waste management system where image-based waste identification is essential. The CNN model also benefits from transfer learning, enabling it to be fine-tuned using pre-trained models, thus reducing the computational load while maintaining high classification accuracy.

CNNs not only improve waste classification accuracy but also contribute significantly to energy optimization in waste management systems. By predicting waste accumulation patterns, optimizing collection routes, and reducing unnecessary vehicle trips, CNN-based models help lower fuel consumption and CO2 emissions. AI-driven waste collection systems have been shown to reduce fuel usage by up to 30% and decrease carbon emissions by 20% compared to conventional methods. Additionally, lightweight deep learning architectures minimize computational overhead, making real-time waste classification more energy-efficient7,8,9. The integration of AI with IoT-enabled smart bins further enhances sustainability by optimizing sensor operations and reducing energy wastage in data transmission. These improvements align with smart city initiatives, promoting eco-friendly and efficient waste management solutions.

The novelty of this system lies not only in the use of AI for waste classification but also in its integration with IoT and Blockchain technologies. The system incorporates Blockchain to organize and securely store waste-related data into distinct blocks, ensuring data integrity and security. This decentralized structure guarantees that data is tamper-proof, enhancing the reliability of the system. When the waste data needs to be processed, machine learning models can efficiently retrieve the required information from the blockchain, significantly reducing the latency associated with data access and improving processing speed.

In addition to real-time monitoring and AI-based decision-making, this system leverages advanced machine learning and deep learning classifiers for automatic decision-making and optimization. By analyzing collected data and applying sophisticated algorithms, the system can predict optimal collection schedules and routes, adapt to changes, and continuously improve its functionality, resulting in a more efficient and user-friendly waste management solution.

In summary, this study introduces a novel waste management system that combines real-time monitoring, smart data processing, secure blockchain technology, and AI-based waste classification, offering significant improvements over existing systems in terms of efficiency, scalability, and security. The key contributions of this study are as follows:

  • Real-time monitoring of waste container fill levels through IoT-enabled ultrasonic sensors.

  • Optimization of waste collection routes using AI algorithms, reducing fuel consumption, labor, and environmental impact.

  • Integration of Blockchain technology for secure, tamper-proof data storage and efficient data retrieval.

  • Advanced data preprocessing and machine learning techniques for predictive analysis and decision-making.

  • Development of a hybrid AI system that continuously learns and adapts to improve waste management functionality over time.

  • Reduction of operational costs by minimizing unnecessary waste collection trips and optimizing vehicle routes.

The remaining section of the paper is organized as follows: “Related work” section provides the related works of the research area. The sysem model and proposed model are explained in “System model” and “Methodology” sections. Simulation results, discussion, conclusion and future work are given in “Simulation results”, “Discussion”, “Conclusion” and “Future work” sections respectively. In addition, The list of abbreviations used in this study is provided in Table 1.

Table 1 List of abbreviations.

Related work

Artificial Intelligence (AI) technology has seen a significant rise in its application across various sectors, one of which is solid waste management10. This integration of AI into the waste management process has been instrumental in enhancing the efficiency of the systems from the initial stages of waste collection to its final disposal, as discussed in research by Kolekar et al.11 and Vitorino et al.12. The adoption of AI technologies in this field primarily addresses the growing challenges associated with the increasing volumes of waste and the inefficiencies tied to traditional manual sorting methods.

In an effort to enforce waste segregation policies more effectively, researchers have been exploring the use of AI for the classification and recycling of waste. This shift towards AI-driven methodologies is seen as an essential response to counter the mounting issues of waste accumulation and the limitations of manual classification systems. A detailed literature review by Abdallah et al.13 identifies several AI models that are commonly used for waste classification, including Artificial Neural Networks, Support Vector Machines, Linear Regression, Decision Trees, and Genetic Algorithms. These models significantly improve the accuracy and efficiency of waste sorting, which is a crucial step in the recycling process.

From a commercial perspective, there are primarily three types of AI solutions in the market that cater to waste classification and recycling needs. These include AI-based waste classification software, AI-enhanced waste classification containers, and AI-powered waste sorting machinery. Each product serves a vital role in optimizing the waste management process:

  1. 1.

    AI-based waste classification software enhances the precision in identifying and categorizing different types of waste materials.

  2. 2.

    AI-enhanced waste classification containers help in the initial sorting and categorization of waste right at the source, simplifying the first step of the waste management process.

  3. 3.

    AI-powered waste sorting machinery is utilized in advanced sorting facilities, where it further segregates waste into recyclable and non-recyclable materials, thereby fine-tuning the recycling operations.

These AI advancements not only bolster the effectiveness of waste management practices but also promote environmental sustainability. They contribute to higher recycling rates and reduce dependency on landfills. The ongoing development and integration of AI in waste management are anticipated to bring forth substantial improvements in the sector, enhancing waste handling and resource conservation on a global scale.

Moreover, recent advancements in the field of machine learning, especially through the application of supervised learning techniques and deep convolutional neural networks (CNNs), have shown promising results. A study by Zhao et al. In14 demonstrated that deploying a deep CNN could effectively handle a particularly challenging dataset with high success. The study also revealed that removing even a single convolutional layer from the network could significantly degrade the model’s performance, highlighting the importance of each layer in the network’s overall architecture. Further comparisons within the study assessed the performance of various machine learning models, including Decision Trees, Random Forests, Support Vector Machines (SVM), and Deep Neural Networks. Among these, the CNNs displayed superior accuracy, achieving a remarkable 90% accuracy rate, thus underscoring their potent capability in managing complex data sets more effectively than other popular algorithms.

Building on the effectiveness of CNN, a study by Sandler et al. In15 highlighted the application of a specific CNN architecture known as Xception Net. This model was tested on a Synthetic Aperture Radar Target Recognition Dataset, presenting a multi-class classification challenge. Xception Net was evaluated alongside prominent transfer learning models including VGG16, Resnet152, and Inception V3. The analysis demonstrated that Xception Net surpassed these models in critical performance metrics like Top-1 Accuracy and Top-5 Accuracy, showcasing its superior classification capabilities at various thresholds. The absence of fully connected layers in Xception Net’s architecture might contribute to its effectiveness, indicating a potential advantage in complex image recognition tasks.

These results emphasize the progressive capabilities of CNNs and their evolving designs in addressing complex machine learning and image recognition problems, setting new standards for future research and applications. In a later study proposed in16, an advanced system for classifying waste using image processing and CNNs was developed, focusing particularly on identifying different types of plastics, primarily polyethylene. The study covered a wide range of materials, showing the system’s extensive application potential.

Similarly, in17, Sreelakshmi and her team introduced an approach using Capsule Neural Networks (Capsule-Net) for solid waste management, effectively distinguishing between plastic and non-plastic materials. This innovation marks a significant advancement in waste management technology. The study achieved high accuracy rates on two publicly available datasets and tested the integration across various hardware platforms.

Additional research in18 by Huiyu, O. G., and Kim S. H. introduced a novel waste classification model using deep learning techniques aimed at recycling applications. In the same vein, Adedeji and Wang19 proposed a deep learning framework that autonomously recognized and classified waste materials, proving effective in identifying recyclables.

Furthermore, Nowakowski and Pamuła20 presented a waste classification method using a pre-trained CNN model, ResNet-50, combined with Support Vector Machines (SVM), achieving 87% accuracy on a public dataset. Misra et al.21 explored a system for identifying and classifying electronic waste using a CNN and a Region-based CNN, obtaining detection and classification accuracy between 90 and 97%.

These studies predominantly focus on the architectural design of waste classification systems using deep learning, without integrating IoT for waste management. Conversely, Samann22 described a significant advancement in automated waste management processes with a smart trash bin equipped with sensors and a real-time monitoring system, though this did not incorporate machine learning. Similarly, Malapur and Pattanshetti23 introduced a cost-effective smart trash bin enhanced with IoT technology, capable of notifying users via SMS when waste levels exceeded set thresholds, incorporating additional features like a PIR motion sensor and audio messages for user interaction.

The author noted that the system operated satisfactorily. In their research24 introduced an economical and efficient waste management approach for smart cities. Similarly, ALFoudery et al.25 developed a Raspberry Pi and infrared sensor-based IoT model to enhance waste collection, with the system manager overseeing the scheduling and routing to maximize efficiency. In another study, Balaji et al.26 created a smart trash bin that could detect fill levels using an infrared sensor, with data sent to an Android app via a Wi-Fi and web server setup. Hong et al.27 also presented a smart trash can utilizing IoT technology and a Raspberry Pi. Additionally, Bai et al.28 implemented an IoT-based smart garbage system to minimize food waste, using mesh technology for effective component management and integrating a router and server to gather and analyze data related to food poisoning, resulting in a 33% reduction in food waste.

Several studies have advocated for IoT-based waste management systems, though none have explored structural designs using deep learning. Muthugala et al.29 introduced a waste collection robot that navigated autonomously and used deep learning to detect waste with 95% accuracy. Spanhol et al.30 proposed a floor cleaning robot that used a fuzzy inference system to optimize area coverage and energy consumption, employing the Weighted Sum Model (WSM) for decision-making based on user-defined preferences.

While the works of29 and30 presented innovative robotic solutions, they did not focus on IoT contributions. Zhu et al.31 discussed the fundamental aspects of blockchain and IoT, reviewing interconnection, interoperability, reliability, and security in daily operations. Reyna et al.32 highlighted the challenges, future prospects, and benefits of integrating blockchain with IoT, proposing a lightweight blockchain framework for IoT devices that significantly reduces overhead and processing time while enhancing security, as shown in research by33. Samaniego et al.34 focused on blockchain as a service within IoT, exploring various case studies and simulations with reported accuracies. Novo35 detailed an architecture for managing roles and permissions in realistic IoT scenarios, proposing a scalable architecture with clear advantages.

A decentralized solution has been presented in36 for solid waste management by integrating blockchain technology with Vehicular Ad Hoc Networks (VANETs). It utilizes advanced ultra-high frequency (UHF) technology and Internet of Things (IoT) devices to enable real-time tracking of waste vehicles and detection of waste bins. Geo-fencing techniques are employed to monitor and ensure timely waste collection from designated spots. The application of blockchain enhances the security, reliability, and trustworthiness of machine-to-machine (M2M) communications across IoT devices. Experimental results from a pilot project in Karachi, Pakistan, demonstrate the system’s effectiveness in real-time tracking, intelligent identification of waste bins, trash weighing, and monitoring waste collection using geo-fencing. The study suggests that blockchain-enabled VANETs could be applied to route management, intelligent transportation, and fleet management systems in the future.

Heidari et al.37 addresses the challenges of rapid urbanization and inadequate solid waste management by proposing a smart waste management system that leverages blockchain technology. The system aims to mitigate the adverse environmental impacts associated with traditional waste management services. By utilizing blockchain and smart contracts, the proposed system enhances transparency, accountability, and efficiency in waste management processes. The study emphasizes the potential of blockchain to revolutionize waste management by providing a secure and transparent framework for waste tracking and disposal.

System model

The IoT architecture of the proposed waste management system is designed to support efficient data collection, processing, and transmission from sensor nodes installed in waste containers. The system integrates various sensor types, each serving a specific function to monitor and optimize waste management operations.

Ultrasonic sensors are employed to measure the fill level of the waste containers. These sensors emit sound waves, and by calculating the time it takes for the waves to reflect back, they determine the distance to the waste, providing an accurate measurement of the container’s fill level. Additionally, load sensors are installed at the base of the containers to measure the weight of the accumulated waste. These sensors provide data on the total weight of the waste, enabling the system to monitor the amount of waste collected. Camera modules are also incorporated into the system, capturing images of the waste inside the containers. These images are sent to the system for analysis, where deep learning models, specifically CNNs, classify the waste into recyclable and non-recyclable categories.

The proposed system incorporates a blockchain-based architecture to ensure data integrity, security, and transparency in waste classification and management. This architecture consists of multiple layers, each serving a distinct function. The Application Layer hosts decentralized applications (DApps) and smart contracts, which automate data logging and waste classification verification. The Consensus Layer ensures secure validation of transactions using a consensus mechanism, preventing unauthorized modifications to recorded data. The Network Layer facilitates peer-to-peer communication between IoT-enabled waste bins, cloud servers, and blockchain nodes, enabling real-time data sharing. Finally, the Data Layer is responsible for securely storing waste classification records in an immutable ledger, ensuring traceability and accountability. By leveraging this layered architecture, the system enhances security and operational efficiency while supporting automated, data-driven decision-making in smart waste management (see Fig. 1). Blockchain technology ensures secure, transparent, and tamper-proof waste management. However, like any distributed system, blockchain is vulnerable to various security threats at different layers. Table 2 summarizes the common attacks on each blockchain layer along with their respective solutions to enhance the security of the proposed system.

Fig. 1
figure 1

Blockchain layer architecture.

Table 2 Layers of blockchain.

To facilitate efficient data transmission, the system uses two primary communication protocols: MQTT and CoAP. MQTT is a lightweight, publish/subscribe protocol that is ideal for real-time communication in low-bandwidth environments. It ensures low-latency data transmission, allowing for timely decision-making. CoAP, on the other hand, is designed for resource-constrained devices and supports simple request/response communication, making it a suitable choice for transmitting data from the various sensor nodes.

Once the data is collected by the sensors, it is processed by a microcontroller and transmitted to a cloud-based platform for further analysis and storage. Both MQTT and CoAP are utilized depending on the sensor’s capabilities and the data’s specific requirements. The data is then analyzed using AI algorithms to generate optimized waste collection schedules, identify inefficiencies, and trigger automated actions, such as notifying waste collection personnel or adjusting collection routes. Blockchain technology is integrated into the system to ensure the integrity and security of the transmitted data, storing it in a tamper-proof ledger for transparency and accountability.

Methodology

In response to the growing challenges of waste classification in smart cities, this study proposes an AI-driven waste management framework. The methodology is structured around two primary components: waste classification using a convolutional neural network (CNN) and the architectural design of smart trash bins equipped with real-time data monitoring via the Internet of Things (IoT). This dual approach enhances efficiency in waste management systems.

Waste classification using CNN

The first component of the methodology involves the application of CNNs, a deep learning algorithm optimized for image recognition, to classify waste materials. This enables the accurate identification and categorization of waste into recyclable and non-recyclable materials. CNNs are particularly suitable for this task as they can learn and generalize patterns associated with various waste types from labeled image datasets.

Since large-scale waste classification datasets are limited, transfer learning techniques were employed, utilizing pre-trained CNN models that are fine-tuned for this specific application. This approach not only enhances classification accuracy but also reduces computational overhead. To perform the classification, the CNN uses softmax activation for multi-class classification:

$$P\left({y}_{i}|x\right)=\frac{{e}^{{z}_{i}}}{{\sum }_{j}{e}^{{z}_{j}}}$$
(1)

where P(yix) is the probability of class iii given input x, zi is the output of the final fully connected layer before softmax, The denominator ensures that all class probabilities sum to 1.

The loss function for classification is cross-entropy:

$$L = - \mathop \sum \limits_{i} y_{i} log\left( {\hat{y}_{i} } \right)$$
(2)

where yi is the true label (one-hot encoded), \(\hat{y}_{i}\) is the predicted probability for class iii.

Smart trash bin architecture

The second component of the methodology focuses on the development of smart trash bins. These bins are equipped with IoT-enabled sensors that facilitate real-time waste monitoring and data transmission. The system includes:

  • Camera Module: Captures images of waste items and transmits them to the microcontroller for processing.

  • Ultrasonic Sensor: Measures the available space in the bin by detecting waste levels.

  • Load Sensor: Determines the total weight of waste accumulated over time.

  • Microcontroller & Servo Motor: Processes CNN classification results and controls the bin’s sorting mechanism. Based on classification outputs, the servo motor directs waste to the appropriate bin (digestible or indigestible).

A block diagram of the system architecture illustrates the interaction between these components, ensuring seamless integration of AI and IoT functionalities (see Fig. 2). The collected data is transmitted to a cloud-based platform and accessed via the Blynk application, enabling remote waste monitoring and management.

Fig. 2
figure 2

Block diagram of the proposed mechanism.

Ultrasonic sensor (waste level measurement)

The bin’s fill level is determined by the ultrasonic sensor using:

$$d=\frac{v.t}{2}$$
(3)

where d is the distance to the waste, v is the speed of sound in air (~ 343 m/s), t is the time taken for the signal to return.

The bin’s fullness percentage is:

$$F=\frac{1-d}{H}\times 100$$
(4)

where H is the total height of the bin.

Load sensor (weight calculation)

The total accumulated weight of waste is measured using:

$$W=f.g$$
(5)

where W is the weight of the waste, F is the force exerted on the load sensor, g is the gravitational acceleration (~ 9.81 m/s2).

AI-based framework for waste management

This study introduces an AI-enabled waste classification management framework encompassing waste collection, sorting, and disposal. AI algorithms continuously analyze waste data, improving classification accuracy and optimizing resource allocation. The framework includes:

  • Automated Waste Sorting: AI models refine the waste classification process, minimizing manual intervention.

  • Integration with Smart City Infrastructure: The system enables real-time tracking of waste levels and disposal patterns.

  • Sustainable Waste Processing: AI enhances recycling strategies by improving material recovery rates and minimizing landfill contributions.

Automated waste sorting efficiency

Sorting accuracy improvement using AI can be represented as:

$$E=\frac{{T}_{P}+{T}_{N}}{{T}_{P}+{T}_{N}+{F}_{P}+{F}_{N}}\times 100$$
(6)

where TP and TN are true positives and true negatives, FP and FN are false positives and false negatives.

Optimization of waste collection

AI optimizes waste collection using predictive analytics. A simplified optimization function:

$${C}_{opt}=min\sum_{i=1}^{n}{d}_{i}.{W}_{i}$$
(7)

where di is the distance to waste bin i, Wi is the weight of waste at iii.

The goal is to minimize the total distance traveled while maximizing collected waste.

Categorization of waste

The AI-driven system classifies waste into four categories:

  • Food waste: Requires specialized processing due to decomposition properties.

  • Hazardous waste: Demands careful handling to prevent contamination.

  • Residual waste: Often directed to incineration or landfills, but AI-based reclassification reduces waste disposal inefficiencies.

  • Recyclable waste: Advanced sorting technologies facilitate material recovery, supporting circular economy initiatives.

The efficiency of AI-enhanced recycling is:

$$R=\frac{{M}_{r}}{{M}_{t}}\times 100$$
(8)

where Mr is the mass of successfully recycled materials, Mt is the total recyclable waste input.

Once classified, waste is directed to appropriate treatment facilities, including recycling plants, hazardous waste centers, and municipal sanitation systems. The AI-driven system replaces traditional manual sorting, reducing human error and improving waste management efficiency.

By leveraging AI and IoT, this methodology paves the way for a more sustainable and cost-effective waste management system, aligning with smart city initiatives and environmental sustainability goals. Table 3 summarizes the algorithm of the proposed mechanism.

Table 3 Algorithm of the proposed mechanism.

Simulation results

The simulation section of the study was carried out to assess the performance of the proposed AI-driven waste classification model and its integration with Blockchain technology and optimized waste collection strategies. The system used for simulation was designed to evaluate various aspects of the model, including classification accuracy, processing time, data integrity, waste collection efficiency, and environmental impact. The simulation environment included high-performance computing hardware to run deep learning models, enabling the efficient processing of images for waste classification through Convolutional Neural Networks (CNN) with transfer learning. This setup was key to achieving a low latency of 1.2 s per image, ensuring that the waste sorting process was efficient and real-time.

In addition to the waste classification component, the system incorporated Blockchain technology to ensure secure and tamper-proof data management. The Blockchain framework was employed to store and track waste management data on a decentralized ledger, providing data integrity and real-time traceability. The system also included optimized waste collection mechanisms, such as route planning and resource allocation algorithms, aimed at improving collection efficiency and minimizing environmental impact. The results from this simulation were used to compare the performance of the proposed method with the Blockchain-Enabled VANET scheme36 and smart waste management system37 approaches, providing valuable insights into the effectiveness of the new system.

According to Fig. 3, the proposed AI-driven waste classification model, utilizing a CNN with transfer learning, significantly improves accuracy compared to previous methods. The 202136 and 202237 models relied on traditional machine learning approaches, such as SVM and decision trees, which lacked deep feature extraction capabilities. By leveraging pre-trained deep learning models and fine-tuning them for waste classification, our approach achieves an accuracy of 95%, outperforming the 88% (2021) and 90% (2022) methods. The higher accuracy ensures that recyclable materials are correctly classified, leading to improved waste sorting efficiency and reduced contamination in recycling streams.

Fig. 3
figure 3

Waste classification accuracy.

Figure 4 depicts the processing time over three different mechanisms. One of the major advantages of our system is its lower latency (1.2 s per image) compared to 2.5 s (2021) and 1.8 s (2022). The 2021 model used traditional feature extraction techniques, which required additional processing time. The 2022 method incorporated deep learning but lacked optimization for real-time execution. Our methodology optimizes CNN inference using lightweight architectures and edge computing, reducing computational overhead and making real-time classification feasible. This low latency is essential for practical deployment in smart bins, allowing waste to be sorted instantaneously without significant delays.

Fig. 4
figure 4

Processing time.

As shown in Fig. 5, the integration of Blockchain technology in our system ensures secure and tamper-proof data management. The proposed framework achieves a data integrity score of 98%, surpassing 85% (2021) and 90% (2022). Previous methods stored data on centralized cloud servers, making them vulnerable to data breaches and manipulation. Our decentralized ledger system provides real-time traceability, ensuring that waste collection and classification data remain authentic and immutable. This feature is particularly beneficial in waste management contracts and audits.

Fig. 5
figure 5

Blockchain security.

Figure 6 illustrates a comparative analysis of waste collection efficiency among three different methods: the Proposed Method, the 2021 Method, and the 2022 Method. The y-axis represents efficiency in percentage (%), while the x-axis labels the methods being compared. The results indicate that the Proposed Method achieves the highest efficiency at 92%, outperforming the 2021 Method (80%) and the 2022 Method (85%). The improved efficiency of the proposed approach suggests enhanced optimization in waste collection strategies, potentially due to better route planning, resource allocation, or technological advancements.

Fig. 6
figure 6

Watse collection effeciency.

Figure 7 presents a comparative analysis of CO2 reduction achieved by the Proposed Method, the 2021 Method, and the 2022 Method. The y-axis represents the percentage reduction in CO2 emissions, while the x-axis labels the evaluated methods. The results show that the Proposed Method achieves the highest reduction at 30%, surpassing the 2021 Method (15%) and the 2022 Method (20%). The superior performance of the proposed approach highlights its effectiveness in minimizing environmental impact, likely due to improved operational efficiency, optimized routing, and reduced fuel consumption.

Fig. 7
figure 7

Environment impact.

Figure 8 showcases the precision performance of the proposed AI-driven waste classification system, achieving a high precision of 93%, surpassing the 2021 (85%) and 2022 (89%) methods. Precision, which measures the proportion of correctly identified recyclable items among all predicted recyclables, is crucial for minimizing contamination in recycling streams. The improvement in precision can be attributed to the use of Convolutional Neural Networks (CNNs) with transfer learning, allowing the system to capture complex waste patterns and reduce false positives. This enhancement ensures that only actual recyclable materials are classified, improving the efficiency and quality of waste sorting and contributing to more sustainable waste management.

Fig. 8
figure 8

Precision.

Figure 9 illustrates the recall metric of the proposed AI-driven waste classification system in comparison to the 2021 and 2022 methods. Recall is a crucial performance metric that measures the ability of the model to correctly identify all relevant instances, specifically the proportion of actual positive instances (True Positives) that are correctly detected by the model (True Positives + False Negatives). In the context of waste management, a higher recall ensures that most recyclable materials are accurately identified and categorized, minimizing the risk of recyclable items being discarded as waste. The proposed method achieves a recall of 91%, surpassing the 2021 method (78%) and the 2022 method (83%). This improvement is primarily due to the fine-tuning of pre-trained deep learning models through transfer learning, which allows the system to better recognize and classify a wider range of waste materials, reducing the number of false negatives. This enhancement in recall plays a vital role in ensuring that recycling systems are more efficient and reliable, ultimately contributing to the reduction of contamination in recycling streams and supporting the goals of sustainable waste management in smart cities.

Fig. 9
figure 9

Recall.

Figure 10 presents the F1-score performance of the proposed AI-driven waste classification system, achieving a significant improvement over the 2021 (0.89) and 2022 (0.92) methods with an F1-score of 0.94. The F1-score is the harmonic mean of precision and recall, providing a balanced measure of a model’s ability to correctly classify recyclable waste while minimizing both false positives and false negatives. The improvement in the F1-score can be attributed to the optimized CNN model, which leverages transfer learning to enhance both precision and recall. A higher F1-score indicates that the proposed system not only accurately classifies recyclable materials but also reduces misclassification, leading to more reliable waste sorting and better overall waste management efficiency.

Fig. 10
figure 10

F1-score.

Figure 11 presents the latency comparison among three systems: the proposed method, the 2021 Method, and the 2022 Method. Latency, defined as the time delay between data input and system response, is a critical factor in real-time waste management. The proposed method achieves the lowest latency at 1.2 s per image, compared to 2.5 s for the 2021 model and 1.8 s for the 2022 model. This improvement is primarily due to the use of lightweight deep learning architectures and the integration of edge computing, which allows for faster data processing closer to the data source. Despite the high classification accuracy of 95%, the proposed method successfully balances accuracy and speed, maintaining real-time processing capabilities essential for smart city waste management operations. However, it is important to note that as model complexity increases (e.g., deeper CNNs or hybrid DL models), processing speed may be impacted if not optimized, highlighting the need for efficient model design and hardware acceleration.

Fig. 11
figure 11

Latency.

Figure 12 illustrates the computational complexity analysis of the proposed AI-driven waste management system compared to the 2021 and 2022 methods. The proposed system demonstrates higher computational complexity, primarily due to the integration of deep learning models, real-time processing requirements, and the addition of blockchain technology. The use of advanced convolutional neural networks (CNNs) with transfer learning increases the depth and number of parameters in the model, enhancing classification accuracy to 95% but also requiring greater computational resources. Additionally, the system performs real-time waste classification and monitoring, which demands high-performance processing to maintain a low latency of 1.2 s per image. The incorporation of blockchain, utilizing a Proof of Stake (PoS) consensus mechanism, introduces further processing overhead to ensure secure, decentralized data management. Despite these complexities, the system balances trade-offs between accuracy, processing speed, and efficiency through optimized CNN architectures, edge computing, and lightweight blockchain protocols. As a result, while the computational complexity is higher in the proposed framework, it is justified by significant improvements in accuracy, data integrity, and operational efficiency, making the system well-suited for real-time smart waste management applications. Table 4 presents a detailed comparison of classification accuracy, processing time, blockchain security, waste collection efficiency, CO2 reduction, and other critical performance metrics.

Fig. 12
figure 12

Computaional complexity.

Table 4 Performance comparison of AI-based waste classification methods.

Discussion

IoT technologies in smart cities is revolutionizing urban management, with waste management being one of the key areas benefiting from this transformation. IoT-based waste management systems typically follow a layered architecture to ensure seamless operation and efficiency2. The perception layer involves sensors and smart trash bins that collect real-time data on waste levels, types, and fill status. The network layer is responsible for transmitting this data through various communication protocols such as Wi-Fi, ZigBee, or LoRaWAN, ensuring efficient and reliable data transfer to cloud platforms or local processing units. The edge computing layer processes this data closer to the source, reducing latency and optimizing decision-making for real-time waste sorting. Finally, the application layer analyzes thedata to provide actionable insights, including waste classification and optimization of collection schedules. The proposed AI-driven waste management framework enhances this IoT infrastructure by incorporating CNN for waste classification and IoT-enabled smart bins for seamless integration of real-time monitoring and sorting, addressing key challenges in waste management and contributing to the overall sustainability of smart cities.

MNASNet is another effecient CNN model optimized for mobile and embedded devices, leveraging neural architecture search (NAS) to balance accuracy and computational efficiency. Unlike traditional CNNs, which may require significant computational resources, MNASNet reduces power consumption and latency, making it ideal for real-time mobile applications. However, for this study, we selected a traditional CNN because of its proven robustness, versatility, and ability to handle large datasets with high accuracy. CNNs have a long track record in various domains, providing reliable and consistent results, which is crucial for achieving optimal performance in our specific application. The use of CNNs for waste classification shows a substantial leap in accuracy over traditional machine learning methods. By employing transfer learning and fine-tuning pre-trained CNN models, we achieved a classification accuracy of 95%, outperforming the 88% accuracy of the 2021 method and the 90% of the 2022 model. This improvement can be attributed to the deep feature extraction capabilities of CNNs, which allow for more nuanced and accurate categorization of waste types, especially when dealing with complex materials. This level of precision ensures that recyclable materials are properly identified, reducing contamination and enhancing the overall recycling process. As a result, the AI-driven waste classification not only increases the effectiveness of waste sorting but also supports sustainable recycling efforts by diverting more materials from landfills.

In terms of processing time, the proposed system outperforms its predecessors by reducing the latency to just 1.2 s per image, a notable improvement over the 2.5 s of the 2021 model and 1.8 s of the 2022 method. This reduction is essential for practical implementation in real-time waste sorting, where delays in waste categorization could hinder the effectiveness of smart bins. The optimization of CNN inference through lightweight architectures and edge computing makes real-time processing feasible, ensuring that waste sorting can occur without significant delays and enhancing the system’s responsiveness in dynamic environments.

The integration of blockchain technology further strengthens the proposed system by ensuring secure, tamper-proof data management. With a data integrity score of 98%, the proposed method offers a significant improvement over the 85% data integrity of the 2021 method and the 90% of the 2022 model. Blockchain’s decentralized ledger system.

enhances the security and authenticity of waste management data, offering traceability and reducing the risk of data manipulation or breaches. This is particularly important in waste management contracts and audits, where accurate and reliable data is crucial for monitoring compliance and optimizing operational efficiency. The improvements in cryptographic mechanisms and consensus algorithms in our framework contribute to the higher data integrity score, ensuring more robust and trustworthy waste management operations.

In terms of efficiency, the proposed system achieves a waste collection efficiency of 92%, surpassing the 80% of the 2021 method and the 85% of the 2022 model. This improvement can be attributed to better route optimization, smarter resource allocation, and more accurate waste level monitoring, facilitated by the integration of IoT sensors. The system’s ability to predict optimal collection schedules based on real-time data and AI algorithms allows for more efficient waste collection, reducing unnecessary trips and optimizing fleet management. The higher efficiency also suggests that the AI system is able to better prioritize waste collection in areas where bins are nearing full capacity, minimizing the risk of overflows and improving overall service quality.

Finally, the proposed methodology demonstrates a significant reduction in CO2 emissions, with a 30% reduction compared to 15% and 20% reductions in the 2021 and 2022 methods, respectively. This is a direct result of improved operational efficiency, including optimized routing and reduced fuel consumption. By reducing the number of unnecessary waste collection trips, the proposed system minimizes the carbon footprint associated with waste management operations, contributing to the environmental sustainability goals of smart cities.

Overall, the proposed AI-driven waste management framework represents a significant advancement in waste management systems, offering improvements in classification accuracy, sorting efficiency, data integrity, and environmental sustainability. By integrating cutting-edge AI and IoT technologies, this framework addresses the growing challenges of waste management in smart cities, paving the way for more sustainable, efficient, and cost-effective waste management solutions. Future work could explore further optimizations, such as incorporating additional machine learning models for waste prediction or expanding the use of renewable energy sources to power the smart bins, further aligning with sustainability goals.

Conclusion

This study introduces an innovative AI-driven waste management framework that integrates CNNs for waste classification with IoT-enabled smart trash bins for real-time monitoring. By employing transfer learning and leveraging deep learning models, the framework achieves a high classification accuracy of 95%, surpassing traditional machine learning methods. The incorporation of IoT sensors, such as ultrasonic and load sensors, ensures effective monitoring of bin fill levels and waste weight, further optimizing waste collection and sorting efficiency. The proposed system demonstrates significant advantages over previous methods, including improved accuracy, lower latency, and enhanced data security through the integration of blockchain technology. Additionally, the AI-based framework enhances resource allocation, supports sustainable waste processing, and contributes to the reduction of CO2 emissions, with a notable reduction of 30% in emissions compared to previous approaches. Furthermore, the AI-driven waste management system aligns with the principles of smart cities by facilitating real-time waste tracking, automated sorting, and efficient recycling, all while reducing human error. The overall performance improvements, including the increase in waste collection efficiency and data integrity, highlight the potential for widespread deployment of this system in urban environments, promoting sustainability and contributing to environmental goals. In conclusion, the proposed methodology sets a new standard for smart waste management systems, combining AI, IoT, and blockchain to optimize waste classification, collection, and recycling processes. This approach not only enhances operational efficiency but also contributes to building smarter, more sustainable cities.

Future work

Future work can explore further integration with city-wide infrastructure and the use of additional AI techniques to refine waste sorting and improve the scalability of the system. Future work will focus on expanding the system’s capabilities by integrating additional AI techniques for further optimization of waste sorting and improving the scalability of the framework. Future research can explore the potential of deploying the system on a larger scale across various urban settings and incorporating additional sensors for more comprehensive waste data collection. Additionally, further advancements in blockchain technology may enhance the system’s resilience and enable better integration with smart city infrastructure. The use of edge computing for more efficient data processing and the development of predictive analytics models for waste generation and collection scheduling could also be explored to further optimize system performance.

Moreover, it is important to note that the integration of IoT and blockchain in the waste classification system inherently enhances data integrity and security through blockchain’s decentralized and tamper-resistant architecture. However, large-scale IoT deployments can still be susceptible to potential risks such as data breaches and cyber-attacks, which should be considered in future enhancements of the system. Ethical concerns, such as AI bias in waste classification, are addressed by using diverse and representative training datasets to ensure fairness and accuracy in classification decisions. Ongoing evaluation and updates are essential to maintaining the system’s reliability and ethical integrity in real-world applications.