Hyperspectral image generation method and apparatus

By performing object segmentation and cascaded network prediction on the first image, a hyperspectral image is generated based on the principle of band continuity. This solves the problem of high acquisition cost of hyperspectral images in the prior art, realizes the purpose of directly calculating hyperspectral images, and reduces acquisition cost.

CN115908138BActive Publication Date: 2026-11-24LENOVO (BEIJING) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211582310.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2026-11-24
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

The acquisition of hyperspectral images in existing technologies is costly, mainly due to the addition of imaging systems, which leads to hardware dependence and increases the difficulty and cost of acquisition.

Method used

By segmenting the first image into objects, predicting the values ​​of the objects in multiple second-class bands based on the pixel values ​​in the first-class band, and combining them based on the principle of band continuity to obtain a hyperspectral image, the hyperspectral image generation is achieved by training a cascaded network and a hyperspectral image generation model.

Benefits of technology

It enables direct computation of hyperspectral images, reducing acquisition costs and eliminating reliance on specific imaging systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908138B_ABST
    Figure CN115908138B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a hyperspectral image generation method and device, electronic equipment and a storage medium. The method comprises the following steps: performing object segmentation on a first image to obtain a plurality of objects and position information of the objects in the first image; values of pixels of the same object are located in the same interval, and values of pixels of different objects are located in different intervals; predicting values of each pixel of the object in a plurality of second type bands according to values of the pixels of the object in a first type band; combining the values of the same pixel of the object in all first type bands and the plurality of second type bands to obtain a hyperspectral image corresponding to the object based on a band continuity principle; and combining the hyperspectral images corresponding to the objects according to the position information of the objects in the first image to obtain a hyperspectral image corresponding to the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a hyperspectral image generation method, apparatus, electronic device, and storage medium. Background Technology

[0002] Compared to ordinary RGB images, hyperspectral images have more spectral bands to store more scene information, making them highly valuable in fields such as object detection. To reduce the difficulty of acquiring hyperspectral images, spectral reconstruction methods are generally used, currently mainly through adding additional imaging systems. However, adding imaging systems relies on hardware, making hyperspectral image acquisition costly. Summary of the Invention

[0003] The purpose of this application is to provide a hyperspectral image generation method, apparatus, electronic device, and storage medium, including the following technical solutions:

[0004] A method for generating hyperspectral images, the method comprising:

[0005] The first image is segmented to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to that pixel in each first type of spectral band.

[0006] Based on the values ​​of the pixels in the object in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands;

[0007] Based on the principle of band continuity, the values ​​of the same pixel of the object are combined in all first-class bands and the multiple second-class bands to obtain the hyperspectral image corresponding to the object;

[0008] Based on the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image.

[0009] Optionally, in the above method, predicting the values ​​of each pixel in the object in multiple second-type bands based on the values ​​of the pixels in the first-type band includes:

[0010] Based on the values ​​of the pixels in the object in the first band, predict the values ​​of each pixel in the object in multiple second-type bands located between the first band and the second band.

[0011] The first band and the second band are any two adjacent first-class bands.

[0012] Optionally, in the above method, predicting the values ​​of each pixel in the object in multiple second-type bands based on the values ​​of pixels in the first-type band includes:

[0013] By using a cascaded network, the values ​​of each pixel in the object in multiple second-type bands are predicted based on the values ​​of the pixels in the first-type band.

[0014] The cascaded network includes multiple prediction modules, divided into target prediction modules and non-target prediction modules; among which...

[0015] The input to each target prediction module includes at least the values ​​of the pixels in the object in the first type of band; wherein, adjacent target prediction modules input the values ​​of the pixels in the object in adjacent first type of bands;

[0016] Between any two adjacent target prediction modules, there are multiple non-target prediction modules. The input of the non-target prediction module includes: the value of the pixel in the object in a second type band output by the previous prediction module of the non-target prediction module, as well as the intermediate features of the previous prediction module and the value of the pixel in the object in a band as the input of the previous prediction module.

[0017] If the target prediction module is not the first prediction module of the cascaded network, the input of the target prediction module further includes: the intermediate features of the previous non-target prediction module of the target prediction module and the value of the pixel in the object in a band as the input of the previous prediction module.

[0018] The output of each prediction module is the value of the pixel in the object in the first or second type of band; adjacent prediction modules output the value of the pixel in the object in the adjacent band.

[0019] The above methods are optional, wherein,

[0020] The first prediction module is used to: extract a first feature from the pixel values ​​of the input object in the first type of band of the target to obtain a first feature; extract a second feature from the first feature to obtain an intermediate feature of the first prediction module; perform a linear transformation on the intermediate feature to obtain a second feature; extract a third feature from the second feature to obtain a third feature; the third feature extraction is the inverse process of the second feature extraction; and fuse the first feature and the third feature to obtain the pixel values ​​of the object in the second type of band.

[0021] And / or,

[0022] The non-first prediction module of the cascaded network is used to: extract first features from the pixel values ​​of the input object in two bands respectively, to obtain first features corresponding to the two bands respectively; extract second features from each first feature respectively, to obtain fourth features corresponding to each first feature; fuse each fourth feature and the intermediate feature of the previous prediction module to obtain the intermediate feature of the non-first prediction module; perform a linear transformation on the intermediate feature of the non-first prediction module to obtain a fifth feature; extract the third feature from the fifth feature to obtain a sixth feature; and fuse the sixth feature and the target first feature from the first features corresponding to the two bands respectively to obtain the value of each pixel of the object in a first-class band or a second-class band.

[0023] Optionally, the above method includes performing object segmentation on the first image and predicting the values ​​of each pixel in multiple second-type bands based on the values ​​of pixels in the object in the first type band, comprising:

[0024] The first image is segmented using a hyperspectral image generation model to obtain multiple objects; based on the values ​​of the pixels in the objects in the first type of band, the values ​​of each pixel in the objects in multiple second type of bands are predicted.

[0025] The hyperspectral image generation model is trained using a first sample set and a second sample set; wherein, the first sample in the first sample set is a non-hyperspectral image, and the second sample in the second sample set is a non-hyperspectral image-hyperspectral image pair.

[0026] Optionally, the hyperspectral image generation model is trained using the following method:

[0027] The hyperspectral image generation model is self-supervised and trained using the first sample set to obtain a pre-trained hyperspectral image generation model.

[0028] The pre-trained hyperspectral image generation model is trained in a supervised manner using the second sample set to obtain a trained hyperspectral image generation model.

[0029] Optionally, in the above method, the step of performing self-supervised training of the hyperspectral image generation model using the first sample set includes:

[0030] The first sample is segmented using the hyperspectral image generation model to obtain multiple sample objects and the location information of each sample object in the first sample.

[0031] Perform inverse spectral reflectance transformation on each sample object to obtain the inverse transformation object corresponding to each sample object;

[0032] The hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the sample object in the target first-type band.

[0033] The hyperspectral image generation model predicts the inverse transformation values ​​of pixels in the inverse transformation object in various non-target first-type bands, as well as the inverse transformation values ​​of pixels in the inverse transformation object in multiple second-type bands, based on the inverse transformation values ​​of pixels in the inverse transformation object in the target first-type band.

[0034] Based on the principle of band continuity, the values ​​of the same pixel in the sample object in all first-class bands, all second-class bands, and the value in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object.

[0035] Based on the location information of each sample object in the first sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the first sample;

[0036] The hyperspectral image corresponding to the first sample is segmented using the hyperspectral image generation model to obtain the segmentation result.

[0037] Based on the predicted pixel values ​​of the sample object in the non-target first type band, the inverse transform values ​​of the pixels in the inverse transform object in the non-target first type band, the changing trends of the inverse transform values ​​of the pixels contained in the inverse transform object in each first type band and second type band, the changing trends of the pixel values ​​of the sample object in each first type band and second type band, and the segmentation results, the parameters of the hyperspectral image generation model are updated.

[0038] Optionally, the process of updating the parameters of the hyperspectral image generation model in the above method includes:

[0039] The parameters of the hyperspectral image generation model are updated based on the following criteria: the predicted pixel values ​​of the sample object in the non-target first-type band are close to the actual pixel values ​​of the sample object in the non-target first-type band; the predicted inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band are close to the actual inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band; the predicted trend of the inverse transform values ​​of the pixels contained in the inverse transform object in each first-type and second-type band is far away from the predicted trend of the pixel values ​​of the sample object in each first-type and second-type band; and the segmentation result is close to the result of object segmentation of the first sample.

[0040] Optionally, in the above method, the step of performing supervised training on the pre-trained hyperspectral image generation model using the second sample set to obtain a trained hyperspectral image generation model includes:

[0041] The pre-trained hyperspectral image generation model is used to segment the non-hyperspectral images in the second sample to obtain multiple sample objects and the location information of each sample object in the non-hyperspectral images in the second sample.

[0042] The pre-trained hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the target first-type band.

[0043] Based on the principle of band continuity, the predicted values ​​of the same pixel of the sample object in all non-first-class bands, in all second-class bands, and in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object.

[0044] Based on the location information of each sample object in the non-hyperspectral image of the second sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the second sample;

[0045] The hyperspectral image corresponding to the second sample is segmented to obtain the segmentation result.

[0046] The parameters of the pre-trained hyperspectral image generation model are updated with the goal of making the pixel values ​​of the predicted sample object in the non-target first and second bands approach the pixel values ​​of the sample object in the hyperspectral image of the second sample in the non-target first and second bands, and the segmentation result of the hyperspectral image corresponding to the second sample approach the object segmentation result of the non-hyperspectral image in the second sample.

[0047] A hyperspectral image generation apparatus, comprising:

[0048] The segmentation unit is used to segment the first image into objects to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to the pixel in each first type of spectral band.

[0049] The prediction unit is used to predict the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of the pixels in the first-type band.

[0050] The first combination unit is used to combine the values ​​of the same pixel of the object in all first-class bands and the multiple second-class bands based on the principle of band continuity to obtain the hyperspectral image corresponding to the object.

[0051] The second combining unit is used to combine the hyperspectral images corresponding to each object according to the position information of each object in the first image to obtain the hyperspectral image corresponding to the first image.

[0052] An electronic device, comprising:

[0053] Memory, used to store programs;

[0054] A processor is configured to invoke and execute the program in the memory, thereby implementing the steps of the hyperspectral image generation method as described in any of the preceding claims.

[0055] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the hyperspectral image generation method as described in any of the preceding claims.

[0056] As can be seen from the above scheme, the hyperspectral image generation method, apparatus, electronic device, and storage medium provided in this application perform object segmentation on a first image to obtain multiple objects and their position information in the first image; the values ​​of each pixel of the same object are located in the same interval, while the values ​​of pixels of different objects are located in different intervals; based on the values ​​of pixels in the first type of band, the values ​​of each pixel of the object in multiple second type of bands are predicted; based on the principle of band continuity, the values ​​of the same pixel of the object in all first type of bands and multiple second type of bands are combined to obtain the hyperspectral image corresponding to the object; according to the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image. Based on this application, the goal of directly calculating and obtaining hyperspectral images is achieved without relying on a specific imaging system, thereby reducing the cost of acquiring hyperspectral images. Attached Figure Description

[0057] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1This is a flowchart illustrating an implementation of the hyperspectral image generation method provided in an embodiment of this application.

[0059] Figure 2 An example diagram of a cascaded network provided in an embodiment of this application;

[0060] Figure 3 A flowchart illustrating an implementation of the first prediction module of the cascaded network provided in this application to predict the values ​​of each pixel of the object in the second type of band.

[0061] Figure 4 A schematic diagram of the structure of the first prediction model provided in the embodiments of this application;

[0062] Figure 5 A flowchart illustrating an implementation of a cascaded network provided in this application embodiment, whereby a non-first prediction module predicts the values ​​of each pixel of an object in the second or first band.

[0063] Figure 6 A schematic diagram of the structure of the second prediction model provided in the embodiments of this application;

[0064] Figure 7 A schematic diagram of the structure of the hyperspectral image generation model provided in the embodiments of this application;

[0065] Figure 8 This application provides a network architecture diagram for self-supervised training of a hyperspectral image generation model.

[0066] Figure 9 A network architecture diagram for supervised training of a pre-trained hyperspectral image generation model provided in an embodiment of this application;

[0067] Figure 10 A schematic diagram of the structure of the hyperspectral image generation apparatus provided in the embodiments of this application;

[0068] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0069] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar parts and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated herein. Detailed Implementation

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

[0071] The hyperspectral image generation method provided in this application can be used in electronic devices, which can be terminal devices or server devices. The server device can be a single server or a server cluster.

[0072] like Figure 1 The diagram shown is a flowchart of one implementation of the hyperspectral image generation method provided in this application, which may include:

[0073] Step S101: Perform object segmentation on the first image to obtain multiple objects and the position information of each object in the first image.

[0074] In this context, the values ​​of pixels within the same object lie within the same interval, while the values ​​of pixels from different objects lie within different intervals. Since the value of each pixel in the first image is composed of its values ​​in multiple bands (referred to as multiple first-type bands for ease of distinction), the following statements are true: The values ​​of pixels within the same object lying within the same interval include: the values ​​of pixels from the same object lying within the same first-type band. The following statements are true: the values ​​of pixels from different objects lying within different intervals include: the values ​​of pixels from different objects lying within different intervals of the same first-type band.

[0075] In other words, unlike traditional object segmentation, which groups pixels belonging to the same object as a single object, this application groups pixels with values ​​within the same range as a single object. Since different pixel values ​​represent different colors, this application groups pixels with similar colors as the same object. For example, the first image shows a small dog with a pink tongue sticking out on a green lawn. The dog's nose and eyes are black, and its fur is white and yellow. Traditional object segmentation would separate the dog and the lawn into two objects, while this application could potentially separate the lawn, the dog's tongue, the dog's eyes and nose, the dog's yellow fur, and the dog's white fur into five objects. Of course, this is only a principle explanation and does not constitute a limitation on the solution, as electronic devices may segment more objects from an image during image processing.

[0076] In the first image, the value of any pixel is determined by the spectral reflectance of the object corresponding to that pixel in each of the first-class wavelength bands. Specifically, the value of any pixel is composed of the values ​​of that pixel in multiple first-class wavelength bands, and the value of that pixel in any first-class wavelength band is determined by the spectral reflectance of the object corresponding to that pixel in that first-class wavelength band. Generally, the value of any pixel in any first-class wavelength band is positively correlated with the spectral reflectance of the object corresponding to that pixel in that first-class wavelength band. Taking the first image as an example, where the content is a small dog with its pink tongue sticking out on a green grass field, and the first image is an RGB image, assuming that the first pixel in the first image corresponds to the first point on the dog's tongue, then the value of the first pixel in the R-band is determined by the spectral reflectance of the first point on the dog's tongue in the R-band when the dog was photographed, the value of the first pixel in the G-band is determined by the spectral reflectance of the first point on the dog's tongue in the G-band when the dog was photographed, and the value of the first pixel in the B-band is determined by the spectral reflectance of the first point on the dog's tongue in the B-band when the dog was photographed.

[0077] Suppose that object segmentation is performed on the first image to obtain N (N is an integer greater than 1) objects, then the position information of the i-th (i=1, 2, 3, ..., N) object includes: the position of each pixel belonging to the i-th object in the first image.

[0078] The first image is a non-hyperspectral image, such as an RGB image. In an RGB image, the value of each pixel is composed of the values ​​of that pixel in three bands (R band, G band, and B band).

[0079] Step S102: Based on the values ​​of the pixels in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands.

[0080] The second category of bands refers to bands other than the first category. Taking an RGB image as an example, the first category of bands in an RGB image refers to the R, G, and B bands. The second category of bands refers to bands other than these three bands. For example, bands located between the R and G bands, bands located between the G and B bands, bands located after the B band, or bands located before the R band, etc.

[0081] For the i-th object, based on the values ​​of each pixel in the i-th object in the first band, predict the values ​​of each pixel in the i-th object in each of the multiple second-class bands.

[0082] Step S103: Based on the principle of band continuity, combine the values ​​of the same pixel of the object in all first-class bands and the above-mentioned multiple second-class bands to obtain the hyperspectral image corresponding to the object.

[0083] For the i-th object, based on the principle of band continuity, the values ​​of the same pixel of the i-th object in each first-class band and the values ​​in each predicted second-class band are combined to obtain the hyperspectral image corresponding to the i-th object.

[0084] For example, taking the first image as an RGB image, the value of the j-th pixel (j=1, 2, 3, ..., M; M is the number of pixels in the i-th object) in the first band includes: the value of the j-th pixel of the i-th object in the R band. jR The value I in the G band jG The value I in the B band jB Assume that the value of the j-th pixel of the i-th object in the second type of band includes: the value of the j-th pixel of the i-th object in band1. jband1 The value I in band 2 jband2 The value I in band 3 jband3 The value I in band 4 jband4 The value I in band 5 jband5 The value I in band 6 jband6 Among them, bands 1, 2, and 3 lie between the R and G bands; band 1 lies between the R and band 2; band 2 lies between band 1 and band 3; and band 3 lies between band 2 and the G band. Bands 4, 5, and 6 lie between the G and B bands; band 4 lies between the G and band 5; band 5 lies between band 4 and band 6; and band 6 lies between band 5 and the B band. The value I of the j-th pixel of the i-th object is obtained by combining the values ​​of the j-th pixel in each of the first-class bands and the predicted values ​​in each of the second-class bands. j For: [I jR I jband1 I jband2 I jband3 I jG I jband4 I jband5 I jband6 I jB ].

[0085] Step S104: According to the position information of each object in the first image, combine the hyperspectral images corresponding to each object to obtain the hyperspectral image corresponding to the first image.

[0086] The location information of the i-th object in the hyperspectral image is the same as the location information of the i-th object in the first image.

[0087] The hyperspectral image generation method provided in this application segmentes a first image to obtain multiple objects and their position information within the first image. The pixel values ​​of the same object are located in the same interval, while the pixel values ​​of different objects are located in different intervals. Based on the pixel values ​​in the first-class bands, the values ​​of each pixel in multiple second-class bands are predicted. Based on the principle of band continuity, the values ​​of the same pixel of the object in all first-class bands and multiple second-class bands are combined to obtain the hyperspectral image corresponding to the object. According to the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image. Based on this application, the goal of directly calculating hyperspectral images is achieved without relying on a specific imaging system, thereby reducing the cost of acquiring hyperspectral images.

[0088] In an optional embodiment, one implementation of predicting the values ​​of each pixel in a multiple second-type bands based on the values ​​of pixels in the first-type band of the object can be:

[0089] Based on the values ​​of the pixels in the object in the first band, predict the values ​​of each pixel in the object in multiple second-class bands located between the first and second bands.

[0090] Among them, the first band and the second band are any two adjacent Class I bands.

[0091] Taking the first image as an RGB image as an example, the values ​​of each pixel in the i-th object in multiple second-type bands (e.g., band1, band2, band3) located between the R-band and G-band can be predicted based on the values ​​of the pixels in the i-th object in the R-band; and the values ​​of each pixel in the i-th object in multiple second-type bands (e.g., band4, band5, band6) located between the G-band and B-band can be predicted based on the values ​​of the pixels in the i-th object in the G-band.

[0092] Optionally, if there are no adjacent Class I bands after the second band (e.g., Band B), the values ​​of each pixel in the object in multiple Class II bands after the second band can be predicted based on the values ​​of the pixels in the second band. In other words, if the values ​​of the pixels in the i-th object in the first image do not include the values ​​of pixels in bands after the second band, the values ​​of each pixel in the i-th object in multiple Class II bands after the second band can be predicted based on the values ​​of the pixels in the i-th object in the second band.

[0093] In an optional embodiment, one way to predict the values ​​of each pixel in the object in multiple second-type bands based on the values ​​of pixels in the first-type band can be:

[0094] By using a cascaded network, the values ​​of each pixel in an object are predicted in multiple second-type bands based on the values ​​of the pixels in the first-type band.

[0095] This application utilizes the continuous characteristics of the spectral reflectance curves of the same material to establish a cascaded network. For example... Figure 2 The diagram shown is an example of a cascaded network provided in this application embodiment. This example uses an RGB image as the first image and illustrates the structure of the cascaded network by predicting the values ​​of each pixel of an object in three second-class bands (denoted as band1, band2, band3, band4, band5, and band6) between two adjacent first-class bands. In practical applications, it is possible to predict the values ​​of each pixel of an object in more second-class bands. In this case, more non-target prediction modules need to be set between two adjacent target prediction modules so that the values ​​of each pixel of an object in more second-class bands between two adjacent first-class bands can be predicted. Figure 2 As shown, the cascaded network provided in this application embodiment may include:

[0096] Multiple prediction modules are used, which are divided into target prediction modules and non-target prediction modules. Figure 2 The diagram shows three target prediction modules and six non-target prediction modules. Among them,

[0097] The input to each target prediction module includes at least the pixel values ​​of the object in the first type of band. Specifically, adjacent target prediction modules input the pixel values ​​of the object in adjacent first type of bands. For example, for the i-th object, the first target prediction module inputs the pixel values ​​of the i-th object in the R-band, the second target prediction module inputs the pixel values ​​of the i-th object in the G-band, and if a third target prediction module exists, the third target prediction module inputs the pixel values ​​of the i-th object in the B-band. It should be noted that for the i-th object, Figure 2In the example shown, the pixel values ​​in the R-band, G-band, and B-band of the i-th object refer to the pixel values ​​in the R-band, G-band, and B-band of the i-th object in the first image. That is, for the i-th object, the double-dotted arrow pointing to "pixel values ​​in the G-band" in non-target prediction module 3 indicates that non-target prediction module 3 will output the pixel values ​​in the G-band of the i-th object, but these values ​​will not be used as input to other prediction modules. Similarly, the double-dotted arrow pointing to "pixel values ​​in the B-band" in non-target prediction module 6 indicates that non-target prediction module 6 will output the pixel values ​​in the B-band of the i-th object, but these values ​​will not be used as input to other prediction modules.

[0098] Between any two adjacent target prediction modules, there are multiple non-target prediction modules. The inputs of the non-target prediction modules include: the pixel values ​​of the object in a second-type band (output of the preceding prediction module), the intermediate features of the preceding prediction module, and the pixel values ​​of the object in a band (input of the preceding prediction module). Adjacent prediction modules in the cascaded network have the same input, while non-adjacent prediction modules do not have the same input.

[0099] The module preceding a non-target prediction module may be a target prediction module. For example, the module preceding non-target prediction module 1 is target prediction module 1, and the module preceding non-target prediction module 4 is target prediction module 2, etc. The module preceding a non-target prediction module may also be a non-target prediction module. For example, the module preceding non-target prediction module 2 is non-target prediction module 1, and the module preceding non-target prediction module 3 is non-target prediction module 2, etc.

[0100] For the i-th object, the input of the non-target prediction module k (k=1, 2, 3, ..., K; K is the number of non-target prediction modules in the cascaded network) includes: the values ​​of each pixel of the i-th object in band k output by the previous prediction module of the non-target prediction module k, the intermediate features of the previous prediction module of the non-target prediction module k, and the values ​​of the pixels of the i-th object in a band as input to the previous prediction module of the non-target prediction module k. Figure 2In the example shown, the dashed arrow between the non-target prediction module k and its predecessor indicates that the intermediate features of the predecessor module k are input to the non-target prediction module k. For example, the input of the non-target prediction module 2 includes: the values ​​of each pixel of the i-th object in band 2 output by the predecessor module (i.e., non-target prediction module 1), the intermediate features of the predecessor module 2, and the values ​​of the pixels of the i-th object in band 1, which are the input of the predecessor module 2.

[0101] If the target prediction module is not the first prediction module in the cascaded network, then the input to the target prediction module also includes: the intermediate features of the preceding non-target prediction module, and the pixel values ​​in a band of the object that served as the input to the preceding non-target prediction module. That is, for the i-th object, if the target prediction module h (h = 1, 2, 3, ..., H; H is the number of target prediction modules in the cascaded network) is the first prediction module in the cascaded network, such as... Figure 2 In the example shown, for target prediction module 1, the input to target prediction module h includes: the value of the i-th object in the first image within a first-class band, such as... Figure 2 As shown, the input to target prediction module 1 is only the value of the pixel in the R band of the i-th object; if target prediction module h is not the first prediction module of the cascaded network, such as Figure 2 In the example shown, target prediction modules 2 and 3, etc., the input to target prediction module h includes not only the value of the i-th object in the first image in a first-class band, but also the intermediate features of the preceding non-target prediction module of target prediction module h, and the pixel value of the i-th object in a second-class band, which serves as the input to the preceding non-target prediction module of target prediction module h. Figure 2 As shown, the inputs of target prediction module 2 include: the pixel value of the i-th object in the first image in band G, the intermediate features of the preceding non-prediction module (i.e., non-target prediction module 3) of target prediction module 2, and the pixel value of the i-th object in band 3, which serves as the input of the preceding non-target prediction module of target prediction module 2. Adjacent prediction modules in the cascaded network have the same input, while non-adjacent prediction modules do not have the same input.

[0102] The output of each prediction module in the cascaded network is the value of the pixel in the object in the first or second type of band, and the outputs of two adjacent prediction modules are the values ​​of the pixel in the object in the adjacent band.

[0103] For the i-th object, if the target prediction module is not the first prediction module in the cascaded network, then the output of the preceding prediction module (which is a non-target prediction module) is the value of the i-th object in a first-class band, and the output of each of the other prediction modules is the value of the i-th object in a second-class band. For example... Figure 2 As shown, the output of non-target prediction module 3 is the value of each pixel of the i-th object in the G band, the output of non-target prediction module 6 is the value of each pixel of the i-th object in the B band, the output of target prediction module 1 is the value of each pixel of the i-th object in band1, the output of non-target prediction module 1 is the value of each pixel of the i-th object in band2, the output of target prediction module 2 is the value of each pixel of the i-th object in band4, the output of non-target prediction module 5 is the value of each pixel of the i-th object in band6, and so on.

[0104] In an optional embodiment, the first prediction module of the cascaded network predicts the values ​​of each pixel of the object in the second type of band. A flowchart of one implementation is shown below. Figure 3 As shown, it may include:

[0105] Step S301: Extract the first feature from the pixel values ​​in the target first-class band of the input object to obtain the first feature. The target first-class band can be the largest first-class band or the smallest first-class band. Figure 2 In the example shown, the target's first-category band is the R-band, while the G-band and B-band are both non-target first-category bands. Optionally, the target's first-category band could also be the B-band, in which case the G-band and R-band would both be non-target first-category bands.

[0106] Here, assuming the size of the first image is a×b, then the i-th object can be viewed through an image P of size a×b. i Indicates that image P i This is achieved by retaining the values ​​of pixels belonging to the i-th object in the first image and setting the values ​​of pixels not belonging to the i-th object to null. Based on this, inputting the values ​​of the i-th object's pixels in the first type of band of the target into the first prediction module means inputting the image P... i The values ​​of each pixel in the first type of band of the target are input into the first prediction module.

