Git Product home page Git Product logo

swalpa / g2c-conv3d-hsi Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 0.0 436 KB

PyTorch implementation of the paper - Revisiting Deep Hyperspectral Feature Extraction Networks via Gradient Centralized Convolution

License: GNU General Public License v3.0

Jupyter Notebook 97.16% Python 2.84%
hyperspectral-image-classification hsi-classification deep-learning remote-sensing image-classification convolutional-neural-networks 3d-cnn 2d-cnn

g2c-conv3d-hsi's Introduction

The repository contains the implementations for - Revisiting Deep Hyperspectral Feature Extraction Networks via Gradient Centralized Convolution

๐Ÿ“‹ Abstract: The hyperspectral images are composed of a variety of textures across the different bands which increase the spectral similarity and makes it difficult to predict the pixel-wise labels without inducing additional complexity at the feature level. To extract robust and discriminative features from the different regions of land-cover, the hyperspectral research community is still seeking such type of convolutions which can efficiently deal with fine-grained texture information during the feature extraction phase, which often overlook this aspect by vanilla convolution. To overcome the above shortcoming, this paper proposes a generalized gradient centralized 3D convolution (G2C-Conv3D) operation, which is a weighted combination between the vanilla and gradient centralized 3D convolutions (GC-Conv3D) to extract both the intensity level semantic information and gradient level information. Which can be easily plugged into the existing HSI feature extraction networks to boost the performance of accurate prediction for land-cover types. To validate the feasibility of the proposed G2C-Conv3D, we have considered the existing CNN3D, MS3DNet, ContextNet and SSRN feature extraction models and as well as CAE3D, VAE3D, and SAE3D autoencoder (AE) networks, respectively. All these networks are embedded with G2C-Conv3D convolution to implement both generalized gradient centralized feature extraction networks (G2C-FE) and generalized gradient centralized autoencoder networks (G2C-AE) for fine-grained spectral-spatial feature learning. In addition, G2C-Conv2D is also considered with few networks. The extensive experiments are conducted on four most widely used hyperspectral datasets i.e., IP, KSC, UH, and UP, respectively, and compared with nine methods. The results demonstrate that the proposed G2C-Conv3D can effectively enhanced the feature learning ability of the existing networks and both the qualitative and quantitative results show the superiority and effectiveness of the proposed G2C-Conv3D.

Datasets

The dataset files need to be placed inside a folder in the root directory and the folder should have the same name as the dataset itself. For example - "Houston/houston.mat" where Houston is the folder name and houston.mat is the HSI data file. Similarly for the groundtruth file - "Houston/houston_gt.mat". Then refer to these paths in the loadData function as shown with the Houston, Trento and MUUFL datasets.

If you have questions or suggestions, please feel free to open an issue. Please cite as:

@article{roy2021revisiting,
  title={Revisiting Deep Hyperspectral Feature Extraction Networks via Gradient Centralized Convolution},
  author={Swalpa Kumar Roy, and Purbayan Kar, and Danfeng Hong, and Xin Wu, and Antonio Plaza, and Jocelyn Chanussot},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  year={2021},
  publisher={IEEE}
}

Reference code: https://github.com/ZitongYu/CDCN

g2c-conv3d-hsi's People

Contributors

ankurderia avatar swalpa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

g2c-conv3d-hsi's Issues

Read HSI data

Hello, I am using a tensorflow-gpu == 1.13.1 and trying to read the .mat file, but it's throwing this error:

Traceback (most recent call last):
File "run.py", line 225, in
X, y = loadData(dataset)
File "run.py", line 50, in loadData
mat_data = sio.loadmat(data_path + 'PaviaU.mat')
File "C:\Users\Alou\anaconda3\envs\paper\lib\site-packages\scipy\io\matlab\mio.py", line 226, in loadmat
matfile_dict = MR.get_variables(variable_names)
File "C:\Users\Alou\anaconda3\envs\paper\lib\site-packages\scipy\io\matlab\mio5.py", line 332, in get_variables
res = self.read_var_array(hdr, process)
File "C:\Users\Alou\anaconda3\envs\paper\lib\site-packages\scipy\io\matlab\mio5.py", line 292, in read_var_array
return self._matrix_reader.array_from_header(header, process)
File "mio5_utils.pyx", line 671, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 701, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 775, in scipy.io.matlab.mio5_utils.VarReader5.read_real_complex
File "mio5_utils.pyx", line 448, in scipy.io.matlab.mio5_utils.VarReader5.read_numeric
File "mio5_utils.pyx", line 353, in scipy.io.matlab.mio5_utils.VarReader5.read_element
File "streams.pyx", line 174, in scipy.io.matlab.streams.ZlibInputStream.read_string
File "streams.pyx", line 150, in scipy.io.matlab.streams.ZlibInputStream.read_into
File "streams.pyx", line 137, in scipy.io.matlab.streams.ZlibInputStream._fill_buffer
zlib.error: Error -3 while decompressing data: invalid block type

Please, I need some help. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.