chaoxu commited on
Commit
d27dcf4
β€’
1 Parent(s): dca5722

upgraded gradio. image display issue to be fixed

Browse files
Files changed (2) hide show
  1. README.md +7 -8
  2. app.py +5 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ“ΈπŸš€πŸŒŸ
4
  colorFrom: red
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 3.44.0
8
  app_file: app.py
9
  pinned: true
10
  license: mit
@@ -26,12 +26,11 @@ Please refer to our [GitHub repo](https://github.com/One-2-3-45/One-2-3-45) for
26
  ## Citation
27
 
28
  ```bibtex
29
- @misc{liu2023one2345,
30
- title={One-2-3-45: Any Single Image to 3D Mesh in 45 Seconds without Per-Shape Optimization},
31
- author={Minghua Liu and Chao Xu and Haian Jin and Linghao Chen and Mukund Varma T and Zexiang Xu and Hao Su},
32
- year={2023},
33
- eprint={2306.16928},
34
- archivePrefix={arXiv},
35
- primaryClass={cs.CV}
36
  }
37
  ```
 
4
  colorFrom: red
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 4.22.0
8
  app_file: app.py
9
  pinned: true
10
  license: mit
 
26
  ## Citation
27
 
28
  ```bibtex
29
+ @article{liu2023one2345,
30
+ title={One-2-3-45: Any single image to 3d mesh in 45 seconds without per-shape optimization},
31
+ author={Liu, Minghua and Xu, Chao and Jin, Haian and Chen, Linghao and Varma T, Mukund and Xu, Zexiang and Su, Hao},
32
+ journal={Advances in Neural Information Processing Systems},
33
+ volume={36},
34
+ year={2024}
 
35
  }
36
  ```
app.py CHANGED
@@ -322,7 +322,7 @@ def stage1_run(models, device, cam_vis, tmp_dir,
322
  return (90-elev_output, new_fig, *output_ims, *output_ims_2)
323
  else:
324
  rerun_idx = [i for i in range(len(btn_retrys)) if btn_retrys[i]]
325
- if 90-int(elev["label"]) > 75:
326
  rerun_idx_in = [i if i < 4 else i+4 for i in rerun_idx]
327
  else:
328
  rerun_idx_in = rerun_idx
@@ -340,7 +340,7 @@ def stage1_run(models, device, cam_vis, tmp_dir,
340
 
341
  def stage2_run(models, device, tmp_dir,
342
  elev, scale, is_glb=False, rerun_all=[], stage2_steps=50):
343
- flag_lower_cam = 90-int(elev["label"]) <= 75
344
  is_rerun = True if rerun_all else False
345
  model = models['turncam'].half()
346
  if not is_rerun:
@@ -593,8 +593,8 @@ def run_demo(
593
  gr.Markdown(_DESCRIPTION)
594
 
595
  with gr.Row(variant='panel'):
596
- with gr.Column(scale=6):
597
- image_block = gr.Image(type='pil', image_mode='RGBA', height=290, label='Input image', tool=None)
598
 
599
  gr.Examples(
600
  examples=examples_full,
@@ -617,7 +617,7 @@ def run_demo(
617
  run_btn = gr.Button('Run Generation', variant='primary', interactive=False)
618
  guide_text = gr.Markdown(_USER_GUIDE, visible=True)
619
 
620
- with gr.Column(scale=4):
621
  with gr.Row():
622
  bbox_block = gr.Image(type='pil', label="Bounding box", height=290, interactive=False)
623
  sam_block = gr.Image(type='pil', label="SAM output", interactive=False)
 
322
  return (90-elev_output, new_fig, *output_ims, *output_ims_2)
323
  else:
324
  rerun_idx = [i for i in range(len(btn_retrys)) if btn_retrys[i]]
325
+ if 90-int(elev) > 75:
326
  rerun_idx_in = [i if i < 4 else i+4 for i in rerun_idx]
327
  else:
328
  rerun_idx_in = rerun_idx
 
340
 
341
  def stage2_run(models, device, tmp_dir,
342
  elev, scale, is_glb=False, rerun_all=[], stage2_steps=50):
343
+ flag_lower_cam = 90-int(elev) <= 75
344
  is_rerun = True if rerun_all else False
345
  model = models['turncam'].half()
346
  if not is_rerun:
 
593
  gr.Markdown(_DESCRIPTION)
594
 
595
  with gr.Row(variant='panel'):
596
+ with gr.Column(scale=33):
597
+ image_block = gr.Image(type='pil', image_mode='RGBA', height=290, label='Input image')
598
 
599
  gr.Examples(
600
  examples=examples_full,
 
617
  run_btn = gr.Button('Run Generation', variant='primary', interactive=False)
618
  guide_text = gr.Markdown(_USER_GUIDE, visible=True)
619
 
620
+ with gr.Column(scale=20):
621
  with gr.Row():
622
  bbox_block = gr.Image(type='pil', label="Bounding box", height=290, interactive=False)
623
  sam_block = gr.Image(type='pil', label="SAM output", interactive=False)