crytion commited on
Commit
b4d6bb3
โ€ข
1 Parent(s): c4bf23b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -24,19 +24,16 @@ main.py
24
  """
25
 
26
 
27
- def mainTest(bgra, outpath):
28
- watermark = deep_nude_process(bgra)
29
- #watermark1 = cv2.cvtColor(watermark, cv2.COLOR_RGBA2BGRA)
30
  #cv2.imwrite(outpath, watermark1)
31
- return watermark
32
  #
33
 
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)
 
24
  """
25
 
26
 
27
+ def mainTest(inputpath, outpath):
28
+ watermark = deep_nude_process(inputpath)
29
+ watermark1 = cv2.cvtColor(watermark, cv2.COLOR_BGRA2RGBA)
30
  #cv2.imwrite(outpath, watermark1)
31
+ return watermark1
32
  #
33
 
34
 
35
+ def deep_nude_process(inputpath):
36
+ dress = cv2.imread(inputpath)
 
 
 
37
  h = dress.shape[0]
38
  w = dress.shape[1]
39
  dress = cv2.resize(dress, (512, 512), interpolation=cv2.INTER_CUBIC)