Spaces:
Running
on
Zero
Running
on
Zero
update web vis
Browse files
app.py
CHANGED
|
@@ -229,96 +229,35 @@ def process_video(
|
|
| 229 |
|
| 230 |
|
| 231 |
css = """
|
| 232 |
-
#
|
| 233 |
-
|
| 234 |
-
}
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
}
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
}
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
.gradio-container .gradio-examples .pagination button,
|
| 262 |
-
div[data-testid="examples"] .pagination,
|
| 263 |
-
div[data-testid="examples"] .pagination button {
|
| 264 |
-
font-size: 28px !important;
|
| 265 |
-
font-weight: bold !important;
|
| 266 |
-
padding: 15px 20px !important;
|
| 267 |
-
min-width: 60px !important;
|
| 268 |
-
height: 60px !important;
|
| 269 |
-
border-radius: 10px !important;
|
| 270 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 271 |
-
color: white !important;
|
| 272 |
-
border: none !important;
|
| 273 |
-
cursor: pointer !important;
|
| 274 |
-
margin: 8px !important;
|
| 275 |
-
display: inline-block !important;
|
| 276 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
|
| 277 |
-
transition: all 0.3s ease !important;
|
| 278 |
-
}
|
| 279 |
-
|
| 280 |
-
div[data-testid="examples"] .pagination button:not(.active),
|
| 281 |
-
.gradio-container .gradio-examples .pagination button:not(.active) {
|
| 282 |
-
font-size: 32px !important;
|
| 283 |
-
font-weight: bold !important;
|
| 284 |
-
padding: 15px 20px !important;
|
| 285 |
-
min-width: 60px !important;
|
| 286 |
-
height: 60px !important;
|
| 287 |
-
background: linear-gradient(135deg, #8a9cf0 0%, #9a6bb2 100%) !important;
|
| 288 |
-
opacity: 0.8 !important;
|
| 289 |
-
}
|
| 290 |
-
|
| 291 |
-
div[data-testid="examples"] .pagination button:hover,
|
| 292 |
-
.gradio-container .gradio-examples .pagination button:hover {
|
| 293 |
-
background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
|
| 294 |
-
transform: translateY(-2px) !important;
|
| 295 |
-
box-shadow: 0 6px 12px rgba(0,0,0,0.3) !important;
|
| 296 |
-
opacity: 1 !important;
|
| 297 |
-
}
|
| 298 |
-
|
| 299 |
-
div[data-testid="examples"] .pagination button.active,
|
| 300 |
-
.gradio-container .gradio-examples .pagination button.active {
|
| 301 |
-
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
|
| 302 |
-
box-shadow: 0 4px 8px rgba(17,153,142,0.4) !important;
|
| 303 |
-
opacity: 1 !important;
|
| 304 |
-
}
|
| 305 |
-
|
| 306 |
-
button[class*="pagination"],
|
| 307 |
-
button[class*="page"] {
|
| 308 |
-
font-size: 28px !important;
|
| 309 |
-
font-weight: bold !important;
|
| 310 |
-
padding: 15px 20px !important;
|
| 311 |
-
min-width: 60px !important;
|
| 312 |
-
height: 60px !important;
|
| 313 |
-
border-radius: 10px !important;
|
| 314 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 315 |
-
color: white !important;
|
| 316 |
-
border: none !important;
|
| 317 |
-
cursor: pointer !important;
|
| 318 |
-
margin: 8px !important;
|
| 319 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
|
| 320 |
-
transition: all 0.3s ease !important;
|
| 321 |
-
}
|
| 322 |
"""
|
| 323 |
|
| 324 |
|
|
@@ -331,36 +270,33 @@ head_html = """
|
|
| 331 |
"""
|
| 332 |
|
| 333 |
|
| 334 |
-
|
| 335 |
# description = """Official demo for **DKT **."""
|
| 336 |
-
|
| 337 |
# with gr.Blocks(css=css, title="DKT - Diffusion Knows Transparency", favicon_path="favicon.ico") as demo:
|
| 338 |
|
| 339 |
|
| 340 |
with gr.Blocks(css=css, title="DKT", head=head_html) as demo:
|
| 341 |
# gr.Markdown(title, elem_classes=["title"])
|
| 342 |
"""
|
| 343 |
-
|
| 344 |
-
<a title="Website" href="https://stable-x.github.io/StableNormal/" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 345 |
-
<img src="https://www.obukhov.ai/img/badges/badge-website.svg">
|
| 346 |
-
</a>
|
| 347 |
<a title="arXiv" href="https://arxiv.org/abs/2406.16864" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 348 |
<img src="https://www.obukhov.ai/img/badges/badge-pdf.svg">
|
| 349 |
</a>
|
| 350 |
-
|
| 351 |
-
<img src="https://www.obukhov.ai/img/badges/badge-social.svg" alt="social">
|
| 352 |
-
</a>
|
| 353 |
-
|
| 354 |
|
| 355 |
"""
|
| 356 |
|
| 357 |
gr.Markdown(
|
| 358 |
-
|
| 359 |
# Diffusion Knows Transparency: Repurposing Video Diffusion for Transparent Object Depth and Normal Estimation
|
| 360 |
<p align="center">
|
|
|
|
|
|
|
|
|
|
| 361 |
<a title="Github" href="https://github.com/Daniellli/DKT" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 362 |
<img src="https://img.shields.io/github/stars/Daniellli/DKT?style=social" alt="badge-github-stars">
|
| 363 |
</a>
|
|
|
|
|
|
|
|
|
|
| 364 |
"""
|
| 365 |
)
|
| 366 |
# gr.Markdown(description, elem_classes=["description"])
|
|
|
|
| 229 |
|
| 230 |
|
| 231 |
css = """
|
| 232 |
+
#download {
|
| 233 |
+
height: 118px;
|
| 234 |
+
}
|
| 235 |
+
.slider .inner {
|
| 236 |
+
width: 5px;
|
| 237 |
+
background: #FFF;
|
| 238 |
+
}
|
| 239 |
+
.viewport {
|
| 240 |
+
aspect-ratio: 4/3;
|
| 241 |
+
}
|
| 242 |
+
.tabs button.selected {
|
| 243 |
+
font-size: 20px !important;
|
| 244 |
+
color: crimson !important;
|
| 245 |
+
}
|
| 246 |
+
h1 {
|
| 247 |
+
text-align: center;
|
| 248 |
+
display: block;
|
| 249 |
+
}
|
| 250 |
+
h2 {
|
| 251 |
+
text-align: center;
|
| 252 |
+
display: block;
|
| 253 |
+
}
|
| 254 |
+
h3 {
|
| 255 |
+
text-align: center;
|
| 256 |
+
display: block;
|
| 257 |
+
}
|
| 258 |
+
.md_feedback li {
|
| 259 |
+
margin-bottom: 0px !important;
|
| 260 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
"""
|
| 262 |
|
| 263 |
|
|
|
|
| 270 |
"""
|
| 271 |
|
| 272 |
|
|
|
|
| 273 |
# description = """Official demo for **DKT **."""
|
|
|
|
| 274 |
# with gr.Blocks(css=css, title="DKT - Diffusion Knows Transparency", favicon_path="favicon.ico") as demo:
|
| 275 |
|
| 276 |
|
| 277 |
with gr.Blocks(css=css, title="DKT", head=head_html) as demo:
|
| 278 |
# gr.Markdown(title, elem_classes=["title"])
|
| 279 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
<a title="arXiv" href="https://arxiv.org/abs/2406.16864" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 281 |
<img src="https://www.obukhov.ai/img/badges/badge-pdf.svg">
|
| 282 |
</a>
|
| 283 |
+
|
|
|
|
|
|
|
|
|
|
| 284 |
|
| 285 |
"""
|
| 286 |
|
| 287 |
gr.Markdown(
|
| 288 |
+
"""
|
| 289 |
# Diffusion Knows Transparency: Repurposing Video Diffusion for Transparent Object Depth and Normal Estimation
|
| 290 |
<p align="center">
|
| 291 |
+
<a title="Website" href="https://daniellli.github.io/projects/DKT/" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 292 |
+
<img src="https://www.obukhov.ai/img/badges/badge-website.svg">
|
| 293 |
+
</a>
|
| 294 |
<a title="Github" href="https://github.com/Daniellli/DKT" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 295 |
<img src="https://img.shields.io/github/stars/Daniellli/DKT?style=social" alt="badge-github-stars">
|
| 296 |
</a>
|
| 297 |
+
<a title="Social" href="https://x.com/xshocng1" target="_blank" rel="noopener noreferrer" style="display: inline-block;">
|
| 298 |
+
<img src="https://www.obukhov.ai/img/badges/badge-social.svg" alt="social">
|
| 299 |
+
</a>
|
| 300 |
"""
|
| 301 |
)
|
| 302 |
# gr.Markdown(description, elem_classes=["description"])
|