From 564a15989b63a0dfee9d153dcb9e8707b8bb7d94 Mon Sep 17 00:00:00 2001 From: Marc Garcia Puig Date: Wed, 26 Aug 2020 12:26:14 +0200 Subject: [PATCH] Added sem seg water and changed Dynamic color --- LibCarla/source/carla/image/CityScapesPalette.h | 5 +++-- PythonAPI/examples/opend3d.py | 17 +++++++++-------- .../Plugins/Carla/Source/Carla/Game/Tagger.cpp | 2 ++ .../Plugins/Carla/Source/Carla/Game/Tagger.h | 1 + 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/LibCarla/source/carla/image/CityScapesPalette.h b/LibCarla/source/carla/image/CityScapesPalette.h index 44724b454..d5d894a6c 100644 --- a/LibCarla/source/carla/image/CityScapesPalette.h +++ b/LibCarla/source/carla/image/CityScapesPalette.h @@ -28,7 +28,7 @@ namespace detail { {128u, 64u, 128u}, // road = 7u, {244u, 35u, 232u}, // sidewalk = 8u, {107u, 142u, 35u}, // vegetation = 9u, - { 0u, 0u, 142u}, // car = 10u, + { 0u, 0u, 142u}, // vehicle = 10u, {102u, 102u, 156u}, // wall = 11u, {220u, 220u, 0u}, // traffic sign = 12u, { 70u, 130u, 180u}, // sky = 13u, @@ -38,7 +38,8 @@ namespace detail { {180u, 165u, 180u}, // guard rail = 17u, {110u, 190u, 160u}, // traffic light = 18u, { 45u, 60u, 150u}, // static = 19u, - {250u, 170u, 30u}, // dynamic = 20u, + {170u, 120u, 50u}, // dynamic = 20u, + { 45u, 60u, 150u}, // water = 21u, // { 0u, 0u, 70u}, // truck // { 0u, 0u, 90u}, // caravan // { 0u, 0u, 110u}, // trailer diff --git a/PythonAPI/examples/opend3d.py b/PythonAPI/examples/opend3d.py index 3f4eadc4e..1001e5114 100644 --- a/PythonAPI/examples/opend3d.py +++ b/PythonAPI/examples/opend3d.py @@ -33,17 +33,17 @@ VIRIDIS = np.array(cm.get_cmap('plasma').colors) VID_RANGE = np.linspace(0.0, 1.0, VIRIDIS.shape[0]) LABEL_COLORS = np.array([ (255, 255, 255), # None - (70, 70, 70), # Buildings + (70, 70, 70), # Building (100, 40, 40), # Fences (55, 90, 80), # Other - (220, 20, 60), # Pedestrians - (153, 153, 153), # Poles + (220, 20, 60), # Pedestrian + (153, 153, 153), # Pole (157, 234, 50), # RoadLines - (128, 64, 128), # Roads - (244, 35, 232), # Sidewalks + (128, 64, 128), # Road + (244, 35, 232), # Sidewalk (107, 142, 35), # Vegetation - (0, 0, 142), # Car - (102, 102, 156), # Walls + (0, 0, 142), # Vehicle + (102, 102, 156), # Wall (220, 220, 0), # TrafficSign (70, 130, 180), # Sky (81, 0, 81), # Ground @@ -52,7 +52,8 @@ LABEL_COLORS = np.array([ (180, 165, 180), # GuardRail (110, 190, 160), # TrafficLight (45, 60, 150), # Static - (250, 170, 30), # Dynamic + (170, 120, 50), # Dynamic + (45, 60, 150), # Water ]) / 255.0 # normalize each channel [0-1] since is what Open3D uses diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.cpp index 766dda5b8..9a9eacf55 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.cpp @@ -41,6 +41,7 @@ ECityObjectLabel ATagger::GetLabelByFolderName(const FString &String) { else if (String == "TrafficLight") return ECityObjectLabel::TrafficLight; else if (String == "Static") return ECityObjectLabel::Static; else if (String == "Dynamic") return ECityObjectLabel::Dynamic; + else if (String == "Water") return ECityObjectLabel::Water; else return ECityObjectLabel::None; } @@ -136,6 +137,7 @@ FString ATagger::GetTagAsString(const ECityObjectLabel Label) CARLA_GET_LABEL_STR(TrafficLight) CARLA_GET_LABEL_STR(Static) CARLA_GET_LABEL_STR(Dynamic) + CARLA_GET_LABEL_STR(Water) #undef CARLA_GET_LABEL_STR } } diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.h index a8142ac0b..a46317853 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/Tagger.h @@ -33,6 +33,7 @@ enum class ECityObjectLabel : uint8 TrafficLight = 18u, Static = 19u, Dynamic = 20u, + Water = 21u, }; /// Sets actors' custom depth stencil value for semantic segmentation according