Dataset contains 6 Grow rubbish , They are cardboard( carton ),glass( Glass ),metal( Metal ),paper( paper ),plastic( Plastic ), Other waste products (trash), The amount of data is small , Learning only .

Data set preparation , The data set is divided into training set and test set , Make label file . code utils.py
import os import shutil import json
path="e://dataset//Garbage_classification"# This path is the directory of the six categories in the figure above , It can be modified according to its own data set path
classes=[garbage for garbage in os.listdir(path)] if
os.path.exists(os.path.join(os.getcwd(),'train'))==False:
os.makedirs(os.path.join(os.getcwd(),'train')) if
os.path.exists(os.path.join(os.getcwd(),'val'))==False:
os.makedirs(os.path.join(os.getcwd(),'val')) f = open("garbage_train.json",
'w') g = open("garbage_val.json", 'w') for garbage in classes: s = 0 for
imgname in os.listdir(os.path.join(path,garbage)):

Technology