Coder Social home page Coder Social logo

gokriznastic / hybridsn Goto Github PK

View Code? Open in Web Editor NEW
294.0 6.0 114.0 69 MB

A keras based implementation of Hybrid-Spectral-Net as in IEEE GRSL paper "HybridSN: Exploring 3D-2D CNN Feature Hierarchy for Hyperspectral Image Classification".

Home Page: https://ieeexplore.ieee.org/document/8736016

License: MIT License

Jupyter Notebook 100.00%
hyperspectral-image-classification remote-sensing hyperspectral-imaging 3d-cnn

hybridsn's Introduction

Hybrid-Spectral-Net for Hyperspectral Image Classification.

License: MIT PWC

PyTorch Implimentation of HybridSN

PyTorch version of the HybridSN is available: https://github.com/Pancakerr/HybridSN

Description

The HybridSN is spectral-spatial 3D-CNN followed by spatial 2D-CNN. The 3D-CNN facilitates the joint spatial-spectral feature representation from a stack of spectral bands. The 2D-CNN on top of the 3D-CNN further learns more abstract level spatial representation.

Model

Fig: Proposed HybridSpectralNet (HybridSN) Model with 3D and 2D convolutions for hyperspectral image (HSI) classification.

Prerequisites

Results

Indian Pines (IP) dataset

Fig.2 The IN dataset classification result (Overall Accuracy 99.81%) of Hybrid-SN using 30% samples for training. (a) False color image. (b) Ground truth labels. (c) Classification map. (d) Class legend.

University of Pavia (UP) dataset

Fig.3 The UP dataset classification result (Overall Accuracy 99.99%) of Hybrid-SN using 30% samples for training. (a) False color image. (b) Ground truth labels. (c) Classification map. (d) Class legend.

Salinas Scene (SS) dataset

Fig.4 The UP dataset classification result (Overall Accuracy 100%) of Hybrid-SN using 30% samples for training. (a) False color image. (b) Ground truth labels. (c) Classification map.

Detailed results can be found in the Supplementary Material

Citation

If you use HybridSN and A2S2K-ResNet and HSI-Survey code in your research, we would appreciate a citation to both the original paper:

@article{roy2019hybridsn,
    	title={HybridSN: Exploring 3D-2D CNN Feature Hierarchy for Hyperspectral Image Classification},
	author={Roy, Swalpa Kumar and Krishna, Gopal and Dubey, Shiv Ram and Chaudhuri, Bidyut B},
	journal={IEEE Geoscience and Remote Sensing Letters},
	volume={17},
	no.={2},
	pp.={277-281},
	year={2020}
	}
@article{roy2020attention,
	title={Attention-based adaptive spectral-spatial kernel resnet for hyperspectral image classification},
	author={Swalpa Kumar Roy, and Suvojit Manna, and Tiecheng Song, and Lorenzo Bruzzone},
	journal={IEEE Transactions on Geoscience and Remote Sensing},
	volume={59},
	no.={9},
	pp.={7831-7843},
	year={2021},
	publisher={IEEE}
	}	
@article{ahmad2021hyperspectral,
	title={Hyperspectral Image Classification--Traditional to Deep Models: A Survey for Future Prospects},
	author={Muhammad Ahmad, and Sidrah Shabbir, and Swalpa Kumar Roy, and Danfeng Hong, and Xin Wu, and Jing Yao, and Adil Mehmood Khan,
	and Manuel Mazzara, and Salvatore Distefano, and Jocelyn Chanussot},
	journal={IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing},
	year={2022},
	volume={15},
	pages={968-999},
	doi={10.1109/JSTARS.2021.3133021},
	publisher={IEEE}
	}

Acknowledgement

Part of this code is from a implementation of Classification of HSI using CNN by Konstantinos Fokeas.

License

Copyright (c) 2019 Gopal Krishna. Released under the MIT License. See LICENSE for details.

hybridsn's People

Contributors

gokriznastic 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hybridsn's Issues

PCA & Imagecube before train test split cause data leak.

Hi, thank you for sharing the code. That helps alot.
I applied the code on my own hyperspectral image, the test result is very good with almost 100%. However, the model doesn't predict well on other similar images. One thing I can think of is because of PCA on the whole image, and different images will cause different PCA loadings. However, I tried train the model without PCA, i.e. put all spectral in, the test result is less than 40% accuarcy rate (haven't figured out why). Another thing that will compromise the model integrity is create image cube before train test split. That will mix training pixels and testing pixels all together. For any 25x25 image cube, it will definatly contain training and testing spectra.

Error while create model

Negative dimension size caused by subtracting 3 from 1 for 'conv3d_6/convolution' (op: 'Conv3D') with input shapes: [?,1,1,20,16], [3,3,3,16,32].

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.