diff --git a/config/config.yaml b/config/config.yaml index 218457504d7caf8b9e3e145ac4d3afbcd61dfc65..22812fdeb7b4caa6c725456964d0d03d5a599aa7 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -3,7 +3,7 @@ general: output_folder: './maciek_results' clean_output_folder: true run_sematic_segmentation: true - run_instance_segmentation: false + run_instance_segmentation: true label_formats: label_for_instances_in_gt: 'treeID' label_for_instances_in_predicted: 'instance_nr' diff --git a/run_oracle_wrapper.py b/run_oracle_wrapper.py index 418709a9156c31d801f1f80447e466efa99880ae..550aabffe533773bb8b652440355cebd7bb4c729 100644 --- a/run_oracle_wrapper.py +++ b/run_oracle_wrapper.py @@ -102,19 +102,30 @@ def run_oracle_wrapper(path_to_config_file): # run the main function main(path_to_config_file) + # instance segmentation is set to true + if config_flow_params['general']['run_instance_segmentation']: + path_to_the_output_folder = os.path.join(config_flow_params['general']['output_folder'], 'instance_segmented_point_clouds') + else: + path_to_the_output_folder = config_flow_params['general']['output_folder'] + # get list of files in the output folder - list_of_files = os.listdir(config_flow_params['general']['output_folder']) + list_of_files = os.listdir(path_to_the_output_folder) # save files to the output bucket 'bucket_lidar_data' in the subfolder 'output' for file in list_of_files: # get the full path of the file - path_to_file = config_flow_params['general']['output_folder'] + '/' + file + path_to_file = path_to_the_output_folder + '/' + file # get the file name file_name = file # upload the file to the bucket - client.put_object(output_namespace, output_bucket_name, os.path.join(output_folder_in_bucket, file_name), io.open(path_to_file, 'rb')) + client.put_object( + output_namespace, + output_bucket_name, + os.path.join(output_folder_in_bucket, file_name), + io.open(path_to_file, 'rb') + ) if __name__ == '__main__': # use argparse to get the path to the config file