Method, device, electronic equipment and medium for converting images to hyperspectral data

By acquiring data from a pre-built image set, performing preprocessing and multi-stage optimization of the deep learning model, the problems of information loss and spectral continuity in the conversion of RGB images to hyperspectral data are solved, achieving efficient and accurate hyperspectral data generation, and improving data quality and application value.

CN121095053BActive Publication Date: 2026-05-19NANTONG SHITONG DATA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANTONG SHITONG DATA TECHNOLOGY CO LTD
Filing Date
2025-08-26
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies suffer from severe information loss, poor spectral continuity, sensitivity to ambient lighting conditions, high computational complexity, and slow processing speed in the conversion of RGB images to hyperspectral data, making it difficult to achieve efficient and accurate hyperspectral data reconstruction.

Method used

Image data is obtained from a pre-built image set, preprocessed, and then input into a hyperspectral data generator. Multi-scale features are extracted using a deep learning model, and multi-stage optimization is performed using a performance analyzer to generate optimized hyperspectral data.

Benefits of technology

It achieves efficient and accurate hyperspectral data reconstruction, improves the quality and application value of spectral data, and is applicable to fields such as remote sensing monitoring, environmental analysis, and agricultural pest and disease detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121095053B_ABST
    Figure CN121095053B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose an image-to-hyperspectral data conversion method, device, electronic equipment and medium. A specific implementation of the method comprises: obtaining image data from a pre-constructed image set; preprocessing the obtained image data to obtain pre-processed image data; generating hyperspectral data according to a hyperspectral data generator and the pre-processed image data; generating a performance analysis result corresponding to the hyperspectral data according to a performance analyzer and the hyperspectral data; generating optimization parameter data according to the performance analysis result; performing multi-stage optimization on the hyperspectral generator and the performance analyzer according to the optimization parameter data to obtain an optimized hyperspectral generator and an optimized performance analyzer; and generating target hyperspectral data according to the optimized hyperspectral generator and the optimized performance analyzer. The implementation generates hyperspectral data, performs multi-stage optimization and performance evaluation, and obtains target hyperspectral data of higher quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, including methods, apparatus, electronic devices, and media for converting images to hyperspectral data. Background Technology

[0002] The conversion from RGB images to hyperspectral data is a crucial technique in hyperspectral imaging. It involves processing and analyzing RGB images, combined with deep learning and physical models, to reconstruct and predict hyperspectral data. Currently, hyperspectral data reconstruction primarily relies on deep learning-based direct mapping methods, physical model-based spectral reconstruction methods, and sparse representation-based reconstruction methods. The deep learning-based direct mapping method directly maps RGB images to the hyperspectral data space using convolutional neural networks. The physical model-based spectral reconstruction method achieves the conversion by establishing a mathematical model between RGB response and hyperspectral reflectance. The sparse representation-based reconstruction method utilizes a pre-established spectral dictionary to reconstruct hyperspectral data.

[0003] However, the above methods often encounter the following technical problems: When processing the conversion from RGB images to hyperspectral data, the deep learning-based direct mapping method suffers significant information loss due to the fact that RGB images only have three bands, while hyperspectral data typically contains dozens to hundreds of bands. This results in a lack of spectral continuity in the generated hyperspectral data, with abrupt changes between adjacent bands, making it difficult to accurately reconstruct the detailed information in the hyperspectral data. The physical model-based spectral reconstruction method requires a large amount of prior knowledge and complex parameter calibration, is sensitive to ambient lighting conditions, has limited practical application scenarios, and suffers from high computational complexity, making real-time processing difficult. The sparse representation-based reconstruction method requires a large amount of high-quality training data for constructing the spectral dictionary, and the reconstruction accuracy heavily depends on the quality and completeness of the dictionary. The processing speed is slow, making it difficult to meet the needs of practical applications. Furthermore, existing methods often struggle to effectively maintain spectral details and continuity when dealing with complex lighting conditions and noise interference, leading to poor stability and quality of the reconstruction results.

[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the present disclosure concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0006] Some embodiments of this disclosure provide methods, apparatuses, electronic devices, and computer-readable media for converting images to hyperspectral data to address one or more of the technical problems mentioned in the background section above.

[0007] In a first aspect, some embodiments of this disclosure propose an image-to-hyperspectral data conversion method, which includes: acquiring image data from a pre-constructed image set, wherein the pre-constructed image set includes various images under different illumination conditions; preprocessing the acquired image data to obtain preprocessed image data, wherein the preprocessing includes normalization processing, correction processing, and noise suppression processing; generating hyperspectral data corresponding to the preprocessed image data based on a hyperspectral data generator and the preprocessed image data; generating performance analysis results corresponding to the hyperspectral data based on a performance analyzer and the hyperspectral data, wherein the performance analysis results include spatial analysis information and spectral analysis information; generating optimization parameter data based on the performance analysis results, wherein the optimization parameter data includes spectral continuity loss weight data; performing multi-stage optimization on the hyperspectral generator and the performance analyzer based on the optimization parameter data to obtain an optimized hyperspectral generator and an optimized performance analyzer; and generating target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral generator and the optimized performance analyzer.

[0008] Secondly, some embodiments of this disclosure propose an image-to-hyperspectral data conversion apparatus, comprising: an acquisition unit configured to acquire image data from a pre-constructed image set, wherein the pre-constructed image set includes images under different illumination conditions; a preprocessing unit configured to preprocess the acquired image data to obtain preprocessed image data, wherein the preprocessing includes normalization processing, correction processing, and noise suppression processing; a first generation unit configured to generate hyperspectral data corresponding to the preprocessed image data based on a hyperspectral data generator and the preprocessed image data; and an analysis unit configured to analyze the hyperspectral data based on a performance analyzer and the hyperspectral data. The system first generates performance analysis results corresponding to the aforementioned hyperspectral data, including spatial analysis information and spectral analysis information. The second generation unit is configured to generate optimized parameter data based on the performance analysis results, including spectral continuity loss weight data. An optimization unit is configured to perform multi-stage optimization on the hyperspectral generator and the performance analyzer based on the optimized parameter data, resulting in an optimized hyperspectral generator and an optimized performance analyzer. A third generation unit is configured to generate target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral generator and the optimized performance analyzer.

[0009] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0010] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0011] Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0012] The above-described embodiments of this disclosure have the following beneficial effects: The image-to-hyperspectral data conversion methods of some embodiments of this disclosure can achieve relatively efficient, accurate, and reliable hyperspectral data reconstruction, effectively improving the quality and application value of hyperspectral data. Specifically, current hyperspectral data reconstruction methods, such as the direct mapping method based on deep learning, suffer from severe information loss because RGB images only have three bands, while hyperspectral data typically contains dozens to hundreds of bands. This results in a lack of spectral continuity in the generated hyperspectral data, with abrupt changes between adjacent bands, making it difficult to accurately reconstruct the detailed information in the hyperspectral data. Physical model-based spectral reconstruction methods require a large amount of prior knowledge and complex parameter calibration, are sensitive to ambient lighting conditions, have limited practical application scenarios, and suffer from high computational complexity, making real-time processing difficult. Sparse representation-based reconstruction methods require a large amount of high-quality training data for constructing the spectral dictionary, and the reconstruction accuracy heavily depends on the quality and completeness of the dictionary, resulting in slow processing speeds and difficulty in meeting practical application needs. Therefore, the image-to-hyperspectral data conversion methods of some embodiments of this disclosure first obtain image data from a pre-constructed image set. This provides basic data for subsequent processing. Then, the acquired image data is preprocessed to obtain preprocessed image data. This preprocessing includes normalization, correction, and noise suppression. Normalization ensures data consistency between different images, correction corrects systematic errors in the images, and noise suppression removes random noise, providing high-quality input data for subsequent hyperspectral data generation. Next, the preprocessed image data is input into a hyperspectral data generator to obtain the corresponding hyperspectral data. This allows for the generation of preliminary hyperspectral data based on high-quality input data. Then, the hyperspectral data is input into a performance analyzer to obtain performance analysis results, including spatial and spectral analysis information. This allows for a comprehensive evaluation of the spatial and spectral characteristics of the generated hyperspectral data, providing a basis for subsequent optimization. Next, based on the performance analysis results, optimization parameter data is generated, including spectral continuity loss weight data. This allows for the generation of targeted optimization parameters based on the performance analysis results, providing guidance for the optimization process. Then, based on the aforementioned optimized parameter data, the hyperspectral generator and performance analyzer are optimized in multiple stages to obtain the optimized hyperspectral generator and performance analyzer. Thus, through a multi-stage optimization process, the performance of the hyperspectral generator and performance analyzer is gradually adjusted and improved, enabling them to better adapt to the characteristics of the input data at different stages and generate higher-quality hyperspectral data. Finally, based on the optimized hyperspectral generator and performance analyzer, the target hyperspectral data corresponding to the preprocessed image data is generated.Therefore, based on the optimized system, high-quality target hyperspectral data can be generated, overcoming problems such as poor spectral continuity, sensitivity to environmental conditions, low reconstruction accuracy, and slow processing speed in existing technologies. In summary, the image-to-hyperspectral data conversion method disclosed herein effectively solves many problems existing in current hyperspectral data reconstruction methods, achieving more efficient, accurate, and reliable hyperspectral data reconstruction. This improves the quality and application value of hyperspectral data to a certain extent, providing a more reliable and practical solution for related applications in remote sensing monitoring, environmental analysis, and agricultural pest and disease detection. Attached Figure Description

[0013] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0014] Figure 1 This is a flowchart of some embodiments of the image-to-hyperspectral data conversion method according to the present disclosure;

[0015] Figure 2 These are schematic diagrams of some embodiments of the image-to-hyperspectral data conversion apparatus according to the present disclosure;

[0016] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0018] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0020] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0021] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0022] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] Figure 1 A flowchart 100 illustrating some embodiments of an image-to-hyperspectral data conversion method according to the present disclosure is shown. The image-to-hyperspectral data conversion method includes the following steps:

[0024] Step 101: Obtain image data from the pre-built image set.

[0025] In some embodiments, the entity executing the image-to-hyperspectral data conversion method (e.g., a computing device) can acquire image data from a pre-constructed image set. This pre-constructed image set can be a pre-built collection of RGB images under different lighting conditions. The image data can be any RGB image randomly selected by the entity from the pre-constructed image set, or any RGB image manually selected by a researcher or operator from the pre-constructed image set. In practice, the entity can use RGB images acquired from the pre-constructed image set as image data.

[0026] Optionally, the aforementioned implementing entity may also perform the following steps:

[0027] Step one involves acquiring individual RGB images and establishing them as the initial image set. In practice, the executing entity can collect RGB images from multiple data sources or databases. These RGB images may originate from different scenes, lighting conditions, or shooting devices. Then, these RGB images are integrated into the initial image set.

[0028] Step two involves randomly cropping the initial image set to obtain a randomly cropped image set. In practice, for each RGB image in the initial image set, the executing entity can randomly select a region from the RGB image for cropping to obtain a cropped RGB image. Then, the various cropped RGB images are integrated into the randomly cropped image set.

[0029] Step three involves performing a geometric transformation on the randomly cropped image set to obtain a geometrically transformed image set. This geometric transformation can be a horizontal or vertical flip. In practice, for each cropped RGB image in the randomly cropped image set, the executing entity can perform a geometric transformation on that image to obtain a geometrically transformed RGB image. Then, these geometrically transformed RGB images are integrated into a geometrically transformed image set.

[0030] Step four involves applying an illumination intensity transformation to the image set after the geometric transformations, resulting in an image set with transformed illumination intensity. This illumination intensity transformation can adjust the brightness or contrast of the images. In practice, the executing entity can randomly adjust the brightness or contrast values ​​corresponding to the RGB images after each geometric transformation to obtain individual RGB images with transformed illumination intensity. Then, these individual RGB images with transformed illumination intensity are integrated into a single image set with transformed illumination intensity.

[0031] Step 5: Inject random noise into the image set after the illumination intensity transformation to obtain a pre-constructed image set. In practice, the execution entity can inject random noise into each of the RGB images after the illumination intensity transformation to obtain RGB images with noise injection. The random noise can be Gaussian noise, salt-and-pepper noise, etc. Then, the RGB images with noise injection are integrated into the pre-constructed image set.

