【记录】tensorflow读取多幅图像

image= np.zeros((2000,307,720))

foriinrange(0,2000):

m ="%04d"% (i+1)

#print(m)m1=str(m)

filename="NormImg/"+m1+".png"#print(str(filename))withtf.Session()assession:

image[i]=mpimg.imread(filename)

2000张图像的读取

包括文件名的使用,其中,图片命名方式为00**.png,数字部分按数字递增并转换为字符串,再与图片后缀字符串连接,最终读取。

你可能感兴趣的:(【记录】tensorflow读取多幅图像)