A lunar rock small sample target detection method based on multi-scale feature alignment

CN122200141BActive Publication Date: 2026-09-18DEEP SPACE EXPLORATION LABORATORY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610361369.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-24
Publication Date
2026-09-18
Estimated Expiration
2046-03-24

AI Technical Summary

Technical Problem

[0006]第一方面,针对现有技术的不足,本申请的目的在于提供一种基于多尺度特征对齐的月面石块小样本目标检测方法,解决了现有技术中样本稀缺适配不足、极端光照适应能力弱、背景干扰抑制效果差及跨域特征对齐缺失的问题

Benefits of technology

1)通过构建高保真“实测-仿真”样本库并采用多策略数据增强,有效扩充了训练数据规模与多样性,结合基于元学习的训练范式,使模型在极少量样本条件下即可达到稳定检测性能,解决了因月面样本稀缺导致模型难以有效训练的问题,提升了模型的样本适配性与泛化能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200141B_ABST
    Figure CN122200141B_ABST
Patent Text Reader

Abstract

The application provides a lunar rock small sample target detection method based on multi-scale feature alignment, and belongs to the field of deep space exploration and robot vision. The method aims to solve the detection problem caused by the scarcity of lunar samples, the changeable illumination and the domain difference. The scheme comprises the following steps: obtaining a to-be-detected image, extracting a multi-scale feature map, and generating an illumination adaptive weight based on the global gray mean of the image to perform feature fusion; fusing visual features and structured physical semantic description semantic features to generate multi-modal features and map the multi-modal features to scores; and finally calculating a confidence score and outputting a rock detection result meeting a threshold. Through the construction of a mixed sample library, illumination adaptive fusion, cross-domain feature alignment and multi-modal information fusion, the detection precision and robustness under small samples and complex illumination are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep space exploration and robot vision technology, specifically involving a method for detecting small samples of lunar rocks based on multi-scale feature alignment. It is applicable to applications such as lunar rover exploration, autonomous obstacle avoidance on the lunar surface, and scientific sampling. Background Technology

[0002] Accurate identification and localization of lunar rocks is a crucial foundational technology for achieving a high degree of autonomy and safe operation in lunar exploration missions. In actual missions, lunar rovers need to perceive obstacles such as rocks or scientific targets in real time within the unstructured and highly uncertain natural lunar environment. Their detection performance directly determines the reliability of path planning, obstacle avoidance, and sampling operations. However, due to the high cost of deep space exploration missions and the difficulty in obtaining lunar samples, the number of real lunar rock samples is extremely scarce, and annotation is costly, making it difficult to effectively train traditional target detection models that rely on large-scale labeled data. Furthermore, the lunar environment is characterized by the absence of atmospheric scattering and drastic changes in solar altitude angle, easily creating extreme imaging conditions with both strong sunlight and long shadows. In addition, the high degree of homogeneity in material composition and surface reflectivity between rocks and lunar regolith, coupled with the lunar dust cover effect, makes the target and background highly homogenized in terms of grayscale and texture features, further exacerbating the detection difficulty.

[0003] Currently, some explorations have been made in the identification and analysis of lunar soil or lunar surface particles in existing technologies. For example, Chinese patent application CN121147586A, published on December 16, 2025, discloses an intelligent particle identification method for screening lunar soil particles. This method mainly acquires the optical signals, image data, and surface electrical signals of the same lunar soil sample particles to construct a multimodal feature set. After standardizing the feature set, a multimodal deep learning model is constructed based on a convolutional neural network (CNN), a multilayer perceptron (MLP), and a stitching and fusion module. Particle classification is achieved through supervised learning training. This scheme utilizes an intelligent identification integrated model, combining multiple channel parameters such as image, scattered light, fluorescence, and electrical properties, to a certain extent automating particle shape differentiation, component identification, and particle size sorting, solving the problems of low efficiency and insufficient accuracy of manual particle labeling.

[0004] However, the aforementioned existing technologies still have significant limitations when applied to rock target detection in lunar rover exploration scenarios. First, these technologies primarily target detailed laboratory analysis of collected samples, relying on specialized equipment such as flow cytometers to acquire data in controlled experimental environments (e.g., constant microfluidic velocity, specific laser excitation sources). This instrument-dependent detection mode is unsuitable for non-contact, direct perception and real-time detection of distant, wide-field-of-view rock targets on the open, dynamic natural lunar surface by lunar rovers. Second, while these technologies employ multimodal fusion networks, their training paradigm is essentially still based on fully supervised learning relying on massive amounts of labeled data. In real deep space exploration missions, high-value lunar rock samples are extremely scarce, and labeling costs are extremely high. Existing technologies have not addressed the model generalization problem under conditions of very limited sample sizes (Few-Shot). Furthermore, the lunar environment exhibits extreme light contrasts (alternating bright light and long shadows) due to the lack of atmospheric scattering. Since the rocks and lunar regolith share the same material composition and are covered with dust of the same color, the rocks blend seamlessly with the background in terms of grayscale and texture, making effective segmentation difficult using conventional visual methods. The standardized processing and basic CNN architecture in the aforementioned technologies lack adaptive feature extraction mechanisms for such drastic light changes and strong background interference. Finally, these existing technologies do not consider the "domain" differences between simulated and real data, failing to leverage the high-fidelity simulation environment built on the ground to enhance the model's cross-domain adaptability.

[0005] In summary, overcoming challenges such as the scarcity of lunar samples, extreme lighting interference, and cross-domain feature mismatch, and developing a lunar rock target detection method that can fully utilize simulation data and a small number of measured samples to achieve high robustness and high accuracy, is a key technical problem that urgently needs to be solved in the field of deep space exploration. Summary of the Invention

[0006] Firstly, in view of the shortcomings of the existing technology, the purpose of this application is to provide a small sample target detection method for lunar rocks based on multi-scale feature alignment, which solves the problems of insufficient sample matching, weak adaptability to extreme lighting, poor background interference suppression effect and lack of cross-domain feature alignment in the existing technology.

[0007] The objective of this application can be achieved through the following technical solutions: A method for detecting small samples of lunar rocks based on multi-scale feature alignment includes: The image to be detected is acquired, and then input into the backbone network after updating the network weight parameters to extract multi-scale feature maps as input multi-scale feature maps. ; Obtain the global grayscale mean of the image to be detected, and generate illumination adaptive weights based on the global grayscale mean. Based on multi-scale feature maps and the illumination adaptive weights Generate fused feature map ; Extract the fused feature map The system obtains a structured physical semantic description of the input visual feature vector, extracts semantic feature vectors from the structured physical semantic description using a pre-trained model, concatenates the visual feature vectors and semantic feature vectors based on the channel dimension to generate a multimodal feature vector, and maps the multimodal feature vector to a multimodal feature mapping score. ; Obtain the system's preset temperature parameters Total number of categories of targets and interference The system calculates the maximum probability value in the category probability distribution to generate a confidence score, obtains the target confidence threshold and the interference filtering threshold, and outputs the coordinates and shape category of the stone detection box of the image to be detected in response to the confidence score satisfying the interference filtering threshold and the target confidence threshold.

[0008] Furthermore, the process of updating the network weight parameters includes: The original measured image and measured rock point cloud data are acquired. The rock foreground and lunar soil background are separated from the original measured image. A high-fidelity simulation image is generated based on the measured rock point cloud data, the rock foreground and the lunar soil background. An enhancement strategy is applied to the original measured image and the high-fidelity simulation image to generate a lunar rock sample library containing measured samples and simulation samples with real labels and real bounding boxes. A meta-learning task is constructed by extracting a support set and a query set from the lunar rock sample library. The samples from the support set and the query set are input into the unupdated backbone network to extract the feature vectors of the measured samples and the feature vectors of the simulated samples, and output the predicted detection boxes and the model prediction probabilities. The hierarchical cosine similarity between the feature vectors of the measured samples and the feature vectors of the simulated samples is calculated to generate the cross-domain feature alignment loss. The regression loss is calculated based on the predicted detection boxes and the ground truth labels. The classification loss is calculated based on the model prediction probabilities and the ground truth labels. Backpropagation is performed based on the cross-domain feature alignment loss, the classification loss, and the regression loss to update the network weight parameters.