[0107] For the i-th object, performing first feature extraction on the pixel values ​​of the input object in the first type band of the target can include: extracting the first feature from the image P. i The values ​​of each pixel in the target's first type band are convolved to obtain the first feature.

[0108] Step S302: Extract the second feature from the first feature to obtain the intermediate feature of the first prediction module.

[0109] Optionally, the process of extracting the second feature from the first feature may include: performing a first function mapping on the first feature to obtain a first mapped feature; downsampling the first mapped feature to obtain a downsampled feature; performing a second function mapping on the downsampled feature to obtain a second mapped feature; and performing a first fully connected processing on the second mapped feature to obtain an intermediate feature.

[0110] Step S303: Perform a linear transformation on the intermediate features to obtain the second features.

[0111] Step S304: Extract the third feature from the second feature to obtain the third feature. The extraction of the third feature is the reverse process of the extraction of the second feature.

[0112] Optionally, the process of extracting the third feature from the second feature may include: performing a second fully connected processing on the second feature to obtain the processed feature; performing a fourth function mapping on the processed feature to obtain the fourth mapped feature; upsampling the fourth mapped feature to obtain the upsampled feature; and performing a third function mapping on the upsampled feature to obtain the third feature. Here, the second fully connected processing is the inverse of the first fully connected processing, the third function mapping is the inverse of the first function mapping, and the fourth function mapping is the inverse of the second function mapping.

[0113] Step S305: Perform fusion processing on the first feature and the third feature to obtain the value of each pixel of the object in the second type band.

[0114] Optionally, for the i-th object, the first feature and the third feature can be convolved separately to obtain two convolution results, and then the two convolution results can be fused to obtain the value of each pixel of the i-th object in the second band. Alternatively, the first feature and the third feature can be fused first to obtain a fused feature, and then the fused feature can be convolved to obtain the value of each pixel of the i-th object in the second band.

[0115] For ease of description, for the i-th object, image P is... i The value of the first type band of the target is denoted as image P. i1 Image P i1 Since the image is of size a×b, the output of the first prediction module is also an image of size a×b, denoted as P for ease of explanation. i1 ', then the image P i1 In this context, the value of a pixel belonging to the i-th object is the value of each pixel of the i-th object in a second-class band, while the value of a pixel not belonging to the i-th object is empty.

[0116] Optionally, the first prediction module can predict the values ​​of each pixel in the second band of the object using a pre-trained first prediction model. For example... Figure 4 The diagram shown is a structural schematic of a first prediction model provided in an embodiment of this application, which may include:

[0117] The system comprises a first convolutional layer 401, a first function mapping layer 402, a first downsampling layer 403, a second function mapping layer 404, a first fully connected layer (FC) 405, a first linear transformation layer 406, a second fully connected layer 407, a fourth function mapping layer 408, a first upsampling layer 409, a third function mapping layer 410, and a second convolutional layer 411; wherein...

[0118] The input to the first convolutional layer 401 is the value of each pixel of the i-th object in a single band, which is either a first-class band or a second-class band. For example, in the first prediction module, the input to the first convolutional layer 401 is the value of each pixel of the i-th object in the target's first-class band. The first convolutional layer 401 performs convolution processing on the values ​​of each pixel of the i-th object in a single band using a convolution kernel to obtain the first feature.

[0119] The input to the first function mapping layer 402 is the first feature output by the first convolutional layer 401, which is used to perform a first function mapping on the first feature to obtain the first mapped feature.

[0120] The input to the first downsampling layer 403 is the first mapped feature output by the first function mapping layer 402, which is used to downsample the first mapped feature to obtain the downsampled feature.

[0121] The input to the second function mapping layer 404 is the downsampled features output by the first downsampling layer 403, which is used to perform a second function mapping on the downsampled features to obtain the second mapped features.

[0122] The input to the first fully connected layer 405 is the second mapped feature output by the second function mapping layer 404, which is used to perform the first fully connected processing on the second mapped feature to obtain intermediate features.

[0123] The input to the first linear transformation layer 406 is the intermediate feature output by the first fully connected layer 405, which is used to perform a linear transformation on the intermediate feature to obtain the second feature.

[0124] The input to the second fully connected layer 407 is the second feature output by the first linear transformation layer 406, which is used to perform a second fully connected process on the second feature to obtain the processed feature.

[0125] The input to the fourth function mapping layer 408 is the processed features output by the second fully connected layer 407, which is used to perform the fourth function mapping on the processed features to obtain the fourth mapped features.

[0126] The input to the first upsampling layer 409 is the fourth mapped feature output by the fourth function mapping layer 408, which is used to upsample the fourth mapped feature to obtain the upsampled feature.

[0127] The input to the third function mapping layer 410 is the upsampled features output by the first upsampling layer 409, which is used to perform the third function mapping on the upsampled features to obtain the third features.

[0128] The input to the second convolutional layer 411 includes the first feature output by the first convolutional layer 401 and the third feature output by the third function mapping layer 410. This input is used to fuse the first and third features to obtain the values ​​of each pixel of the i-th object in another single band. This other single band is either a first-class band or a second-class band. For example, in the first prediction module, the output of the second convolutional layer 411 is the value of each pixel of the i-th object in a second-class band. Specifically, as... Figure 2 As shown, if the target's first type band is the R band, then the other single band is the band1 band.

[0129] Optionally, for the i-th object, the second convolutional layer 411 can perform convolution processing on the first feature and the third feature separately using a convolution kernel to obtain two convolution results, and then fuse the two convolution results to obtain the value of each pixel of the i-th object in the second type band. Alternatively, the second convolutional layer 411 can first fuse the first feature and the third feature to obtain a fused feature, and then perform convolution processing on the fused feature using a convolution kernel to obtain the value of each pixel of the i-th object in the second type band.

[0130] In an optional embodiment, a flowchart illustrating how a non-first prediction module of the cascaded network predicts the values ​​of each pixel of the object in the second or first band is shown below. Figure 5 As shown, it may include:

[0131] Step S501: Extract the first feature from the pixel values ​​of the input object in the two bands respectively to obtain the first feature corresponding to the two bands respectively.

[0132] As can be seen from the foregoing, for the i-th object, the input of each non-first prediction module includes three parts:

[0133] 1. The values ​​of each pixel of the i-th object in the first image in a first-class band, or the values ​​of each pixel of the i-th object output by the previous prediction module in a second-class band.

[0134] 2. The values ​​of each pixel of the i-th object in a first-class band, or the values ​​of each pixel of the i-th object in a second-class band, which are used as inputs to the previous prediction module.

[0135] 3. Intermediate features from the previous prediction module.

[0136] Clearly, the input to each non-first prediction module includes the pixel values ​​of the i-th object in both bands. This application performs a first feature extraction on the pixel values ​​of the object output by the previous prediction module in one band (either a first-class band or a second-class band) to obtain a first feature; and performs a first feature extraction on the pixel values ​​of the object, which is the input to the previous prediction module, in the other band (either a first-class band or a second-class band) to obtain another first feature.

[0137] Step S502: Extract the second feature from each first feature to obtain the fourth feature corresponding to each first feature.

[0138] Optionally, for any first feature, the process of extracting a second feature from that first feature may include: performing a first function mapping on the first feature to obtain a first mapped feature; downsampling the first mapped feature to obtain a downsampled feature; performing a second function mapping on the downsampled feature to obtain a second mapped feature; and performing a first fully connected processing on the second mapped feature to obtain a fourth feature corresponding to that first feature.

[0139] Step S503: Fuse each of the fourth features and the intermediate features of the previous prediction module to obtain the intermediate features of the non-first prediction module.

[0140] Optionally, the two obtained fourth features can be added together with the intermediate features of the previous prediction module to obtain the intermediate features of the non-first prediction module.

[0141] Step S504: Perform a linear transformation on the intermediate features that are not from the first prediction module to obtain the fifth feature.

[0142] Step S505: Extract the third feature from the fifth feature to obtain the sixth feature.

[0143] Optionally, the process of extracting the third feature from the fifth feature may include: performing a second fully connected processing on the fifth feature to obtain the processed feature; performing a fourth function mapping on the processed feature to obtain the fourth mapped feature; upsampling the fourth mapped feature to obtain the upsampled feature; and performing a third function mapping on the upsampled feature to obtain the sixth feature. Here, the second fully connected processing is the inverse of the first fully connected processing, the third function mapping is the inverse of the first function mapping, and the fourth function mapping is the inverse of the second function mapping.

[0144] Step S506: Perform fusion processing on the sixth feature and the target first feature in the first feature corresponding to the above two bands to obtain the value of each pixel of the object in the first type band or the second type band.

[0145] If the non-first prediction module is the target prediction module, then the target first feature is the first feature extracted from the values ​​of each pixel of the i-th object in the first image in a first type of band; if the non-first prediction module is not the target prediction module, then the target first feature is the first feature extracted from the values ​​of each pixel of the i-th object output by the previous prediction module in a second type of band.

[0146] Optionally, for the i-th object, the first and sixth features of the target can be convolved separately to obtain two convolution results. These two convolution results are then fused to obtain the values ​​of each pixel of the i-th object in either the first or second band. Alternatively, the first and sixth features of the target can be fused first to obtain a fused feature. This fused feature is then convolved to obtain the values ​​of each pixel of the i-th object in either the first or second band.

[0147] Optionally, non-first prediction modules can use a pre-trained second prediction model to predict the values ​​of each pixel in the first or second band of the object. Each non-first prediction module includes a second prediction model. Figure 6 The diagram shown is a structural schematic of a second prediction model provided in an embodiment of this application, which may include:

[0148] The system consists of a third convolutional layer (601), a fifth function mapping layer (602), a second downsampling layer (603), a sixth function mapping layer (604), a third fully connected layer (605), a fusion layer (606), a second linear transformation layer (607), a fourth fully connected layer (608), an eighth function mapping layer (609), a second upsampling layer (610), a seventh function mapping layer (611), and a fourth convolutional layer (612).

[0149] The input to the third convolutional layer 601 includes the values ​​of each pixel of the i-th object in a single band, where the single band is either a first-class band or a second-class band. The third convolutional layer 601 is used to perform convolution processing on the values ​​of each pixel of the i-th object in a single band using a convolution kernel to obtain the first feature.

[0150] Since the input to non-first prediction modules includes the pixel values ​​of the i-th object in both bands, it needs to be sequentially input into the third convolutional layer 601. The third convolutional layer 60 then performs convolution processing on the pixel values ​​of the i-th object in both bands. For example, the non-first prediction module is... Figure 2 The non-target prediction module 1 in the middle has the input including the values ​​of each pixel in the i-th object in the R-band and band1 band. Then, the values ​​of each pixel in the i-th object in the R-band are first input into the third convolutional layer 601. The third convolutional layer 601 performs convolution processing on the values ​​of each pixel in the i-th object in the R-band to obtain the first feature corresponding to the R-band. After inputting the values ​​of each pixel in the i-th object in the R-band into the third convolutional layer 601, the values ​​of each pixel in the i-th object in the band1 band are then input into the third convolutional layer 601. The third convolutional layer 601 performs convolution processing on the values ​​of each pixel in the i-th object in the band1 band to obtain the first feature corresponding to the band1 band.

[0151] The input to the fifth function mapping layer 602 is the first feature output by the third convolutional layer 601, which is used to perform the first function mapping on the first feature to obtain the first mapped feature corresponding to the first feature.

[0152] Since the third convolutional layer 601 outputs two first features, the fifth function mapping layer 602 is used to perform a first function mapping on each first feature to obtain the first mapped features corresponding to each first feature. In other words, the fifth function mapping layer 602 outputs two first mapped features.

[0153] The input to the second downsampling layer 603 is the first mapped feature output by the fifth function mapping layer 602. This second downsampling layer is used to downsample the first mapped feature to obtain the downsampled feature corresponding to the first mapped feature. Since the fifth function mapping layer 602 outputs two first mapped features, the second downsampling layer 603 performs a first function mapping on each first mapped feature to obtain the downsampled feature corresponding to each first mapped feature. In other words, the second downsampling layer 603 outputs two downsampled features.

[0154] The input to the sixth function mapping layer 604 is the downsampled features output by the second downsampling layer 603. This input is used to perform a second function mapping on the downsampled features to obtain second-mapped features. Since the second downsampling layer 603 outputs two downsampled features, the sixth function mapping layer 604 performs the second function mapping on each downsampled feature separately to obtain the second-mapped features corresponding to each downsampled feature. In other words, the sixth function mapping layer 604 outputs two second-mapped features.

[0155] The input to the third fully connected layer 605 is the second mapped feature output by the sixth function mapping layer 604. This second mapped feature is processed by a first fully connected layer to obtain the corresponding fourth feature. Since the sixth function mapping layer 604 outputs two second mapped features, the third fully connected layer 605 processes each second mapped feature separately to obtain the corresponding fourth feature. In other words, the third fully connected layer 605 outputs two fourth features.

[0156] The input to the fusion layer 606 includes two fourth features output by the third fully connected layer 605, and an intermediate feature output by the previous prediction module of the non-first prediction module to which the fusion layer 606 belongs. The two fourth features and one intermediate feature are fused to obtain the intermediate feature of the non-first prediction module to which the fusion layer 606 belongs.

[0157] The input to the second linear transformation layer 607 is the intermediate feature output by the fusion layer 606, which is used to perform a linear transformation on the intermediate feature to obtain the fifth feature.

[0158] The input to the fourth fully connected layer 608 is the fifth feature output from the second linear transformation layer, which is used to perform the second fully connected processing on the fifth feature to obtain the processed feature.

[0159] The input to the eighth function mapping layer 609 is the processed features output by the fourth fully connected layer 608, which is used to perform the fourth function mapping on the processed features to obtain the fourth mapped features.

[0160] The input to the second upsampling layer 610 is the fourth mapped feature output by the eighth function mapping layer 609, which is used to upsample the fourth mapped feature to obtain the upsampled feature.

[0161] The input to the seventh function mapping layer 611 is the upsampled features output from the second upsampling layer 610, which is used to perform a third function mapping on the upsampled features to obtain the sixth feature. The second fully connected processing is the inverse of the first fully connected processing, the third function mapping is the inverse of the first function mapping, and the fourth function mapping is the inverse of the second function mapping.

[0162] The input to the fourth convolutional layer 612 is the sixth feature output from the seventh function mapping layer 611, and the first feature of the target. This is used to fuse the input sixth feature and the target first feature to obtain the values ​​of each pixel in the first or second type of band. For example, the non-first prediction module is... Figure 2 In the non-target prediction module 1, the fourth convolutional layer 612 of the non-target prediction module 1 outputs the values ​​of each pixel of the i-th object in band 2 (i.e., the second type of band). For example, if the non-first prediction module is... Figure 2 In the non-target prediction module 3, the fourth convolutional layer 612 in the non-target prediction module 3 outputs the values ​​of each pixel of the i-th object in the G band (i.e., the first type of band).

[0163] For the first feature of the target, Figure 2 For example, if it is not the first prediction module Figure 2 In the target prediction module 2, the first feature of the target is the first feature extracted by the third convolutional layer 601 from the values ​​of each pixel of the i-th object in the G-band of the first image; if it is not the first prediction module... Figure 2 In the non-target prediction module 2, the first feature of the target is the first feature extracted by the third convolutional layer 601 from the values ​​of each pixel of the i-th object output by the non-target prediction module 1 in the band2 band.

[0164] In an optional embodiment, the process of performing object segmentation on the first image and predicting the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of pixels in the first-type band may include:

[0165] The first image is segmented using a hyperspectral image generation model to obtain multiple objects. Based on the pixel values ​​in the first type of band, the values ​​of each pixel in the object are predicted in multiple second type of bands.

[0166] The hyperspectral image generation model is trained using a first sample set and a second sample set. The first sample in the first sample set consists of a non-hyperspectral image, and the second sample in the second sample set consists of a non-hyperspectral image-hyperspectral image pair. That is, the first sample set contains no hyperspectral images, while the second sample set includes both non-hyperspectral images and their corresponding hyperspectral images.

[0167] A schematic diagram of a hyperspectral image generation model provided in this application is shown below. Figure 7 As shown, it may include:

[0168] Object segmentation network 701 and cascaded network 702; among which,

[0169] The object segmentation network 701 is used to segment the first image to obtain multiple objects and the position information of each object in the first image. Optionally, the object segmentation network 701 can adopt an Encoder-Decoder network model. Of course, other network models can also be used, and this application does not make specific limitations.

[0170] The cascaded network 702 is used to predict the values ​​of each pixel in an object in multiple second-type bands based on the values ​​of the pixels in the first-type band. The specific implementation process can be found in the aforementioned embodiments, and will not be repeated here.

[0171] In an optional embodiment, the hyperspectral image generation model can be trained as follows:

[0172] The hyperspectral image generation model is self-supervised and trained using the first sample set to obtain a pre-trained hyperspectral image generation model.

[0173] The pre-trained hyperspectral image generation model is subjected to supervised training using a second sample set to fine-tune the model and obtain a well-trained hyperspectral image generation model.

[0174] like Figure 8 The diagram shown is a network architecture diagram for self-supervised training of a hyperspectral image generation model provided in an embodiment of this application, including:

[0175] The system comprises a first object segmentation network 801, a first cascaded network 802, a second object segmentation network 803, a second cascaded network 804, and an inverse transform network 805; wherein the first object segmentation network 801 and the first cascaded network 802 constitute a hyperspectral image generation model; the first object segmentation network 801 and the second object segmentation network 803 share network parameters, and the first cascaded network 802 and the second cascaded network 804 share network parameters. Based on this, an implementation method for self-supervised training of the hyperspectral image generation model using a first sample set, as provided in this application embodiment, can be:

[0176] The first object segmentation network 801 of the hyperspectral image generation model performs object segmentation on the first sample to obtain multiple sample objects and the position information of each sample object in the first sample.

