Skip to content
Snippets Groups Projects
Commit a9bec7c2 authored by Maciej Wielgosz's avatar Maciej Wielgosz
Browse files

pipeline for oracle cloud deployment, parameter for checkpoint sem. seg. from the command line

parent bc4451ce
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ label_formats: ...@@ -9,6 +9,7 @@ label_formats:
label_for_instances_in_predicted: 'instance_nr' label_for_instances_in_predicted: 'instance_nr'
semantic_segmentation_params: semantic_segmentation_params:
sematic_segmentation_script: './run_bash_scripts/sem_seg_sean.sh' sematic_segmentation_script: './run_bash_scripts/sem_seg_sean.sh'
checkpoint_model_path: './fsct/model/model.pth'
tile_size: 10 # tile size in meters tile_size: 10 # tile size in meters
min_density: 100 # minimum density of points in a tile(used for removing small tiles) min_density: 100 # minimum density of points in a tile(used for removing small tiles)
remove_small_tiles: 1 # 1: remove small tiles, 0: not remove small tiles remove_small_tiles: 1 # 1: remove small tiles, 0: not remove small tiles
......
...@@ -35,6 +35,7 @@ def main(path_to_config_file): ...@@ -35,6 +35,7 @@ def main(path_to_config_file):
sem_seg_args.extend([ sem_seg_args.extend([
"-d", str(config["general"]["input_folder"]), "-d", str(config["general"]["input_folder"]),
"-c", str(config["semantic_segmentation_params"]["checkpoint_model_path"]),
"-t", str(config["semantic_segmentation_params"]["tile_size"]), "-t", str(config["semantic_segmentation_params"]["tile_size"]),
"-m", str(config["semantic_segmentation_params"]["min_density"]), "-m", str(config["semantic_segmentation_params"]["min_density"]),
"-z", str(config["semantic_segmentation_params"]["remove_small_tiles"]) "-z", str(config["semantic_segmentation_params"]["remove_small_tiles"])
......
...@@ -7,6 +7,7 @@ CONDA_ENV="pdal-env-1" # conda environment for running the pipeline ...@@ -7,6 +7,7 @@ CONDA_ENV="pdal-env-1" # conda environment for running the pipeline
# Parameters for the semetnic segmentation # Parameters for the semetnic segmentation
data_folder="" # path to the folder containing the data data_folder="" # path to the folder containing the data
checkpoint_model_path="./fsct/model/model.pth"
tile_size=10 # tile size in meters tile_size=10 # tile size in meters
min_density=75 # minimum density of points in a tile(used for removing small tiles) min_density=75 # minimum density of points in a tile(used for removing small tiles)
remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles
...@@ -16,10 +17,12 @@ remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles ...@@ -16,10 +17,12 @@ remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles
# extract tiling parameters as command line arguments with the same default values # extract tiling parameters as command line arguments with the same default values
# add remove_small_tiles parameter # add remove_small_tiles parameter
while getopts "d:t:m:z:" opt; do while getopts "d:c:t:m:z:" opt; do
case $opt in case $opt in
d) data_folder="$OPTARG" d) data_folder="$OPTARG"
;; ;;
c) checkpoint_model_path="$OPTARG"
;;
t) tile_size="$OPTARG" t) tile_size="$OPTARG"
;; ;;
m) min_density="$OPTARG" m) min_density="$OPTARG"
...@@ -140,7 +143,7 @@ for d in $data_folder/segmented_point_clouds/tiled/*/; do ...@@ -140,7 +143,7 @@ for d in $data_folder/segmented_point_clouds/tiled/*/; do
for f in $d/*.ply; do for f in $d/*.ply; do
echo "Processing $f file..." echo "Processing $f file..."
python sean_sem_seg/run_single_file.py \ python sean_sem_seg/run_single_file.py \
--model /home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/fsct/model/model.pth \ --model $checkpoint_model_path \
--point-cloud $f \ --point-cloud $f \
--batch_size 10 \ --batch_size 10 \
--odir $d \ --odir $d \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment