Project configuration#

The configuration of a project is managed via .ini files.

For each project there needs to be a project config file, located in the project dir.

For starters, a project will inherit all default settings from the project_defaults.ini file, which is included in the orthoseg installation and is not supposed to be changed.

In addition, you can create additional .ini files to combine shared settings so you can minimize the amount of settings you need to specify/copy-paste in your project config files.

The configuration used for an orthoseg project is loaded in the following order:

  1. the project defaults as “hardcoded” in the orthoseg package (project_defaults.ini)

  2. any .ini files specified in the general.extra_config_files_to_load key in your project config file, in the order specified.

  3. the keys in your project config file.

Keys specified in a config file loaded later in the order above overrule the corresponding key values specified in a previously loaded config file.

[general]#

General settings.

general.extra_config_files_to_load#
Type:
string or list of strings
Default:
""

Extra config files to load for the project.

They will be loaded in the order specified and can be specified one path per line, comma seperated.

Only the extra_config_files_to_load key of the .ini file being passed to orthoseg is used. If .ini files referenced in extra_config_files_to_load also define an extra_config_files_to_load key, it will be ignored.

If a relative path is used it will be resolved towards the parent dir of the project config file.

Example:

# Load a single extra config file to overrule defaults before this one.
# If project_defaults_overrule.ini contains an `extra_config_files_to_load` key,
# it will be ignored.
extra_config_files_to_load = ../project_defaults_overrule.ini

# Load two extra config files to overrule defaults before this one.
extra_config_files_to_load =
    ../project_defaults_overrule.ini,
    ./sportsfields-sample.ini
general.segment_subject#
Type:
str
Default:
MUST_OVERRIDE

The subject that will be segmented.

This value must be overruled in the project specific config file.

general.ssl_verify#
Type:
bool
Default:
True

Specify the way certificates of ssl requests are verified.

Options:

  • True: use the default certificate bundle as installed on your system

  • False: disable certificate validation (NOT recommended!)

  • path to a certificate bundle file (.pem) to specify the certificate bundle to be used. In corporate networks using a proxy server this is often needed when requests give CERTIFICATE_VERIFY_FAILED errors.

general.nb_parallel#
Type:
int
Default:
-1

Specify the number of cpu’s to use while doing heavy processing.

If -1, it uses all available processors.

[download]#

Settings regarding the download action.