[0009] Further, generating a high-fidelity simulation image based on the measured point cloud data of the rocks, the foreground of the rocks, and the background of the lunar soil includes: importing the measured point cloud data of the rocks into a 3D modeling tool to generate a polygonal model, configuring physical parameters and initial lighting parameters and rendering to generate initial simulation image data, inputting the original measured image and the initial simulation image data into a physical simulation correspondence verification network, extracting shallow features, mid-level features, and deep features and calculating feature similarity, obtaining a system-preset matching score threshold, and, in response to the feature similarity being lower than the matching score threshold, adjusting the incident angle and intensity parameters of the light source and re-executing the rendering verification process until the feature similarity meets the matching score threshold to generate the high-fidelity simulation image.

[0010] Further, the step of performing enhancement strategies on the original measured image and the high-fidelity simulation image to generate a lunar rock sample library containing measured samples and simulation samples with real labels and real bounding boxes includes: The original measured image and the high-fidelity simulated image are cropped and rotated to generate a first intermediate image. Illumination distortion enhancement is performed on the first intermediate image to generate a second intermediate image. A Gaussian distribution occlusion mask is generated and applied to the second intermediate image to perform lunar dust occlusion enhancement to generate a third intermediate image. Color normalization processing is performed on the third intermediate image to generate the lunar rock sample library.

[0011] Further, the execution of the backpropagation operation to update the network weight parameters includes: Perform inner update operations and outer update operations; among them, The inner layer update operation includes iteratively updating the network weighting coefficients and channel attention parameters of the weighted feature fusion using a first optimizer for the support set; The outer layer update operation includes iteratively updating the backbone network and language model encoding layer parameters using a second optimizer for the query set.

[0012] Further, the step of calculating the hierarchical cosine similarity between the measured sample feature vector and the simulated sample feature vector to generate the cross-domain feature alignment loss includes: Extract the feature vectors of the measured samples corresponding to shallow features, mid-level features, and deep features. With the simulated sample feature vector Obtain overflow prevention smoothing item Based on the formula Calculate the cross-domain feature alignment loss ,in This is a feature-level index.

[0013] Further, the calculation of regression loss based on the predicted detection box and the ground truth labeled box includes: Obtain the intersection-union ratio (IoU) of the predicted detection bounding box and the ground truth labeled bounding box. Calculate the Euclidean distance of the center point Length of the diagonal of the minimum bounding rectangle Extract aspect ratio consistency index According to the formula Generate adaptive weights Based on the formula Calculate the regression loss .

[0014] Further, the step of calculating the classification loss based on the model-predicted probability and the true label includes: Get the number of training samples And the total number of stone shape categories, extract the first Unique hot true label of each sample With model predicted probability Obtain the label smoothness coefficient and logarithmic smoothing term Based on the formula Calculate the cross-entropy classification loss .

[0015] Further, a backpropagation operation is performed based on the cross-domain feature alignment loss, the classification loss, and the regression loss to update the network weight parameters, including: Obtain the balance weight coefficients determined by the system search. Based on the formula Calculate the total loss function ,in, The cross-domain feature alignment loss is... For the classification loss, The regression loss is mentioned above; According to the total loss function Perform gradient backpropagation to update the network weight parameters.

[0016] Furthermore, the process of inputting the image to be detected into the backbone network after updating the network weight parameters to extract multi-scale feature maps is used as the input multi-scale feature maps. The process includes: inputting the image to be detected into the backbone network, which employs a CSPDarknet structure and embeds multiple Swin Transformer Blocks; extracting long-range features through the Swin Transformer Blocks; and outputting the input multi-scale feature map. .

[0017] Furthermore, the step of generating adaptive illumination weights based on the global grayscale mean... ,include: Obtain the threshold values ​​for low-light shadow areas and strong-light overexposure areas, and assign a first weight adjustment coefficient in response to the global grayscale mean being less than the low-light shadow area threshold value; A second weighting adjustment coefficient is assigned in response to the global grayscale mean being between the low-light shadow area threshold and the strong-light overexposure area threshold. In response to the global grayscale mean being greater than the overexposure threshold under strong light, a third weight adjustment coefficient is assigned, and the first weight adjustment coefficient, the second weight adjustment coefficient, or the third weight adjustment coefficient is input into the attention parameters of the hierarchical coordinate attention mechanism network to generate the illumination adaptive weights. .

[0018] Furthermore, the multi-scale feature map-based and the illumination adaptive weights Generate fused feature map ,include: Get the number of node inputs and smoothing terms The illumination adaptive weights After being processed by the activation function and mapped to the non-negative interval, according to the formula... For the multi-scale feature map The weighted fusion calculation is performed to generate the fused feature map. .

[0019] Furthermore, in the multi-scale feature map-based and the illumination adaptive weights Generate fused feature map The process also includes: The threshold values ​​for low-light shadow areas and strong-light overexposure areas are obtained. In response to the global grayscale mean being less than the low-light shadow area threshold, a Gaussian noise vector with a first variance is generated. In response to the global grayscale mean being between the low-light shadow area threshold and the strong-light overexposure area threshold, a Gaussian noise vector with a second variance is generated. In response to the global grayscale mean being greater than the strong-light overexposure area threshold, a Gaussian noise vector with a third variance is generated. The corresponding Gaussian noise vectors are superimposed on the feature data by element-wise addition and layer normalization is performed.

[0020] Further, the step of extracting the semantic feature vector of the structured physical semantic description through a pre-trained model includes: The structured physical semantic description is input into the language model to perform word segmentation and position encoding operations, and the tags corresponding to the hidden states are extracted to generate the semantic feature vector.

[0021] Furthermore, the temperature parameters preset by the acquisition system... Total number of categories of targets and interference The confidence score is generated by calculating the maximum probability value in the category probability distribution, including: Obtain the multimodal feature mapping score The temperature parameters With respect to the total number of categories of targets and interfering objects According to the formula Obtain the probability distribution values ​​for each category, where, For the first Multimodal feature mapping scores for each category For the category index, the maximum probability value in the probability distribution is extracted as the confidence score.

[0022] Furthermore, before obtaining the target confidence threshold and the interference filtering threshold, the method further includes: Obtain the cross-domain feature alignment loss generated during the training phase Calculate cross-domain feature alignment scores A preset effective threshold for cross-domain adaptation is obtained. In response to the cross-domain feature alignment score being less than the effective threshold, a secondary feature extraction operation is triggered. The image to be detected is re-input into the backbone network after the network weight parameters are updated to re-extract multi-scale feature maps as input multi-scale feature maps. And re-perform weighted fusion to generate an updated fused feature map. .

[0023] Secondly, in view of the shortcomings of the prior art, the purpose of this application is to provide a small sample target detection system for lunar rocks based on multi-scale feature alignment, which solves the problems of insufficient sample matching, weak adaptability to extreme lighting, poor background interference suppression effect and lack of cross-domain feature alignment in the prior art.

