TEST_WEARING.py 文件源码

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

项目:WEARING 作者: nlkim0817 项目源码 文件源码
def itf( X, npx, mode='RGB' ):
    X = ( X.reshape( -1, nc, npx, npx ).transpose( 0, 2, 3, 1 ) + 1. ) / 2.
    if mode == 'LAB':
       X[:,:,:,0] *= 100
       X[:,:,:,1] *= 255
       X[:,:,:,2] *= 255
       X[:,:,:,1] -= 128
       X[:,:,:,2] -= 128
       for i in range(X.shape[0]):
     X[i,:,:,:]  = color.lab2rgb(X[i,:,:,:].astype('int8'))
    return X.astype('float32')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号