Skip to Content
DocsTutorialGetting started

Rapid Vision

Rapid Vision (rv) is a lightweight toolset for generating labeled synthetic image datasets with just a few lines of code.

Advantages

  1. Photorealistic results using Cycles rendering engine
  2. Simple and clean Python API
  3. Automatic segmentation labeling creation
  4. Completely open source
  5. Seamless integration with Blender’s rich procedural toolset.

Getting started

Install dependencies

Install Go and Blender.

Install the rv tool

go install github.com/Rapid-Vision/rv@latest

Create scene script

scene.py
import rv class BasicScene(rv.Scene): def generate(self): self.get_world().set_params(sun_intensity=0.03) cube = ( self.create_cube().set_location((1, 0, 0.5)).set_scale(0.5).set_tags("cube") ) sphere = ( self.create_sphere() .set_location((-1, 0, 1)) .set_shading("smooth") .set_tags("sphere") ) plane = self.create_plane(size=1000) empty = self.create_empty().set_location((0, 0, 1)) cam = self.get_camera().set_location((7, 7, 3)).point_at(empty)

Preview the scene

rv preview scene.py

Don’t close the preview window yet.

Randomize the scene

See how the preview changes on each file save.

scene.py
import rv from random import uniform class BasicScene(rv.Scene): def generate(self): self.get_world().set_params(sun_intensity=0.03) cube = ( self.create_cube().set_location((1, 0, 0.5)).set_scale(0.5).set_tags("cube") ) cube.rotate_around_axis(rv.mathutils.Vector((0, 0, 1)), uniform(0, 360)) sphere = ( self.create_sphere() .set_location((-1, 0, 1)) .set_shading("smooth") .set_tags("sphere") ) plane = self.create_plane(size=1000) empty = self.create_empty().set_location((0, 0, 1)) cam = self.get_camera().set_location((7, 7, 3)).point_at(empty)

Render the final result

rv render scene.py

See the resulting dataset

Resulting dataset has following directory structure:

        • _meta.json
        • Image0001.png
        • PreviewIndexOB0001.png
        • IndexOB0001.png
        • Alpha0001.png
        • Noisy Image0001.png
NameDescription
outRoot directroy containing results of all runs
1Directory containing results of a single rendering run. Number increases sequentially
424702d4-b28e-4082-b5e5-5499f9a49065Directory with resulting image, labeling and additional render passes
_meta.jsonLabeling information
Image0001.pngResulting image
PreviewIndexOB0001.pngPreview for the segmentation masks
IndexOB0001.pngSegmentation masks. It is a 16-bit black and with image with each pixel corresponding to the index field of each object in the _meta.json file.
OtherOther rendering passes that can be useful for computer vision tasks and can be additionaly enabled by the Scene.set_passes method.

Use rv for generating your next synthetic dataset

For more information view the API reference.

Last updated on