diff --git a/bash_helper_scripts/get_small_data_for_playground.sh b/bash_helper_scripts/get_small_data_for_playground.sh index a5d4c9eea58304e7a929b3c160284557a8d0271d..fe1fd6361e6b4ab77867b8ce286e69984b560524 100755 --- a/bash_helper_scripts/get_small_data_for_playground.sh +++ b/bash_helper_scripts/get_small_data_for_playground.sh @@ -1,13 +1,16 @@ -SOURCE_FOLDER=/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground -rm -rf $SOURCE_FOLDER/* +TARGET_FOLDER=/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/maciek +rm -rf $TARGET_FOLDER/* -cp /home/nibio/mutable-outside-world/data/small_file_pipeline_test/small_file_pipeline_test.las \ -/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground +cp /home/nibio/mutable-outside-world/data/small_file_pipeline_test/small_file_pipeline_test.las $TARGET_FOLDER # change name of the file to first.laz -mv /home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/small_file_pipeline_test.las \ -/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/first.las +mv $TARGET_FOLDER/small_file_pipeline_test.las $TARGET_FOLDER/first.las -# copy first.laz to second.laz -cp /home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/first.las \ -/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/second.las \ No newline at end of file +# make a copy of the file +cp $TARGET_FOLDER/first.las $TARGET_FOLDER/second.las + +# # make a copy of the file +# cp $TARGET_FOLDER/first.las $TARGET_FOLDER/third.las + +# # make a copy of the file +# cp $TARGET_FOLDER/first.las $TARGET_FOLDER/fourth.las \ No newline at end of file diff --git a/bash_helper_scripts/get_terrestial_sem_seg_validation.sh b/bash_helper_scripts/get_terrestial_sem_seg_validation.sh new file mode 100755 index 0000000000000000000000000000000000000000..782d4366a87ec7023af76f613c86beb61508d365 --- /dev/null +++ b/bash_helper_scripts/get_terrestial_sem_seg_validation.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +TARGET_FOLDER=/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground +# clean the folder +rm -rf $TARGET_FOLDER/* + +cp /home/nibio/mutable-outside-world/data/terestial_data_for_training_sem_seg_model/validation/*.las $TARGET_FOLDER + diff --git a/metrics/instance_segmentation_metrics_in_folder.py b/metrics/instance_segmentation_metrics_in_folder.py index b9e65090cdba582cc0aca1d979a781157cd4dec0..23b6f4e26f007e19665d3edaffde25308caf034b 100644 --- a/metrics/instance_segmentation_metrics_in_folder.py +++ b/metrics/instance_segmentation_metrics_in_folder.py @@ -7,14 +7,10 @@ class InstanceSegmentationMetricsInFolder(): self, gt_las_folder_path, target_las_folder_path, - gt_label_name='gt_label', #TODO: implement the same as in the instance_segmentation_metrics.py - target_label_name='target_label', #TODO: implement the same as in the instance_segmentation_metrics.py verbose=False ): self.gt_las_folder_path = gt_las_folder_path self.target_las_folder_path = target_las_folder_path - self.gt_label_name = gt_label_name - self.target_label_name = target_label_name self.verbose = verbose def main(self): @@ -80,8 +76,6 @@ if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--gt_las_folder_path', type=str, required=True) parser.add_argument('--target_las_folder_path', type=str, required=True) - parser.add_argument('--gt_label_name', type=str, default='gt_label') - parser.add_argument('--target_label_name', type=str, default='target_label') parser.add_argument('--verbose', action='store_true', help="Print information about the process") args = parser.parse_args() @@ -89,8 +83,6 @@ if __name__ == '__main__': instance_segmentation_metrics_in_folder = InstanceSegmentationMetricsInFolder( args.gt_las_folder_path, args.target_las_folder_path, - gt_label_name=args.gt_label_name, - target_label_name=args.target_label_name, verbose=args.verbose ) diff --git a/nibio_preprocessing/tiling.py b/nibio_preprocessing/tiling.py index f854eb683e7509ccafec5e4852c690a44fd06dcb..b9186efb9966145e894970c46b057ea570b4d32a 100644 --- a/nibio_preprocessing/tiling.py +++ b/nibio_preprocessing/tiling.py @@ -1,4 +1,5 @@ import argparse +from joblib import Parallel, delayed import pdal import os, glob import json @@ -84,8 +85,7 @@ class Tiling: files = glob.glob(self.input_folder + "/*.ply") # loop through all the files - for file in tqdm(files): - self.do_tiling_of_single_file(file) + Parallel(n_jobs=(os.cpu_count() - 2))(delayed(self.do_tiling_of_single_file)(file) for file in tqdm(files)) def convert_single_file_from_las_to_ply(self, file): """ diff --git a/pipeline_test.py b/pipeline_test.py index e43b5a20218aa925b114b81b0622eb192d8a8d8c..ec8de9471f0b562ada267371e24eaf6b0acaf9f4 100644 --- a/pipeline_test.py +++ b/pipeline_test.py @@ -92,8 +92,6 @@ def main(): metric = InstanceSegmentationMetricsInFolder( gt_las_folder_path = '/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/results/input_data', target_las_folder_path = '/home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/sample_playground/results/instance_segmented_point_clouds_with_ground', - gt_label_name='treeID', - target_label_name='treeID', verbose=True ) diff --git a/python_wrapper_over_run_sh.py b/python_wrapper_over_run_sh.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/run_all_command_line.sh b/run_all_command_line.sh index e70a422ff2c22fa97b95b8e1a09931db1674169e..696c51614734c0418f63fe76fb68d0555d33ece6 100755 --- a/run_all_command_line.sh +++ b/run_all_command_line.sh @@ -161,7 +161,7 @@ for d in $data_folder/segmented_point_clouds/tiled/*/; do python fsct/run.py \ --model /home/nibio/mutable-outside-world/code/gitlab_fsct/instance_segmentation_classic/fsct/model/model.pth \ --point-cloud $f \ - --batch_size 5 \ + --batch_size 10 \ --odir $d \ --verbose \ # --tile-index $d/tile_index.dat \