3D-R2N2
3D-R2N2 copied to clipboard
How to generating voxelized models & rendering images from the ShapeNet v1 dataset?
I only found a preprocessed dataset download link in your repo, but I'm interested in how voxelization and rendering is done from the original ShapeNet v1 dataset. Can you shed light on how these 2 processes are done or are there any code that I can refer to? Thanks
Same question here. Do we need to "fake" camera intrinsic matrix?
I am also very interested in this.
totally agree, I have no idea about this issue. where can I find it ?
The author released the rendering script in this commit. After some sort of modification you can use it to render the view images by blender --python blender_renderer.py
.(Install blender first)
As for rendering images, I modified the script (added some more features). I'll post a link to my repo when im finished.
@markuspaschi Could you kindly share your rendering script?
I modified the script and made it work on ShapeNet.v1/ Here are some hints (Working on Ubuntu 16.04):
- If you install blender by
apt install blender
, the blender you got will be 2.76b and should have no numpy. You cannot easily install numpy for the python environment of blender. - You cannot
import config
even if it's in the same dir. Modify such import into a single blender_render.py instead. - Use for loop to render 24 views of each model
- Use python.multiprocess or python.thread or blender -t to accelerate the whole process.
Optional: if you want to get the depth map as well, use OpenEXR first (thus blender's output format is OpenEXR) and then tranfer it into pngs you want.
Hi @AlexsaseXie ,how did you set the value of "cfg.RENDERING.MAX_CAMERA_DIST" in blender_renderer.py? And could you please share anything else that need to be modified?
Hi @AlexsaseXie ,how did you set the value of "cfg.RENDERING.MAX_CAMERA_DIST" in blender_renderer.py? And could you please share anything else that need to be modified?
That value is 1.75. I got that from this link which tells you how to generate camera matrix from the parameters of 3D-R2N2.
Thank you very much. @AlexsaseXie
I wrote a Master Thesis about 3D-Methods including Pixel2Mesh (in German). But my repository can be found here: https://github.com/markuspaschi/ShapeNetTools Go into DataSet_Tools/Renderer to find hints about how I used the blender renderer to create images. I changed some parameters, its probably not perfect (but it may be a starting point for some people).
I modified the script and made it work on ShapeNet.v1/ Here are some hints (Working on Ubuntu 16.04):
- If you install blender by
apt install blender
, the blender you got will be 2.76b and should have no numpy. You cannot easily install numpy for the python environment of blender.- You cannot
import config
even if it's in the same dir. Modify such import into a single blender_render.py instead.- Use for loop to render 24 views of each model
- Use python.multiprocess or python.thread or blender -t to accelerate the whole process.
Optional: if you want to get the depth map as well, use OpenEXR first (thus blender's output format is OpenEXR) and then tranfer it into pngs you want.
Thanks for you sharing. When i run blender_render.py, i have met some errors, eg. KeyError: 'bpy_prop_collection[key]: key "Lamp" not found' AttributeError: 'BlendData' object has no attribute 'lamps' I have no ideal about how to deal with these errors. Have you met such errors? Thanks a lot.
This may be late but you are probably using a new blender api (2.91) which doesn't support these attributes. You should use version 2.79 of blender and blenderpy, the first one is easy to install but I am struggling with the second one (blenderpy).
Hi @AlexsaseXie, have you found how to generate voxelized models? I'm also interested in it.
Hi @AlexsaseXie @markuspaschi , do you know why the colors of the model in rendered images are different in ubuntu and windows though I have set the color_model to RGBA ?
The model in meshlab
In Ubuntu (blender 2.79)
In Windows (blender 2.79)