gavinyuan commited on
Commit
89b3f7a
·
1 Parent(s): 7267bae

add: PIPNet make.sh when started

Browse files
Files changed (2) hide show
  1. app.py +0 -12
  2. third_party/PIPNet/lib/tools.py +14 -1
app.py CHANGED
@@ -167,18 +167,6 @@ else:
167
  print(f'[demo] model loaded from {pt_path}')
168
 
169
 
170
- def make_pipnet():
171
- cmds = [
172
- "cd ./third_party/PIPNet/FaceBoxesV2/utils/nms/"
173
- "chmod +x make.sh"
174
- "bash ./make.sh"
175
- "cd -"
176
- ]
177
- for cmd in cmds:
178
- os.system(cmd)
179
- print('[PIPNet] nms .o file built successfully.')
180
-
181
-
182
  def swap_image(
183
  source_image,
184
  target_path,
 
167
  print(f'[demo] model loaded from {pt_path}')
168
 
169
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  def swap_image(
171
  source_image,
172
  target_path,
third_party/PIPNet/lib/tools.py CHANGED
@@ -1,9 +1,22 @@
1
  import cv2
2
  import sys
3
 
4
- from app import make_pipnet
 
 
 
 
 
 
 
 
 
 
 
 
5
  make_pipnet()
6
 
 
7
  from math import floor
8
  from third_party.PIPNet.FaceBoxesV2.faceboxes_detector import *
9
 
 
1
  import cv2
2
  import sys
3
 
4
+
5
+ def make_pipnet():
6
+ cmds = [
7
+ "cd ./third_party/PIPNet/FaceBoxesV2/utils/nms/"
8
+ "chmod +x make.sh"
9
+ "bash ./make.sh"
10
+ "cd -"
11
+ ]
12
+ for cmd in cmds:
13
+ os.system(cmd)
14
+ print('[PIPNet.lib.tools] nms .o file built successfully.')
15
+
16
+
17
  make_pipnet()
18
 
19
+
20
  from math import floor
21
  from third_party.PIPNet.FaceBoxesV2.faceboxes_detector import *
22