[0177] The inverse transform network 805 of the hyperspectral image generation model performs inverse spectral reflectance transform on each sample object to obtain the inverse transform object corresponding to each sample object. The inverse transform objects corresponding to each sample object of the same first sample constitute the inverse transform sample (or inverse transform image) corresponding to the same first sample. Optionally, for the i-th object, the inverse transform network 805 can determine the maximum value of each pixel of the i-th object in the t-th (t=1, 2, ..., T; T is the number of first type bands in the first image; taking RGB image as an example, T=3) first type bands. The difference between this maximum value and the value of the j-th pixel of the i-th object in the t-th first type band is determined as the inverse transform value of the j-th pixel of the i-th object in the t-th first type band. After obtaining the inverse transform values ​​of each pixel of the i-th object in each first type band, the inverse transform object corresponding to the i-th object is obtained.

[0178] The first cascaded network 802 of the hyperspectral image generation model predicts the values ​​of pixels in various non-target first-class bands and the values ​​of pixels in multiple second-class bands based on the values ​​of pixels in the sample object in the target first-class band (e.g., R-band or B-band). Non-target first-class bands refer to first-class bands other than the target first-class band. For example, if the target first-class band is B-band, then the non-target first-class bands are G-band and R-band; if the target first-class band is R-band, then the non-target first-class bands are G-band and B-band. It should be noted that during the training phase, the pixel values ​​of the i-th object in the first-class bands output by the previous module of the target prediction module (not belonging to the first prediction module) in the first cascaded network 802 are used as input to the target prediction module (not belonging to the first prediction module), but the pixel values ​​of the objects in the sample image in the first-class bands are not used as input to the target prediction module (not belonging to the first prediction module). For example, Figure 2 As shown in the diagram, during the training phase, the target prediction module 2 uses the pixel values ​​in the G-band of the object output by the non-target prediction module 3 as its input, instead of using the pixel values ​​in the G-band of the object in the sample image. However, after the hyperspectral image generation model is trained and deployed to a real-world application scenario, the pixel values ​​in the G-band of the object in the first image will be used as the input to the target prediction module 2, instead of using the pixel values ​​in the G-band of the object output by the non-target prediction module 3.

[0179] The first cascaded network 802 of the hyperspectral image generation model predicts the inverse transform values ​​of pixels in the inverse transform object in various non-target first-type bands and in multiple second-type bands based on the inverse transform values ​​of pixels in the inverse transform object in the target first-type band. To shorten training time, this application sets up a second cascaded network 804 identical to the first cascaded network 802, with the same network parameters. The second cascaded network 804 replaces the first cascaded network 802 in predicting the inverse transform values ​​of pixels in the inverse transform object in various non-target first-type bands and in multiple second-type bands based on the inverse transform values ​​of pixels in the target first-type band. This is equivalent to the hyperspectral image generation model processing both the sample object and the inverse transform object simultaneously, thereby improving data processing efficiency and shortening training time.

[0180] Based on the principle of band continuity, the hyperspectral image corresponding to the sample object is obtained by combining the values ​​of the same pixel in all first-class bands, all second-class bands, and the value in the target first-class band.

[0181] Optionally, based on the principle of band continuity, the inverse transform values ​​of the same pixel in the predicted inverse transform object in all first-class bands, all second-class bands, and the inverse transform value in the target first-class band can be combined to obtain the hyperspectral inverse transform image corresponding to the sample object.

[0182] Based on the location information of each sample object in the first sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the first sample.

[0183] The hyperspectral image generation model uses a first object segmentation network 801 to segment the hyperspectral image corresponding to the first sample, obtaining segmentation results, namely, multiple objects and their location information in the hyperspectral image. To shorten training time, this application sets up a second object segmentation network 803, identical to the first object segmentation network 801, to perform object segmentation on the hyperspectral image corresponding to the first sample, obtaining segmentation results. This is equivalent to the hyperspectral image generation model simultaneously processing both the first sample and the hyperspectral image, thereby improving data processing efficiency and shortening training time.

[0184] Based on the predicted pixel values ​​of the sample object in the non-target first-class band, the inverse transform values ​​of the pixels in the inverse transform object in the non-target first-class band, the changing trends of the inverse transform values ​​of the pixels contained in the inverse transform object in each first-class and second-class band, the changing trends of the pixel values ​​of the sample object in each first-class and second-class band, and the segmentation results of the hyperspectral image corresponding to the first sample, the parameters of the hyperspectral image generation model are updated to obtain a pre-trained hyperspectral image generation model.

[0185] Optionally, the parameters of the hyperspectral image generation model can be updated based on the following four objectives:

[0186] Objective 1: The pixel values ​​of the sample objects predicted by the first cascaded network 802 in the non-target first-type bands should approach the actual pixel values ​​of the sample objects in the non-target first-type bands. That is, the predicted pixel value of the i-th sample object in the non-target first-type bands should approach the pixel value of the i-th sample object in the first sample. Optionally, the difference between the predicted pixel values ​​of the sample objects in the non-target first-type bands and the actual pixel values ​​of the sample objects in the non-target first-type bands can be calculated using a first loss function, with the goal of minimizing this difference.

[0187] Objective 2: The inverse transform values ​​of pixels in the non-target first-type bands predicted by the second cascaded network 804 approach the actual inverse transform values ​​of the pixels in the non-target first-type bands. That is, the predicted inverse transform value of the i-th inverse transform object in the non-target first-type bands approaches the inverse transform value of the i-th inverse transform object in the inverse transform samples. Optionally, the difference between the predicted inverse transform value of the pixels in the non-target first-type bands and the actual inverse transform value of the pixels in the non-target first-type bands can be calculated using a second loss function, with the goal of minimizing this difference.

[0188] Objective 3: The changing trends of the inverse transform values ​​of the pixels in the inverse transform object predicted by the first cascade network 802 in each first and second type band, and the changing trends of the pixels in the sample object predicted by the second cascade network 804 in each first and second type band.

[0189] The trend of the inverse transform value of the j-th pixel in each of the first and second type bands contained in the i-th inverse transform object can be described as follows: Based on the curve obtained by fitting the values ​​of the j-th pixel in each band in the hyperspectral inverse transform image corresponding to the i-th inverse transform object, for ease of distinction, it can be denoted as the inverse transform curve C. ijThe hyperspectral inverse transform image corresponding to the i-th inverse transform object is obtained by combining the inverse transform values ​​of the same pixel in all first-class bands, all second-class bands, and the target first-class band based on the principle of band continuity.

[0190] The i-th inverse transformation object is obtained by performing an inverse spectral reflectance transformation on the i-th object.

[0191] The variation trend of the j-th pixel contained in the i-th object in each of the first and second type bands can be represented as: a curve obtained by fitting the values ​​of the j-th pixel of the i-th object in each band in the hyperspectral image, which can be denoted as variation curve C for easy distinction. ij .

[0192] The third objective of this application is the inverse transform curve C. ij 'Far away from the curve of change C' ij Optionally, the inverse transform curve C can be calculated using a third loss function. ij 'and change curve C ij The gap is widening, and the goal is to make this gap grow larger and larger.

[0193] Objective four: The segmentation result of the second object segmentation network 803 on the hyperspectral image corresponding to the first sample is close to the object segmentation result of the first object segmentation network 801 on the first sample. Optionally, the difference between the segmentation result of the hyperspectral image corresponding to the first sample and the object segmentation result of the first sample can be calculated using a fourth loss function, and the goal four is to make this difference smaller and smaller.

[0194] like Figure 9 The diagram shown is a network architecture diagram for supervised training of a pre-trained hyperspectral image generation model provided in an embodiment of this application, including:

[0195] The first object segmentation network 801, the first cascaded network 802, and the second object segmentation network 803 mean that when fine-tuning the parameters of the pre-trained hyperspectral image generation model, the second cascaded network 804 and the inverse transform network 805 are no longer needed.

[0196] In an optional embodiment, one way to implement the supervised training of the pre-trained hyperspectral image generation model using the second sample set can be:

[0197] The first object segmentation network 801 of the pre-trained hyperspectral image generation model performs object segmentation on the non-hyperspectral image in the second sample, resulting in multiple sample objects and the position information of each sample object in the non-hyperspectral image of the second sample.

[0198] The first cascaded network 802 of the pre-trained hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-class bands, as well as the values ​​of pixels in the sample object in multiple second-class bands, based on the values ​​of pixels in the target first-class band.

[0199] Based on the principle of band continuity, the values ​​of the same pixel of the predicted sample object in all non-first-class bands, in all second-class bands, and in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object.

[0200] Based on the position information of each sample object in the non-hyperspectral image of the second sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the second sample.

[0201] The hyperspectral image corresponding to the second sample is segmented by the second object segmentation network 803 to obtain the segmentation result, that is, multiple objects and the location information of each object in the hyperspectral image.

[0202] Optionally, the parameters of the pre-trained hyperspectral image generation model can be updated based on the following two objectives to obtain a well-trained hyperspectral image generation model:

[0203] The first objective is that the pixel values ​​of the sample object predicted by the first cascaded network 802 in the non-target first and second class bands approach the pixel values ​​of the sample object in the non-target first and second class bands in the hyperspectral image of the second sample. Optionally, the difference between the predicted pixel values ​​of the sample object in the non-target first and second class bands and the pixel values ​​of the sample object in the non-target first and second class bands in the hyperspectral image of the second sample can be calculated using a fifth loss function, and the goal is to make this difference smaller and smaller.

