ColourNet.py 文件源码

python
阅读 80 收藏 0 点赞 0 评论 0

项目:ColourNet 作者: raghavgupta0296 项目源码 文件源码
def chooose_ims(batch_size):
    global index
    I1 = np.ndarray(shape=[1,256,256,1])
    U1 = np.ndarray(shape=[1,256,256,1])
    V1 = np.ndarray(shape=[1,256,256,1])
    for i in range(batch_size):
        if index>=len(files):
            index=0
        image = im.imread("/dataImages/dataset/"+files[index],mode='RGB')
        image = image/255
        I, U, V = imManipulation.rgb2yuv(image)
        I = np.reshape(I, (1,256, 256,1))
        U = np.reshape(U, (1,256, 256,1))
        V = np.reshape(V, (1,256, 256,1))
        I1 = np.concatenate((I1,I),axis=0)
        U1 = np.concatenate((U1,U),axis=0)
        V1 = np.concatenate((V1,V),axis=0)
        index+=1
    I1 = I1[1:,:,:,:]
    U1 = U1[1:,:,:,:]
    V1 = V1[1:,:,:,:]
    return I1,U1,V1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号