Code Monkey home page Code Monkey logo

hyperspectral_deeplearning_review's Introduction

Deep Learning Classifiers for Hyperspectral Imaging: A Review


The Code for "Deep Learning Classifiers for Hyperspectral Imaging: A Review".
[https://www.sciencedirect.com/science/article/pii/S0924271619302187]

M. E. Paoletti, J. M. Haut, J. Plaza and A. Plaza.
Deep Learning Classifiers for Hyperspectral Imaging: A Review
International Society for Photogrammetry and Remote Sensing
DOI: 10.1016/j.isprsjprs.2019.09.006
vol. 158, pp. 279-317, December 2019.

reviewHSI

Example of use

# Without datasets
git clone https://github.com/mhaut/hyperspectral_deeplearning_review/

# With datasets
git clone --recursive https://github.com/mhaut/hyperspectral_deeplearning_review/
cd HSI-datasets
python join_dsets.py

Run code

Go to algorithms folder and run

# Training from scratch
python <algorithm>.py --dataset IP 
# Example:
python svm.py --dataset IP --tr_percent 0.15

# Fine-tuning (not recommended) <DENSENET121, MOBILENET, RESNET50, VGG16, VGG19>:
python pretrained_cnn.py --dataset IP --arch <architecture>
# Example:
python pretrained_cnn.py --dataset IP --arch VGG16

# Transfer learning <CNN1D, CNN2D, CNN2D40bands, CNN3D>, two steps:
python transfer_learning.py --dataset1 IP --dataset2 SV --arch <algorithm> --search_base_model
python transfer_learning.py --dataset1 IP --dataset2 SV --tr_samples 2 --use_val --arch <algorithm> --use_transfer_learning
# Example:
python transfer_learning.py --dataset1 IP --dataset2 SV --arch CNN2D40bands --search_base_model
python transfer_learning.py --dataset1 IP --dataset2 SV --tr_samples 2 --use_val --arch CNN2D40bands --use_transfer_learning

Other parameters

Dimensionality reduction - - components [number]

python <algorithm>.py --dataset IP --components 40

You can change the proposed parameters - - set_parameters [parameters]

python svm.py --dataset IP --set_parameters --C 2 --g 0.01

You can use validation set - - use_val by default is 10%, you can change it - -use_val - -val_percent [percent]

python cnn1d.py --dataset IP --use_val --val_percent 0.10

Example:

python cnn1d.py --dataset IP --components 40  --set_parameters --epochs 100 --batch_size 32--use_val --val_percent 0.10

hyperspectral_deeplearning_review's People

Contributors

mhaut 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

hyperspectral_deeplearning_review's Issues

Disjoint sample ?

When I execute the function: "load_ split_ data", "Type error: only integer scalar arrays can be converted to a scalar index“ occured. In additon, the method of "Disjoint sample" you mentioned in your paper, I don't seem to understand your code.

Item not found

Hello, I have finished reading your article "Morphological Convolutional Neural Networks for Hyperspectral Image Classification". I want to read the code of this article. But the link in the article "https://github.com/mhaut/MorphConvHyperNet" is not available. Can you provide this project code?

Save model error

Hi, when I try to save the best model I am getting the following error:

main()
File "cnn3d.py", line 148, in main
clf = load_model("best_model.h5")
File "/home/alou/anaconda3/lib/python3.7/site-packages/keras/engine/saving.py", line 417, in load_model
f = h5dict(filepath, 'r')
File "/home/alou/anaconda3/lib/python3.7/site-packages/keras/utils/io_utils.py", line 186, in init
self.data = h5py.File(path, mode=mode)
File "/home/alou/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 408, in init
swmr=swmr)
File "/home/alou/anaconda3/lib/python3.7/site-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'best_model.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

Item not found

Hello, I have finished reading your article "Morphological Convolutional Neural Networks for Hyperspectral Image Classification". I want to read the code of this article. But the link in the article "https://github.com/mhaut/MorphConvHyperNet" is not available. Can you provide this project code?

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.