Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Code to accompany the IAMPS 2019 paper "Toward a procedural fruit tree rendering framework for image analysis"

Source code authors : Thomas Duboudin, Maxime Petit, Sridhar Ragupathi, Liming Chen

This code allows you to reproduce the results of the IAMPS 2019 paper "Toward a procedural fruit tree rendering framework for image analysis".

Installation instructions

(On Ubuntu 18.04)

1 - Download and install Blender ( We are aware of problems with the gpu-rendering options on Blender 2.79b, thus, by default, it's the CPU rendering that is enabled. It's possible to switch the option to GPU in the scene generation scripts, at the end of each of the scripts. To enable GPU-rendering, follow this link :

2 - Install the Blender Add-on "Sapling Tree Gen". To do so, go to "File" -> "User preferences" -> "Add-ons" and search for "Sapling Tree Gen" in the research toolbar. Click on the tick-box and save the setting at the bottom of the window.

3 - Install the "spacetree" Add-on, to do so : go to and follow the installation instructions. It's an older Add-on no longer by default on Blender, you'll need to download a zip file and import it in Blender.

4 - (if needed) Download the textures and additional files from the following links and put them in the corresponding folder. There is already a few files for a plug-and-play example :

-- HDRIs (360° high-resolution background image) :

-- Leaves textures :,

-- Bark texture :

-- Fruit 3D models & texture :,

5 - Clone the repository.

6 - Open the Blender GUI and choose the "Scripting" panel configuration (in the top toolbar, next to "Help", it should be at default initially).

7 - Open the scene generation script and launch it.

8 - Open the rendering script and launch it.

Some examples of generated images

Random Images

Real (bottow row) vs Fake (top row) Images

Variations in Images (day/night, backround, pow)


==> You can change the rendering parameters and the scene parameters in the corresponding scripts. In particular, if you're designing a new tree model, don't forget to change the camera movement parameters (the inner box for the empty element and the outer cylinder for the camera).

==> If you're needing more blender knowledge, check the tutorials by Blender Guru. We believe at least some low level of knowledge is required to be able to use and modify the scripts, in particular to understand some of the Blender API functions.

==> We cannot easily make sure that the leaves are attached to the branches by their tails, nor that there won't be fruits and leaves intersecting themselves. This is linked to the fruits and leaves generation as random particles on the tree structure. We do not believe it is going to be a major issue with our data, since complete photorealism does not seem to be needed (cf paper) for deep learning. Besides, there is a trade-off between the time spent designing a model and the amout of variations we can put in the rendered images.

==> The two scene generation scripts are using a different Blender Add-on. There are more options and customizations available in the script (such as different kinds of leaves on the same tree, slightly differents fruits).


This work is supported by the french National Research Agency (ANR), through the ARES labcom (grant ANR 16-LCV2-0012-01) and by the CHIST-ERA EU project "Learn-Real".


The given HRDI :

The given leaves textures :,,,,

The given bark texture :

The given orange object :

The given apple object :


Code to accompany the IAMPS 2019 paper "Toward a procedural fruit tree rendering framework for image analysis"







No releases published


No packages published