-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Resources
Paper: https://ieeexplore.ieee.org/document/9034492
PyTorch implementation: https://github.com/markusfoote/mag1c
Notes
- If filter is too computationally expensive, we can find an approximation, possibly with lesser results.
- Try to integrate the above function into our code base and adjust it to be compatible with our data. Try to convert it to Tensorflow.
- helps the models get the segmentation mask more accurate than just the hyperspectral images
- run a linear regression model on the hyperspectral images to get
Prahar: As a starting point, you can get the mag1c filter working on un-cropped images. You can compare the output you get to the one in the folder (mag1c.tiff). No need to do this for the entire dataset, but if you can show it works on 30-40 images, that'll put us in a good spot
Progress:
- Found out we need a 2 column text file, (wavelength in nm and reflectance or absorption). Why? Mag1c uses this file to detect pixels that match the methane gas spectral signature across wavelengths. It compares each pixel’s spectrum in the image against the template.
I reread parts of the starcop research paper and realized that the template they used for mag1c was derived from a strong AVIRIS-detected methane plume and extracted its spectrum.
Since mag1c helps our model to detect the methane gas in our satellite images, we would need too get a pretty accurate template if we want a more accurate detection of methane gas from our model. Though I’m not completely sure how much the template can impact our accuracy.
The spectral signature of methane with is a vector of reflectance or absorption values will be across the wavelengths between 2100 and 2400 nanometer.
Since the starcop paper didn’t release that template, we can get a synthetic template that mimics a Gaussian shaped methan absorption curve around 2310nm. It works well with AVIRIS and EMIT imagery and can be our starting point.
Or we can extract our own methane signature from the Starcop labeled plumes by finding a large confidently labeled methane plume in our dataset, select pixels from that plume area, and average the 16 band vectors to form our template. This would help with higher accuracy.
- The mag1c tool only accepts ENVI format inputs which means a binary image file, .img, and a header file, .hdr. ENVI is a standard format in remote sensing. So the code i’m working on will read the .tif files, which were given to us from the starcop dataset, and read it with rasterio and write it back as ENVI. Later we will need to load the .img and .hdr output (output of mag1c) into a NumPy array or TF tensor so that we can normalize it, and concatenate it with the satellite image before inference or training.
High level of what the code will do:
- Stack the 16 .tif bands into a single multi-band array (mag1c expects a single multi-band hyperspectral image in ENVI format)
- Save the stacked array as ENVI format
- Run mag1c once on the stack .img file