Manuscript Offprint

arXiv:2608.29609

nnMNet: Baseline for Martian Terrain Semantic Segmentation

Ming-Han Lee, Chi-Yeh Chen

Ming-Han Lee, Chi-Yeh Chen

Abstract—Semantic segmentation is a crucial task for understanding Mars, the most Earth-like planet in our solar system. However, it is challenging because the Martian surface is highly unstructured and complex, making accurate pixel-level prediction and fine-grained annotation difficult. Recent advancements in deep learning have introduced numerous methods and datasets to address these challenges. Nevertheless, the field lacks a robust, publicly available, and reproducible baseline, as well as a unified benchmark to facilitate fair evaluations. In this work, we present nnMNet, a new baseline model designed for Martian terrain semantic segmentation. Building upon nnWNet, we integrate linear attention to better capture global context and employ lightweight convolutions to reduce computational overhead. To bridge the gap between local and global representations, we introduce the Spatially-Aware Fusion Block (SAFB), which augments and combines features with diverse characteristics. Furthermore, we establish a new benchmark by curating and standardizing three high-quality datasets for thorough evaluation. nnMNet achieves new state-of-the-art 86.61%, 83.25%, and 88.24% mIoU on SynMars-TW, SynMars-Air, and MarsScapes, respectively. Our code, models, and datasets are publicly available at https://github.com/dereklee0310/nnMNet.

Index Terms—Mars, deep learning, semantic segmentation, terrain mapping.

I. INTRODUCTION

MARTIAN terrain semantic segmentation is a fundamental task in Mars exploration. Unlike image classification or object detection, semantic segmentation requires an in-depth understanding of the scene to make precise pixel-level predictions, which are essential for downstream applications such as geological analysis, path planning, and autonomous rover navigation [1]. However, Martian environments are far more challenging to segment than terrestrial scenes due to their highly unstructured, complex surfaces. Frequent local dust storms and global dust events (GDEs) [2] also lower the visibility of Mars rovers and make it difficult to acquire high-quality images. In short, accurately delineating topographical boundaries and identifying terrain categories with limited data remain significant challenges.

While deep learning is widely used for Martian terrain semantic segmentation, several issues hinder its practical applicability. First, state-of-the-art methods predominantly adopt Vision Transformer (ViT) architectures [3] for better global perception capabilities [4]–[8]. However, ViTs typically employ aggressive downsampling and upsampling (e.g., by a factor of four) to reduce computational cost [9]–[12], which inevitably discards fine-grained local details. This limited

Figure

Fig. 1. Performance comparison on SynMars-TW. nnMNet achieves a new state-of-the-art 86.61% mIoU with low parameters and moderate FLOPs.

local perception severely impairs the segmentation accuracy of small yet safety-critical objects, such as small rocks and gravel, posing potential risks to rover navigation. Second, existing methods are built on different frameworks with customized training configurations. The lack of standardization makes it difficult to discern whether performance gains stem from architectural designs or training strategies. Third, inconsistencies in annotation criteria and procedures across datasets introduce ambiguous labels, imprecise geological boundaries, and missing objects, degrading overall data quality. Many of these datasets also fail to provide clearly defined training, validation, and testing splits, making fair benchmarking difficult. Finally, the source code, pre-trained model weights, and datasets of most existing methods are proprietary, hindering reproducibility and restricting further development in both scientific research and real-world deployment.

In this work, we address these challenges by releasing a new baseline model and benchmark. For the model, we begin by examining the limitations of nnWNet [13] and then introduce three key components to enhance it. First, we introduce a Linear Attention Block (LAB) to capture global context with linear complexity. Second, we incorporate an Inverted Residual Block (IRB) [14] to extract local details while reducing computational overhead. Third, we propose a Spatially-Aware Fusion Block (SAFB) to aggregate and refine features from both LAB and IRB in a pixel-wise manner. Together, we present nnMNet, a model that effectively combines the complementary strengths of CNNs and Transformers to obtain superior local and global perception capabilities.

