GitXplorerGitXplorer
j

leopardi

public
6 stars
2 forks
0 issues

Commits

List of commits on branch main.
Unverified
2cd8e89ec2b64506f775951870c89f62f0990b8e

Update setup

jjohnsutor committed 3 years ago
Unverified
ddc36620b4ee88a8053477065fe37ec05e0e2d93

Add full path to background loader;Add search for plain executable in leopardi

jjohnsutor committed 3 years ago
Unverified
f7e22702650ea3cea1d6621ca43a18006bd6b7d8

Add iterate mode to camera

jjohnsutor committed 4 years ago
Unverified
1eae2e7dd2366f4da30c8ee74e21b4c6042cd3c9

Fix .obj loading

jjohnsutor committed 4 years ago
Unverified
d6ef095a01276cc51482ac9842a79ccea5b9d4b1

Fix issues with icosphere and fibonacci angle modes

jjohnsutor committed 4 years ago
Unverified
18c276811699adddb89fc616a1a2cc4f2c62c2c7

Add setup.py

jjohnsutor committed 4 years ago

README

The README file for this repository.

Leopardi

An extensible library for generating 3D synthetic data with Blender that just works. Requires Python >= 3.0, Blender >= 2.80

NEW Check out our new documentation website here

Leopardi aims to make it easy to create robust synthetic images by importing scenes into Blender. It takes care of the boring, strenuous, and difficult stuff so that you can devote your time to training and evaluating your machine learning models.

NOTE: Leopardi is currently in a pre-alpha change. Breaking changes (though unlikely) may occur.

Installation

pip install leopardi 

Backgrounds

Backgrounds are imported from a specified directory (which defaults to ./backgrounds/) and merges them with the rendered image.

Camera

The Leopardi Camera extends Blender's default camera with a variety of options for choosing camera location, lens size, sensor size, and more.

Models

Similarly to backgrounds, models are imported from a specified directory (which defaults to ./models/) and are used to render a synthetic image.

Renderer

The renderer allows for specifying which labels to generate to accompany an image, which Blender rendering engine to use, as well as the resolution of the rendered images.

Examples

Below is a dead-simple demonstration of working with Leopardi on Windows to generate a single render.

import leopardi

BLENDER_DIR = "C:\Program Files\Blender Foundation\Blender 2.92"

camera = leopardi.LeopardiCamera()
lighting = leopardi.LeopardiLighting()
renderer = leopardi.LeopardiRenderer()
model_loader = leopardi.ModelLoader()
background_loader = leopardi.BackgroundLoader()

engine = leopardi.Leopardi(camera, lighting, renderer, background_loader, model_loader)
engine.render(1)

If we want to include a depth map and YOLO annotations with our renders, we do so as below

import leopardi

BLENDER_DIR = "C:\Program Files\Blender Foundation\Blender 2.92"

camera = leopardi.LeopardiCamera()
lighting = leopardi.LeopardiLighting()
renderer = leopardi.LeopardiRenderer(labels=["DEPTH", "YOLO"])
model_loader = leopardi.ModelLoader()
background_loader = leopardi.BackgroundLoader()

engine = leopardi.Leopardi(camera, lighting, renderer, background_loader, model_loader)
engine.render(1)