First, we need to reduce our high-dimensional features to three color components. We provide a script that uses PCA to transform features into colors.
python create_pca.py -s SCENE_PATH -sf SCENE_FEAT_PATH -o OUTPUT_TXTThe script receives three inputs:
SCENE_PATHScene in a torch file (same format as in the inference script). This file is used to obtain the point coordinates.SCENE_FEAT_PATHThe point features generated with the inference script.OUTPUT_TXTOutput path where the txt file will be saved.
The output file is a text file with a line per each point in the scene. Each line contains the point coordinates and the color components separated by space: x y z r g b. The color components are in the range 0-1. You can use Meshlab to visualize the colored point cloud or use our blender template to have a fancy rendering with global illumination.
First, install Blender. Then, open the provided template blender_template.blend using blender. Once loaded, select the Scripting layout (1) as indicated in the following image:
If the loading script does not directly appear, use the button highlighted in the figure to load the blender_load_colored_pc.py script (2). Then change the path to the txt file containing the coordinates and colors of each point in your scene (3). The expected format is the same as the output of the create_pca.py script. Then, click the run script button and your point cloud should be loaded into blender and ready for rendering (4). This script will first delete the existing scene scene0081_00. Modify the camera position and just press F12 to create the render of your scene. The result should look something similar to the following image:

