Commit 14a7cd75 authored by mac's avatar mac

c

parent c1cd06e9
Pipeline #346 canceled with stages
......@@ -49,8 +49,8 @@ def load_image(image_path, x32=False):
def to_32s(x):
return 256 if x < 256 else x - x % 32
def x32(img, x32=False):
img = img.convert("RGB")
def img_2_x32(img, x32=False):
#img = img.convert("RGB")
if x32:
# def to_32s(x):
......@@ -72,7 +72,8 @@ def img2Comix(args,net,device,image):
#image = load_image(os.path.join(args.input_dir, image_name), args.x32)
image = x32(image,args.x32)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image = img_2_x32(image,args.x32)
with torch.no_grad():
image = to_tensor(image).unsqueeze(0) * 2 - 1
......
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