Combining inception-V3 and support vector machine for garbage classification

— The global volume of trash has increased due to population growth and consumption, with a growing variety of materials and materials being generated. Inadequate garbage disposal practices, particularly in plastics, have led to environmental contamination and pollution in various regions. Artificial intelligence technologies, particularly in machine learning, have demonstrated significant potential in trash sorting, particularly in the realm of machine learning. The Inception-V3 model and support vector machines were used in this study to extract relevant features and classify garbage categories. The Inception-V3 and SVM combination exhibited superior performance, with a greater F1 score than other methods. The radial basis function kernel was the most optimal model of SVM, but it faced challenges in accurately categorizing the ”trash” category due to limited data and resemblance to the ”paper” class. The system developed in this study has a high level of effectiveness, with superior F1 scores of 0.874.


I. INTRODUCTION
The worldwide volume of garbage created experiences a substantial increase due to the growth in population and consumption [1].Garbage generation is on the rise in both urban and rural regions.The range and complexity of garbage generated are progressively expanding.In addition to the organic garbage category, which includes food trash, a diverse array of materials, including plastic, paper, metal, glass, and electronic materials, are becoming increasingly prevalent [2]- [4].Numerous geographical areas over the globe have environmental contamination issues as a result of inadequate garbage disposal practices.The uncontrolled dumping of garbage, particularly plastic materials, has poisoned land, water, and marine environments.Limited garbage management infrastructure is still prevalent in many regions [5], [7].The absence of adequate access to appropriate recycling and disposal facilities can lead to the buildup of garbage close to human habitation.
Despite the growing recognition of the need for effective garbage management, a substantial portion of the population remains unaware of the adverse environmental consequences of improper trash disposal.The potential consequence of this might impede the implementation of more environmentally friendly garbage management strategies.Plastics, particularly those intended for one-time use, have recently garnered significant attention.The extensive utilization and subsequent disposal of plastic materials have resulted in various issues, including the proliferation of plastic pollution, adverse impacts on marine ecosystems, and potential risks to human well-being.Unsystematic garbage disposal sites have the potential to serve as breeding grounds for many diseases and disease vectors.The abovementioned situation can pose a significant risk to Jurnal Infotel, Vol. 15, No. 4, November 2023 https://doi.org/10.20895/infotel.v15i4.1027 ISSN: 2085-3688; e-ISSN: 2460-0997 Combining inception-V3 and support vector machine for garbage classification the well-being of those residing in the vicinity and may also give rise to detrimental societal consequences.While several geographical areas have successfully integrated contemporary technology into their garbage management practices, there remain numerous locations where the complete implementation of these technologies has yet to be realized.This phenomenon can impede endeavors aimed at effectively and sustainably managing garbage.
In the contemporary period characterized by the growing integration of technology into daily routines, the issue of garbage management has assumed a heightened level of complexity and urgency.The escalating quantity of garbage, the diverse array of garbage materials, and the complexities associated with garbage management and recycling need the exploration of novel strategies.The utilization of AI emerges as a viable resolution in this context.AI has demonstrated its considerable potential across several domains [8], [9], including garbage sorting, yielding noteworthy beneficial outcomes.One of the primary obstacles encountered in garbage management is the efficacy of precise and expeditious garbage categorization.Improper classification of garbage can impede the recycling process and lead to the buildup of garbage in landfills.
The conventional approach to garbage categorization often entails the utilization of human labor.This method is characterized by its time-intensive nature, high costs, and potential for inconsistency in identifying various garbage kinds.The issues associated with the increased consumption of a wide range of goods and packaging are rising.Using AI technologies, particularly in machine learning, has engendered a paradigm shift in our understanding and approach to garbage categorization [10]- [14].This technological advancement enables computers to acquire knowledge from data and past encounters, making judgments or discerning patterns with enhanced precision compared to conventional approaches.AI can undergo training to identify and classify different categories of garbage by analyzing images or photographs.The system can accurately distinguish between many types of materials, including organic substances, plastics, paper, metals, and others.The utilization of AI in garbage categorization is a pioneering advancement with considerable potential in addressing the complexities associated with contemporary garbage management practices.
Numerous scholarly investigations and empirical inquiries have been undertaken to explore the application of machine learning techniques in garbage categorization.These researchers employ several machine learning models and methodologies to categorize garbage according to certain features.The use of an automated classification system utilizing image recognition algorithms, such as DenseNet121, has been done by Mao et al. [15].Convolutional Neural Networks (CNNs) performance was evaluated using a benchmark dataset called TrashNet.The data augmentation technique was employed to improve the precision of waste categorization.However, fine-tuning the hyper-parameters of the fully-connected layer in the convolutional neural network still needs to be implemented.The present work introduces a novel approach to enhance the performance of the fully connected layer of DenseNet121 by utilizing a genetic algorithm (GA).The DenseNet121 model that was developed attained a significantly high accuracy rate of 99.6 % when compared to other convolutional neural networks (CNNs).
Togac ¸ar et al. implemented a simplified method by utilizing a Convolutional Neural Network model known as ResNet-50, consisting of 50 layers and a Support Vector Machine (SVM) algorithm [16].The system was evaluated using a dataset consisting of images of garbage.It demonstrated a high accuracy rate of 87 %, therefore enhancing the efficiency and intelligence of waste-sorting processes without diminishing the need for human participation.Both of these studies show good performance for waste classification using CNN.Therefore, this study proposes using CNN as image embedding and SVM as the final classifier.The difference is the type of CNN in the form of Inception-V3.

