Upload 947 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +35 -35
- .gitignore +1 -0
- README.md +12 -13
- amazon_oxy.py +39 -0
- app.py +353 -154
- apply_net.py +359 -0
- ckpt/densepose/.DS_Store +0 -0
- ckpt/densepose/model_final_162be9.pkl +3 -0
- ckpt/humanparsing/parsing_atr.onnx +3 -0
- ckpt/humanparsing/parsing_lip.onnx +3 -0
- ckpt/openpose/.DS_Store +0 -0
- ckpt/openpose/ckpts/body_pose_model.pth +3 -0
- configs/Base-DensePose-RCNN-FPN.yaml +48 -0
- configs/HRNet/densepose_rcnn_HRFPN_HRNet_w32_s1x.yaml +16 -0
- configs/HRNet/densepose_rcnn_HRFPN_HRNet_w40_s1x.yaml +23 -0
- configs/HRNet/densepose_rcnn_HRFPN_HRNet_w48_s1x.yaml +23 -0
- configs/cse/Base-DensePose-RCNN-FPN-Human.yaml +20 -0
- configs/cse/Base-DensePose-RCNN-FPN.yaml +60 -0
- configs/cse/densepose_rcnn_R_101_FPN_DL_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_101_FPN_DL_soft_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_101_FPN_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_101_FPN_soft_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_50_FPN_DL_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_50_FPN_DL_soft_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_50_FPN_s1x.yaml +12 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_16k.yaml +133 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_4k.yaml +133 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_16k.yaml +119 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_i2m_16k.yaml +121 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_m2m_16k.yaml +138 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_16k.yaml +119 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_4k.yaml +119 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k.yaml +118 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_chimps_finetune_4k.yaml +29 -0
- configs/cse/densepose_rcnn_R_50_FPN_soft_s1x.yaml +12 -0
- configs/densepose_rcnn_R_101_FPN_DL_WC1M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_101_FPN_DL_WC1_s1x.yaml +16 -0
- configs/densepose_rcnn_R_101_FPN_DL_WC2M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_101_FPN_DL_WC2_s1x.yaml +16 -0
- configs/densepose_rcnn_R_101_FPN_DL_s1x.yaml +10 -0
- configs/densepose_rcnn_R_101_FPN_WC1M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_101_FPN_WC1_s1x.yaml +16 -0
- configs/densepose_rcnn_R_101_FPN_WC2M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_101_FPN_WC2_s1x.yaml +16 -0
- configs/densepose_rcnn_R_101_FPN_s1x.yaml +8 -0
- configs/densepose_rcnn_R_101_FPN_s1x_legacy.yaml +17 -0
- configs/densepose_rcnn_R_50_FPN_DL_WC1M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_50_FPN_DL_WC1_s1x.yaml +16 -0
- configs/densepose_rcnn_R_50_FPN_DL_WC2M_s1x.yaml +18 -0
- configs/densepose_rcnn_R_50_FPN_DL_WC2_s1x.yaml +16 -0
.gitattributes
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.pyc
|
README.md
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
-
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
---
|
2 |
+
title: Virtual Tryon Demo
|
3 |
+
emoji: 🔥
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 4.41.0
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
amazon_oxy.py
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import json
|
3 |
+
import os
|
4 |
+
|
5 |
+
username = os.environ.get('USERNAME')
|
6 |
+
passwd = os.environ.get('PASSWORD')
|
7 |
+
def scrape_amazon(search_query, n =20):
|
8 |
+
# Structure payload.
|
9 |
+
payload = {
|
10 |
+
'source': 'amazon_search',
|
11 |
+
'domain': 'com',
|
12 |
+
'query': f'{search_query}',
|
13 |
+
'start_page': 1,
|
14 |
+
'pages': 1,
|
15 |
+
'parse': True,
|
16 |
+
# 'context': [
|
17 |
+
# {'key': 'category_id', 'value': 16391693031}
|
18 |
+
# ],
|
19 |
+
}
|
20 |
+
|
21 |
+
# Get response.
|
22 |
+
response = requests.request(
|
23 |
+
'POST',
|
24 |
+
'https://realtime.oxylabs.io/v1/queries',
|
25 |
+
auth=(username, passwd),
|
26 |
+
json=payload,
|
27 |
+
)
|
28 |
+
result = json.loads(response.content)
|
29 |
+
final_result = {}
|
30 |
+
i=0
|
31 |
+
# Parse result.
|
32 |
+
for item in result['results'][0]['content']['results']['organic']:
|
33 |
+
if i<n:
|
34 |
+
final_result[item['url_image']]= (item['price'],"amazon.com"+item['url'])
|
35 |
+
i+=1
|
36 |
+
else:
|
37 |
+
break
|
38 |
+
|
39 |
+
return final_result
|
app.py
CHANGED
@@ -1,154 +1,353 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
|
3 |
-
import
|
4 |
-
|
5 |
-
|
6 |
-
from
|
7 |
-
import
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
)
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from gradio.themes.base import Base
|
3 |
+
import spaces
|
4 |
+
from PIL import Image
|
5 |
+
from src.tryon_pipeline import StableDiffusionXLInpaintPipeline as TryonPipeline
|
6 |
+
from src.unet_hacked_garmnet import UNet2DConditionModel as UNet2DConditionModel_ref
|
7 |
+
from src.unet_hacked_tryon import UNet2DConditionModel
|
8 |
+
from transformers import (
|
9 |
+
CLIPImageProcessor,
|
10 |
+
CLIPVisionModelWithProjection,
|
11 |
+
CLIPTextModel,
|
12 |
+
CLIPTextModelWithProjection,
|
13 |
+
)
|
14 |
+
from diffusers import DDPMScheduler,AutoencoderKL
|
15 |
+
from typing import List
|
16 |
+
import ast
|
17 |
+
import webbrowser
|
18 |
+
|
19 |
+
import torch
|
20 |
+
import os
|
21 |
+
from transformers import AutoTokenizer
|
22 |
+
import numpy as np
|
23 |
+
from utils_mask import get_mask_location
|
24 |
+
from torchvision import transforms
|
25 |
+
import apply_net
|
26 |
+
from preprocess.humanparsing.run_parsing import Parsing
|
27 |
+
from preprocess.openpose.run_openpose import OpenPose
|
28 |
+
from detectron2.data.detection_utils import convert_PIL_to_numpy,_apply_exif_orientation
|
29 |
+
from torchvision.transforms.functional import to_pil_image
|
30 |
+
import amazon_oxy
|
31 |
+
|
32 |
+
|
33 |
+
class Seafoam(Base):
|
34 |
+
pass
|
35 |
+
|
36 |
+
def pil_to_binary_mask(pil_image, threshold=0):
|
37 |
+
np_image = np.array(pil_image)
|
38 |
+
grayscale_image = Image.fromarray(np_image).convert("L")
|
39 |
+
binary_mask = np.array(grayscale_image) > threshold
|
40 |
+
mask = np.zeros(binary_mask.shape, dtype=np.uint8)
|
41 |
+
for i in range(binary_mask.shape[0]):
|
42 |
+
for j in range(binary_mask.shape[1]):
|
43 |
+
if binary_mask[i,j] == True :
|
44 |
+
mask[i,j] = 1
|
45 |
+
mask = (mask*255).astype(np.uint8)
|
46 |
+
output_mask = Image.fromarray(mask)
|
47 |
+
return output_mask
|
48 |
+
|
49 |
+
def fetch_products(query):
|
50 |
+
result= amazon_oxy.scrape_amazon(query)
|
51 |
+
values = list(result.values())
|
52 |
+
imgs=list(result.keys())
|
53 |
+
pic_and_prices = []
|
54 |
+
urls = []
|
55 |
+
i = 0
|
56 |
+
for price, url in values:
|
57 |
+
pic_and_prices.append((imgs[i], "$"+str(price)))
|
58 |
+
i+=1
|
59 |
+
urls.append(url)
|
60 |
+
return [pic_and_prices, urls]
|
61 |
+
|
62 |
+
base_path = 'yisol/IDM-VTON'
|
63 |
+
example_path = os.path.join(os.path.dirname(__file__), 'example')
|
64 |
+
|
65 |
+
unet = UNet2DConditionModel.from_pretrained(
|
66 |
+
base_path,
|
67 |
+
subfolder="unet",
|
68 |
+
torch_dtype=torch.float16,
|
69 |
+
)
|
70 |
+
unet.requires_grad_(False)
|
71 |
+
tokenizer_one = AutoTokenizer.from_pretrained(
|
72 |
+
base_path,
|
73 |
+
subfolder="tokenizer",
|
74 |
+
revision=None,
|
75 |
+
use_fast=False,
|
76 |
+
)
|
77 |
+
tokenizer_two = AutoTokenizer.from_pretrained(
|
78 |
+
base_path,
|
79 |
+
subfolder="tokenizer_2",
|
80 |
+
revision=None,
|
81 |
+
use_fast=False,
|
82 |
+
)
|
83 |
+
noise_scheduler = DDPMScheduler.from_pretrained(base_path, subfolder="scheduler")
|
84 |
+
|
85 |
+
text_encoder_one = CLIPTextModel.from_pretrained(
|
86 |
+
base_path,
|
87 |
+
subfolder="text_encoder",
|
88 |
+
torch_dtype=torch.float16,
|
89 |
+
)
|
90 |
+
text_encoder_two = CLIPTextModelWithProjection.from_pretrained(
|
91 |
+
base_path,
|
92 |
+
subfolder="text_encoder_2",
|
93 |
+
torch_dtype=torch.float16,
|
94 |
+
)
|
95 |
+
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
|
96 |
+
base_path,
|
97 |
+
subfolder="image_encoder",
|
98 |
+
torch_dtype=torch.float16,
|
99 |
+
)
|
100 |
+
vae = AutoencoderKL.from_pretrained(base_path,
|
101 |
+
subfolder="vae",
|
102 |
+
torch_dtype=torch.float16,
|
103 |
+
)
|
104 |
+
|
105 |
+
# "stabilityai/stable-diffusion-xl-base-1.0",
|
106 |
+
UNet_Encoder = UNet2DConditionModel_ref.from_pretrained(
|
107 |
+
base_path,
|
108 |
+
subfolder="unet_encoder",
|
109 |
+
torch_dtype=torch.float16,
|
110 |
+
)
|
111 |
+
|
112 |
+
parsing_model = Parsing(0)
|
113 |
+
openpose_model = OpenPose(0)
|
114 |
+
|
115 |
+
UNet_Encoder.requires_grad_(False)
|
116 |
+
image_encoder.requires_grad_(False)
|
117 |
+
vae.requires_grad_(False)
|
118 |
+
unet.requires_grad_(False)
|
119 |
+
text_encoder_one.requires_grad_(False)
|
120 |
+
text_encoder_two.requires_grad_(False)
|
121 |
+
tensor_transfrom = transforms.Compose(
|
122 |
+
[
|
123 |
+
transforms.ToTensor(),
|
124 |
+
transforms.Normalize([0.5], [0.5]),
|
125 |
+
]
|
126 |
+
)
|
127 |
+
|
128 |
+
pipe = TryonPipeline.from_pretrained(
|
129 |
+
base_path,
|
130 |
+
unet=unet,
|
131 |
+
vae=vae,
|
132 |
+
feature_extractor= CLIPImageProcessor(),
|
133 |
+
text_encoder = text_encoder_one,
|
134 |
+
text_encoder_2 = text_encoder_two,
|
135 |
+
tokenizer = tokenizer_one,
|
136 |
+
tokenizer_2 = tokenizer_two,
|
137 |
+
scheduler = noise_scheduler,
|
138 |
+
image_encoder=image_encoder,
|
139 |
+
torch_dtype=torch.float16,
|
140 |
+
)
|
141 |
+
pipe.unet_encoder = UNet_Encoder
|
142 |
+
|
143 |
+
@spaces.GPU
|
144 |
+
def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
|
145 |
+
device = "cuda"
|
146 |
+
|
147 |
+
openpose_model.preprocessor.body_estimation.model.to(device)
|
148 |
+
pipe.to(device)
|
149 |
+
pipe.unet_encoder.to(device)
|
150 |
+
|
151 |
+
garm_img= garm_img.convert("RGB").resize((768,1024))
|
152 |
+
human_img_orig = dict["background"].convert("RGB")
|
153 |
+
|
154 |
+
if is_checked_crop:
|
155 |
+
width, height = human_img_orig.size
|
156 |
+
target_width = int(min(width, height * (3 / 4)))
|
157 |
+
target_height = int(min(height, width * (4 / 3)))
|
158 |
+
left = (width - target_width) / 2
|
159 |
+
top = (height - target_height) / 2
|
160 |
+
right = (width + target_width) / 2
|
161 |
+
bottom = (height + target_height) / 2
|
162 |
+
cropped_img = human_img_orig.crop((left, top, right, bottom))
|
163 |
+
crop_size = cropped_img.size
|
164 |
+
human_img = cropped_img.resize((768,1024))
|
165 |
+
else:
|
166 |
+
human_img = human_img_orig.resize((768,1024))
|
167 |
+
|
168 |
+
|
169 |
+
if is_checked:
|
170 |
+
keypoints = openpose_model(human_img.resize((384,512)))
|
171 |
+
model_parse, _ = parsing_model(human_img.resize((384,512)))
|
172 |
+
mask, mask_gray = get_mask_location('hd', "upper_body", model_parse, keypoints)
|
173 |
+
mask = mask.resize((768,1024))
|
174 |
+
else:
|
175 |
+
mask = pil_to_binary_mask(dict['layers'][0].convert("RGB").resize((768, 1024)))
|
176 |
+
# mask = transforms.ToTensor()(mask)
|
177 |
+
# mask = mask.unsqueeze(0)
|
178 |
+
mask_gray = (1-transforms.ToTensor()(mask)) * tensor_transfrom(human_img)
|
179 |
+
mask_gray = to_pil_image((mask_gray+1.0)/2.0)
|
180 |
+
|
181 |
+
|
182 |
+
human_img_arg = _apply_exif_orientation(human_img.resize((384,512)))
|
183 |
+
human_img_arg = convert_PIL_to_numpy(human_img_arg, format="BGR")
|
184 |
+
|
185 |
+
|
186 |
+
|
187 |
+
args = apply_net.create_argument_parser().parse_args(('show', './configs/densepose_rcnn_R_50_FPN_s1x.yaml', './ckpt/densepose/model_final_162be9.pkl', 'dp_segm', '-v', '--opts', 'MODEL.DEVICE', 'cuda'))
|
188 |
+
# verbosity = getattr(args, "verbosity", None)
|
189 |
+
pose_img = args.func(args,human_img_arg)
|
190 |
+
pose_img = pose_img[:,:,::-1]
|
191 |
+
pose_img = Image.fromarray(pose_img).resize((768,1024))
|
192 |
+
|
193 |
+
with torch.no_grad():
|
194 |
+
# Extract the images
|
195 |
+
with torch.cuda.amp.autocast():
|
196 |
+
with torch.no_grad():
|
197 |
+
prompt = "model is wearing " + garment_des
|
198 |
+
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
199 |
+
with torch.inference_mode():
|
200 |
+
(
|
201 |
+
prompt_embeds,
|
202 |
+
negative_prompt_embeds,
|
203 |
+
pooled_prompt_embeds,
|
204 |
+
negative_pooled_prompt_embeds,
|
205 |
+
) = pipe.encode_prompt(
|
206 |
+
prompt,
|
207 |
+
num_images_per_prompt=1,
|
208 |
+
do_classifier_free_guidance=True,
|
209 |
+
negative_prompt=negative_prompt,
|
210 |
+
)
|
211 |
+
|
212 |
+
prompt = "a photo of " + garment_des
|
213 |
+
negative_prompt = "monochrome, lowres, bad anatomy, worst quality, low quality"
|
214 |
+
if not isinstance(prompt, List):
|
215 |
+
prompt = [prompt] * 1
|
216 |
+
if not isinstance(negative_prompt, List):
|
217 |
+
negative_prompt = [negative_prompt] * 1
|
218 |
+
with torch.inference_mode():
|
219 |
+
(
|
220 |
+
prompt_embeds_c,
|
221 |
+
_,
|
222 |
+
_,
|
223 |
+
_,
|
224 |
+
) = pipe.encode_prompt(
|
225 |
+
prompt,
|
226 |
+
num_images_per_prompt=1,
|
227 |
+
do_classifier_free_guidance=False,
|
228 |
+
negative_prompt=negative_prompt,
|
229 |
+
)
|
230 |
+
|
231 |
+
|
232 |
+
|
233 |
+
pose_img = tensor_transfrom(pose_img).unsqueeze(0).to(device,torch.float16)
|
234 |
+
garm_tensor = tensor_transfrom(garm_img).unsqueeze(0).to(device,torch.float16)
|
235 |
+
generator = torch.Generator(device).manual_seed(seed) if seed is not None else None
|
236 |
+
images = pipe(
|
237 |
+
prompt_embeds=prompt_embeds.to(device,torch.float16),
|
238 |
+
negative_prompt_embeds=negative_prompt_embeds.to(device,torch.float16),
|
239 |
+
pooled_prompt_embeds=pooled_prompt_embeds.to(device,torch.float16),
|
240 |
+
negative_pooled_prompt_embeds=negative_pooled_prompt_embeds.to(device,torch.float16),
|
241 |
+
num_inference_steps=denoise_steps,
|
242 |
+
generator=generator,
|
243 |
+
strength = 1.0,
|
244 |
+
pose_img = pose_img.to(device,torch.float16),
|
245 |
+
text_embeds_cloth=prompt_embeds_c.to(device,torch.float16),
|
246 |
+
cloth = garm_tensor.to(device,torch.float16),
|
247 |
+
mask_image=mask,
|
248 |
+
image=human_img,
|
249 |
+
height=1024,
|
250 |
+
width=768,
|
251 |
+
ip_adapter_image = garm_img.resize((768,1024)),
|
252 |
+
guidance_scale=2.0,
|
253 |
+
)[0]
|
254 |
+
|
255 |
+
if is_checked_crop:
|
256 |
+
out_img = images[0].resize(crop_size)
|
257 |
+
human_img_orig.paste(out_img, (int(left), int(top)))
|
258 |
+
return human_img_orig
|
259 |
+
else:
|
260 |
+
return images[0]
|
261 |
+
# return images[0], mask_gray
|
262 |
+
# Function to handle image selection from the gallery
|
263 |
+
def select_image(images, urls, evt: gr.SelectData):
|
264 |
+
urls = ast.literal_eval(urls)
|
265 |
+
return images[evt.index][0], urls[evt.index]
|
266 |
+
|
267 |
+
garm_list = os.listdir(os.path.join(example_path,"cloth"))
|
268 |
+
garm_list_path = [os.path.join(example_path,"cloth",garm) for garm in garm_list]
|
269 |
+
|
270 |
+
human_list = os.listdir(os.path.join(example_path,"human"))
|
271 |
+
human_list_path = [os.path.join(example_path,"human",human) for human in human_list]
|
272 |
+
|
273 |
+
human_ex_list = []
|
274 |
+
for ex_human in human_list_path:
|
275 |
+
ex_dict= {}
|
276 |
+
ex_dict['background'] = ex_human
|
277 |
+
ex_dict['layers'] = None
|
278 |
+
ex_dict['composite'] = None
|
279 |
+
human_ex_list.append(ex_dict)
|
280 |
+
|
281 |
+
def open_link(link):
|
282 |
+
print(f"link is {link}")
|
283 |
+
return link
|
284 |
+
##default human
|
285 |
+
seafoam = Seafoam()
|
286 |
+
# Include the CSS file content in your Gradio interface
|
287 |
+
custom_css = """
|
288 |
+
body, .gradio-container {
|
289 |
+
background-color: #0b0f19;
|
290 |
+
color: black; /* Black text */
|
291 |
+
}
|
292 |
+
|
293 |
+
.gr-block {
|
294 |
+
background-color: #00a49c; /* Light green background */
|
295 |
+
color: black; /* Black text */
|
296 |
+
padding: 10px; /* Optional: Add some padding for spacing */
|
297 |
+
border-radius: 5px; /* Optional: Rounded corners for blocks */
|
298 |
+
}
|
299 |
+
|
300 |
+
"""
|
301 |
+
image_blocks = gr.Blocks(css=custom_css).queue()
|
302 |
+
with image_blocks as demo:
|
303 |
+
gr.HTML("<center><h1>Veshup 👚👖</h1></center>")
|
304 |
+
gr.HTML("<center><p>Upload an image of yourself or select from examples then describe your garment in the text box and wait for the magic. ✨</p></center>")
|
305 |
+
|
306 |
+
with gr.Row():
|
307 |
+
with gr.Column():
|
308 |
+
imgs = gr.ImageEditor(sources='upload', type="pil", label='Image', interactive=True)
|
309 |
+
with gr.Row():
|
310 |
+
is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask",value=True)
|
311 |
+
with gr.Row():
|
312 |
+
is_checked_crop = gr.Checkbox(label="Yes", info="Use auto-crop & resizing",value=False)
|
313 |
+
|
314 |
+
example = gr.Examples(
|
315 |
+
inputs=imgs,
|
316 |
+
examples_per_page=10,
|
317 |
+
examples=human_ex_list
|
318 |
+
)
|
319 |
+
with gr.Accordion(label="Advanced Settings", open=False):
|
320 |
+
with gr.Row():
|
321 |
+
denoise_steps = gr.Number(label="Denoising Steps", minimum=5, maximum=40, value=10, step=1)
|
322 |
+
seed = gr.Number(label="Seed", minimum=-1, maximum=2147483647, step=1, value=42)
|
323 |
+
|
324 |
+
with gr.Column():
|
325 |
+
prompt = gr.Textbox(placeholder="Description of garment ex: Yellow Top", show_label=False, elem_id="prompt")
|
326 |
+
fetch_button = gr.Button("Find Products")
|
327 |
+
|
328 |
+
image_gallery = gr.Gallery(label="Available Products", show_label=True, elem_id="gallery"
|
329 |
+
, columns=[3], rows=[1], object_fit="contain", height="auto", allow_preview= False)
|
330 |
+
url_display = gr.Textbox(label="URLs of Images", interactive=False, visible=False)
|
331 |
+
with gr.Column():
|
332 |
+
garm_img = gr.Image(label="Garment", sources='upload', type="pil")
|
333 |
+
try_button = gr.Button(value="Try-on")
|
334 |
+
#masked_img = gr.Image(label="Masked image output", elem_id="masked-img",show_share_button=False, visi)
|
335 |
+
image_out = gr.Image(label="Output", elem_id="output-img",show_share_button=False)
|
336 |
+
buy_link = gr.Textbox(label="URL of Selected Image", interactive=False, visible= False)
|
337 |
+
buy_button = gr.Button(value="Like it? Click to buy")
|
338 |
+
output = gr.HTML()
|
339 |
+
|
340 |
+
fetch_button.click(fn=fetch_products, inputs=prompt, outputs=[image_gallery, url_display])
|
341 |
+
image_gallery.select(select_image, [image_gallery, url_display], [garm_img, buy_link])
|
342 |
+
#try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed], outputs=[image_out,masked_img], api_name='tryon')
|
343 |
+
#buy_button.click(fn=None,inputs=buy_link,js=f"(buy_link) => {{ window.open(buy_link.substring(buy_link.indexOf('amazon.com')), '_blank');console.log(buy_link) }}")
|
344 |
+
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, prompt, is_checked,is_checked_crop, denoise_steps, seed], outputs=[image_out], api_name='tryon')
|
345 |
+
|
346 |
+
buy_button.click(fn=None,inputs=buy_link, js=f'''(buy_link) => {{
|
347 |
+
const clean_link = buy_link.includes('http') ? buy_link : 'https://' + buy_link;
|
348 |
+
window.open(clean_link, '_blank');
|
349 |
+
console.log(clean_link);
|
350 |
+
}}'''
|
351 |
+
)
|
352 |
+
|
353 |
+
image_blocks.launch()
|
apply_net.py
ADDED
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
# Copyright (c) Facebook, Inc. and its affiliates.
|
3 |
+
|
4 |
+
import argparse
|
5 |
+
import glob
|
6 |
+
import logging
|
7 |
+
import os
|
8 |
+
import sys
|
9 |
+
from typing import Any, ClassVar, Dict, List
|
10 |
+
import torch
|
11 |
+
|
12 |
+
from detectron2.config import CfgNode, get_cfg
|
13 |
+
from detectron2.data.detection_utils import read_image
|
14 |
+
from detectron2.engine.defaults import DefaultPredictor
|
15 |
+
from detectron2.structures.instances import Instances
|
16 |
+
from detectron2.utils.logger import setup_logger
|
17 |
+
|
18 |
+
from densepose import add_densepose_config
|
19 |
+
from densepose.structures import DensePoseChartPredictorOutput, DensePoseEmbeddingPredictorOutput
|
20 |
+
from densepose.utils.logger import verbosity_to_level
|
21 |
+
from densepose.vis.base import CompoundVisualizer
|
22 |
+
from densepose.vis.bounding_box import ScoredBoundingBoxVisualizer
|
23 |
+
from densepose.vis.densepose_outputs_vertex import (
|
24 |
+
DensePoseOutputsTextureVisualizer,
|
25 |
+
DensePoseOutputsVertexVisualizer,
|
26 |
+
get_texture_atlases,
|
27 |
+
)
|
28 |
+
from densepose.vis.densepose_results import (
|
29 |
+
DensePoseResultsContourVisualizer,
|
30 |
+
DensePoseResultsFineSegmentationVisualizer,
|
31 |
+
DensePoseResultsUVisualizer,
|
32 |
+
DensePoseResultsVVisualizer,
|
33 |
+
)
|
34 |
+
from densepose.vis.densepose_results_textures import (
|
35 |
+
DensePoseResultsVisualizerWithTexture,
|
36 |
+
get_texture_atlas,
|
37 |
+
)
|
38 |
+
from densepose.vis.extractor import (
|
39 |
+
CompoundExtractor,
|
40 |
+
DensePoseOutputsExtractor,
|
41 |
+
DensePoseResultExtractor,
|
42 |
+
create_extractor,
|
43 |
+
)
|
44 |
+
|
45 |
+
DOC = """Apply Net - a tool to print / visualize DensePose results
|
46 |
+
"""
|
47 |
+
|
48 |
+
LOGGER_NAME = "apply_net"
|
49 |
+
logger = logging.getLogger(LOGGER_NAME)
|
50 |
+
|
51 |
+
_ACTION_REGISTRY: Dict[str, "Action"] = {}
|
52 |
+
|
53 |
+
|
54 |
+
class Action:
|
55 |
+
@classmethod
|
56 |
+
def add_arguments(cls: type, parser: argparse.ArgumentParser):
|
57 |
+
parser.add_argument(
|
58 |
+
"-v",
|
59 |
+
"--verbosity",
|
60 |
+
action="count",
|
61 |
+
help="Verbose mode. Multiple -v options increase the verbosity.",
|
62 |
+
)
|
63 |
+
|
64 |
+
|
65 |
+
def register_action(cls: type):
|
66 |
+
"""
|
67 |
+
Decorator for action classes to automate action registration
|
68 |
+
"""
|
69 |
+
global _ACTION_REGISTRY
|
70 |
+
_ACTION_REGISTRY[cls.COMMAND] = cls
|
71 |
+
return cls
|
72 |
+
|
73 |
+
|
74 |
+
class InferenceAction(Action):
|
75 |
+
@classmethod
|
76 |
+
def add_arguments(cls: type, parser: argparse.ArgumentParser):
|
77 |
+
super(InferenceAction, cls).add_arguments(parser)
|
78 |
+
parser.add_argument("cfg", metavar="<config>", help="Config file")
|
79 |
+
parser.add_argument("model", metavar="<model>", help="Model file")
|
80 |
+
parser.add_argument(
|
81 |
+
"--opts",
|
82 |
+
help="Modify config options using the command-line 'KEY VALUE' pairs",
|
83 |
+
default=[],
|
84 |
+
nargs=argparse.REMAINDER,
|
85 |
+
)
|
86 |
+
|
87 |
+
@classmethod
|
88 |
+
def execute(cls: type, args: argparse.Namespace, human_img):
|
89 |
+
logger.info(f"Loading config from {args.cfg}")
|
90 |
+
opts = []
|
91 |
+
cfg = cls.setup_config(args.cfg, args.model, args, opts)
|
92 |
+
logger.info(f"Loading model from {args.model}")
|
93 |
+
predictor = DefaultPredictor(cfg)
|
94 |
+
# logger.info(f"Loading data from {args.input}")
|
95 |
+
# file_list = cls._get_input_file_list(args.input)
|
96 |
+
# if len(file_list) == 0:
|
97 |
+
# logger.warning(f"No input images for {args.input}")
|
98 |
+
# return
|
99 |
+
context = cls.create_context(args, cfg)
|
100 |
+
# for file_name in file_list:
|
101 |
+
# img = read_image(file_name, format="BGR") # predictor expects BGR image.
|
102 |
+
with torch.no_grad():
|
103 |
+
outputs = predictor(human_img)["instances"]
|
104 |
+
out_pose = cls.execute_on_outputs(context, {"image": human_img}, outputs)
|
105 |
+
cls.postexecute(context)
|
106 |
+
return out_pose
|
107 |
+
|
108 |
+
@classmethod
|
109 |
+
def setup_config(
|
110 |
+
cls: type, config_fpath: str, model_fpath: str, args: argparse.Namespace, opts: List[str]
|
111 |
+
):
|
112 |
+
cfg = get_cfg()
|
113 |
+
add_densepose_config(cfg)
|
114 |
+
cfg.merge_from_file(config_fpath)
|
115 |
+
cfg.merge_from_list(args.opts)
|
116 |
+
if opts:
|
117 |
+
cfg.merge_from_list(opts)
|
118 |
+
cfg.MODEL.WEIGHTS = model_fpath
|
119 |
+
cfg.freeze()
|
120 |
+
return cfg
|
121 |
+
|
122 |
+
@classmethod
|
123 |
+
def _get_input_file_list(cls: type, input_spec: str):
|
124 |
+
if os.path.isdir(input_spec):
|
125 |
+
file_list = [
|
126 |
+
os.path.join(input_spec, fname)
|
127 |
+
for fname in os.listdir(input_spec)
|
128 |
+
if os.path.isfile(os.path.join(input_spec, fname))
|
129 |
+
]
|
130 |
+
elif os.path.isfile(input_spec):
|
131 |
+
file_list = [input_spec]
|
132 |
+
else:
|
133 |
+
file_list = glob.glob(input_spec)
|
134 |
+
return file_list
|
135 |
+
|
136 |
+
|
137 |
+
@register_action
|
138 |
+
class DumpAction(InferenceAction):
|
139 |
+
"""
|
140 |
+
Dump action that outputs results to a pickle file
|
141 |
+
"""
|
142 |
+
|
143 |
+
COMMAND: ClassVar[str] = "dump"
|
144 |
+
|
145 |
+
@classmethod
|
146 |
+
def add_parser(cls: type, subparsers: argparse._SubParsersAction):
|
147 |
+
parser = subparsers.add_parser(cls.COMMAND, help="Dump model outputs to a file.")
|
148 |
+
cls.add_arguments(parser)
|
149 |
+
parser.set_defaults(func=cls.execute)
|
150 |
+
|
151 |
+
@classmethod
|
152 |
+
def add_arguments(cls: type, parser: argparse.ArgumentParser):
|
153 |
+
super(DumpAction, cls).add_arguments(parser)
|
154 |
+
parser.add_argument(
|
155 |
+
"--output",
|
156 |
+
metavar="<dump_file>",
|
157 |
+
default="results.pkl",
|
158 |
+
help="File name to save dump to",
|
159 |
+
)
|
160 |
+
|
161 |
+
@classmethod
|
162 |
+
def execute_on_outputs(
|
163 |
+
cls: type, context: Dict[str, Any], entry: Dict[str, Any], outputs: Instances
|
164 |
+
):
|
165 |
+
image_fpath = entry["file_name"]
|
166 |
+
logger.info(f"Processing {image_fpath}")
|
167 |
+
result = {"file_name": image_fpath}
|
168 |
+
if outputs.has("scores"):
|
169 |
+
result["scores"] = outputs.get("scores").cpu()
|
170 |
+
if outputs.has("pred_boxes"):
|
171 |
+
result["pred_boxes_XYXY"] = outputs.get("pred_boxes").tensor.cpu()
|
172 |
+
if outputs.has("pred_densepose"):
|
173 |
+
if isinstance(outputs.pred_densepose, DensePoseChartPredictorOutput):
|
174 |
+
extractor = DensePoseResultExtractor()
|
175 |
+
elif isinstance(outputs.pred_densepose, DensePoseEmbeddingPredictorOutput):
|
176 |
+
extractor = DensePoseOutputsExtractor()
|
177 |
+
result["pred_densepose"] = extractor(outputs)[0]
|
178 |
+
context["results"].append(result)
|
179 |
+
|
180 |
+
@classmethod
|
181 |
+
def create_context(cls: type, args: argparse.Namespace, cfg: CfgNode):
|
182 |
+
context = {"results": [], "out_fname": args.output}
|
183 |
+
return context
|
184 |
+
|
185 |
+
@classmethod
|
186 |
+
def postexecute(cls: type, context: Dict[str, Any]):
|
187 |
+
out_fname = context["out_fname"]
|
188 |
+
out_dir = os.path.dirname(out_fname)
|
189 |
+
if len(out_dir) > 0 and not os.path.exists(out_dir):
|
190 |
+
os.makedirs(out_dir)
|
191 |
+
with open(out_fname, "wb") as hFile:
|
192 |
+
torch.save(context["results"], hFile)
|
193 |
+
logger.info(f"Output saved to {out_fname}")
|
194 |
+
|
195 |
+
|
196 |
+
@register_action
|
197 |
+
class ShowAction(InferenceAction):
|
198 |
+
"""
|
199 |
+
Show action that visualizes selected entries on an image
|
200 |
+
"""
|
201 |
+
|
202 |
+
COMMAND: ClassVar[str] = "show"
|
203 |
+
VISUALIZERS: ClassVar[Dict[str, object]] = {
|
204 |
+
"dp_contour": DensePoseResultsContourVisualizer,
|
205 |
+
"dp_segm": DensePoseResultsFineSegmentationVisualizer,
|
206 |
+
"dp_u": DensePoseResultsUVisualizer,
|
207 |
+
"dp_v": DensePoseResultsVVisualizer,
|
208 |
+
"dp_iuv_texture": DensePoseResultsVisualizerWithTexture,
|
209 |
+
"dp_cse_texture": DensePoseOutputsTextureVisualizer,
|
210 |
+
"dp_vertex": DensePoseOutputsVertexVisualizer,
|
211 |
+
"bbox": ScoredBoundingBoxVisualizer,
|
212 |
+
}
|
213 |
+
|
214 |
+
@classmethod
|
215 |
+
def add_parser(cls: type, subparsers: argparse._SubParsersAction):
|
216 |
+
parser = subparsers.add_parser(cls.COMMAND, help="Visualize selected entries")
|
217 |
+
cls.add_arguments(parser)
|
218 |
+
parser.set_defaults(func=cls.execute)
|
219 |
+
|
220 |
+
@classmethod
|
221 |
+
def add_arguments(cls: type, parser: argparse.ArgumentParser):
|
222 |
+
super(ShowAction, cls).add_arguments(parser)
|
223 |
+
parser.add_argument(
|
224 |
+
"visualizations",
|
225 |
+
metavar="<visualizations>",
|
226 |
+
help="Comma separated list of visualizations, possible values: "
|
227 |
+
"[{}]".format(",".join(sorted(cls.VISUALIZERS.keys()))),
|
228 |
+
)
|
229 |
+
parser.add_argument(
|
230 |
+
"--min_score",
|
231 |
+
metavar="<score>",
|
232 |
+
default=0.8,
|
233 |
+
type=float,
|
234 |
+
help="Minimum detection score to visualize",
|
235 |
+
)
|
236 |
+
parser.add_argument(
|
237 |
+
"--nms_thresh", metavar="<threshold>", default=None, type=float, help="NMS threshold"
|
238 |
+
)
|
239 |
+
parser.add_argument(
|
240 |
+
"--texture_atlas",
|
241 |
+
metavar="<texture_atlas>",
|
242 |
+
default=None,
|
243 |
+
help="Texture atlas file (for IUV texture transfer)",
|
244 |
+
)
|
245 |
+
parser.add_argument(
|
246 |
+
"--texture_atlases_map",
|
247 |
+
metavar="<texture_atlases_map>",
|
248 |
+
default=None,
|
249 |
+
help="JSON string of a dict containing texture atlas files for each mesh",
|
250 |
+
)
|
251 |
+
parser.add_argument(
|
252 |
+
"--output",
|
253 |
+
metavar="<image_file>",
|
254 |
+
default="outputres.png",
|
255 |
+
help="File name to save output to",
|
256 |
+
)
|
257 |
+
|
258 |
+
@classmethod
|
259 |
+
def setup_config(
|
260 |
+
cls: type, config_fpath: str, model_fpath: str, args: argparse.Namespace, opts: List[str]
|
261 |
+
):
|
262 |
+
opts.append("MODEL.ROI_HEADS.SCORE_THRESH_TEST")
|
263 |
+
opts.append(str(args.min_score))
|
264 |
+
if args.nms_thresh is not None:
|
265 |
+
opts.append("MODEL.ROI_HEADS.NMS_THRESH_TEST")
|
266 |
+
opts.append(str(args.nms_thresh))
|
267 |
+
cfg = super(ShowAction, cls).setup_config(config_fpath, model_fpath, args, opts)
|
268 |
+
return cfg
|
269 |
+
|
270 |
+
@classmethod
|
271 |
+
def execute_on_outputs(
|
272 |
+
cls: type, context: Dict[str, Any], entry: Dict[str, Any], outputs: Instances
|
273 |
+
):
|
274 |
+
import cv2
|
275 |
+
import numpy as np
|
276 |
+
visualizer = context["visualizer"]
|
277 |
+
extractor = context["extractor"]
|
278 |
+
# image_fpath = entry["file_name"]
|
279 |
+
# logger.info(f"Processing {image_fpath}")
|
280 |
+
image = cv2.cvtColor(entry["image"], cv2.COLOR_BGR2GRAY)
|
281 |
+
image = np.tile(image[:, :, np.newaxis], [1, 1, 3])
|
282 |
+
data = extractor(outputs)
|
283 |
+
image_vis = visualizer.visualize(image, data)
|
284 |
+
|
285 |
+
return image_vis
|
286 |
+
entry_idx = context["entry_idx"] + 1
|
287 |
+
out_fname = './image-densepose/' + image_fpath.split('/')[-1]
|
288 |
+
out_dir = './image-densepose'
|
289 |
+
out_dir = os.path.dirname(out_fname)
|
290 |
+
if len(out_dir) > 0 and not os.path.exists(out_dir):
|
291 |
+
os.makedirs(out_dir)
|
292 |
+
cv2.imwrite(out_fname, image_vis)
|
293 |
+
logger.info(f"Output saved to {out_fname}")
|
294 |
+
context["entry_idx"] += 1
|
295 |
+
|
296 |
+
@classmethod
|
297 |
+
def postexecute(cls: type, context: Dict[str, Any]):
|
298 |
+
pass
|
299 |
+
# python ./apply_net.py show ./configs/densepose_rcnn_R_50_FPN_s1x.yaml https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pkl /home/alin0222/DressCode/upper_body/images dp_segm -v --opts MODEL.DEVICE cpu
|
300 |
+
|
301 |
+
@classmethod
|
302 |
+
def _get_out_fname(cls: type, entry_idx: int, fname_base: str):
|
303 |
+
base, ext = os.path.splitext(fname_base)
|
304 |
+
return base + ".{0:04d}".format(entry_idx) + ext
|
305 |
+
|
306 |
+
@classmethod
|
307 |
+
def create_context(cls: type, args: argparse.Namespace, cfg: CfgNode) -> Dict[str, Any]:
|
308 |
+
vis_specs = args.visualizations.split(",")
|
309 |
+
visualizers = []
|
310 |
+
extractors = []
|
311 |
+
for vis_spec in vis_specs:
|
312 |
+
texture_atlas = get_texture_atlas(args.texture_atlas)
|
313 |
+
texture_atlases_dict = get_texture_atlases(args.texture_atlases_map)
|
314 |
+
vis = cls.VISUALIZERS[vis_spec](
|
315 |
+
cfg=cfg,
|
316 |
+
texture_atlas=texture_atlas,
|
317 |
+
texture_atlases_dict=texture_atlases_dict,
|
318 |
+
)
|
319 |
+
visualizers.append(vis)
|
320 |
+
extractor = create_extractor(vis)
|
321 |
+
extractors.append(extractor)
|
322 |
+
visualizer = CompoundVisualizer(visualizers)
|
323 |
+
extractor = CompoundExtractor(extractors)
|
324 |
+
context = {
|
325 |
+
"extractor": extractor,
|
326 |
+
"visualizer": visualizer,
|
327 |
+
"out_fname": args.output,
|
328 |
+
"entry_idx": 0,
|
329 |
+
}
|
330 |
+
return context
|
331 |
+
|
332 |
+
|
333 |
+
def create_argument_parser() -> argparse.ArgumentParser:
|
334 |
+
parser = argparse.ArgumentParser(
|
335 |
+
description=DOC,
|
336 |
+
formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=120),
|
337 |
+
)
|
338 |
+
parser.set_defaults(func=lambda _: parser.print_help(sys.stdout))
|
339 |
+
subparsers = parser.add_subparsers(title="Actions")
|
340 |
+
for _, action in _ACTION_REGISTRY.items():
|
341 |
+
action.add_parser(subparsers)
|
342 |
+
return parser
|
343 |
+
|
344 |
+
|
345 |
+
def main():
|
346 |
+
parser = create_argument_parser()
|
347 |
+
args = parser.parse_args()
|
348 |
+
verbosity = getattr(args, "verbosity", None)
|
349 |
+
global logger
|
350 |
+
logger = setup_logger(name=LOGGER_NAME)
|
351 |
+
logger.setLevel(verbosity_to_level(verbosity))
|
352 |
+
args.func(args)
|
353 |
+
|
354 |
+
|
355 |
+
if __name__ == "__main__":
|
356 |
+
main()
|
357 |
+
|
358 |
+
|
359 |
+
# python ./apply_net.py show ./configs/densepose_rcnn_R_50_FPN_s1x.yaml https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pkl /home/alin0222/Dresscode/dresses/humanonly dp_segm -v --opts MODEL.DEVICE cuda
|
ckpt/densepose/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
ckpt/densepose/model_final_162be9.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b8a7382001b16e453bad95ca9dbc68ae8f2b839b304cf90eaf5c27fbdb4dae91
|
3 |
+
size 255757821
|
ckpt/humanparsing/parsing_atr.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04c7d1d070d0e0ae943d86b18cb5aaaea9e278d97462e9cfb270cbbe4cd977f4
|
3 |
+
size 266859305
|
ckpt/humanparsing/parsing_lip.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8436e1dae96e2601c373d1ace29c8f0978b16357d9038c17a8ba756cca376dbc
|
3 |
+
size 266863411
|
ckpt/openpose/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
ckpt/openpose/ckpts/body_pose_model.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25a948c16078b0f08e236bda51a385d855ef4c153598947c28c0d47ed94bb746
|
3 |
+
size 209267595
|
configs/Base-DensePose-RCNN-FPN.yaml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
VERSION: 2
|
2 |
+
MODEL:
|
3 |
+
META_ARCHITECTURE: "GeneralizedRCNN"
|
4 |
+
BACKBONE:
|
5 |
+
NAME: "build_resnet_fpn_backbone"
|
6 |
+
RESNETS:
|
7 |
+
OUT_FEATURES: ["res2", "res3", "res4", "res5"]
|
8 |
+
FPN:
|
9 |
+
IN_FEATURES: ["res2", "res3", "res4", "res5"]
|
10 |
+
ANCHOR_GENERATOR:
|
11 |
+
SIZES: [[32], [64], [128], [256], [512]] # One size for each in feature map
|
12 |
+
ASPECT_RATIOS: [[0.5, 1.0, 2.0]] # Three aspect ratios (same for all in feature maps)
|
13 |
+
RPN:
|
14 |
+
IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"]
|
15 |
+
PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level
|
16 |
+
PRE_NMS_TOPK_TEST: 1000 # Per FPN level
|
17 |
+
# Detectron1 uses 2000 proposals per-batch,
|
18 |
+
# (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue)
|
19 |
+
# which is approximately 1000 proposals per-image since the default batch size for FPN is 2.
|
20 |
+
POST_NMS_TOPK_TRAIN: 1000
|
21 |
+
POST_NMS_TOPK_TEST: 1000
|
22 |
+
|
23 |
+
DENSEPOSE_ON: True
|
24 |
+
ROI_HEADS:
|
25 |
+
NAME: "DensePoseROIHeads"
|
26 |
+
IN_FEATURES: ["p2", "p3", "p4", "p5"]
|
27 |
+
NUM_CLASSES: 1
|
28 |
+
ROI_BOX_HEAD:
|
29 |
+
NAME: "FastRCNNConvFCHead"
|
30 |
+
NUM_FC: 2
|
31 |
+
POOLER_RESOLUTION: 7
|
32 |
+
POOLER_SAMPLING_RATIO: 2
|
33 |
+
POOLER_TYPE: "ROIAlign"
|
34 |
+
ROI_DENSEPOSE_HEAD:
|
35 |
+
NAME: "DensePoseV1ConvXHead"
|
36 |
+
POOLER_TYPE: "ROIAlign"
|
37 |
+
NUM_COARSE_SEGM_CHANNELS: 2
|
38 |
+
DATASETS:
|
39 |
+
TRAIN: ("densepose_coco_2014_train", "densepose_coco_2014_valminusminival")
|
40 |
+
TEST: ("densepose_coco_2014_minival",)
|
41 |
+
SOLVER:
|
42 |
+
IMS_PER_BATCH: 16
|
43 |
+
BASE_LR: 0.01
|
44 |
+
STEPS: (60000, 80000)
|
45 |
+
MAX_ITER: 90000
|
46 |
+
WARMUP_FACTOR: 0.1
|
47 |
+
INPUT:
|
48 |
+
MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800)
|
configs/HRNet/densepose_rcnn_HRFPN_HRNet_w32_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "../Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33dYBMemi9xOUFR0w"
|
4 |
+
BACKBONE:
|
5 |
+
NAME: "build_hrfpn_backbone"
|
6 |
+
RPN:
|
7 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
8 |
+
ROI_HEADS:
|
9 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
13 |
+
CLIP_GRADIENTS:
|
14 |
+
ENABLED: True
|
15 |
+
CLIP_TYPE: "norm"
|
16 |
+
BASE_LR: 0.03
|
configs/HRNet/densepose_rcnn_HRFPN_HRNet_w40_s1x.yaml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "../Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33ck0gvo5jfoWBOPo"
|
4 |
+
BACKBONE:
|
5 |
+
NAME: "build_hrfpn_backbone"
|
6 |
+
RPN:
|
7 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
8 |
+
ROI_HEADS:
|
9 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
10 |
+
HRNET:
|
11 |
+
STAGE2:
|
12 |
+
NUM_CHANNELS: [40, 80]
|
13 |
+
STAGE3:
|
14 |
+
NUM_CHANNELS: [40, 80, 160]
|
15 |
+
STAGE4:
|
16 |
+
NUM_CHANNELS: [40, 80, 160, 320]
|
17 |
+
SOLVER:
|
18 |
+
MAX_ITER: 130000
|
19 |
+
STEPS: (100000, 120000)
|
20 |
+
CLIP_GRADIENTS:
|
21 |
+
ENABLED: True
|
22 |
+
CLIP_TYPE: "norm"
|
23 |
+
BASE_LR: 0.03
|
configs/HRNet/densepose_rcnn_HRFPN_HRNet_w48_s1x.yaml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "../Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33dKvqI6pBZlifgJk"
|
4 |
+
BACKBONE:
|
5 |
+
NAME: "build_hrfpn_backbone"
|
6 |
+
RPN:
|
7 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
8 |
+
ROI_HEADS:
|
9 |
+
IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5']
|
10 |
+
HRNET:
|
11 |
+
STAGE2:
|
12 |
+
NUM_CHANNELS: [48, 96]
|
13 |
+
STAGE3:
|
14 |
+
NUM_CHANNELS: [48, 96, 192]
|
15 |
+
STAGE4:
|
16 |
+
NUM_CHANNELS: [48, 96, 192, 384]
|
17 |
+
SOLVER:
|
18 |
+
MAX_ITER: 130000
|
19 |
+
STEPS: (100000, 120000)
|
20 |
+
CLIP_GRADIENTS:
|
21 |
+
ENABLED: True
|
22 |
+
CLIP_TYPE: "norm"
|
23 |
+
BASE_LR: 0.03
|
configs/cse/Base-DensePose-RCNN-FPN-Human.yaml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
ROI_DENSEPOSE_HEAD:
|
4 |
+
CSE:
|
5 |
+
EMBEDDERS:
|
6 |
+
"smpl_27554":
|
7 |
+
TYPE: vertex_feature
|
8 |
+
NUM_VERTICES: 27554
|
9 |
+
FEATURE_DIM: 256
|
10 |
+
FEATURES_TRAINABLE: False
|
11 |
+
IS_TRAINABLE: True
|
12 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_smpl_27554_256.pkl"
|
13 |
+
DATASETS:
|
14 |
+
TRAIN:
|
15 |
+
- "densepose_coco_2014_train_cse"
|
16 |
+
- "densepose_coco_2014_valminusminival_cse"
|
17 |
+
TEST:
|
18 |
+
- "densepose_coco_2014_minival_cse"
|
19 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
20 |
+
"0": "smpl_27554"
|
configs/cse/Base-DensePose-RCNN-FPN.yaml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
VERSION: 2
|
2 |
+
MODEL:
|
3 |
+
META_ARCHITECTURE: "GeneralizedRCNN"
|
4 |
+
BACKBONE:
|
5 |
+
NAME: "build_resnet_fpn_backbone"
|
6 |
+
RESNETS:
|
7 |
+
OUT_FEATURES: ["res2", "res3", "res4", "res5"]
|
8 |
+
FPN:
|
9 |
+
IN_FEATURES: ["res2", "res3", "res4", "res5"]
|
10 |
+
ANCHOR_GENERATOR:
|
11 |
+
SIZES: [[32], [64], [128], [256], [512]] # One size for each in feature map
|
12 |
+
ASPECT_RATIOS: [[0.5, 1.0, 2.0]] # Three aspect ratios (same for all in feature maps)
|
13 |
+
RPN:
|
14 |
+
IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"]
|
15 |
+
PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level
|
16 |
+
PRE_NMS_TOPK_TEST: 1000 # Per FPN level
|
17 |
+
# Detectron1 uses 2000 proposals per-batch,
|
18 |
+
# (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue)
|
19 |
+
# which is approximately 1000 proposals per-image since the default batch size for FPN is 2.
|
20 |
+
POST_NMS_TOPK_TRAIN: 1000
|
21 |
+
POST_NMS_TOPK_TEST: 1000
|
22 |
+
|
23 |
+
DENSEPOSE_ON: True
|
24 |
+
ROI_HEADS:
|
25 |
+
NAME: "DensePoseROIHeads"
|
26 |
+
IN_FEATURES: ["p2", "p3", "p4", "p5"]
|
27 |
+
NUM_CLASSES: 1
|
28 |
+
ROI_BOX_HEAD:
|
29 |
+
NAME: "FastRCNNConvFCHead"
|
30 |
+
NUM_FC: 2
|
31 |
+
POOLER_RESOLUTION: 7
|
32 |
+
POOLER_SAMPLING_RATIO: 2
|
33 |
+
POOLER_TYPE: "ROIAlign"
|
34 |
+
ROI_DENSEPOSE_HEAD:
|
35 |
+
NAME: "DensePoseV1ConvXHead"
|
36 |
+
POOLER_TYPE: "ROIAlign"
|
37 |
+
NUM_COARSE_SEGM_CHANNELS: 2
|
38 |
+
PREDICTOR_NAME: "DensePoseEmbeddingPredictor"
|
39 |
+
LOSS_NAME: "DensePoseCseLoss"
|
40 |
+
CSE:
|
41 |
+
# embedding loss, possible values:
|
42 |
+
# - "EmbeddingLoss"
|
43 |
+
# - "SoftEmbeddingLoss"
|
44 |
+
EMBED_LOSS_NAME: "EmbeddingLoss"
|
45 |
+
SOLVER:
|
46 |
+
IMS_PER_BATCH: 16
|
47 |
+
BASE_LR: 0.01
|
48 |
+
STEPS: (60000, 80000)
|
49 |
+
MAX_ITER: 90000
|
50 |
+
WARMUP_FACTOR: 0.1
|
51 |
+
CLIP_GRADIENTS:
|
52 |
+
CLIP_TYPE: norm
|
53 |
+
CLIP_VALUE: 1.0
|
54 |
+
ENABLED: true
|
55 |
+
NORM_TYPE: 2.0
|
56 |
+
INPUT:
|
57 |
+
MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800)
|
58 |
+
DENSEPOSE_EVALUATION:
|
59 |
+
TYPE: cse
|
60 |
+
STORAGE: file
|
configs/cse/densepose_rcnn_R_101_FPN_DL_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "EmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_101_FPN_DL_soft_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_101_FPN_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseV1ConvXHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "EmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_101_FPN_soft_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseV1ConvXHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_50_FPN_DL_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "EmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_50_FPN_DL_soft_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_50_FPN_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseV1ConvXHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "EmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_16k.yaml
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 1
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
EMBEDDERS:
|
16 |
+
"cat_7466":
|
17 |
+
TYPE: vertex_feature
|
18 |
+
NUM_VERTICES: 7466
|
19 |
+
FEATURE_DIM: 256
|
20 |
+
FEATURES_TRAINABLE: False
|
21 |
+
IS_TRAINABLE: True
|
22 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
23 |
+
"dog_7466":
|
24 |
+
TYPE: vertex_feature
|
25 |
+
NUM_VERTICES: 7466
|
26 |
+
FEATURE_DIM: 256
|
27 |
+
FEATURES_TRAINABLE: False
|
28 |
+
IS_TRAINABLE: True
|
29 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
30 |
+
"sheep_5004":
|
31 |
+
TYPE: vertex_feature
|
32 |
+
NUM_VERTICES: 5004
|
33 |
+
FEATURE_DIM: 256
|
34 |
+
FEATURES_TRAINABLE: False
|
35 |
+
IS_TRAINABLE: True
|
36 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
37 |
+
"horse_5004":
|
38 |
+
TYPE: vertex_feature
|
39 |
+
NUM_VERTICES: 5004
|
40 |
+
FEATURE_DIM: 256
|
41 |
+
FEATURES_TRAINABLE: False
|
42 |
+
IS_TRAINABLE: True
|
43 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
44 |
+
"zebra_5002":
|
45 |
+
TYPE: vertex_feature
|
46 |
+
NUM_VERTICES: 5002
|
47 |
+
FEATURE_DIM: 256
|
48 |
+
FEATURES_TRAINABLE: False
|
49 |
+
IS_TRAINABLE: True
|
50 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
51 |
+
"giraffe_5002":
|
52 |
+
TYPE: vertex_feature
|
53 |
+
NUM_VERTICES: 5002
|
54 |
+
FEATURE_DIM: 256
|
55 |
+
FEATURES_TRAINABLE: False
|
56 |
+
IS_TRAINABLE: True
|
57 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
58 |
+
"elephant_5002":
|
59 |
+
TYPE: vertex_feature
|
60 |
+
NUM_VERTICES: 5002
|
61 |
+
FEATURE_DIM: 256
|
62 |
+
FEATURES_TRAINABLE: False
|
63 |
+
IS_TRAINABLE: True
|
64 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
65 |
+
"cow_5002":
|
66 |
+
TYPE: vertex_feature
|
67 |
+
NUM_VERTICES: 5002
|
68 |
+
FEATURE_DIM: 256
|
69 |
+
FEATURES_TRAINABLE: False
|
70 |
+
IS_TRAINABLE: True
|
71 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
72 |
+
"bear_4936":
|
73 |
+
TYPE: vertex_feature
|
74 |
+
NUM_VERTICES: 4936
|
75 |
+
FEATURE_DIM: 256
|
76 |
+
FEATURES_TRAINABLE: False
|
77 |
+
IS_TRAINABLE: True
|
78 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
79 |
+
DATASETS:
|
80 |
+
TRAIN:
|
81 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
82 |
+
TEST:
|
83 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
84 |
+
WHITELISTED_CATEGORIES:
|
85 |
+
"densepose_lvis_v1_ds2_train_v1":
|
86 |
+
- 943 # sheep
|
87 |
+
- 1202 # zebra
|
88 |
+
- 569 # horse
|
89 |
+
- 496 # giraffe
|
90 |
+
- 422 # elephant
|
91 |
+
- 80 # cow
|
92 |
+
- 76 # bear
|
93 |
+
- 225 # cat
|
94 |
+
- 378 # dog
|
95 |
+
"densepose_lvis_v1_ds2_val_v1":
|
96 |
+
- 943 # sheep
|
97 |
+
- 1202 # zebra
|
98 |
+
- 569 # horse
|
99 |
+
- 496 # giraffe
|
100 |
+
- 422 # elephant
|
101 |
+
- 80 # cow
|
102 |
+
- 76 # bear
|
103 |
+
- 225 # cat
|
104 |
+
- 378 # dog
|
105 |
+
CATEGORY_MAPS:
|
106 |
+
"densepose_lvis_v1_ds2_train_v1":
|
107 |
+
"1202": 943 # zebra -> sheep
|
108 |
+
"569": 943 # horse -> sheep
|
109 |
+
"496": 943 # giraffe -> sheep
|
110 |
+
"422": 943 # elephant -> sheep
|
111 |
+
"80": 943 # cow -> sheep
|
112 |
+
"76": 943 # bear -> sheep
|
113 |
+
"225": 943 # cat -> sheep
|
114 |
+
"378": 943 # dog -> sheep
|
115 |
+
"densepose_lvis_v1_ds2_val_v1":
|
116 |
+
"1202": 943 # zebra -> sheep
|
117 |
+
"569": 943 # horse -> sheep
|
118 |
+
"496": 943 # giraffe -> sheep
|
119 |
+
"422": 943 # elephant -> sheep
|
120 |
+
"80": 943 # cow -> sheep
|
121 |
+
"76": 943 # bear -> sheep
|
122 |
+
"225": 943 # cat -> sheep
|
123 |
+
"378": 943 # dog -> sheep
|
124 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
125 |
+
# Note: different classes are mapped to a single class
|
126 |
+
# mesh is chosen based on GT data, so this is just some
|
127 |
+
# value which has no particular meaning
|
128 |
+
"0": "sheep_5004"
|
129 |
+
SOLVER:
|
130 |
+
MAX_ITER: 16000
|
131 |
+
STEPS: (12000, 14000)
|
132 |
+
DENSEPOSE_EVALUATION:
|
133 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_4k.yaml
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 1
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
EMBEDDERS:
|
16 |
+
"cat_5001":
|
17 |
+
TYPE: vertex_feature
|
18 |
+
NUM_VERTICES: 5001
|
19 |
+
FEATURE_DIM: 256
|
20 |
+
FEATURES_TRAINABLE: False
|
21 |
+
IS_TRAINABLE: True
|
22 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_5001_256.pkl"
|
23 |
+
"dog_5002":
|
24 |
+
TYPE: vertex_feature
|
25 |
+
NUM_VERTICES: 5002
|
26 |
+
FEATURE_DIM: 256
|
27 |
+
FEATURES_TRAINABLE: False
|
28 |
+
IS_TRAINABLE: True
|
29 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_5002_256.pkl"
|
30 |
+
"sheep_5004":
|
31 |
+
TYPE: vertex_feature
|
32 |
+
NUM_VERTICES: 5004
|
33 |
+
FEATURE_DIM: 256
|
34 |
+
FEATURES_TRAINABLE: False
|
35 |
+
IS_TRAINABLE: True
|
36 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
37 |
+
"horse_5004":
|
38 |
+
TYPE: vertex_feature
|
39 |
+
NUM_VERTICES: 5004
|
40 |
+
FEATURE_DIM: 256
|
41 |
+
FEATURES_TRAINABLE: False
|
42 |
+
IS_TRAINABLE: True
|
43 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
44 |
+
"zebra_5002":
|
45 |
+
TYPE: vertex_feature
|
46 |
+
NUM_VERTICES: 5002
|
47 |
+
FEATURE_DIM: 256
|
48 |
+
FEATURES_TRAINABLE: False
|
49 |
+
IS_TRAINABLE: True
|
50 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
51 |
+
"giraffe_5002":
|
52 |
+
TYPE: vertex_feature
|
53 |
+
NUM_VERTICES: 5002
|
54 |
+
FEATURE_DIM: 256
|
55 |
+
FEATURES_TRAINABLE: False
|
56 |
+
IS_TRAINABLE: True
|
57 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
58 |
+
"elephant_5002":
|
59 |
+
TYPE: vertex_feature
|
60 |
+
NUM_VERTICES: 5002
|
61 |
+
FEATURE_DIM: 256
|
62 |
+
FEATURES_TRAINABLE: False
|
63 |
+
IS_TRAINABLE: True
|
64 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
65 |
+
"cow_5002":
|
66 |
+
TYPE: vertex_feature
|
67 |
+
NUM_VERTICES: 5002
|
68 |
+
FEATURE_DIM: 256
|
69 |
+
FEATURES_TRAINABLE: False
|
70 |
+
IS_TRAINABLE: True
|
71 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
72 |
+
"bear_4936":
|
73 |
+
TYPE: vertex_feature
|
74 |
+
NUM_VERTICES: 4936
|
75 |
+
FEATURE_DIM: 256
|
76 |
+
FEATURES_TRAINABLE: False
|
77 |
+
IS_TRAINABLE: True
|
78 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
79 |
+
DATASETS:
|
80 |
+
TRAIN:
|
81 |
+
- "densepose_lvis_v1_ds1_train_v1"
|
82 |
+
TEST:
|
83 |
+
- "densepose_lvis_v1_ds1_val_v1"
|
84 |
+
WHITELISTED_CATEGORIES:
|
85 |
+
"densepose_lvis_v1_ds1_train_v1":
|
86 |
+
- 943 # sheep
|
87 |
+
- 1202 # zebra
|
88 |
+
- 569 # horse
|
89 |
+
- 496 # giraffe
|
90 |
+
- 422 # elephant
|
91 |
+
- 80 # cow
|
92 |
+
- 76 # bear
|
93 |
+
- 225 # cat
|
94 |
+
- 378 # dog
|
95 |
+
"densepose_lvis_v1_ds1_val_v1":
|
96 |
+
- 943 # sheep
|
97 |
+
- 1202 # zebra
|
98 |
+
- 569 # horse
|
99 |
+
- 496 # giraffe
|
100 |
+
- 422 # elephant
|
101 |
+
- 80 # cow
|
102 |
+
- 76 # bear
|
103 |
+
- 225 # cat
|
104 |
+
- 378 # dog
|
105 |
+
CATEGORY_MAPS:
|
106 |
+
"densepose_lvis_v1_ds1_train_v1":
|
107 |
+
"1202": 943 # zebra -> sheep
|
108 |
+
"569": 943 # horse -> sheep
|
109 |
+
"496": 943 # giraffe -> sheep
|
110 |
+
"422": 943 # elephant -> sheep
|
111 |
+
"80": 943 # cow -> sheep
|
112 |
+
"76": 943 # bear -> sheep
|
113 |
+
"225": 943 # cat -> sheep
|
114 |
+
"378": 943 # dog -> sheep
|
115 |
+
"densepose_lvis_v1_ds1_val_v1":
|
116 |
+
"1202": 943 # zebra -> sheep
|
117 |
+
"569": 943 # horse -> sheep
|
118 |
+
"496": 943 # giraffe -> sheep
|
119 |
+
"422": 943 # elephant -> sheep
|
120 |
+
"80": 943 # cow -> sheep
|
121 |
+
"76": 943 # bear -> sheep
|
122 |
+
"225": 943 # cat -> sheep
|
123 |
+
"378": 943 # dog -> sheep
|
124 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
125 |
+
# Note: different classes are mapped to a single class
|
126 |
+
# mesh is chosen based on GT data, so this is just some
|
127 |
+
# value which has no particular meaning
|
128 |
+
"0": "sheep_5004"
|
129 |
+
SOLVER:
|
130 |
+
MAX_ITER: 4000
|
131 |
+
STEPS: (3000, 3500)
|
132 |
+
DENSEPOSE_EVALUATION:
|
133 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_16k.yaml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k/270668502/model_final_21b1d2.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
EMBEDDERS:
|
16 |
+
"cat_7466":
|
17 |
+
TYPE: vertex_feature
|
18 |
+
NUM_VERTICES: 7466
|
19 |
+
FEATURE_DIM: 256
|
20 |
+
FEATURES_TRAINABLE: False
|
21 |
+
IS_TRAINABLE: True
|
22 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
23 |
+
"dog_7466":
|
24 |
+
TYPE: vertex_feature
|
25 |
+
NUM_VERTICES: 7466
|
26 |
+
FEATURE_DIM: 256
|
27 |
+
FEATURES_TRAINABLE: False
|
28 |
+
IS_TRAINABLE: True
|
29 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
30 |
+
"sheep_5004":
|
31 |
+
TYPE: vertex_feature
|
32 |
+
NUM_VERTICES: 5004
|
33 |
+
FEATURE_DIM: 256
|
34 |
+
FEATURES_TRAINABLE: False
|
35 |
+
IS_TRAINABLE: True
|
36 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
37 |
+
"horse_5004":
|
38 |
+
TYPE: vertex_feature
|
39 |
+
NUM_VERTICES: 5004
|
40 |
+
FEATURE_DIM: 256
|
41 |
+
FEATURES_TRAINABLE: False
|
42 |
+
IS_TRAINABLE: True
|
43 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
44 |
+
"zebra_5002":
|
45 |
+
TYPE: vertex_feature
|
46 |
+
NUM_VERTICES: 5002
|
47 |
+
FEATURE_DIM: 256
|
48 |
+
FEATURES_TRAINABLE: False
|
49 |
+
IS_TRAINABLE: True
|
50 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
51 |
+
"giraffe_5002":
|
52 |
+
TYPE: vertex_feature
|
53 |
+
NUM_VERTICES: 5002
|
54 |
+
FEATURE_DIM: 256
|
55 |
+
FEATURES_TRAINABLE: False
|
56 |
+
IS_TRAINABLE: True
|
57 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
58 |
+
"elephant_5002":
|
59 |
+
TYPE: vertex_feature
|
60 |
+
NUM_VERTICES: 5002
|
61 |
+
FEATURE_DIM: 256
|
62 |
+
FEATURES_TRAINABLE: False
|
63 |
+
IS_TRAINABLE: True
|
64 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
65 |
+
"cow_5002":
|
66 |
+
TYPE: vertex_feature
|
67 |
+
NUM_VERTICES: 5002
|
68 |
+
FEATURE_DIM: 256
|
69 |
+
FEATURES_TRAINABLE: False
|
70 |
+
IS_TRAINABLE: True
|
71 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
72 |
+
"bear_4936":
|
73 |
+
TYPE: vertex_feature
|
74 |
+
NUM_VERTICES: 4936
|
75 |
+
FEATURE_DIM: 256
|
76 |
+
FEATURES_TRAINABLE: False
|
77 |
+
IS_TRAINABLE: True
|
78 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
79 |
+
DATASETS:
|
80 |
+
TRAIN:
|
81 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
82 |
+
TEST:
|
83 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
84 |
+
WHITELISTED_CATEGORIES:
|
85 |
+
"densepose_lvis_v1_ds2_train_v1":
|
86 |
+
- 943 # sheep
|
87 |
+
- 1202 # zebra
|
88 |
+
- 569 # horse
|
89 |
+
- 496 # giraffe
|
90 |
+
- 422 # elephant
|
91 |
+
- 80 # cow
|
92 |
+
- 76 # bear
|
93 |
+
- 225 # cat
|
94 |
+
- 378 # dog
|
95 |
+
"densepose_lvis_v1_ds2_val_v1":
|
96 |
+
- 943 # sheep
|
97 |
+
- 1202 # zebra
|
98 |
+
- 569 # horse
|
99 |
+
- 496 # giraffe
|
100 |
+
- 422 # elephant
|
101 |
+
- 80 # cow
|
102 |
+
- 76 # bear
|
103 |
+
- 225 # cat
|
104 |
+
- 378 # dog
|
105 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
106 |
+
"0": "bear_4936"
|
107 |
+
"1": "cow_5002"
|
108 |
+
"2": "cat_7466"
|
109 |
+
"3": "dog_7466"
|
110 |
+
"4": "elephant_5002"
|
111 |
+
"5": "giraffe_5002"
|
112 |
+
"6": "horse_5004"
|
113 |
+
"7": "sheep_5004"
|
114 |
+
"8": "zebra_5002"
|
115 |
+
SOLVER:
|
116 |
+
MAX_ITER: 16000
|
117 |
+
STEPS: (12000, 14000)
|
118 |
+
DENSEPOSE_EVALUATION:
|
119 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_i2m_16k.yaml
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k/270668502/model_final_21b1d2.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
PIX_TO_SHAPE_CYCLE_LOSS:
|
16 |
+
ENABLED: True
|
17 |
+
EMBEDDERS:
|
18 |
+
"cat_7466":
|
19 |
+
TYPE: vertex_feature
|
20 |
+
NUM_VERTICES: 7466
|
21 |
+
FEATURE_DIM: 256
|
22 |
+
FEATURES_TRAINABLE: False
|
23 |
+
IS_TRAINABLE: True
|
24 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
25 |
+
"dog_7466":
|
26 |
+
TYPE: vertex_feature
|
27 |
+
NUM_VERTICES: 7466
|
28 |
+
FEATURE_DIM: 256
|
29 |
+
FEATURES_TRAINABLE: False
|
30 |
+
IS_TRAINABLE: True
|
31 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
32 |
+
"sheep_5004":
|
33 |
+
TYPE: vertex_feature
|
34 |
+
NUM_VERTICES: 5004
|
35 |
+
FEATURE_DIM: 256
|
36 |
+
FEATURES_TRAINABLE: False
|
37 |
+
IS_TRAINABLE: True
|
38 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
39 |
+
"horse_5004":
|
40 |
+
TYPE: vertex_feature
|
41 |
+
NUM_VERTICES: 5004
|
42 |
+
FEATURE_DIM: 256
|
43 |
+
FEATURES_TRAINABLE: False
|
44 |
+
IS_TRAINABLE: True
|
45 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
46 |
+
"zebra_5002":
|
47 |
+
TYPE: vertex_feature
|
48 |
+
NUM_VERTICES: 5002
|
49 |
+
FEATURE_DIM: 256
|
50 |
+
FEATURES_TRAINABLE: False
|
51 |
+
IS_TRAINABLE: True
|
52 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
53 |
+
"giraffe_5002":
|
54 |
+
TYPE: vertex_feature
|
55 |
+
NUM_VERTICES: 5002
|
56 |
+
FEATURE_DIM: 256
|
57 |
+
FEATURES_TRAINABLE: False
|
58 |
+
IS_TRAINABLE: True
|
59 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
60 |
+
"elephant_5002":
|
61 |
+
TYPE: vertex_feature
|
62 |
+
NUM_VERTICES: 5002
|
63 |
+
FEATURE_DIM: 256
|
64 |
+
FEATURES_TRAINABLE: False
|
65 |
+
IS_TRAINABLE: True
|
66 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
67 |
+
"cow_5002":
|
68 |
+
TYPE: vertex_feature
|
69 |
+
NUM_VERTICES: 5002
|
70 |
+
FEATURE_DIM: 256
|
71 |
+
FEATURES_TRAINABLE: False
|
72 |
+
IS_TRAINABLE: True
|
73 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
74 |
+
"bear_4936":
|
75 |
+
TYPE: vertex_feature
|
76 |
+
NUM_VERTICES: 4936
|
77 |
+
FEATURE_DIM: 256
|
78 |
+
FEATURES_TRAINABLE: False
|
79 |
+
IS_TRAINABLE: True
|
80 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
81 |
+
DATASETS:
|
82 |
+
TRAIN:
|
83 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
84 |
+
TEST:
|
85 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
86 |
+
WHITELISTED_CATEGORIES:
|
87 |
+
"densepose_lvis_v1_ds2_train_v1":
|
88 |
+
- 943 # sheep
|
89 |
+
- 1202 # zebra
|
90 |
+
- 569 # horse
|
91 |
+
- 496 # giraffe
|
92 |
+
- 422 # elephant
|
93 |
+
- 80 # cow
|
94 |
+
- 76 # bear
|
95 |
+
- 225 # cat
|
96 |
+
- 378 # dog
|
97 |
+
"densepose_lvis_v1_ds2_val_v1":
|
98 |
+
- 943 # sheep
|
99 |
+
- 1202 # zebra
|
100 |
+
- 569 # horse
|
101 |
+
- 496 # giraffe
|
102 |
+
- 422 # elephant
|
103 |
+
- 80 # cow
|
104 |
+
- 76 # bear
|
105 |
+
- 225 # cat
|
106 |
+
- 378 # dog
|
107 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
108 |
+
"0": "bear_4936"
|
109 |
+
"1": "cow_5002"
|
110 |
+
"2": "cat_7466"
|
111 |
+
"3": "dog_7466"
|
112 |
+
"4": "elephant_5002"
|
113 |
+
"5": "giraffe_5002"
|
114 |
+
"6": "horse_5004"
|
115 |
+
"7": "sheep_5004"
|
116 |
+
"8": "zebra_5002"
|
117 |
+
SOLVER:
|
118 |
+
MAX_ITER: 16000
|
119 |
+
STEPS: (12000, 14000)
|
120 |
+
DENSEPOSE_EVALUATION:
|
121 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_m2m_16k.yaml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k/267687159/model_final_354e61.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
SHAPE_TO_SHAPE_CYCLE_LOSS:
|
16 |
+
ENABLED: True
|
17 |
+
EMBEDDERS:
|
18 |
+
"cat_7466":
|
19 |
+
TYPE: vertex_feature
|
20 |
+
NUM_VERTICES: 7466
|
21 |
+
FEATURE_DIM: 256
|
22 |
+
FEATURES_TRAINABLE: False
|
23 |
+
IS_TRAINABLE: True
|
24 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
25 |
+
"dog_7466":
|
26 |
+
TYPE: vertex_feature
|
27 |
+
NUM_VERTICES: 7466
|
28 |
+
FEATURE_DIM: 256
|
29 |
+
FEATURES_TRAINABLE: False
|
30 |
+
IS_TRAINABLE: True
|
31 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
32 |
+
"sheep_5004":
|
33 |
+
TYPE: vertex_feature
|
34 |
+
NUM_VERTICES: 5004
|
35 |
+
FEATURE_DIM: 256
|
36 |
+
FEATURES_TRAINABLE: False
|
37 |
+
IS_TRAINABLE: True
|
38 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
39 |
+
"horse_5004":
|
40 |
+
TYPE: vertex_feature
|
41 |
+
NUM_VERTICES: 5004
|
42 |
+
FEATURE_DIM: 256
|
43 |
+
FEATURES_TRAINABLE: False
|
44 |
+
IS_TRAINABLE: True
|
45 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
46 |
+
"zebra_5002":
|
47 |
+
TYPE: vertex_feature
|
48 |
+
NUM_VERTICES: 5002
|
49 |
+
FEATURE_DIM: 256
|
50 |
+
FEATURES_TRAINABLE: False
|
51 |
+
IS_TRAINABLE: True
|
52 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
53 |
+
"giraffe_5002":
|
54 |
+
TYPE: vertex_feature
|
55 |
+
NUM_VERTICES: 5002
|
56 |
+
FEATURE_DIM: 256
|
57 |
+
FEATURES_TRAINABLE: False
|
58 |
+
IS_TRAINABLE: True
|
59 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
60 |
+
"elephant_5002":
|
61 |
+
TYPE: vertex_feature
|
62 |
+
NUM_VERTICES: 5002
|
63 |
+
FEATURE_DIM: 256
|
64 |
+
FEATURES_TRAINABLE: False
|
65 |
+
IS_TRAINABLE: True
|
66 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
67 |
+
"cow_5002":
|
68 |
+
TYPE: vertex_feature
|
69 |
+
NUM_VERTICES: 5002
|
70 |
+
FEATURE_DIM: 256
|
71 |
+
FEATURES_TRAINABLE: False
|
72 |
+
IS_TRAINABLE: True
|
73 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
74 |
+
"bear_4936":
|
75 |
+
TYPE: vertex_feature
|
76 |
+
NUM_VERTICES: 4936
|
77 |
+
FEATURE_DIM: 256
|
78 |
+
FEATURES_TRAINABLE: False
|
79 |
+
IS_TRAINABLE: True
|
80 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
81 |
+
"smpl_27554":
|
82 |
+
TYPE: vertex_feature
|
83 |
+
NUM_VERTICES: 27554
|
84 |
+
FEATURE_DIM: 256
|
85 |
+
FEATURES_TRAINABLE: False
|
86 |
+
IS_TRAINABLE: True
|
87 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_smpl_27554_256.pkl"
|
88 |
+
DATASETS:
|
89 |
+
TRAIN:
|
90 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
91 |
+
TEST:
|
92 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
93 |
+
WHITELISTED_CATEGORIES:
|
94 |
+
"densepose_lvis_v1_ds2_train_v1":
|
95 |
+
- 943 # sheep
|
96 |
+
- 1202 # zebra
|
97 |
+
- 569 # horse
|
98 |
+
- 496 # giraffe
|
99 |
+
- 422 # elephant
|
100 |
+
- 80 # cow
|
101 |
+
- 76 # bear
|
102 |
+
- 225 # cat
|
103 |
+
- 378 # dog
|
104 |
+
"densepose_lvis_v1_ds2_val_v1":
|
105 |
+
- 943 # sheep
|
106 |
+
- 1202 # zebra
|
107 |
+
- 569 # horse
|
108 |
+
- 496 # giraffe
|
109 |
+
- 422 # elephant
|
110 |
+
- 80 # cow
|
111 |
+
- 76 # bear
|
112 |
+
- 225 # cat
|
113 |
+
- 378 # dog
|
114 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
115 |
+
"0": "bear_4936"
|
116 |
+
"1": "cow_5002"
|
117 |
+
"2": "cat_7466"
|
118 |
+
"3": "dog_7466"
|
119 |
+
"4": "elephant_5002"
|
120 |
+
"5": "giraffe_5002"
|
121 |
+
"6": "horse_5004"
|
122 |
+
"7": "sheep_5004"
|
123 |
+
"8": "zebra_5002"
|
124 |
+
SOLVER:
|
125 |
+
MAX_ITER: 16000
|
126 |
+
STEPS: (12000, 14000)
|
127 |
+
DENSEPOSE_EVALUATION:
|
128 |
+
EVALUATE_MESH_ALIGNMENT: True
|
129 |
+
MESH_ALIGNMENT_MESH_NAMES:
|
130 |
+
- bear_4936
|
131 |
+
- cow_5002
|
132 |
+
- cat_7466
|
133 |
+
- dog_7466
|
134 |
+
- elephant_5002
|
135 |
+
- giraffe_5002
|
136 |
+
- horse_5004
|
137 |
+
- sheep_5004
|
138 |
+
- zebra_5002
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_16k.yaml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
EMBEDDERS:
|
16 |
+
"cat_7466":
|
17 |
+
TYPE: vertex_feature
|
18 |
+
NUM_VERTICES: 7466
|
19 |
+
FEATURE_DIM: 256
|
20 |
+
FEATURES_TRAINABLE: False
|
21 |
+
IS_TRAINABLE: True
|
22 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
23 |
+
"dog_7466":
|
24 |
+
TYPE: vertex_feature
|
25 |
+
NUM_VERTICES: 7466
|
26 |
+
FEATURE_DIM: 256
|
27 |
+
FEATURES_TRAINABLE: False
|
28 |
+
IS_TRAINABLE: True
|
29 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
30 |
+
"sheep_5004":
|
31 |
+
TYPE: vertex_feature
|
32 |
+
NUM_VERTICES: 5004
|
33 |
+
FEATURE_DIM: 256
|
34 |
+
FEATURES_TRAINABLE: False
|
35 |
+
IS_TRAINABLE: True
|
36 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
37 |
+
"horse_5004":
|
38 |
+
TYPE: vertex_feature
|
39 |
+
NUM_VERTICES: 5004
|
40 |
+
FEATURE_DIM: 256
|
41 |
+
FEATURES_TRAINABLE: False
|
42 |
+
IS_TRAINABLE: True
|
43 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
44 |
+
"zebra_5002":
|
45 |
+
TYPE: vertex_feature
|
46 |
+
NUM_VERTICES: 5002
|
47 |
+
FEATURE_DIM: 256
|
48 |
+
FEATURES_TRAINABLE: False
|
49 |
+
IS_TRAINABLE: True
|
50 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
51 |
+
"giraffe_5002":
|
52 |
+
TYPE: vertex_feature
|
53 |
+
NUM_VERTICES: 5002
|
54 |
+
FEATURE_DIM: 256
|
55 |
+
FEATURES_TRAINABLE: False
|
56 |
+
IS_TRAINABLE: True
|
57 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
58 |
+
"elephant_5002":
|
59 |
+
TYPE: vertex_feature
|
60 |
+
NUM_VERTICES: 5002
|
61 |
+
FEATURE_DIM: 256
|
62 |
+
FEATURES_TRAINABLE: False
|
63 |
+
IS_TRAINABLE: True
|
64 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
65 |
+
"cow_5002":
|
66 |
+
TYPE: vertex_feature
|
67 |
+
NUM_VERTICES: 5002
|
68 |
+
FEATURE_DIM: 256
|
69 |
+
FEATURES_TRAINABLE: False
|
70 |
+
IS_TRAINABLE: True
|
71 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
72 |
+
"bear_4936":
|
73 |
+
TYPE: vertex_feature
|
74 |
+
NUM_VERTICES: 4936
|
75 |
+
FEATURE_DIM: 256
|
76 |
+
FEATURES_TRAINABLE: False
|
77 |
+
IS_TRAINABLE: True
|
78 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
79 |
+
DATASETS:
|
80 |
+
TRAIN:
|
81 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
82 |
+
TEST:
|
83 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
84 |
+
WHITELISTED_CATEGORIES:
|
85 |
+
"densepose_lvis_v1_ds2_train_v1":
|
86 |
+
- 943 # sheep
|
87 |
+
- 1202 # zebra
|
88 |
+
- 569 # horse
|
89 |
+
- 496 # giraffe
|
90 |
+
- 422 # elephant
|
91 |
+
- 80 # cow
|
92 |
+
- 76 # bear
|
93 |
+
- 225 # cat
|
94 |
+
- 378 # dog
|
95 |
+
"densepose_lvis_v1_ds2_val_v1":
|
96 |
+
- 943 # sheep
|
97 |
+
- 1202 # zebra
|
98 |
+
- 569 # horse
|
99 |
+
- 496 # giraffe
|
100 |
+
- 422 # elephant
|
101 |
+
- 80 # cow
|
102 |
+
- 76 # bear
|
103 |
+
- 225 # cat
|
104 |
+
- 378 # dog
|
105 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
106 |
+
"0": "bear_4936"
|
107 |
+
"1": "cow_5002"
|
108 |
+
"2": "cat_7466"
|
109 |
+
"3": "dog_7466"
|
110 |
+
"4": "elephant_5002"
|
111 |
+
"5": "giraffe_5002"
|
112 |
+
"6": "horse_5004"
|
113 |
+
"7": "sheep_5004"
|
114 |
+
"8": "zebra_5002"
|
115 |
+
SOLVER:
|
116 |
+
MAX_ITER: 16000
|
117 |
+
STEPS: (12000, 14000)
|
118 |
+
DENSEPOSE_EVALUATION:
|
119 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_4k.yaml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
14 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
EMBEDDERS:
|
16 |
+
"cat_5001":
|
17 |
+
TYPE: vertex_feature
|
18 |
+
NUM_VERTICES: 5001
|
19 |
+
FEATURE_DIM: 256
|
20 |
+
FEATURES_TRAINABLE: False
|
21 |
+
IS_TRAINABLE: True
|
22 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_5001_256.pkl"
|
23 |
+
"dog_5002":
|
24 |
+
TYPE: vertex_feature
|
25 |
+
NUM_VERTICES: 5002
|
26 |
+
FEATURE_DIM: 256
|
27 |
+
FEATURES_TRAINABLE: False
|
28 |
+
IS_TRAINABLE: True
|
29 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_5002_256.pkl"
|
30 |
+
"sheep_5004":
|
31 |
+
TYPE: vertex_feature
|
32 |
+
NUM_VERTICES: 5004
|
33 |
+
FEATURE_DIM: 256
|
34 |
+
FEATURES_TRAINABLE: False
|
35 |
+
IS_TRAINABLE: True
|
36 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
37 |
+
"horse_5004":
|
38 |
+
TYPE: vertex_feature
|
39 |
+
NUM_VERTICES: 5004
|
40 |
+
FEATURE_DIM: 256
|
41 |
+
FEATURES_TRAINABLE: False
|
42 |
+
IS_TRAINABLE: True
|
43 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
44 |
+
"zebra_5002":
|
45 |
+
TYPE: vertex_feature
|
46 |
+
NUM_VERTICES: 5002
|
47 |
+
FEATURE_DIM: 256
|
48 |
+
FEATURES_TRAINABLE: False
|
49 |
+
IS_TRAINABLE: True
|
50 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
51 |
+
"giraffe_5002":
|
52 |
+
TYPE: vertex_feature
|
53 |
+
NUM_VERTICES: 5002
|
54 |
+
FEATURE_DIM: 256
|
55 |
+
FEATURES_TRAINABLE: False
|
56 |
+
IS_TRAINABLE: True
|
57 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
58 |
+
"elephant_5002":
|
59 |
+
TYPE: vertex_feature
|
60 |
+
NUM_VERTICES: 5002
|
61 |
+
FEATURE_DIM: 256
|
62 |
+
FEATURES_TRAINABLE: False
|
63 |
+
IS_TRAINABLE: True
|
64 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
65 |
+
"cow_5002":
|
66 |
+
TYPE: vertex_feature
|
67 |
+
NUM_VERTICES: 5002
|
68 |
+
FEATURE_DIM: 256
|
69 |
+
FEATURES_TRAINABLE: False
|
70 |
+
IS_TRAINABLE: True
|
71 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
72 |
+
"bear_4936":
|
73 |
+
TYPE: vertex_feature
|
74 |
+
NUM_VERTICES: 4936
|
75 |
+
FEATURE_DIM: 256
|
76 |
+
FEATURES_TRAINABLE: False
|
77 |
+
IS_TRAINABLE: True
|
78 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
79 |
+
DATASETS:
|
80 |
+
TRAIN:
|
81 |
+
- "densepose_lvis_v1_ds1_train_v1"
|
82 |
+
TEST:
|
83 |
+
- "densepose_lvis_v1_ds1_val_v1"
|
84 |
+
WHITELISTED_CATEGORIES:
|
85 |
+
"densepose_lvis_v1_ds1_train_v1":
|
86 |
+
- 943 # sheep
|
87 |
+
- 1202 # zebra
|
88 |
+
- 569 # horse
|
89 |
+
- 496 # giraffe
|
90 |
+
- 422 # elephant
|
91 |
+
- 80 # cow
|
92 |
+
- 76 # bear
|
93 |
+
- 225 # cat
|
94 |
+
- 378 # dog
|
95 |
+
"densepose_lvis_v1_ds1_val_v1":
|
96 |
+
- 943 # sheep
|
97 |
+
- 1202 # zebra
|
98 |
+
- 569 # horse
|
99 |
+
- 496 # giraffe
|
100 |
+
- 422 # elephant
|
101 |
+
- 80 # cow
|
102 |
+
- 76 # bear
|
103 |
+
- 225 # cat
|
104 |
+
- 378 # dog
|
105 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
106 |
+
"0": "bear_4936"
|
107 |
+
"1": "cow_5002"
|
108 |
+
"2": "cat_5001"
|
109 |
+
"3": "dog_5002"
|
110 |
+
"4": "elephant_5002"
|
111 |
+
"5": "giraffe_5002"
|
112 |
+
"6": "horse_5004"
|
113 |
+
"7": "sheep_5004"
|
114 |
+
"8": "zebra_5002"
|
115 |
+
SOLVER:
|
116 |
+
MAX_ITER: 4000
|
117 |
+
STEPS: (3000, 3500)
|
118 |
+
DENSEPOSE_EVALUATION:
|
119 |
+
EVALUATE_MESH_ALIGNMENT: True
|
configs/cse/densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k.yaml
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_HEADS:
|
7 |
+
NUM_CLASSES: 9
|
8 |
+
ROI_DENSEPOSE_HEAD:
|
9 |
+
NAME: "DensePoseV1ConvXHead"
|
10 |
+
COARSE_SEGM_TRAINED_BY_MASKS: True
|
11 |
+
CSE:
|
12 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
13 |
+
EMBED_LOSS_WEIGHT: 0.0
|
14 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
15 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
16 |
+
EMBEDDERS:
|
17 |
+
"cat_7466":
|
18 |
+
TYPE: vertex_feature
|
19 |
+
NUM_VERTICES: 7466
|
20 |
+
FEATURE_DIM: 256
|
21 |
+
FEATURES_TRAINABLE: False
|
22 |
+
IS_TRAINABLE: True
|
23 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cat_7466_256.pkl"
|
24 |
+
"dog_7466":
|
25 |
+
TYPE: vertex_feature
|
26 |
+
NUM_VERTICES: 7466
|
27 |
+
FEATURE_DIM: 256
|
28 |
+
FEATURES_TRAINABLE: False
|
29 |
+
IS_TRAINABLE: True
|
30 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_dog_7466_256.pkl"
|
31 |
+
"sheep_5004":
|
32 |
+
TYPE: vertex_feature
|
33 |
+
NUM_VERTICES: 5004
|
34 |
+
FEATURE_DIM: 256
|
35 |
+
FEATURES_TRAINABLE: False
|
36 |
+
IS_TRAINABLE: True
|
37 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_sheep_5004_256.pkl"
|
38 |
+
"horse_5004":
|
39 |
+
TYPE: vertex_feature
|
40 |
+
NUM_VERTICES: 5004
|
41 |
+
FEATURE_DIM: 256
|
42 |
+
FEATURES_TRAINABLE: False
|
43 |
+
IS_TRAINABLE: True
|
44 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_horse_5004_256.pkl"
|
45 |
+
"zebra_5002":
|
46 |
+
TYPE: vertex_feature
|
47 |
+
NUM_VERTICES: 5002
|
48 |
+
FEATURE_DIM: 256
|
49 |
+
FEATURES_TRAINABLE: False
|
50 |
+
IS_TRAINABLE: True
|
51 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_zebra_5002_256.pkl"
|
52 |
+
"giraffe_5002":
|
53 |
+
TYPE: vertex_feature
|
54 |
+
NUM_VERTICES: 5002
|
55 |
+
FEATURE_DIM: 256
|
56 |
+
FEATURES_TRAINABLE: False
|
57 |
+
IS_TRAINABLE: True
|
58 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_giraffe_5002_256.pkl"
|
59 |
+
"elephant_5002":
|
60 |
+
TYPE: vertex_feature
|
61 |
+
NUM_VERTICES: 5002
|
62 |
+
FEATURE_DIM: 256
|
63 |
+
FEATURES_TRAINABLE: False
|
64 |
+
IS_TRAINABLE: True
|
65 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_elephant_5002_256.pkl"
|
66 |
+
"cow_5002":
|
67 |
+
TYPE: vertex_feature
|
68 |
+
NUM_VERTICES: 5002
|
69 |
+
FEATURE_DIM: 256
|
70 |
+
FEATURES_TRAINABLE: False
|
71 |
+
IS_TRAINABLE: True
|
72 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_cow_5002_256.pkl"
|
73 |
+
"bear_4936":
|
74 |
+
TYPE: vertex_feature
|
75 |
+
NUM_VERTICES: 4936
|
76 |
+
FEATURE_DIM: 256
|
77 |
+
FEATURES_TRAINABLE: False
|
78 |
+
IS_TRAINABLE: True
|
79 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_bear_4936_256.pkl"
|
80 |
+
DATASETS:
|
81 |
+
TRAIN:
|
82 |
+
- "densepose_lvis_v1_ds2_train_v1"
|
83 |
+
TEST:
|
84 |
+
- "densepose_lvis_v1_ds2_val_v1"
|
85 |
+
WHITELISTED_CATEGORIES:
|
86 |
+
"densepose_lvis_v1_ds2_train_v1":
|
87 |
+
- 943 # sheep
|
88 |
+
- 1202 # zebra
|
89 |
+
- 569 # horse
|
90 |
+
- 496 # giraffe
|
91 |
+
- 422 # elephant
|
92 |
+
- 80 # cow
|
93 |
+
- 76 # bear
|
94 |
+
- 225 # cat
|
95 |
+
- 378 # dog
|
96 |
+
"densepose_lvis_v1_ds2_val_v1":
|
97 |
+
- 943 # sheep
|
98 |
+
- 1202 # zebra
|
99 |
+
- 569 # horse
|
100 |
+
- 496 # giraffe
|
101 |
+
- 422 # elephant
|
102 |
+
- 80 # cow
|
103 |
+
- 76 # bear
|
104 |
+
- 225 # cat
|
105 |
+
- 378 # dog
|
106 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
107 |
+
"0": "bear_4936"
|
108 |
+
"1": "cow_5002"
|
109 |
+
"2": "cat_7466"
|
110 |
+
"3": "dog_7466"
|
111 |
+
"4": "elephant_5002"
|
112 |
+
"5": "giraffe_5002"
|
113 |
+
"6": "horse_5004"
|
114 |
+
"7": "sheep_5004"
|
115 |
+
"8": "zebra_5002"
|
116 |
+
SOLVER:
|
117 |
+
MAX_ITER: 24000
|
118 |
+
STEPS: (20000, 22000)
|
configs/cse/densepose_rcnn_R_50_FPN_soft_chimps_finetune_4k.yaml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_s1x/250533982/model_final_2c4512.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseV1ConvXHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
10 |
+
EMBEDDING_DIST_GAUSS_SIGMA: 0.1
|
11 |
+
GEODESIC_DIST_GAUSS_SIGMA: 0.1
|
12 |
+
EMBEDDERS:
|
13 |
+
"chimp_5029":
|
14 |
+
TYPE: vertex_feature
|
15 |
+
NUM_VERTICES: 5029
|
16 |
+
FEATURE_DIM: 256
|
17 |
+
FEATURES_TRAINABLE: False
|
18 |
+
IS_TRAINABLE: True
|
19 |
+
INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_chimp_5029_256.pkl"
|
20 |
+
DATASETS:
|
21 |
+
TRAIN:
|
22 |
+
- "densepose_chimps_cse_train"
|
23 |
+
TEST:
|
24 |
+
- "densepose_chimps_cse_val"
|
25 |
+
CLASS_TO_MESH_NAME_MAPPING:
|
26 |
+
"0": "chimp_5029"
|
27 |
+
SOLVER:
|
28 |
+
MAX_ITER: 4000
|
29 |
+
STEPS: (3000, 3500)
|
configs/cse/densepose_rcnn_R_50_FPN_soft_s1x.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN-Human.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseV1ConvXHead"
|
8 |
+
CSE:
|
9 |
+
EMBED_LOSS_NAME: "SoftEmbeddingLoss"
|
10 |
+
SOLVER:
|
11 |
+
MAX_ITER: 130000
|
12 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_DL_WC1M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "iid_iso"
|
11 |
+
SEGM_CONFIDENCE:
|
12 |
+
ENABLED: True
|
13 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
14 |
+
SOLVER:
|
15 |
+
CLIP_GRADIENTS:
|
16 |
+
ENABLED: True
|
17 |
+
MAX_ITER: 130000
|
18 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_DL_WC1_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "iid_iso"
|
11 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
12 |
+
SOLVER:
|
13 |
+
CLIP_GRADIENTS:
|
14 |
+
ENABLED: True
|
15 |
+
MAX_ITER: 130000
|
16 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_DL_WC2M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "indep_aniso"
|
11 |
+
SEGM_CONFIDENCE:
|
12 |
+
ENABLED: True
|
13 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
14 |
+
SOLVER:
|
15 |
+
CLIP_GRADIENTS:
|
16 |
+
ENABLED: True
|
17 |
+
MAX_ITER: 130000
|
18 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_DL_WC2_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "indep_aniso"
|
11 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
12 |
+
SOLVER:
|
13 |
+
CLIP_GRADIENTS:
|
14 |
+
ENABLED: True
|
15 |
+
MAX_ITER: 130000
|
16 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_DL_s1x.yaml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
SOLVER:
|
9 |
+
MAX_ITER: 130000
|
10 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_WC1M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
UV_CONFIDENCE:
|
8 |
+
ENABLED: True
|
9 |
+
TYPE: "iid_iso"
|
10 |
+
SEGM_CONFIDENCE:
|
11 |
+
ENABLED: True
|
12 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
13 |
+
SOLVER:
|
14 |
+
CLIP_GRADIENTS:
|
15 |
+
ENABLED: True
|
16 |
+
MAX_ITER: 130000
|
17 |
+
STEPS: (100000, 120000)
|
18 |
+
WARMUP_FACTOR: 0.025
|
configs/densepose_rcnn_R_101_FPN_WC1_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
UV_CONFIDENCE:
|
8 |
+
ENABLED: True
|
9 |
+
TYPE: "iid_iso"
|
10 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
11 |
+
SOLVER:
|
12 |
+
CLIP_GRADIENTS:
|
13 |
+
ENABLED: True
|
14 |
+
MAX_ITER: 130000
|
15 |
+
STEPS: (100000, 120000)
|
16 |
+
WARMUP_FACTOR: 0.025
|
configs/densepose_rcnn_R_101_FPN_WC2M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
UV_CONFIDENCE:
|
8 |
+
ENABLED: True
|
9 |
+
TYPE: "indep_aniso"
|
10 |
+
SEGM_CONFIDENCE:
|
11 |
+
ENABLED: True
|
12 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
13 |
+
SOLVER:
|
14 |
+
CLIP_GRADIENTS:
|
15 |
+
ENABLED: True
|
16 |
+
MAX_ITER: 130000
|
17 |
+
STEPS: (100000, 120000)
|
18 |
+
WARMUP_FACTOR: 0.025
|
configs/densepose_rcnn_R_101_FPN_WC2_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
UV_CONFIDENCE:
|
8 |
+
ENABLED: True
|
9 |
+
TYPE: "indep_aniso"
|
10 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
11 |
+
SOLVER:
|
12 |
+
CLIP_GRADIENTS:
|
13 |
+
ENABLED: True
|
14 |
+
MAX_ITER: 130000
|
15 |
+
STEPS: (100000, 120000)
|
16 |
+
WARMUP_FACTOR: 0.025
|
configs/densepose_rcnn_R_101_FPN_s1x.yaml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
SOLVER:
|
7 |
+
MAX_ITER: 130000
|
8 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_101_FPN_s1x_legacy.yaml
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 101
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NUM_COARSE_SEGM_CHANNELS: 15
|
8 |
+
POOLER_RESOLUTION: 14
|
9 |
+
HEATMAP_SIZE: 56
|
10 |
+
INDEX_WEIGHTS: 2.0
|
11 |
+
PART_WEIGHTS: 0.3
|
12 |
+
POINT_REGRESSION_WEIGHTS: 0.1
|
13 |
+
DECODER_ON: False
|
14 |
+
SOLVER:
|
15 |
+
BASE_LR: 0.002
|
16 |
+
MAX_ITER: 130000
|
17 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_50_FPN_DL_WC1M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "iid_iso"
|
11 |
+
SEGM_CONFIDENCE:
|
12 |
+
ENABLED: True
|
13 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
14 |
+
SOLVER:
|
15 |
+
CLIP_GRADIENTS:
|
16 |
+
ENABLED: True
|
17 |
+
MAX_ITER: 130000
|
18 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_50_FPN_DL_WC1_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "iid_iso"
|
11 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
12 |
+
SOLVER:
|
13 |
+
CLIP_GRADIENTS:
|
14 |
+
ENABLED: True
|
15 |
+
MAX_ITER: 130000
|
16 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_50_FPN_DL_WC2M_s1x.yaml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "indep_aniso"
|
11 |
+
SEGM_CONFIDENCE:
|
12 |
+
ENABLED: True
|
13 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
14 |
+
SOLVER:
|
15 |
+
CLIP_GRADIENTS:
|
16 |
+
ENABLED: True
|
17 |
+
MAX_ITER: 130000
|
18 |
+
STEPS: (100000, 120000)
|
configs/densepose_rcnn_R_50_FPN_DL_WC2_s1x.yaml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_BASE_: "Base-DensePose-RCNN-FPN.yaml"
|
2 |
+
MODEL:
|
3 |
+
WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
|
4 |
+
RESNETS:
|
5 |
+
DEPTH: 50
|
6 |
+
ROI_DENSEPOSE_HEAD:
|
7 |
+
NAME: "DensePoseDeepLabHead"
|
8 |
+
UV_CONFIDENCE:
|
9 |
+
ENABLED: True
|
10 |
+
TYPE: "indep_aniso"
|
11 |
+
POINT_REGRESSION_WEIGHTS: 0.0005
|
12 |
+
SOLVER:
|
13 |
+
CLIP_GRADIENTS:
|
14 |
+
ENABLED: True
|
15 |
+
MAX_ITER: 130000
|
16 |
+
STEPS: (100000, 120000)
|