Implementation of Convolutional Neural Network for Prioritization of Waste Handling Based on Density Level in Image Processing-Based Online Waste Reporting System

Implementation of Convolutional Neural Network for Prioritization of Waste Handling Based on Density Level in Image Processing-Based Online Waste Reporting System

Ridho Dimas Tri Prasetyo Jayadi1, Ahmaddul Hadi2, Yeka Hendriyani3, Syafrijon4
1 Electronic Engineering Department, Universitas Negeri Padang, West Air Tawar, Padang, Indonesia


Abstract – Rapid population growth and urbanization in Indonesia has led to a significant increase in waste volume. in waste volume. Data from the Central Statistics Agency (BPS) recorded waste volume to reach 64 million tons per year by 2023. High urbanization high urbanization is driving waste production in urban areas, while the transformation of consumption patterns, especially towards single-use products and plastics, are also contribute to this increase. Effective waste management must pay attention to the quality and quantity of its management, and be supported by relevant technological innovations. relevant technological innovations. However, limited resources, both budget and manpower, are the main obstacles. Despite the launch of the Online Waste Reporting System (SPSO) has been launched, challenges such as the lack of an automation mechanism and integration with local automation and integration with local waste management systems are still slowing down the response to the waste problem. slowing down the response to the waste problem. Technological innovations such as Convolutional Neural Network (CNN) and image processing promise a solution to improve the efficiency and to improve efficiency and responsiveness in waste management, with the potential to speed up identification and response to waste reports more accurately and efficiently. more accurately and efficiently. Good coordination between government and related agencies as well as improved distribution of resources are needed to address these challenges and improve the effectiveness of waste management in Indonesia.

Keywords— Convolutional Neural Network, Image Processing, Deep Learning, Online Waste Reporting System, Website.


I. INTRODUCTION

Rapid population growth and urbanization in Indonesia have significantly contributed to the increasing volume of waste, which reached approximately 64 million tons in 2023, according to the Central Bureau of Statistics (BPS). Urbanization concentrates populations in major cities, escalating waste production and straining existing management systems. This growing crisis demands effective waste management solutions to mitigate environmental and public health risks.
The surge in waste is closely linked to shifting consumption patterns, with a rise in single-use products and plastic packaging. These changes reflect economic growth and evolving lifestyles, further underscoring the urgency for innovative waste management strategies. Beyond quantity, the focus must also shift to improving the quality of waste management, as poor handling can lead to water and soil pollution and pose significant health risks.
Limited resources, both financial and human, remain a major obstacle. Budget constraints often leave waste management infrastructure underfunded, while insufficient personnel hinders efficient operations. Although the Online Waste Reporting System (SPSO) has been introduced, response times remain slow due to a lack of automation in prioritizing waste management based on urgency.
Resource allocation disparities further exacerbate the issue, with rural and remote areas often receiving less support compared to urban centers. This inequity hampers access to adequate waste management services and intensifies environmental and health challenges in underserved regions.

Recent research by Rasidi, Pasaribu, and Ziqri [1] highlights the potential of artificial intelligence, particularly Convolutional Neural Networks (CNN), in waste management. By classifying organic and inorganic waste through image analysis, CNN has demonstrated high accuracy, enhancing waste sorting efficiency. Integrating CNN into systems like SPSO could streamline waste management, providing faster and more precise responses while contributing to broader sustainable development goals.

II. METHODS

This research uses an experimental method. The experimental method aims to apply and test the Convolutional Neural Network (CNN) mode in detecting and classifying garbage images based on density levels. This method is quantitative The following are the steps of the experimental method used in this research, namely:
• Collect datasets of garbage images from various sources
• Image Pre-processing
• CNN Architecture Design and Implementation
• Train the cnn model with the prepared dataset
• Test the model performance evaluation.

A. System Planning

1) Analysis of the current system: After observing the Online Waste Reporting System firsthand, there are some weaknesses that need to be improved. Some stages, such as data analysis and waste handling, are still done manually, which increases the risk of errors and hampers efficiency. Although reporting is done through the app, the lack of a monitoring system leads to unclear report status and lack of visibility into the overall waste handling progress. In addition, waste management actions are sometimes delayed due to a lack of effective supervision and coordination. Communication between waste management teams, especially through live chats, often leads to loss of information and misunderstandings. Lastly, responsibilities in the waste analysis and handling process have not been standardized, leading to unclear division of labor and responsibilities.
2) Analysis of the proposed system:


