A lithology identification method and device based on adversarial illumination enhancement and a medium
By generating images of illumination changes using an adversarial illumination enhancement training framework, the problem of lithology identification models being insensitive to illumination changes is solved, achieving robustness and stability under different illumination conditions and improving the accuracy of lithology identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 山东浪潮智慧建筑科技有限公司
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-29
AI Technical Summary
Existing lithology identification methods lack an effective training framework to generate challenging lighting condition samples, making it difficult for models to learn to be insensitive to changes in lighting.
An adversarial illumination enhancement-based training framework is adopted. Illumination-enhanced images are generated and classified through an illumination parameter controller, illumination enhancer, illumination discriminator, and main lithology identification network. An overall loss function is constructed for training by combining adversarial loss, illumination consistency loss, classification loss, and robustness loss.
This enriches the diversity of training data, enhances the robustness and stability of the model under different lighting conditions, ensures that the generated lighting parameters conform to the physical laws of the real world, and improves the accuracy of lithology identification.
Smart Images

Figure CN122116125A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological identification technology, and in particular to a lithology identification method, device and medium based on adversarial illumination enhancement. Background Technology
[0002] Lithology identification is a key step in geological exploration and resource assessment. With the development of computer vision technology, deep learning-based image recognition methods have become mainstream.
[0003] However, the apparent features of rock images are greatly affected by lighting conditions. The same lithology can exhibit significant differences under different lighting conditions, causing a sharp decline in the model's generalization ability in lighting environments not covered by the training data. Existing technologies mostly use simple data augmentation or lighting normalization methods to alleviate this problem, but the varied samples generated by these methods often do not match the real physical lighting conditions and cannot effectively simulate the complex and variable imaging environment in the field. This makes it difficult for the model to learn lighting-invariant robust features, becoming a bottleneck restricting the application of lithology identification technology in real-world scenarios.
[0004] Based on the above analysis, the problems and shortcomings of the existing technology are as follows: Existing lithology identification methods lack an effective training framework to generate challenging lighting condition samples, making it difficult for models to learn to be insensitive to changes in lighting. Summary of the Invention
[0005] This application provides a lithology identification method, device, and medium based on adversarial illumination enhancement, which can solve the problem that existing lithology identification methods lack an effective training framework to generate challenging illumination condition samples, making it difficult for the model to learn to be insensitive to illumination changes.
[0006] In a first aspect, embodiments of this application provide a lithology identification method based on adversarial illumination enhancement. The method includes: acquiring a rock image and constructing an adversarial illumination enhancement training framework, the adversarial illumination enhancement training framework including an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a main lithology identification network; extracting illumination parameters from the rock image through the illumination parameter controller and generating a corresponding illumination parameter map; processing the noisy image and the illumination parameter map through the illumination enhancer to generate an illumination enhanced image; inputting the rock image and the illumination enhanced image into the illumination discriminator respectively for authenticity discrimination and illumination condition classification, and calculating the corresponding adversarial loss and illumination consistency loss; inputting the rock image and the illumination enhanced image into the main lithology identification network respectively for lithology classification, obtaining classification results, calculating classification loss, and calculating robustness loss based on the classification results; and constructing a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0007] In one implementation of this application, the illumination parameters of the rock image are extracted by the illumination parameter controller, and the corresponding illumination parameter map is generated. Specifically, this includes: performing convolution and attention processing on the rock image to output a multi-dimensional illumination parameter vector. A nonlinear transformation is performed on the illumination parameter vector to generate enhanced illumination parameters; the enhanced illumination parameters are then mapped to a physically feasible parameter space and converted into an illumination parameter map.
[0008] In one implementation of this application, a lighting enhancer processes a noisy image and a lighting parameter map to generate a lighting enhancer image. Specifically, this includes: downsampling the noisy image using the encoder of the lighting enhancer to extract multi-level features, including deep features; performing residual connection processing on the deep features; performing multi-level upsampling transpose convolution on the processed features and fusing them with the corresponding level features of the encoder through skip connections; and converting the fused features into a three-channel image to generate the lighting enhancer image.
[0009] In one implementation of this application, the rock image and the illumination-enhanced image are respectively input into an illumination discriminator for authenticity discrimination and illumination condition classification, and the corresponding adversarial loss and illumination consistency loss are calculated. Specifically, this includes: determining whether the rock image and the illumination-enhanced image are real images or generated images, and calculating the adversarial loss; predicting the illumination condition category of the rock image and the illumination-enhanced image through the illumination condition classification branch, and calculating the illumination condition consistency loss, which is used to constrain the consistency between the illumination conditions of the illumination-enhanced image and the illumination parameter spectrum.
[0010] In one implementation of this application, the rock image and the illumination-enhanced image are respectively input into the main lithology recognition network for lithology classification, the classification loss is calculated, and the robustness loss is calculated in combination with the classification results. Specifically, the process includes: segmenting the rock image and the illumination-enhanced image into a sequence of image blocks, and linearly projecting each image block into an embedding vector; adding a learnable positional code to the embedding vector to form an input sequence that fuses spatial information; inputting the input sequence into a multi-layer Transformer encoder for processing, extracting the feature vector corresponding to the special classification label in the head of the input sequence, and outputting the lithology category probability distribution through the classification head.
[0011] In one implementation of this application, the method further includes: updating the parameters of the adversarial illumination enhancement training framework through backpropagation; during the parameter update process, a progressive training strategy is adopted to gradually increase the intensity and diversity of illumination changes in the illumination enhancement image generated by the illumination enhancer.
[0012] In one implementation of this application, before extracting the illumination parameters of the rock image through the illumination parameter controller and generating the corresponding illumination parameter map, the method further includes: converting the rock image from the original color space to a linear color space; and using a physical model-based illumination decomposition algorithm to decompose the converted rock image into reflectance components and illumination components to estimate the initial illumination parameters.
[0013] In one implementation of this application, after updating the parameters of the adversarial illumination enhancement training framework through backpropagation, the method further includes: obtaining a visual transformer model pre-trained on a large image dataset as a teacher model; synchronously calculating the feature representation of the teacher model for the same input image while the main lithology identification network performs forward propagation; constructing a distillation loss to minimize the difference between the main lithology identification network and the teacher model at the feature level, and incorporating this distillation loss into the total loss function for joint optimization.
[0014] Secondly, embodiments of this application also provide a lithology identification device based on adversarial illumination enhancement. 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, enable the at least one processor to: acquire a rock image and construct an adversarial illumination enhancement training framework, the framework including an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a primary lithology identification network; extract illumination parameters from the rock image using the illumination parameter controller and generate a corresponding illumination parameter map; process the noisy image and the illumination parameter map using the illumination enhancer to generate an illumination-enhanced image; input the rock image and the illumination-enhanced image into the illumination discriminator for authenticity discrimination and illumination condition classification, calculating corresponding adversarial loss and illumination consistency loss; input the rock image and the illumination-enhanced image into the primary lithology identification network for lithology classification, obtaining classification results and calculating classification loss, and combining the classification results to calculate robustness loss; construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0015] Thirdly, this application also provides a non-volatile computer storage medium for lithology identification based on adversarial illumination enhancement, storing computer-executable instructions. These instructions are configured to: acquire a rock image and construct an adversarial illumination enhancement training framework, which includes an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a primary lithology identification network; extract illumination parameters from the rock image using the illumination parameter controller and generate a corresponding illumination parameter map; process the noisy image and illumination parameter map using the illumination enhancer to generate an illuminated image; input the rock image and the illuminated image into the illumination discriminator for authenticity discrimination and illumination condition classification, calculating the corresponding adversarial loss and illumination consistency loss; input the rock image and the illuminated image into the primary lithology identification network for lithology classification, obtaining classification results and calculating the classification loss, and combining the classification results to calculate the robustness loss; and construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0016] This application provides a lithology identification method, device, and medium based on adversarial illumination enhancement. By integrating an illumination parameter controller and a conditional generative adversarial network (GAN) architecture for the illumination enhancer, it can generate highly realistic, wide-coverage, and challenging illumination change images based on physical laws, greatly enriching the diversity of training data. Through the adversarial training framework, the main lithology identification network is driven to learn deep features insensitive to illumination changes in a game of distinguishing essential lithological features from irrelevant illumination interference. Simultaneously, the introduced robust loss function forces the model to maintain consistency in its judgment of the same lithology under different illuminations, further enhancing the model's stability. The physical constraint module in the illumination parameter controller ensures that the generated or estimated illumination parameters conform to real-world physical laws, avoiding arbitrary and distorted illumination simulations, making the enhanced data closer to practical application scenarios. By placing illumination enhancement and lithology identification within a unified adversarial framework for end-to-end training, and coordinating multiple tasks such as illumination parameter estimation, image generation, image discrimination, and lithology classification through a total loss function, the overall performance is synergistically optimized. Attached Figure Description
[0017] 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 illustrating a lithology identification method based on adversarial illumination enhancement, provided for an embodiment of this application; Figure 2 A schematic diagram of an enhancement training framework for a lithology identification method based on adversarial illumination enhancement provided in an embodiment of this application; Figure 3This is a schematic diagram of the internal structure of a lithology identification device based on adversarial illumination enhancement, provided as an embodiment of this application. Detailed Implementation
[0018] 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.
[0019] This application provides a lithology identification method, device, and medium based on adversarial illumination enhancement, which solves the problem that existing lithology identification methods lack an effective training framework to generate challenging illumination condition samples, making it difficult for the model to learn to be insensitive to illumination changes.
[0020] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0021] Figure 1 A flowchart illustrating a lithology identification method based on adversarial illumination enhancement, provided as an embodiment of this application. Figure 1 As shown in the figure, the lithology identification method based on adversarial illumination enhancement provided in this application specifically includes the following steps: Step 10: Acquire rock images and construct an adversarial lighting enhancement training framework, which includes a lighting parameter controller, a lighting enhancer, a lighting discriminator, and a principal lithology identification network. In this step, drone aerial photography utilizes a drone system equipped with a multispectral camera, covering various geological environments. Each rock sample is photographed from at least three different angles: overhead, side, and 45° angle. GPS and IMU are used to record position and attitude information. A ground-based fixed camera array, composed of high dynamic range cameras, is evenly distributed around the rock sample, simultaneously acquiring images from different perspectives. A spherical photometer is used to record ambient lighting parameters in real time. Handheld device photography uses smartphones and professional SLR cameras to capture images from multiple angles, ensuring coverage of various natural lighting conditions: sunrise, noon, sunset, cloudy, and rainy days. Simultaneously, 20,000 rock images containing accurate lighting parameters are selected from a professional geological database, and StyleGAN3 is used to generate 10,000 physically plausible synthetic rock images, ultimately forming a total of 80,000 image data points.
[0022] All images were double-labeled for lithological categories by both geological and computer vision experts, and precise illumination parameters were recorded. The data acquisition process began with the establishment of a sample library. Three-dimensional scanning and spectral analysis were performed on the collected rock samples, recording the reflectance distribution curves and surface texture characteristics. Drone aerial photography employed a flight path planning system to ensure coverage of the target area and avoid duplicate acquisitions, with at least 10 images captured for each sample. A ground-based fixed camera array used an automatic triggering system to ensure synchronous acquisition by all cameras, capturing 8 images for each sample. Handheld device acquisition was operated by professionals to ensure the sample occupied the central area of the image, with 3 images captured for each sample under 5 different natural lighting conditions. After all acquisitions were completed, the images were imported into a professional image processing workstation. HDR technology was used to merge multi-exposure images, preserving highlight and shadow details. Simultaneously, professional spectral analysis software was used to calculate ambient lighting parameters. Finally, two geological experts and two computer vision experts independently reviewed the image quality and label accuracy to ensure the high quality, diversity, and representativeness of the dataset.
[0023] As an optional embodiment, before extracting the illumination parameters of the rock image through the illumination parameter controller and generating the corresponding illumination parameter map, the method may further include: converting the rock image from the original color space to a linear color space; and using a physical model-based illumination decomposition algorithm to decompose the converted rock image into reflectance components and illumination components to estimate the initial illumination parameters.
[0024] In this step, all images are first converted to a linear RGB color space to ensure color accuracy, and the corresponding 3D lighting information is extracted. The preprocessing workflow includes four main stages: lighting parameter estimation, image lighting normalization, feature enhancement, and data balancing. The lighting parameter estimation stage uses a physically-based lighting decomposition algorithm to decompose the image into reflectance and lighting components. The lighting parameter estimation network adopts a U-Net architecture, taking the original image as input and outputting a light intensity map, a direction map, and a color temperature map. Physical constraints are introduced to ensure the reasonableness of the parameters. The image lighting normalization stage performs lighting correction based on the Lambertian reflection model. This process eliminates the impact of lighting variations on the image. The impact of appearance; in the feature enhancement stage, physical contrast enhancement techniques are applied, including adaptive histogram equalization and Retinex-based image enhancement, with particular emphasis on brightness enhancement for images under low lighting conditions. Simultaneously, a non-local mean denoising algorithm is used to remove image noise while maintaining edge sharpness, and GAN-based image enhancement techniques are employed to improve image quality. In the data balancing stage, oversampling and undersampling techniques are used to ensure a balanced number of samples for each lithology and lighting condition, preventing the model from favoring specific categories. Synthetic data augmentation is also introduced, using StyleGAN3 to generate physically plausible rock images to supplement a few categories.
[0025] The entire preprocessing process is automated, ensuring that all training and testing images undergo the same processing steps. At the same time, the original image's illumination information is preserved for the illumination parameter controller. The preprocessed images are stored in TIFF format with lossless compression to guarantee image quality. The specific steps of data preprocessing begin with image reading. The original image is read using a professional image processing library and converted to a linear RGB color space. Next, illumination parameter estimation is performed. A pre-trained illumination decomposition network is used to decompose the image into reflectance and illumination components. Illumination parameters include global illumination intensity, illumination pattern, illumination color temperature map, and illumination distribution characteristics. Then, illumination normalization is performed, using the estimated illumination components to correct the image and eliminate the influence of illumination variations. Next, feature enhancement is performed. The image is converted to the HSV color space, and a Retinex-based enhancement algorithm is applied to the V channel to enhance dark details while avoiding over-enhancement. Simultaneously, the CLAHE technique is applied to enhance contrast, using adaptive contrast limiting and histogram equalization. Next, image quality improvement is performed, using the ESRGAN model for super-resolution reconstruction and detail enhancement of low-quality images. Then, denoising is performed, using the NLM algorithm to remove image noise, especially preserving edge information. Finally, data balancing is performed, calculating the number of samples in each category, oversampling the minority categories, and undersampling the majority categories. For the validation and test sets, only illumination parameter estimation, illumination normalization, feature enhancement, and image quality improvement are performed. Data balancing is not applied to maintain data consistency and comparability.
[0026] like Figure 2 As shown, this application proposes an adversarial lighting enhancement training framework. It adopts the idea of generative adversarial networks and enables the model to learn robust features under different lighting conditions through adversarial training of lighting parameter controller, lighting enhancer, lighting discriminator and main lithology identification network.
[0027] Step 20: Extract the illumination parameters of the rock image using the illumination parameter controller and generate the corresponding illumination parameter map; In this step, the illumination parameter controller consists of four parts: parameter estimation module, parameter generation module, physical constraint loss, and parameter embedding module.
[0028] As an optional embodiment, the illumination parameters of the rock image are extracted by the illumination parameter controller, and the corresponding illumination parameter map is generated. Specifically, it may include: Step 201: performing convolution and attention processing on the rock image to output a multi-dimensional illumination parameter vector; Step 202: performing a nonlinear transformation on the illumination parameter vector to generate enhanced illumination parameters; Step 203: mapping the enhanced illumination parameters to a physically feasible parameter space and converting them into an illumination parameter map.
[0029] In this step, the parameter estimation module includes three 3×3 convolutional layers with a stride of 2, channel attention, a Flatten operation, and two fully connected layers. The channel attention is applied to the third convolutional layer, which includes a global average pooling layer and two fully connected layers. The mathematical expression is as follows: In the formula: A true lighting image in RGB format; These are the learnable parameters for the parameter estimation module; For parameter estimation module; The estimated 8-dimensional illumination parameters include 1-dimensional illumination intensity, 2-dimensional illumination direction represented in spherical coordinates, 1-dimensional color temperature, and 4-dimensional illumination distribution characteristics. The parameter generation module is a multilayer perceptron (MLP), with hidden layer dimensions of 8, 8, 16, 32, and 8 respectively. The mathematical expression is as follows: In the formula: The 8-dimensional illumination parameters are estimated by the parameter estimation module; Learnable parameters for the parameter generation module; For parameter generation module; For the generated 8D lighting parameters. Physical constraint loss. Using the projection function The estimated or generated 8-dimensional illumination parameter vector Projecting onto the physically feasible region, calculating the square of the L2 distance, and encouraging the lighting parameter controller to estimate or generate lighting parameters that inherently satisfy physical constraints by minimizing the loss, reduces the bias introduced by the projection operation and ensures... It conforms to the laws of physics, where: light intensity It should be a positive number; direction of illumination It should satisfy the unit vector constraint, i.e., the direction vector length is 1; color temperature It should be between 3000K and 10000K; light distribution characteristics It should be non-negative; This is the softplus function; It should be a small constant to prevent division by zero; It is the sigmoid function; To correct the linear unit function; Use a small constant to prevent division by zero. The parameter embedding module includes an embedding layer, a linear projection layer, a ReLU activation function, and a reshape operation, mathematically expressed as follows: In the formula: For estimating or generating 8-dimensional lighting parameters; Learnable parameters for the parameter embedding module; Embedded module for parameters; This is a spectrum of illumination parameters.
[0030] Step 30: Process the noisy image and illumination parameter map using an illumination intensifier to generate an illumination-enhanced image; In this step, the illumination enhancer consists of four parts: an encoder, a bottleneck module, a decoder, and an output layer. The encoder consists of four downsampling blocks. As an optional embodiment, the illumination enhancer processes the noisy image and the illumination parameter map to generate an illumination enhancer image, which may specifically include: Step 301: The encoder of the illumination enhancer downsamples the noisy image to extract multi-level features, including deep features; Step 302: The deep features are processed by residual connections; Step 303: The processed features are subjected to multi-level upsampling transpose convolution, and fused with the corresponding level features of the encoder through skip connections; Step 304: The fused features are converted into a three-channel image to generate the illumination enhancer image.
[0031] In this step, each downsampling block contains two 3×3 convolutional layers with a stride of 2, a batch normalization layer, and a LeakyReLU activation function with a slope of 0.2, progressively extracting high-level features from the image and reducing spatial resolution. The bottleneck module contains two residual blocks, each containing two 3×3 convolutional layers, a batch normalization layer, and a LeakyReLU activation function, mitigating the vanishing gradient problem through residual connections. The decoder consists of four upsampling blocks, each containing a 2×2 transposed convolutional layer, two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function, preserving detailed information from the encoder through skip connections. The output layer uses a 1×1 convolutional layer to convert the feature map into a 3-channel image and normalizes the pixel values to the [-1, 1] interval using the tanh activation function. The mathematical expression is: In the formula: Noisy image; The illumination parameter map output by the illumination parameter controller; These are learnable parameters for the illumination intensifier; Enhance the image with improved lighting.
[0032] Step 40: Input the rock image and the illumination-enhanced image into the illumination discriminator to perform authenticity discrimination and illumination condition classification, and calculate the corresponding adversarial loss and illumination consistency loss. In this step, the illumination discriminator includes two main branches: a binary classification adversarial main branch and an illumination condition consistency classification auxiliary branch.
[0033] As an optional embodiment, the rock image and the illumination-enhanced image are respectively input into the illumination discriminator for authenticity discrimination and illumination condition classification, and the corresponding adversarial loss and illumination consistency loss are calculated. Specifically, it may include: Step 401: Distinguish between the rock image and the illumination-enhanced image as real images or generated images, and calculate the adversarial loss; Step 402: Predict the illumination condition category of the rock image and the illumination-enhanced image through the illumination condition classification branch, and calculate the illumination condition consistency loss, which is used to constrain the consistency between the illumination conditions and the illumination parameter spectrum of the illumination-enhanced image.
[0034] In this step, the main binary classification branch consists of five convolutional blocks. Each convolutional block contains a 3×3 convolutional layer, a batch normalization layer, and a LeakyReLU activation function with a slope of 0.2. The stride of the first 3×3 convolution in the first block is 1, and the stride of the others is 2. The activation function of the last convolutional block is the sigmoid activation function. The output image represents the true probability, and a binary classification adversarial loss is constructed. In the formula: It is a binary classification branch; This is a realistic lighting image; The true illumination image conditional distribution for a given illumination parameter spectrum; The light-enhanced image output by the light intensifier; Noisy image; Illumination parameter spectrum; This represents the probability distribution of the noisy image; This represents the probability distribution of the illumination parameter spectrum; The desired operation is as follows. The illumination condition consistency classification auxiliary branch is introduced after the third convolutional block of the main branch. It extracts the implicit illumination parameter map through two 3×3 convolutions, followed by a global average pooling layer and two fully connected layers for illumination condition consistency classification, constructing the illumination condition consistency classification loss. In the formula: Classification by lighting conditions; The light-enhanced image output by the light intensifier; For a given illumination parameter map Illumination enhancement image conditional distribution.
[0035] Step 50: Input the rock image and the illumination-enhanced image into the master lithology identification network for lithology classification, obtain the classification results, calculate the classification loss, and calculate the robustness loss based on the classification results; In this step, the main lithology identification network consists of four parts: an input processing module, a location encoding module, a Transformer encoder, and a classification head.
[0036] As an optional embodiment, the rock image and the illumination-enhanced image are respectively input into the main lithology recognition network for lithology classification, the classification loss is calculated, and the robustness loss is calculated in combination with the classification results. Specifically, it may include: Step 501: Segmenting the rock image and the illumination-enhanced image into a sequence of image blocks, and linearly projecting each image block into an embedding vector; Step 502: Adding a learnable positional code to the embedding vector to form an input sequence that fuses spatial information; Step 503: Inputting the input sequence into a multi-layer Transformer encoder for processing, extracting the feature vector corresponding to the special classification label in the head of the input sequence, and outputting the lithology category probability distribution through the classification head.
[0037] In this step, the input processing module segments the real illumination image or illumination-enhanced image into 16×16 pixel image patches and linearly maps each image patch to an embedding vector; the location encoding module adds learnable location codes to capture spatial information; the Transformer encoder contains multiple Transformer encoder layers, each layer containing a multi-head self-attention mechanism and a feedforward network; the classification head inputs the embedding vector corresponding to the [CLS] label into an MLP and outputs the probability distribution of lithology categories; finally, the model parameters are updated through gradient backpropagation based on classification loss and robustness loss. The mathematical expression for classification loss is: The mathematical expression for robustness loss is: In the formula: Lithology category label; For a given illumination-enhanced image At that time, the lithology category was the same as that of the real-light image. The probability distribution; Main lithology identification network; The main network for real-world lighting images The prediction category; This is the light-enhanced image output by the light intensifier.
[0038] Step 60: Construct the total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0039] The total loss function is In the formula: , , , and These are the weighting coefficients for balancing various losses, with values of 0.3, 0.4, 0.3, 0.2, and 0.8.
[0040] As an optional embodiment, the method may further include: step 70: updating the parameters of the adversarial illumination enhancement training framework through backpropagation; step 80: during the parameter update process, adopting a progressive training strategy to gradually increase the intensity and diversity of illumination changes in the illumination-enhanced image generated by the illumination enhancer.
[0041] In this step, in order to improve training efficiency and model performance, a variety of training techniques are adopted: First, a progressive training strategy is used to gradually increase the intensity of data augmentation from simple to complex, so as to avoid the model being interfered with by overly complex data distributions in the early stage. As an optional embodiment, after updating the parameters of the adversarial illumination enhancement training framework via backpropagation, the method may further include: acquiring a visual transformer model pre-trained on a large image dataset as a teacher model; synchronously computing the feature representation of the teacher model for the same input image while the main lithology identification network performs forward propagation; constructing a distillation loss to minimize the difference between the main lithology identification network and the teacher model at the feature level, and incorporating this distillation loss into the total loss function for joint optimization.
[0042] In this step, the following techniques are employed: First, knowledge distillation is implemented, using a pre-trained ViT-Large model as the teacher model to transfer feature knowledge from the teacher model to the student model, accelerating convergence and improving performance. Second, label smoothing is used, replacing hard labels with soft labels to reduce the model's sensitivity to noisy labels. Third, gradient accumulation is implemented, updating parameters every four iterations, effectively increasing the batch size to 256 for more stable gradient estimation. Fourth, residual connections are introduced into the illumination parameter controller to alleviate the vanishing gradient problem and ensure effective propagation of deep features. Fifth, an adaptive weight adjustment strategy is adopted, dynamically adjusting weight coefficients based on changes in loss terms during training to improve training stability. Sixth, multi-scale feature fusion is implemented, introducing a multi-scale feature fusion module into the decoder of the illumination enhancer to enhance the quality and detail preservation of the generated image. Eighth, spectral consistency loss is used to ensure that the spectral characteristics of the generated image are consistent with those of the real image, improving the realism of the generated image. The combined application of these techniques improves the model's convergence speed and final performance, enabling the model to reach a stable convergence state within 300 rounds.
[0043] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a device, the structure of which is as follows: Figure 3 As shown.
[0044] Figure 3 This is a schematic diagram of the internal structure of a 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. These instructions are executed by at least one processor 301 to enable the processor 301 to: acquire a rock image and construct an adversarial illumination enhancement training framework, which includes an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a primary lithology recognition network; extract illumination parameters from the rock image using the illumination parameter controller and generate a corresponding illumination parameter map; process the noisy image and the illumination parameter map using the illumination enhancer to generate an illumination-enhanced image; input the rock image and the illumination-enhanced image into the illumination discriminator for authenticity discrimination and illumination condition classification, and calculate the corresponding adversarial loss and illumination consistency loss; input the rock image and the illumination-enhanced image into the primary lithology recognition network for lithology classification, obtain classification results, calculate classification loss, and calculate robustness loss based on the classification results; and construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0045] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium stores computer-executable instructions, which are configured to: acquire a rock image and construct an adversarial illumination enhancement training framework, the adversarial illumination enhancement training framework including an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a principal lithology recognition network; extract illumination parameters from the rock image through the illumination parameter controller and generate corresponding illumination parameter maps; process the noisy image and illumination parameter maps through the illumination enhancer to generate an illumination-enhanced image; input the rock image and the illumination-enhanced image into the illumination discriminator respectively for authenticity discrimination and illumination condition classification, and calculate the corresponding adversarial loss and illumination consistency loss; input the rock image and the illumination-enhanced image into the principal lithology recognition network respectively for lithology classification, obtain classification results, calculate classification loss, and calculate robustness loss based on the classification results; and construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0053] 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.
[0054] 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 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.
[0055] 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 a process, method, article, or apparatus. Without further limitation, 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 said element.
[0056] The above description is merely an embodiment of this application and is 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 lithology identification method based on adversarial illumination enhancement, characterized in that, The method includes: Rock images are acquired, and an adversarial illumination enhancement training framework is constructed, which includes an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a principal lithology identification network. The illumination parameters of the rock image are extracted by the illumination parameter controller, and the corresponding illumination parameter map is generated. The illumination enhancer processes the noisy image and the illumination parameter map to generate an illumination-enhanced image. The rock image and the illumination-enhanced image are respectively input into the illumination discriminator for authenticity judgment and illumination condition classification, and the corresponding adversarial loss and illumination consistency loss are calculated. The rock image and the illumination-enhanced image are respectively input into the main lithology identification network for lithology classification to obtain classification results. The classification loss is calculated, and the robustness loss is calculated in combination with the classification results. Construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
2. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, The step of extracting the illumination parameters of the rock image through the illumination parameter controller and generating the corresponding illumination parameter map specifically includes: The rock image is subjected to convolution and attention processing to output a multidimensional illumination parameter vector; The illumination parameter vector is subjected to a nonlinear transformation to generate enhanced illumination parameters. The enhanced illumination parameters are mapped to a physically feasible parameter space and converted into the illumination parameter map.
3. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, The step of processing the noisy image and the illumination parameter map through the illumination intensifier to generate an illumination-enhanced image specifically includes: The encoder of the illumination enhancer downsamples the noisy image to extract multi-level features, including deep features. Perform residual connection processing on the deep features; The processed features are subjected to multi-level upsampling and transposed convolution, and then fused with the corresponding level features of the encoder through skip connections; The fused features are converted into a three-channel image to generate the illumination-enhanced image.
4. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, The process of inputting the rock image and the enhanced illumination image into the illumination discriminator for realism assessment and illumination condition classification, and calculating the corresponding adversarial loss and illumination consistency loss, specifically includes: The rock image and the illumination-enhanced image are determined to be real images or generated images, and the adversarial loss is calculated. The illumination condition classification branch is used to predict the illumination condition categories of the rock image and the illumination enhancement image, and the illumination condition consistency loss is calculated to constrain the consistency between the illumination conditions of the illumination enhancement image and the illumination parameter map.
5. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, The process of inputting the rock image and the illumination-enhanced image into the main lithology identification network for lithology classification, calculating the classification loss, and calculating the robustness loss based on the classification results specifically includes: The rock image and the illumination-enhanced image are segmented into a sequence of image patches, and each image patch is linearly projected into an embedding vector; Learnable positional codes are added to the embedded vectors to form an input sequence that incorporates spatial information; The input sequence is fed into a multi-layer Transformer encoder for processing. Feature vectors corresponding to special classification markers in the head of the input sequence are extracted, and the lithology category probability distribution is output through the classification head.
6. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, The method further includes: The parameters of the adversarial lighting enhancement training framework are updated via backpropagation; During the parameter update process, a progressive training strategy is adopted to gradually increase the intensity and diversity of illumination changes in the illumination-enhanced image generated by the illumination enhancer.
7. The lithology identification method based on adversarial illumination enhancement according to claim 1, characterized in that, Before extracting the illumination parameters of the rock image through the illumination parameter controller and generating the corresponding illumination parameter map, the method further includes: The rock image is converted from the original color space to a linear color space. A physical model-based illumination decomposition algorithm is used to decompose the converted rock image into reflectance and illumination components in order to estimate the initial illumination parameters.
8. A lithology identification method based on adversarial illumination enhancement according to claim 6, characterized in that, After updating the parameters of the adversarial lighting enhancement training framework via backpropagation, the method further includes: Obtain a visual transformer model pre-trained on a large image dataset as a teacher model; During the forward propagation of the main lithology identification network, the feature representation of the teacher model for the same input image is calculated simultaneously. A distillation loss is constructed to minimize the difference between the main lithology identification network and the teacher model at the feature level, and this distillation loss is incorporated into the total loss function for joint optimization.
9. A lithology identification device based on adversarial illumination enhancement, 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 are acquired, and an adversarial illumination enhancement training framework is constructed, which includes an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a principal lithology identification network. The illumination parameters of the rock image are extracted by the illumination parameter controller, and the corresponding illumination parameter map is generated. The illumination enhancer processes the noisy image and the illumination parameter map to generate an illumination-enhanced image. The rock image and the illumination-enhanced image are respectively input into the illumination discriminator for authenticity judgment and illumination condition classification, and the corresponding adversarial loss and illumination consistency loss are calculated. The rock image and the illumination-enhanced image are respectively input into the main lithology identification network for lithology classification to obtain classification results. The classification loss is calculated, and the robustness loss is calculated in combination with the classification results. Construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.
10. A non-volatile computer storage medium for lithological identification based on adversarial illumination enhancement, storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: Rock images are acquired, and an adversarial illumination enhancement training framework is constructed, which includes an illumination parameter controller, an illumination enhancer, an illumination discriminator, and a principal lithology identification network. The illumination parameters of the rock image are extracted by the illumination parameter controller, and the corresponding illumination parameter map is generated. The illumination enhancer processes the noisy image and the illumination parameter map to generate an illumination-enhanced image. The rock image and the illumination-enhanced image are respectively input into the illumination discriminator for authenticity judgment and illumination condition classification, and the corresponding adversarial loss and illumination consistency loss are calculated. The rock image and the illumination-enhanced image are respectively input into the main lithology identification network for lithology classification to obtain classification results. The classification loss is calculated, and the robustness loss is calculated in combination with the classification results. Construct a total loss function based on the adversarial loss, illumination consistency loss, classification loss, and robustness loss.