A lithology identification method and device with adaptive illumination invariance and a medium
By estimating illumination parameters and decoupling features, the problem of low accuracy in lithology identification under different illumination conditions was solved, and dynamic separation of illumination features and lithology features was achieved, thereby improving the accuracy and robustness of lithology identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 山东浪潮智慧建筑科技有限公司
- Filing Date
- 2025-11-26
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, lithology identification methods have low accuracy under different lighting conditions and lack effective network architecture design to decouple lighting features from lithology features, resulting in insufficient generalization performance of the model in complex lighting environments.
By acquiring rock images under different lighting conditions, we perform lighting parameter estimation and image preprocessing, extract rock feature maps using the ViT architecture, and decouple lighting features from rock features in parallel using a multilayer perceptron and attention mechanism, dynamically adjusting feature weights to achieve decoupling of lighting features and rock features.
It improves the accuracy and robustness of lithology identification, and can effectively separate illumination features from lithology features under complex lighting conditions, thereby enhancing the model's illumination robustness and lithology identification accuracy.
Smart Images

Figure CN121354080B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological identification technology, and in particular to a method, device and medium for lithology identification that is adaptive to illumination invariance. Background Technology
[0002] Lithology identification, a core technology in geological exploration and resource assessment, traditionally relies on experts visually observing the texture, color, and structural features of rock samples for classification. With the development of remote sensing technology, rock images acquired by satellites and drones have become important data sources for lithology identification. However, the imaging characteristics of rocks vary significantly under different lighting conditions, leading to a substantial decrease in the accuracy of image-based identification methods. Especially under natural conditions such as alternating sunshine and rain, and changes in daylight and dusk, the same lithological sample may exhibit drastically different visual characteristics, severely limiting the practical application of lithology identification technology.
[0003] Most existing deep learning methods are based on training data under ideal lighting conditions, lacking the ability to effectively model changes in lighting, resulting in severely inadequate generalization performance in complex lighting environments. Although some studies have attempted to mitigate the impact of lighting variations through data augmentation or normalization techniques, these methods often require substantial computational resources and cannot fundamentally solve the problem of coupling between lighting and lithological characteristics. The main bottleneck in current research lies in the lack of effective network architecture design to decouple lighting features from lithological features, making it difficult for models to focus on learning the essential lithological characteristics. Therefore, an innovative method that can achieve feature decoupling at the network architecture level is urgently needed to overcome the technical bottleneck of lighting variations in lithological identification. Summary of the Invention
[0004] This application provides an adaptive illumination-invariant lithology identification method, device, and medium, which solves the technical problem of low visual recognition accuracy of lithology identification under illumination changes in the prior art.
[0005] In a first aspect, embodiments of this application provide an adaptive illumination-invariant lithology identification method, characterized in that the method includes: acquiring rock images under different illumination conditions and performing image preprocessing on the rock images to estimate illumination parameters, thereby obtaining a standard rock image; extracting features from the standard rock image to determine a rock feature map; performing illumination variation feature analysis on the standard rock image to obtain multidimensional illumination parameters; mapping the multidimensional illumination parameters to normalized parameters using a multilayer perceptron, and conditionally normalizing the rock feature map based on the normalized parameters to determine a normalized feature map; obtaining illumination features and rock features through parallel decoupling processing of attention mechanism differences based on the normalized feature map; and dynamically adjusting the weights of feature decoupling on the illumination features and rock features based on the multidimensional illumination parameters to obtain decoupled features of the rock image.
[0006] In one implementation of this application, image preprocessing of the rock image to estimate illumination parameters is performed to obtain a standard rock image. Specifically, this includes: performing histogram equalization on the rock image to obtain an enhanced rock image; performing nonlocal mean denoising on the enhanced rock image to determine a denoised rock image; and performing normalization on the denoised rock image and converting it into a PyTorch tensor format to obtain a standard rock image.
[0007] In one implementation of this application, feature extraction is performed on a standard rock image to determine a rock feature map. Specifically, this includes: determining the spatial dimension and feature dimension based on the standard rock image using feature extraction via the ViT architecture; and determining the rock feature map based on the spatial dimension and feature dimension.
[0008] In one implementation of this application, illumination variation feature analysis is performed on a standard rock image to obtain multidimensional illumination parameters. Specifically, this includes: performing parallel convolution on the standard rock image to determine an illumination information feature map; wherein each parallel convolution path is followed by a normalization layer and a ReLU activation function; using a channel attention mechanism, the illumination information feature map is weighted by channel weights, and the weighted illumination information feature map is concatenated to obtain a channel-concatenated feature map; and global average pooling is used to reduce the dimensionality of the channel-concatenated feature map to obtain multidimensional illumination parameters.
[0009] In one implementation of this application, the normalization parameters include: scaling parameters and offset parameters; based on the normalization parameters, conditional normalization is performed on the rock feature map to determine the normalized feature map, specifically including: conditional normalization of the rock feature map, and in the process of conditional normalization, normalization standardization processing of the rock feature map is performed through the normalization parameters to determine the normalized feature map.
[0010] In one implementation of this application, the parallel decoupling process includes: a first decoupling branch and a second decoupling branch; based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing with different attention mechanisms, specifically including: extracting photosensitive features from the normalized feature map through the first decoupling branch to obtain illumination features; wherein the first decoupling branch uses a 3×3 convolution kernel combined with a channel attention mechanism; and extracting lithological features from the normalized feature map through the second decoupling branch to obtain rock features; wherein the second decoupling branch uses a 3×3 convolution kernel combined with a spatial attention mechanism.
[0011] In one implementation of this application, the weights of illumination features and rock features are dynamically adjusted based on multidimensional illumination parameters to obtain decoupled features of the rock image. Specifically, this includes: performing a nonlinear transformation on the multidimensional illumination parameters and calculating the adjustment coefficients corresponding to the multidimensional illumination parameters after the nonlinear transformation to determine the illumination feature weights; calculating the rock feature weights based on the illumination feature weights; and obtaining the decoupled features through weighted fusion calculation based on the illumination feature weights and the rock feature weights.
[0012] In one implementation of this application, after dynamically adjusting the weights of the illumination features and rock features based on multidimensional illumination parameters to obtain the decoupled features of the rock image, the method further includes: determining the feature decoupling quality based on the decoupled features by evaluating the correlation between the illumination features and the rock features.
[0013] Secondly, embodiments of this application also provide an adaptive illumination invariance lithology identification device, characterized in that the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: acquire rock images under different illumination conditions, and perform image preprocessing on the rock images to estimate illumination parameters to obtain a standard rock image; extract features from the standard rock image to determine a rock feature map; perform illumination variation feature analysis on the standard rock image to obtain multidimensional illumination parameters; map the multidimensional illumination parameters to normalized parameters using a multilayer perceptron, and conditionally normalize the rock feature map based on the normalized parameters to determine a normalized feature map; obtain illumination features and rock features through parallel decoupling processing of attention mechanism differences based on the normalized feature map; and dynamically adjust the weights of feature decoupling of the illumination features and rock features based on the multidimensional illumination parameters to obtain decoupled features of the rock image.
[0014] Thirdly, embodiments of this application also provide a non-volatile computer storage medium for adaptive illumination-invariant lithology identification, storing computer-executable instructions. The computer-executable instructions are characterized by: acquiring rock images under different illumination conditions and performing image preprocessing on the rock images to estimate illumination parameters, thereby obtaining a standard rock image; extracting features from the standard rock image to determine a rock feature map; performing illumination variation feature analysis on the standard rock image to obtain multidimensional illumination parameters; mapping the multidimensional illumination parameters to normalized parameters using a multilayer perceptron, and conditionally normalizing the rock feature map based on the normalized parameters to determine a normalized feature map; obtaining illumination features and rock features through parallel decoupling processing of attention mechanism differences based on the normalized feature map; and dynamically adjusting the weights of feature decoupling between the illumination features and rock features based on the multidimensional illumination parameters to obtain the decoupled features of the rock image.
[0015] This application provides an adaptive illumination-invariant lithology identification method, device, and medium. By performing feature extraction and illumination estimation analysis on preprocessed illuminated rock images, corresponding feature maps and illumination parameters are obtained respectively. Based on the illumination parameters, the feature maps are decoupled through an adaptive adjustment mechanism. This solves the technical problem of low visual recognition accuracy of lithology identification under illumination changes in the prior art, realizes the dynamic separation of illumination features and lithological features, and provides an effective solution to the problem of lithology identification under complex illumination conditions. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart of an adaptive illumination-invariant lithology identification method provided in this application embodiment; Figure 2 A diagram illustrating the architecture of an adaptive illumination-invariant lithology identification model provided in this application embodiment; Figure 3 This is a schematic diagram of the internal structure of an adaptive illumination-invariant lithology identification device provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] This application provides an adaptive illumination-invariant lithology identification method, device, and medium. By performing feature extraction and illumination estimation analysis on preprocessed illuminated rock images, corresponding feature maps and illumination parameters are obtained respectively. Based on the illumination parameters, the feature maps are decoupled through an adaptive adjustment mechanism. This solves the technical problem of low visual recognition accuracy of lithology identification under illumination changes in the prior art, realizes the dynamic separation of illumination features and lithological features, and provides an effective solution to the problem of lithology identification under complex illumination conditions.
[0019] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0020] Figure 1 A flowchart illustrating an adaptive illumination-invariant lithology identification method provided in this application embodiment. Figure 1 As shown in the figure, the adaptive illumination-invariant lithology identification method provided in this application specifically includes the following steps: Step 101: Obtain rock images under different lighting conditions, and perform image preprocessing on the rock images to estimate lighting parameters in order to obtain standard rock images.
[0021] For example, the acquisition of rock images mainly targets rock images under different lighting conditions. Data sources include field collection, laboratory shooting, and public datasets. In order to ensure that the data quality is within a controllable range, this application performs image preprocessing on the rock images by estimating the lighting parameters, thereby realizing the generation of standard rock images and providing a data foundation for rock image feature extraction.
[0022] Specifically, the image preprocessing of the rock image to estimate illumination parameters to obtain a standard rock image includes: performing histogram equalization on the rock image to obtain an enhanced rock image; performing nonlocal mean denoising on the enhanced rock image to determine a denoised rock image; and normalizing the denoised rock image and converting it into a PyTorch tensor format to obtain a standard rock image.
[0023] In one embodiment, field collection was conducted using a high-resolution SLR camera with fixed parameters set to ISO 100, aperture f / 8, shutter speed 1 / 125 second, and focal length 50mm. The collected objects covered five common rock types, including granite, limestone, sandstone, shale, and basalt. There were at least 20 samples for each rock type, and each sample was no smaller than 20cm × 20cm. The surface was free of obvious weathering or pollution. During shooting, it was ensured that the sample occupied the central area of the image and the background was uniform.
[0024] Laboratory photography was conducted in a standard light box using a D65 standard light source and an adjustable light system to simulate five typical lighting conditions: direct strong light (>50,000 lux), diffused light (10,000-50,000 lux), low light (<1,000 lux), side lighting (5,000-20,000 lux), and backlighting (2,000-10,000 lux). Ten images were taken for each sample under each lighting condition. Simultaneously, 10,000 rock images with different lighting conditions were selected from publicly available datasets such as EarthVision, resulting in a dataset of 60,000 images in total. This included 40,000 images collected in the field, 10,000 images taken in the laboratory, and 10,000 images from publicly available datasets. All images were manually labeled with lithological categories, and the lighting parameters (including light intensity, direction, and color temperature) at the time of shooting were recorded.
[0025] The data acquisition process begins with sample preparation. The collected rock samples are cleaned to remove surface impurities. The lithology and number are marked on the back of the samples using a marker, and basic information such as the collection location and geological age is recorded. Field photography is conducted in sunny or cloudy weather, at different times (6-8 am, 11 am-1 pm, and 4-6 pm) to cover varying lighting conditions. A tripod is used to stabilize the camera, ensuring consistent shooting height (1 meter) and angle (45 degrees vertical). Ten images are taken of each sample under each lighting condition, and different lighting conditions are simulated by varying the shooting time or using reflectors / shades. Laboratory photography was conducted in a standard light source box, using an adjustable light source system to precisely control lighting parameters, including light intensity (adjustable from 0-100,000 lux), direction (adjustable from 0-360 degrees), and color temperature (adjustable from 3000K-10000K). Ten images of each sample were taken under five preset lighting conditions, and color correction was performed using grayscale and color charts. After all images were captured, they were imported into a computer and preliminarily processed using professional image processing software (such as Adobe Lightroom), including white balance correction, exposure adjustment, and sharpening, to ensure consistent image quality. Finally, the images were manually reviewed to remove blurry, overexposed, or underexposed images, and to confirm the accuracy of the lithological labels.
[0026] To ensure data quality, during the data acquisition phase, the camera histogram function was used to monitor exposure in real time to ensure images were neither overexposed nor underexposed. Simultaneously, a grayscale chart was used to calibrate white balance to guarantee color accuracy. After acquisition, two geological experts independently reviewed the lithological labels of all samples to ensure label accuracy. For samples with disputed labels, a third expert was invited to arbitrate.
[0027] Image quality checks included sharpness assessment (using the Tenengrad gradient or Variance method to calculate image sharpness, with a threshold of 100), brightness uniformity check (calculating the standard deviation of image brightness, with a threshold of 30), and noise level assessment (calculating the signal-to-noise ratio, with a threshold of 30 dB to adapt to image quality assessment under field acquisition conditions). Images that did not meet the requirements were either reacquired or discarded. Regarding data diversity, sufficient quantities of each lithological sample were ensured under all five illumination conditions, with uniform distribution of illumination parameters to avoid insufficient sample sizes under certain illumination conditions. Finally, statistical analysis was performed on the dataset, calculating the quantity distribution of each lithological sample, the statistical characteristics of illumination parameters (mean, variance), and features such as image brightness and contrast to ensure good representativeness and balance of the dataset, providing a high-quality data foundation for subsequent model training.
[0028] Data preprocessing follows a standardized process. First, all images are resized to a uniform size (224×224 pixels), and bicubic interpolation is used to maintain image quality and ensure consistent image size input to the model. The preprocessing workflow includes three main stages: image enhancement, normalization, and data augmentation. In the image enhancement stage, adaptive histogram equalization (CLAHE) is applied to enhance image contrast, with brightness boosting specifically for images under low-light conditions. Simultaneously, non-local mean denoising (NLM) is used to remove image noise while maintaining edge sharpness.
[0029] Step 102: Extract features from the standard rock image to determine the rock feature map.
[0030] For example, this application proposes adaptive illumination feature decoupling, where the inherent physical properties of rocks, such as mineral composition and texture structure, remain unchanged under different illumination conditions, while illumination changes mainly affect surface features such as brightness and contrast of the image.
[0031] By decoupling the illumination features from the lithological features in rock images through the collaborative work of the illumination estimation branch and the feature decoupler, the model focuses on learning the essential lithological features rather than the surface differences caused by illumination changes. This allows the model to identify lithological features that remain unchanged under different illumination conditions, thereby improving the accuracy and robustness of lithological identification. The model includes a feature extraction network, an illumination estimation branch, a feature decoupler, and an adaptive adjustment mechanism.
[0032] Specifically, feature extraction is performed on standard rock images to determine rock feature maps, including: determining spatial and feature dimensions based on standard rock images using feature extraction via the ViT architecture; and determining rock feature maps based on spatial and feature dimensions.
[0033] In one embodiment, the feature extraction network is based on the ViT architecture, with the input image... The feature map is obtained after passing through the feature extraction network. ;in, It is the spatial dimension of the feature map. It is the feature dimension.
[0034] Step 103: Perform illumination variation characteristic analysis on standard rock images to obtain multidimensional illumination parameters.
[0035] For example, the illumination estimation branch employs a lightweight multi-scale feature extraction network that uses parallel convolution combined with channel attention mechanism to analyze illumination variation features in standard rock images, thereby achieving efficient capture of illumination variation features in rock images.
[0036] Specifically, illumination variation feature analysis is performed on standard rock images to obtain multidimensional illumination parameters. This includes: performing parallel convolution on the standard rock images to determine illumination information feature maps; wherein each parallel convolution path is followed by a normalization layer and a ReLU activation function; using a channel attention mechanism, the illumination information feature maps are weighted by channel weights, and the weighted illumination information feature maps are concatenated to obtain a channel-concatenated feature map; and global average pooling is used to reduce the dimensionality of the channel-concatenated feature map to obtain multidimensional illumination parameters.
[0037] Figure 2 This is a diagram illustrating the architecture of an adaptive illumination-invariant lithology identification model provided in this application embodiment.
[0038] In one embodiment, the input rock image is first processed through three parallel convolutional paths, using convolutional kernels of sizes 3×3, 5×5, and 7×7 to capture illumination information at different scales. Each convolutional path is followed by a batch normalization layer and a ReLU activation function.
[0039] Then, a channel attention mechanism is applied to the feature map output by each path. This mechanism obtains channel descriptors through global average pooling and then generates channel weights through two fully connected layers.
[0040] Finally, the weighted feature maps are concatenated and dimensionality reduced using global average pooling, then passed through two fully connected layers to output information containing illumination intensity, direction, and color temperature. 3D illumination parameter vector ;in It refers to the number of lighting parameters.
[0041] Step 104: Using a multilayer perceptron, the multidimensional illumination parameters are mapped to normalized parameters, and based on the normalized parameters, the rock feature map is conditionally normalized to determine the normalized feature map.
[0042] For example, the feature decoupler adopts a structure that combines conditional normalization and decoupling branches. This application uses a multilayer perceptron to map multidimensional illumination parameters into normalized parameters, and performs conditional normalization on the rock feature map based on the normalized parameters, thereby realizing the normalization processing of rock image features.
[0043] Specifically, the normalization parameters include scaling parameters and offset parameters. Based on the normalization parameters, the rock feature map is conditionally normalized to determine the normalized feature map. This includes: conditionally normalizing the rock feature map, and during the conditional normalization process, normalizing the rock feature map using the normalization parameters to determine the normalized feature map.
[0044] In one embodiment, the illumination parameter L output by the illumination estimation branch is first mapped to the scaling parameter required for normalization through a multilayer perceptron (MLP). and offset parameters Then, conditional normalization is applied to the feature map F, a normalization process utilizing adaptive generation. and The parameters normalize the features.
[0045] It is important to note that the normalization stage uses statistical parameters from the ImageNet dataset (mean [0.485, 0.456, 0.406], standard deviation [0.229, 0.224, 0.225]) for standardization, mapping pixel values to the [-1, 1] interval to accelerate model convergence. The data augmentation stage employs techniques such as random horizontal flipping (probability 0.5), random rotation (±15 degrees), random cropping (randomly cropping a 224×224 region from the original image), and color dithering (brightness ±10%, contrast ±10%, saturation ±10%, hue ±5%) to enhance the model's robustness to lighting changes. The entire preprocessing process is automated, ensuring all training and testing images undergo the same processing steps, while preserving the original image's lighting information for lighting parameter estimation. Preprocessed images are stored in JPEG format with a quality factor set to 95 to balance image quality and storage space.
[0046] Step 105: Based on the normalized feature map, obtain the illumination features and rock features through parallel decoupling processing of differences in the attention mechanism.
[0047] For example, in order to solve the technical problem that it is not easy to separate the illumination features and lithological features of rock images in the prior art, it is necessary to effectively separate the illumination features and lithological features so that the model can focus on learning the essential lithological features.
[0048] Specifically, the parallel decoupling process includes: a first decoupling branch and a second decoupling branch; based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing with different attention mechanisms, including: through the first decoupling branch, light-sensitive features are extracted from the normalized feature map to obtain illumination features; wherein, the first decoupling branch uses a 3×3 convolution kernel combined with a channel attention mechanism; through the second decoupling branch, lithological features are extracted from the normalized feature map to obtain rock features; wherein, the second decoupling branch uses a 3×3 convolution kernel combined with a spatial attention mechanism.
[0049] In one embodiment, the normalized feature map is input into two parallel decoupling branches. One branch uses a 3×3 convolutional kernel combined with a channel attention mechanism to extract illumination-sensitive features, while the other branch uses a 3×3 convolutional kernel combined with a spatial attention mechanism to extract lithology-related features. Feature decoupling is achieved through the difference in attention mechanisms. The feature decoupling process is represented as follows: and .
[0050] in, , and It is a learnable decoupling function. It is a characteristic of illumination. It is a lithological characteristic.
[0051] Step 106: Based on multidimensional illumination parameters, dynamically adjust the weights of illumination features and rock features to decouple them, thereby obtaining the decoupled features of the rock image.
[0052] For example, this application achieves effective separation of illumination features and lithological features by dynamically adjusting the weights of feature decoupling between illumination features and rock features through parallel decoupling processing of attention mechanism differences, thereby improving the accuracy of lithological analysis and reducing illumination interference in lithological analysis.
[0053] Specifically, based on multidimensional illumination parameters, the weights of illumination features and rock features are dynamically adjusted to decouple the features, resulting in decoupled features of the rock image. This includes: performing a nonlinear transformation on the multidimensional illumination parameters and calculating the adjustment coefficients corresponding to the multidimensional illumination parameters after the nonlinear transformation to determine the illumination feature weights; calculating the rock feature weights based on the illumination feature weights; and obtaining the decoupled features through weighted fusion calculation based on the illumination feature weights and the rock feature weights.
[0054] Furthermore, after dynamically adjusting the weights of the illumination features and rock features based on multidimensional illumination parameters to obtain the decoupled features of the rock image, the method also includes: determining the quality of feature decoupling based on the decoupled features by evaluating the correlation between the illumination features and rock features.
[0055] In one embodiment, the estimated illumination parameters are obtained through a fully connected layer. Dynamically adjust the weights for feature decoupling. To adapt to different light intensities and directions.
[0056] in, It is a nonlinear transformation of illumination parameters. and These are learnable parameters. It is an adjustment coefficient used to balance the contributions of illumination characteristics and lithological characteristics.
[0057] The features output from the two branches are weighted and fused to obtain the final decoupled feature representation. .
[0058] Furthermore, this application also includes a corresponding model training method. The training of this model is performed on a server equipped with an NVIDIA A100 GPU (40GB VRAM), using the PyTorch 1.12 or higher deep learning framework to fully utilize the performance of the NVIDIA A100 GPU. The AdamW optimizer is used, the initial learning rate is set to 3e-4, a cosine annealing learning rate scheduling strategy is adopted, the total number of training epochs is 200, the batch size is 32, and an early stopping strategy is adopted, stopping training when the validation accuracy does not improve for 20 consecutive epochs. The weight decay coefficient is 0.05, the gradient clipping threshold is set to 1.0, and mixed precision training (AMP) technology is used to accelerate the training process and reduce VRAM usage. In the data preprocessing stage, the input image was resized to 224×224 pixels and standardized (mean [0.485, 0.456, 0.406], standard deviation [0.229, 0.224, 0.225]). Data augmentation techniques such as random horizontal flipping, random cropping, and color dithering were employed to enhance the model's generalization ability. During training, a composite loss function was designed, including standard cross-entropy loss, MSE loss of the illumination estimation branch, and L1 reconstruction loss of the feature decoupler. Specifically, the total loss function... ,in It is the cross-entropy loss of lithological classification. It is the MSE loss from the illumination parameter estimation. It is the L1 loss for feature reconstruction. , , The weights are 1.0, 0.5, and 0.3, respectively, and these weights were determined through a grid search.
[0059] The model training process is divided into three stages: the first 50 rounds constitute the first stage. Only the AFDM module and the classification head are trained, the ViT backbone network is frozen, and fine-tuning is performed using a small learning rate (1e-5) to allow the model to initially adapt to the illumination feature decoupling task; rounds 51 to 100 constitute the second stage, where all parameters are unfrozen, and end-to-end training is performed using a standard learning rate, focusing on optimizing the feature decoupling effect; rounds 101 to 150 constitute the third stage, introducing a hard sample mining strategy to weight samples that the model mispredicts, increasing the model's attention to hard-to-classify samples. In each training batch, the input image is first fed into the model, the decoupled features are extracted by the AFDM module, and then fed into the classification head for lithology category prediction. Simultaneously, the illumination parameter estimation error and feature reconstruction error are calculated, and finally, backpropagation and parameter updates are performed based on the composite loss function. Validation is performed every 10 rounds during training. The best model is selected based on the accuracy on the validation set, and an early stopping strategy is adopted with a patience of 20 to prevent overfitting. Training stops when the validation accuracy does not improve for 20 consecutive rounds.
[0060] To improve training efficiency and model performance, several training techniques were employed: First, a progressive training strategy was used, gradually increasing the intensity of data augmentation from simple to complex to avoid interference from overly complex data distributions in the early stages of the model. Second, knowledge distillation was implemented, using a pre-trained ViT-B / 16 model as the teacher model to transfer feature knowledge from the teacher model to the student model, accelerating convergence and improving performance. Third, label smoothing was used, replacing hard labels with soft labels and one-hot labels with a distribution of 0.9 and 0.1 to reduce the model's sensitivity to noisy labels. Fourth, gradient accumulation was implemented, updating parameters every four iterations, effectively increasing the batch size to 128 for more stable gradient estimation. Finally, residual connections were introduced in the feature decoupler to alleviate the gradient vanishing problem and ensure effective propagation of deep features. The combined application of these techniques improved the model's convergence speed and final performance, enabling the model to reach a stable convergence state within 150 rounds.
[0061] To comprehensively evaluate model performance, multiple evaluation metrics are employed: the main metrics include accuracy, precision, recall, and F1 score, which reflect the model's classification performance from different perspectives. For illumination invariance, an illumination robustness metric (LRS) is specifically designed. This metric quantifies the decrease in classification accuracy under different illumination conditions, and the calculation formula is as follows: .
[0062] in and These represent the minimum and maximum accuracy of the model under different lighting conditions in the test set, respectively. A smaller value indicates better illumination robustness of the model. In addition, a Feature Decoupling Quality (FDQ) index was calculated to evaluate the decoupling effect by comparing the correlation between illumination features and lithological features; a FDQ value closer to 0 indicates better decoupling. All indices were calculated on the test set, and the average of five independent experiments was used to reduce the impact of randomness.
[0063] The evaluation dataset consists of three parts: the main test set contains 5000 images, covering five main lithologies (granite, limestone, sandstone, shale, and basalt) and five lighting conditions (direct sunlight, diffused light, low light, sidelight, and backlight), with 200 images for each lithology and lighting condition combination; the extreme lighting test set contains 2000 images, focusing on lithology identification under extreme lighting conditions, such as direct sunlight and low light, with 200 images for each lithology under each extreme lighting condition; and the public dataset validation set contains 3000 images from the publicly available EarthVision dataset, used to verify the model's generalization ability in real-world outdoor scenes. All test set images were not used during training and validation, and the annotations were manually reviewed to ensure accuracy. During the evaluation, particular attention was paid to the model's performance in scenarios with significant changes in lighting conditions to verify the effectiveness of lighting feature decoupling.
[0064] The evaluation process strictly followed a standardized procedure. First, test set images were fed into the trained model to obtain the predicted lithology category probability for each image. Then, for image subsets under different lighting conditions, classification accuracy, precision, recall, and F1 score were calculated. Next, the illumination robustness index (LRS) was calculated, quantifying illumination invariance by comparing the model's accuracy differences under different lighting conditions. Simultaneously, illumination features and lithology features output from the AFDM module were extracted, and their correlation coefficients were calculated to evaluate the quality of feature decoupling. Finally, the model's generalization ability was evaluated on a public dataset validation set, and the mean and standard deviation of each index were calculated. To ensure the reliability of the evaluation results, five independent experiments were conducted. Each experiment used a different random seed to initialize the model, and the mean and standard deviation of all indices were recorded. The evaluation process also specifically analyzed the model's performance differences under different lithologies and lighting conditions to identify potential performance bottlenecks.
[0065] Experimental results show that the adaptive illumination feature decoupling module proposed in this patent achieves excellent performance in lithology identification tasks. The average accuracy on the main test set reaches 94.2%, which is 3.5 percentage points higher than the ViT-B / 16 baseline model without AFDM. Precision, recall, and F1 score reach 93.8%, 94.5%, and 94.1%, respectively, all outperforming the comparison methods. The illumination robustness index (LRS) is 0.062, indicating that the model's performance fluctuates little under different illumination conditions and has excellent illumination invariance. The feature decoupling quality index (FDQ) is 0.087, proving that illumination features and lithology features are effectively separated. On the extreme illumination test set, the model accuracy reaches 91.3%, and even under extreme conditions such as strong direct sunlight and low illumination, the performance degradation is controlled within 3%. On the public dataset validation set, the model accuracy reaches 89.7%, verifying its generalization ability in real-world field scenarios. Ablation experiments further confirmed the effectiveness of the AFDM module. When the AFDM module was removed, the model performance decreased, the accuracy dropped to 85.5%, the LRS increased to 0.153, and the FDQ increased to 0.215, which fully demonstrated the key role of light feature decoupling in improving lithological identification performance.
[0066] Through in-depth analysis of the evaluation results, the adaptive illumination feature decoupling method proposed in this application effectively solves the problem of interference from illumination changes on lithology identification. First, the illumination estimation branch accurately captures illumination change information in the image, and the output illumination parameter L provides a key condition for feature decoupling. Experiments show that the MSE loss of the illumination parameter estimation is consistently below 0.02, indicating the accuracy of illumination estimation. Second, the feature decoupler successfully separates image features into two subspaces: illumination-related and lithology-related, through conditional normalization and parallel decoupling branches. Correlation analysis shows that the correlation coefficient between the decoupled illumination features and lithology features is only 0.087, far lower than the 0.623 before decoupling, proving the effectiveness of decoupling. Third, the adaptive fusion mechanism can dynamically adjust feature weights according to illumination conditions. In scenarios with large illumination changes, the model relies more on lithology features for classification, while in scenarios with uniform illumination, it can fully utilize illumination information. This adaptive mechanism improves the model's illumination robustness. Furthermore, visualization analysis shows that the AFDM module can effectively preserve essential lithological features, such as texture and mineral composition, while suppressing surface feature interference caused by changes in illumination, such as shadows and highlights. Overall, this patent, through its adaptive illumination feature decoupling module, achieves dynamic separation of illumination features and lithological features, providing an effective solution to the problem of lithological identification under complex illumination conditions, and possesses high practical value and promising prospects for wider application.
[0067] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide an adaptive illumination-invariant lithology identification device, the structure of which is as follows: Figure 2 As shown.
[0068] Figure 3 This is a schematic diagram of the internal structure of an adaptive illumination-invariant lithology identification device provided in an embodiment of this application. Figure 3 As shown, the device includes: At least one processor 301; And a memory 302 that is communicatively connected to at least one processor; The memory 302 stores instructions executable by at least one processor, which are executed by at least one processor 301 to enable at least one processor 301 to: Rock images under different lighting conditions are acquired, and image preprocessing is performed to estimate lighting parameters to obtain standard rock images. Feature extraction is performed on the standard rock images to determine rock feature maps. Illumination variation feature analysis is conducted on the standard rock images to obtain multidimensional illumination parameters. The multidimensional illumination parameters are mapped to normalized parameters using a multilayer perceptron, and conditional normalization is performed on the rock feature maps based on the normalized parameters to determine normalized feature maps. Based on the normalized feature maps, illumination features and rock features are obtained through parallel decoupling processing of differences in attention mechanisms. Based on the multidimensional illumination parameters, the weights of feature decoupling of illumination features and rock features are dynamically adjusted to obtain the decoupled features of the rock images.
[0069] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium for adaptive illumination-invariant lithology identification, storing computer-executable instructions, wherein the computer-executable instructions are configured as follows: Rock images under different lighting conditions are acquired, and image preprocessing is performed to estimate lighting parameters to obtain standard rock images. Feature extraction is performed on the standard rock images to determine rock feature maps. Illumination variation feature analysis is conducted on the standard rock images to obtain multidimensional illumination parameters. The multidimensional illumination parameters are mapped to normalized parameters using a multilayer perceptron, and conditional normalization is performed on the rock feature maps based on the normalized parameters to determine normalized feature maps. Based on the normalized feature maps, illumination features and rock features are obtained through parallel decoupling processing of differences in attention mechanisms. Based on the multidimensional illumination parameters, the weights of feature decoupling of illumination features and rock features are dynamically adjusted to obtain the decoupled features of the rock images.
[0070] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for IoT devices and media are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0071] The systems, media, and methods provided in this application are one-to-one correspondences. Therefore, the systems and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be repeated here.
[0072] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0073] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0076] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0077] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0078] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0079] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0080] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for lithology identification with adaptive illumination invariance, characterized in that, The method includes: Rock images under different lighting conditions are acquired, and the rock images are preprocessed by estimating lighting parameters to obtain standard rock images; Feature extraction is performed on the standard rock image to determine the rock feature map; Illumination variation characteristics were analyzed on the standard rock images to obtain multidimensional illumination parameters; The multidimensional illumination parameters are mapped to normalized parameters using a multilayer perceptron, and the rock feature map is conditionally normalized based on the normalized parameters to determine the normalized feature map. Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in attention mechanisms; The parallel decoupling process includes: a first decoupling branch and a second decoupling branch; Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in the attention mechanism, specifically including: The first decoupling branch extracts photosensitive features from the normalized feature map to obtain the illumination features; wherein, the first decoupling branch uses a 3×3 convolutional kernel combined with a channel attention mechanism. The second decoupling branch extracts lithological features from the normalized feature map to obtain the rock features; wherein the second decoupling branch uses a 3×3 convolution kernel combined with a spatial attention mechanism. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, thereby obtaining the decoupled features of the rock image. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, resulting in the decoupled features of the rock image, specifically including: The multidimensional illumination parameters are subjected to a nonlinear transformation, and the adjustment coefficients corresponding to the multidimensional illumination parameters after the nonlinear transformation are calculated to determine the illumination feature weights. Based on the illumination feature weights, the rock feature weights are calculated, and the decoupled features are obtained by weighted fusion calculation based on the illumination feature weights and the rock feature weights.
2. The method of claim 1, wherein, Image preprocessing, specifically including illumination parameter estimation, is performed on the rock image to obtain a standard rock image. The rock image is subjected to histogram equalization to obtain an enhanced rock image; The enhanced rock image is subjected to nonlocal mean denoising to determine the denoised rock image; The denoised rock image is normalized and converted into PyTorch tensor format to obtain the standard rock image.
3. The method of claim 1, wherein, Feature extraction is performed on the standard rock image to determine the rock feature map, specifically including: Based on the standard rock image, the spatial dimension and feature dimension are determined through feature extraction using the ViT architecture; The rock feature map is determined based on the spatial dimension and feature dimension.
4. The method of claim 1, wherein, The standard rock images are subjected to illumination variation feature analysis to obtain multidimensional illumination parameters, specifically including: Parallel convolution is performed on the standard rock image to determine the illumination information feature map; wherein each parallel convolution path is followed by a normalization layer and a ReLU activation function; The illumination information feature map is weighted by channel weights using a channel attention mechanism, and the weighted illumination information feature map is then stitched together to obtain a channel stitched feature map. The channel splicing feature map is subjected to global average pooling for dimensionality reduction to obtain the multidimensional illumination parameters.
5. The adaptive illumination-invariant lithology identification method according to claim 1, characterized in that, The normalization parameters include: scaling parameters and offset parameters; Based on the normalization parameters, conditional normalization is performed on the rock feature map to determine the normalized feature map, specifically including: The rock feature map is conditionally normalized, and during the conditional normalization process, the rock feature map is normalized and standardized using the normalization parameters to determine the normalized feature map.
6. The adaptive illumination-invariant lithology identification method according to claim 1, characterized in that, After dynamically adjusting the weights of the illumination features and rock features based on the multidimensional illumination parameters to obtain the decoupled features of the rock image, the method further includes: Based on the decoupling characteristics, the quality of feature decoupling is determined by evaluating the correlation between the illumination characteristics and the rock characteristics.
7. A lithology identification device with adaptive illumination invariance, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Rock images under different lighting conditions are acquired, and the rock images are preprocessed by estimating lighting parameters to obtain standard rock images; Feature extraction is performed on the standard rock image to determine the rock feature map; Illumination variation characteristics were analyzed on the standard rock images to obtain multidimensional illumination parameters; The multidimensional illumination parameters are mapped to normalized parameters using a multilayer perceptron, and the rock feature map is conditionally normalized based on the normalized parameters to determine the normalized feature map. Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in attention mechanisms; The parallel decoupling process includes: a first decoupling branch and a second decoupling branch; Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in the attention mechanism, specifically including: The first decoupling branch extracts photosensitive features from the normalized feature map to obtain the illumination features; wherein, the first decoupling branch uses a 3×3 convolutional kernel combined with a channel attention mechanism. The second decoupling branch extracts lithological features from the normalized feature map to obtain the rock features; wherein the second decoupling branch uses a 3×3 convolution kernel combined with a spatial attention mechanism. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, thereby obtaining the decoupled features of the rock image. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, resulting in the decoupled features of the rock image, specifically including: The multidimensional illumination parameters are subjected to a nonlinear transformation, and the adjustment coefficients corresponding to the multidimensional illumination parameters after the nonlinear transformation are calculated to determine the illumination feature weights. Based on the illumination feature weights, the rock feature weights are calculated, and the decoupled features are obtained by weighted fusion calculation based on the illumination feature weights and the rock feature weights.
8. A non-volatile computer storage medium for adaptive illumination-invariant lithology identification, storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: Rock images under different lighting conditions are acquired, and the rock images are preprocessed by estimating lighting parameters to obtain standard rock images; Feature extraction is performed on the standard rock image to determine the rock feature map; Illumination variation characteristics were analyzed on the standard rock images to obtain multidimensional illumination parameters; The multidimensional illumination parameters are mapped to normalized parameters using a multilayer perceptron, and the rock feature map is conditionally normalized based on the normalized parameters to determine the normalized feature map. Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in attention mechanisms; The parallel decoupling process includes: a first decoupling branch and a second decoupling branch; Based on the normalized feature map, illumination features and rock features are obtained through parallel decoupling processing of differences in the attention mechanism, specifically including: The first decoupling branch extracts photosensitive features from the normalized feature map to obtain the illumination features; wherein, the first decoupling branch uses a 3×3 convolutional kernel combined with a channel attention mechanism. The second decoupling branch extracts lithological features from the normalized feature map to obtain the rock features; wherein the second decoupling branch uses a 3×3 convolution kernel combined with a spatial attention mechanism. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, thereby obtaining the decoupled features of the rock image. Based on the multidimensional illumination parameters, the weights of the illumination features and rock features are dynamically adjusted to decouple the features, resulting in the decoupled features of the rock image, specifically including: The multidimensional illumination parameters are subjected to a nonlinear transformation, and the adjustment coefficients corresponding to the multidimensional illumination parameters after the nonlinear transformation are calculated to determine the illumination feature weights. Based on the illumination feature weights, the rock feature weights are calculated, and the decoupled features are obtained by weighted fusion calculation based on the illumination feature weights and the rock feature weights.