Coder Social home page Coder Social logo

nywang16 / pixel2mesh Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 294.0 5.8 MB

Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images. In ECCV2018.

Home Page: http://openaccess.thecvf.com/content_ECCV_2018/papers/Nanyang_Wang_Pixel2Mesh_Generating_3D_ECCV_2018_paper.pdf

License: Apache License 2.0

Python 100.00%
3d mesh reconstruction

pixel2mesh's People

Contributors

mathigatti avatar nywang16 avatar walsvid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixel2mesh's Issues

cannot make

I cannot install because 'make' command is just failed like this :


jinhyeok@yang:~/Pixel2Mesh/pixel2mesh/external$ make
make: Circular tf_approxmatch_g.cu <- tf_approxmatch_g.cu.o dependency dropped.
make: Circular tf_nndistance_g.cu <- tf_nndistance_g.cu.o dependency dropped.
/usr/local/cuda-10.0/bin/nvcc -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o tf_nndistance_g.cu.o tf_nndistance_g.cu -I /home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2
In file included from /home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/Core:269:0,
from /home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/Tensor:14,
from /home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from tf_nndistance_g.cu:3:
/usr/local/cuda-10.0/bin/..//include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
#warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."
^~~~~~~
/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr host function("imag") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1255): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr host function("imag") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1260): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1285): warning: calling a constexpr host function("real") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1286): warning: calling a constexpr host function("imag") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1287): warning: calling a constexpr host function("imag") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1285): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1286): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1287): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1288): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1293): warning: calling a constexpr host function("real") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1294): warning: calling a constexpr host function("imag") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1295): warning: calling a constexpr host function("imag") from a host device function("exp") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1293): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1294): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1295): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1296): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(133): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(138): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(208): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/home/jinhyeok/anaconda3/lib/python3.6/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(213): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

Segmentation fault (core dumped)
makefile:21: recipe for target 'tf_nndistance_g.cu.o' failed
make: *** [tf_nndistance_g.cu.o] Error 139


My distro is Ubuntu 18.02, and python3.6, tensorflow 1.4.1, CUDA 9.1 and TFlearn 0.3.2 are installed.

I don;t know what the problem is...

import error when importing cd_dist.so.

Hi @nywang16, I encountered an error "dynamic module does not define init function (initcd_dist)" when importing the library. Can you kindly share or release the source code for cd_dist? Thank you very much.

how to compile cd_dist.so

hello, I want to run the demo on mac os. I need to compile the cd_dist.so by myself, but the link you post did not tell any information about it. Please help me, thx.

How wo get the groundtruth point cloud with normal vector from ShapeNet dataset?

Given the 3D model in the shapenet dataset(.obj files), how can I get the groundtruth point cloud with normal vector in your way to train my own model?
Besides, You said that you transformed it to corresponding coordinates in camera coordinate based on camera parameters from the Rendering Dataset. I don't understand it clearly. Can you share me how to preprocess the groundtruth point to prepare my data to train your model? I am not familiar with it indeed. Thanks very much!

About the version of ShapeNet

Hi!

