The source code of the publication :Image-based high-throughput field phenotyping of crop roots"
Pull request Compare This branch is 10 commits behind Computational-Plant-Science:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


DIRT 1.1 - An automatic high throughput root phenotyping platform
(c) 2014 Alexander Bucksch -
Web application by Abhiram Das -

User and developer group:!forum/dirt-users

Georgia Institute of Technology

The software is written and tested in:
- python 2.7 (

The software depends on:
- the graphtools package ( 
- the mahotas package (
- the numpy package (
- the scipy package (

Optionally binaries of standard OCR and BarCode software can be used for tag recognition:

- tesseract (
paths have to be adjusted in /DIRTocr/ (line 12-14)

- zbar ( 
path has to be adjusted in /DIRTocr/ (line 28)

<run file path> full path to the root image
<unique id> ID which will be a folder name in the working directory. Integer value needed.
<mask threshold> multiplier for the automatically determined mask threshold. 1.0 works fine and is default. For example, if a flashlight is used to take root images, then 0.6 is a good choice.
<excised roots> number of roots placed at the right of the root crown, 0 - excised root analysis is off
<crown root> 1 - crown root analysis is on, 0 - crown root analysis is off
<segmentation> 1 -  is on, 0 - is off. Off refers to a pre-existing segmention done with DIRT. Binary masks as input images are detected automatically.
<marker diameter> a simple decimal e.g. 25.4. If 0.0 is used, then the output will have pixels as unit.
<stem reconstruction> 1 - reconstruction is turned on, 0 - reconstruction is turned off
<plots> 1 - plotting data is stored, 0 - plotting data is not stored
<output format> 1 - the full trait set is put into one excel file containing empty cells for traits that were not computed, 0 - only computed files are written to the output file
<working directory> full path to folder were the result is stored
<trait file path> full path to .csv file containing the traits to be computed'

python /Documents/image_name.jpg 8 25.0 1 1 1 25.1 0 0 0 /Documents/image_folder/ /Documents/traits.csv

Notes on common questions:
- Input is restricted to .jpg, .png and .tif images
- It is not possible to analyze only an excised root when a root crown is in the image. However, it is possible to analyze compute images containing only excised roots.


For convenience we provide the runOnFolder script, that executes DIRT on all images in a specified folder. 
Note we made the masking threshold available on the command line because of user requests.

Example: python /Users/image_folder/ <masking threshold>

Please adjust line 86 according to the description above and note that the script uses 6 cores to compute images in parallel. The number of cores can be adjusted in line 80.


Updates in DIRT 1.1 (4 November 2015):
- Minor bug fixes in the excised root calculations. Thanks to Alexandre Grondin (U Nebraska) for discovering and validating the fixes.

Changes in DIRT 1.1 (14 January 2015):
- storage of trait values is changed from a list data structure to a dictionary to allow trait selection controlled by the file traits.csv
- added support for trait selection to reduce computation time. See example file traits.csv (1 - trait is computed, 0 - trait is not computed)
- removed unused tip-diameter switch on the command line
- add stem reconstruction switch on the command line to turn the experimental stem reconstruction on/off
- output file now uses the codes in the trait.csv file and only contains selected traits
- removed several unused variables and minor bugs fixed
- added command line option to turn storage of numpy arrays on/off. These files can be used to plot the individual root statistics and can be found in the "Plots" folders.
- new (experimental, not validated) traits added due to community requests: projected root area, width and depth of the skeleton (medial axis), top and bottom angle for monocots, segmentation of adventious and basal roots for legumes to retrieve taproot and hypocotyl diameter and adventious and basal root counts.
- added computational statistics such as computation time and graph size to help balancing grid installations
- added an option to have an output file with all possible traits that contains empty cells for not computed traits in the output.csv file. This was a developer request to enable faster ingestion into data bases