nywang16 / pixel2mesh Goto Github PK
View Code? Open in Web Editor NEWPixel2Mesh: Generating 3D Mesh Models from Single RGB Images. In ECCV2018.
License: Apache License 2.0
Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images. In ECCV2018.
License: Apache License 2.0
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...
i saw the number of supports is 2 in file "train.py" :
num_supports = 2
I am curious about the problem why there ser two adj supports for one ellipsoid graph.
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.
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.
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!
when I apply upsample.mlx to the model.obj on meshlab, the meshlab close unspectly
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!
Hi,
first appreciating for this great work.
When I try to download the pre-train model through the link,
(http://bigvid.fudan.edu.cn/pixel2mesh/eccv2018/checkpoint.zip)
the website must need to log-in to Fudan University account, unfortunately I can't.
May I get the model from other free-space?
Thanks a lot!
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.
HI @nywang16
I looked into your ShapeNetTrain
dataset and found that the point numbers of each model are not the same. It seems that you didn't mention your strategy of sampling point clouds in your paper. Could you tell me about that?
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!
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?
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?
My specs: Ubuntu16.04 ,Tensorflow 1.12,opencv3.4.0
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
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?
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?
Sent with GitHawk
sorry, I can not finish the downloading of the training dataset ! and I find that it is defferent from the shapenet dataset on https://www.shapenet.org/ ! Does anyone meet this problem? I want to how to convert right data!
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!
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
My specs: Ubuntu16.04 ,Tensorflow 1.12,opencv3.4.0
clone https://github.com/fanhqme/PointSetGeneration and then run make, after changing the paths at the top of the makefile. Then copy the compiled library tf_nndistance_so.so
located in depthestimate
to cd_dist.so
.
Originally posted by @M4gicT0 in #7 (comment)
Hi thanks for sharing the wonderful code. I am wondering whether this method can be used to 3d face reconstruction? is there any possible problem when this method is applied to 3d face reconstruction? thanks.
I can't download the dataset from google driver, Do you have the dataset in Baidunetdisk for me ?
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
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?
Could anyone tell me what's info_ellipsoid.dat
for and how to open face.obj
(Meshlab cannot open it). Thx.
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?
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!
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)]]
cd_dist.so is not specified to run on windows
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!
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.
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
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.
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
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
when I make the code and install the new code, there are some problems
Hi, I want to know how to get the sampled GroundTruth points cloud (with vertex normal) from the shapenet dataset.
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.
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!
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.
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
Hi,
Hello, can you tell me how face2.obj and face3.obj was created ? and some information in file info_ellipsoid.dat like support1, support2, support3, edges, lape_idx, pool_idx were generated ?
Hi,
I found in your training code that you initialized the model with the trained checkpoint. I may wonder where is the initialization weights for build_cnn18, it is not a VGG-net neither.
Best.
how to produce my info_ellipsoid.dat?how i use my face1 to generate the .dat?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.