For 3D model, there is ShapeNetCore v1 , ShapeNetCore v2 and ShapeNetSem in the website of ShapeNet. I download the ShapeNetCore v2 for the 3D model. However, I find it may be different from the 3D model from your model(I compare the corresponding model.obj in https://github.com/nywang16/Pixel2Mesh/tree/master/data_generation and ShapeNetCore v2 ).

I wonder which version is your shapenet 3D model which matches with the rendering image in 3D-R2N2.
Can someone help me? Thanks very much!

cd_dist.so source?

Thanks for opensourcing the code. I would like to request the source code for cd_dist.so so I can compile and use on Windows. If possible please provide the source.
Thank you.

Missing .dat files in data

Hi,
I see there are few missing files in the data that you uploaded.
For eg: 03691459_61a4c1b213e7eb2b2633ff66beb9cf31_04.dat
Can you please check?

Thanks!

About the projection layer

I think in the projection layer, the discrete operation rasterization is not differentiable, so BP is prevented and i wonder know how to update the variables in the image convolution layer?

quesions about F-score and CD/EMD

HI @nywang16
It seems you didn't explain how you got F-score of your method or other approach. And I couldn't figure out where and how your CD/EMD and others come from. I suppose that there should be a normalization explanation, e.g., the whole point cloud of a model are in a semi-sphere where r = 1..
So could you tell more about your F-score and CD/EMD?

cd_dist.so with PointSetGeneration compilation doesn't make sense

I compile PointSetGeneration with make (Ubuntu). I only see the following .so files being generated. There is no any cd_dist.so. How do you compile PointSetGeneration to get the cd_dist.so file?

Thanks.

root@6bf78506a78b:/Pixel2Mesh/PointSetGeneration/depthestimate# ls
BatchFetcher.py render_balls_so.so show3d_balls.py tf_nndistance.py tf_nndistance_g.cu.o train_nn.py
render_balls_so.cpp show3d.py tf_nndistance.cpp tf_nndistance_g.cu tf_nndistance_so.so visualizeptexample.v.py

No Suitable Image Found Error

When attempting to run the demo, I receive an error that tf_nndistance_so.so is an unknown file type, an no suitable image can be found. The full error is shown below.

(testEnv) $ python demo.py --image utils/examples/plane.png
Traceback (most recent call last):
File "demo.py", line 3, in
from pixel2mesh.models import GCN
...
packages/tensorflow/python/framework/load_library.py", line 60, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(./external/tf_nndistance_so.so, 6): no suitable image found. Did find:
./external/tf_nndistance_so.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users/Bishop/Desktop/Testing/Pixel2Mesh/pixel2mesh/external/tf_nndistance_so.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

I'm not sure if the issue is one of compatibility. The specs of my gcc are:

(testEnv) $ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Does anyone have any ideas on how to resolve this?

Training

Hi, When I execute python train.py it works and the result is as follows:
Model restored from file: utils/checkpoint/gcn.ckpt
Model saved in file: utils/checkpoint/gcn.ckpt
Model saved in file: utils/checkpoint/gcn.ckpt
...
...
...
Training Finished!
According to the model save directory, I didn't find everything about the model under the checkpoint file. What's the problem?

error

I encountered this problem.
Traceback (most recent call last):
File "demo.py", line 84, in
vert = sess.run(model.output3, feed_dict=feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1124, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1321, in _do_run
options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1340, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: <excephtion str() failed>

Did someone encounter this problem? thanks!

Docker image for Pixel2Mesh

Hi, looks very promising after reading your publication on building 3d model using single RGB image. i would like to try the algorithm and see if i can use it. Can you provide a docker image with Ubuntu OS which will make the things easier as so many dependencies are required while installing including right versions. i could see some of the limitations like OS version, CUDA, cudnn, Tensorflow versions etc. appreciate the work you guys have done.

Thanks,
Gopikrishna

undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv

When I solved the ZTIN10tensorflow8OpKernelE problem, I encountered a new problem _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv, if you know please tell me, thank you very much

This is my mistake:
Traceback (most recent call last):
File "demo.py", line 3, in
from pixel2mesh.models import GCN
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 3, in
from pixel2mesh.losses import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 2, in
from pixel2mesh.cd_dist import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/cd_dist.py", line 3, in
nn_distance_module=tf.load_op_library('./external/tf_nndistance_so.so')
File "/home/software/anaconda/envs/tensorflow-gpu/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./external/tf_nndistance_so.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv

Earth Mover distance?

Table 2 in your paper reports both Chamfer distance and Earth-Mover distances; however I can't find your code for computing EMD. Can you share it?

About info_ellipsoid.dat

Could anyone tell me what's info_ellipsoid.dat for and how to open face.obj(Meshlab cannot open it). Thx.

Train time problem

I have trained the model.It is training the 1 epoch, but I used more than 12 hours. I have two nvidia 1080Ti gpu.How can I speed up my training and how long will the training last?

Pre-trained model available?

Hi @nywang16 ,

first greetings for this impressive work.

I'm wondering if the pre-trained model will be available for download. In the README you're mentioning a demo, but I don't understand if it's the same thing.
Thank you!

InvalidArgumentError (see above for traceback): indices[0,7] = -1 is not in [0, 157)

When I downloaded the ShapeNet.tar file, I decompressed it according to the document prompt. But because of my computer performance problems, I did not use ShapeNet.tar to perform Python train.py operations. I only took part of the extracted content of ShapeNet.tar for training. But when I executed Python train.py, I encountered the following error, which has been bothering me. If you can, please help me.

Model restored from file: utils/checkpoint/gcn.ckpt
Traceback (most recent call last):
File "train.py", line 101, in
_, dists,out1,out2,out3 = sess.run([model.opt_op,model.loss,model.output1,model.output2,model.output3], feed_dict=feed_dict)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 877, in run
run_metadata_ptr)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1100, in _run
feed_dict_tensor, options, run_metadata)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
run_metadata)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,7] = -1 is not in [0, 157)
[[Node: GatherV2_12 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](concat_2, strided_slice_15, gradients/graphconvolution_1/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/GatherV2/axis)]]

