crytion commited on
Commit
c4bf23b
β€’
1 Parent(s): afd3c08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -34,9 +34,9 @@ def mainTest(bgra, outpath):
34
 
35
  def deep_nude_process(item):
36
  # print('Processing {}'.format(item))
37
- #dress = cv2.imread(item)
38
  #dress = cv2.cvtColor(dress, cv2.COLOR_BGRA2RGBA)
39
- dress = item
40
  h = dress.shape[0]
41
  w = dress.shape[1]
42
  dress = cv2.resize(dress, (512, 512), interpolation=cv2.INTER_CUBIC)
@@ -48,13 +48,13 @@ def deep_nude_process(item):
48
  def inference(img):
49
  global index
50
  bgra = cv2.cvtColor(img, cv2.COLOR_RGBA2BGRA)
51
- #inputpath = "input_" + str(index) + ".jpg"
52
- #cv2.imwrite(inputpath, bgra)
53
 
54
  outputpath = "out_" + str(index) + ".jpg"
55
  index += 1
56
  print(time.strftime("开始!!!!!!!!! %Y-%m-%d %H:%M:%S", time.localtime()))
57
- output = mainTest(bgra, outputpath)
58
  print(time.strftime("η»“ζŸ!!!!!!!!! %Y-%m-%d %H:%M:%S", time.localtime()))
59
  return output
60
 
 
34
 
35
  def deep_nude_process(item):
36
  # print('Processing {}'.format(item))
37
+ dress = cv2.imread(item)
38
  #dress = cv2.cvtColor(dress, cv2.COLOR_BGRA2RGBA)
39
+ #dress = item
40
  h = dress.shape[0]
41
  w = dress.shape[1]
42
  dress = cv2.resize(dress, (512, 512), interpolation=cv2.INTER_CUBIC)
 
48
  def inference(img):
49
  global index
50
  bgra = cv2.cvtColor(img, cv2.COLOR_RGBA2BGRA)
51
+ inputpath = "input_" + str(index) + ".jpg"
52
+ cv2.imwrite(inputpath, bgra)
53
 
54
  outputpath = "out_" + str(index) + ".jpg"
55
  index += 1
56
  print(time.strftime("开始!!!!!!!!! %Y-%m-%d %H:%M:%S", time.localtime()))
57
+ output = mainTest(inputpath, outputpath)
58
  print(time.strftime("η»“ζŸ!!!!!!!!! %Y-%m-%d %H:%M:%S", time.localtime()))
59
  return output
60