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
dfd3057a
Commit
dfd3057a
authored
4 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Preparing for transfer learning on Cloud 95 dataset
parent
f13a8431
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/config.py
+12
-12
12 additions, 12 deletions
main/config.py
with
12 additions
and
12 deletions
main/config.py
+
12
−
12
View file @
dfd3057a
...
...
@@ -28,12 +28,12 @@ from pytorch.models import UNet
wd
=
'
/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/
'
# define which dataset to train on
dataset_name
=
'
Sparcs
'
#
dataset_name = 'Cloud95'
#
dataset_name = 'Sparcs'
dataset_name
=
'
Cloud95
'
# path to the dataset
dataset_path
=
os
.
path
.
join
(
wd
,
'
_Datasets/Sparcs
'
)
#
dataset_path = os.path.join(wd, '_Datasets/Cloud95/Training')
#
dataset_path = os.path.join(wd, '_Datasets/Sparcs')
dataset_path
=
os
.
path
.
join
(
wd
,
'
_Datasets/Cloud95/Training
'
)
# the csv file containing the names of the informative patches of the
# Cloud95 dataset
...
...
@@ -46,7 +46,7 @@ bands = ['red', 'green', 'blue', 'nir']
# define the size of the network input
# if None, the size will default to the size of a scene
tile_size
=
12
5
tile_size
=
1
9
2
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
...
...
@@ -83,10 +83,10 @@ kwargs = {'kernel_size': 3, # the size of the convolving kernel
state_path
=
os
.
path
.
join
(
wd
,
'
git/deep-learning/main/_models/
'
)
# whether to use a pretrained model
pretrained
=
Fals
e
pretrained
=
Tru
e
# name of the pretrained model
pretrained_model
=
'
UNet_SparcsDataset_t125_b
64
_rgbn.pt
'
pretrained_model
=
'
UNet_SparcsDataset_t125_b
128
_rgbn.pt
'
# Dataset split ---------------------------------------------------------------
...
...
@@ -100,12 +100,12 @@ ttratio = 1
# (ttratio * tvratio) * 100 % will be used as the training dataset
# (1 - ttratio * tvratio) * 100 % will be used as the validation dataset
tvratio
=
0.
8
tvratio
=
0.
05
# define the batch size
# determines how many samples of the dataset are processed until the weights
# of the network are updated
batch_size
=
128
batch_size
=
64
# Training configuration ------------------------------------------------------
...
...
@@ -114,14 +114,14 @@ checkpoint = False
# whether to early stop training if the accuracy (loss) on the validation set
# does not increase (decrease) more than delta over patience epochs
early_stop
=
Tru
e
early_stop
=
Fals
e
mode
=
'
max
'
delta
=
0
patience
=
10
# define the number of epochs: the number of maximum iterations over the whole
# training dataset
epochs
=
20
0
epochs
=
1
0
# define the number of threads
nthreads
=
os
.
cpu_count
()
...
...
@@ -149,7 +149,7 @@ plot_cm = False
# whether to save plots of (input, ground truth, prediction) of the validation
# dataset to disk
# output path is: current_working_directory/_samples/
plot_samples
=
Tru
e
plot_samples
=
Fals
e
# number of samples to plot
# if nsamples = -1, all samples are plotted
...
...
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