download.cron_schedule#
Type:
str (cron schedule)`
Default:
None

Schedule to control when images can be downloaded.

The schedule is specified in cron format, which is a string with 5 fields separated by spaces: minute, hour, day of month, month, day of week. Each field can be either a single value, a range of values, a list of values, a list of ranges, or a wildcard (*).

If no schedule is specified there is no time limitation.

Example:

# Images are fetched every day, but only from 16:00 till 8:59. cron_schedule = * 16-23,0-8 * * *

[model]#

Settings concerning the model you want to use for the segmentation.

model.architecture_id#
Type:
int
Default:
0

The id of the architecture used.

Only needs to be changed if you want to compare the results of different architectures on the same training data, bacause orthoSeg will only train one model per traindata_id, architecture_id and hyperparams_id.

If the architecture_id is 0, it won’t be included in the file name of trained models.

model.architecture#
Type:
str
Default:
inceptionresnetv2+unet

The segmentation architecture to use.

The architectures currently supported by orthoseg follow the encoder-decoder principle:

  • encoder: a (deep) neural network that detects features on object level

  • decoder: a (deep) neural network that converts the detected features on object level to a segmentation on pixel level

To configure an encoder/decoder architecture, specify it in the following way: architecture = {encoder}+{decoder}

The supported encoder and decoders can be found in Finetune your project.

model.nb_channels#
Type:
int
Default:
3

The number of channels of the images to train on.

[train]#

Settings concerning the train process.

train.preload_with_previous_traindata#
Type:
bool
Default:
False

Preload model -> only overrule in local_overrule.ini.

train.force_model_traindata_id#
Type:
int
Default:
-1

Force to use a model trained on this traindata version (-1 to disable).

train.resume_train#
Type:
bool
Default:
False

When training, resume training on the current best existing model.

train.force_train#
Type:
bool
Default:
False

Train a model, even if a model exists already.

train.trainparams_id#
Type:
int
Default:
0

The id of the set of hyper parameters to use while training.

Needs to be changed if you want to compare the results of different hyperparameter sets on the same training data because orthoSeg will only train one model per traindata_id, architecture_id and trainparams_id.

If the hyperparams_id is 0, it won’t be included in the file name of trained models.

train.image_pixel_width#
Type:
int
Default:
512

The width of the images to train on in pixels.

Note

The keys image_pixel_width, image_pixel_height, image_pixel_x_size and image_pixel_y_size will determine the size the label location boxes will need to be digitized.

E.g. if image_pixel_width = 512 and image_pixel_x_size = 0.25, the boxes need to be 512 pixels * 0.25 meter/pixel = 128 meter wide.

Note

For some model architectures there are limitations on the image sizes supported. E.g. if you use the linknet decoder, the images pixel width and height has to be divisible by factor 32.

train.image_pixel_height#
Type:
int
Default:
512

The height of the images to train on in pixels.

train.image_pixel_x_size#
Type:
float
Default:
0.25

The size of a pixel in the x direction.

The size is in the units of the coordinate system the layer is in. This will in most cases be in meters.

train.image_pixel_y_size#
Type:
float
Default:
0.25

The size of a pixel in the y direction.

The size is in the units of the coordinate system the layer is in. This will in most cases be in meters.

train.labelpolygons_pattern#
Type:
str
Default:
${dirs:labels_dir}/${general:segment_subject}_{image_layer}_polygons.gpkg

Pattern how the file paths of the polygons label files should be formatted.

The image_layer to get the images from is extracted from the file path. Hence, the image layer will need to be configured in the Image Layers Configuration.

train.labellocations_pattern#
Type:
str
Default:
${dirs:labels_dir}/${general:segment_subject}_{image_layer}_locations.gpkg

Pattern how the file paths of the locations label files should be formatted.

The image_layer to get the images from is extracted from the file path. Hence, the image layer will need to be configured in the Image Layers Configuration.

train.labelname_column#
Type:
str
Default:
classname

Column where the labels for each training polygon is available.

For backwards compatibility, if the column name configured here is not available, column “label_name” is used if it exists.

train.label_datasources#
Type:
dict
Default:
None

The datasources to use for the train labels.

Typically, this property does not need to be set, as the datasources used for training are found automatically in the dirs.labels_dir via the patterns specified in train.labelpolygons_pattern and train.labellocations_pattern.

However, this property can be used to add label datasources in addition to the ones found via the patterns.

The datasources are specified in a dict of dicts, with the datasource names as keys and for each datasource a dict with the following properties as value:

locations_path: the file path to the label locations file of this datasource. polygons_path: the file path to the label polygons file of this datasource. image_layer: the image layer to use for this datasource. pixel_x_size: the size of a pixel in the x direction for this datasource. pixel_y_size: the size of a pixel in the y direction for this datasource.

It is also possible to overrule properties of label datasources found via the patterns. In this case, (only) the locations_path is mandatory and it will be used to link the datasource here with the corresponding one found via the patterns. All other properties specified will overrule the default values for this datasource found via the patterns. The properties that can be overruled are:

  • pixel_x_size: overrules train.image_pixel_x_size for this datasource.

  • pixel_y_size: overrules train.image_pixel_y_size for this datasource.

  • image_layer: overrule the image layer found in the file path of the locations file for this datasource.

It is possible to specify the same file multiple times as datasource. This way, the same locations/polygons files can be used multiple times to train the model. This can be used to train the model in multiple resolutions.

Note that even though it is also possible to overrule the image layer, typically the train polygons will be digitized for/on a specific image layer. Hence, overruling the image layer most often won’t make sense.

Example:

# Add overrules for the "..._BEFL-2019_locations.gpkg" train locations file found
# in :confval:`dirs.labels_dir` so the train locations/polygons will be used twice
# for training: once in 0.5 meter/pixel and once in 0.25 meter/pixel
label_datasources = {
   "label_2019_res1": {
      "locations_path": "${dirs:labels_dir}/${general:segment_subject}_BEFL-2019_locations.gpkg",
      "pixel_x_size": 0.5,
      "pixel_y_size": 0.5,
   },
   "label_2019_res2": {
      "locations_path": "${dirs:labels_dir}/${general:segment_subject}_BEFL-2019_locations.gpkg",
      "pixel_x_size": 0.25,
      "pixel_y_size": 0.25,
   }
}
train.image_augmentations#
Type:
dict
Default:
see description

Default value:

{
    "fill_mode": "constant",
    "cval": 0,
    "rotation_range": 359.0,
    "width_shift_range": 0.05,
    "height_shift_range": 0.05,
    "zoom_range": 0.1,
    "brightness_range": [
        0.95,
        1.05
    ]
}

The augmentations to apply to the input images during training.

Remarks:

  • the default value for cval is 0, which means that areas outside the image after rotation/translation/zoom will be filled with value 0 (black). If your subject can have area’s that are black and need to be detected, you might want to set cval to e.g. 255 (white).

  • for orthoseg >= 0.8, rescaling should be handled by the default preprocess_input function of the model (architecture) if needed, so using ‘rescale’ augmentation is not allowed anymore.

train.mask_augmentations#
Type:
dict
Default:
see description

Default value:

{
    "fill_mode": "constant",
    "cval": 0,
    "rotation_range": 359.0,
    "width_shift_range": 0.05,
    "height_shift_range": 0.05,
    "zoom_range": 0.1,
    "brightness_range": [
        1.0,
        1.0
    ]
}

The augmentations to apply to the label masks during training.

Remarks:

  • the number of randomized values must be the same as for the image, otherwise the random augentation factors aren’t the same as the image!

  • augmentations to translate, rotate,… should be the same as for the image!

  • the mask generally shouldn’t be rescaled!

  • cval values should always be 0 for the mask, even if it is different for the image, as the cval of the mask refers to these locations being of class “background”.

train.classes#
Type:
dict
Default:
see description

Default value:

{
    "background": {
        "labelnames": [
            "ignore_for_train",
            "background"
        ],
        "weight": 1
    },
    "${general:segment_subject}": {
        "labelnames": [
            "${general:segment_subject}"
        ],
        "weight": 1
    }
}

The classes to be trained to.

They should be specified using a dictionary with the class names to be detected as keys. For each class following properties need to be specified:

  • a list of label names in the training data to use for this class. Because this is a list, you can easily map multiple label names in the training data to the same class.

  • the weight to use for the class when training

The class name “background” is mandatory and is reserved for the background class.

train.batch_size_fit#
Type:
int
Default:
6

The batch size to use during fit of model.

A proper value depends on available hardware, model used and image size.

train.batch_size_predict#
Type:
int
Default:
20

The batch size to use while predicting in the train process.

A proper value depends on available hardware, model used and image size.

train.weights_type#
Type:
str
Default:
aerial_if_available

The type of pretrained weights to initialize the model with.

Options are:

  • aerial: the entire model (except the top layer) is initialized with weights that were the result of training the model on aerial images. These weights are only available for a limited number of model architectures. If they are not available for the model.architecture configured, an error is raised. The supported architectures are: inceptionresnetv2+unet, mobilenetv2+linknet.

  • imagenet: use imagenet pretrained weights for the encoder/backend of the model. The segmentation head/decoder is initialized with random weights.

  • aerial_if_available: use aerial pretrained weights if they are available for the architecture configured, otherwise use imagenet pretrained weights.

  • None: if you specify an empty weights_type key, no pretrained weights are used.

Note

You can also specify your own pretrained weights by putting them in the dirs.weights_dir and specifying your own custom weights type here. The file name of the weights file needs to follow the following format: {architecture}_{weights_type}_notop.weights.h5, e.g. inceptionresnetv2+unet_customweights_notop.weights.h5. You can use the segmodels_keras.utils.save_model_weights_notop function to save the weights of an existing model in the correct format.

train.optimizer#
Type:
str
Default:
None

Optimizer to use for training.

You can specify any optimizer supported by keras (case-sensitive!): https://keras.io/3/api/optimizers/.

For keras >= 3, AdamW is the default because it gives slightly better results. For keras 2, Adam is the default because AdamW gives an error when training starts.

train.optimizer_params#
Type:
dict
Default:
see description

Default value:

{
    "learning_rate": 0.0001
}

Parameters to use for the optimizer.

train.loss_function#
Type:
str
Default:
None

Loss function to use.

If not specified, the defaults are:

  • For keras 3+: categorical_focal_crossentropy

  • For keras <3:
    • If weights specified in the classes: weighted_categorical_crossentropy

    • If no weights are specified: categorical_crossentropy

train.monitor_metric#
Type:
str
Default:
({one_hot_mean_iou}+{val_one_hot_mean_iou})/2

The metric(s) to monitor to evaluate which network is best during training.

This can be a single metric or a formula with placeholders to calculate a value based on multiple metrics. Available metrics:

  • one_hot_mean_iou: intersection over union on the training dataset

  • val_one_hot_mean_iou: intersection over union on the validation dataset

  • categorical_accuracy: accuracy on the training dataset

  • val_categorical_accuracy: accuracy on the validation dataset

train.monitor_metric_mode#
Type:
str
Default:
max

The mode of the monitor metric.

Use max to keep the models with a high monitor_metric. Otherwise use min.

train.save_format#
Type:
str
Default:
None

Format to save the trained model in.

Options are keras, h5 or tf. The keras format is only supported for keras >= 3. Defaults to keras for keras >= 3 and to h5 for older versions.

train.save_best_only#
Type:
bool
Default:
True

True to only keep the best model during training.

train.save_min_accuracy#
Type:
float
Default:
0.80

The minimum accuracy to save the model.

Set to 0 to always save the model.

train.nb_epoch_with_freeze#
Type:
int
Default:
5

Number of epochs to train with the pretrained layers frozen.

Keeps pretrained layers intact, which is useful for the first few (2-10) epochs when big adjustments are made to the untrained layers of the network. For architectures with pretrained weights available for the entire model, the default (5) is often sufficient. For architectures with pretrained weights only for the encoder, covergence is slower and values up to 20 can be useful. Training is also 20% faster during the epochs with frozen layers.

train.max_epoch#
Type:
int
Default:
1000

Maximum number of epochs to train.

These epochs are in addition to nb_epoch_with_freeze.

train.earlystop_patience#
Type:
int
Default:
100

Stop training after this number of epochs without improvement.

Not having improvement means the earlystop_monitor_metric hasn’t improved.

train.earlystop_monitor_metric#
Type:
str
Default:
one_hot_mean_iou

Metric to use to determine that the model doesn’t improve.

Options are: categorical_accuracy, one_hot_mean_iou

train.earlystop_monitor_metric_mode#
Type:
str
Default:
max

The mode of the earlystop metric.

Use max if the monitor_metric should be high. Otherwise use min.

train.log_tensorboard#
Type:
bool
Default:
False

True to activate tensorboard style logging.

train.log_csv#
Type:
bool
Default:
True

True to activate csv logging.

train.save_augmented_subdir#
Type:
str
Default:
None

Subdir name to save augmented images to while training.

This should only be used for debugging purposes as it can take a lot of disk space and slow down training.

[predict]#

Settings concerning the prediction process.

predict.batch_size#
Type:
int
Default:
4

The batch size to use while predicting.

A proper values depends on available hardware, model used and image size.

predict.image_layer#
Type:
str
Default:
MUST_OVERRIDE

The image layer to use for the prediction.

The image layer needs to be an existing layer in imagelayers.ini.

predict.image_pixel_width#
Type:
int
Default:
2048

Image width in pixels to use when running a prediction.

Note

For some model architectures there are limitations on the image sizes supported. E.g. if you use the linknet decoder, the images pixel width and height has to be divisible by factor 32.

predict.image_pixel_height#
Type:
int
Default:
2048

Image height in pixels to use when running a prediction.

predict.image_pixel_x_size#
Type:
float
Default:
0.25

The size of a pixel in the x direction.

The size is in the units of the coordinate system the layer is in. This will in most cases be in meters.

predict.image_pixel_y_size#
Type:
float
Default:
0.25

The size of a pixel in the y direction.

The size is in the units of the coordinate system the layer is in. This will in most cases be in meters.

predict.image_pixels_overlap#
Type:
int
Default:
128

The number of pixels to overlap between the image tiles for prediction.

This is needed to avoid edge effects in the prediction. The optimal value depends on the amount of context needed to accurately segment the subject involved. E.g. for small opjects to be segmented, typically a smaller overlap will be enough, while for large objects, a larger overlap might be needed.

predict.min_probability#
Type:
float
Default:
0.5

The minimum probability for a pixel to be attributed to a class.

If the probability for all classes is below this threshold, the pixel will be attributed to the background.

Possible values are from 0.0 till 1.

predict.max_prediction_errors#
Type:
int
Default:
100

Maximum errors that can occur during prediction before stopping the process.

predict.filter_background_modal_size#
Type:
int
Default:
0

Apply a filter to the background pixels and replace background by the most occuring value in a rectangle around the background pixel of the size specified.

predict.reclassify_to_neighbour_query#
Type:
str
Default:
None

Query to specify polygons to be reclassified.

All detected polygons that comply to the query provided will be reclassified to the class of the neighbour with the longest border with it.

The query need to be in the form to be used by pandas.DataFrame.query() and the following columns are available to query on:

  • area: the area of the polygon, as calculated by GeoSeries.area .

  • perimeter: the perimeter of the polygon, as calculated by GeoSeries.length .

  • onborder: 1 if the polygon touches the border of the tile being predicted, 0 if it doesn’t. It is often useful to filter with onborder == 0 to avoid eg. polygons being reclassified because they are small due to being on the border.

Example:

reclassify_to_neighbour_query = (onborder == 0 and area <= 5)

predict.simplify_algorithm#
Type:
str
Default:
LANG+

Algorithm to use for vector simplification.

The simplification configured here will be executed on the fly during the prediction. Options are:

  • RAMER_DOUGLAS_PEUCKER:
    • simplify_tolerance: extra, mandatory key: specifies the distance tolerance to be used.

  • VISVALINGAM_WHYATT:
    • simplify_tolerance: extra, mandatory key: specifies the area tolerance to be used.

  • LANG: gives few deformations and removes many points
    • simplify_tolerance: extra, mandatory key: specifies the distance tolerance to be used.

    • simplify_lookahead: extra, mandatory key: specifies the number of points the algorithm looks ahead during simplify.

  • LANG+: gives few deformations while removeing the most points.
    • simplify_tolerance: extra, mandatory key: specifies the distance tolerance to be used.

    • simplify_lookahead: extra, mandatory key: specifies the number of points the algorithm looks ahead during simplify.

  • If simplify_algorithm is not specified, no simplification is applied.

predict.simplify_tolerance#
Type:
str
Default:
${image_pixel_x_size}*1.5

Tolerance to use for the on-the-fly simplification during the prediction.

Remark: you can use simple math expressions, eg. 1.5*5

predict.simplify_lookahead#
Type:
int
Default:
8

The number of points to look ahead during simplify.

Only applicable for the LANG algorithm.

predict.simplify_topological#
Type:
str
Default:
None

Use topological simplification.

If True, the resulting polygons of the classification are converted to topologies so no gaps are introduced in polygons that are next to each other. If not specified (= None), a multi-class classification will be simplified topologically, a single class will be simplified the standard way.

[postprocess]#

Settings concerning the postprocessing after the prediction.

postprocess.keep_original_file#
Type:
bool
Default:
True

Keep the original output file of the prediction after postprocessing.

postprocess.keep_intermediary_files#
Type:
bool
Default:
True

Keep the intermediary files of the postprocessing.

postprocess.dissolve#
Type:
bool
Default:
True

Dissolve the result.

Because the predictions are done on tiled input images, the “raw” result will be tiled in the size of the prediction images.

If dissolve is True, adjacent polygons of the same class are merged to one polygon, but no multipolygons are created.

For some subjects, dissolving can lead to huge polygons that are hard to handle and visualize because they are entirely connected. Examples are e.g. road networks, water bodies,… For these subjects, it can be better to disable dissolve or use a postprocess.dissolve_tiles_path.

postprocess.dissolve_tiles_path#
Type:
str
Default:
None

Tile the result of the dissolve using the grid in the file specified.

This key is only applicable if postprocess.dissolve is True.

If specified, the result of the dissolve will be tiled using the grid in the file provided.

This is useful if you want the result to be tiled to avoid huge polygons, but when you would like to have another tiling scheme used in the output than the tiles used during the prediction.

postprocess.reclassify_to_neighbour_query#
Type:
str
Default:
None

Query to specify polygons to be reclassified.

All detected polygons that comply to the query provided will be reclassified to the class of the neighbour with the longest border with it.

The query need to be in the form to be used by pandas.DataFrame.query() and the following columns are available to query on:

  • area: the area of the polygon, as calculated by GeoSeries.area .

  • perimeter: the perimeter of the polygon, as calculated by GeoSeries.length .

  • onborder: 1 if the polygon touches the border of the tile being predicted, 0 if it doesn’t. It is often useful to filter with onborder == 0 to avoid eg. polygons being reclassified because they are small due to being on the border.

Example:

reclassify_to_neighbour_query = (onborder == 0 and area <= 5)

postprocess.simplify_algorithm#
Type:
str
Default:
None

Apply simplify (also) after dissolve.

For more information, check out predict.simplify_algorithm.

postprocess.simplify_tolerance#
Type:
str
Default:
${predict:image_pixel_x_size}*2

Tolerance to use for the postprocess simplification.

Remark: you can use simple math expressions, eg. 1.5*5.

postprocess.simplify_lookahead#
Type:
int
Default:
8

The number of points to look ahead during simplify.

Only applicable if postprocess.simplify_algorithm is LANG.

[dirs]#

Settings concerning the directories where input/output data is found/put.

Remarks:

  • UNC paths are not supported on Windows, always use mapped drive letters!

  • always use forward slashes, even on Windows systems

  • in all paths, it is possible to use the {tempdir} placeholder, which will be replaced by the default system temp dir.

dirs.projects_dir#
Type:
str
Default:
..

The base projects directory.

Here, multiple orthoseg projects can be stored. Can either be:

  • an absolute path

  • OR a relative path starting from the location of the specific projectconfig file of the project

Eg.: “..” means: projects_dir is the parent dir of the dir containing the project config file.

dirs.weights_dir#
Type:
str
Default:
${projects_dir}/_weights

The directory where the pretrained weights are cached.

The weights specified in the train.weights_type key will be downloaded and cached in this directory if they aren’t available yet. If you want to use your own pretrained weights, you can put them in this directory and specify the weights type name of the file in the train.weights_type key. More information on this can be found in the documentation of the train.weights_type key.

dirs.base_image_dir#
Type:
str
Default:
${projects_dir}/_image_cache

The base directory to cache images we want predictions for.

dirs.predict_image_input_subdir#
Type:
str
Default:
${predict:image_pixel_width}x${predict:image_pixel_height}_${predict:image_pixels_overlap}pxOverlap

The directory name for the cached tiled images we want predictions for.

dirs.predict_image_input_dir#
Type:
str
Default:
${base_image_dir}/${predict:image_layer}/${predict_image_input_subdir}

The full directory path for the cached tiled images we want predictions for.

dirs.predict_image_output_basedir#
Type:
str
Default:
${predict_image_input_dir}

The base directory where predictions are saved.

Note

In recent version of orthoseg, the output is saved directly to vector files rather than (first) to raster files.

dirs.predictsample_image_input_subdir#
Type:
str
Default:
${train:image_pixel_width}x${train:image_pixel_height}

Directory name to save prediction of the images used during training to.

These prediction are a convenient way to find errors in the training dataset and check the training quality.

Note

Because the images predicted here are images used for training, the train image size is used by default.

dirs.predictsample_image_input_dir#
Type:
str
Default:
${base_image_dir}/${predict:image_layer}_testsample/${predictsample_image_input_subdir}

The full directory path to save the predictions on the training images to.

dirs.predictsample_image_output_basedir#
Type:
str
Default:
${predictsample_image_input_dir}

The base directory to save the predictions on the training images to.

dirs.project_dir#
Type:
str
Default:
${projects_dir}/${general:segment_subject}

The project directory for this subject.

dirs.log_dir#
Type:
str
Default:
${project_dir}/log

The log directory for the project.

dirs.labels_dir#
Type:
str
Default:
${project_dir}/labels

The directory containing the label data.

dirs.training_dir#
Type:
str
Default:
${project_dir}/training

Directories used to put data during training .

dirs.model_dir#
Type:
str
Default:
${project_dir}/models

The directory where models are saved².

dirs.output_vector_dir#
Type:
str
Default:
${project_dir}/output_vector/${predict:image_layer}

Output vector directory.

[files]#

Settings concerning some specific file paths.

files.model_json_filepath#
Type:
str
Default:
${dirs:model_dir}/${model:architecture}.json

File path that will be used to save/load the keras model definition.

files.image_layers_config_filepath#
Type:
str
Default:
${dirs:projects_dir}/imagelayers.ini

File path where the image layers configuration file is located.

files.cancel_filepath#
Type:
str
Default:
${dirs:projects_dir}/cancel.txt

File path of file that if it exists cancels the current processing.

[email]#

Email config to use to send progress info to.

email.enabled#
Type:
bool
Default:
False

Set enabled to True to enable sending mails.

email.from#
Type:
str
Default:
sample@samplemail.be

Email address to send task status info from.

email.to#
Type:
str
Default:
sample@samplemail.be

Email address to send task status info to.

email.smtp_server#
Type:
str
Default:
server.for.emails.be

Smtp server to use .

email.mail_server_username#
Type:
str
Default:
""

Username to use to login to smtp server (in some cases optional).

email.mail_server_password#
Type:
str
Default:
""

Password to use to login to smtp server (in some cases optional).

[logging]#

Logging configuration.

logging.nb_logfiles_tokeep#
Type:
int
Default:
30

The number of log files to keep in a log dir.

logging.logconfig#
Type:
dict
Default:
see description

Default value:

{
    "version": 1,
    "disable_existing_loggers": True,
    "formatters": {
        "console": {
            "format": "%(asctime)s.%(msecs)03d|%(levelname)s|%(name)s|%(message)s",
            "datefmt": "%H:%M:%S"
        },
        "file": {
            "format": "%(asctime)s|%(levelname)s|%(name)s|%(message)s",
            "datefmt": None
        }
    },
    "handlers": {
        "console": {
            "level": "INFO",
            "class": "logging.StreamHandler",
            "formatter": "console",
            "stream": "ext://sys.stdout"
        },
        "file": {
            "level": "INFO",
            "class": "logging.handlers.RotatingFileHandler",
            "formatter": "file",
            "filename": "_log/{iso_datetime}.log",
            "maxBytes": 10000000,
            "backupCount": 3
        }
    },
    "loggers": {
        "geofile_ops": {
            "level": "INFO",
            "handlers": [
                "console"
            ],
            "propagate": False
        },
        "geofile_ops.geofile_ops": {
            "level": "DEBUG",
            "handlers": [
                "console"
            ],
            "propagate": False
        }
    },
    "root": {
        "level": "INFO",
        "handlers": [
            "console",
            "file"
        ]
    }
}

Config to use for the logging.

This config is in json, following the conventions as required by logging.dictConfig. https://docs.python.org/3/library/logging.config.html#logging-config-dictschema

[cleanup]#

Configuration to manage the cleanup of old models, trainings and predictions.

cleanup.simulate#
Type:
bool
Default:
False

When simulate is True, no files are actually deleted, only logging is written.

cleanup.model_versions_to_retain#
Type:
int
Default:
-1

The number of versions to retain the models for.

If <0, all versions are retained.

cleanup.training_versions_to_retain#
Type:
int
Default:
-1

The number of version the retain the training data directories for.

If <0, all versions are retained.

cleanup.prediction_versions_to_retain#
Type:
int
Default:
-1

The number of versions to retain the prediction files for.

If <0, all versions are retained.