Spaces:
Running
on
Zero
Running
on
Zero
rlawjdghek
commited on
Commit
β’
f9d01c1
1
Parent(s):
92a1987
remove space
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import spaces
|
2 |
import os
|
3 |
import sys
|
4 |
import time
|
@@ -20,7 +20,7 @@ from utils_stableviton import get_batch, get_mask_location, tensor2img
|
|
20 |
PROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()
|
21 |
sys.path.insert(0, str(PROJECT_ROOT))
|
22 |
|
23 |
-
|
24 |
from preprocess.humanparsing.run_parsing import Parsing
|
25 |
from preprocess.openpose.run_openpose import OpenPose
|
26 |
import apply_net
|
@@ -34,10 +34,10 @@ IMG_W = 384
|
|
34 |
openpose_model_hd = OpenPose(0)
|
35 |
openpose_model_hd.preprocessor.body_estimation.model.to('cuda')
|
36 |
parsing_model_hd = Parsing(0)
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
category_dict = ['upperbody', 'lowerbody', 'dress']
|
43 |
category_dict_utils = ['upper_body', 'lower_body', 'dresses']
|
|
|
1 |
+
# import spaces
|
2 |
import os
|
3 |
import sys
|
4 |
import time
|
|
|
20 |
PROJECT_ROOT = Path(__file__).absolute().parents[1].absolute()
|
21 |
sys.path.insert(0, str(PROJECT_ROOT))
|
22 |
|
23 |
+
from preprocess.detectron2.projects.DensePose.apply_net_gradio import DensePose4Gradio
|
24 |
from preprocess.humanparsing.run_parsing import Parsing
|
25 |
from preprocess.openpose.run_openpose import OpenPose
|
26 |
import apply_net
|
|
|
34 |
openpose_model_hd = OpenPose(0)
|
35 |
openpose_model_hd.preprocessor.body_estimation.model.to('cuda')
|
36 |
parsing_model_hd = Parsing(0)
|
37 |
+
densepose_model_hd = DensePose4Gradio(
|
38 |
+
cfg='preprocess/detectron2/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x.yaml',
|
39 |
+
model='https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pkl',
|
40 |
+
)
|
41 |
|
42 |
category_dict = ['upperbody', 'lowerbody', 'dress']
|
43 |
category_dict_utils = ['upper_body', 'lower_body', 'dresses']
|