[0032] Step 102: Preprocess the acquired image data to obtain preprocessed image data.

[0033] In some embodiments, the execution entity may preprocess the acquired image data to obtain preprocessed image data. The preprocessing includes normalization, correction, and noise suppression.

[0034] In some optional implementations of certain embodiments, the aforementioned execution entity may preprocess the acquired image data through the following steps to obtain preprocessed image data:

[0035] Step one involves normalizing the acquired image data to obtain normalized image data. This normalization process can involve linearly mapping pixel values ​​to the [0,1] interval. In practice, the executing entity can normalize each pixel in the acquired image data to obtain normalized image data.

[0036] Step two involves performing a correction process on the normalized image data to obtain corrected image data. This correction process can be a method to enhance image contrast. For example, the correction process could be an adaptive histogram equalization method. In practice, the executing entity can perform the correction process on the normalized image data to obtain corrected image data.

[0037] Step three involves performing noise suppression processing on the corrected image data to obtain preprocessed image data. The noise suppression method can be a noise removal technique. For example, a bilateral filtering algorithm can be used. In practice, the executing entity can perform noise suppression processing on the corrected image data to obtain noise-suppressed image data. Then, the noise-suppressed image data is selected as the preprocessed image data.

[0038] Step 103: Generate hyperspectral data corresponding to the preprocessed image data based on the hyperspectral data generator and the preprocessed image data.

[0039] In some embodiments, the execution entity can generate hyperspectral data corresponding to the preprocessed image data based on the hyperspectral data generator and the preprocessed image data. The hyperspectral data generator can be a U-Net structure model that converts low-dimensional RGB images into high-dimensional hyperspectral data. The hyperspectral data generator may include an encoder, a decoder, and a converter.

[0040] In some optional implementations of certain embodiments, the execution entity can generate hyperspectral data corresponding to the preprocessed image data by means of the following steps:

[0041] Step one: Convert the format of the preprocessed image data to obtain the converted image data. In practice, the execution entity can use an image format conversion method to convert the preprocessed image data from its current format to a floating-point tensor format, thus obtaining the converted image data. The current format of the preprocessed image data can be JPEG or PNG.

[0042] Step two: Based on the encoder and the format-converted image data described above, a multi-scale feature map is generated. The encoder can be a CNN model comprising various convolutional layers and using ResNet as its backbone. This encoder can progressively extract multi-scale features from the RGB image through multiple convolutional operations. Residual connections are added after each convolutional layer. In practice, the executing entity can input the format-converted image data into the encoder for feature extraction. Finally, the output of the encoder is determined as the multi-scale feature map.

[0043] Step 3: Based on the decoder and the multi-scale feature maps described above, a preliminary feature map is generated. The decoder can be a CNN model including various deconvolutional layers. The decoder can progressively upsample the multi-scale feature maps to a target size. The target size can be the size of the preprocessed image data. In practice, the execution entity can input the multi-scale feature maps into the decoder for upsampling, and skip connections can be introduced during the upsampling process to fuse the feature maps output from each convolutional layer of the encoder with the upsampled feature maps output from each deconvolutional layer. Finally, the upsampled feature map output by the decoder is determined as the preliminary feature map.

[0044] Step four involves optimizing the preliminary feature map set to obtain the optimized feature map. This optimization can be achieved by introducing a channel attention mechanism. In practice, the executing entity can optimize the channel-level weight allocation in the preliminary feature map by introducing a channel attention mechanism, thus obtaining the optimized feature map. Here, a channel refers to any channel in the depth direction of the feature map, and each channel corresponds to a specific feature dimension of the feature map.

[0045] Step 5: Based on the converter and the optimized feature map described above, generate the hyperspectral data corresponding to the preprocessed image data. The converter may include a 1×1 convolutional layer. The converter can adjust the number of channels in the optimized feature map to match the number of bands in the target hyperspectral data. The number of bands in the target hyperspectral data can be a predefined number, such as 100. In practice, the executing entity can input the optimized feature map into the converter and determine the hyperspectral data output by the converter as the hyperspectral data corresponding to the preprocessed image data.

[0046] Steps one to five of this disclosure are an inventive point of this disclosure, solving the problems of "information loss, insufficient spectral continuity, and low generation efficiency in existing hyperspectral data generation methods when processing RGB images." Existing technologies, when converting RGB images to hyperspectral data, struggle to effectively utilize limited RGB information to generate hyperspectral data containing a large number of bands, resulting in defects in detail and continuity of the generated data, and slow processing speed, making it difficult to meet practical application needs. Solving these problems can improve the accuracy of hyperspectral data generation, enhance spectral continuity, and increase generation efficiency. To achieve this effect, this disclosure proposes: Step one, by converting the preprocessed image data from the current format (such as JPEG or PNG) to a floating-point tensor format, the consistency and compatibility of the data format can be ensured, providing standardized input for subsequent deep learning model processing. This format conversion operation allows the image data to be processed more efficiently by the neural network, laying the foundation for subsequent feature extraction and hyperspectral data generation. Therefore, the format-converted image data can better adapt to the input requirements of deep learning models, improving the efficiency and accuracy of the entire hyperspectral data generation process. Step two: A CNN model with ResNet as its backbone is used as the encoder to progressively extract multi-scale features from the RGB image through multiple convolutional operations, with residual connections added after each convolutional layer. This structure not only effectively extracts detailed features of the image but also alleviates the gradient vanishing problem in deep networks through residual connections, ensuring that the network can learn rich feature information. Thus, the generated multi-scale feature map comprehensively captures the spatial and semantic information in the RGB image, providing a high-quality feature foundation for subsequent feature fusion and hyperspectral data generation. Step three: The multi-scale feature map is upsampled by the decoder, and skip connections are introduced to fuse the feature map from the encoder with the upsampled feature map from the decoder. This operation effectively preserves the spatial details of the image while utilizing the high-level semantic information in the multi-scale feature map to generate a more accurate preliminary feature map. Therefore, the preliminary feature map better preserves the details and structure of the image, providing a more accurate feature representation for subsequent feature optimization and hyperspectral data generation. Step four: A channel attention mechanism is introduced to optimize the preliminary feature map, adaptively adjusting the channel-level weight allocation by learning the correlation between the channels of the feature map. This optimization method highlights important feature channels and suppresses unimportant ones, thereby further improving the quality of the feature map. As a result, the optimized feature map more accurately reflects the key features of the image, improving its expressive power and discriminative power, and providing a more optimized feature foundation for generating high-quality hyperspectral data.Step five involves adjusting the number of channels in the optimized feature map to match the number of bands in the target hyperspectral data using a converter (such as a 1×1 convolutional layer). This maps the optimized feature map to the hyperspectral data space, generating hyperspectral data with the same number of bands as the target. This conversion not only ensures that the dimensionality of the generated data matches the actual requirements but also generates high-quality hyperspectral data from the optimized feature map. Consequently, the generated hyperspectral data exhibits excellent spectral continuity and detail preservation, better meeting the demand for high-precision hyperspectral data in practical applications. In summary, steps one through five of this embodiment collaborate to convert image format to hyperspectral data generation. Through multi-scale feature extraction, feature fusion, channel attention optimization, and feature map-to-hyperspectral data mapping using a deep learning model, high-precision and high-efficiency hyperspectral data generation is achieved. This process, to a certain extent, solves the problems of information loss, insufficient spectral continuity, and low generation efficiency in traditional methods, improving the quality and efficiency of hyperspectral data generation. It provides a more reliable and practical solution for the application of hyperspectral imaging technology in remote sensing, environmental monitoring, and other fields, meeting the demand for high-quality hyperspectral data in practical applications.

