Save the raw_voxel model in pickle format
This commit is contained in:
parent
ee030ce624
commit
19a8e41621
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import pickle
|
||||||
|
|
||||||
import mcubes
|
import mcubes
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -167,6 +168,10 @@ fg_sigma = np.array(fg_raw_voxel)
|
||||||
# bg_sigma = np.array(bg_raw_voxel)
|
# bg_sigma = np.array(bg_raw_voxel)
|
||||||
threshold = 0.5
|
threshold = 0.5
|
||||||
|
|
||||||
|
# save the raw_voxel in pickle format
|
||||||
|
fd = open("raw_voxel_256.pkl", "wb")
|
||||||
|
pickel.dump(fg_sigma, fd)
|
||||||
|
fd.close()
|
||||||
|
|
||||||
# vertices, triangles = mcubes.marching_cubes(sigma, threshold)
|
# vertices, triangles = mcubes.marching_cubes(sigma, threshold)
|
||||||
# mesh = trimesh.Trimesh(vertices / N - .5, triangles)
|
# mesh = trimesh.Trimesh(vertices / N - .5, triangles)
|
||||||
|
|
Loading…
Reference in a new issue