Skip to main content

A pipeline for generating synthetic production line images

Reason this release was yanked:

Incomplete README, please use version 0.1.5

Project description

BlenderLine

GPLv3 Blender Blender GPLv3

Workflow

1. Table of Contents

Table of Contents

2. Description

Coming soon!

3. Features

  • Flexible: BlenderLine imposes as little constraints on your 3D modeling workflow as possible, giving you the freedom to model your production line as you see fit.
  • Declarative: Instead of having to write the generation code yourself, BlenderLine enables you to define the desired behavior of objects on your production line using declarative configuration files.
  • Powerful: Despite using declarative configuration files, BlenderLine is powerful enough to support a wide variety of use cases, ranging from narrow bottle counting lines (see examples/example_beer) to wide conveyor belts (example planned).
  • Convenient: BlenderLine includes tools to easily convert generated datasets into common computer vision dataset formats:
    • yolo_detection
    • yolo_segmentation (planned)
    • coco_detection (planned)
    • coco_segmentation (planned)

4. Installation

The simplest way to install BlenderLine is using pip:

pip install blenderline

Alternatively, you can choose to clone the repository to make a local pip installation:

git clone https://github.com/maxvandenhoven/blenderline
cd blenderline
pip install -e .

Note that, by default, BlenderLine assumes that Blender is installed and available on your system PATH, meaning that the Blender CLI can be invoked using only the blender command. The platform-dependent documentation below can help you add Blender to your system PATH:

Alternatively, you can use the optional --blender argument in blenderline generate to specify where Blender is installed on your system.

5. Usage

Generate Images

The blenderline generate command is used to generate a dataset of synthetic images from a configuration file. You can test BlenderLine with the provided examples/example_beer/images.json example as follows:

blenderline generate --config examples/example_beer/images.json --target data/raw

This will generate a dataset with the following structure:

data/
+- raw/
   +- example_beer/
      +- train/
      |  +- 0/
      |  |  +- image__f0825a6262fc__0001.png
      |  |  +- mask__0__8acdea079f10__0001.png
      |  |  +- mask__1__0181a303d637__0001.png
      |  |  +- ...
      |  +- 1/
      |     +- image__7abe7f02c7d9__0001.png
      |     +- mask__1__19abef8a5cef__0001.png
      |     +- mask__1__d980d4a83682__0001.png
      |     +- ...
      +- valid/
      |  +- 0/...
      |  +- 1/...
      +- label_mapping.json

While not strictly necessary, setting --target data/raw will create a folder structure that allows you to track different versions of the data, e.g., after using the blenderline convert command.

Note that the dataset root folder (here named example_beer) contains subfolders for different splits defined in the configuration file. Each split contains a numbered list of instance folders, each containing a rendered image and a set of masks. An example instance might look as follows: Example instance

Image and mask files use the following naming convention:

image__<random image ID>__0001.png
mask__<class ID>__<random mask ID>__0001.png
Convert Dataset

Coming soon!

6. Roadmap

Version Features
v0.1.0 (current) Image generation pipeline + CLI interface
v0.2.0 YOLO detection conversion pipeline + CLI interface
v0.3.0 Documentation + tutorial + second example
v0.4.0 YOLO segmentation conversion pipeline + CLI interface
v0.5.0 COCO detection conversion pipeline + CLI interface
v0.6.0 COCO segmentation conversion pipeline + CLI interface

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blenderline-0.1.1.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

blenderline-0.1.1-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file blenderline-0.1.1.tar.gz.

File metadata

  • Download URL: blenderline-0.1.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for blenderline-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b966a3f009e9c743fc8d044af6d0a2c00b6e4774f17b5160b442f564b3882cff
MD5 0b9c5c6c33e05c25196ad7c11bda5ba1
BLAKE2b-256 59d22bbe716f5f73c00b735bdb881e251e1589a731a332950455dcb4f05cfddd

See more details on using hashes here.

Provenance

File details

Details for the file blenderline-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: blenderline-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for blenderline-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10fa4c0dee76a688412c54c46e527b3f8549f0fb4a3b0403d4ccf71aa05930a6
MD5 679dbb2a13bb70a93d3d526073f00f20
BLAKE2b-256 9b4773702882b630edff2cab5e389f4a809c3be10ff01beac30fca331c4ec9c6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page