kxhit commited on
Commit
de95953
1 Parent(s): 40d8ece

clean requirements

Browse files
Files changed (2) hide show
  1. app.py +6 -9
  2. requirements.txt +3 -1
app.py CHANGED
@@ -6,14 +6,11 @@ import gradio as gr
6
  import os
7
  import shutil
8
  import numpy as np
9
- import math
10
  import open3d as o3d
11
  from PIL import Image
12
  import torchvision
13
  import trimesh
14
- from skimage.io import imsave
15
  import imageio
16
- import cv2
17
  import matplotlib.pyplot as pl
18
  pl.ion()
19
 
@@ -477,12 +474,12 @@ def get_reconstructed_scene(filelist, schedule, niter, min_conf_thr,
477
  scene.vis_poses = cams2world.copy()
478
  scene.vis_pts3d = pts3d.copy()
479
 
480
- # TODO save cams2world and rgbimg to each file, file name "000.npy", "001.npy", ... and "000.png", "001.png", ...
481
- for i, (img, img_rgba, pose) in enumerate(zip(rgbimg, rgbaimg, cams2world)):
482
- np.save(os.path.join(outdir, f"{i:03d}.npy"), pose)
483
- pl.imsave(os.path.join(outdir, f"{i:03d}.png"), img)
484
- pl.imsave(os.path.join(outdir, f"{i:03d}_rgba.png"), img_rgba)
485
- # np.save(os.path.join(outdir, f"{i:03d}_focal.npy"), to_numpy(focal))
486
  # save the min/max radius of camera
487
  radii = np.linalg.norm(np.linalg.inv(cams2world)[..., :3, 3])
488
  np.save(os.path.join(outdir, "radii.npy"), radii)
 
6
  import os
7
  import shutil
8
  import numpy as np
 
9
  import open3d as o3d
10
  from PIL import Image
11
  import torchvision
12
  import trimesh
 
13
  import imageio
 
14
  import matplotlib.pyplot as pl
15
  pl.ion()
16
 
 
474
  scene.vis_poses = cams2world.copy()
475
  scene.vis_pts3d = pts3d.copy()
476
 
477
+ # # TODO save cams2world and rgbimg to each file, file name "000.npy", "001.npy", ... and "000.png", "001.png", ...
478
+ # for i, (img, img_rgba, pose) in enumerate(zip(rgbimg, rgbaimg, cams2world)):
479
+ # np.save(os.path.join(outdir, f"{i:03d}.npy"), pose)
480
+ # pl.imsave(os.path.join(outdir, f"{i:03d}.png"), img)
481
+ # pl.imsave(os.path.join(outdir, f"{i:03d}_rgba.png"), img_rgba)
482
+ # # np.save(os.path.join(outdir, f"{i:03d}_focal.npy"), to_numpy(focal))
483
  # save the min/max radius of camera
484
  radii = np.linalg.norm(np.linalg.inv(cams2world)[..., :3, 3])
485
  np.save(os.path.join(outdir, "radii.npy"), radii)
requirements.txt CHANGED
@@ -11,4 +11,6 @@ kornia
11
  segment-anything
12
  roma
13
  imageio==2.32.0
14
- imageio-ffmpeg==0.4.8
 
 
 
11
  segment-anything
12
  roma
13
  imageio==2.32.0
14
+ imageio-ffmpeg==0.4.8
15
+ scipy
16
+ matplotlib