File tree 4 files changed +41
-21
lines changed 4 files changed +41
-21
lines changed Original file line number Diff line number Diff line change 1
1
configuration :
2
- model_path : " s3://sagegroup-data/sage/models/{name}"
2
+ # model_path: "s3://sagegroup-data/sage/models/{name}"
3
3
name : " unet-forestry-dev"
4
4
workspace : " /home/marian/models/{name}"
5
5
@@ -15,6 +15,7 @@ data_source: !!python/object/apply:hugin.io.FSSpecFilesystemLoader
15
15
type_format : ' {type}'
16
16
validation_percent : 0.25
17
17
randomise : True
18
+ persist_file : " "
18
19
19
20
trainer : !!python/object/apply:hugin.engine.scene.RasterSceneTrainer
20
21
kwds :
@@ -54,18 +55,11 @@ trainer: !!python/object/apply:hugin.engine.scene.RasterSceneTrainer
54
55
model_builder_options :
55
56
output_channels : 2
56
57
model_path : " /data/bid/storage0/sage-storage/homes/eosmith/marian/models/{name}"
57
- batch_size : 16
58
+ batch_size : 14
58
59
epochs : 100
59
60
metrics :
60
61
- categorical_accuracy
61
62
- !!python/name:hugin.tools.utils.dice_coef
62
- - !!python/object/apply:tensorflow.keras.metrics.MeanIoU
63
- kwds :
64
- num_classes : 2
65
- - !!python/object/apply:tensorflow.keras.metrics.IoU
66
- kwds :
67
- target_class_ids : [0, 1]
68
- num_classes : 2
69
63
- !!python/object/apply:tensorflow.keras.metrics.BinaryIoU
70
64
kwds :
71
65
target_class_ids : [1]
Original file line number Diff line number Diff line change 1
- numpy >= 1.16.0 , < 1.19.0
2
- geojson == 2.4.1
1
+ numpy
2
+ geojson
3
3
rasterio
4
4
scikit-image
5
5
scipy
6
6
geopandas
7
7
Shapely
8
8
Fiona
9
- s3fs
10
9
dask [array ]
11
- gcsfs
12
- zarr >= 2.6.0 # Needed due to bug in S3FS interaction, see: https://github.com/zarr-developers/zarr-python/issues/649
13
- h5py == 2.10.0
14
- backoff == 1.8.0
10
+ zarr
11
+ h5py
12
+ backoff
15
13
matplotlib
16
14
scikit-learn
17
- imgaug == 0.2.8
18
- tensorflow >= 1.15 ,<= 2.3.1
19
- backports.tempfile == 1.0
15
+ imgaug
16
+ tensorflow
20
17
tqdm
21
18
traitlets
Original file line number Diff line number Diff line change @@ -161,6 +161,15 @@ def __init__(self,
161
161
else :
162
162
self .scan_datasets ()
163
163
164
+ @property
165
+ def persist_file (self ):
166
+ if not hasattr (self , "_persist_file" ):
167
+ return None
168
+ else :
169
+ return self ._persist_file
170
+ @persist_file .setter
171
+ def persist_file (self , value ):
172
+ self ._persist_file = value
164
173
165
174
def scan_datasets (self ):
166
175
self ._datasets .clear ()
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+
3
+
4
+ __license__ = \
5
+ """Copyright 2023 West University of Timisoara
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+ """
19
+
1
20
import logging
2
21
from urllib .parse import urlparse , parse_qs
3
22
@@ -45,11 +64,12 @@ def train_handler(args):
45
64
46
65
if workspace_directory is not None :
47
66
workspace_directory = workspace_directory .format (** experiment_configuration )
48
-
67
+ else :
68
+ raise ValueError ("No workspace directory specified" )
49
69
if not os .path .exists (workspace_directory ):
50
70
os .makedirs (workspace_directory )
51
71
52
- title = f"hugin train (name: { experiment_name } )"
72
+ title = f"hugin train ({ experiment_name } )"
53
73
setproctitle (title )
54
74
log .info (f"workspace directory: { workspace_directory } " )
55
75
if workspace_directory and trainer .base_directory is None :
You can’t perform that action at this time.
0 commit comments