For unified benchmarking, we integrate our proposed model into the nnUNet framework [15], leveraging its end-to-end automated pipeline for standardized training and inference across multiple datasets. Furthermore, we construct a new benchmark comprising three large-scale datasets: SynMars-

Ming-Han Lee is with the Department of Computer Science and Information Engineering, National Cheng Kung University, Tainan 701, Taiwan (e-mail: dereklee0310@gmail.com).

Chi-Yeh Chen is with the Department of Computer Science and Information Engineering, National Cheng Kung University, Tainan 701, Taiwan (e-mail: chency@csie.ncku.edu.tw).

TW, SynMars-Air, and MarsScapes. Featuring diverse classes with high-quality annotations, these datasets enable a comprehensive evaluation of model performance across varying camera perspectives and data sources.

nnMNet achieves new state-of-the-art results on all datasets in our benchmark, while using fewer parameters and FLOPs than nnWNet. As illustrated in Fig. 1, it achieves 86.61% mIoU on SynMars-TW, surpassing all previous methods with comparable model sizes. It also sets new best mIoU scores of 83.25% and 88.24% on SynMars-Air and MarsScapes, respectively, demonstrating its robustness and generalizability.

Last but not least, we make our code, models, and benchmark publicly available. To the best of our knowledge, this is the first work to release a reproducible and robust model evaluated on multiple high-quality datasets. We hope our work and observations can provide a solid foundation for advancing research into Martian terrain semantic segmentation.

The main contributions are summarized as follows:

  1. We introduce Spatially-Aware Fusion Block (SAFB) that performs pixel-level modulation to seamlessly fuse features with diverse characteristics.

  2. We present nnMNet, a novel hybrid CNN-Transformer model for Martian terrain semantic segmentation that effectively models local details and global context.

  3. We curate and standardize three distinct datasets to establish a unified benchmark, enabling fair evaluation of the proposed model against previous methods.

  4. We open-source our code, models, and benchmark to provide the field with a new baseline model and a unified benchmark for reproduction and evaluation.