II. RESEARCH METHOD
The present work used AI to classify garbage types through machine learning techniques.This entailed the application of certain attributes to discern and identify various categories of garbage.Fig. 1 describes the comprehensive procedures for the classification of garbage types.

A. Data Collecting
The initial stage involved collecting a comprehensive and inclusive dataset that accurately reflected the various types and proportions of garbage.This study utilized data obtained from online sources [17].The dataset comprised various categorized garbage materials: glass, cardboard, metal, organic, and plastic.Every piece of garbage was visually represented in the form of an image.The garbage data had been assigned the corresponding label for each category of garbage.The method of data collection was conducted manually.The dataset comprised a collection of images depicting recycled products categorized into six distinct classifications.Each class consisted of around 400-600 images, except for the "trash" class, which had just around 100 images.
In all, the dataset encompassed over 2,527 images.Data-gathering entailed employing a white posterboard as a backdrop and capturing images of waste materials and recyclable items.The dataset exhibited variance due to differences in lighting and attitude across each shot.Fig. 2 depicts samples from the six distinct classes.Data augmentation techniques were used on every image due to the limited size of each class.The employed strategies encompassed random image rotation, random image brightness adjustment, random image scaling, and random image shearing.The selection of these image alterations was based on accommodating the various orientations of recycled material and optimizing the overall size of the dataset.Additionally, it executed mean subtraction and normalizing techniques.
Data augmentation was also employed as a strategy in this study to address the class imbalance issue in the dataset.This strategy contributed to the augmentation of a minority sample size.It might enhance the representation of minority classes by diversifying the samples increasing the data available for the models to learn from, resulting in improved learning outcomes.This strategy also mitigated overfitting, which occurred when the model excessively emphasized the training data by incorporating diversity into the training data.This strategy had the potential to enhance generality.By including a wider range of data, the model could enhance its ability to discern significant patterns that distinguish various classes, enhancing its capacity for generalization.

B. Inception-V3
The data gathered and annotated must undergo preprocessing procedures before its utilization in model training.Additionally, it was necessary to separate pertinent characteristics from irrelevant or extraneous data.The present work employed the Inception-V3 model for image embedding.The architecture served as a foundational framework for generating numerical representations, known as "embedding," for images [18], [19].The purpose of this representation was to condense the significant details of the image into a concise numerical vector.The authors employed this embedding technique to facilitate image categorization using SVM in this work.The following were the fundamental procedures for utilizing Inception-V3 as an image embedding model [20].
1) Preprocessing Before embedding, it was necessary to preprocess the images.The process entailed many sequential actions, including modifying the image dimensions to an appropriate scale, standardizing the pixel intensity values, and sometimes removing unwanted portions by cropping. 2

) Model loading
The initial step involved loading the pre-trained Inception-V3 architecture.One could utilize models other entities offer or engage in self-training, given that one possesses the requisite training data.
3) Feature extraction The Inception-V3 architecture comprised many convolution and pooling layers, collectively establishing a hierarchical representation of features.An image embedding was one possible approach to depict these levels visually.The lower strata tended to encompass progressively more conceptual characteristics.The selection of the appropriate layer was contingent upon one's objectives.

4) Pooling
Global average pooling was a technique that aggregated information extracted from an image into a single vector that encapsulated the full image.This pooling approach was widely employed in computer vision, wherein the average value of each feature was computed over all pixels of an image.As a consequence, a vector with reduced dimensions was obtained.

5) Normalization
It was a crucial step in the process of embedding vectors since it ensured that each dimension of the vectors was uniformly scaled.This could facilitate further analysis and utilization.
ISSN: 2085-3688; e-ISSN: 2460-0997 Combining inception-V3 and support vector machine for garbage classification It was employed for image classification upon obtaining the embedding vectors for each picture.

