lemonaddie commited on
Commit
a37f1a5
1 Parent(s): e8040b5

Update app_recon.py

Browse files
Files changed (1) hide show
  1. app_recon.py +4 -4
app_recon.py CHANGED
@@ -111,7 +111,7 @@ def sam_segment(predictor, input_image, *bbox_coords):
111
  return Image.fromarray(out_image_bbox, mode='RGBA'), masks_bbox
112
 
113
  @spaces.GPU
114
- def depth_normal(img_path,
115
  denoising_steps,
116
  ensemble_size,
117
  processing_res,
@@ -122,7 +122,7 @@ def depth_normal(img_path,
122
  if seed >= 0:
123
  torch.manual_seed(seed)
124
 
125
- img = Image.open(img_path)
126
 
127
  pipe_out = pipe(
128
  img,
@@ -157,7 +157,7 @@ def reconstruction(image, files):
157
 
158
  torch.cuda.empty_cache()
159
 
160
- img = Image.open(image)
161
 
162
  image_rem = img.convert('RGBA')
163
  image_nobg = remove(image_rem, alpha_matting=True)
@@ -275,7 +275,7 @@ def run_demo():
275
  )
276
 
277
  with gr.Row():
278
- recon_btn = gr.Button('Is there a salient foreground object? If yes, Click here to Reconstruct its 3D model.', variant='primary', interactive=True)
279
 
280
  with gr.Row():
281
  with gr.Column():
 
111
  return Image.fromarray(out_image_bbox, mode='RGBA'), masks_bbox
112
 
113
  @spaces.GPU
114
+ def depth_normal(img,
115
  denoising_steps,
116
  ensemble_size,
117
  processing_res,
 
122
  if seed >= 0:
123
  torch.manual_seed(seed)
124
 
125
+ # img = Image.open(img_path)
126
 
127
  pipe_out = pipe(
128
  img,
 
157
 
158
  torch.cuda.empty_cache()
159
 
160
+ # img = Image.open(image)
161
 
162
  image_rem = img.convert('RGBA')
163
  image_nobg = remove(image_rem, alpha_matting=True)
 
275
  )
276
 
277
  with gr.Row():
278
+ recon_btn = gr.Button('(Beta) Is there a salient foreground object? If yes, Click here to Reconstruct its 3D model.', variant='primary', interactive=True)
279
 
280
  with gr.Row():
281
  with gr.Column():