Spaces:
Running
on
Zero
Running
on
Zero
Stanislaw Szymanowicz
commited on
Commit
·
ebd9cdc
1
Parent(s):
2181416
Save mesh with plyfile
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ import os
|
|
6 |
from omegaconf import OmegaConf
|
7 |
from PIL import Image
|
8 |
|
|
|
|
|
9 |
from utils.app_utils import (
|
10 |
remove_background,
|
11 |
resize_foreground,
|
@@ -72,8 +74,7 @@ def main():
|
|
72 |
image = resize_to_128(image)
|
73 |
return image
|
74 |
|
75 |
-
ply_out_path=
|
76 |
-
os.makedirs(os.path.dirname(ply_out_path), exist_ok=True)
|
77 |
|
78 |
def reconstruct_and_export(image):
|
79 |
"""
|
|
|
6 |
from omegaconf import OmegaConf
|
7 |
from PIL import Image
|
8 |
|
9 |
+
import tempfile
|
10 |
+
|
11 |
from utils.app_utils import (
|
12 |
remove_background,
|
13 |
resize_foreground,
|
|
|
74 |
image = resize_to_128(image)
|
75 |
return image
|
76 |
|
77 |
+
ply_out_path = tempfile.NamedTemporaryFile(suffix=f".ply", delete=False)
|
|
|
78 |
|
79 |
def reconstruct_and_export(image):
|
80 |
"""
|