References (94)

  • A systematic review of martian image segmentation techniques for mars exploration (from 2019 to 2025)
  • Mars climate sounder observation of mars’ 2018 global dust storm
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • Rockformer: A u-shaped transformer network for martian rock segmentation
  • Marsformer: Martian rock semantic segmentation with transformer
  • Light4mars: A lightweight transformer model for semantic segmentation on unstructured environment like mars
  • Airformer: Learning-based object detection for mars helicopter
  • Lissemars: A lightweight semantic segmentation model for mars helicopter
  • Swin transformer: Hierarchical vision transformer using shifted windows
  • Pyramid vision transformer: A versatile backbone for dense prediction without convolutions
  • Pvt v2: Improved baselines with pyramid vision transformer
  • Segformer: Simple and efficient design for semantic segmentation with transformers
  • nnwnet: Rethinking the use of transformers in biomedical image segmentation and calling for a unified evaluation benchmark
  • Mobilenetv2: Inverted residuals and linear bottlenecks
  • nnu-net: a self-configuring method for deep learning-based biomedical image segmentation
  • Fully convolutional networks for semantic segmentation
  • U-net: Convolutional networks for biomedical image segmentation
  • Segnet: A deep convolutional encoder-decoder architecture for image segmentation
  • Pyramid scene parsing network
  • Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs
  • Encoder-decoder with atrous separable convolution for semantic image segmentation
  • Dual attention network for scene segmentation
  • Segnext: Rethinking convolutional attention design for semantic segmentation
  • Spoc: Deep learning-based terrain classification for mars rover missions
  • Mars reconnaissance orbiter’s high resolution imaging science experiment (hirise)
  • Mars science laboratory mission and science investigation
  • Mask r-cnn
  • Automated segmentation of textured dust storms on mars remote sensing images using an encoder-decoder type convolutional neural network
  • Segmentation convolutional neural networks for automatic crater detection on mars
  • Automatic detection and segmentation of barchan dunes on mars and earth using a convolutional neural network
  • Squeeze-and-excitation networks
  • Bam: Bottleneck attention module
  • Cbam: Convolutional block attention module
  • Eca-net: Efficient channel attention for deep convolutional neural networks
  • A hybrid attention semantic segmentation network for unstructured terrain on mars
  • Mc-unet: martian crater segmentation at semantic and instance levels using u-net-based convolutional neural network
  • Understanding the effective receptive field in deep convolutional neural networks
  • Automatic rocks segmentation based on deep learning for planetary rover images
  • Mobile-deeprfb: A lightweight terrain classifier for automatic mars rover navigation
  • Receptive field block net for accurate and fast object detection
  • Searching for mobilenetv3
  • Marsseg: Mars surface semantic segmentation with multilevel extractor and connector
  • Attention is all you need
  • Training data-efficient image transformers & distillation through attention
  • Coatnet: Marrying convolution and attention for all data sizes
  • Segmarsvit: Lightweight mars terrain segmentation network for autonomous driving in planetary exploration
  • Edr-transunet: Integrating enhanced dual relation-attention with transformer u-net for multiscale rock segmentation on mars
  • Rockseg: A novel semantic segmentation network based on a hybrid framework combining a convolutional neural network and transformer for deep space rock images
  • Marsnet: Automated rock segmentation with transformers for tianwen-1 mission
  • Marsterrnet: A u-shaped dual-backbone framework with feature-guided loss for martian terrain segmentation
  • Terseg: A dual-branch semantic segmentation network for mars terrain and autonomous path planning
  • Context camera investigation on board the mars reconnaissance orbiter
  • Conequest: A benchmark for cone segmentation on mars
  • Marsls-net: Martian landslides segmentation network and benchmark dataset
  • Mars exploration rover mission
  • Landing site selection and characterization of tianwen-1 (zhurong rover) on mars
  • A kernel-based multi-featured rock modeling and detection framework for a mars rover
  • Marsdata-v2, a rock segmentation dataset of real martian scenes
  • Ai4mars: A dataset for terrain-aware autonomous driving on mars
  • S5mars: Semi-supervised learning for mars semantic segmentation
  • Marsscapes and udaformer: A panorama dataset and a transformer-based unsupervised domain adaptation framework for martian terrain segmentation
  • Pixel Annotation Tool
  • Visionblender: a tool to efficiently generate computer vision datasets for robotic surgery
  • Early convolutions help transformers see better
  • Levit: a vision transformer in convnet’s clothing for faster inference
  • Mobilevit: Light-weight, general-purpose, and mobile-friendly vision transformer
  • Cmt: Convolutional neural networks meet vision transformers
  • Moat: Alternating mobile convolution and attention brings strong vision models
  • Inception transformer
  • Conformer: Local features coupling global representations for visual recognition
  • Mobile-former: Bridging mobilenet and transformer
  • Attention u-net: Learning where to look for the pancreas
  • Lightweight vision transformer with bidirectional interaction
  • Metaformer is actually what you need for vision
  • Deep residual learning for image recognition
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift
  • Gaussian Error Linear Units (GELUs)
  • Flatten transformer: Vision transformer using focused linear attention
  • Bridging the divide: Reconsidering softmax and linear attention
  • Breaking the low-rank dilemma of linear attention
  • How much position information do convolutional neural networks encode?
  • Self-attention with relative position representations
  • Conditional positional encodings for vision transformers
  • Cswin transformer: A general vision transformer backbone with cross-shaped windows
  • Incorporating convolution designs into visual transformers
  • Roformer: Enhanced transformer with rotary position embedding
  • Vit-5: Vision transformers for the mid-2020s (opens arXiv in a new tab)
  • Decoupled weight decay regularization
  • Bisenet v2: Bilateral network with guided aggregation for real-time semantic segmentation
  • Visual attention network
  • Scaling up your kernels to 31x31: Revisiting large kernel design in cnns
  • More convnets in the 2020s: Scaling up kernels beyond 51x51 using sparsity
  • Large separable kernel attention: Rethinking the large kernel attention design in cnn
  • A convnet for the 2020s