[0024] The objective of this application can be achieved through the following technical solutions: A small-sample target detection system for lunar rocks based on multi-scale feature alignment, comprising: The feature extraction module is used to acquire the image to be detected and input the image to be detected into the backbone network after updating the network weight parameters to extract multi-scale feature maps as input multi-scale feature maps. ; The feature fusion module is used to obtain the global grayscale mean of the image to be detected, and generate illumination adaptive weights based on the global grayscale mean. Based on multi-scale feature maps and the illumination adaptive weights Generate fused feature map ; The multimodal mapping module is used to extract the fused feature map. The visual feature vector is used to obtain the structured physical semantic description of the input, and the semantic feature vector of the structured physical semantic description is extracted through a pre-trained model. The visual feature vector and the semantic feature vector are concatenated based on the channel dimension to generate a multimodal feature vector. The detection output module is used to acquire the system's preset temperature parameters. Total number of categories of targets and interference The system calculates the maximum probability value in the category probability distribution to generate a confidence score, obtains the target confidence threshold and the interference filtering threshold, and outputs the coordinates and shape category of the stone detection box of the image to be detected in response to the confidence score satisfying the interference filtering threshold and the target confidence threshold.

[0025] Thirdly, in view of the shortcomings of the prior art, the purpose of this application is to provide an electronic device that solves the problems of insufficient sample matching, weak adaptability to extreme lighting, poor background interference suppression effect and lack of cross-domain feature alignment in the prior art.

[0026] The objective of this application can be achieved through the following technical solutions: An electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a method for detecting small samples of lunar rocks based on multi-scale feature alignment as described in the first aspect.

[0027] Fourthly, in view of the shortcomings of the prior art, the purpose of this application is to provide a computer-readable storage medium that solves the problems of insufficient sample matching, weak adaptability to extreme lighting, poor background interference suppression effect and lack of cross-domain feature alignment in the prior art.

[0028] The objective of this application can be achieved through the following technical solutions: A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for detecting small samples of lunar rocks based on multi-scale feature alignment as described in the first aspect.

[0029] The beneficial effects of this application are as follows: 1) By constructing a high-fidelity "real-world-simulation" sample library and adopting multi-strategy data augmentation, the scale and diversity of training data were effectively expanded. Combined with the training paradigm based on meta-learning, the model can achieve stable detection performance under conditions of very few samples, which solves the problem that the model is difficult to train effectively due to the scarcity of lunar samples and improves the model's sample adaptability and generalization ability.

[0030] (2) By designing an illumination-adaptive weight generation mechanism, the fusion weight of multi-scale features is dynamically adjusted according to the global gray-scale mean of the image to be detected, and noise injection adapted to illumination conditions is added to enable the model to effectively cope with the extreme imaging conditions of strong lunar illumination and long shadows, thereby enhancing the detection robustness of the model in scenarios with drastic changes in illumination.

[0031] (3) By introducing cross-domain feature alignment loss, the distance between the measured sample features and the simulated sample features in the feature space is forcibly narrowed during the model training process, which effectively bridges the "domain" difference between the simulated data and the real data, and improves the model's ability to transfer from the simulated data to the real scene and its cross-domain adaptability.

[0032] (4) By integrating visual features with semantic features of structured physical semantic description, a multimodal feature vector is constructed, which increases the feature discrimination between the target rock and the background and interference objects (such as meteorite craters and lunar ridges). Combined with the optimized out-of-distribution detection algorithm, interference objects can be filtered more accurately, the false detection rate can be reduced, and the detection accuracy can be improved. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic flowchart illustrating the overall framework of an embodiment of this application; Figure 2 This is a schematic diagram of the high-fidelity simulation sample generation process in a vacuum environment according to an embodiment of this application; Figure 3 This is a structural diagram of the illumination adaptive multi-scale feature extraction module according to an embodiment of this application; Figure 4 This is a schematic diagram of the multi-scale alignment element learning and training process according to an embodiment of this application; Figure 5 This is a diagram of the physical-simulation correspondence verification network (CVN) structure in an embodiment of this application. Detailed Implementation

[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0036] A method for detecting small samples of lunar rocks based on multi-scale feature alignment includes the following steps: Step 1: Construction of high-fidelity lunar simulation samples and multi-strategy data augmentation This module constructs a simulated lunar rock sample library that combines realism and diversity through a four-level process: "real-world sample collection - high-fidelity simulation generation - multi-dimensional enhancement - dataset partitioning," thus solving the problem of sample scarcity.

[0037] (1) Collection of original samples Simulated lunar regolith was laid in a vacuum simulation chamber with an atmospheric pressure below 1×10⁻³ Pa. This simulated lunar regolith was composed of a 3:1 mass ratio of volcanic ash to basalt particles. Samples of basalt from the Ulanqab volcano were selected; their main mineral components included 30%-45% pyroxene, 40%-55% plagioclase, and 5%-10% olivine. Their chemical composition and spectral reflectance characteristics were highly similar to those of high-titanium basalt samples from the Apollo lunar return rocks. At least 20 pieces (no fewer than 3 of each type) of lunar rock, ranging in size from 1-20 cm, were selected and arranged on the surface of the simulated lunar regolith, covering typical lunar rock morphologies such as micrometeorite impact angularity, solar wind erosion smoothness, large irregularity, fine texture granularity, molten mass, and fragmentation. Among them, "angular" stones refer to stones with an edge curvature radius less than 5% of the diameter of the largest circumscribed circle; "smooth" stones refer to stones with an average surface curvature change rate of less than 0.1; "large-sized irregular" stones refer to stones whose projected area in the image occupies more than 5% and whose aspect ratio is greater than 1.5; "granular" stones refer to stones with a maximum circumscribed size of less than 3cm; "molten block" stones refer to stones with a glassy texture on the surface and a reflectivity more than 15% higher than the surrounding lunar regolith; and "fragmented" stones refer to stones with obvious crack structures and crack lengths accounting for more than 30% of the maximum size of the stone. Using a xenon lamp solar simulator (illuminance 1200-1500 W / m², color temperature 5500-6000K) to simulate different lunar solar illuminances, images were collected at multiple angles (0°, 30°, 60°, 90°) and multiple poses (-45°, -30°, 0°, 30°, 45°). Twenty images were taken for each angle and pose combination, generating 400 original measured images to construct an original simulation sample library.

[0038] (2) Generation of high-fidelity LaMa simulation samples A Large Mask Autoencoder (LaMa) was employed to achieve accurate separation of the rock target from the background of the vacuum lunar regolith in the measured image. First, the original measured image was uniformly resized to 640×640 pixels and grayscale normalization was performed. Then, adaptive Otsu thresholding and manual fine-tuning were used to generate the foreground mask for the rock. Finally, the LaMa Transformer decoder was used to extract the foreground rock and repair the background lunar regolith, preserving the radiation characteristics and background texture of the lunar regolith. Point cloud data of the measured rock was acquired through 3D laser scanning (scanning accuracy 0.01mm), imported into 3ds Max to generate a polygonal model, and the material, albedo, roughness, refractive index, and diffuse color were configured based on the physical parameters of basalt. Illumination parameters were also configured to generate a high-fidelity simulation image (640×640 pixels) of "real background + virtual target".

[0039] To ensure feature consistency between physical and simulation data, a Physical-Simulation Correspondence Verification Network (CVN) was designed. The CVN consists of three convolutional layers (kernel sizes 3×3 / 3×3 / 1×1), two fully connected layers, with ReLU activation and a Sigmoid output layer. Shallow features (P3: 80×80×64), mid-level features (P4: 40×40×128), and deep features (P5: 20×20×256) of the measured and simulated images are input into the CVN to calculate feature similarity. Verification is considered successful when the matching score is ≥0.95 (this threshold was determined through a control group experiment to balance detection accuracy and sample utilization). When the feature similarity is below 0.95, the incident angle and intensity parameters of the light source in 3ds Max are automatically adjusted (with adjustment steps of 5° and 10%, respectively), and the rendering and verification process is re-executed until the similarity requirement is met or the preset maximum number of iterations (5) is reached.

