Resin Code Classification on Plastic Packaging Using Few-Shot Learning - Anindita Septiarini; Alyani Noor Septalia; Masna Wati (Indonesian Journal of Data and Science, 2026)
Poorly managed plastic waste poses a serious environmental threat. Accurate sorting based on the Resin Identification Code (RIC) can improve recycling quality; however, conventional deep learning methods generally require large labeled datasets that are costly and difficult to obtain, particularly for small RIC symbols printed on packaging. This study applies Few-Shot Learning using Prototypical Networks with a 7-way 5-shot episodic training scheme. A self-collected dataset containing 350 images was used, consisting of 50 images for each of seven RIC classes: PETE, HDPE, PVC, LDPE, PP, PS, and OTHER. Three feature-extraction backbones—ConvNet4, ResNet-18, and EfficientNet-B2—were evaluated, while an ablation experiment examined the contribution of light augmentation applied to the support set. Performance was assessed using episodic training accuracy and accuracy and F1-score on an independent test set of 42 images. EfficientNet-B2 achieved the highest episodic training accuracy of 93.36%, outperforming ResNet-18 at 88.71% and ConvNet4 at 54.14%. With light augmentation, EfficientNet-B2 obtained 85.71% test accuracy and correctly classified all PVC, LDPE, and PP samples. Most errors involved visually similar categories, particularly HDPE samples misclassified as PP. Subsequent fine-tuning corrected five of six initial errors, increasing test accuracy to 90.48% and macro F1-score from 0.857 to 0.903. These findings demonstrate that cosine-distance Prototypical Networks are effective for RIC classification under limited-data conditions and provide a promising foundation for automated plastic-waste sorting systems. Training code and experimental configurations are available upon request for research purposes.