Package: blenderline
1. Table of ContentsTable of Contents1. Table of Contents2. Description3. Overview4. Features5. Installation6. Usage7. Roadmap2. DescriptionBlenderLine is an open-source tool for generating synthetic image data for object detection, segmentation, and counting tasks in manufacturing settings. Leveraging 3D CAD models commonly found in manufacturing plants, BlenderLine automatically generates large and diverse datasets with pixel-perfect labels, reducing the time and effort traditionally required for manual data collection and annotation.3. Overview4. FeaturesFlexible: 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 (seeexamples/example_beer) to wide conveyor belts (example planned).Convenient: BlenderLine includes tools to easily convert generated datasets into common computer vision dataset formats:yolo_detectionyolo_segmentation(planned)coco_detection(planned)coco_segmentation(planned)5. InstallationThe simplest way to install BlenderLine is using pip:pip install blenderlineAlternatively, 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 systemPATH, meaning that the Blender CLI can be invoked using only theblendercommand. The platform-dependent documentation below can help you add Blender to your systemPATH:WindowsMacOSLinuxAlternatively, you can use the optional--blenderargument inblenderline generateto specify where Blender is installed on your system.6. UsageGenerate ImagesTheblenderline generatecommand is used to generate a dataset of synthetic images from a configuration file. You can test BlenderLine with the providedexamples/example_beer/images.jsonexample as follows:blenderline generate --config examples/example_beer/images.json --target data/rawThis 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.jsonWhile not strictly necessary, setting--target data/rawwill create a folder structure that allows you to track different versions of the data, e.g., after using theblenderline convertcommand.Note that the dataset root folder (here namedexample_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:Image and mask files use the following naming convention:image__<random image ID>__0001.png
mask__<class ID>__<random mask ID>__0001.pngConvert DatasetComing soon!7. RoadmapVersionFeaturesv0.1.0 (current)Image generation pipeline + CLI interfacev0.2.0YOLO detection conversion pipeline + CLI interfacev0.3.0Documentation + tutorial + second examplev0.4.0YOLO segmentation conversion pipeline + CLI interfacev0.5.0COCO detection conversion pipeline + CLI interfacev0.6.0COCO segmentation conversion pipeline + CLI interface