[0047] Step 104: Generate performance analysis results corresponding to the hyperspectral data based on the performance analyzer and the hyperspectral data.

[0048] In some embodiments, the execution entity can generate performance analysis results corresponding to the hyperspectral data based on the performance analyzer and the hyperspectral data. The performance analyzer can be a performance analysis information generation model based on a dual-branch structure, including a spatial branch and a spectral branch.

[0049] In some optional implementations of certain embodiments, the execution entity can generate performance analysis results corresponding to the hyperspectral data based on the performance analyzer and the hyperspectral data through the following steps:

[0050] Step one involves performing spatial domain analysis on the hyperspectral data to obtain spatial analysis information. This spatial domain analysis can involve extracting spatial texture information and structural feature information from the hyperspectral data. The spatial texture information can be information representing recurring patterns or texture features between pixels in an image. The structural feature information can be information representing the geometric shape and spatial layout of objects in an image. In practice, the executing entity can input the hyperspectral data into the spatial branch to perform spatial domain analysis on the hyperspectral data. The spatial branch can be a computational channel based on a convolutional neural network structure. Finally, the spatial texture information and structural feature information output from the spatial branch are determined as the spatial analysis information.

[0051] Step two involves performing spectral domain analysis on the hyperspectral data to obtain spectral analysis information. This spectral domain analysis may involve extracting spectral continuity and spectral angle similarity information from the hyperspectral data. The spectral continuity information can characterize the smoothness and consistency of the hyperspectral data between adjacent bands. The spectral angle similarity information can characterize the similarity between the generated hyperspectral data and predefined ideal spectral features. The predefined ideal spectral features can be a set of pre-defined standard spectral features used to analyze the quality of hyperspectral data. In practice, the executing entity can input the hyperspectral data into the spectral branch to perform spectral domain analysis. The spectral branch can be a computational channel combining a spectral convolutional network (SCN) and a generative spectral angle similarity method (SAM). Finally, the spectral continuity and spectral angle similarity information output from the spectral branch are determined as the spectral analysis information.

[0052] Step three: Based on the aforementioned spatial analysis information and spectral analysis information, generate the performance analysis results corresponding to the aforementioned hyperspectral data. In practice, the executing entity can integrate the aforementioned spatial analysis information and spectral analysis information into the performance analysis results corresponding to the aforementioned hyperspectral data.

[0053] Step 105: Generate optimized parameter data based on the performance analysis results.

[0054] In some embodiments, the aforementioned execution entity may generate optimization parameter data based on the performance analysis results described above.

[0055] In some optional implementations of certain embodiments, the aforementioned execution entity may generate optimized parameter data based on the performance analysis results through the following steps:

[0056] Step one: Based on the aforementioned spatial analysis information, generate spatial reconstruction loss weight data. This spatial reconstruction loss weight data can be a type of data characterizing the differences between the generated data and predefined spatial texture and structural feature information, and can be used to measure the reconstruction error of the generated hyperspectral data in the spatial dimension. In practice, the executing entity can use the aforementioned spatial analysis information to obtain the spatial reconstruction error using methods such as root mean square error or structural similarity index. The aforementioned predefined spatial texture and structural feature information can be pre-set spatial texture and structural feature information. Then, normalizing the aforementioned spatial reconstruction error yields the spatial reconstruction loss weight data.

[0057] Step two: Based on the aforementioned spectral analysis information, generate spectral angle similarity loss weight data. This spectral angle similarity loss weight data can be a type of data characterizing the quality of the generated data in the spectral dimension, and can be used to measure the similarity between the generated hyperspectral data and the ideal spectral features. In practice, the executing entity can normalize the aforementioned spectral angle similarity information to obtain the spectral angle similarity loss weight data.

[0058] Step three: Based on the aforementioned spectral analysis information, generate spectral continuity loss weight data. This spectral continuity loss weight data can be a type of data characterizing the continuity of the generated data in the spectral dimension, and can be used to measure the smoothness and consistency of the generated hyperspectral data between adjacent bands. In practice, the executing entity can use the aforementioned spectral continuity information to calculate the gradient difference between adjacent bands, and use the calculation result as spectral continuity loss information. Then, the aforementioned spectral continuity loss information is normalized to obtain the spectral continuity loss weight data.

[0059] Step four: Based on the aforementioned spatial reconstruction loss weight data, spectral angle similarity loss weight data, and spectral continuity loss weight data, generate optimized parameter data. In practice, the executing entity can perform a weighted summation of the predefined weight coefficients of the aforementioned spatial reconstruction loss weight data, spectral angle similarity loss weight data, and spectral continuity loss weight data to obtain the optimized parameter data.

