Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PySegCNN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
earth_observation_public
PySegCNN
Commits
6dc8445c
Commit
6dc8445c
authored
4 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Operational settings.
parent
46205d1e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pysegcnn/main/eval_config.py
+5
-4
5 additions, 4 deletions
pysegcnn/main/eval_config.py
pysegcnn/main/train_config.py
+13
-9
13 additions, 9 deletions
pysegcnn/main/train_config.py
with
18 additions
and
13 deletions
pysegcnn/main/eval_config.py
+
5
−
4
View file @
6dc8445c
...
...
@@ -22,7 +22,8 @@ import pathlib
# path to the datasets on the current machine
# DRIVE_PATH = pathlib.Path('C:/Eurac/Projects/CCISNOW/Datasets/')
# DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets/') # nopep8
DRIVE_PATH
=
pathlib
.
Path
(
'
/home/dfrisinghelli/Datasets
'
)
# DRIVE_PATH = pathlib.Path('/home/dfrisinghelli/Datasets')
DRIVE_PATH
=
pathlib
.
Path
(
'
/localscratch/dfrisinghelli_eurac/Datasets/
'
)
# name and paths to the datasets
DATASETS
=
{
'
Sparcs
'
:
DRIVE_PATH
.
joinpath
(
'
Sparcs
'
),
...
...
@@ -33,10 +34,10 @@ DATASETS = {'Sparcs': DRIVE_PATH.joinpath('Sparcs'),
TRG_DS
=
'
Sparcs
'
# spectral bands to use for evaluation
BANDS
=
[
'
red
'
,
'
green
'
,
'
blue
'
]
BANDS
=
[
'
red
'
,
'
green
'
,
'
blue
'
,
'
nir
'
,
'
swir1
'
,
'
swir2
'
]
# tile size of a single sample
TILE_SIZE
=
6
4
TILE_SIZE
=
25
6
# the target dataset configuration dictionary
trg_ds
=
{
...
...
@@ -65,6 +66,6 @@ trg_ds_split = {
'
seed
'
:
0
,
'
shuffle
'
:
True
,
'
ttratio
'
:
1
,
'
tvratio
'
:
0.
9
5
,
'
tvratio
'
:
0.
0
5
,
}
This diff is collapsed.
Click to expand it.
pysegcnn/main/train_config.py
+
13
−
9
View file @
6dc8445c
...
...
@@ -32,7 +32,9 @@ HERE = pathlib.Path(__file__).resolve().parent
# DRIVE_PATH = pathlib.Path('C:/Eurac/Projects/CCISNOW/Datasets/')
# DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets/') # nopep8
# DRIVE_PATH = pathlib.Path('/home/dfrisinghelli/Datasets/')
DRIVE_PATH
=
pathlib
.
Path
(
'
/home/clusterusers/dfrisinghelli_eurac/Datasets/
'
)
# DRIVE_PATH = pathlib.Path('/home/clusterusers/dfrisinghelli_eurac/Datasets/')
# DRIVE_PATH = pathlib.Path('/scratch/dfrisinghelli_eurac/Datasets/')
DRIVE_PATH
=
pathlib
.
Path
(
'
/localscratch/dfrisinghelli_eurac/Datasets/
'
)
# name and paths to the datasets
DATASETS
=
{
'
Sparcs
'
:
DRIVE_PATH
.
joinpath
(
'
Sparcs
'
),
...
...
@@ -40,13 +42,13 @@ DATASETS = {'Sparcs': DRIVE_PATH.joinpath('Sparcs'),
}
# name of the dataset
DS_NAME
=
'
Sparcs
'
DS_NAME
=
'
Alcd
'
# spectral bands to use for training
BANDS
=
[
'
red
'
,
'
green
'
,
'
blue
'
]
BANDS
=
[
'
red
'
,
'
green
'
,
'
blue
'
,
'
nir
'
,
'
swir1
'
,
'
swir2
'
]
# tile size of a single sample
TILE_SIZE
=
128
TILE_SIZE
=
256
# number of folds for cross validation
K_FOLDS
=
10
...
...
@@ -65,8 +67,8 @@ ds_config = {
'
root_dir
'
:
DATASETS
[
DS_NAME
],
# a regex pattern to match the ground truth file naming convention
'
gt_pattern
'
:
'
(.*)mask
\\
.png
'
,
#
'gt_pattern': '(.*)
clas
s\\.
img
',
#
'gt_pattern': '(.*)mask\\.png',
'
gt_pattern
'
:
'
(.*)
Label
s
\\
.
tif
'
,
# define the bands to use to train the segmentation network:
# either a list of bands, e.g. ['red', 'green', 'nir', 'swir2', ...]
...
...
@@ -140,8 +142,10 @@ ds_config = {
# values are the corresponding labels to be mapped to.
# NOTE: Passing an empty dictionary means all labels are preserved as is
# 'merge_labels': {}
'
merge_labels
'
:
{
'
Shadow_over_water
'
:
'
Shadow
'
,
'
Flooded
'
:
'
Land
'
}
# 'merge_labels': {'Shadow_over_water': 'Shadow',
# 'Flooded': 'Land'}
'
merge_labels
'
:
{
'
Cirrus
'
:
'
Cloud
'
,
'
Not_used
'
:
'
No_data
'
},
# EXAMPLE: merge label class 'Shadow over Water' to label class 'Shadow'
# 'merge_labels': {'Shadow_over_water': 'Shadow'}
...
...
@@ -236,7 +240,7 @@ model_config = {
# define the batch size
# determines how many samples of the dataset are processed until the
# weights of the network are updated (via mini-batch gradient descent)
'
batch_size
'
:
25
6
,
'
batch_size
'
:
6
4
,
# the seed for the random number generator intializing the network weights
'
torch_seed
'
:
0
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment