Understanding generated output format and saving output to binvox file.
Closed this issue · 2 comments
Imperial-Dragon commented
Greetings,
I was trying to save the generated 3D volume in a binvox
file. I followed your suggestions provided in issue #11 and have following questions :
- In test.py, on line 149,
gv = generated_volume.cpu().numpy()
thisgv
is a numpy array of shape (1, 32, 32, 32). and the sample output ofgv
is as follows
How does these values represent our generated 3D volume ?
- As per your suggestions in issue #11, to save the generated output as a
binvox
file, I added following code snippet :
But, all savedbinvox
files are of size 310 bytes only.
To solve this problem you suggested to convert np.array to np.bool before saving, but I did not understand how to do that as don't know what the array value represents.
Can you help me to convert this np.array to np.bool ?
hzxie commented
These values are probabilities. You can simply convert them to booleans by:
threshold = 0.4
gv = gv > threshold
Imperial-Dragon commented
Thanks :)