Spaces:
Running
Running
gavinyuan
commited on
Commit
·
7267bae
1
Parent(s):
51779c3
add: PIPNet make.sh when started
Browse files- app.py +1 -1
- third_party/PIPNet/lib/tools.py +2 -0
app.py
CHANGED
|
@@ -176,6 +176,7 @@ def make_pipnet():
|
|
| 176 |
]
|
| 177 |
for cmd in cmds:
|
| 178 |
os.system(cmd)
|
|
|
|
| 179 |
|
| 180 |
|
| 181 |
def swap_image(
|
|
@@ -447,7 +448,6 @@ def swap_video_gr(img1, target_path, use_gpu=True, frames=9999999):
|
|
| 447 |
|
| 448 |
if __name__ == "__main__":
|
| 449 |
use_gpu = torch.cuda.is_available()
|
| 450 |
-
make_pipnet()
|
| 451 |
|
| 452 |
with gr.Blocks() as demo:
|
| 453 |
gr.Markdown("SuperSwap")
|
|
|
|
| 176 |
]
|
| 177 |
for cmd in cmds:
|
| 178 |
os.system(cmd)
|
| 179 |
+
print('[PIPNet] nms .o file built successfully.')
|
| 180 |
|
| 181 |
|
| 182 |
def swap_image(
|
|
|
|
| 448 |
|
| 449 |
if __name__ == "__main__":
|
| 450 |
use_gpu = torch.cuda.is_available()
|
|
|
|
| 451 |
|
| 452 |
with gr.Blocks() as demo:
|
| 453 |
gr.Markdown("SuperSwap")
|
third_party/PIPNet/lib/tools.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
import cv2
|
| 2 |
import sys
|
| 3 |
|
|
|
|
|
|
|
| 4 |
|
| 5 |
from math import floor
|
| 6 |
from third_party.PIPNet.FaceBoxesV2.faceboxes_detector import *
|
|
|
|
| 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 *
|