[0204] The second objective is to make the object segmentation result of the hyperspectral image corresponding to the second sample approach the object segmentation result of the non-hyperspectral image in the second sample, and to update the parameters of the pre-trained hyperspectral image generation model. Optionally, the difference between the object segmentation result of the hyperspectral image corresponding to the second sample and the object segmentation result of the non-hyperspectral image in the second sample can be calculated using a fourth loss function, and the goal is to make this difference smaller and smaller.

[0205] Corresponding to the method embodiments, this application also provides a hyperspectral image generation apparatus. A schematic diagram of a hyperspectral image generation apparatus provided in this application embodiment is shown below. Figure 10 As shown, it may include:

[0206] Segmentation unit 1001, prediction unit 1002, first combination unit 1003, and second combination unit 1004; wherein,

[0207] The segmentation unit 1001 is used to segment the first image into objects to obtain multiple objects and the position information of each object in the first image; wherein, the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to the pixel in each first type of spectral band.

[0208] The prediction unit 1002 is used to predict the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of the pixels in the first-type band.

[0209] The first combination unit 1003 is used to combine the values ​​of the same pixel of the object in all first-class bands and the multiple second-class bands based on the principle of band continuity to obtain the hyperspectral image corresponding to the object.

[0210] The second combining unit 1004 is used to combine the hyperspectral images corresponding to each object according to the position information of each object in the first image to obtain the hyperspectral image corresponding to the first image.

[0211] The hyperspectral image generation apparatus provided in this application segmentes a first image to obtain multiple objects and their position information within the first image. The pixel values ​​of the same object are located in the same interval, while the pixel values ​​of different objects are located in different intervals. Based on the pixel values ​​in the first type of band, the values ​​of each pixel in multiple second type of bands are predicted. Based on the principle of band continuity, the values ​​of the same pixel of the object in all first type of bands and multiple second type of bands are combined to obtain the hyperspectral image corresponding to the object. According to the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image. Based on this application, the purpose of directly calculating hyperspectral images is achieved without relying on a specific imaging system, thereby reducing the cost of acquiring hyperspectral images.

[0212] In an optional embodiment, the prediction unit 1002 is used for:

[0213] Based on the values ​​of the pixels in the object in the first band, predict the values ​​of each pixel in the object in multiple second-type bands located between the first band and the second band.

[0214] The first band and the second band are any two adjacent first-class bands.

[0215] In an optional embodiment, the prediction unit 1002 is used for:

[0216] By using a cascaded network, the values ​​of each pixel in the object in multiple second-type bands are predicted based on the values ​​of the pixels in the first-type band.

[0217] The cascaded network includes multiple prediction modules, divided into target prediction modules and non-target prediction modules; among which...

[0218] The input to each target prediction module includes at least the values ​​of the pixels in the object in the first type of band; wherein, adjacent target prediction modules input the values ​​of the pixels in the object in adjacent first type of bands;

[0219] Between any two adjacent target prediction modules, there are multiple non-target prediction modules. The input of the non-target prediction module includes: the value of the pixel in the object in a second type band output by the previous prediction module of the non-target prediction module, as well as the intermediate features of the previous prediction module and the value of the pixel in the object in a band as the input of the previous prediction module.

[0220] If the target prediction module is not the first prediction module of the cascaded network, the input of the target prediction module further includes: the intermediate features of the previous non-target prediction module of the target prediction module and the value of the pixel in the object in a band as the input of the previous prediction module.

[0221] The output of each prediction module is the value of the pixel in the object in the first or second type of band; adjacent prediction modules output the value of the pixel in the object in the adjacent band.

[0222] In an alternative embodiment, wherein,

[0223] The first prediction module is used to: extract a first feature from the pixel values ​​of the input object in the first type of band of the target to obtain a first feature; extract a second feature from the first feature to obtain an intermediate feature of the first prediction module; perform a linear transformation on the intermediate feature to obtain a second feature; extract a third feature from the second feature to obtain a third feature; the third feature extraction is the inverse process of the second feature extraction; and fuse the first feature and the third feature to obtain the pixel values ​​of the object in the second type of band.

[0224] And / or,

[0225] The non-first prediction module of the cascaded network is used to: extract first features from the pixel values ​​of the input object in two bands respectively, to obtain first features corresponding to the two bands respectively; extract second features from each first feature respectively, to obtain fourth features corresponding to each first feature; fuse each fourth feature and the intermediate feature of the previous prediction module to obtain the intermediate feature of the non-first prediction module; perform a linear transformation on the intermediate feature of the non-first prediction module to obtain a fifth feature; extract the third feature from the fifth feature to obtain a sixth feature; and fuse the sixth feature and the target first feature from the first features corresponding to the two bands respectively to obtain the value of each pixel of the object in a first-class band or a second-class band.

[0226] In an optional embodiment, the segmentation unit 1001 performs object segmentation on the first image using a hyperspectral image generation model to obtain multiple objects;

[0227] The prediction unit 1002 uses the hyperspectral image generation model to predict the values ​​of each pixel in the object in multiple second-type bands based on the values ​​of the pixels in the object in the first-type band.

[0228] The hyperspectral image generation model is trained using a first sample set and a second sample set; wherein, the first sample in the first sample set is a non-hyperspectral image, and the second sample in the second sample set is a non-hyperspectral image-hyperspectral image pair.

[0229] In an optional embodiment, the hyperspectral image generation apparatus further includes a training module for:

[0230] The hyperspectral image generation model is self-supervised and trained using the first sample set to obtain a pre-trained hyperspectral image generation model.

[0231] The pre-trained hyperspectral image generation model is trained in a supervised manner using the second sample set to obtain a trained hyperspectral image generation model.

[0232] In an optional embodiment, when the training module performs self-supervised training on the hyperspectral image generation model using the first sample set, it is used to:

[0233] The first sample is segmented using the hyperspectral image generation model to obtain multiple sample objects and the location information of each sample object in the first sample.

[0234] Perform inverse spectral reflectance transformation on each sample object to obtain the inverse transformation object corresponding to each sample object;

[0235] The hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the sample object in the target first-type band.

[0236] The hyperspectral image generation model predicts the inverse transformation values ​​of pixels in the inverse transformation object in various non-target first-type bands, as well as the inverse transformation values ​​of pixels in the inverse transformation object in multiple second-type bands, based on the inverse transformation values ​​of pixels in the inverse transformation object in the target first-type band.

[0237] Based on the principle of band continuity, the values ​​of the same pixel in the sample object in all first-class bands, all second-class bands, and the value in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object.

[0238] Based on the location information of each sample object in the first sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the first sample;

[0239] The hyperspectral image corresponding to the first sample is segmented using the hyperspectral image generation model to obtain the segmentation result.

[0240] Based on the predicted pixel values ​​of the sample object in the non-target first type band, the inverse transform values ​​of the pixels in the inverse transform object in the non-target first type band, the changing trends of the inverse transform values ​​of the pixels contained in the inverse transform object in each first type band and second type band, the changing trends of the pixel values ​​of the sample object in each first type band and second type band, and the segmentation results, the parameters of the hyperspectral image generation model are updated.

[0241] In an optional embodiment, when the training module updates the parameters of the hyperspectral image generation model, it is used to:

[0242] The parameters of the hyperspectral image generation model are updated based on the following criteria: the predicted pixel values ​​of the sample object in the non-target first-type band are close to the actual pixel values ​​of the sample object in the non-target first-type band; the predicted inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band are close to the actual inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band; the predicted trend of the inverse transform values ​​of the pixels contained in the inverse transform object in each first-type and second-type band is far away from the predicted trend of the pixel values ​​of the sample object in each first-type and second-type band; and the segmentation result is close to the result of object segmentation of the first sample.

[0243] In an optional embodiment, when the training module performs supervised training on the pre-trained hyperspectral image generation model using the second sample set, it is used to:

[0244] The pre-trained hyperspectral image generation model is used to segment the non-hyperspectral images in the second sample to obtain multiple sample objects and the location information of each sample object in the non-hyperspectral images in the second sample.

[0245] The pre-trained hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the target first-type band.

[0246] Based on the principle of band continuity, the predicted values ​​of the same pixel of the sample object in all non-first-class bands, in all second-class bands, and in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object.

[0247] Based on the location information of each sample object in the non-hyperspectral image of the second sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the second sample;

[0248] The hyperspectral image corresponding to the second sample is segmented to obtain the segmentation result.

[0249] The parameters of the pre-trained hyperspectral image generation model are updated with the goal of making the pixel values ​​of the predicted sample object in the non-target first and second bands approach the pixel values ​​of the sample object in the hyperspectral image of the second sample in the non-target first and second bands, and the segmentation result of the hyperspectral image corresponding to the second sample approach the object segmentation result of the non-hyperspectral image in the second sample.

[0250] Corresponding to the method embodiments, this application also provides an electronic device, a schematic diagram of which is shown below. Figure 11 As shown, it may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4.

[0251] In this embodiment, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4.

[0252] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0253] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.

[0254] The memory 3 stores a program, and the processor 1 can call the program stored in the memory 3. The program is used for:

[0255] The first image is segmented to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to that pixel in each first type of spectral band.

[0256] Based on the values ​​of the pixels in the object in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands;