[0040] (3) Enhancement of lunar surface-specific multi-strategy samples A four-dimensional enhancement strategy was designed to address the characteristics of the lunar environment: ① Geometric transformation (cropping ratios of 0.7, 0.8, 0.9, and 1.0, followed by resizing to 640×640; rotation angles of -90°, -45°, 0°, 45°, and 90°, followed by filling with black pixels); ② Illumination distortion enhancement (Gamma correction γ=0.7-1.3, corresponding to brightness ±30%; local histogram equalization, window size 16×16, contrast ±20%); ③ Lunar dust occlusion enhancement (generating Gaussian distribution occlusion masks, occlusion ratios of 0%, 5%, 10%, 15%, 20%, and 25%, lunar dust color, and transparency of 0.7-0.9); ④ Color normalization. Through these enhancement strategies, both the sample size and scene coverage were improved, expanding the sample library to 2000 images, covering six typical lunar rock morphologies, with over 300 images for each typical lunar rock type.

[0041] (4) Dataset partitioning The 2000 samples were divided into a training set (1600 samples) and a test set (400 samples) in a 4:1 ratio. The training set was further divided into a pre-training subset (1200 samples), a meta-learning support set (200 samples), and a meta-learning query set (200 samples). The pre-training subset and the support set and query set were mutually exclusive by category, and the support set and query set were mutually exclusive by sample.

[0042] Step 2: Illumination-Adaptive Multi-Scale Feature Extraction Based on the YOLOv5s architecture, a feature extraction network adapted to extreme lunar illumination and rock scale differences is constructed by integrating advanced feature extraction units and attention mechanisms.

[0043] (1) Optimization of basic network framework The backbone network adopts the CSPDarknet structure, embedding 4 Swin Transformer Blocks to replace the original 4 C3 modules. The specific structure is as follows: Input image (640×640×3) → Focus → Conv (64, 6×6,2) → BottleneckCSP (64, 64, 1) → Swin Transformer Block1 (64 channels) → Conv (128,3×3, 2) → Swin Transformer Block2 (128 channels) → Conv (256, 3×3, 2) → Swin Transformer Block3 (256 channels) → SPPF (256, 5×5 / 9×9 / 13×13) → Conv (512, 3×3,2) → Swin Transformer Block4 (512 channels) → Neck (BiFPN). Swin Transformer Block parameters: window size 7×7, number of layers 2, number of attention heads 8, hidden layer dimension is the same as the input channel, dropout=0.1.

[0044] The neck network adopts a BiFPN structure. The core achieves multi-scale feature fusion through bidirectional cross-scale connections with "two input nodes as the main component and three input nodes as the auxiliary component". The specific node connection method is as follows: ① Top-down path (upsampling, deep layer → shallow layer): Node 1 (Dual Input): Input P5 (20×20×256), P5 dimensionality reduction feature after 1×1 convolution (20×20×128), weighted fusion and then upsampled by 2 times, output P5_up (40×40×128); Node 2 (Dual Input): Input P5_up (40×40×128), P4 dimensionality reduction feature after 1×1 convolution (40×40×128), weighted fusion and then upsampled by 2 times, output P4_up (80×80×64); Node 3 (Dual Input): Input P4_up (80×80×64), P3 dimensionality reduction feature after 1×1 convolution (80×80×64), weighted fusion and then output shallow fused feature P3_fuse (80×80×64); ② Bottom-up path (downsampling, shallow layer → deep layer): Node 4 (three inputs): Input P3_fuse (80×80×64), original P3 features processed by 1×1 convolution (80×80×64), P4_up features processed by 2x downsampling and adaptation (40×40×128), weighted and fused to output P4_fuse (40×40×128); Node 5 (three inputs): Input P4_fuse (40×40×128), original P4 features processed by 1×1 convolution (40×40×128), P5_up features processed by 2x downsampling and adaptation (20×20×256), weighted and fused to output P5_fuse (20×20×256); Node 6 (two inputs): Input P3_fuse (80×80×64), P4_fuse features processed by 2x downsampling (80×80×64), output the final P3 Output feature (80×80×64); Node 7 (dual input): Input P4_fuse (40×40×128) and P5_fuse are downsampled by 2 times (40×40×128), and the final output P4 output feature (40×40×128) is output; Node 8 (dual input): Input P5_fuse (20×20×256) and P4_fuse are upsampled by 2 times (20×20×256), and the final output P5 output feature (20×20×256) is output.

[0045] All node fusion follows the formula: ,in, This is the fused feature map. To input multi-scale feature maps, For feature adaptive weights ( >0), =10⁻ 5 For the smoothing term, n=2 (two-input nodes) or n=3 (three-input nodes), this formula can enhance the feature representation of small-sized stones (<5cm) and avoid feature loss.

[0046] (2) Hierarchical CA attention mechanism embedding The Coordinate Attention (CA) mechanism is layered and embedded into the Neck network of YOLOv5: The input of the shallow CA (P3) is connected to the output of the C3 module of the Neck (80×80×64), and the output is connected to the downsampling branch of BiFPN to enhance the texture feature response (adapting to fine texture granularity); the input of the middle CA (P4) is connected to the Conv output of SPPF (40×40×128), and the output is connected to the middle branch of BiFPN to highlight structural features (adapting to molten block and angular shapes); the input of the deep CA (P5) is connected to the top input of BiFPN (20×20×256), and the output is connected to the upsampling branch of BiFPN to focus on category semantics (adapting to all morphological core attributes). To address the scale differences and morphological characteristics of lunar rocks ranging from 1 to 20 cm, the feature compression ratio was set to 4 for the shallow layer (64→16→64), 8 for the middle layer (128→16→128), and 16 for the deep layer (256→16→256) to ensure that no features of the full scale and multiple morphological features were extracted without omission.

[0047] (3) Design of lunar surface illumination sensing branch A light-sensing branch is added after the CA module and connected in parallel to the channel attention calculation branch of the CA module. The attention weights are dynamically adjusted based on the image gray-scale mean μ to adapt to the extreme lighting characteristics of the lunar surface: the original 640×640 image is extracted through the bypass of the network input end, and the global gray-scale mean μ is calculated (μ=ΣY / (640×640)); when μ<50 (low-light shadow area), the weight is increased by 1.5 times (γ=1.5), when 50≤μ≤150 (normal lighting), the weight remains unchanged (γ=1.0), and when μ>150 (strong light area), the weight is reduced by 0.8 times (γ=0.8). The weight modulation is achieved by element-wise multiplication.

[0048] (4) Feature fusion optimization The BiFPN structure enables weighted fusion of multi-scale features. The weight parameters are adaptively learned during the training process (the initial weight is set to 1.0 and iteratively updated through backpropagation). A BatchNorm layer is added to stabilize the weight updates, ensuring the effective aggregation of stone features under different scales, shapes, and lighting conditions.