Caused by op u'GatherV2_12', defined at:
File "train.py", line 47, in
model = GCN(placeholders, logging=True)
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 108, in init
self.build()
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 74, in build
self._loss()
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 118, in _loss
self.loss += .2*laplace_loss(self.inputs, self.output1, self.placeholders, 1)
File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 16, in laplace_loss
lap1 = laplace_coord(pred1, placeholders, block_id)
File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 10, in laplace_coord
laplace = tf.reduce_sum(tf.gather(vertex, indices), 1)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 2659, in gather
return gen_array_ops.gather_v2(params, indices, axis, name=name)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3142, in gather_v2
"GatherV2", params=params, indices=indices, axis=axis, name=name)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): indices[0,7] = -1 is not in [0, 157)
[[Node: GatherV2_12 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](concat_2, strided_slice_15, gradients/graphconvolution_1/SparseTensorDenseMatMul/SparseTensorDenseMatMul_grad/GatherV2/axis)]]

InvalidArgumentError: flat indices[117, :] = [2, 7] does not index into param (shape: [7,7,512]).

When I run "python demo.py --image utils/examples/plane.png" , I meet the problem:

InvalidArgumentError (see above for traceback): flat indices[117, :] = [2, 7] does not index into param (shape: [7,7,512]).
[[Node: graphprojection_1/GatherNd_13 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](gcn/Squeeze_3, graphprojection_1/stack_13)]]

However, I didn't change anything.
My TF is 1.9 and Cuda is 9.0 , I compile my own cd_dist.so. I didn't know what is wrong. Can anyone help me ? Thanks very much!

generate_data.py DOES NOT work for other meshes.

I tested code of generate_data.py, but it only works for 1a0bc9ab92c915167ae33d942430658c, but does not work for other meshes. To be more specific, I use other rendering_metadata.txt of the meshes but the result is quit weird: the projection does not match the original rendering images from ShapeNetRendering of 3D-R2N2.
Is it because you hardcode some parameters in the code? , or did I test wrongly?
Please have a check, thank you.

InvalidArgumentError in train.py

I have downloaded the training dataset, and when I run train.py with Python2.7, TensorFlow 1.3.0 and TFLearn 0.3.2, I get an InvalidArgumentError:

Traceback (most recent call last): File "train.py", line 91, in <module> _, dists,out1,out2,out3 = sess.run([model.opt_op,model.loss,model.output1,model.output2,model.output3], feed_dict=feed_dict) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895,in run run_metadata_ptr) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1124, in _run feed_dict_tensor, options, run_metadata) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run options, run_metadata) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,7] = -1 is not in [0, 157) [[Node: Gather_12 = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, validate_indices=true, _device="/job:localhost/replica:0/task:0/cpu:0"](concat_2, strided_slice_15)]] Caused by op u'Gather_12', defined at: File "train.py", line 37, in <module> model = GCN(placeholders, logging=True) File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 108, in __init__ self.build() File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 74, in build self._loss() File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 118, in _loss self.loss += .3*laplace_loss(self.inputs, self.output1, self.placeholders, 1) File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 16, in laplace_loss lap1 = laplace_coord(pred1, placeholders, block_id) File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 10, in laplace_coord laplace = tf.reduce_sum(tf.gather(vertex, indices), 1) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 2409,in gather validate_indices=validate_indices, name=name) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1219, in gather validate_indices=validate_indices, name=name) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py",line 767, in apply_op op_def=op_def) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630,in create_op original_op=self._default_original_op, op_def=op_def) File "/code/anaconda3/envs/Pixel2Mesh/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1204,in __init__ self._traceback = self._graph._extract_stack() # pylint: disable=protected-access InvalidArgumentError (see above for traceback): indices[0,7] = -1 is not in [0, 157) [[Node: Gather_12 = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, validate_indices=true, _device="/job:localhost/replica:0/task:0/cpu:0"](concat_2, strided_slice_15)]]

Could it be because TensorFlow seems to be using my CPU ? Do I need to install tensorflow-gpu instead of tensorflow ?

Thanks in advance

Speed of Each Iteration

Hi,
Thanks for releasing codes! I wonder how much time each iteration cost in your machine. I tested the codes in Titan V, it's about 0.13s for each iteration. This seems cannot finish 50 epochs within 72 hours.

errors

Traceback (most recent call last):
File "demo.py", line 3, in
from pixel2mesh.models import GCN
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 3, in
from pixel2mesh.losses import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 2, in
from pixel2mesh.cd_dist import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/cd_dist.py", line 3, in
nn_distance_module=tf.load_op_library('./cd_dist.so')
File "/home/shihanyu/.conda/envs/py277/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: libcudart.so.8.0: cannot open shared object file: No such file or directory