Fig. 1 Proposed flow system

B. System Modeling

1) Use Case Diagram:


Fig. 2 Use case diagram

The use case diagram for the waste reporting application includes three main actors: Waste Reporters, Admins, and Waste Handlers. Waste Reporters can upload waste reports, view report status, while Admins have the authority to respond and verify reports, as well as manage user accounts. The Waste Handler receives the report from the Admin to take action to handle or clean up the waste. The interaction between these three actors forms a cycle of reporting and handling waste in the application.

2) Activity Diagram:

Fig. 3 Login activity diagram

The login activity diagram is a visual representation of the process of logging into a system or application. The steps include the user entering a username and password, the system verifies the credentials entered, and if the verification is successful, the user will be redirected to the home page. This diagram illustrates the sequence of activities that occur during the login process to facilitate understanding and analysis of the workflow that occurs in the system.
3) Garbage Handling Activity Diagram:


Fig. 4 Garbage handling activity diagram

The waste handling activity diagram illustrates the waste handling process after the report is received by the system. This includes activities such as report analysis, handling resource allocation, and reporting the handling results back to users or related parties.

C. Database Designing

The database that the author will use in designing this final project is MySQL, because it is easy to access and easy to operate. In designing this database, it consists of 5 tables, namely user (reporter), admin, c_rangers (the party that handles the waste), report, and report_sustain. The following is the design of the relationship diagram between entities or ERD as shown in Figure 5.


Fig. 5 Diagram relationship

D. Data Training

Training data is a subset of the dataset that is used to train machine learning models with the main purpose of teaching the model the patterns contained in the data, so that the model can make the right predictions or decisions when given new data. Typically, training data is divided into batches to incrementally train the model. Each batch consists of a number of data examples fed to the model, and the model is updated based on the performance of each batch. In the model design for this final project, the dataset is divided into three categories of ‘Poor’, ‘Poor’, and ‘Very Poor’, where each category is also divided into three parts: training, test, and validation. This allows for a comprehensive evaluation of the model’s performance at various stages in the development process and ensures good generalizability when the model is implemented on new data, as shown in Table 1.

TABLE 1
DATASET CLASS DIVISION FOR MODEL TRAINING

Kurang baik Training (80%)
Testing(10%)
Validation(10%)
Buruk Training (80%)
Testing(10%)
Validation(10%)
Sangat Buruk Training (80%)
Testing(10%)
Validation(10%)
E. Interface Design

1) Login Page:

Fig. 6 Login Page

2) Registration Page:

Fig. 7 Registration Page

3) User Dashboard:

Fig. 8 User dashboard

4) User Report Page:

Fig. 9 User report page

5) Admin Dashboard:

Fig. 10 Admin Dahsboard

6) Incoming Reports for Admin:

Fig. 11 Incoming reports view for admin

F. Prototyping of Online Waste Reporting System

In the study titled “Implementation of Convolutional Neural Network for Prioritizing Waste Management Based on Density Levels in an Online Waste Reporting System Using Image Processing,” the prototyping method was used to design and develop an online waste reporting system integrated with a CNN model.
The process began with gathering initial requirements from users and stakeholders to understand the necessary features and functionalities. These requirements included waste reporting through image uploads, waste density classification, and assigning categories based on the severity of waste density. Based on the collected requirements, an initial prototype of the system was created. This prototype included a user interface (UI) design that allowed users to upload waste images and view classification results, as well as a basic workflow integrating the CNN model to process and analyze the images.
The prototype was then evaluated and tested by early users to gather necessary feedback. Feedback from users was used to refine the prototype through iterative cycles. Each iteration involved adjustments and improvements based on the input received, focusing on both the user interface and system functionality. This iterative process ensured that every change and enhancement was made progressively to achieve the desired level of user satisfaction.
Once the prototype reached the desired level of satisfaction, the development of the final system began, incorporating all required functionalities. The final system included full integration with the trained CNN model to detect and classify waste images based on density levels, as well as additional features such as classification result reporting, data storage in a database, and the capability to perform CRUD (Create, Read, Update, Delete) operations on reported data.
The final system was then thoroughly tested to ensure that all functionalities worked correctly and met the specified requirements. Testing included evaluating the performance of the CNN model, system integration testing, and user testing to ensure the system was user-friendly and effective in meeting its objectives. After successful testing and validation, the system was deployed in a production environment. The enhanced online waste reporting system was then implemented for use by the community or relevant institutions. Routine maintenance was also carried out to ensure continued operation and adaptability to evolving user needs.
This prototyping approach ensured that the developed waste reporting system met user needs and effectively prioritized waste management based on density levels using image processing and CNN technology. As a result, this system can help optimize waste management and improve environmental quality through the use of advanced technology.

