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

update for oracle instane segmentation

parent 4fe33e0c
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ general: ...@@ -3,7 +3,7 @@ general:
output_folder: './maciek_results' output_folder: './maciek_results'
clean_output_folder: true clean_output_folder: true
run_sematic_segmentation: true run_sematic_segmentation: true
run_instance_segmentation: false run_instance_segmentation: true
label_formats: label_formats:
label_for_instances_in_gt: 'treeID' label_for_instances_in_gt: 'treeID'
label_for_instances_in_predicted: 'instance_nr' label_for_instances_in_predicted: 'instance_nr'
......
...@@ -102,19 +102,30 @@ def run_oracle_wrapper(path_to_config_file): ...@@ -102,19 +102,30 @@ def run_oracle_wrapper(path_to_config_file):
# run the main function # run the main function
main(path_to_config_file) 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 # 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' # save files to the output bucket 'bucket_lidar_data' in the subfolder 'output'
for file in list_of_files: for file in list_of_files:
# get the full path of the file # 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 # get the file name
file_name = file file_name = file
# upload the file to the bucket # 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__': if __name__ == '__main__':
# use argparse to get the path to the config file # use argparse to get the path to the config file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment