codic commited on
Commit
eac0fd7
·
verified ·
1 Parent(s): f5d7995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -182,16 +182,18 @@ def create_3d_obj(foreground, depth_image, background, image_path, depth=10):
182
 
183
  return str(gltf_path)
184
 
185
- # Create Gradio interface
186
- title = "Demo: Depth Estimation & 3D Reconstruction with DPT + Point Cloud"
187
- description = "This demo allows users to provide an RGB image and optionally a depth map to create a 3D object. If no depth map is provided, the DPT model will generate it."
 
 
188
  examples = [["examples/" + img] for img in os.listdir("examples/")]
189
 
190
  iface = gr.Interface(
191
  fn=process_image,
192
  inputs=[
193
  gr.Image(type="filepath", label="Input Image"),
194
- gr.Image(type="filepath", label="Input Depth Map (optional)"),
195
  ],
196
  outputs=[
197
  gr.Image(label="Predicted Depth", type="pil"),
 
182
 
183
  return str(gltf_path)
184
 
185
+
186
+ # Gradio Interface
187
+ title = "Depth Estimation & 3D Reconstruction Demo"
188
+ description = "Upload an image and optionally a depth map (in .npy or image format) to generate a 3D model. If no depth map is provided, the DPT model will generate it."
189
+
190
  examples = [["examples/" + img] for img in os.listdir("examples/")]
191
 
192
  iface = gr.Interface(
193
  fn=process_image,
194
  inputs=[
195
  gr.Image(type="filepath", label="Input Image"),
196
+ gr.File(type="filepath", label="Input Depth Map (optional)"),
197
  ],
198
  outputs=[
199
  gr.Image(label="Predicted Depth", type="pil"),