From 19a8e41621a7066510cba0cefa13b5b331ab3e8c Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 29 Jun 2021 18:40:36 +0200 Subject: [PATCH] Save the raw_voxel model in pickle format --- voxelisation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/voxelisation.py b/voxelisation.py index 2026263..5f16c42 100644 --- a/voxelisation.py +++ b/voxelisation.py @@ -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)