Spaces:
Sleeping
Sleeping
byeongjun-park
commited on
Commit
β’
912dcbe
1
Parent(s):
2c98aad
HarmonyView update
Browse files- .idea/workspace.xml +13 -2
- README.md +1 -1
- app.py +6 -6
.idea/workspace.xml
CHANGED
@@ -17,6 +17,9 @@
|
|
17 |
<component name="MarkdownSettingsMigration">
|
18 |
<option name="stateVersion" value="1" />
|
19 |
</component>
|
|
|
|
|
|
|
20 |
<component name="ProjectColorInfo">{
|
21 |
"associatedIndex": 6
|
22 |
}</component>
|
@@ -62,7 +65,7 @@
|
|
62 |
<workItem from="1704106389325" duration="3000" />
|
63 |
<workItem from="1707152826665" duration="2000" />
|
64 |
<workItem from="1709009070011" duration="10000" />
|
65 |
-
<workItem from="1717834285162" duration="
|
66 |
</task>
|
67 |
<task id="LOCAL-00001" summary="error resolve">
|
68 |
<option name="closed" value="true" />
|
@@ -264,7 +267,15 @@
|
|
264 |
<option name="project" value="LOCAL" />
|
265 |
<updated>1717835213390</updated>
|
266 |
</task>
|
267 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
<servers />
|
269 |
</component>
|
270 |
<component name="Vcs.Log.Tabs.Properties">
|
|
|
17 |
<component name="MarkdownSettingsMigration">
|
18 |
<option name="stateVersion" value="1" />
|
19 |
</component>
|
20 |
+
<component name="PerforceDirect.Settings">
|
21 |
+
<option name="CHARSET" value="μμ" />
|
22 |
+
</component>
|
23 |
<component name="ProjectColorInfo">{
|
24 |
"associatedIndex": 6
|
25 |
}</component>
|
|
|
65 |
<workItem from="1704106389325" duration="3000" />
|
66 |
<workItem from="1707152826665" duration="2000" />
|
67 |
<workItem from="1709009070011" duration="10000" />
|
68 |
+
<workItem from="1717834285162" duration="1820000" />
|
69 |
</task>
|
70 |
<task id="LOCAL-00001" summary="error resolve">
|
71 |
<option name="closed" value="true" />
|
|
|
267 |
<option name="project" value="LOCAL" />
|
268 |
<updated>1717835213390</updated>
|
269 |
</task>
|
270 |
+
<task id="LOCAL-00026" summary="HarmonyView update">
|
271 |
+
<option name="closed" value="true" />
|
272 |
+
<created>1717835840224</created>
|
273 |
+
<option name="number" value="00026" />
|
274 |
+
<option name="presentableId" value="LOCAL-00026" />
|
275 |
+
<option name="project" value="LOCAL" />
|
276 |
+
<updated>1717835840224</updated>
|
277 |
+
</task>
|
278 |
+
<option name="localTasksCounter" value="27" />
|
279 |
<servers />
|
280 |
</component>
|
281 |
<component name="Vcs.Log.Tabs.Properties">
|
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: cc-by-sa-3.0
|
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: cc-by-sa-3.0
|
app.py
CHANGED
@@ -193,7 +193,7 @@ def run_demo():
|
|
193 |
['hf_demo/examples/teapot.png',20,200,"SAM output"],
|
194 |
]
|
195 |
|
196 |
-
image_block = gr.
|
197 |
elevation = gr.Slider(-10, 40, 30, step=5, label='Elevation angle', interactive=True)
|
198 |
crop_size = gr.Slider(120, 240, 200, step=10, label='Crop size', interactive=True)
|
199 |
background_removal = gr.Radio(["Input image", "SAM output"], label="Input to HarmonyView", info="Which image do you want for the input to HarmonyView?")
|
@@ -220,17 +220,17 @@ def run_demo():
|
|
220 |
with gr.Column(scale=0.8):
|
221 |
image_block.render()
|
222 |
crop_size.render()
|
223 |
-
fig0 = gr.
|
224 |
|
225 |
|
226 |
with gr.Column(scale=0.8):
|
227 |
-
sam_block = gr.
|
228 |
# crop_btn = gr.Button('Crop it', variant='primary', interactive=True)
|
229 |
elevation.render()
|
230 |
-
fig1 = gr.
|
231 |
|
232 |
with gr.Column(scale=0.8):
|
233 |
-
input_block = gr.
|
234 |
background_removal.render()
|
235 |
with gr.Accordion('Advanced options', open=False):
|
236 |
cfg_scale_1 = gr.Slider(1.0, 5.0, 2.0, step=0.1, label='Classifier free guidance 1', info='How consistent to be with the Input image', interactive=True)
|
@@ -238,7 +238,7 @@ def run_demo():
|
|
238 |
seed = gr.Number(6033, label='Random seed', interactive=True)
|
239 |
run_btn = gr.Button('Run generation', variant='primary', interactive=True)
|
240 |
|
241 |
-
output_block = gr.
|
242 |
|
243 |
image_block.change(fn=partial(sam_predict, mask_predictor, removal), inputs=[image_block], outputs=[sam_block], queue=True) \
|
244 |
.success(fn=resize_inputs, inputs=[image_block, sam_block, crop_size, background_removal], outputs=[input_block], queue=True)
|
|
|
193 |
['hf_demo/examples/teapot.png',20,200,"SAM output"],
|
194 |
]
|
195 |
|
196 |
+
image_block = gr.Image(type='pil', image_mode='RGBA', height=256, label='Input image', interactive=True)
|
197 |
elevation = gr.Slider(-10, 40, 30, step=5, label='Elevation angle', interactive=True)
|
198 |
crop_size = gr.Slider(120, 240, 200, step=10, label='Crop size', interactive=True)
|
199 |
background_removal = gr.Radio(["Input image", "SAM output"], label="Input to HarmonyView", info="Which image do you want for the input to HarmonyView?")
|
|
|
220 |
with gr.Column(scale=0.8):
|
221 |
image_block.render()
|
222 |
crop_size.render()
|
223 |
+
fig0 = gr.Image(value=Image.open('assets/crop_size.jpg'), type='pil', image_mode='RGB', height=256, show_label=False, interactive=False)
|
224 |
|
225 |
|
226 |
with gr.Column(scale=0.8):
|
227 |
+
sam_block = gr.Image(type='pil', image_mode='RGBA', label="SAM output", height=256, interactive=False)
|
228 |
# crop_btn = gr.Button('Crop it', variant='primary', interactive=True)
|
229 |
elevation.render()
|
230 |
+
fig1 = gr.Image(value=Image.open('assets/elevation.jpg'), type='pil', image_mode='RGB', height=256, show_label=False, interactive=False)
|
231 |
|
232 |
with gr.Column(scale=0.8):
|
233 |
+
input_block = gr.Image(type='pil', image_mode='RGBA', label="Input to HarmonyView", height=256, interactive=False)
|
234 |
background_removal.render()
|
235 |
with gr.Accordion('Advanced options', open=False):
|
236 |
cfg_scale_1 = gr.Slider(1.0, 5.0, 2.0, step=0.1, label='Classifier free guidance 1', info='How consistent to be with the Input image', interactive=True)
|
|
|
238 |
seed = gr.Number(6033, label='Random seed', interactive=True)
|
239 |
run_btn = gr.Button('Run generation', variant='primary', interactive=True)
|
240 |
|
241 |
+
output_block = gr.Image(type='pil', image_mode='RGB', label="Outputs of HarmonyView", height=256, interactive=False)
|
242 |
|
243 |
image_block.change(fn=partial(sam_predict, mask_predictor, removal), inputs=[image_block], outputs=[sam_block], queue=True) \
|
244 |
.success(fn=resize_inputs, inputs=[image_block, sam_block, crop_size, background_removal], outputs=[input_block], queue=True)
|