Commit 3f56920f authored by 吴升宇's avatar 吴升宇

fix test

parent 708cbb88
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import cv2
import torch
from skin_detector import skin_to_white
# from skin_detector import skin_to_white
from torchvision import transforms as T
......@@ -308,17 +308,17 @@ class COCODemo(object):
a, b, c = img.shape
for x in range(a):
for y in range(b):
if img[x, y].tolist() < [10, 10, 10]:
if img[x, y].tolist() < [5, 5, 5]:
break
img[x, y] = [0, 0, 0]
for y in range(b - 1, 0, -1):
if img[x, y].tolist() < [10, 10, 10]:
if img[x, y].tolist() < [5, 5, 5]:
break
img[x, y] = [0, 0, 0]
# 把图片皮肤颜色变为白色
img = skin_to_white(img)
# img = skin_to_white(img)
composite = img
return composite
......
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