The unregulated buildup of waste results in the occurrence of flames. This phenomenon poses a substantial threat to both the ecological system and human welfare. To tackle this problem, the current study proposes the implementation of Machine Learning technology to automate the sorting of waste. The methodology being examined incorporates the utilization of SqueezeNet as an image embedding method in conjunction with XGBoost as the final classifier. This work examines the efficacy of the aforementioned technique by doing a comparative analysis with many alternative final classifiers, including LightGBM, XGBoost, CatBoost, Random Forest, SVM, Naïve Bayes, KNN, and Decision Tree. The experimental results indicate that the integration of SqueezeNet and XGBoost produces the highest level of performance in the field of garbage categorization, as supported by an F1-score of 0.931. SqueezeNet is a method employed for image embedding that enables the extraction of salient features from images. This procedure enables the recognition of unique characteristics linked to different classes. Therefore, XGBoost may be utilized to enhance classification tasks. XGBoost has the ability to generate a feature importance score. Therefore, enabling the recognition of the most prominent attributes. This methodology possesses the capacity to alleviate the risk of fire that arises due to the accumulation of unregulated trash. This work makes a substantial contribution to environmental conservation and the improvement of public safety.