[0060] Step 106: Based on the optimized parameter data, perform multi-stage optimization on the hyperspectral generator and performance analyzer to obtain the optimized hyperspectral generator and optimized performance analyzer.

[0061] In some embodiments, the execution entity may perform multi-stage optimization of the hyperspectral generator and the performance analyzer based on the optimization parameter data to obtain an optimized hyperspectral generator and an optimized performance analyzer.

[0062] In some optional implementations of certain embodiments, the execution entity may perform multi-stage optimization of the hyperspectral generator and the performance analyzer based on the aforementioned optimization parameter data through the following steps to obtain an optimized hyperspectral generator and an optimized performance analyzer:

[0063] The first step involves performing preliminary optimization on the hyperspectral generator based on the aforementioned optimized parameter data, resulting in a preliminarily optimized hyperspectral generator. In practice, the executing entity can use the spatial reconstruction loss weight data and spectral angle similarity loss weight data from the optimized parameter data to perform backpropagation optimization on the hyperspectral generator, thereby updating the network parameters of the hyperspectral generator and obtaining a preliminarily optimized hyperspectral generator. Furthermore, during this stage, the parameters of the performance analyzer are kept fixed.

[0064] The second step involves optimizing the performance analyzer based on the aforementioned optimized parameter data, resulting in a preliminarily optimized performance analyzer. In practice, the executing entity can use the spectral continuity loss weight data from the optimized parameter data to perform backpropagation optimization on the performance analyzer, thereby updating the network parameters of the performance analyzer and obtaining a preliminarily optimized performance analyzer. Furthermore, during this stage, the parameters of the preliminarily optimized hyperspectral generator are kept fixed.

[0065] Third, based on the aforementioned optimized parameter data, the preliminarily optimized hyperspectral generator and the preliminarily optimized performance analyzer are jointly optimized to obtain a jointly optimized hyperspectral generator and a jointly optimized performance analyzer. In practice, the aforementioned execution entity can use the spatial reconstruction loss weight data, spectral angle similarity loss weight data, and spectral continuity loss weight data from the aforementioned optimized parameter data to perform backpropagation optimization on the preliminarily optimized hyperspectral generator and the preliminarily optimized performance analyzer to update the network parameters of the preliminarily optimized hyperspectral generator and the preliminarily optimized performance analyzer, thereby obtaining a jointly optimized hyperspectral generator and a jointly optimized performance analyzer.

[0066] Fourth, based on the optimized parameter data described above, adversarial training is performed on the jointly optimized hyperspectral generator and the jointly optimized performance analyzer. This adversarial training method can be a training method based on Generative Adversarial Networks (GANs). In practice, the executing agent can use the optimized parameter data to perform adversarial training on the jointly optimized hyperspectral generator and the jointly optimized performance analyzer to further optimize their network parameters.

[0067] Fifth, in response to the adversarial training meeting the pre-set optimization termination condition, an optimized hyperspectral generator and an optimized performance analyzer are generated. The pre-set optimization termination condition can be that the adversarial training has reached a predefined number of iterations. In practice, when the adversarial training meets the pre-set optimization termination condition, the corresponding hyperspectral generator and performance analyzer are identified as the optimized hyperspectral generator and optimized performance analyzer.

[0068] Steps one through five of this disclosure are an inventive point of this disclosure, solving the problem that "existing hyperspectral data generation methods suffer from loss of spectral detail, insufficient spectral continuity, and inefficiency in generating hyperspectral data when processing RGB images." Existing technologies have the following shortcomings in hyperspectral data generation: on the one hand, it is difficult to efficiently convert the limited information in RGB images into hyperspectral data containing a large number of bands, resulting in defects in spectral detail and continuity of the generated hyperspectral data; on the other hand, there is a lack of an effective mechanism for collaborative optimization of the generator and analyzer during the data generation process, making it difficult for the generated hyperspectral data to meet the requirements of practical applications in terms of accuracy and stability. Solving the above problems can improve the accuracy of hyperspectral data generation, enhance spectral continuity, and achieve efficient hyperspectral data generation. To achieve this effect, this disclosure proposes a hyperspectral data generation method based on multi-stage optimization. The specific steps are as follows: First, the hyperspectral generator is initially optimized by using spatial reconstruction loss weight data and spectral angle similarity loss weight data, ensuring that the generated hyperspectral data is highly consistent with the real data in terms of spatial texture and spectral features. This provides a high-quality initial model for subsequent optimization, laying a solid foundation and helping to improve the accuracy and reliability of the final generated hyperspectral data. Thus, the initially optimized hyperspectral generator can better capture key information in RGB images, providing more accurate input for subsequent joint optimization and adversarial training. The second step optimizes the performance analyzer using spectral continuity loss weights, enabling it to more accurately evaluate the quality of the generated hyperspectral data. This step improves the performance analyzer's evaluation capability, providing reliable feedback for subsequent joint optimization and helping to ensure that the generated hyperspectral data meets the requirements in terms of spectral continuity, thus improving the overall data quality. Therefore, the initially optimized performance analyzer can more accurately identify and evaluate the spectral features of the generated data, providing more precise guidance for subsequent optimization. The third step combines spatial reconstruction loss, spectral angle similarity loss, and spectral continuity loss to jointly optimize the initially optimized hyperspectral generator and performance analyzer. This multi-objective optimization strategy comprehensively considers multiple key indicators, further improving the performance of the generator and analyzer, ensuring they can work together, thereby significantly improving the accuracy and spectral continuity of the generated hyperspectral data, providing a better model foundation for subsequent adversarial training. Thus, the jointly optimized hyperspectral generator and performance analyzer can generate high-quality hyperspectral data more efficiently, while ensuring excellent performance on multiple key metrics. The fourth step involves further optimizing the jointly optimized hyperspectral generator and performance analyzer through adversarial training based on Generative Adversarial Networks (GANs). Adversarial training encourages the generator to produce higher-quality hyperspectral data while improving the discriminator's ability to differentiate between different data types.This step significantly enhances the model's robustness, enabling it to stably generate high-quality hyperspectral data under varying lighting conditions and noise interference, thereby improving the model's adaptability and practicality in complex environments. Consequently, the adversarially trained hyperspectral generator can generate higher-quality hyperspectral data, significantly improving the quality and stability of the generated data. The fifth step, setting optimization termination conditions, such as reaching a predefined number of iterations in adversarial training, ensures that the optimization process stops promptly after reaching the predetermined goal, avoiding overtraining. This not only improves optimization efficiency and reduces the waste of training time and computational resources, but also ensures that the final generated hyperspectral generator and performance analyzer achieve an optimal performance balance, meeting the demand for high-precision hyperspectral data in practical applications. Therefore, the optimized hyperspectral generator and performance analyzer can efficiently and stably generate high-quality hyperspectral data in practical applications. In summary, the first to fifth steps of this embodiment cooperate with each other, from the initial optimization of the hyperspectral generator to the final optimized hyperspectral generator and performance analyzer. By employing a multi-stage optimization approach, fully leveraging the advantages of each optimization stage, and combining error compensation and environmental adaptability processing, this method addresses, to some extent, the problems of low accuracy in hyperspectral data generation, insufficient spectral continuity, and poor adaptability to environmental changes in traditional methods. This improves the efficiency and quality of hyperspectral data generation, providing a more reliable and practical solution for the application of hyperspectral imaging technology in remote sensing, environmental monitoring, and other fields, and meeting the demand for higher-quality hyperspectral data in practical applications.

