Git Product home page Git Product logo

mesh-voxelization's Issues

Aborted (core dumped)

when i use the command
../bin/voxelize occ ../examples/input ../examples/output.h5
i meet this problem.
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
Aborted (core dumped)

Setup

I am currently looking for a fast CPU based voxelizer for mesh files and wondering, whether your project might fit my needs. I want to start from STL files and be able to get the voxelized version as a numpy array for further processing. Do you think that would be worth the required effort or are there better alternatives?

the file name should be all numbers???????

../bin/voxelize occ ../examples/input ../examples/output.h5
i found that when filename like "a.off",failed ,invaild augument..............
It looks like it only supports naming files with Numbers

[Question] Is there anyway to `fill` a water-tight voxel grid?

Hello!

First, thank you for your awesome job!

Currently I'm working on the auto-encoders of 3D voxels. As you have said,

Note that these are not "filled"; meaning that only the mesh surfaces are voxelized.

many datasets provide voxels that contain only the surfaces, leaving the inner part hollow. This make it very difficult for auto-encoders to catch the surfaces, since the surfaces are only 1-grid-thick. I hope some tools can help me to fill them automatically.

My question is that, is filling the inner part of a water-tight voxel still an open-question? Is there any good idea to do it automatically?

Thanks.

colors

Hi,

is there any plan on adding color to the voxels? Do you know of any library that generates voxels with color info?

thanks!

.obj to .off

hello, i want to use PartNet, the file is .obj. could you please tell me how to translate it to .off?
thanks very much

Can you please specify how to compile with C++11?

I am receiving errors compiling without setting any extra C or CXX flags. Any idea how to get around this?

(Compiling with the latest unstable/stable 3.3.4 version of Eigen. Not sure if this is an Eigen issue or C++ issue).

Thanks!

Scanning dependencies of target read_hdf5
[ 25%] Building CXX object CMakeFiles/read_hdf5.dir/examples/read_hdf5.cpp.o
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:57:11: error: no member named 'printError' in
'H5::FileIException'
error.printError();
~~~~~ ^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:63:11: error: no member named 'printError' in
'H5::DataSetIException'
error.printError();
~~~~~ ^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:69:11: error: no member named 'printError' in
'H5::DataSpaceIException'
error.printError();
~~~~~ ^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:118:11: error: no member named 'printError' in
'H5::FileIException'
error.printError();
~~~~~ ^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:124:11: error: no member named 'printError' in
'H5::DataSetIException'
error.printError();
~~~~~ ^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:130:11: error: no member named 'printError' in
'H5::DataSpaceIException'
error.printError();
~~~~~ ^
In file included from /Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:10:
In file included from /Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/Tensor:102:
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: error: non-constant-expression cannot be narrowed from
type 'unsigned long long' to 'std::__1::array<long, 4>::value_type' (aka 'long') in initializer list [-Wc++11-narrowing]
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:90:62: note: in instantiation of function template specialization
'Eigen::DSizes<long, 4>::DSizes<unsigned long long, unsigned long long>' requested here
EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices) : m_dimensions(indices...) {
^
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/Tensor.h:342:11: note: in instantiation of function template specialization
'Eigen::TensorStorage<float, Eigen::DSizes<long, 4>, 1>::TensorStorage<long, unsigned long long, unsigned long long, unsigned long long>' requested here
: m_storage(firstDimension, otherDimensions...)
^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:45:13: note: in instantiation of function template
specialization 'Eigen::Tensor<float, 4, 1, long>::Tensor<unsigned long long, unsigned long long, unsigned long long>' requested here
dense = Eigen::Tensor<float, rank, Eigen::RowMajor>(dimsf[0], dimsf[1], dimsf[2], dimsf[3]);
^
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: note: insert an explicit cast to silence this issue
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
static_cast<value_type>( )
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: error: non-constant-expression cannot be narrowed from
type 'unsigned long long' to 'std::__1::array<long, 4>::value_type' (aka 'long') in initializer list [-Wc++11-narrowing]
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: note: insert an explicit cast to silence this issue
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
static_cast<value_type>( )
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: error: non-constant-expression cannot be narrowed from
type 'unsigned long long' to 'std::__1::array<long, 5>::value_type' (aka 'long') in initializer list [-Wc++11-narrowing]
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:90:62: note: in instantiation of function template specialization
'Eigen::DSizes<long, 5>::DSizes<unsigned long long, unsigned long long, unsigned long long>' requested here
EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices) : m_dimensions(indices...) {
^
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/Tensor.h:342:11: note: in instantiation of function template specialization
'Eigen::TensorStorage<float, Eigen::DSizes<long, 5>, 1>::TensorStorage<long, unsigned long long, unsigned long long, unsigned long long, unsigned long
long>' requested here
: m_storage(firstDimension, otherDimensions...)
^
/Users/ruizhu/Documents/baidu/personal-code/car-fitting/data/mesh-voxelization-macos/examples/read_hdf5.cpp:106:13: note: in instantiation of function
template specialization 'Eigen::Tensor<float, 5, 1, long>::Tensor<unsigned long long, unsigned long long, unsigned long long, unsigned long long>'
requested here
dense = Eigen::Tensor<float, rank, Eigen::RowMajor>(dimsf[0], dimsf[1], dimsf[2], dimsf[3], dimsf[4]);
^
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: note: insert an explicit cast to silence this issue
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
static_cast<value_type>( )
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: error: non-constant-expression cannot be narrowed from
type 'unsigned long long' to 'std::__1::array<long, 5>::value_type' (aka 'long') in initializer list [-Wc++11-narrowing]
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: note: insert an explicit cast to silence this issue
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
static_cast<value_type>( )
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: error: non-constant-expression cannot be narrowed from
type 'unsigned long long' to 'std::__1::array<long, 5>::value_type' (aka 'long') in initializer list [-Wc++11-narrowing]
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
/Users/ruizhu/Documents/eigen-git-mirror/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:289:167: note: insert an explicit cast to silence this issue
...firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
^~~~~~~~~~~~~~~
static_cast<value_type>( )
11 errors generated.
make[2]: *** [CMakeFiles/read_hdf5.dir/examples/read_hdf5.cpp.o] Error 1
make[1]: *** [CMakeFiles/read_hdf5.dir/all] Error 2
make: *** [all] Error 2

`error.printError()` not found.

When building the repo, I encountered several errors with the following error message:

‘class H5::FileIException’ has no member named ‘printError’; did you mean ‘printErrorStack’?

After tracing the code, I found that in read_hd5.cpp and main.cpp, there are calls to the printError function, which turns out should be printErrorStack. I fixed this locally and was able to build the executable. Maybe you want to update the repo to fix this issue.

It works super slow when generating 256^3 voxels

Great thanks for sharing your code and it does help me a lot.
I follow the readme. first, scale off, and then generate. But it seems that it works really slow when generating 256^3 voxels (10 files more than 30min) does it work correctly? If not, what could be the problem?
Looking forward to your reply.

Only positive sdf values when processing the models of ShapeNet

Hi @davidstutz ,

I am using this mesh-voxelization script to generate SDF volume with the ShapeNet dataset.
The model I tested is a watertight sofa model, but the result shows there is no interior value generated.
The value of the num_intersect variable is always even number.
Could you give me some suggestions or help in solving this weird situation?
Thank you very much for considering this matter.

The model I am using for testing is
ShapeNetCore.v2\ 04256520 \ 1037fd31d12178d396f164a988ef37cc \ models \ model_normalized.obj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.