ethnhe / raster_triangle

A simple renderer with z-buffer for synthesis data generating.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raster Triangle

This is a simple renderer with z-buffer for synthesis data generating. With an input mesh and its pose, the rendered RGB and depth map are generated. It has been applied to PVN3D and FFB6D.

Installation

Compile the source code by

chmod +x ./rastertriangle_so.sh
./rastertriangle_so.sh

Datasets:

  • Download the LineMOD dataset from here. Unzip it and link the unzipped folder to this folder:
    ln -s path_to_Linemod_preprocessed ./Linemod_preprocessed
  • Download SUN2012pascalformat dataset from here(works with FireFox or right click and open link in new tab in Chrome) or here. Unzip it and link the unzipped folder to this folder:
    ln -s path_to_SUN2012pascalformat ./
  • Download the sample poses from here and move the pickle files to folder sampled_poses/.

Generate synthesis data

  • Generate rendered data. Sampled poses for each object are provided in sampled_poses/, which are generated by scripts here. Run the following command to generate rendered data:

    python3 rgbd_renderer.py --help
    python3 rgbd_renderer.py --cls ape --render_num 70000

    The generated depth map is in unit meter(m). Example rendered images are as follows: render0 render1

  • Run the following command to generate fusing data:

    python3 fuse.py --help
    python3 fuse.py --cls ape --fuse_num 10000

    The generated depth map is in unit meter(m). Example fused images are as follows: fuse0 fuse1

About

A simple renderer with z-buffer for synthesis data generating.


Languages

Language:Python 58.1%Language:C++ 40.7%Language:Shell 1.3%