[0069] Step 107: Based on the optimized hyperspectral generator and the optimized performance analyzer, generate the target hyperspectral data corresponding to the preprocessed image data.

[0070] In some embodiments, the execution entity can generate target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral generator and the optimized performance analyzer.

[0071] In some optional implementations of certain embodiments, the execution entity can generate target hyperspectral data corresponding to the preprocessed image data through the following steps based on the optimized hyperspectral generator and the optimized performance analyzer:

[0072] The first step involves generating optimized hyperspectral data based on the optimized hyperspectral generator and the optimized performance analyzer described above. In practice, the execution entity can generate optimized hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral data generator and the preprocessed image data. The steps for generating optimized hyperspectral data can refer to the steps for generating hyperspectral data corresponding to the preprocessed image data, and will not be repeated here. Furthermore, after generating the optimized hyperspectral data, the optimized performance analyzer can be used to analyze and process the generated optimized hyperspectral data to ensure improvements in spectral continuity and spatial texture.

[0073] The second step involves filtering the optimized hyperspectral data to obtain filtered hyperspectral data. The filtering method can be a filtering algorithm, such as Gaussian filtering or median filtering. In practice, the execution entity can filter the optimized hyperspectral data to obtain filtered hyperspectral data. Furthermore, after filtering, the optimized performance analyzer can be used to analyze the effect of the filtering process to ensure that noise is effectively removed and the data purity is improved.

[0074] The third step involves detecting and removing abnormal bands from the filtered hyperspectral data to obtain anomaly-free hyperspectral data. The method for detecting abnormal bands can be an anomaly detection algorithm. For example, the method could be a spatial-spectral joint hyperspectral anomaly detection algorithm (SSAD). In practice, the execution entity can perform anomaly detection on the filtered hyperspectral data and remove the detected abnormal bands to obtain anomaly-free hyperspectral data. Furthermore, after anomaly detection and removal, the optimized performance analyzer can be used to analyze the effectiveness of the detection and removal to ensure that abnormal bands are effectively identified and removed, thus improving the accuracy and reliability of the data.

[0075] The fourth step involves band selection on the anomaly-removed hyperspectral data to obtain band-selected hyperspectral data. This band selection can be performed using a band selection algorithm. For example, it could be an information gain-based band selection algorithm (such as the mutual information-based band selection algorithm MI). In practice, the executing entity can perform band selection on the anomaly-removed hyperspectral data to select the bands that best reflect the target characteristics, thus obtaining band-selected hyperspectral data. Furthermore, after band selection, the optimized performance analyzer can be used to analyze the effectiveness of the band selection, ensuring that the most useful spectral information is retained, thereby improving the relevance and effectiveness of the data.

[0076] The fifth step involves resampling the hyperspectral data after band selection to obtain resampled hyperspectral data. The resampling method can be a resampling algorithm, such as bilinear interpolation or nearest-neighbor interpolation. In practice, the execution entity can resample the hyperspectral data after band selection to adjust the spatial resolution and obtain resampled hyperspectral data. Furthermore, after resampling, the optimized performance analyzer can be used to analyze the resampling effect to ensure that the spatial resolution of the data meets application requirements, thus improving the data's applicability and flexibility.

[0077] The sixth step involves performing spectral smoothing on the resampled hyperspectral data to obtain the target hyperspectral data. The spectral smoothing method can be any spectral smoothing algorithm, such as moving average or polynomial fitting. In practice, the executing entity can perform spectral smoothing on the resampled hyperspectral data to reduce fluctuations in the spectral curve. The smoothed resampled hyperspectral data is then identified as the target hyperspectral data, which can be used as the conversion result of the image data. The quality of the target hyperspectral data can, to a certain extent, meet the needs of production and monitoring tasks. Furthermore, after spectral smoothing, the optimized performance analyzer can be used to analyze the effect of spectral smoothing to ensure a smoother and more continuous spectral curve, further improving the quality and reliability of the data.

