Do Waste Classifiers Recognise Items They Have Never Seen? Object-Disjoint Evaluation on Household and Medical Waste
Authors: Nusrat Jahan, Mst. Eshrat Jahan Esha, Masuma Sadia, Saad Ahmed, Md Zahim Hassan, S M Jahangir Alam
Organizations: Department of Computer Science and Engineering, Bangladesh Army University of Science and Technology (BAUST), Saidpur Cantonment, Saidpur 5310, Nilphamari, Bangladesh
Automatic waste classification supports source separation, which enables recycling and keeps hazardous medical items out of household waste. Waste classification studies often report near-perfect accuracy on random image splits, which put photographs of one item in both training and test sets. To measure how well classifiers recognise items they have never seen, we built BanglaWaste-23, with 4,160 images of 172 objects in 23 household and medical waste classes from Bangladesh. Every image also records which physical item it shows. We evaluated 11 ImageNet-pretrained models and two models trained from scratch (a compact custom network and MobileNetV3-L) using object-disjoint five-fold cross-validation and a random split. On unseen objects, the best pretrained model reached a macro-averaged F1 score of 98.8%, and six models were statistically tied. The random split overstated from-scratch accuracy by 15 to 19 percentage points. The from-scratch models also missed 11 to 13% of medical items, against under 1% for pretrained models. On a second dataset from Dhaka, pretrained accuracy fell by 15 to 22 points. Classifiers should therefore be evaluated on unseen objects, with random-split results read as an upper bound. The data are on Zenodo and the code at https://github.com/saadbaust/BanglaWaste-23.
Figures & tables
Fig. 1: One example image of each of the 23 classes of BanglaWaste-23: (a)–(n) food and plant waste, (o)–(s) household non-food waste, and (t)–(w) medical waste (medicine blister pack, saline infusion set, syringe and used cotton wool).
Fig. 2: Random image-level splitting versus the object-disjoint protocol used in this study. Each square is one image, and squares of the same colour show the same physical object. (a) A random split places images of the same object in both the training and the test set. In BanglaWaste-23, 155 of the 172 objects end up on both sides, so the model is tested on objects it has already seen. (b) In object-disjoint five-fold cross-validation, whole objects are assigned to folds, every class is present in every fold, and each fold is used once as the test set (shown for fold 1). Learning rate and epochs were tuned on one object per class held out from the training folds, never on the test fold, and the out-of-fold predictions of all 4,160 images were pooled.
Fig. 3: Pooled macro-F1 on unseen objects against computational cost (MACs per image, log scale). Error bars show 95% confidence intervals (bootstrap over objects). Blue points show ImageNet-pretrained models, and orange points show models trained from scratch. Numbers identify the models listed on the right.
Fig. 4: Macro-F1 of the same models under a random image split (hatched grey bars) and on unseen objects (solid blue bars, object-disjoint cross-validation, pooled out-of-fold). Numbers above the blue bars give the drop in percentage points. The three models on the left are ImageNet-pretrained, and the two on the right were trained from scratch.
Fig. 5: (a) Accuracy on BDWaste images from Dhaka for the 11 classes shared with BanglaWaste-23 (models trained on all BanglaWaste-23 images). The last row gives the accuracy over all 1,390 images. (b) Macro-F1 (mean of five folds) on the object-disjoint test folds for the original images, after strong JPEG compression (quality 30) and after reducing the resolution to 96 pixels.
Department of Industrial Engineering Kwame Nkrumah University of Science and Technology Kumasi Ghana · Department of Nursing Kwame Nkrumah University of Science and Technology Kumasi Ghana · Department of Mechanical Engineering University of Nottingham NG7 2RD, United Kingdom