Spaces:
Runtime error
Runtime error
Xu Ma
commited on
Commit
•
d1b932e
1
Parent(s):
89d8d37
update
Browse files
app.py
CHANGED
@@ -188,20 +188,21 @@ def main(args):
|
|
188 |
model_names = yaml_csv(model_cfg, "model_names")
|
189 |
model_cls_name = yaml_csv(cls_name, "model_cls_name")
|
190 |
|
191 |
-
# -------------------输入组件-------------------
|
192 |
-
inputs_img = gr.inputs.Image(type="pil", label="Input Image")
|
193 |
|
|
|
|
|
194 |
experiment_id = gr.inputs.Radio(
|
195 |
choices=[
|
196 |
-
"add [1,1,1,1,1]
|
197 |
-
"add [1,1,1,1,1,1,1,1]
|
198 |
-
"add [1,2,4,8,16,32, ...]
|
199 |
-
"add [1,2,4,8,16,32, ...]
|
200 |
)
|
201 |
|
202 |
|
203 |
|
204 |
|
|
|
205 |
device = gr.inputs.Dropdown(
|
206 |
choices=["cpu"], default=device, type="value", label="设备"
|
207 |
)
|
@@ -239,41 +240,31 @@ def main(args):
|
|
239 |
outputs02 = gr.outputs.JSON(label="检测信息")
|
240 |
|
241 |
# 标题
|
242 |
-
title = "LIVE: Towards Layer-wise Image Vectorization (CVPR 2022 Oral Presentation)"
|
243 |
# 描述
|
244 |
description = "<div align='center'>Layer-wise image vectorization</div>"
|
245 |
|
246 |
# 示例图片
|
247 |
examples = [
|
248 |
[
|
249 |
-
"./
|
250 |
-
"
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
|
|
|
|
257 |
],
|
258 |
[
|
259 |
-
"./
|
260 |
-
"
|
261 |
-
"yolov5l",
|
262 |
-
320,
|
263 |
-
0.5,
|
264 |
-
0.45,
|
265 |
-
True,
|
266 |
-
["人", "椅子", "杯子", "笔记本电脑"],
|
267 |
],
|
268 |
[
|
269 |
-
"./
|
270 |
-
"
|
271 |
-
"yolov5m",
|
272 |
-
640,
|
273 |
-
0.25,
|
274 |
-
0.5,
|
275 |
-
False,
|
276 |
-
["人", "领带"],
|
277 |
],
|
278 |
]
|
279 |
|
@@ -283,7 +274,7 @@ def main(args):
|
|
283 |
inputs=inputs,
|
284 |
outputs=[outputs, outputs02],
|
285 |
title=title,
|
286 |
-
description=description,
|
287 |
examples=examples,
|
288 |
theme="seafoam",
|
289 |
# live=True, # 实时变更输出
|
|
|
188 |
model_names = yaml_csv(model_cfg, "model_names")
|
189 |
model_cls_name = yaml_csv(cls_name, "model_cls_name")
|
190 |
|
|
|
|
|
191 |
|
192 |
+
# -------------------Inputs-------------------
|
193 |
+
inputs_img = gr.inputs.Image(type="pil", label="Input Image")
|
194 |
experiment_id = gr.inputs.Radio(
|
195 |
choices=[
|
196 |
+
"add [1,1,1,1,1] total 5 paths",
|
197 |
+
"add [1,1,1,1,1,1,1,1] total 8 paths",
|
198 |
+
"add [1,2,4,8,16,32, ...] total 128 paths",
|
199 |
+
"add [1,2,4,8,16,32, ...] total 256 paths"], type="value", default="add [1,1,1,1,1] paths", label="Path Adding Scheduler"
|
200 |
)
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
+
|
206 |
device = gr.inputs.Dropdown(
|
207 |
choices=["cpu"], default=device, type="value", label="设备"
|
208 |
)
|
|
|
240 |
outputs02 = gr.outputs.JSON(label="检测信息")
|
241 |
|
242 |
# 标题
|
243 |
+
title = "<div align='center'>LIVE: Towards Layer-wise Image Vectorization <br>(CVPR 2022 Oral Presentation)</div>"
|
244 |
# 描述
|
245 |
description = "<div align='center'>Layer-wise image vectorization</div>"
|
246 |
|
247 |
# 示例图片
|
248 |
examples = [
|
249 |
[
|
250 |
+
"./examples/1.png",
|
251 |
+
"add [1,1,1,1,1] total 5 paths",
|
252 |
+
],
|
253 |
+
[
|
254 |
+
"./examples/2.png",
|
255 |
+
"add [1,1,1,1,1] total 5 paths",
|
256 |
+
],
|
257 |
+
[
|
258 |
+
"./examples/3.png",
|
259 |
+
"add [1,2,4,8,16,32, ...] total 128 paths",
|
260 |
],
|
261 |
[
|
262 |
+
"./examples/4.png",
|
263 |
+
"add [1,2,4,8,16,32, ...] total 256 paths",
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
],
|
265 |
[
|
266 |
+
"./examples/5.png",
|
267 |
+
"add [1,1,1,1,1] total 5 paths",
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
],
|
269 |
]
|
270 |
|
|
|
274 |
inputs=inputs,
|
275 |
outputs=[outputs, outputs02],
|
276 |
title=title,
|
277 |
+
# description=description,
|
278 |
examples=examples,
|
279 |
theme="seafoam",
|
280 |
# live=True, # 实时变更输出
|
examples/{240px-Emoji_u1f603.svg.png → 1.png}
RENAMED
File without changes
|
examples/{240px-Noto_Emoji_KitKat_1f61c.svg.png → 2.png}
RENAMED
File without changes
|
examples/{demo2.jpg → 3.jpg}
RENAMED
File without changes
|
examples/{demo3.png → 4.png}
RENAMED
File without changes
|
examples/{smile.png → 5.png}
RENAMED
File without changes
|