<h4>III. RESULTS</h4>
The MySQL connection system for this application was designed using XAMPP as the local server and PhpMyAdmin as the database management interface. XAMPP allows MySQL installation and operation locally, making it easier for developers to manage the database through PhpMyAdmin. The database connection configuration is stored in the .env.local file, which securely stores credentials such as hostname, username, password, and database name. The .env.local file helps with environment configuration management and increases security by keeping sensitive information out of the source code. Connection to the database is done through an API set up in the db-connection.js file, which initializes a connection to MySQL using credentials from the .env file. Application users can perform CRUD (Create, Read, Update, Delete) operations through a web interface that sends requests to this API, ensuring interaction with the database is done in a structured and secure manner. XAMPP and PhpMyAdmin provide a user-friendly database management environment.


Fig. 12 Local environment

Fig. 13 Database endpoint

A back-end server API was developed using Flask to process the images and provide a litter density score as well as litter density ugliness categories such as “Poor”, “Poor”, and “Very Poor”. The pre-trained Convolutional Neural Network (CNN) model is stored in the model.h5 file and loaded when the Flask server is initialized. The API has a /upload endpoint that accepts the POST method to receive images from the user. The images are processed by resizing them to 224×224 pixels and scaled to the range [0, 1]. The prediction model generates a litter density score that is classified into three categories. The prediction results are returned in JSON format to the client. If an error occurs during image processing or prediction, the API returns an error message with status code 500. This configuration and implementation ensures that the image processing-based online waste reporting system can run efficiently and accurately.


Fig. 14 API endpoint in back end

The design of the application pages encompasses various elements, as shown in Figure 15, 16, 17, 18, and 19, which depict the key components and features integrated into the user interface to ensure functionality and ease of use.


Fig. 15 Sliced login page


Fig. 16 Sliced registration page


Fig. 17 Sliced user dashboard

Fig. 18 Sliced report page

Fig. 19 Sliced admin dashboard
System testing is important to ensure the system functions as expected by the user. In designing this final project, the author uses the blackbox testing method with the Equivalence Partitioning (EP) technique. EP is an efficient blackbox testing technique. Testing starts with identifying the input domain, dividing the input into equivalence classes, selecting representatives from each class, designing test cases, executing test cases, and evaluating results. With EP, testing becomes more efficient as it reduces the number of test cases without sacrificing coverage.
The test is conducted with a garbage image that has been manually labeled for density. The images were divided into three equivalent classes: “Kurang Baik”, ‘Buruk’, and ‘Sangat Buruk’.

1) Test case 1 :
• Expected Result : “Kurang Baik”
• Result: “Kurang Baik”


Fig. 20 Test case result 1
2) Test case 2 :
• Expected result : “Sangat Buruk”
• Result : “Sangat Buruk”


Fig. 21 Test case result 2
3) Test case 3 :
• Expected result : “Buruk”
• Result : “Buruk”


Fig. 22 Test case 3
The test results show that the system has been tested with 100% coverage, identifying and mitigating risks related to the use of the system. The system successfully produced effective and innovative solutions in managing and prioritizing waste handling, as well as ensuring optimal system quality and performance as intended.

IV. CONCLUSIONS

In conclusion, the Convolutional Neural Network (CNN) model developed during the design and implementation process successfully classifies waste based on density with 91% accuracy, demonstrating the effectiveness of CNN in processing image data. Prototyping an online waste reporting system integrated with the CNN model successfully allows users to report waste and see the priority of handling it based on density. The integration of the CNN model into the website was carried out successfully, so that users can access the waste handling priority feature through an easy-to-use interface. System testing using blackbox testing and Equivalence Partitioning techniques achieved 100% coverage, indicating that the system was thoroughly tested and functions as expected.

ACKNOWLEDGMENT

I would like to express my deepest gratitude to all those who have supported and contributed to the successful completion of this research. First and foremost, my sincere thanks go to Rama Dhaniansyah, my dear friend, for his invaluable technical support and guidance throughout this project. His expertise and encouragement were essential in overcoming numerous challenges. I am also profoundly grateful to my respected lecturers and mentors, Mr. Ahmaddul Hadi, S.pd, M.Kom, Mrs. Dr. Yeka Hendriyani, S.Kom, M.Kom, and Mr. Dr. Syafrijon, S.pd, M.Kom, whose continuous guidance, consultation, and constructive feedback have been crucial in shaping and refining my research. Furthermore, I would like to thank my family and friends for their unwavering emotional and mental support, which has provided me with the strength and motivation to complete this work. Without their encouragement, this journey would not have been possible. I am truly grateful to everyone who has contributed, directly or indirectly, to the success of this project.

REFERENCES

[1] A. I. Rasidi, Y. A. Pasaribu dan A. Ziqri, “Klasifikasi Sampah Organik dan Non-Organik Menggunakan Convolutional Neural Network,” Jurnal Teknik Informatika dan Sistem Informasi, pp. 142-149, 2022.
[2] T. W. Qur’ana, “Implementasi Metode Convolutional Neural Network (CNN) untuk Klasifikasi Motif pada Citra Sasirangan,” Madani: Jurnal Ilmiah Multidisiplin, pp. 647-653, 2023.
[3] U. Liza, “Penelitian Terapan: Pengertian, Jenis & Contohnya,” 2024. [Online]. Available: https://www-questionpro-com.translate.goog/blog/applied-research/?_x_tr_sl=en&_x_tr_tl=id&_x_tr_hl=id&_x_tr_pto=tc.
[4] S. Siswidiyanto, A. Munif, D. Wijayanti dan E. Haryadi, “ Sistem Informasi Penyewaan Rumah Kontrakan Berbasis Web Dengan Menggunakan Metode Prototype,” Jurnal Interkom: Jurnal Publikasi Ilmiah Bidang Teknologi Informasi dan Komunikasi, pp. 16-23, 2020.
[5] E. Yanuarti, “Prototype Sistem Informasi Seleksi Penerimaan Pegawai Tugas Belajar,” pp. 36-41, 2017.
[6] R. Abdillah, “Pemodelan Uml Untuk Sistem Informasi Persewaan Alat Pesta,” Jurnal Fasilkom, p. 79–86, 2021.
[7] O. Alfina dan F. Harahap, “Pemodelan UML Sistem Pendukung Keputusan Dalam Penentuan Kelas Siswa Siswa Tunagrahita,” Methomika, p. 143–150, 2019.
[8] T. Arianti, A. Fa’izi, S. Adam dan M. Wulandari, “PERANCANGAN SISTEM INFORMASI PERPUSTAKAAN MENGGUNAKAN DIAGRAM UML (UNIFIED MODELLING LANGUAGE),” Jurnal Ilmiah Komputer Terapan dan Informasi, pp. 19-25, 2022.
[9] W. Sornkliang dan T. Phetkaew, “Target-based test path prioritization for UML activity diagram using weight assignment methods,” International Journal of Electrical and Computer Engineering (IJECE), pp. 575-588, 2021.
[10] “Tensorflow for Javascript,” [Online]. Available: https://www.tensorflow.org/js/models.
[11] D. Smilkov, N. Thorat, Y. Assogba, A. Yuan, N. Kreeger, P. Yu dan M. Wattenberg, “Tensorflow.js: Machine Learning for the Web and Beyond,” 2019.
[12] Y. Ma, D. Xiang, S. Zheng, D. Tian dan X. Liu, “Moving Deep Learning into Web Browser: How Far Can We Go?,” pp. 1-17, 2019.
[13] A. U. Abdurakhimovich, “THE FUTURE OF JAVASCRIPT: EMERGING TRENDS AND TECHNOLOGIES,” FORMATION OF PSYCHOLOGY AND PEDAGOGY AS INTERDISCIPLINARY SCIENCES, pp. 12-14, 2023.
[14] V. Patel, “Analyzing the Impact of Next.JS on Site Performance and SEO,” International Journal of Computer Applications Technology and Research, pp. 24-27, 2023.
[15] S. Greif dan R. Benitte, “`The state of css 2020 – css frameworks’,” 24 December 2020. [Online]. Available: https://2020.stateofcss.com/en-US/technologies/css-frameworks/.
[16] I. M. Ibrahim, S. Y. Ameen, H. M. Yasin, N. Omar, S. F. Kak, Z. N. Rashid, A. A. Salih, N. O. M. Salim dan D. M. Ahmed, “Web Server Performance Improvement Using Dynamic Load Balancing Techniques: A Review,” Asian Journal of Research in Computer Science, pp. 47-62, 2021.