Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,6 +52,10 @@ def process_images(files):
|
|
| 52 |
stderr.append(result.stderr)
|
| 53 |
|
| 54 |
# ----- (2) Train: jointly optimize pose -----
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
# python -W ignore ./train_joint.py \
|
| 56 |
# -s ${SOURCE_PATH} \
|
| 57 |
# -m ${MODEL_PATH} \
|
|
@@ -60,10 +64,6 @@ def process_images(files):
|
|
| 60 |
# --iter ${gs_train_iter} \
|
| 61 |
# --optim_pose \
|
| 62 |
|
| 63 |
-
scene = hashdir_name
|
| 64 |
-
subdir = f'{n_view}_views_{gs_train_iter}Iter_{pose_lr}PoseLR'
|
| 65 |
-
model_path = os.path.join(hashdir_path, 'infer', scene, subdir)
|
| 66 |
-
|
| 67 |
command = [
|
| 68 |
"python", "-W", "ignore",
|
| 69 |
"./train_joint.py",
|
|
@@ -110,8 +110,9 @@ def process_images(files):
|
|
| 110 |
|
| 111 |
result_tree = subprocess.run(["tree", hashdir_path], capture_output=True, text=True)
|
| 112 |
ply_file = os.path.join(model_path, 'point_cloud', f'iteration_{gs_train_iter}', 'point_cloud.ply')
|
|
|
|
| 113 |
|
| 114 |
-
return ply_file, result_tree.stdout, stdout, stderr
|
| 115 |
|
| 116 |
def run():
|
| 117 |
with gr.Blocks() as demo:
|
|
@@ -122,6 +123,7 @@ def run():
|
|
| 122 |
# outputs = [gr.Image(type="numpy", label="Processed Images", interactive=False), gr.Video(label="Output Video")]
|
| 123 |
# outputs = [gr.Textbox(label="Log"), gr.Image(type="filepath", label="Processed Images", interactive=False)]
|
| 124 |
outputs = [
|
|
|
|
| 125 |
gr.Model3D(label="3D Model"),
|
| 126 |
gr.Textbox(label="Output dirs"),
|
| 127 |
gr.Textbox(label="Log (stdout)"),
|
|
|
|
| 52 |
stderr.append(result.stderr)
|
| 53 |
|
| 54 |
# ----- (2) Train: jointly optimize pose -----
|
| 55 |
+
scene = 'scene'
|
| 56 |
+
subdir = f'{n_view}_views_{gs_train_iter}Iter_{pose_lr}PoseLR'
|
| 57 |
+
model_path = os.path.join(hashdir_path, 'infer', scene, subdir)
|
| 58 |
+
|
| 59 |
# python -W ignore ./train_joint.py \
|
| 60 |
# -s ${SOURCE_PATH} \
|
| 61 |
# -m ${MODEL_PATH} \
|
|
|
|
| 64 |
# --iter ${gs_train_iter} \
|
| 65 |
# --optim_pose \
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
command = [
|
| 68 |
"python", "-W", "ignore",
|
| 69 |
"./train_joint.py",
|
|
|
|
| 110 |
|
| 111 |
result_tree = subprocess.run(["tree", hashdir_path], capture_output=True, text=True)
|
| 112 |
ply_file = os.path.join(model_path, 'point_cloud', f'iteration_{gs_train_iter}', 'point_cloud.ply')
|
| 113 |
+
mp4_file = os.path.join(model_path, f'{scene}_{n_view}_view.mp4')
|
| 114 |
|
| 115 |
+
return mp4_file, ply_file, result_tree.stdout, stdout, stderr
|
| 116 |
|
| 117 |
def run():
|
| 118 |
with gr.Blocks() as demo:
|
|
|
|
| 123 |
# outputs = [gr.Image(type="numpy", label="Processed Images", interactive=False), gr.Video(label="Output Video")]
|
| 124 |
# outputs = [gr.Textbox(label="Log"), gr.Image(type="filepath", label="Processed Images", interactive=False)]
|
| 125 |
outputs = [
|
| 126 |
+
"playablevideo",
|
| 127 |
gr.Model3D(label="3D Model"),
|
| 128 |
gr.Textbox(label="Output dirs"),
|
| 129 |
gr.Textbox(label="Log (stdout)"),
|