Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Marius Laska
boxPrediction
Commits
ddd51972
Commit
ddd51972
authored
Nov 13, 2020
by
Marius Laska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multi pipeplines config support
parent
bd4a7660
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
392 additions
and
30 deletions
+392
-30
analysis/full_visual_cmp.py
analysis/full_visual_cmp.py
+1
-1
base/ujiindoorloc_provider.py
base/ujiindoorloc_provider.py
+4
-4
config/gpu_b0_f0.yml
config/gpu_b0_f0.yml
+46
-23
config/gpu_b0_f1.yml
config/gpu_b0_f1.yml
+112
-0
config/gpu_b0_f2.yml
config/gpu_b0_f2.yml
+112
-0
config/gpu_b0_f3.yml
config/gpu_b0_f3.yml
+112
-0
main.py
main.py
+5
-2
No files found.
analysis/full_visual_cmp.py
View file @
ddd51972
...
...
@@ -397,7 +397,7 @@ if __name__ == "__main__":
f2
=
"/Users/mariuslaska/PycharmProjects/boxprediction/evaluation/uji/cnn/output/CNNLoc_1"
f2
=
"/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/CNNLoc_1"
f1
=
"/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/
C
NN
Loc
-DLB_1"
f1
=
"/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/
D
NN-DLB_1"
main
(
p_box_f
=
f1
,
p_reg_f
=
f2
,
vis_idx
=
(
0
,
77
))
\ No newline at end of file
base/ujiindoorloc_provider.py
View file @
ddd51972
...
...
@@ -24,12 +24,12 @@ class UJIndoorLocProvider(DataProviderBase):
"""
train
=
pd
.
read_csv
(
"UJIndoorLoc/trainingData.csv"
)
#
train = train[train.BUILDINGID.eq(building_id)]
#
train = train[train.FLOOR.eq(floor_id)]
train
=
train
[
train
.
BUILDINGID
.
eq
(
building_id
)]
train
=
train
[
train
.
FLOOR
.
eq
(
floor_id
)]
test
=
pd
.
read_csv
(
"UJIndoorLoc/validationData.csv"
)
#
test = test[test.BUILDINGID.eq(building_id)]
#
test = test[test.FLOOR.eq(floor_id)]
test
=
test
[
test
.
BUILDINGID
.
eq
(
building_id
)]
test
=
test
[
test
.
FLOOR
.
eq
(
floor_id
)]
self
.
num_train
=
train
.
shape
[
0
]
self
.
num_test
=
test
.
shape
[
0
]
...
...
config/
cnn_config
.yml
→
config/
gpu_b0_f0
.yml
View file @
ddd51972
...
...
@@ -15,7 +15,7 @@ data:
global_params
:
# number of experiment repetitions
repetitions
:
1
repetitions
:
1
0
preprocessing
:
# Whether to standardize the RSS values
...
...
@@ -41,49 +41,72 @@ global_params:
#first_neuron: 512
#hidden_layers: 1
lr
:
0.002
batch_size
:
66
epochs
:
5
batch_size
:
32
epochs
:
1
#dropout: 0.7
#regularization_penalty: 0.0
augmentation
:
0
autoencoder
:
train
#pretrain: yes
loss
:
grid
:
scale
:
30.0
outside
:
scale
:
1.0
delta
:
10.0
pipelines
:
-
name
:
CNNLoc
ns
:
1
ts
:
1
model_params
:
lr
:
0.002
type
:
CNNLoc_REG
autoencoder
:
train
epochs
:
5
batch_size
:
64
-
name
:
CNNLoc-DLB
ns
:
1
ts
:
1
model_params
:
lr
:
0.002
batch_size
:
64
epochs
:
5
#dropout: 0.7
#regularization_penalty: 0.0
batch_size
:
32
augmentation
:
0
autoencoder
:
train
#pretrain: yes
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
-
name
:
DNN
model_params
:
type
:
DNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
pred
:
regression
first_neuron
:
512
hidden_layers
:
[
1
,
2
,
3
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
-
name
:
DNN-DLB
model_params
:
type
:
GRID_OVERLAP-BBOX
# (DNN, CNN, kNN, SVM) supported (require different parameters)
first_neuron
:
512
hidden_layers
:
[
1
,
2
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
# base directories for file storage
output
:
model_dir
:
evaluation/uji/
cnn/full_cmp
/output/
summary_dir
:
evaluation/uji/
cnn/full_cmp
/summary/
model_dir
:
evaluation/uji/
gpu/b0/f0
/output/
summary_dir
:
evaluation/uji/
gpu/b0/f0
/summary/
img_folder
:
evaluation/uji/
# folder where floorplan images is located (if not present, will be downloaded)
config/gpu_b0_f1.yml
0 → 100644
View file @
ddd51972
data
:
# The data provider which should be used
provider
:
UJIndoorLocProvider
# File name of floor plan img
floor_plan_img
:
<test>.jpg
# (train, val, test) test=0.2 => 5 fold # The number of temporal epochs into which the dataset is split
split_ratio
:
[
0.7
,
0.1
,
0.2
]
building
:
0
floor
:
1
#
# are used when not locally set for pipeline
#
global_params
:
# number of experiment repetitions
repetitions
:
10
preprocessing
:
# Whether to standardize the RSS values
standardize
:
True
# Whether to assign labels with no matching area to closet area
assign_closest
:
False
# The floor number of the Lohan dataset, which should be used
#floor: 0
# The epoch number of the split dataset
#num_epochs: 10
#epoch: 5
# How to check for area matches of labels (to label positions with matching areas)
area_assignment
:
convex_hull
grid_size
:
40
floor_plan
:
# 'segmentation' => computes floor plan segmentation,
# 'regression' => uses DBSCAN to partitions labels into train, test split
type
:
floor_classification
model_params
:
type
:
GRID_OVERLAP-BBOX_CNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
#first_neuron: 512
#hidden_layers: 1
lr
:
0.002
batch_size
:
32
epochs
:
1
#dropout: 0.7
#regularization_penalty: 0.0
augmentation
:
0
autoencoder
:
train
#pretrain: yes
pipelines
:
-
name
:
CNNLoc
model_params
:
lr
:
0.002
type
:
CNNLoc_REG
autoencoder
:
train
-
name
:
CNNLoc-DLB
model_params
:
lr
:
0.002
batch_size
:
32
augmentation
:
0
autoencoder
:
train
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
-
name
:
DNN
model_params
:
type
:
DNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
pred
:
regression
first_neuron
:
512
hidden_layers
:
[
1
,
2
,
3
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
-
name
:
DNN-DLB
model_params
:
type
:
GRID_OVERLAP-BBOX
# (DNN, CNN, kNN, SVM) supported (require different parameters)
first_neuron
:
512
hidden_layers
:
[
1
,
2
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
# base directories for file storage
output
:
model_dir
:
evaluation/uji/gpu/b0/f1/output/
summary_dir
:
evaluation/uji/gpu/b0/f1/summary/
img_folder
:
evaluation/uji/
# folder where floorplan images is located (if not present, will be downloaded)
config/gpu_b0_f2.yml
0 → 100644
View file @
ddd51972
data
:
# The data provider which should be used
provider
:
UJIndoorLocProvider
# File name of floor plan img
floor_plan_img
:
<test>.jpg
# (train, val, test) test=0.2 => 5 fold # The number of temporal epochs into which the dataset is split
split_ratio
:
[
0.7
,
0.1
,
0.2
]
building
:
0
floor
:
2
#
# are used when not locally set for pipeline
#
global_params
:
# number of experiment repetitions
repetitions
:
10
preprocessing
:
# Whether to standardize the RSS values
standardize
:
True
# Whether to assign labels with no matching area to closet area
assign_closest
:
False
# The floor number of the Lohan dataset, which should be used
#floor: 0
# The epoch number of the split dataset
#num_epochs: 10
#epoch: 5
# How to check for area matches of labels (to label positions with matching areas)
area_assignment
:
convex_hull
grid_size
:
40
floor_plan
:
# 'segmentation' => computes floor plan segmentation,
# 'regression' => uses DBSCAN to partitions labels into train, test split
type
:
floor_classification
model_params
:
type
:
GRID_OVERLAP-BBOX_CNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
#first_neuron: 512
#hidden_layers: 1
lr
:
0.002
batch_size
:
32
epochs
:
1
#dropout: 0.7
#regularization_penalty: 0.0
augmentation
:
0
autoencoder
:
train
#pretrain: yes
pipelines
:
-
name
:
CNNLoc
model_params
:
lr
:
0.002
type
:
CNNLoc_REG
autoencoder
:
train
-
name
:
CNNLoc-DLB
model_params
:
lr
:
0.002
batch_size
:
32
augmentation
:
0
autoencoder
:
train
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
-
name
:
DNN
model_params
:
type
:
DNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
pred
:
regression
first_neuron
:
512
hidden_layers
:
[
1
,
2
,
3
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
-
name
:
DNN-DLB
model_params
:
type
:
GRID_OVERLAP-BBOX
# (DNN, CNN, kNN, SVM) supported (require different parameters)
first_neuron
:
512
hidden_layers
:
[
1
,
2
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
# base directories for file storage
output
:
model_dir
:
evaluation/uji/gpu/b0/f2/output/
summary_dir
:
evaluation/uji/gpu/b0/f2/summary/
img_folder
:
evaluation/uji/
# folder where floorplan images is located (if not present, will be downloaded)
config/gpu_b0_f3.yml
0 → 100644
View file @
ddd51972
data
:
# The data provider which should be used
provider
:
UJIndoorLocProvider
# File name of floor plan img
floor_plan_img
:
<test>.jpg
# (train, val, test) test=0.2 => 5 fold # The number of temporal epochs into which the dataset is split
split_ratio
:
[
0.7
,
0.1
,
0.2
]
building
:
0
floor
:
3
#
# are used when not locally set for pipeline
#
global_params
:
# number of experiment repetitions
repetitions
:
10
preprocessing
:
# Whether to standardize the RSS values
standardize
:
True
# Whether to assign labels with no matching area to closet area
assign_closest
:
False
# The floor number of the Lohan dataset, which should be used
#floor: 0
# The epoch number of the split dataset
#num_epochs: 10
#epoch: 5
# How to check for area matches of labels (to label positions with matching areas)
area_assignment
:
convex_hull
grid_size
:
40
floor_plan
:
# 'segmentation' => computes floor plan segmentation,
# 'regression' => uses DBSCAN to partitions labels into train, test split
type
:
floor_classification
model_params
:
type
:
GRID_OVERLAP-BBOX_CNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
#first_neuron: 512
#hidden_layers: 1
lr
:
0.002
batch_size
:
32
epochs
:
1
#dropout: 0.7
#regularization_penalty: 0.0
augmentation
:
0
autoencoder
:
train
#pretrain: yes
pipelines
:
-
name
:
CNNLoc
model_params
:
lr
:
0.002
type
:
CNNLoc_REG
autoencoder
:
train
-
name
:
CNNLoc-DLB
model_params
:
lr
:
0.002
batch_size
:
32
augmentation
:
0
autoencoder
:
train
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
-
name
:
DNN
model_params
:
type
:
DNN
# (DNN, CNN, kNN, SVM) supported (require different parameters)
pred
:
regression
first_neuron
:
512
hidden_layers
:
[
1
,
2
,
3
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
-
name
:
DNN-DLB
model_params
:
type
:
GRID_OVERLAP-BBOX
# (DNN, CNN, kNN, SVM) supported (require different parameters)
first_neuron
:
512
hidden_layers
:
[
1
,
2
]
lr
:
0.7
batch_size
:
32
#epochs: 200
dropout
:
0.5
regularization_penalty
:
0.0
augmentation
:
0
loss
:
grid
:
scale
:
100.0
outside
:
scale
:
1.0
delta
:
[
10.0
,
15.0
,
20.0
]
# base directories for file storage
output
:
model_dir
:
evaluation/uji/gpu/b0/f3/output/
summary_dir
:
evaluation/uji/gpu/b0/f3/summary/
img_folder
:
evaluation/uji/
# folder where floorplan images is located (if not present, will be downloaded)
main.py
View file @
ddd51972
...
...
@@ -44,8 +44,11 @@ def execute(conf_file):
# only PD
conf
.
download_floor_plan
()
# obtain pipeline config variations
pipeline_configs
=
conf
.
get_pipeline_variation
(
conf
.
pipelines
)
# sequentially execute all training pipelines
for
p_idx
,
pipeline_params
in
enumerate
(
conf
.
pipelines
):
for
p_idx
,
pipeline_params
in
enumerate
(
pipeline
_config
s
):
# set random seeds
# if 'ns' in pipeline_params:
...
...
@@ -61,7 +64,7 @@ def execute(conf_file):
num_iterations
=
conf
.
get_params
(
'repetitions'
,
pipeline_params
)
log
.
info
(
'Train and evaluate il_pipeline "{}"... ({}/{}))'
.
format
(
pipeline_params
[
'name'
],
p_idx
+
1
,
len
(
conf
.
pipelines
)))
pipeline_params
[
'name'
],
p_idx
+
1
,
len
(
pipeline
_config
s
)))
log
.
info
(
'Repeat {} time(s) and build average...'
.
format
(
num_iterations
))
# read pipeline parameters
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment