GRASS logo

NAME

m.neural_network.preparedata_part1 - Prepare training data for creating a neuronal network

KEYWORDS

raster, vector, export, neural network, preparation

SYNOPSIS

m.neural_network.preparedata_part1
m.neural_network.preparedata_part1 --help
m.neural_network.preparedata_part1 [-tl] tindex=name image_bands=name[,name,...] [ndsm=name] [dsm=name] [dtm=name] [ndsm_out=name] [reference=name] [segmentation_minsize=integer] [segmentation_threshold=float] [imagery_scale_min=integer] [imagery_scale_max=integer] output_dir=name [nprocs=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-t
Only training and testing tiles
Option for only exporting training and testing tiles
-l
Prepare labels for training and testing data
Option for preparing labels for training and testing data. If not set, only the tiles for the image bands and nDSM are exported, but no segmentation and labeling is performed.
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

tindex=name [required]
tindex file for tiling.
must be created with m.neural_network.tindex
image_bands=name[,name,...] [required]
The names of imagery raster bands, e.g. for DOPs RGBI raster bands
The first raster defines the output resolution
ndsm=name
Name of the nDSM raster
Name of input raster map
dsm=name
Name of the DSM raster
Name of input raster map
dtm=name
Name of the DTM raster
Name of input raster map
ndsm_out=name
Name for the computed nDSM raster
Name for output raster map
reference=name
Name of the reference vector map
Or data source for direct OGR access
segmentation_minsize=integer
Minimum number of cells in a segment
Default: 80
segmentation_threshold=float
Difference threshold between 0 and 1 for the segments
Threshold = 0 merges only identical segments; threshold = 1 merges all
Default: 0.3
imagery_scale_min=integer
minimum scaling value for imagery
Default: 1
imagery_scale_max=integer
maximum scaling value for imagery
Default: 255
output_dir=name [required]
Directory where the prepared data should be stored
The directory will be split into train and apply
nprocs=integer
Number of threads for parallel computing
0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs
Default: 0

Table of contents

DESCRIPTION

m.neural_network.preparedata_part1 prepares tiles for the labeling process as part of the training data preparation of a neural network using DOPs and nDSM as input data. Additionally, a tile index containing information about the labeled status is created.

The suffix option may be used to add a suffix to each output tile/file in order to create unique tile IDs that can later be combined with results from other runs.

EXAMPLES

Prepare the labeling of training data for a neural network with a tile_size of 512

m.neural_network.preparedata_part1 image_bands=top_red_02,top_green_02,top_blue_02,top_nir_02 ndsm=ndsm tile_size=512 output_dir=/mnt/data/ nprocs=7

Prepare training data and computing ndsm on the fly (Note: will be kept within mapset, where Addon is executed)

m.neural_network.preparedata_part1 image_bands=top_red_02,top_green_02,top_blue_02,top_nir_02 dsm=dsm dtm=dtm ndsm_out=ndsm tile_size=512 output_dir=/mnt/data/ nprocs=7

SEE ALSO

g.region, r.univar,

AUTHORS

Anika Weinmann, mundialis GmbH & Co. KG
Guido Riembauer, mundialis GmbH & Co. KG
Victoria-Leandra Brunn, mundialis GmbH & Co. KG

SOURCE CODE

Available at: m.neural_network.preparedata_part1 source code (history)

Accessed: Monday Jul 27 12:26:04 2026


Main index | Miscellaneous index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual