1. Introduction
Deep space exploration refers to the exploration of the Moon and more distant extraterrestrial celestial bodies [
1], which is of long-term significance for the advancement of human space science and technology [
2,
3]. As Earth’s closest planetary neighbor with potential habitability, Mars has become a primary target of international exploration missions. In this context, automatic recognition, segmentation [
4], and classification of Mars rover onboard surface scenes are essential components of intelligent exploration systems [
5,
6,
7].
Mars rover onboard surface scene classification plays a critical role in tasks such as rover autonomous navigation, scientific target identification, and onboard data processing. These applications require visual algorithms that can operate reliably under complex environmental conditions, including uneven illumination, dust interference, and terrain variability [
8]. With the rapid development of artificial intelligence, machine learning and deep learning methods have demonstrated strong performance in visual recognition tasks [
9,
10,
11,
12]. However, many commonly used models are computationally intensive and require large numbers of parameters. For example, Vision Transformer (ViT) models [
13] may contain 632 million parameters, and the simplified DeiT model [
14] can also reach 86 million parameters. Such requirements are difficult to meet in deep space exploration scenarios, where onboard hardware resources are severely constrained. For instance, the memory capacity of Mars rovers such as Spirit and Opportunity is only 128 MB [
15], while Curiosity [
16] and Perseverance [
17] are equipped with 256 MB. To address these limitations, existing studies have explored various methods for Mars image classification, aiming to improve performance while adapting to limited computational resources.
Previous research has investigated multiple approaches. Auld et al. [
18] conducted early studies on Martian gully classification, while Wagstaff et al. [
19,
20] introduced transfer learning into Mars image classification tasks. Lu et al. [
21] further optimized fine-tuning strategies based on this framework. For multi-category classification, Nandi et al. [
22] proposed a dynamic routing mechanism combined with transfer and ensemble learning, achieving an accuracy of 88% on the MSL dataset. Lyu et al. [
23] developed a high-precision terrain classification method, pushing accuracy beyond 90%. To address the scarcity of labeled data, Vincent et al. [
24] proposed a self-supervised learning framework based on contrastive learning, improving feature representation under limited supervision.
Despite the availability of large-scale Mars image datasets such as MSL [
19] and MSL-v2 [
20], high-quality annotated samples for scene classification remain limited. The complexity of Martian terrain, combined with dust interference and non-uniform illumination, makes manual annotation both costly and difficult to standardize. This significantly constrains the construction of large-scale annotated datasets. More importantly, during in-situ exploration, Mars rovers often encounter unknown environments where only a small number of labeled samples can be obtained. Under such conditions, the ability to rapidly adapt to new tasks with limited data becomes crucial.
However, most existing studies focus on improving classification accuracy under sufficient training samples and lack dedicated design schemes for few-shot scenarios. As a result, these methods struggle to meet the practical requirements of Mars exploration, including limited data availability, dynamic environments, and real-time constraints.
In recent years, meta-learning has shown strong potential in addressing few-shot learning problems due to its adaptability and generalization capability [
25]. Among these approaches, Model-Agnostic Meta-Learning (MAML) proposed by Finn et al. [
26] aims to learn model parameters that can be rapidly adapted to new tasks with only a few samples. Meanwhile, the Squeeze-and-Excitation (SE) attention mechanism can enhance feature representation by adaptively adjusting channel-wise importance. Previous studies have demonstrated the effectiveness of combining attention mechanisms with meta-learning in different domains. For example, Zhuang et al. [
27] applied SE-ResNet to lidar turbulence recognition, while Liu et al. [
28] used meta-learning for bearing fault diagnosis under few-shot conditions, verifying the effectiveness of combining attention mechanisms and meta-transfer learning. In the field of Mars exploration, Tan et al. [
8] introduced zero-shot learning to address unseen category recognition, but its performance is limited in scenarios where only a small number of labeled samples are available.
Therefore, this study proposed an SE-ResNet-MTL (SE-Enhanced ResNet Meta-Transfer Learning) model for Mars rover onboard surface scenes. Taking ResNet50 as the backbone, this method integrated transfer learning, SE channel attention feature enhancement, and MAML meta-learning to construct a classification model that balances full-dataset accuracy and few-shot generalization. A dedicated Mars surface dataset was built based on MSL data to experimentally verify the feasibility and superiority of the proposed method.
2. Materials and Methods
2.1. Construction of Dedicated Dataset for Mars Surface Scenes
To support the training and evaluation of the proposed SE-ResNet-MTL method, a Mars rover onboard surface scene classification dataset with standardized annotations and compatibility with few-shot learning tasks was required. Although publicly available Mars image datasets are large in scale, they generally lack scene-level annotations and therefore cannot be directly used for algorithm validation.
To address this issue, this study constructed a dedicated annotated dataset based on publicly available Mars exploration data from NASA. The dataset contained several representative scene categories, and systematic preprocessing and data augmentation were performed, providing a unified and reliable data foundation for subsequent model training and performance evaluation.
2.1.1. Data Source and Category Definition
The experimental data used in this study were derived from the publicly available MSL [
19] and MSL-v2 [
20] Mars surface image datasets. All images adopted in this dataset were RGB color images captured by the Mastcam sensor of the NASA MSL rover.
For dataset category definition, five major categories were determined, as shown in
Figure 1, and their names and semantic descriptions are listed in
Table 1. Each category contained a variety of scenes and surface morphologies, ensuring the model’s generalization ability to real-world scenarios.
During dataset construction, we selected and reserved a maximum of two representative frames per scene category for each Mars sol. This practice effectively excluded highly similar shots with identical terrain, lighting and shooting perspectives, reduced intra-sample redundancy within the same exploration period, and diversified the visual features covered by the dataset to strengthen the model’s generalization capability toward variable Martian terrain conditions. After standardized sample sorting and screening, the final curated dataset contained 1000 RGB images captured by the Mastcam sensor.
Single Martian frames sometimes contain multiple co-occurring targets, which creates label ambiguity for mixed scenes. To standardize labeling and reduce subjective bias, unified annotation protocols and fixed label priority rules were established in the following sequence: Invalid > Artifacts > Rover_tracks > Rocks > Regolith. Blurry, overexposed, sky-dominated or irrelevant distant shots were uniformly annotated as Invalid. Frames featuring rover or lander hardware were marked as Artifacts, while images with distinct wheel indentations were labeled Rover_tracks. When loose regolith and intact rock masses coexist within one frame, rocks were treated as the dominant category. All samples followed a single-label scheme assigned by the primary scene content under the above priority rules. Frames with overly chaotic mixed terrain that cannot be clearly categorized were manually discarded to guarantee high dataset quality.
Annotation work was completed by three researchers, all of whom received unified training on category definitions and labeling specifications before labeling. The Cohen’s Kappa coefficient was utilized to quantify inter-annotator consistency, yielding an overall Kappa value of 0.87, which verified high uniformity and reliability of all annotated samples. The exact sample quantity and percentage share of each class after full curation are summarized in
Table 2.
2.1.2. Data Preprocessing and Partitioning
In the data preprocessing stage, all raw images were uniformly resized to
and normalized with the ImageNet mean
and standard deviation
. Online data augmentation was exclusively adopted for training subsets to expand feature diversity during model training, covering random horizontal flipping, brightness adjustment and contrast stretching, as shown in
Figure 2. These transformed augmented samples were only temporarily generated in the training pipeline and are not be permanently stored together with original images. By contrast, validation images were processed with resizing and normalization only, without any augmentation operations, to guarantee stable and reproducible evaluation results.
The dataset partitioning was performed at the sol level to prevent data leakage between training and validation sets. All Mars sols were sorted chronologically, and images from the last 20% of sol IDs were designated as the validation set, while the remaining 80% of sols formed the training set. This sol-disjoint split ensures that training and validation samples correspond to completely different exploration periods and shooting locations, effectively avoiding the overlap of adjacent shooting sequences and near-duplicate terrain scenes. For few-shot learning, a standard configuration was adopted: in the 1-shot setting, each category included 1 support sample and 15 query samples; in the 5-shot setting, each category included 5 support samples and 15 query samples. This setup ensures the rationality and reliability of the few-shot evaluation.
2.2. ResNet50 Baseline Model
Mars surface images generally exhibit characteristics such as weak texture, low contrast, and blurred target boundaries. Conventional deep convolutional networks are prone to vanishing gradients and model degradation as network depth increases, making it difficult to stably extract effective features.
Therefore, this study selected the Residual Network (ResNet) as the backbone architecture. ResNet effectively addresses the vanishing gradient problem in deep networks through residual connections. Its core idea is to divide the network into multiple residual blocks [
29,
30] and directly transmit input information through skip connections, thereby preserving feature integrity, as shown in
Figure 3.
ResNet50 adopted a bottleneck block structure, in which convolutions were used to reduce and restore channel dimensions, while a convolution was used for feature extraction. This design reduces computational complexity while maintaining strong feature representation capability. Based on these considerations, ResNet50 was selected as the baseline backbone network in this study.
A baseline model for Mars rover onboard surface scene classification was constructed based on ResNet50. For the five core Mars scenes defined in this study, the dimension of the network output layer was adjusted to 5 to match the classification task requirements, as shown in
Figure 4.
This baseline model does not incorporate any enhancement or optimization modules and serves solely as a performance reference for subsequent optimization steps. It enables the quantitative evaluation of the contributions of transfer learning, the SE attention module, and other optimization strategies to overall model performance.
2.3. Transfer Learning
Deep networks represented by ResNet50 can achieve strong feature extraction performance when sufficient target-domain samples are available. However, annotated data for Mars rover onboard surface scenes are limited due to high acquisition costs, small sample sizes, and the difficulty of manual annotation. Directly training the model with randomly initialized parameters can easily lead to overfitting, slow convergence, and insufficient generalization ability.
To address these issues, transfer learning leverages large-scale annotated data in the source domain to pre-train the model and transfer the learned feature extraction capability to the target domain, thereby reducing dependence on target-domain samples and improving generalization performance [
27]. This study employed a pre-trained model based on Earth images to extract general low-level features such as edges and textures, and then adapted to Mars-specific high-level features by fine-tuning the upper layers of the network. This approach effectively mitigates the problems of limited annotated samples and overfitting in Mars rover onboard surface scenes, as shown in
Figure 5.
Transfer learning was introduced on the basis of the baseline model to optimize the initial model parameters. ImageNet pre-trained weights were loaded to initialize the ResNet50 backbone network, as shown in
Figure 6. During training, all layers of the backbone network were frozen, and only the classification head was trained. This strategy allows the model to adapt to the Mars rover onboard surface scene classification task while retaining general visual feature extraction capability, thereby improving the model’s generalization performance and feature relevance.
2.4. SE-ResNet Feature Enhancement and Activation Function Selection
After basic feature transfer and model initialization, Mars images still contain a large amount of interference information caused by dust occlusion, sudden illumination changes, invalid frames, and noise redundancy. Traditional convolution assigns equal weights to all feature channels and cannot effectively distinguish informative features from interference, thereby limiting the model’s discriminative capability in complex Martian environments.
To further improve the model’s ability to focus on key surface features, this study introduced an enhancement mechanism that adaptively adjusts feature weights.
The SE attention mechanism operates at the channel level by learning the importance of each feature channel and assigning different weights to highlight important features while suppressing less relevant ones [
31], as shown in
Figure 7. The module consists of two components: squeeze and excitation. The squeeze operation applies global average pooling to compress each feature channel along the spatial dimension, which is calculated as:
where
Z denotes the weights generated by the squeeze part;
,
represents the feature map of the
C-th channel;
denotes the squeeze operation applied to the feature channels;
H and
W represent the height and width of the feature map, respectively.
The excitation operation obtains the weight value of each feature channel, which is calculated as follows:
where
and
are the parameters of the first and second fully connected layers, respectively,
r denotes the reduction ratio;
denotes the excitation operation applied to the feature channels;
represents the weight of the
C-th channel; and
denotes the Sigmoid activation function.
Finally, channel-wise weighting is performed through the
operation, which is calculated as follows:
where
denotes the weighted feature output of the
C-th channel, and
; ⊗ denotes channel-wise multiplication.
On the basis of the transfer learning-optimized model, the SE attention module was embedded to construct the SE-ResNet feature enhancement model. An SE module was embedded inside each bottleneck block prior to residual summation, with the reduction ratio set to 16. When the entire backbone is frozen during training, the weights of embedded SE modules are also fixed without gradient updates, and only the final classification head is optimized.
Through the squeeze-and-excitation operations, adaptive weighting was applied to Mars surface feature channels to strengthen the representation capability of key features, such as regolith textures and rock edges, and improve the overall feature extraction performance of the network. The model inherits the advantages of residual connections in ResNet50, effectively alleviating vanishing gradients and network degradation, thereby further improving the effectiveness and stability of feature extraction.
Considering engineering constraints such as limited embedded hardware resources on Mars rovers and extreme exploration environments, four mainstream activation functions—ReLU, GELU, HardSwish, and LeakyReLU—were selected for comparative evaluation. The selection criteria included accuracy, generalization ability, computational efficiency and hardware compatibility. Based on experimental results, the optimal activation function that satisfies both the performance requirements of Mars rover onboard surface scene classification and the practical constraints of Mars exploration was identified and integrated into the SE-ResNet model, completing the final construction of the high-precision baseline classification model, as shown in
Figure 8.
2.5. MAML-Based Meta-Transfer Learning for Few-Shot Adaptation
The model optimized through transfer learning and feature enhancement can achieve high classification accuracy under full-sample conditions. However, when a Mars rover conducts autonomous exploration in unknown environments, only a very limited number of annotated samples are typically available, resulting in a typical few-shot learning scenario. Traditional fine-tuning methods optimize parameters for a single task and are prone to severe overfitting under extremely small sample sizes. As a result, the model struggles to generalize to new scenes and cannot meet the requirements of real-time perception and decision-making.
Meta-learning aims to enable the model to “learn to learn” and acquire the ability to rapidly adapt to new tasks through multi-task training [
32,
33]. As a model-agnostic meta-learning algorithm, MAML adopts a bi-level optimization mechanism: the inner loop performs task-specific adaptation based on the support set, while the outer loop optimizes global initial parameters using the query set. This allows the model to converge quickly with only a small number of gradient updates when facing new few-shot tasks, as shown in
Figure 9.
The meta-transfer learning framework adopted in this study integrated the advantages of transfer learning and meta-learning. Transfer learning provides high-quality initial parameters, while meta-learning further improves adaptation capability in few-shot scenarios. This mechanism aligns well with the engineering requirements of Mars exploration in unknown environments, including limited data availability, rapid response, and high reliability, thereby significantly improving the model’s classification performance and generalization ability under extreme few-shot conditions.
On the basis of the high-precision SE-ResNet classification model constructed in the previous section, Model-Agnostic Meta-Learning (MAML) was further integrated to enable few-shot adaptation capability. Through targeted meta-task generation, bi-level optimization training, and streamlined inference process design, the model was equipped with rapid classification capability in few-shot scenarios, effectively meeting the frequent few-shot adaptation requirements in Mars rover autonomous exploration.
For the five core Mars rover onboard surface scene classification task considered in this study, a corresponding N-way K-shot meta-task configuration was adopted, where the number of categories is (consistent with the dataset definition), and the number of samples K was set to 1 and 5, corresponding to two typical few-shot classification tasks: 1-shot and 5-shot. Meta-tasks were randomly sampled from the training set, and each meta-task contained two subsets: a support set and a query set. During training, 20 meta-tasks were generated per batch to ensure diversity in meta-training and to improve the model’s adaptation and generalization ability across different few-shot scenarios.
A MAML-based bi-level optimization strategy was designed to perform meta-training, enabling the learned initial parameters to rapidly adapt to new few-shot tasks and achieve the meta-learning objective of “learning to learn”. In the inner loop, task-specific fine-tuning was performed: the loss was computed on the support set, and parameters were updated via gradient descent with a learning rate of 0.01, allowing efficient adaptation to few-shot tasks. In the outer loop, meta-level optimization was conducted: using the inner-loop updated model, the loss was computed on the query set, and global initial parameters were updated using the Adam optimizer with a learning rate of 0.001. After multiple training iterations, the model can adapt to new few-shot tasks with high accuracy using only a small number of samples for fine-tuning.
Aiming at the needs of the Mars rover to detect unknown areas, an inference process was designed, as shown in
Figure 10. The meta-trained model can complete the classification of Mars small sample scenes with only a single parameter adaptation. The process has no complicated calculation and is adapted to embedded hardware constraints to meet the real-time requirements of autonomous visual perception.
2.6. Experimental Settings
The experiments were conducted on a computer equipped with an AMD Ryzen 9 7945HX CPU and an NVIDIA GeForce RTX 4060 GPU. To optimize memory utilization for 8G graphics hardware, we enabled the CUDA memory fragmentation optimization expandable_segments:True. Floating-point calculations strictly followed the IEEE standard, and TF32 acceleration was disabled to guarantee consistent and fair comparison across all ablation groups. For full reproducibility, global random seeds (torch, numpy, random, CUDA) were fixed to 42, and torch.backends.cudnn.deterministic was set to True. All visualization figures were exported at a unified resolution of 600 DPI.
Accuracy, Precision, Recall, and F1-score were selected as the core classification performance metrics. Meanwhile, the Accuracy Gap (Acc Gap) was introduced to evaluate model generalization ability: a smaller absolute value indicates stronger generalization performance, while a negative value indicates that the validation set performance exceeds that of the training set, suggesting that no overfitting occurs. Their calculation formulas are as follows:
In the activation function selection experiment for the SE module, additional indicators, including inference time (ms), FLOPs (G), parameters (M), and convergence epochs, were considered. Inference time refers to the average time required for single-sample model inference; FLOPs denotes the number of floating-point operations of the model; parameters represent the total number of trainable parameters; and convergence epochs indicates the number of training iterations required for the model to achieve optimal validation performance. The optimal activation function was selected based on multiple criteria, including performance, efficiency, and training characteristics.
The experimental dataset is the dedicated annotated dataset for five core Mars rover onboard surface scenes constructed in this study based on NASA MSL public images, which was divided into training and validation sets at a ratio of 8:2. All few-shot meta-tasks were sampled from the folders partitioned by this scheme. Few-shot tasks adopted an N-way K-shot configuration (, ): for 1-shot tasks, each category included 1 support sample and 15 query samples; for 5-shot tasks, each category included 5 support samples and 15 query samples, ensuring the rationality and reliability of the few-shot evaluation.
All supervised training was optimized with the Adam optimizer and cross-entropy loss. The batch size was fixed to 8, with an initial learning rate of 0.001 and weight decay of . A ReduceLROnPlateau scheduler was employed, halving the learning rate if validation accuracy plateaued for five consecutive epochs. A single-stage transfer learning strategy was implemented: the entire ResNet50 backbone remained fully frozen throughout training, and only the classification head was trainable; the reduction factor of the embedded SE attention module was set to 16. An early-stopping scheme with a patience of 20 and a maximum epoch limit of 200 was applied to terminate training when validation accuracy failed to improve over 20 continuous iterations. After full training, the checkpoint with the minimum validation loss was retained as the optimal full-data model.
The MAML algorithm was utilized for meta-training without explicit calculation of second-order derivatives. Instead, the complete computational graph was preserved during inner-loop adaptation. In the outer backpropagation stage, gradient correlations introduced by inner fine-tuning can be back-propagated to capture richer inter-task association information. The outer meta-update loop adopted the Adam optimizer with weight decay , where the inner-loop learning rate was set to and the outer-loop learning rate was set to . All classification accuracies and corresponding 95% confidence intervals for 1-shot and 5-shot tasks are averaged over 10 independent randomly sampled few-shot episodes. A total of 20 independent 5-way meta-tasks were sampled within each meta-training epoch, and each meta-task contained K () support samples and 15 query samples per category. Meta-training adopted loss-triggered early stopping with a patience of 5 and a maximum of 40 meta epochs; training would terminate if the global minimal meta loss was not refreshed for five successive epochs.
To guarantee fair and credible experimental outcomes, all hyperparameters, data sampling strategies, and evaluation workflows remained consistent across all experiments, covering cross-algorithm comparisons among mainstream meta-learning methods and a series of ablation experiments that gradually integrated transfer learning, the SE attention module, and MAML meta-learning components. Only one target component was altered per contrast group to strictly follow the single-variable principle and avoid extra confounding variables.
3. Results
3.1. Baseline Model and Transfer Learning Optimization Results
Taking ResNet50 without transfer learning as the baseline model, its training and loss curves are shown in
Figure 11. The core classification metrics on the dedicated dataset are as follows: Accuracy =
, Precision =
, Recall =
, F1-score =
, and Acc Gap =
.
Although the baseline model achieved basic classification capability for Mars rover onboard surface scenes, all performance metrics remain at a relatively low level, and significant overfitting was observed. This indicates that directly applying ResNet50, originally designed for Earth scenes, to Mars rover onboard surface scene classification results in insufficient task-specific feature representation, thereby demonstrating the necessity of subsequent optimization methods such as transfer learning.
After introducing ImageNet pre-trained weights into the baseline model, transfer learning optimization was completed, resulting in the transfer learning–enhanced ResNet50 model. Its training curve is shown in
Figure 12, and the core performance metrics were significantly improved: Accuracy =
, Precision =
, Recall =
, F1-score =
, and Acc Gap =
.
These results demonstrated that pre-trained weights provide high-quality initial parameters for the model, effectively transferring general visual feature extraction capabilities from Earth scenes to Mars rover onboard surface scene classification tasks. This approach reduces the training difficulty caused by the scarcity of annotated Mars data and significantly improves both classification performance and generalization ability. Furthermore, it establishes a strong performance foundation for subsequent SE-based feature enhancement and MAML-based few-shot adaptation.
3.2. SE Module Enhancement and Activation Function Selection Results
To further improve the feature extraction capability of the transfer learning-optimized model for Mars surface features, the SE (Squeeze-and-Excitation) attention module was embedded into the ResNet50 model in this study. The objective is to enhance the representation of informative features, such as regolith textures and rock edges, by adaptively adjusting channel-wise feature weights.
To meet the practical requirements of Mars exploration and ensure that the SE module satisfies the engineering constraints of Mars rover autonomous operation in terms of performance, generalization ability, and computational efficiency, four mainstream activation functions—ReLU, GELU, HardSwish, and LeakyReLU—were selected for comparative experiments. The optimal activation function was evaluated from three perspectives: basic performance, generalization stability, and computational efficiency. The experimental results for each dimension are presented in
Table 3 and
Table 4, respectively.
Experimental results showed that ReLU achieves the highest validation accuracy () among the four activation functions. GELU converges fastest at 39 epochs; its small positive accuracy gap of indicates a slight tendency toward overfitting, while negative accuracy gaps of the remaining three functions reflect negligible overfitting risk. Nevertheless, GELU bears the longest inference latency. LeakyReLU delivers the shortest inference time but obtains the lowest validation accuracy. HardSwish has poor classification performance and the slowest convergence speed.
After balancing classification precision, inference efficiency and embedded hardware constraints of Mars rovers, ReLU was selected as the activation function for SE-ResNet50, formulated as:
As a simple piecewise linear operator free of complex nonlinear calculations, ReLU exhibits potential for subsequent embedded deployment on Mars rover hardware.
After constructing the SE-ResNet50 model with the selected ReLU activation function, its training and loss curves are shown in
Figure 13. The core classification metrics of the model were improved to: Accuracy =
, Precision =
, Recall =
, and F1-score =
. Compared with the transfer learning-optimized ResNet50 model, the accuracy was improved by
, indicating that the integration of the SE module significantly enhances the relevance and effectiveness of feature extraction for Mars rover onboard surface scenes. This provides a high-precision baseline model for subsequent MAML-based few-shot adaptation.
To visually analyze the category-wise classification performance of the optimized SE-ResNet50 trained on the complete dataset, the confusion matrix on the validation set was plotted as
Figure 14. The vertical axis denotes ground truth scene labels and the horizontal axis represents model predictions, with each cell recording the number of samples for the corresponding classification outcome.
It could be observed that the model delivers error-free recognition for artifacts and invalid samples, with 38 and 35 correctly matched samples on their respective diagonal positions and no cross-category misjudgments occurring. The two categories possess highly distinctive visual characteristics: artifact images contain unique mechanical structures of the rover, while invalid frames mainly contain large sky regions, sandstorm blur and night-view scenes, features that the SE channel attention module can easily separate from ordinary Martian terrain textures without interference. All misclassified samples are concentrated among regolith, rocks and rover_tracks. These three terrain types share similar granular textures covered by Martian dust and exhibit frequent mutual misclassification. Representative mispredicted samples corresponding to these confusing cases are shown in
Figure 15.
To visually interpret the intrinsic imaging factors behind these inter-terrain misclassifications, representative mispredicted validation images matching the confusion matrix error distribution were displayed in
Figure 15.
For subfigure (a), fine regolith gravel covers shallow wheel indentations, obscuring the distinct structural texture of rover tracks and leading the model to misidentify the sample as pure regolith. Subfigure (b) is covered with scattered tiny rock fragments and dense interwoven surface cracks. The intricate linear crack patterns create visual features that are easily confused with wheel imprints, resulting in misclassification as rover_tracks. Subfigure (c) presents an extensive continuous compact hard ground surface, where subtle granular textures blur the boundary between hard crust and loose sediment, triggering misjudgment toward regolith. As for subfigure (d), aeolian wind erosion carves striped ripple patterns across sandy regolith surfaces. These wind-generated linear textures share strong visual similarity with shallow wheel tracks, causing the model to incorrectly assign the pure sand scene to the rover_tracks class.
The core source of all misclassification lies in the fact that micro-textures induced by dust coverage, surface cracking and wind deposition exhibit strong visual similarity with the inherent features of distinct Martian terrain categories. This visual ambiguity limits the feature discrimination capacity of the CNN backbone even with SE attention feature enhancement. Even so, the total number of misclassified samples remains low, which demonstrates that the embedded SE module can preserve distinguishable feature representations for most Martian scene categories.
3.3. MAML Meta-Learning Few-Shot Performance Results
MAML was integrated into the high-precision SE-ResNet50 transfer learning model for meta-training, forming the final SE-ResNet-MTL model. Its core classification metrics evaluated on the full validation set are as follows: Accuracy = , Precision = , Recall = , and F1-score = .
Compared with the transfer learning SE-ResNet50 model without meta-learning introduced in the previous section, the full-dataset validation accuracy of the SE-ResNet-MTL model only declines by , and its generalization loss stays within an acceptable range. This demonstrates that the proposed model can well retain strong classification performance on abundant labeled data.
More importantly, the meta-training mechanism substantially boosts the model’s fast adaptation ability under scarce sample conditions. To comprehensively verify the competitiveness of the proposed method, we conducted 5-way 1-shot and 5-way 5-shot classification experiments. All compared meta-learning frameworks adopted the transfer-learning-based SE-ResNet50 backbone for fair comparison. An additional control group equipped with vanilla ResNet50 (without SE modules) was set up to examine the contribution of the SE attention module. All models followed the identical experimental configurations, and the quantitative few-shot classification results were summarized in
Table 5 and
Figure 16.
To further evaluate the category-wise classification performance under different few-shot settings, the confusion matrices of the proposed SE-ResNet-MTL model under 5-way 1-shot and 5-way 5-shot protocols were plotted in
Figure 17 and
Figure 18, respectively. Consistent with the full-dataset results in
Section 3.2, most mispredictions still occur between regolith, rocks and rover_tracks due to visually overlapping micro-textures of Martian terrains, while artifacts and invalid frames maintain near-perfect identification even with limited labeled support samples.
3.4. Ablation Experiment
To quantitatively analyze the independent contribution of transfer learning, the SE attention module and meta-transfer learning to classification and few-shot generalization performance, we designed a stepwise ablation experiment based on ResNet50, with unified training hyperparameters and identical single-task fine-tuning pipelines for fair 1-shot/5-shot evaluation. The complete experimental metrics were listed in
Table 6.
First, compared with the ResNet50 baseline without transfer learning, introducing single-stage transfer learning significantly improves full-dataset classification performance: overall accuracy rises from to , while the 5-shot few-shot accuracy also increases from to . This demonstrates that ImageNet pre-trained weights effectively extract general visual features of Martian terrain and alleviate insufficient labeled sample issues in the target dataset.
Second, embedding the SE attention block into the transfer-learning ResNet50 backbone further lifts full-set accuracy to , with consistent gains in precision, recall and F1-score. The SE module strengthens channel-wise feature screening for rock, regolith and rover track textures, capturing subtle local differences on Martian surfaces. However, its standalone few-shot adaptation ability is limited, as its 1-shot and 5-shot accuracies remain lower than the vanilla transfer ResNet50, indicating the attention mechanism alone cannot solve scarce-sample generalization.
Third, integrating MAML meta-training to construct ResNet-MTL delivers a dramatic leap in few-shot performance: 1-shot accuracy jumps from to , and 5-shot accuracy from to . Although full-dataset accuracy drops to due to multi-task meta-update constraints, the meta-learning framework endows the model with powerful rapid adaptation capacity for small-sample tasks.
Finally, the proposed SE-ResNet-MTL combines all three components. It achieves the optimal few-shot results across all ablation groups, while retaining a competitive full-dataset accuracy of . This verifies that transfer learning provides robust base feature extraction, the SE module refines discriminative terrain features, and MAML meta-training compensates the model’s weak generalization under extremely limited samples; the three modules cooperate mutually without obvious performance trade-offs.
3.5. Comparison Experiment
To further validate the superiority of the proposed SE-ResNet-MTL framework, we conducted horizontal comparative experiments against multiple mainstream streamlined lightweight and classical CNN backbones, including ResNet18, MobileNetV2, EfficientNet-B0 and ShuffleNetV2. All comparative baseline models followed an identical standard single-task fine-tuning workflow for evaluation and adopted a standardized 5-way 1-shot/5-shot evaluation protocol to eliminate unfair comparison bias. Full quantitative experimental results were summarized in
Table 7.
From the perspective of full validation set classification performance, EfficientNet-B0 achieves the highest overall accuracy of among all comparative streamlined baselines, followed by ShuffleNetV2 () and ResNet18 (). MobileNetV2 delivers the weakest comprehensive metrics with only accuracy, which indicates its limited feature extraction capability for complex, texture-rich Martian surface terrain scenes.
In terms of few-shot generalization ability, all tested streamlined backbone networks suffer obvious performance degradation when facing extremely scarce labeled support samples. ResNet18 achieves the optimal 1-shot accuracy of among all comparative baselines, yet this value is still far inferior to the accuracy of our proposed model. EfficientNet-B0 obtains a relatively competitive 5-shot accuracy of , but its 1-shot result of exposes severe insufficient adaptive capacity under single-sample-per-class conditions. ShuffleNetV2 exhibits the worst few-shot performance overall, with merely 1-shot and 5-shot accuracy; its core channel-shuffling lightweight design sacrifices discriminative feature representation to reduce computational overhead, making it unsuitable for small-sample planetary remote sensing classification tasks.
In stark contrast, the proposed SE-ResNet-MTL surpasses all classical baseline backbones by a significant margin on both 1-shot and 5-shot tasks, with narrower 95% confidence intervals for accuracy. This indicates more stable generalization performance across randomly sampled few-shot tasks. Meanwhile, its overall classification accuracy of on the full validation set also outperforms all comparative streamlined backbone models. These experimental observations verify that the integration of SE channel attention enhancement and MAML meta-transfer learning delivers exclusive optimization tailored for few-shot Martian surface scene classification.
4. Discussion
This study proposed the SE-ResNet-MTL framework for few-shot Mars rover onboard surface scene classification and constructed a dedicated five-category annotated dataset based on NASA MSL Mastcam RGB public images. Combined with existing research progress and the methodology of this study, this section provides a comprehensive interpretation of the experimental results, analyzes the strengths and limitations of the proposed method, and discusses future research directions to clarify its academic significance and engineering application value.
The experimental results demonstrated that the proposed model achieves a good balance between full-dataset classification accuracy and few-shot generalization ability, effectively addressing key challenges in Mars exploration missions, including limited annotated samples, strong few-shot adaptation demands, and insufficient feature extraction capability of conventional networks. Notably, the confusion analysis of experimental results shows frequent mutual misclassification among regolith, rocks and rover_tracks, caused by highly similar micro-textures formed by dust coverage, surface fractures and aeolian ripples. Such misclassification will negatively affect onboard image triage and autonomous navigation. In practical Mars exploration operations, poor differentiation of these three terrain types may result in the vision system overlooking geologically valuable targets during data screening under bandwidth limitations, or generating incorrect surface roughness estimations that threaten safe route planning. Against this practical demand, the proposed SE-ResNet-MTL framework as a whole delivers improved fine-grained feature discrimination, effectively alleviating such cross-category misjudgments and supporting stable, trustworthy onboard visual decision-making.
In terms of comparison with existing research and result interpretation, the findings of this study are consistent with those reported by Wagstaff et al. [
18,
19,
20], indicating that transfer learning based on ImageNet pre-training can effectively alleviate overfitting and slow convergence caused by insufficient annotated samples on the Martian surface. By introducing transfer learning, the full-dataset classification accuracy of the ResNet50 baseline model increases from
to
, demonstrating that general visual features learned from Earth scenes can be effectively transferred to Mars remote sensing image classification tasks. Compared with previous studies [
22,
23], this work further incorporates the SE channel attention mechanism to enhance feature extraction capability. By adaptively reweighting feature channels, it strengthens the representation of key surface features such as rock edges and regolith textures, thereby further lifting the full-dataset classification accuracy to
. This indicates that the attention mechanism effectively compensates for the limited feature specificity of general backbone networks in complex Martian environments. In terms of few-shot performance, mainstream models exhibit significant performance degradation in 1-shot and 5-shot tasks, whereas the proposed SE-ResNet-MTL model achieves accuracies exceeding
, demonstrating substantial performance improvement. This result is consistent with the findings of Finn et al. [
26] that meta-learning enables rapid task adaptation, and this study further extends meta-transfer learning to the specific application of Mars rover onboard surface scene classification. The optimization mechanism of MAML matches the sample-scarce and fast-response requirements of Mars rover autonomous exploration, and it achieves notable performance advantages over both standard supervised baselines and other mainstream few-shot learning models.
This study presents several notable advantages in both method design and experimental system. First, the dedicated Mars rover onboard surface scene dataset constructed in this study adopted unified annotation standards, preprocessing procedures, and data partition strategies, providing a reproducible and standardized experimental foundation for subsequent related research. Second, a progressive modular optimization strategy is adopted: transfer learning provides high-quality initial parameters, the SE attention module enhances key feature representation, and MAML meta-learning improves few-shot generalization ability. These modules exhibit clear functional roles and strong synergistic effects, enabling the final model to achieve an optimal trade-off between full-dataset accuracy and few-shot generalization capability. Meanwhile, we compared four types of activation functions in this work and finally adopted ReLU, as it achieves the highest classification accuracy, the lowest loss and the smallest generalization gap among all candidates. In addition, the proposed SE-ResNet-MTL framework is not limited to Mars scenarios and demonstrates good scalability, providing general ideas and technical references for few-shot visual recognition tasks on other extraterrestrial bodies.
At the same time, this study still has certain limitations. The dataset constructed in this paper is based on NASA MSL Mastcam RGB public data [
19,
20] and includes only five core Mars rover onboard surface scene categories, resulting in limited sample size and scene coverage. Typical geomorphological features with high scientific value, such as small impact craters, ancient riverbeds, and gullies, are not sufficiently represented, which may lead to performance fluctuations in unknown or more complex environments. Meanwhile, the dataset constructed in this work solely consists of RGB color images captured by MSL Mastcam. Such imagery contains abundant textures and surface details, serving as the mainstream data source for rover scientific target analysis. Besides, Mastcam color cameras differ drastically from grayscale Navcam and Hazcam in imaging parameters, resolution and noise characteristics; mixing heterogeneous multi-camera data would introduce extra domain shifts, disrupt quantitative ablation comparisons of transfer learning, SE attention and MAML modules, and reduce experimental reproducibility. Nevertheless, the proposed model is not limited to three-channel RGB input. Single-channel grayscale images from Navcam and Hazcam can be fed into the network by duplicating the single channel to construct pseudo three-channel input. Grayscale camera data as well as multi-source auxiliary data including infrared spectra, LiDAR measurements and terrain elevation information, which are absent in the current experiments and may degrade classification stability under low illumination and dusty environments, will be prioritized in follow-up research. In addition, all experiments were conducted on high-performance GPU platforms, and further engineering optimization, such as model quantization and compression, is required for deployment on low-power embedded systems of Mars rovers. Overall, the results of this study have practical application value for Mars exploration engineering and extraterrestrial intelligent perception, providing feasible technical support for Mars rover autonomous navigation, scientific target identification, and onboard visual processing, and contributing to the improvement of autonomy and intelligence in extraterrestrial exploration.
Based on the above findings and existing limitations, future work can be further developed from multiple perspectives. Few-shot learning based on multi-modal fusion can be explored by combining optical images with multi-source data such as spectroscopy and terrain information to further improve model robustness and adaptability in extreme Martian environments. The dataset scale and scene coverage can be expanded, and finer-grained scene categories can be defined according to actual scientific exploration requirements to better meet mission needs. Furthermore, the framework possesses extension potential for scene classification tasks on the Moon and other extraterrestrial objects, pending follow-up embedded optimization to verify its practical deployment performance.
5. Conclusions
Aiming at the challenges of limited annotated samples, strong few-shot adaptation requirements, and insufficient feature extraction specificity of traditional networks in Mars rover onboard surface scene classification, this study integrates the SE channel attention mechanism and MAML-based meta-transfer learning. A dedicated Mars surface classification dataset was constructed, and a hierarchical optimization framework was developed. Based on these efforts, a few-shot Mars rover onboard surface scene classification approach is proposed that balances full-dataset classification accuracy and few-shot generalization ability, providing a feasible solution for intelligent scene recognition in Mars rover autonomous exploration.
Based on NASA MSL Mastcam RGB images, this study constructed a dedicated annotated dataset for five core Mars rover onboard surface scenes, providing standardized data support for model training. Using ResNet50 as the backbone network, feature extraction capability was progressively enhanced through transfer learning, SE attention module integration, and activation function selection. Subsequently, MAML meta-learning was incorporated to enable few-shot adaptation, forming a unified and progressive model optimization framework.
Experimental results show that the SE-ResNet50 transfer learning model achieves a full-dataset validation accuracy of 95.52%, representing an improvement of 17.41% over the baseline model. After integrating MAML, the SE-ResNet-MTL model achieves 90.5% and 91.5% accuracy in 1-shot and 5-shot classification tasks, respectively. This outcome reflects an explicit and controlled performance trade-off, as a modest 5.47% decline in full-dataset accuracy is traded for prominent gains in few-shot generalization capacity. Compared with traditional fine-tuning methods, the proposed model improves the 1-shot and 5-shot classification accuracy by 42.8% and 25.4%, respectively, while maintaining stable generalization performance. Furthermore, the model also delivers competitive and favorable accuracy gains over other mainstream few-shot learning baselines under the same experimental settings. Ablation experiments further verify the collaborative optimization effect of transfer learning, the SE attention module, and MAML meta-learning. The model achieves an effective trade-off between full-dataset accuracy and few-shot generalization ability. The model has the potential for embedded deployment. Model quantization, pruning and compression will be adopted in follow-up work to adapt to the low-power hardware onboard Mars rovers.
The dataset built in this work consists of five classes of Mastcam RGB images. It does not integrate multi-modal auxiliary information and lacks key geomorphological samples such as small impact craters, ancient riverbeds, and gullies. Despite these limitations, the dedicated dataset constructed in this study still provides a standardized data foundation for future research on Mars rover onboard surface scene classification. The proposed method effectively balances full-dataset classification accuracy and few-shot generalization ability, addressing the core challenges of few-shot scene classification in Mars exploration. It also provides valuable methodological reference and technical support for few-shot visual recognition tasks in deep space exploration.