Comments (8)
I think the shape[0] is to make sure batch sizes are equal to each other. So you need to add an extra '0' dimension as batch size, like line25 and line26 in example3.py.
vertices, faces = neural_renderer.load_obj(filename_obj)
self.vertices = vertices[None, :, :]
self.faces = faces[None, :, :]
Hopefully my understanding is helpful to your problem.
And if you have time, please also take a look at my question #21 , which is also related to save_obj.py.
from neural_renderer.
I believe, if we add extra '0' as you suggested, then vertices & faces will be of 3 dimension. & in save_obj() we have assert statement for vertices & faces to 2. Please correct me if i am wrong.
I am expecting to save the .obj with its texture . Do you have working code for the same? Could you please share your example3.py ?
Thanks,
Jay
from neural_renderer.
Hi Jay. For your concern, please check out my code at question #21. I am sharing my piece of code there.
But anyway, I just slice out the first dimension and feed the rest into save_obj. And I am also a little confused about your question. The vertices_to_faces is not called either in load_obj.py or save_obj.py. So I don't encounter any problem related to dimension assertion. Maybe it's because you are using torch edition from another repo, not exactly the same code as this repo?
from neural_renderer.
For simplicity, here are the codes added before #draw object module in example3.py
# save obj with textures
#TODO: textures are not reasonable
model.textures_1 = cf.concat((model.textures, model.textures.transpose((0, 1, 4, 3, 2, 5))), axis=1)
neural_renderer.save_obj('result.obj', model.vertices[0], model.faces[0], cf.tanh(model.textures_1[0]).array)
from neural_renderer.
Sorry, I am using another repo.
from neural_renderer.
@jay-thakur Which repo are you using?
from neural_renderer.
I have the same problem when saved the rendered object.
The error said
cupy.cuda.compiler.CompileException: /tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(20): error: a value of type "const float *" cannot be used to initialize an entity of type "float *"
/tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(21): error: a value of type "const float *" cannot be used to initialize an entity of type "float *"
/tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(75): error: expression must be a modifiable lvalue
I think it's chain, cupy or cuda versions problem.
I run in python3.8 and cuda10.2
What chain and cupy version should I select?
thanks
from neural_renderer.
I have the same problem when saved the rendered object. The error said
cupy.cuda.compiler.CompileException: /tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(20): error: a value of type "const float *" cannot be used to initialize an entity of type "float *" /tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(21): error: a value of type "const float *" cannot be used to initialize an entity of type "float *" /tmp/tmp72lc77x3/44a6062960e6de87983184b4a18c1a10_2.cubin.cu(75): error: expression must be a modifiable lvalue
I think it's chain, cupy or cuda versions problem. I run in python3.8 and cuda10.2 What chain and cupy version should I select? thanks
Hello, I have encountered the same issue as you. How did you resolve this problem? Was it related to the version?
from neural_renderer.
Related Issues (20)
- Texture Mapping and Rendering Texture?
- Why to use ReLU in lighting module?
- pytorch version problem HOT 2
- CVPR2019
- Thank you for sharing. Why use 2 viewpoint during training?
- How to get the same visual look of object in another rendering software (Blender)? HOT 2
- How to get optimized camera parameters?
- Tensorflow version available?
- How to use it with python3.6 and pytorch1.5.0? HOT 3
- Any proposal for vertex colored mesh render ? HOT 1
- Question about different image size
- blender version
- When I run the example4, I get error Actual type: <class 'torch.Tensor'>.
- module 'neural_renderer' has no attribute 'rasterize_face_index_map_and_weight_map' HOT 1
- Is there option to have differnt values for width and height of image
- RuntimeError: CUDA error: an illegal memory access was encountered HOT 1
- RuntimeError: CUDA error: an illegal memory access was encountered HOT 2
- sudo python setup.py install HOT 2
- Does anyone know the distance unit(e.g., meters) between the target model and the camera in the real-world? HOT 1
- bibtex is missing a coma
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neural_renderer.