Commit bd4a7660 authored by Marius Laska's avatar Marius Laska
Browse files

fixed bug: chpt file was not loaded during evaluation

parent b55871c4
......@@ -396,8 +396,8 @@ if __name__ == "__main__":
f1 = "/Users/mariuslaska/PycharmProjects/boxprediction/evaluation/uji/cnn/output/CNN_BBOX_test_1"
f2 = "/Users/mariuslaska/PycharmProjects/boxprediction/evaluation/uji/cnn/output/CNNLoc_1"
f2 = "/Users/mariuslaska/PycharmProjects/boxprediction/evaluation/uji/cnn/output/CNNLoc_floor_0_1"
f1 = "/Users/mariuslaska/PycharmProjects/boxprediction/evaluation/uji/cnn/output/CNN_BBOX_floor_0_1"
f2 = "/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/CNNLoc_1"
f1 = "/home/laskama/PycharmProjects/bboxPrediction/evaluation/uji/cnn/hpc/CNNLoc-DLB_1"
main(p_box_f=f1,
p_reg_f=f2,
vis_idx=(0,77))
\ No newline at end of file
......@@ -327,7 +327,7 @@ class BboxModel(DnnModel):
# evaluate model and store results in summary file
if evaluate:
self.evaluate_model(test_bs)
self.evaluate_model(test_bs, chkpt_file=checkpoint_file_name)
def collect_train_progress(self, test_bs):
"""
......
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: 0
#
# are used when not locally set for pipeline
#
global_params:
# number of experiment repetitions
repetitions: 1
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: 66
epochs: 5
#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:
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
augmentation: 0
autoencoder: train
#pretrain: yes
# base directories for file storage
output:
model_dir: evaluation/uji/cnn/full_cmp/output/
summary_dir: evaluation/uji/cnn/full_cmp/summary/
img_folder: evaluation/uji/ # folder where floorplan images is located (if not present, will be downloaded)
#!/usr/local_rwth/bin/zsh
### name the job
#SBATCH --job-name=LOC_GPU
#SBATCH --output=batch/output/uji_GPU.%J.txt
#SBATCH --time=0-01:00:00
#SBATCH --mem-per-cpu=8G
#SBATCH --gres=gpu:1
### change directory
cd $HOME/boxprediction/
### Load modules for tensorflow GPU
module load cuda/100
module load cudnn/7.4
# set environment variables such that rtree can locate libspatialindex
export SPATIALINDEX_LIBRARY=~/lib/libspatialindex.so
export SPATIALINDEX_C_LIBRARY=~/lib/libspatialindex_c.so
### activate python virtual environment
source ../test/venv/bin/activate
### execute python script
python main.py -c config/GPU/uji/cnn_config.yml
\ No newline at end of file
......@@ -141,18 +141,18 @@ def execute(conf_file):
data_provider.transform_to_2dim_overlapping_grid_encoding(
grid_size=pre_params['grid_size'])
walls_h = np.load("/Users/mariuslaska/PycharmProjects/boxprediction/analysis/hor_walls.npy")
walls_v = np.load("/Users/mariuslaska/PycharmProjects/boxprediction/analysis/ver_walls.npy")
data_provider.encode_walls_to_2dim_overlapping_grid_encoding(
grid_size=pre_params['grid_size'], horizontal=True,
angle_only=True, overlap_strategy='keep',
walls=walls_h)
data_provider.encode_walls_to_2dim_overlapping_grid_encoding(
grid_size=pre_params['grid_size'], horizontal=False,
angle_only=True, overlap_strategy='keep',
walls=walls_v)
# walls_h = np.load("/Users/mariuslaska/PycharmProjects/boxprediction/analysis/hor_walls.npy")
# walls_v = np.load("/Users/mariuslaska/PycharmProjects/boxprediction/analysis/ver_walls.npy")
#
# data_provider.encode_walls_to_2dim_overlapping_grid_encoding(
# grid_size=pre_params['grid_size'], horizontal=True,
# angle_only=True, overlap_strategy='keep',
# walls=walls_h)
#
# data_provider.encode_walls_to_2dim_overlapping_grid_encoding(
# grid_size=pre_params['grid_size'], horizontal=False,
# angle_only=True, overlap_strategy='keep',
# walls=walls_v)
elif "GRID" in model_params['type']:
if "grid_size" in pre_params:
......
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