Commit bc6d283d authored by mac's avatar mac

c

parent aee3735e
Pipeline #361 canceled with stages
......@@ -109,8 +109,11 @@ def img2Comix(args,net,device,image):
out = out.squeeze(0).clip(-1, 1) * 0.5 + 0.5
out = (out).numpy()
# 改变矩阵形状,因为cv2的图片格式是HxWxC,使用转置transpose
# switch channels -> (c, h, w) -> (h, w, c)
out = np.rollaxis(out, 0, 3)
out = np.rollaxis(out, 0, 3) #形状变为HxWxC
# 改变数值,矩阵乘以255
out = 255 * out
#out = to_pil_image(out)
return out
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment