Commit ddd51972 authored by Marius Laska's avatar Marius Laska

multi pipeplines config support

parent bd4a7660
......@@ -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/CNNLoc-DLB_1"
f1 = "/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/DNN-DLB_1"
main(p_box_f=f1,
p_reg_f=f2,
vis_idx=(0,77))
\ No newline at end of file
......@@ -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]
......
......@@ -15,7 +15,7 @@ data:
global_params:
# number of experiment repetitions
repetitions: 1
repetitions: 10
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)
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)
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)
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)
......@@ -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_configs):
# 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_configs)))
log.info('Repeat {} time(s) and build average...'.format(num_iterations))
# read pipeline parameters
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment