Rapid Vision
Rapid Vision (rv) is a lightweight toolset for generating labeled synthetic image datasets with just a few lines of code.
Advantages
- Photorealistic results using Cycles rendering engine
- Simple and clean Python API
- Automatic segmentation labeling creation
- Completely open source
- Seamless integration with Blender's rich procedural toolset.
Getting started
- Install the rv toolbash
go install github.com/Rapid-Vision/rv@latest - Create scene scriptpython
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 scenebash
rv preview scene.pyDon't close the preview window yet.
- Randomize the scene
See how the preview changes on each file save.
pythonimport 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 resultbash
rv render scene.py - See the resulting dataset
Resulting dataset has following directory structure:
textout/ └── 1/ └── 424702d4-b28e-4082-b5e5-5499f9a49065/ ├── _meta.json ├── Image.png ├── PreviewIndexOB.png ├── IndexOB.png ├── Alpha.png └── Noisy Image.pngName Description 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 Image.pngResulting image PreviewIndexOB.pngPreview for the segmentation masks IndexOB.pngSegmentation masks. It is a 16-bit black and with image with each pixel corresponding to the indexfield of each object in the_meta.jsonfile.Other Other rendering passes that can be useful for computer vision tasks and can be additionaly enabled by the Scene.set_passesmethod. - Use rv for generating your next synthetic dataset
For more information view the Features Overview and API reference.