cyun9286 commited on
Commit
ec9c0a2
1 Parent(s): ea2abec
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -19,7 +19,7 @@ import cv2
19
  from PIL import Image
20
  import os.path as path
21
  import sys
22
-
23
  from dust3r.inference import inference
24
  from dust3r.model import AsymmetricCroCo3DStereo
25
  from dust3r.image_pairs import make_pairs
@@ -36,7 +36,6 @@ pl.ion()
36
 
37
  HERE_PATH = path.normpath(path.dirname(__file__)) # noqa
38
  sys.path.insert(0, HERE_PATH) # noqa
39
-
40
  # for gpu >= Ampere and pytorch >= 1.12
41
  torch.backends.cuda.matmul.allow_tf32 = True
42
  batch_size = 1
@@ -147,9 +146,7 @@ def local_get_reconstructed_scene(filelist, min_conf_thr, as_pointcloud, mask_sk
147
  # mode = GlobalAlignerMode.PairViewer
148
  # scene = global_aligner(output, device=device, mode=mode, verbose=not silent)
149
 
150
- save_folder = './output/bear'
151
- os.makedirs(save_folder, exist_ok=True)
152
- outfile = get_3D_model_from_scene(save_folder, silent, scene, min_conf_thr, as_pointcloud, mask_sky, clean_depth, transparent_cams, cam_size)
153
 
154
  return outfile
155
 
 
19
  from PIL import Image
20
  import os.path as path
21
  import sys
22
+ import tempfile
23
  from dust3r.inference import inference
24
  from dust3r.model import AsymmetricCroCo3DStereo
25
  from dust3r.image_pairs import make_pairs
 
36
 
37
  HERE_PATH = path.normpath(path.dirname(__file__)) # noqa
38
  sys.path.insert(0, HERE_PATH) # noqa
 
39
  # for gpu >= Ampere and pytorch >= 1.12
40
  torch.backends.cuda.matmul.allow_tf32 = True
41
  batch_size = 1
 
146
  # mode = GlobalAlignerMode.PairViewer
147
  # scene = global_aligner(output, device=device, mode=mode, verbose=not silent)
148
 
149
+ outfile = get_3D_model_from_scene(tmpdirname, silent, scene, min_conf_thr, as_pointcloud, mask_sky, clean_depth, transparent_cams, cam_size)
 
 
150
 
151
  return outfile
152