diff --git a/airborne_lidar/airborne_lidar_seg.py b/airborne_lidar/airborne_lidar_seg.py index bdd4b67..e2389ba 100644 --- a/airborne_lidar/airborne_lidar_seg.py +++ b/airborne_lidar/airborne_lidar_seg.py @@ -3,7 +3,7 @@ # add the parent folder to the python path to access convpoint library import sys import warnings -sys.path.append('/space/partner/nrcan/geobase/work/transfer/work/deep_learning/lidar/CMM_2018/convpoint_tests/ConvPoint') +sys.path.append('/wspace/disk01/lidar/convpoint_tests/ConvPoint') import argparse import numpy as np @@ -66,12 +66,16 @@ def class_mode(mode): ASPRS 18 = High Noise Entit """ - asprs_class_def = {'2': {'name': 'Ground', 'color': [233, 233, 229], 'mode': 0}, # light grey + asprs_class_def = {'1': {'name': 'Unclassified', 'color': [233, 233, 229], 'mode': 0}, # light grey + '2': {'name': 'Ground', 'color': [233, 233, 229], 'mode': 0}, # light grey '3': {'name': 'Low vegetation', 'color': [77, 174, 84], 'mode': 0}, # bright green '4': {'name': 'Medium vegetation', 'color': [81, 163, 148], 'mode': 0}, # bluegreen '5': {'name': 'High Vegetation', 'color': [108, 135, 75], 'mode': 0}, # dark green '6': {'name': 'Building', 'color': [223, 52, 52], 'mode': 0}, # red - '9': {'name': 'Water', 'color': [95, 156, 196], 'mode': 0} # blue + '7': {'name': 'Low Noise', 'color': [223, 52, 52], 'mode': 0}, + '9': {'name': 'Water', 'color': [95, 156, 196], 'mode': 0}, # blue + '17': {'name': 'Bridge decks', 'color': [223, 52, 52], 'mode': 0}, + '18': {'name': 'High Noise', 'color': [223, 52, 52], 'mode': 0}, } dales_class_def = {'1': {'name': 'Ground', 'color': [233, 233, 229], 'mode': 0}, # light grey '2': {'name': 'vegetation', 'color': [77, 174, 84], 'mode': 0}, # bright green @@ -94,6 +98,8 @@ def class_mode(mode): asprs_class_def = dales_class_def # ground(1), vegetation(2), cars(3), trucks(4), power lines(5), fences(6), poles(7) and buildings(8) asprs_class_to_use = {'1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8} + elif mode == 5: + asprs_class_to_use = {'6': 1, '9': 2, '2': 3, '1': 4, '7': 5, '18': 5, '17': 6} else: raise ValueError(f"Class mode provided ({mode}) is not defined.")