C. Support Vector Machine (SVM)
SVM is a machine learning technique commonly employed for the purposes of classification and regression [21].The algorithm was initially devised for classification.However, it was subsequently modified to accommodate regression tasks.The technique possesses a robust mathematical foundation and finds extensive use in several domains like pattern recognition, image processing, data analysis, and bioinformatics.It identified hyperplanes, such as lines, planes, or higher dimensional spaces, that optimized the separation between distinct classes within the feature space.The margin refers to the spatial separation between the hyperplane and the nearest data points belonging to each class.The primary objective was to identify the hyperplane that maximized the margin, facilitating the effective classification of data points across distinct classes.
The algorithm incorporated the notion of support vectors, which were specific data points that exhibit proximity to the separating hyperplane and played a crucial role in defining the location and direction of such a hyperplane.It employed the optimization of margins and identification of support vectors to develop models that could generalize data that had not been previously seen.It encompassed several iterations, such as linear and non-linear SVM.In scenarios where data could not be effectively split by linear boundaries, such as non-linear classification problems, non-linear SVM employed non-linear transformations [22].This process aimed to map the data onto a higher-dimensional space, where linear dividing hyperplanes may exist.This phenomenon was commonly referred to as the "kernel trick."The appropriate selection of a kernel played a crucial role in determining the performance of non-linear SVM.Some often used kernels are linear, sigmoid, and radial basis function (RBF) kernels.
The linear kernel was considered the most basic of the three options available.The system did not apply any unique modifications to the data.Linear kernels were well-suited for classification issues with decision boundaries or linear regression lines.This method was most effective when linear boundaries could easily partition the data in the initial feature space.The RBF kernel was often employed as the primary kernel in SVM.Data transformation was applied to a higher dimension through the utilization of RBF, often commonly referred to as the Gaussian kernel.They had high efficacy in handling non-linear and intricate patterns inside data.This feature allowed SVM to handle datasets that exhibited circular or irregular shapes effectively.The sigmoid kernel was a type of kernel that employed the sigmoid function to transform data into a higher-dimensional space.The function had curve features analogous to the sigmoid activation function commonly employed in artificial neural networks.The sigmoid kernel was mostly employed in scenarios where the dataset exhibited intricate patterns that could not be effectively segregated using linear boundaries.
The primary distinction among the three kernels was like the data transformation they enact.The linear kernel did not perform any modification on the data.Still, the RBF and sigmoid kernels employed radial basis and sigmoid functions to translate the data into higher dimensions.The inherent properties of the dataset should determine the selection of a kernel.If the available data tended towards a linear pattern, it was plausible that employing a linear kernel would be enough.However, employing an RBF or sigmoid kernel could be more suitable in cases where the data pattern exhibited greater complexity or non-linearity.This study incorporated three distinct types of kernels.

