Output selection
In the MINERVAS system, there are several rendering output we support:
- RGB renderings
- Normal map
- Instance map
- Semantic map
- Depth map
- Trajectory map
Function list
PixelProcessor
has several functions for selecting different output.
Function | Description |
---|---|
gen_normal(distort=0) | Generate normal map. (distort: int ) |
gen_instance(distort=0) | Generate intance map. (distort: int ) |
gen_semantic(distort=0) | Generate semantic map. (distort: int ) |
gen_depth(distort=0, noise=0) | Generate depth map. (distort: int , noise: int ) |
gen_traj(**params) | Generate trajectory visualization (top-down view). (params: dict : parameter list from each type of Trajectory) |
gen_albedo(distort=0) | Generate albedo map. (distort: int ) |
Examples:
Normal map
Output format:
- 3 channel * 8 bit
- Suppose r, g, b represent three color channels
- [-1, 1] range of normal direction value are mapped to [0, 255]
Usage:
from ksecs.ECS.processors.pixel_processor import PixelProcessor
class NormalDsl(PixelProcessor):
def process(self, **kwargs):
self.gen_normal(distort=1)
Instance map
Output format:
- 1 channel * 16 bit
- Each pixel value represent a instance_id.
- The mapping of pixel value and instance id can be found in
instance_map.json
.
- The mapping of pixel value and instance id can be found in
Usage:
from ksecs.ECS.processors.pixel_processor import PixelProcessor
class InstanceDsl(PixelProcessor):
def process(self, **kwargs):
self.gen_instance(distort=0)
Semantic map
Output format:
- 1 channel * 16 bit
- Each pixel value represents a label_id
Usage:
from ksecs.ECS.processors.pixel_processor import PixelProcessor
class SemanticDsl(PixelProcessor):
def process(self, **kwargs):
self.gen_semantic(distort=0)
Depth map
Output format:
- 1 channel * 16 bit
Usage:
from ksecs.ECS.processors.pixel_processor import PixelProcessor
class DepthDsl(PixelProcessor):
def process(self, **kwargs):
self.gen_depth(distort=0, noise=1)
Trajectory map
Visualize trajectory in the top-down view rendering result. Customized trajectory and bow-shape trajectory are currently supported.
Usage:
from ksecs.ECS.processors.render_processor import RenderProcessor
class TrajDSL(RenderProcessor):
def process(self, *args, **kwargs):
self.gen_traj(**params)
Notes: **params to be specified are in Trajectory.
Albedo map
Ouput format: 4 channel * 8 bits
from ksecs.ECS.processors.pixel_processor import PixelProcessor
class AlbedoDsl(PixelProcessor):
def process(self, **kwargs):
self.gen_albedo(distort=0)