[0257] Based on the principle of band continuity, the values ​​of the same pixel of the object are combined in all first-class bands and the multiple second-class bands to obtain the hyperspectral image corresponding to the object;

[0258] Based on the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image.

[0259] Optionally, the refined and extended functions of the program can be found in the description above.

[0260] This application embodiment also provides a storage medium that can store a program suitable for execution by a processor, the program being used for:

[0261] The first image is segmented to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to that pixel in each first type of spectral band.

[0262] Based on the values ​​of the pixels in the object in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands;

[0263] Based on the principle of band continuity, the values ​​of the same pixel of the object are combined in all first-class bands and the multiple second-class bands to obtain the hyperspectral image corresponding to the object;

[0264] Based on the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image.

[0265] Optionally, the refined and extended functions of the program can be found in the description above.

[0266] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0267] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0268] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0269] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0270] It should be understood that in the embodiments of this application, the claims, various embodiments, and features can be combined with each other to solve the aforementioned technical problems.

[0271] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0272] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a hyperspectral image, the method comprising: The first image is segmented to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to that pixel in each first type of spectral band. Based on the values ​​of the pixels in the object in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands; Based on the principle of band continuity, the values ​​of the same pixel of the object are combined in all first-class bands and the multiple second-class bands to obtain the hyperspectral image corresponding to the object; Based on the position information of each object in the first image, the hyperspectral images corresponding to each object are combined to obtain the hyperspectral image corresponding to the first image.

2. The method according to claim 1, wherein predicting the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of pixels in the first-type band comprises: Based on the values ​​of the pixels in the object in the first band, predict the values ​​of each pixel in the object in multiple second-type bands located between the first band and the second band. The first band and the second band are any two adjacent first-class bands.

3. The method according to claim 1 or 2, wherein predicting the values ​​of each pixel in the object in multiple second-type bands based on the values ​​of pixels in the object in the first-type band comprises: By using a cascaded network, the values ​​of each pixel in the object in multiple second-type bands are predicted based on the values ​​of the pixels in the first-type band. The cascaded network includes multiple prediction modules, divided into target prediction modules and non-target prediction modules; among which... The input to each target prediction module includes at least the values ​​of the pixels in the object in the first type of band; wherein, adjacent target prediction modules input the values ​​of the pixels in the object in adjacent first type of bands; Between any two adjacent target prediction modules, there are multiple non-target prediction modules. The input of the non-target prediction module includes: the value of the pixel in the object in a second type band output by the previous prediction module of the non-target prediction module, as well as the intermediate features of the previous prediction module and the value of the pixel in the object in a band as the input of the previous prediction module. If the target prediction module is not the first prediction module of the cascaded network, the input of the target prediction module further includes: the intermediate features of the previous non-target prediction module of the target prediction module and the value of the pixel in the object in a band as the input of the previous prediction module. The output of each prediction module is the value of the pixel in the object in the first or second type of band; adjacent prediction modules output the value of the pixel in the object in the adjacent band.

4. The method according to claim 3, wherein, The first prediction module is used to: extract a first feature from the pixel values ​​of the input object in the first type of band of the target to obtain a first feature; extract a second feature from the first feature to obtain an intermediate feature of the first prediction module; perform a linear transformation on the intermediate feature to obtain a second feature; extract a third feature from the second feature to obtain a third feature; the third feature extraction is the inverse process of the second feature extraction; and fuse the first feature and the third feature to obtain the pixel values ​​of the object in the second type of band. And / or, The non-first prediction module of the cascaded network is used to: extract first features from the pixel values ​​of the input object in two bands respectively, to obtain first features corresponding to the two bands respectively; extract second features from each first feature respectively, to obtain fourth features corresponding to each first feature; fuse each fourth feature with the intermediate features of the previous prediction module to obtain the intermediate features of the non-first prediction module; and perform a linear transformation on the intermediate features of the non-first prediction module to obtain a fifth feature. The third feature is extracted from the fifth feature to obtain the sixth feature; the sixth feature and the target first feature in the first feature corresponding to the two bands are fused to obtain the value of each pixel of the object in the first band or the second band.

5. The method according to claim 1, wherein object segmentation is performed on a first image, and the process of predicting the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of pixels in the object in a first-type band includes: The first image is segmented using a hyperspectral image generation model to obtain multiple objects; Based on the values ​​of the pixels in the object in the first type of band, predict the values ​​of each pixel in the object in multiple second type of bands; The hyperspectral image generation model is trained using a first sample set and a second sample set; wherein, the first sample in the first sample set is a non-hyperspectral image, and the second sample in the second sample set is a non-hyperspectral image-hyperspectral image pair.

6. The method according to claim 5, wherein the hyperspectral image generation model is trained by the following method: The hyperspectral image generation model is self-supervised and trained using the first sample set to obtain a pre-trained hyperspectral image generation model. The pre-trained hyperspectral image generation model is trained in a supervised manner using the second sample set to obtain a trained hyperspectral image generation model.

7. The method according to claim 6, wherein the self-supervised training of the hyperspectral image generation model using the first sample set comprises: The first sample is segmented using the hyperspectral image generation model to obtain multiple sample objects and the location information of each sample object in the first sample. Perform inverse spectral reflectance transformation on each sample object to obtain the inverse transformation object corresponding to each sample object; The hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the sample object in the target first-type band. The hyperspectral image generation model predicts the inverse transformation values ​​of pixels in the inverse transformation object in various non-target first-type bands, as well as the inverse transformation values ​​of pixels in the inverse transformation object in multiple second-type bands, based on the inverse transformation values ​​of pixels in the inverse transformation object in the target first-type band. Based on the principle of band continuity, the values ​​of the same pixel in the sample object in all first-class bands, all second-class bands, and the value in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object. Based on the location information of each sample object in the first sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the first sample; The hyperspectral image corresponding to the first sample is segmented using the hyperspectral image generation model to obtain the segmentation result. Based on the predicted pixel values ​​of the sample object in the non-target first type band, the inverse transform values ​​of the pixels in the inverse transform object in the non-target first type band, the changing trends of the inverse transform values ​​of the pixels contained in the inverse transform object in each first type band and second type band, the changing trends of the pixel values ​​of the sample object in each first type band and second type band, and the segmentation results, the parameters of the hyperspectral image generation model are updated.

8. The method according to claim 7, wherein updating the parameters of the hyperspectral image generation model comprises: The parameters of the hyperspectral image generation model are updated based on the following criteria: the predicted pixel values ​​of the sample object in the non-target first-type band are close to the actual pixel values ​​of the sample object in the non-target first-type band; the predicted inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band are close to the actual inverse transform values ​​of the pixels in the inverse transform object in the non-target first-type band; the predicted trend of the inverse transform values ​​of the pixels contained in the inverse transform object in each first-type and second-type band is far away from the predicted trend of the pixel values ​​of the sample object in each first-type and second-type band; and the segmentation result is close to the result of object segmentation of the first sample.

9. The method according to claim 6, wherein the step of performing supervised training on the pre-trained hyperspectral image generation model using the second sample set to obtain a trained hyperspectral image generation model comprises: The pre-trained hyperspectral image generation model is used to segment the non-hyperspectral images in the second sample to obtain multiple sample objects and the location information of each sample object in the non-hyperspectral images in the second sample. The pre-trained hyperspectral image generation model predicts the values ​​of pixels in the sample object in various non-target first-type bands and the values ​​of pixels in the sample object in multiple second-type bands based on the values ​​of pixels in the target first-type band. Based on the principle of band continuity, the predicted values ​​of the same pixel of the sample object in all non-first-class bands, in all second-class bands, and in the target first-class band are combined to obtain the hyperspectral image corresponding to the sample object. Based on the location information of each sample object in the non-hyperspectral image of the second sample, the hyperspectral images corresponding to each sample object are combined to obtain the hyperspectral image corresponding to the second sample; The hyperspectral image corresponding to the second sample is segmented to obtain the segmentation result. The parameters of the pre-trained hyperspectral image generation model are updated with the goal of making the pixel values ​​of the predicted sample object in the non-target first and second bands approach the pixel values ​​of the sample object in the hyperspectral image of the second sample in the non-target first and second bands, and the segmentation result of the hyperspectral image corresponding to the second sample approach the object segmentation result of the non-hyperspectral image in the second sample.

10. A hyperspectral image generation apparatus, comprising: The segmentation unit is used to segment the first image into objects to obtain multiple objects and the position information of each object in the first image; wherein the values ​​of each pixel of the same object are located in the same interval, and the values ​​of pixels of different objects are located in different intervals; the value of any pixel is determined by the spectral reflectance of the object corresponding to the pixel in each first type of spectral band. The prediction unit is used to predict the values ​​of each pixel of the object in multiple second-type bands based on the values ​​of the pixels in the first-type band. The first combination unit is used to combine the values ​​of the same pixel of the object in all first-class bands and the multiple second-class bands based on the principle of band continuity to obtain the hyperspectral image corresponding to the object. The second combining unit is used to combine the hyperspectral images corresponding to each object according to the position information of each object in the first image to obtain the hyperspectral image corresponding to the first image.

Citation Information

Patent Citations

  • Method and device for reconstructing RGB image into hyperspectral image, equipment and storage medium

    CN113947643A