下面展示代码。
def get_image(path):
#从文件中导入图片,制作数据集
i = 0
j = 0
for dir_item in os.listdir(path):
fall_path = os.path.abspath(os.path.join(path, dir_item))
if os.path.isdir(fall_path):
get_image(fall_path)
else:
if dir_item.endswith