Dataset not able to unzip

I downloaded the modified dataset for training. I used [https://github.com/circulosmeos/gdown.pl/blob/master/gdown.pl] to download the big file. The size fo the download is 90103894586. I am not able to untar it. The command I ran and error I got are

tar -xzf ShapeNetTrain.tar

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Any specific reason why this happens with the shared file?

Regards,
K. J. Nitthilan

undefined symbol: _ZTIN10tensorflow8OpKernelE_

While running the demo code:
python demo.py --image utils/examples/plane.png

I got this error:
Traceback (most recent call last):
File "demo.py", line 3, in
from pixel2mesh.models import GCN
File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 3, in
from pixel2mesh.losses import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/losses.py", line 2, in
from pixel2mesh.cd_dist import *
File "build/bdist.linux-x86_64/egg/pixel2mesh/cd_dist.py", line 3, in
nn_distance_module=tf.load_op_library('./external/tf_nndistance_so.so')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 60, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./external/tf_nndistance_so.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

Does anyone experience this?
My specs: Ubuntu 18.04, CUDA 10.0, CuDNN 7.4, Tensorflow 1.12, OpenCV 3.4.3.

About the generation process of the mesh

In my opinion, in the training stage, you only aim to learn the point cloud (represented by vertex,output3 in code) . Finally, you get the mesh by: np.vstack((vert, face)).

Thus, can you tell the difference between point clouds and vertex of mesh here? What' more, can you tell me the meaning of face.obj files and how to generate it?

Thanks!

About external/makefile

Hi, Nanyang.
Thank you for sharing the code of this excellent work. But I got some errors while using the makefile in external directory. A similar error like error.

But when I remove -O2 option in nvcc command, it works. Hope it can benefit someone else.

InvalidArgumentError when restoring the checkpoint

When I run python demo.py --image utils/examples/plane.png, the script starts by restoring the checkpoint from utils/checkpoint/gcn.ckpt, but right after that, I get this traceback:

Traceback (most recent call last): File "demo.py", line 84, in <module> vert = sess.run(model.output3, feed_dict=feed_dict) File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895, in run run_metadata_ptr) File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1124, in _run feed_dict_tensor, options, run_metadata) File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1321, in _do_run options, run_metadata) File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1340, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentErrorModel restored from file: utils/checkpoint/gcn.ckpt : flat indices[117, :] = [3, 7] does not index into param (shape: [7,7,512]). [[Node: graphprojection_1/GatherNd_15 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](gcn/Squeeze_3, graphprojection_1/stack_15)]] Caused by op u'graphprojection_1/GatherNd_15', defined at: File "demo.py", line 36, in <module> model = GCN(placeholders, logging=True) File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 108, in __init__ self.build() File "build/bdist.linux-x86_64/egg/pixel2mesh/models.py", line 52, in build hidden = layer(self.activations[-1]) File "build/bdist.linux-x86_64/egg/pixel2mesh/layers.py", line 74, in __call__ outputs = self._call(inputs) File "build/bdist.linux-x86_64/egg/pixel2mesh/layers.py", line 223, in _call out4 = self.project(self.img_feat[3], x, y, 512) File "build/bdist.linux-x86_64/egg/pixel2mesh/layers.py", line 235, in project Q22 = tf.gather_nd(img_feat, tf.stack([tf.cast(x2,tf.int32), tf.cast(y2,tf.int32)],1)) File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1338, in gather_nd name=name) File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op op_def=op_def) File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op original_op=self._default_original_op, op_def=op_def) File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1204, in __init__ self._traceback = self._graph._extract_stack() # pylint: disable=protected-access InvalidArgumentError (see above for traceback): flat indices[117, :] = [3, 7] does not index into param (shape: [7,7,512]). [[Node: graphprojection_1/GatherNd_15 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](gcn/Squeeze_3, graphprojection_1/stack_15)]]

What could be causing InvalidArgumentError (see above for traceback): flat indices[117, :] = [3, 7] does not index into param (shape: [7,7,512]). ?

Thanks

About face order in .obj

Hi,

  1. It seems the face order in your initial mesh (after splitting edge) is not consistent? (this mesh is generated by using data from .dat file and face2.obj) some parts are black, some parts are white. and in the plane.obj generated by demo, it also looks like this. Is there a reason that not using consistent order? I assume the face order doesn't matter?
  2. The triangles in initial mesh look not evenly distributed, is this better than even?
    init_mesh

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.