From 30252a53f8605f9da76afd1e0317aea0a1350e19 Mon Sep 17 00:00:00 2001 From: pikaliov Date: Fri, 17 Apr 2026 21:00:02 +0300 Subject: [PATCH] Add 3 segmentation classes for UAV_VisLoc: bare soil, rooftop, sports field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Analysis of scene 01 showed 29% background pixels, mainly caused by: - Plowed/bare fields (no crop match) → add "bare soil and plowed field" - Dark/textured roofs missed by "building" → add "roof and rooftop" - Sports fields/playgrounds → add "sports field and playground" Total: 11 → 14 classes. Palette extended with 3 new colors. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/run_uav_visloc.py | 17 ++++++++++++++--- src/augmentor/io_utils.py | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/run_uav_visloc.py b/scripts/run_uav_visloc.py index cb4ab81..9560dad 100644 --- a/scripts/run_uav_visloc.py +++ b/scripts/run_uav_visloc.py @@ -74,9 +74,20 @@ def main() -> None: input_conf = InputConfig(image_size=256) seg_conf = SegConfig(prompts=[ - "background", "building", "road", "vegetation", "water", - "sand and gravel ground", "rocky terrain", "farmland", - "railway", "parking lot", "sidewalk", + "background", # 0 + "building", # 1 + "road", # 2 + "vegetation", # 3 + "water", # 4 + "sand and gravel ground", # 5 + "rocky terrain", # 6 + "farmland", # 7 + "railway", # 8 + "parking lot", # 9 + "sidewalk", # 10 + "bare soil and plowed field", # 11 + "roof and rooftop", # 12 + "sports field and playground", # 13 ]) models_conf = ModelsConfig(weights_dir=str(_PROJECT_ROOT / "in" / "weights")) diff --git a/src/augmentor/io_utils.py b/src/augmentor/io_utils.py index 5f7f94e..5c00d9f 100644 --- a/src/augmentor/io_utils.py +++ b/src/augmentor/io_utils.py @@ -94,6 +94,9 @@ _FIXED_PALETTE = np.array([ [100, 60, 120], # 8: railway — purple [255, 165, 0], # 9: parking lot — orange [200, 200, 200], # 10: sidewalk — light gray + [140, 100, 50], # 11: bare soil — dark tan + [180, 60, 60], # 12: rooftop — dark red + [50, 200, 150], # 13: sports field — teal ], dtype=np.uint8)