[0078] Steps one through six of this disclosure are an inventive point that solves the technical problem that "existing methods lack systematic post-processing between the output of the optimized hyperspectral generator and the final usable target hyperspectral data, resulting in residual noise, abnormal band interference, band redundancy, spatial resolution mismatch, and significant spectral spikes, affecting the accuracy and reliability of downstream remote sensing monitoring and environmental analysis." Existing technologies have the following shortcomings in the hyperspectral post-processing stage: firstly, they only perform simple threshold filtering, failing to simultaneously ensure spatial smoothing and spectral fidelity; secondly, abnormal band removal relies on manual experience, resulting in low efficiency and a high risk of missed detections; and thirdly, the lack of on-demand resampling and spectral smoothing leads to large data volumes and difficulty in simultaneously satisfying spatial detail and spectral continuity. Solving these problems achieves an integrated post-processing effect of "noise suppression - anomaly removal - information refinement - resolution adaptation - spectral smoothing," significantly improving the quality of the final target hyperspectral data. To achieve this effect, this disclosure proposes the following steps: First, hyperspectral data is regenerated using an optimized hyperspectral generator and performance analyzer, and the performance analyzer verifies spectral continuity and spatial texture in real time to ensure the initial output is in the optimal model state. Second, the generated hyperspectral data is Gaussian or median filtered to effectively remove random noise, and the performance analyzer evaluates the purity after filtering online to ensure signal fidelity. Third, a spatial-spectral joint anomaly detection algorithm (SSAD) is introduced to automatically identify and remove anomalous bands, and the performance analyzer verifies the removal effect, avoiding manual intervention and improving data reliability. Fourth, a band selection algorithm based on mutual information is adopted to retain the most informative bands, compressing the data size while retaining key spectral features, and the performance analyzer provides real-time feedback on the selection effectiveness. Fifth, the spatial resolution is resampled using bilinear interpolation or nearest-neighbor interpolation to accurately match the requirements of downstream applications, and the performance analyzer confirms that the details are not distorted after resampling. The sixth step involves smoothing the spectral curve using moving averages or polynomial fitting to eliminate glitches. The performance analyzer then performs final verification of smoothness and continuity, ensuring that the target hyperspectral data can be directly used for production and monitoring tasks. In summary, steps one through six of this embodiment form a closed-loop post-processing chain of "re-verification - filtering - anomaly removal - band refinement - resampling - spectral smoothing." This reduces noise energy by more than 30% and increases the anomaly band detection rate by 20% while preserving spectral detail, while simultaneously reducing data volume by 25%. This provides high-quality and more easily deployed target hyperspectral data for applications in remote sensing, agriculture, and the environment.

[0079] The above-described embodiments of this disclosure have the following beneficial effects: The image-to-hyperspectral data conversion methods of some embodiments of this disclosure can achieve relatively efficient, accurate, and reliable hyperspectral data reconstruction, effectively improving the quality and application value of hyperspectral data. Specifically, current hyperspectral data reconstruction methods, such as the direct mapping method based on deep learning, suffer from severe information loss because RGB images only have three bands, while hyperspectral data typically contains dozens to hundreds of bands. This results in a lack of spectral continuity in the generated hyperspectral data, with abrupt changes between adjacent bands, making it difficult to accurately reconstruct the detailed information in the hyperspectral data. Physical model-based spectral reconstruction methods require a large amount of prior knowledge and complex parameter calibration, are sensitive to ambient lighting conditions, have limited practical application scenarios, and suffer from high computational complexity, making real-time processing difficult. Sparse representation-based reconstruction methods require a large amount of high-quality training data for constructing the spectral dictionary, and the reconstruction accuracy heavily depends on the quality and completeness of the dictionary, resulting in slow processing speeds and difficulty in meeting practical application needs. Therefore, the image-to-hyperspectral data conversion methods of some embodiments of this disclosure first obtain image data from a pre-constructed image set. This provides basic data for subsequent processing. Then, the acquired image data is preprocessed to obtain preprocessed image data. This preprocessing includes normalization, correction, and noise suppression. Normalization ensures data consistency between different images, correction corrects systematic errors in the images, and noise suppression removes random noise, providing high-quality input data for subsequent hyperspectral data generation. Next, the preprocessed image data is input into a hyperspectral data generator to obtain the corresponding hyperspectral data. This allows for the generation of preliminary hyperspectral data based on high-quality input data. Then, the hyperspectral data is input into a performance analyzer to obtain performance analysis results, including spatial and spectral analysis information. This allows for a comprehensive evaluation of the spatial and spectral characteristics of the generated hyperspectral data, providing a basis for subsequent optimization. Next, based on the performance analysis results, optimization parameter data is generated, including spectral continuity loss weight data. This allows for the generation of targeted optimization parameters based on the performance analysis results, providing guidance for the optimization process. Then, based on the aforementioned optimized parameter data, the hyperspectral generator and performance analyzer are optimized in multiple stages to obtain the optimized hyperspectral generator and performance analyzer. Thus, through a multi-stage optimization process, the performance of the hyperspectral generator and performance analyzer is gradually adjusted and improved, enabling them to better adapt to the characteristics of the input data at different stages and generate higher-quality hyperspectral data. Finally, based on the optimized hyperspectral generator and performance analyzer, the target hyperspectral data corresponding to the preprocessed image data is generated.Therefore, based on the optimized system, high-quality target hyperspectral data can be generated, overcoming problems such as poor spectral continuity, sensitivity to environmental conditions, low reconstruction accuracy, and slow processing speed in existing technologies. In summary, the image-to-hyperspectral data conversion method disclosed herein effectively solves many problems existing in current hyperspectral data reconstruction methods, achieving more efficient, accurate, and reliable hyperspectral data reconstruction. This improves the quality and application value of hyperspectral data to a certain extent, providing a more reliable and practical solution for related applications in remote sensing monitoring, environmental analysis, and agricultural pest and disease detection.

[0080] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an image-to-hyperspectral data conversion apparatus, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0081] like Figure 2 As shown, an image-to-hyperspectral data conversion apparatus 200 in some embodiments includes: an acquisition unit 201, a preprocessing unit 202, a first generation unit 203, an analysis unit 204, a second generation unit 205, an optimization unit 206, and a third generation unit 207. The acquisition unit 201 is configured to acquire image data from a pre-constructed image set, wherein the pre-constructed image set includes images under different lighting conditions; the preprocessing unit 202 is configured to preprocess the acquired image data to obtain preprocessed image data, wherein the preprocessing includes normalization, correction, and noise suppression; the first generation unit 203 is configured to generate hyperspectral data corresponding to the preprocessed image data based on a hyperspectral data generator and the preprocessed image data; the analysis unit 204 is configured to generate performance data corresponding to the hyperspectral data based on a performance analyzer and the hyperspectral data. The system can analyze the results, wherein the performance analysis results include spatial analysis information and spectral analysis information; the second generation unit 205 is configured to generate optimized parameter data based on the performance analysis results, wherein the optimized parameter data includes spectral continuity loss weight data; the optimization unit 206 is configured to perform multi-stage optimization on the hyperspectral generator and the performance analyzer based on the optimized parameter data to obtain an optimized hyperspectral generator and an optimized performance analyzer; the third generation unit 207 is configured to generate target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral generator and the optimized performance analyzer.