[0049] In this invention, the weights of BiFPN are constrained using the Fast Normalized Fusion method: on the one hand, by constraining the non-negativity of the weights, for each weight... First, it is processed by the Sigmoid activation function (i.e. This limits its output value to the (0,1) range, eliminating the need for an additional ReLU layer; on the other hand, weight normalization ensures that the activated weights... Substitute the features into the feature fusion formula and use the "weight sum + smoothing term" method to complete the normalization process.

[0050] Step 3: Multi-scale aligned meta-representation learning and training We adopt a meta-learning paradigm and construct episodic tasks and design cross-domain loss functions to demonstrate the feature alignment effect between measured and simulated data.

[0051] (1) Meta-learning episodic task construction The N-way K-shot task paradigm (N=3, K=5) is adopted, that is, each training episode contains 3 target categories, and each category provides 5 support samples (support set) and 5 query samples (query set); the support set is used to quickly learn the common features of the categories, and the query set is used to verify the model's ability to adapt to morphological variants. 400 meta-tasks are randomly constructed to cover all core morphological categories.

[0052] (2) Two-layer gradient update strategy A two-layer gradient update mechanism is designed to optimize task adaptation: ① Inner layer update (support set): The SGD optimizer (momentum 0.9) is used with a learning rate α = 0.001, iterating 5 times to update the BiFPN weighting coefficients and CA module channel attention parameters, quickly adapting to the current category's morphological features. The loss function is cross-entropy loss; ② Outer layer update (query set): The Adam optimizer (… =0.9, =0.999), learning rate =0.0005, iterate 100 times, update the backbone network, SwingTransformer, BERT encoding layer, and ODIN parameters to improve the model's adaptability to different morphological combinations, and use Focal loss as the loss function.

[0053] (3) Multi-scale feature alignment loss function Design a total loss function that integrates classification loss, regression loss, and cross-domain feature alignment loss: ,in =1.5 (determined through grid search) ∈[0.5, 2.0], step size 0.5, evaluate mAP@0.5 on the validation set and select the optimal value), the calculation method of each component loss is as follows: ① Cross-entropy classification loss A labeled, smoothed cross-entropy loss method is used for classifying six types of stone morphology to alleviate overfitting on small samples. The formula is as follows: Where N is the number of word training tape measure samples, and C is the category index. Let be the unique hot true label of the i-th sample. To predict the model's probabilities (activated by the Softmax function), set the label smoothing coefficients α=0.1 and ε=10-6 (to avoid log(0) errors). ②Regression loss CIoU loss is used to accurately measure the detection box positioning error. The formula is: ,in , , , , .

[0054] Where B = (x1, y1, x2, y2) is the predicted detection box. This is the actual annotation box. Let d be the intersection-union ratio, d be the Euclidean distance between the centers, and c be the diagonal length of the minimum outer matrix. To predict the width and height of the bounding box, The actual frame width and height, As an indicator of aspect ratio consistency, For adaptive weights, ε=10⁻ 6 (Avoid division by zero errors).

[0055] ③ Cross-domain feature alignment loss Based on a layered cosine similarity design with shallow, medium, and deep features, the feature distribution of measured and simulated samples is forced to be consistent. The formula is as follows: Where k=1, 2, 3 correspond to shallow (64-dimensional), medium (128-dimensional), and deep (256-dimensional) features, respectively. The feature vector of the measured sample. For the feature vector of the simulation sample, Denotes the L2 norm, ε=10⁻ 6 .

[0056] Step 4: Lunar-specific out-of-distribution detection and target output By embedding multimodal features and optimizing algorithms, we can achieve accurate filtering of lunar surface-specific interference objects and efficient output of rock targets.

[0057] (1) Multimodal feature embedding ① Visual features: The P3 / P4 / P5 three-layer multi-scale fusion features (dimensions of 80×80×64, 40×40×128, and 20×20×256 respectively) output by BiFPN in step 2 are obtained and then concatenated into a 1024-dimensional visual feature vector (64 dimensions in the shallow layer + 128 dimensions in the middle layer + 832 dimensions in the deep layer) after global average pooling in step 3. This vector has been enhanced with hierarchical CA attention to enhance the semantic features of lunar rock texture, structure and category, and is consistent with the feature distribution of the simulation samples after cross-domain feature alignment loss constraint. ② Semantic feature encoding: The pre-defined structured physical semantic description of "stone-high density-solid-weather resistant-low porosity" in step 3 is used as input into the pre-trained BERT-base model (12 layers, 768 hidden layer dimensions, 12 attention heads). After word segmentation (WordPiece segmentation strategy), position encoding and layer normalization, the CLS tag output of the last hidden state is extracted to generate a 768-dimensional semantic feature vector. This vector is trained through meta-learning and visual features to achieve semantic-visual alignment. ③ Cross-domain multimodal stitching: The 1024-dimensional cross-domain aligned visual features and 768-dimensional semantic features are fused by the channel stitching operator to generate a 1792-dimensional multimodal feature vector. This vector simultaneously contains the visual morphological information, physical attribute semantics and cross-domain adaptation features of the rock, which significantly expands the feature class distance between the rock and lunar surface interference objects.

[0058] (2) Enhanced lunar illumination disturbance Based on the global grayscale mean μ determination result of the illumination perception branch in step 2, the intensity of feature perturbation is dynamically adjusted to simulate feature variation under extreme lunar illumination, thereby improving the model's resistance to illumination interference. ① When μ < 50 (low-light shadow area), inject a Gaussian noise vector with a mean of 0 and a variance of 0.015 (to enhance feature discrimination under low light); ② When 50 ≤ μ ≤ 150 (normal light area), inject a Gaussian noise vector with a mean of 0 and a variance of 0.01 (to maintain feature stability); ③ When μ > 150 (strong light overexposure area), inject a Gaussian noise vector with a mean of 0 and a variance of 0.008 (to avoid feature distortion caused by overexposure). The perturbation method adopts element-wise addition, and after superposition, it is normalized by the LayerNorm layer to ensure the stability of feature distribution, forming a closed loop with the illumination adaptive weight modulation logic in step 2. Gaussian noise N(0, 0.01) is added to the multimodal feature space to simulate feature variation caused by changes in solar altitude angle, improving the robustness of the model to illumination fluctuations.

