Save the raw_voxel model in pickle format

This commit is contained in:
otthorn 2021-06-29 18:40:36 +02:00
parent ee030ce624
commit 19a8e41621

View file

@ -1,4 +1,5 @@
import os
import pickle
import mcubes
import numpy as np
@ -167,6 +168,10 @@ fg_sigma = np.array(fg_raw_voxel)
# bg_sigma = np.array(bg_raw_voxel)
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)
# mesh = trimesh.Trimesh(vertices / N - .5, triangles)