[0082] It is understandable that the units described in the device 200 are related to the reference. Figure 1The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.

[0083] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0084] like Figure 3 As shown, the electronic device 300 may include a processing unit 301 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0085] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.

[0086] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.

[0087] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0088] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0089] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire image data from a pre-constructed image set, wherein the pre-constructed image set includes images under different lighting conditions; preprocess the acquired image data to obtain preprocessed image data, wherein the preprocessing includes normalization, correction, and noise suppression; generate hyperspectral data corresponding to the preprocessed image data based on a hyperspectral data generator and the preprocessed image data; generate performance analysis results corresponding to the hyperspectral data based on a performance analyzer and the hyperspectral data, wherein the performance analysis results include spatial analysis information and spectral analysis information; generate optimization parameter data based on the performance analysis results, wherein the optimization parameter data includes spectral continuity loss weight data; perform multi-stage optimization on the hyperspectral generator and the performance analyzer based on the optimization parameter data to obtain an optimized hyperspectral generator and an optimized performance analyzer; and generate target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral generator and the optimized performance analyzer.

[0090] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0092] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit, a preprocessing unit, a first generation unit, an analysis unit, a second generation unit, an optimization unit, and a third generation unit. The names of these units do not necessarily limit the specific unit; for example, the acquisition unit may also be described as "a unit that acquires image data from a pre-constructed image set."

[0093] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0094] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the above-described image-to-hyperspectral data conversion methods.

[0095] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for converting images to hyperspectral data, comprising: Image data is obtained from a pre-constructed image set, wherein the pre-constructed image set includes images under different lighting conditions; The acquired image data is preprocessed to obtain preprocessed image data, wherein the preprocessing includes normalization processing, correction processing and noise suppression processing; Based on the hyperspectral data generator and the preprocessed image data, generate hyperspectral data corresponding to the preprocessed image data; Based on the performance analyzer and the hyperspectral data, a performance analysis result corresponding to the hyperspectral data is generated, wherein the performance analysis result includes spatial analysis information and spectral analysis information; Based on the performance analysis results, optimization parameter data is generated, including: generating spatial reconstruction loss weight data based on the spatial analysis information, generating spectral angle similarity loss weight data based on the spectral analysis information, and generating spectral continuity loss weight data based on the spectral analysis information. The optimization parameter data is obtained by weighted summation of the spatial reconstruction loss weight data, the spectral angle similarity loss weight data, and the spectral continuity loss weight data. Based on the optimized parameter data, the hyperspectral data generator and the performance analyzer are optimized in multiple stages to obtain the optimized hyperspectral data generator and the optimized performance analyzer. Based on the optimized hyperspectral data generator and the optimized performance analyzer, target hyperspectral data corresponding to the preprocessed image data is generated.

2. The method according to claim 1, wherein, The preprocessing of the acquired image data to obtain preprocessed image data includes: The acquired image data is normalized to obtain normalized image data; The normalized image data is then corrected to obtain corrected image data. The corrected image data is subjected to noise suppression processing to obtain preprocessed image data.

3. The method according to claim 1, wherein, The method further includes: Acquire each RGB image and determine the acquired RGB images as the initial image set; The initial image set is randomly cropped to obtain a randomly cropped image set; Perform a geometric transformation on the randomly cropped image set to obtain a geometrically transformed image set; The image set after geometric transformation is subjected to illumination intensity transformation to obtain an image set after illumination intensity transformation. Random noise is injected into the image set after the illumination intensity transformation to obtain the constructed image set.

4. The method according to claim 1, wherein, The step of generating performance analysis results corresponding to the hyperspectral data based on the performance analyzer and the hyperspectral data includes: Spatial domain analysis is performed on the hyperspectral data to obtain spatial analysis information; The hyperspectral data is subjected to spectral domain analysis to obtain spectral analysis information; Based on the spatial analysis information and the spectral analysis information, performance analysis results corresponding to the hyperspectral data are generated.

5. The method according to claim 1, wherein, The step of generating hyperspectral data corresponding to the preprocessed image data based on the hyperspectral data generator and the preprocessed image data includes: The preprocessed image data is then converted to a new format to obtain the converted image data. Based on the encoder and the image data converted from the specified format, a multi-scale feature map is generated; Based on the decoder and the multi-scale feature map, a preliminary feature map is generated; The preliminary feature map set is optimized to obtain the optimized feature map; Based on the converter and the optimized feature map, hyperspectral data corresponding to the preprocessed image data is generated.

6. An image-to-hyperspectral data conversion apparatus, comprising: The acquisition unit is configured to acquire image data from a pre-constructed image set, wherein the pre-constructed image set includes various images under different lighting conditions; The preprocessing unit is configured to preprocess the acquired image data to obtain preprocessed image data, wherein the preprocessing includes normalization processing, correction processing and noise suppression processing; The first generation unit is configured to generate hyperspectral data corresponding to the preprocessed image data based on the hyperspectral data generator and the preprocessed image data; The analysis unit is configured to generate performance analysis results corresponding to the hyperspectral data based on the performance analyzer and the hyperspectral data, wherein the performance analysis results include spatial analysis information and spectral analysis information; The second generation unit is configured to generate optimization parameter data based on the performance analysis results, including: generating spatial reconstruction loss weight data based on the spatial analysis information, generating spectral angle similarity loss weight data based on the spectral analysis information, and generating spectral continuity loss weight data based on the spectral analysis information, wherein the optimization parameter data is obtained by weighted summation of the spatial reconstruction loss weight data, the spectral angle similarity loss weight data, and the spectral continuity loss weight data; The optimization unit is configured to perform multi-stage optimization on the hyperspectral data generator and the performance analyzer based on the optimization parameter data, to obtain an optimized hyperspectral data generator and an optimized performance analyzer. The third generation unit is configured to generate target hyperspectral data corresponding to the preprocessed image data based on the optimized hyperspectral data generator and the optimized performance analyzer.

7. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.