[0059] (3) Optimization of ODIN algorithm The ODIN (Out-of-Distribution Detector for Neural Networks) algorithm is optimized for lunar surface interference characteristics. The temperature parameter T=1000, feature perturbation intensity ε=0.001, target confidence threshold 0.7, and interference filtering threshold 0.5 are set to achieve precise filtering of specific interference. A new cross-domain consistency verification step is added to calculate the cross-domain feature alignment score 1− When 1− If the feature cross-domain adaptation is ≥0.9, it is determined that the feature cross-domain adaptation is effective; otherwise, a secondary feature extraction is triggered (the multi-scale fusion process in step 2 is re-executed); the class probability calculation is based on the Softmax function. (in The multimodal feature mapping score (where C is the total number of target and interfering object categories) is used to extract the maximum probability value from the category probability distribution as the confidence score, further improving the accuracy of distinguishing between interfering objects and targets.

[0060] (4) Target output The model outputs detection results including: the coordinates of the rock detection box (x1, y1, x2, y2), the shape category, and the confidence value, and supports data interaction with the lunar rover navigation system.

[0061] Experimental situation 1. Construction of high-fidelity lunar simulation samples and multi-strategy data augmentation (1) In a vacuum simulation chamber with an air pressure controlled below 1×10⁻³ Pa, simulated lunar soil consisting of a 3:1 mass ratio of volcanic ash and basalt particles (particle size range 0.1-5mm) was laid. Ulanqab volcanic basalt was selected as a sample (mineral composition including 30%-45% pyroxene, 40%-55% plagioclase, and 5%-10% olivine). Twenty samples ranging from 1-20cm in size were selected, covering six typical morphologies: angular, smooth, large irregular, fine-textured granular, molten, and fragmented (at least three samples of each morphology). A professional camera (focal length 50mm, aperture f / 8, shutter speed 1 / 100s, ISO 100) was used in a xenon lamp solar simulator (illuminance 1200-1500 ppm). Images were acquired under conditions of W / m² and color temperature of 5500-6000K. The shooting angles covered 0°, 30°, 60°, and 90°, and the shooting postures covered -45°, -30°, 0°, 30°, and 45°. 20 images were taken for each angle-posture combination, resulting in a total of 400 original measured images (the resolution was uniformly adjusted to 640×640 pixels).

[0062] (2) The high-fidelity simulation sample generation process is as follows: First, the original measured image is resized to 640×640 pixels and grayscale normalization is performed (pixel values ​​are mapped to [0,1]). An initial mask is generated by adaptive Otsu threshold segmentation. After manual fine-tuning, it is input into LaMa large mask autoencoder to achieve pixel-level separation between the stone foreground and the lunar soil background and repair the background lunar soil texture. Then, the measured stone point cloud data is obtained by three-dimensional laser scanning (scanning accuracy 0.01mm), imported into 3dsMax to generate a polygon model, configure the basalt physical parameters, match the camera parameters and lighting conditions during acquisition, and generate a simulation image of "real background + virtual target". Finally, a physical object-object simulation image is built with 3 convolutional layers (kernel size 3×3 / 3×3 / 1×1, output channel number 64 / 128 / 256) and 2 fully connected layers (output dimension 128 / 1) (activation function is ReLU, output layer is Sigmoid). The Simulation Correspondence Verification Network (CVN) inputs shallow features (P3: 80×80×64), mid-level features (P4: 40×40×128), and deep features (P5: 20×20×256) of the measured and simulated images into the CVN to calculate feature similarity. When the similarity is <0.95, the incident angle of the light source is adjusted by a step size of 5°, the illumination intensity is adjusted by a step size of 10%, and the image is re-rendered for verification (maximum iterations of 5 times). Finally, 800 valid simulated images are selected.

[0063] (3) A four-dimensional enhancement strategy was adopted to expand the samples. The geometric transformation included four cropping ratios of 0.7, 0.8, 0.9 and 1.0 (resized to 640×640 pixels after cropping) and five rotation angles of -90°, -45°, 0°, 45° and 90° (filled with black pixels after rotation). The illumination distortion included Gamma correction of γ=0.7-1.3 (corresponding to brightness ±30%) and local histogram equalization of window size 16×16 (corresponding to contrast ±20%). The lunar dust occlusion was achieved by generating Gaussian distribution occlusion masks (occlusion ratios of 0%, 5%, 10%, 15%, 20% and 25%, lunar dust color set to RGB (100,100,100), transparency 0.7-0.9). Color normalization was performed by Z-score standardization of pixel values. A total of 1200 enhanced samples were generated after the above enhancement, bringing the total size of the sample library to 2000. (4) The dataset is divided into 1600 training sets and 400 test sets in a 4:1 ratio. The training set is further divided into 1200 pre-training subsets, 200 meta-learning support sets and 200 meta-learning query sets. The pre-training subsets, support sets and query sets are mutually exclusive in terms of categories, and the support sets and query sets are mutually exclusive in terms of samples.

[0064] 2. Implementation of Illumination-Adaptive Multi-Scale Feature Extraction Module (1) Network configuration: ① Basic Framework: Built on YOLOv5s, with an input size of 640×640×3. The backbone network adopts the CSPDarknet structure, embedding 4 Swin Transformer Blocks to replace the original C3 module. The specific process is as follows: Input → Focus → Conv (64, 6×6, 2) → BottleneckCSP (64, 64, 1) → Swin TransformerBlock1 (64 channels) → Conv (128, 3×3, 2) → Swin Transformer Block2 (128 channels) → Conv (256, 3×3, 2) → Swin Transformer Block3 (256 channels) → SPPF (256, 5×5 / 9×9 / 13×13) → Conv (512, 3×3, 2) → Swin Transformer Block4 (512 channels) → Neck (BiFPN).

[0065] ②Swin Transformer Block Parameters: Window size 7×7, number of layers 2, number of attention heads 8, hidden layer dimension is the same as the input channel, dropout=0.1.

[0066] ③BiFPN structure: It adopts a bidirectional cross-scale connection with "two input nodes as the main and three input nodes as the auxiliary". The deep feature upsampling fusion is completed from the top to the bottom path, and the shallow feature downsampling fusion is completed from the bottom to the top path. The specific node connection is completely consistent with step 2.

[0067] The YOLOv5s basic framework has an input size of 640×640, with 4 Swing TransformerBlocks added to the backbone network and a BiFPN structure used in the neck. (2) Layered CA Attention and Illumination Perception Branch: ① Layered CA configuration: The shallow CA (P3) connects the output of the C3 module of the Neck (80×80×64) to the BiFPN downsampling branch, with a feature compression ratio of 4; the middle CA (P4) connects the Conv output after SPPF (40×40×128) to the middle branch of BiFPN, with a feature compression ratio of 8; the deep CA (P5) connects the top-level input of BiFPN (20×20×256) to the BiFPN upsampling branch, with a feature compression ratio of 16.

[0068] ② Illumination sensing branch: Extract the original image through the bypass of the network input terminal, calculate the global grayscale mean μ=ΣY / (640×640), and modulate the channel attention parameters of the CA module according to μ<50 (γ=1.5), 50≤μ≤150 (γ=1.0), and μ>150 (γ=0.8), and output the illumination adaptive weight ωᵢ.

[0069] ③ Feature fusion optimization: Feature fusion strictly follows the formula , where ε=10⁻ 5 n represents the total number of feature layers (n=3). The weight constraint uses Fast Normalized Fusion, first mapping the weights to the (0, 1) interval using Sigmoid activation, then performing normalization. The initial weight is set to 1.0, and subsequent updates are iteratively performed through backpropagation. A BatchNorm layer is added to stabilize the weight update process, ensuring effective aggregation of stone features under different scales, shapes, and lighting conditions. CA attention parameters: shallow layer compression ratio 4, middle layer 8, deep layer 16, and grayscale mean threshold for the lighting perception branch. μ =50 / 150; (3) Feature fusion: The feature adaptive weights of BiFPN are adaptively learned through the training process. The initial weights are set to 1.0 and iteratively updated through backpropagation.

[0070] 3. Meta-learning training execution (1) Meta-task construction The task configuration adopts the N-way K-shot paradigm (N=3, K=5). Each meta-task contains 3 types of stone shapes, and each type of shape provides 5 support samples and 5 query samples. 400 meta-tasks are generated through random construction to fully cover 6 core shapes. In terms of data partitioning, the support set is used to quickly learn the common features of each type of stone, and the query set is used to verify the model's adaptability to shape variations. The samples in the support set and the query set are mutually exclusive.

[0071] (2) Two-layer gradient update execution The inner update is performed on the support set, using an SGD optimizer with momentum of 0.9 and 5 iterations at a learning rate of α=0.001. The focus is on updating the BiFPN weighting coefficients and the channel attention parameters of the CA module. The loss function is labeled smoothing (α=0.1, ε=10⁻⁻⁶). 6The cross-entropy loss is used; the outer layer update is performed on the query set, using the Adam optimizer with β1=0.9 and β2=0.999, iterating 100 times with a learning rate of β=0.0005. The update scope covers the backbone network, SwinTransformer, BERT encoding layer and ODIN related parameters, and the Focal loss function is used.

[0072] (3) Loss function calculation Total loss function: ,in =1.5 (determined through grid search). Component loss: ① For labeled smooth cross-entropy loss, 6 morphological classifications are performed; ② For CIoU loss, accurately measure the detection box positioning error; ③ For cross-domain feature alignment loss, a hierarchical cosine similarity design based on shallow, medium and deep features is used to force the feature distribution of measured and simulated samples to be consistent.

[0073] (4) The training environment and parameter configuration are as follows: The hardware environment uses an NVIDIA A100 GPU with 80GB of video memory, an Intel Xeon Platinum 8375C CPU and 128GB of memory. The software environment is compatible with PyTorch 1.12, Python 3.8 and CUDA 11.6. The training parameters are set to batch size=16, and a total of 100 epochs are trained. The learning rate adopts cosine annealing scheduling (initial learning rate 0.001, final learning rate 1e-5). The training time per epoch is about 15 minutes.

[0074] 4. Distributed Off-Site Detection and Output (1) Multimodal feature embedding Multimodal feature embedding, centered on "visual-semantic-cross-domain alignment," first acquires the three-layer multi-scale fusion features from BiFPN output: P3 (80×80×64), P4 (40×40×128), and P5 (20×20×256). After global average pooling, these features are concatenated into a 1024-dimensional visual feature vector (64+128+832). This vector has been enhanced with layered CA attention to enhance the semantic features of stone texture, structure, and category, and is constrained by cross-domain feature alignment loss to maintain consistency with the feature distribution of simulated samples. Then, a structured physical semantic description of "stone-high density-solid-weather-resistant-low porosity" is input into a pre-trained BERT-base model (12 layers, 768 hidden layer dimensions, 12 attention heads). After WordPiece segmentation, positional encoding, and layer normalization, the CLS tags of the last hidden state are extracted to generate 768. A 1024-dimensional semantic feature vector is generated, which is trained through meta-learning to achieve semantic-visual alignment with visual features. Finally, the 1024-dimensional cross-domain aligned visual features and the 768-dimensional semantic features are fused through the channel concatenation operator to generate a 1792-dimensional multimodal feature vector. This vector simultaneously contains the visual morphological information, physical attribute semantics, and cross-domain adaptation features of the rock, significantly increasing the feature class distance between the rock and lunar surface interference objects.

[0075] (2) Illumination adaptive feature perturbation The illumination-adaptive feature perturbation, combined with the global grayscale mean μ determined in the illumination perception branch of step 2, dynamically adjusts the feature perturbation intensity to simulate feature variations under extreme lunar illumination, thereby improving the model's resistance to illumination interference: when μ < 50 (low-illumination shadow area), a Gaussian noise vector with a mean of 0 and a variance of 0.015 is injected to enhance feature discrimination under low illumination; when 50 ≤ μ ≤ 150 (normal illumination area), a Gaussian noise vector with a mean of 0 and a variance of 0.01 is injected to maintain feature stability; when μ > 150 (strong illumination overexposure area), a Gaussian noise vector with a mean of 0 and a variance of 0.008 is injected to avoid feature distortion caused by overexposure; the perturbation method adopts element-wise addition, and after superposition, it is normalized by the LayerNorm layer to ensure stable feature distribution, forming a closed loop with the illumination-adaptive weight modulation logic in step 2.

[0076] (3) Optimize the execution of the ODIN algorithm The ODIN algorithm was optimized to address the characteristics of lunar surface interference. Temperature parameter T=1000, feature perturbation intensity ε=0.001, target confidence threshold 0.7, and interference filtering threshold 0.5 were set to achieve precise filtering of specific interference. A cross-domain consistency verification step was added, calculating the cross-domain feature alignment score 1-Lcos. If 1-Lcos ≥ 0.9, the feature cross-domain adaptation is considered valid; otherwise, a secondary feature extraction is triggered (re-executing the multi-scale fusion process in step 2). Class probability calculation was based on the Softmax function. (in The multimodal feature mapping score (where C is the total number of target and interfering object categories) is used to extract the maximum probability value from the category probability distribution as the confidence score, further improving the accuracy of distinguishing between interfering objects and targets.

[0077] (4) Target output Outputs the coordinates (x1, y1, x2, y2), shape category, and confidence value of the rock detection box, and supports data interaction with the lunar rover navigation system.

[0078] 5. Result Comparison The method presented in this paper is compared with existing technologies, and the results are shown in Table 1. Compared with existing technologies (Faster R-CNN, Meta-YOLO, and the initial YOLO algorithm), this invention has significant advantages. The comparison of each core performance indicator is shown in the table below. In terms of core detection performance, this invention achieves a detection precision of 93%, a recall of 89%, and a mAP@0.5 of 92.3%, representing improvements of 21.0, 21.0, and 17.3 percentage points respectively compared to Faster R-CNN, 6.0, 9.0, and 6.0 percentage points compared to Meta-YOLO, and 14.5, 16.0, and 13.5 percentage points compared to the YOLOv5 baseline model. This achieves high-precision identification and localization of lunar rock targets. Addressing the core challenge of scarce lunar samples, this invention improves the adaptation rate for rock morphology by ≥20%, enhances the generalization ability of Meta-YOLO by 3 times, and improves training efficiency by 30% compared to general methods, far exceeding the 15% improvement of Meta-YOLO. This effectively overcomes the dual bottlenecks of model generalization and training efficiency in small sample scenarios. Regarding adaptability to the complex lunar environment, this invention achieves a false detection rate of ≤5% for lunar interference objects, compared to Faster R-CNN. R-CNN (>18%), Meta-YOLO (>10%), and YOLOv5 baseline model (>15%) reduced by more than 13 percentage points, significantly enhancing the ability to suppress lunar-specific interference. This fully demonstrates the technical superiority and engineering practicality of this invention in small-sample target detection tasks in extreme lunar environments.

[0079] Table 1 Comparison between the proposed method and existing technologies In lunar surface simulation environment testing, the invention achieved an average detection accuracy of 93% for rocks of different shapes, with a false detection rate of interference objects ≤5%, fully meeting reliability requirements.

[0080] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0081] The foregoing has shown and described the basic principles, main features, and advantages of this application. Those skilled in the art should understand that this application is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this application. Various changes and modifications can be made to this application without departing from the spirit and scope thereof, and all such changes and modifications fall within the scope of the claims of this application.

Claims

1. A method for detecting small samples of lunar rocks based on multi-scale feature alignment, characterized in that, include: The image to be detected is acquired, and then input into the backbone network after updating the network weight parameters to extract multi-scale feature maps as input multi-scale feature maps. ; The original measured image and measured rock point cloud data are acquired. The rock foreground and lunar soil background are separated from the original measured image. A high-fidelity simulation image is generated based on the measured rock point cloud data, the rock foreground and the lunar soil background. An enhancement strategy is applied to the original measured image and the high-fidelity simulation image to generate a lunar rock sample library containing measured samples and simulation samples with real labels and real bounding boxes. The original measured image and the high-fidelity simulation image are cropped and rotated to generate a first intermediate image. The first intermediate image is enhanced by illumination distortion to generate a second intermediate image. A Gaussian distribution occlusion mask is generated and applied to the second intermediate image to enhance lunar dust occlusion to generate a third intermediate image. The third intermediate image is then normalized to generate the lunar rock sample library. Obtain the global grayscale mean of the image to be detected, and generate illumination adaptive weights based on the global grayscale mean. Based on multi-scale feature maps and the illumination adaptive weights Generate fused feature map ; Extract the fused feature map The system obtains a structured physical semantic description of the input visual feature vector, extracts semantic feature vectors from the structured physical semantic description using a pre-trained model, concatenates the visual feature vectors and semantic feature vectors based on the channel dimension to generate a multimodal feature vector, and maps the multimodal feature vector to a multimodal feature mapping score. ; Obtain the system's preset temperature parameters Total number of categories of targets and interference The system calculates the maximum probability value in the category probability distribution to generate a confidence score, obtains the target confidence threshold and the interference filtering threshold, and outputs the coordinates and shape category of the stone detection box of the image to be detected in response to the confidence score satisfying the interference filtering threshold and the target confidence threshold.

2. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The process of updating the network weight parameters includes: A meta-learning task is constructed by extracting a support set and a query set from the lunar rock sample library. The samples from the support set and the query set are input into the unupdated backbone network to extract the feature vectors of the measured samples and the feature vectors of the simulated samples, and output the predicted detection boxes and the model prediction probabilities. The hierarchical cosine similarity between the feature vectors of the measured samples and the feature vectors of the simulated samples is calculated to generate the cross-domain feature alignment loss. The regression loss is calculated based on the predicted detection boxes and the ground truth labels. The classification loss is calculated based on the model prediction probabilities and the ground truth labels. Backpropagation is performed based on the cross-domain feature alignment loss, the classification loss, and the regression loss to update the network weight parameters.

3. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, Generating a high-fidelity simulation image based on the measured point cloud data of the rocks, the foreground of the rocks, and the background of the lunar soil includes: importing the measured point cloud data of the rocks into a 3D modeling tool to generate a polygonal model, configuring physical parameters and initial lighting parameters and rendering to generate initial simulation image data, inputting the original measured image and the initial simulation image data into a physical simulation correspondence verification network, extracting shallow features, mid-level features, and deep features and calculating feature similarity, obtaining a system-preset matching score threshold, and, in response to the feature similarity being lower than the matching score threshold, adjusting the incident angle and intensity parameters of the light source and re-executing the rendering verification process until the feature similarity meets the matching score threshold to generate the high-fidelity simulation image.

4. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, The process of performing backpropagation to update network weight parameters includes: Perform inner update operations and outer update operations; among them, The inner layer update operation includes iteratively updating the network weighting coefficients and channel attention parameters of the weighted feature fusion using a first optimizer for the support set; Performing the outer layer update operation includes iteratively updating the backbone network and language model encoding layer parameters for the query set using a second optimizer.

5. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, The step of calculating the hierarchical cosine similarity between the measured sample feature vector and the simulated sample feature vector to generate cross-domain feature alignment loss includes: Extract the feature vectors of the measured samples corresponding to shallow features, mid-level features, and deep features. With the simulated sample feature vector Obtain overflow prevention smoothing item Based on the formula Calculate the cross-domain feature alignment loss ,in This is a feature-level index.

6. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, The calculation of regression loss based on the predicted detection box and the ground truth labeled box includes: Obtain the intersection-union ratio (IoU) of the predicted detection bounding box and the ground truth labeled bounding box. Calculate the Euclidean distance of the center point Length of the diagonal of the minimum bounding rectangle Extract aspect ratio consistency index According to the formula Generate adaptive weights Based on the formula Calculate the regression loss .

7. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, The calculation of classification loss based on the model-predicted probability and the true label includes: Get the number of training samples And the total number of stone shape categories, extract the first Unique hot true label of each sample With model predicted probability Obtain the label smoothness coefficient and logarithmic smoothing term Based on the formula Calculate the cross-entropy classification loss .

8. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 2, characterized in that, Based on the cross-domain feature alignment loss, the classification loss, and the regression loss, a backpropagation operation is performed to update the network weight parameters, including: Obtain the balance weight coefficients determined by the system search. Based on the formula Calculate the total loss function ,in, The cross-domain feature alignment loss is... For the classification loss, The regression loss is mentioned above; According to the total loss function Perform gradient backpropagation to update the network weight parameters.

9. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The image to be detected is input into the backbone network after the network weight parameters are updated to extract multi-scale feature maps, which are then used as input multi-scale feature maps. The process includes: inputting the image to be detected into the backbone network, which employs a CSPDarknet structure and embeds multiple Swin Transformer Blocks; extracting long-range features through the Swin Transformer Blocks; and outputting the input multi-scale feature map. .

10. A method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The illumination adaptive weight is generated based on the global grayscale mean. ,include: Obtain the threshold values ​​for low-light shadow areas and strong-light overexposure areas, and assign a first weight adjustment coefficient in response to the global grayscale mean being less than the low-light shadow area threshold value; A second weighting adjustment coefficient is assigned in response to the global grayscale mean being between the low-light shadow area threshold and the strong-light overexposure area threshold. In response to the global grayscale mean being greater than the overexposure threshold under strong light, a third weight adjustment coefficient is assigned, and the first weight adjustment coefficient, the second weight adjustment coefficient, or the third weight adjustment coefficient is input into the attention parameters of the hierarchical coordinate attention mechanism network to generate the illumination adaptive weights. .

11. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The multi-scale feature map-based and the illumination adaptive weights Generate fused feature map ,include: Get the number of node inputs and smoothing terms The illumination adaptive weights After being processed by the activation function and mapped to the non-negative interval, according to the formula... For the multi-scale feature map The weighted fusion calculation is performed to generate the fused feature map. .

12. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The multi-scale feature map and the illumination adaptive weights Generate fused feature map The process also includes: The threshold values ​​for low-light shadow areas and strong-light overexposure areas are obtained. In response to the global grayscale mean being less than the low-light shadow area threshold, a Gaussian noise vector with a first variance is generated. In response to the global grayscale mean being between the low-light shadow area threshold and the strong-light overexposure area threshold, a Gaussian noise vector with a second variance is generated. In response to the global grayscale mean being greater than the strong-light overexposure area threshold, a Gaussian noise vector with a third variance is generated. The corresponding Gaussian noise vectors are superimposed on the feature data by element-wise addition and layer normalization is performed.

13. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The step of extracting the semantic feature vector of the structured physical semantic description through a pre-trained model includes: The structured physical semantic description is input into the language model to perform word segmentation and position encoding operations, and the tags corresponding to the hidden states are extracted to generate the semantic feature vector.

14. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, The system obtains preset temperature parameters. Total number of categories of targets and interference The confidence score is generated by calculating the maximum probability value in the category probability distribution, including: Obtain the multimodal feature mapping score The temperature parameters With respect to the total number of categories of targets and interfering objects According to the formula Obtain the probability distribution values ​​for each category, where, For the first Multimodal feature mapping scores for each category For the category index, the maximum probability value in the probability distribution is extracted as the confidence score.

15. The method for detecting small samples of lunar rocks based on multi-scale feature alignment according to claim 1, characterized in that, Before obtaining the target confidence threshold and the interference filtering threshold, the method further includes: Obtain the cross-domain feature alignment loss generated during the training phase Calculate cross-domain feature alignment scores A preset effective threshold for cross-domain adaptation is obtained. In response to the cross-domain feature alignment score being less than the effective threshold, a secondary feature extraction operation is triggered. The image to be detected is re-input into the backbone network after the network weight parameters are updated to re-extract multi-scale feature maps as input multi-scale feature maps. And re-perform weighted fusion to generate an updated fused feature map. .

16. A small-sample target detection system for lunar rocks based on multi-scale feature alignment, characterized in that, include: The feature extraction module is used to acquire the image to be detected and input the image to be detected into the backbone network after updating the network weight parameters to extract multi-scale feature maps as input multi-scale feature maps. ; The original measured image and measured rock point cloud data are acquired. The rock foreground and lunar soil background are separated from the original measured image. A high-fidelity simulation image is generated based on the measured rock point cloud data, the rock foreground and the lunar soil background. An enhancement strategy is applied to the original measured image and the high-fidelity simulation image to generate a lunar rock sample library containing measured samples and simulation samples with real labels and real bounding boxes. The original measured image and the high-fidelity simulation image are cropped and rotated to generate a first intermediate image. The first intermediate image is enhanced by illumination distortion to generate a second intermediate image. A Gaussian distribution occlusion mask is generated and applied to the second intermediate image to enhance lunar dust occlusion to generate a third intermediate image. The third intermediate image is then normalized to generate the lunar rock sample library. The feature fusion module is used to obtain the global grayscale mean of the image to be detected, and generate illumination adaptive weights based on the global grayscale mean. Based on multi-scale feature maps and the illumination adaptive weights Generate fused feature map ; The multimodal mapping module is used to extract the fused feature map. The visual feature vector is used to obtain the structured physical semantic description of the input, and the semantic feature vector of the structured physical semantic description is extracted through a pre-trained model. The visual feature vector and the semantic feature vector are concatenated based on the channel dimension to generate a multimodal feature vector. The detection output module is used to acquire the system's preset temperature parameters. Total number of categories of targets and interference The system calculates the maximum probability value in the category probability distribution to generate a confidence score, obtains the target confidence threshold and the interference filtering threshold, and outputs the coordinates and shape category of the stone detection box of the image to be detected in response to the confidence score satisfying the interference filtering threshold and the target confidence threshold.

17. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a method for detecting small samples of lunar rocks based on multi-scale feature alignment as described in any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of a method for detecting small lunar rock targets based on multi-scale feature alignment as described in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Intelligent particle identification method for lunar soil particle screening

    CN121147586A

  • Transform feature enhancement-based lunar surface obstacle identification method

    CN118587686A

  • Method for realizing foreground multi-modal detection based on adaptive dynamic weight fusion

    CN121095721A