The Flamingo toolbox is an open-source toolbox for image segmentation, classification and rectification. It is developed by the Department of Hydraulic Engineering of Delft University of Technology for coastal image analysis. The toolbox is built around the scikit-image, scikit-learn, OpenCV and pystruct toolboxes.
Flamingo is developed and maintained by:
The toolbox can be found at http://github.com/openearth/flamingo.
Several command-line functions are supplied with the toolbox for batch processing of large datasets. Each command-line function serves a specific part of the image analysis. See for more information the –help option of each command.
Ortho-rectify images based on ground control points (GCP)
-h, --help | show this help message and exit |
--dist-model=NAME | |
name of distortion model to use [default: OPENCV] | |
--dist-coefs=VALUES | |
coefficients used for distortion model [default: 0,0,0,0] | |
--size=SIZE | size of output figure [default: 30,20] |
--rotation=ANGLE | |
rotate resulting image [default: 0] | |
--translation=DIST | |
translate resulting image [default: 0,0] | |
--maxdistance=DIST | |
maximum distance from origin included in plot [default: 1e4] | |
--verbose | print logging messages |
Train, score and use classification models on image datasets.
-h, --help | show this help message and exit |
--segmentate | create segmentation of images |
--channels | include channel extraction |
--features | include feature extraction |
--extract | extract channels/features |
--update | update channels/features |
--normalize | normalize channels/features |
--relloc | include relative location features |
--relloc_maps | compute new relative location maps |
--n=N | number of partitions [default: 5] |
--frac=FRAC | fraction of images used for testing [default: 0.25] |
--type=NAME | model type to train [default: LR] |
--partitions=N | only train these partitions |
--model=NAME | name of model to be scored, uses last trained if omitted |
--images=FILE | images to include in process |
--config=FILE | configuration file to use instead of command line options |
--overwrite | overwrite existing files |
--verbose | print logging messages |
The toolbox uses a file system structure for the analysis of datasets. The flamingo.filesys module takes care of any reading and writing of files in this file structure. Each dataset is stored in a single directory and can consist out of the following file types:
Read list of uniquely defined classes in dataset
Read features from a collection of export files including only selected feature blocks
Read a model from export file including meta data
Write contents to export file
Write features to a collection of export files depending on their feature block
Only the very basic options of the toolbox are exposed through the command-line functions. For the full extent of options a configuration file is used. This configuration file is parsed by the flamingo.config module. The module also supplies wrappers for the automated updating of a function call based on the configuration file used.
Configuration constants for classification toolbox
Get relevant function arguments given a configuration file
Wrapper for parsing config file for specific function call
Read configuration file and update default settings
Write configuration file
[channels]
enabled = True
methods = ["gabor", "gaussian", "sobel"]
methods_params = {"frequencies": [0.05, 0.15, 0.25], "sigmas": [1, 8, 15], "thetas": [0.0, 0.785, 1.571, 2.356]}
[segmentation]
remove_disjoint = True
extract_contours = False
enabled = True
method = slic
method_params = {}
[relative_location]
sigma = 2
enabled = False
n = 100
[features]
feature_blocks = all
enabled = True
blocks_params = {}
[score]
[train]
partitions = all
[partition]
n_partitions = 5
force_split = False
enabled = True
frac_test = 0.25
frac_validation = 0.0
[regularization]
c = [0.1, 1.0, 10.0, 100.0, 1000.0, 10000.0]
partition = 0
[general]
model_type = LR
colorspace = rgb
class_aggregation =
model_dataset =
The Flamingo toolbox is developed at Delft University of Technology with support from the ERC-Advanced Grant 291206 – Nearshore Monitoring and Modeling (NEMO), STW Grant 12686 – Nature-driven Nourishments of Coastal Systems (NatureCoast), S1: Coastal safety and Deltares.