python读取文件夹中所有图像
Load the image files form the folder 3 input: 4 imgDir: the direction of the folder 5 imgName:the name of the folder 6 output: 7 data:the data of the dataset 8 label:the label of the datset 9 '''10 def load_Img(imgDir,imgFoldName):11 imgs = os.listdir(imgDir+imgFoldName)12 imgNum = len(imgs)13 data = np.empty((imgNum,1,12,12),dtype="float32")14 label = np.empty((imgNum,),dtype=<