Skip to main content

Leopardi

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

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.

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)

Release files for leopardi 0.2.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leopardi 0.2.24
File Size Uploaded
leopardi-0.2.24.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leopardi 0.2.24
File Interpreter ABI Platform
leopardi-0.2.24-py3-none-any.whl Python 3 none any Details

Total release size: 44.4 kB

Release files / leopardi-0.2.24.tar.gz

Download URL leopardi-0.2.24.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0074d015993ac7eef4ffa04e09c290bdaa3aede1f479fef31404599b15798a56
BLAKE2b-256 checksum
How to use checksums
a45b76cbd4a7889a29c015adf32ec4aff48209c19fe126340b13f9b774b69a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.8

Release files / leopardi-0.2.24-py3-none-any.whl

Download URL leopardi-0.2.24-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2f042ca9455f190d310f26f9672a077a035d9cff501144125e0736fbd95b3ef
BLAKE2b-256 checksum
How to use checksums
47d0d34a7c470571584c160f0e94e503d5c00708bde98b5f22c7f3d87c842bc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.8

Release history Release notifications | RSS feed

This release

0.2.24 This release

2 release files

0.2.23

2 release files

0.2.22

1 release file

0.2.21

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page