vobecant
commited on
Commit
·
145962d
1
Parent(s):
d429324
Initial commit.
Browse files- .idea/workspace.xml +10 -2
- app.py +3 -1
- examples/100.jpeg +0 -0
.idea/workspace.xml
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
<project version="4">
|
| 3 |
<component name="ChangeListManager">
|
| 4 |
<list default="true" id="5dd22f22-8223-4d55-99f9-57d1e00622d7" name="Default Changelist" comment="Initial commit.">
|
|
|
|
| 5 |
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
| 6 |
</list>
|
| 7 |
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -51,7 +52,7 @@
|
|
| 51 |
<option name="number" value="Default" />
|
| 52 |
<option name="presentableId" value="Default" />
|
| 53 |
<updated>1647350746642</updated>
|
| 54 |
-
<workItem from="1647350750956" duration="
|
| 55 |
</task>
|
| 56 |
<task id="LOCAL-00001" summary="Initial commit.">
|
| 57 |
<created>1647352693910</created>
|
|
@@ -375,7 +376,14 @@
|
|
| 375 |
<option name="project" value="LOCAL" />
|
| 376 |
<updated>1647363375249</updated>
|
| 377 |
</task>
|
| 378 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
<servers />
|
| 380 |
</component>
|
| 381 |
<component name="TypeScriptGeneratedFilesManager">
|
|
|
|
| 2 |
<project version="4">
|
| 3 |
<component name="ChangeListManager">
|
| 4 |
<list default="true" id="5dd22f22-8223-4d55-99f9-57d1e00622d7" name="Default Changelist" comment="Initial commit.">
|
| 5 |
+
<change afterPath="$PROJECT_DIR$/examples/100.jpeg" afterDir="false" />
|
| 6 |
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
| 7 |
</list>
|
| 8 |
<option name="SHOW_DIALOG" value="false" />
|
|
|
|
| 52 |
<option name="number" value="Default" />
|
| 53 |
<option name="presentableId" value="Default" />
|
| 54 |
<updated>1647350746642</updated>
|
| 55 |
+
<workItem from="1647350750956" duration="12587000" />
|
| 56 |
</task>
|
| 57 |
<task id="LOCAL-00001" summary="Initial commit.">
|
| 58 |
<created>1647352693910</created>
|
|
|
|
| 376 |
<option name="project" value="LOCAL" />
|
| 377 |
<updated>1647363375249</updated>
|
| 378 |
</task>
|
| 379 |
+
<task id="LOCAL-00047" summary="Initial commit.">
|
| 380 |
+
<created>1647364059882</created>
|
| 381 |
+
<option name="number" value="00047" />
|
| 382 |
+
<option name="presentableId" value="LOCAL-00047" />
|
| 383 |
+
<option name="project" value="LOCAL" />
|
| 384 |
+
<updated>1647364059882</updated>
|
| 385 |
+
</task>
|
| 386 |
+
<option name="localTasksCounter" value="48" />
|
| 387 |
<servers />
|
| 388 |
</component>
|
| 389 |
<component name="TypeScriptGeneratedFilesManager">
|
app.py
CHANGED
|
@@ -14,6 +14,7 @@ from segmenter_model.utils import colorize_one, map2cs
|
|
| 14 |
# WEIGHTS = './weights/segmenter.pth
|
| 15 |
WEIGHTS = './weights/segmenter_nusc.pth'
|
| 16 |
|
|
|
|
| 17 |
def blend_images(bg, fg, alpha=0.3):
|
| 18 |
fg = fg.convert('RGBA')
|
| 19 |
bg = bg.convert('RGBA')
|
|
@@ -21,6 +22,7 @@ def blend_images(bg, fg, alpha=0.3):
|
|
| 21 |
|
| 22 |
return blended
|
| 23 |
|
|
|
|
| 24 |
def download_file_from_google_drive(destination=WEIGHTS):
|
| 25 |
id = '1v6_d2KHzRROsjb_cgxU7jvmnGVDXeBia'
|
| 26 |
|
|
@@ -166,7 +168,7 @@ def predict(input_img):
|
|
| 166 |
title = "Drive&Segment"
|
| 167 |
description = 'Gradio Demo accompanying paper "Drive&Segment: Unsupervised Semantic Segmentation of Urban Scenes via Cross-modal Distillation"\nBecause of the CPU-only inference, it might take up to 20s for large images.'
|
| 168 |
# article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
|
| 169 |
-
examples = ['examples/img1.jpg'] # , 'examples/img2.jpeg']
|
| 170 |
|
| 171 |
# predict(examples[0])
|
| 172 |
|
|
|
|
| 14 |
# WEIGHTS = './weights/segmenter.pth
|
| 15 |
WEIGHTS = './weights/segmenter_nusc.pth'
|
| 16 |
|
| 17 |
+
|
| 18 |
def blend_images(bg, fg, alpha=0.3):
|
| 19 |
fg = fg.convert('RGBA')
|
| 20 |
bg = bg.convert('RGBA')
|
|
|
|
| 22 |
|
| 23 |
return blended
|
| 24 |
|
| 25 |
+
|
| 26 |
def download_file_from_google_drive(destination=WEIGHTS):
|
| 27 |
id = '1v6_d2KHzRROsjb_cgxU7jvmnGVDXeBia'
|
| 28 |
|
|
|
|
| 168 |
title = "Drive&Segment"
|
| 169 |
description = 'Gradio Demo accompanying paper "Drive&Segment: Unsupervised Semantic Segmentation of Urban Scenes via Cross-modal Distillation"\nBecause of the CPU-only inference, it might take up to 20s for large images.'
|
| 170 |
# article = "<p style='text-align: center'><a href='TODO' target='_blank'>Project Page</a> | <a href='codelink' target='_blank'>Github</a></p>"
|
| 171 |
+
examples = ['examples/img1.jpg', 'examples/img100.jpeg'] # , 'examples/img2.jpeg']
|
| 172 |
|
| 173 |
# predict(examples[0])
|
| 174 |
|
examples/100.jpeg
ADDED
|