D. Data Splitting
The dataset was subsequently partitioned into two subsets: the training dataset, which was utilized to train the model, and the test dataset, which was employed to evaluate the model's performance.This study utilized a 5-fold cross-validation technique.It was a cross-validation technique that involved partitioning the dataset into five equally sized folds or subsets.The original dataset was partitioned into five equalsized segments [23]- [25].The approach consisted of five iterations, whereby one of the folds was designated as the validation dataset in each iteration.In contrast, the remaining four folds were utilized as the training dataset.During each iteration, the statistical model or machine learning algorithm underwent training using the training data from the four folds.Subsequently, it was assessed against the validation data from the remaining folds.The assessment of model performance was conducted using appropriate evaluation measures, including the F1 score.
The metrics of the F1 score were commonly employed in evaluating the effectiveness of a model or classification system [26], [27], particularly within the realm of data processing and machine learning.The F1 score was a statistic that aimed to mitigate the issue of class imbalance while evaluating the performance of a model.The harmonic average was computed as the reciprocal of the arithmetic mean of the precision and recall.Precision was defined as the proportion of accurate positive predictions a model produces relative to the total number of positive predictions made.Recall, sometimes referred to as sensitivity or true positive rate, was a metric that quantified the proportion of accurately predicted positive instances about the actual total number of positive instances present in the dataset.The F1 score achieves a harmonious equilibrium between precision and recall.This became ISSN: 2085-3688; e-ISSN: 2460-0997 Combining inception-V3 and support vector machine for garbage classification particularly pertinent when there was an uneven distribution of classes.Once all iterations had been concluded, each iteration's evaluation values were averaged.By doing five iterations, we obtained five evaluation values that might offer a more comprehensive understanding of the model's overall performance.Utilizing a 5-fold cross-validation outcome aids in mitigating the issues of overfitting and underfitting while also enhancing the reliability of assessing a model's performance on previously unseen data.
This study further did a comparative analysis of the proposed method and alternative approaches, including combining Inception-V3 with others: Decision Tree, Random Forest, and AdaBoost.All three of these were classification-related machine learning methods.Ensemble algorithms belonged to a group characterized by integrating numerous models, often basic models, to enhance the performance and resilience of the overall model.The Decision Tree model was a predictive model that partitioned a dataset into smaller subsets by a sequence of decision-making processes at each node inside the tree structure [28]- [30].The structure of this tree had a primary node, referred to as the root node, which signified the initial feature to be divided.The tree also included branches that symbolized decisions made depending on feature values and terminal nodes, known as leaf nodes, which provided the ultimate outcomes or forecasts.While Decision Trees possessed the advantages of flexibility and interpretability, they were prone to overfitting, a phenomenon where they excessively recalled the training data and hence exhibited worse performance when presented with unseen data.
The Random Forest algorithm is an ensemble method that combines many Decision Trees [31].This implied that the algorithm in question integrated many Decision Trees that function autonomously, subsequently amalgamating their anticipated outcomes to generate the ultimate conclusion.Constructing each tree in the Random Forest involved utilizing a random portion of the training data and a random subset of the available features.Implementing this technique aided in mitigating overfitting and enhanced the overall efficacy of the model.Random Forests provided the capability to effectively address issues such as overfitting, yielding more precise and consistent outcomes than those obtained by a solitary Decision Tree.
AdaBoost is an ensemble technique that aggregates many weak models, which are characterized by their somewhat inferior performance and random guessing [21], to build a robust model.The AdaBoost algorithm gave varying weights to individual samples within the dataset.During each iteration, the AdaBoost algorithm emphasized the previously misclassified samples and strengthened their influence in constructing the subsequent model.AdaBoost was an iterative algorithm that enhances the performance of a model by assigning greater importance to instances that the model previously misclassified.This implied that AdaBoost frequently generated models that exhibited high performance.7 presents the results of the suggested approach, which involves the utilization of Inception-V3 SVM as well as the integration of Inception-V3 with other algorithms, specifically Random Forest, Decision Tree, and AdaBoost.Various support vector machine (SVM) kernel alternatives were evaluated, including RBF, linear, and sigmoid.The performance of the algorithms is depicted in seven tables, which provide a comprehensive comparison across all classes and inside each class.The Inception-V3 SVM RBF model demonstrated the greatest F1 scores across all classes, with a value of 0.874.Regarding the F1 score, the Inception-V3 SVM model demonstrated superior performance compared to the others.The Inception-V3 Decision Tree has the poorest performance.This phenomenon might likely be attributed to the input from the Decision Tree, wherein the learned features were unsuitable for creating a tree structure.

IV. DISCUSSION
The performance of the most effective technique, specifically Inception-V3 SVM using the RBF kernel, is presented in Table 8.The classification of the "trash" category poses significant challenges.Out of the total dataset consisting of 137 instances, the system demonstrated accurate classification for just 76 instances.A total of 26 data had been categorized under the "paper" class.The lack of an F1 Score in the image embedding result feature could be attributed to the significant resemblance between the two classes, making it challenging to capture and distinguish their differences effectively.Furthermore, the class labeled as "paper" had the highest prevalence, as it encompasses a total of 594 instances.
Consequently, several subordinate classes, such as "trash," tend to be misclassified as instances of this dominating class.The "paper" class, as the prevailing social group, can be most effectively categorized.Out of a total of 594 data, 566 data had been accurately identified.The Inception-V3 SVM RBF model demonstrated proficiency in garbage classification because of its high F1 score in accurately categorizing a significant portion of the data.

V. CONCLUSION
This study used the Inception-V3 model as a method for image embedding to extract relevant features.In addition, SVM used this attribute to classify the category of garbage.The combination exhibits superior performance because of its greater F1 score than the Inception-V3 combination when used with other methods such as AdaBoost, Decision Tree, and Random Forest.To get the optimal support vector machine (SVM) model, a comparative analysis was conducted on three distinct kernel functions: radial RBF, linear, and sigmoid.In general, the RBF kernel exhibits superior performance compared to the other kernel types that were evaluated.Nevertheless, the most optimal model has challenges in accurately categorizing the "trash" category due to the limited quantity of data available and its resemblance to the "paper" class.In summary, the system developed in this study has a high level of effectiveness, as evidenced by its superior F1 score of 0.874.To enhance performance, it is advantageous to have a greater abundance of data, particularly including the "trash" category, for potential future research endeavors.

Table 1 .
The Average Evaluation Results for All Classes

Table 2 .
The Results of the Average Evaluation of Class "cardboard"

Table 3 .
The Results of the Average Evaluation of Class "glass"

Table 4 .
The Results of the Average Evaluation of Class "metal"

Table 5 .
The Results of the Average Evaluation of Class "paper"

Table 6 .
The Results of the Average Evaluation of Class "plastic"

Table 7 .
The Results of the Average Evaluation of Class "trash"