GithubHelp home page GithubHelp logo

dv-fenix / seminmf-autoencoders Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 348 KB

Official implementation of our NCC'24 paper titled "Semi‑NMF Regularization‑Based Autoencoder Training for Hyperspectral Unmixing".

License: GNU General Public License v3.0

Dockerfile 1.71% Shell 1.84% Python 96.45%
autoencoder hyperspectral-unmixing pytorch-implementation semi-nmf spectral-angle-mapper

seminmf-autoencoders's Introduction

SemiNMF-Autoencoders

made-with-python build

This repository contains the code for reproducing the experiments in Semi-NMF Regularization-Based Autoencoder Training for Hyperspectral Unmixing. Design of the semi-NMF objective can be found in Algorithm.pdf.

Dependencies

  • Docker 19.03.12
  • PyTorch 1.9.0
  • Python 3.7.10

Installation

Data

The dataset is publicly available and can be found here.
Download the Samson dataset from the above-mentioned source. Follow the directory tree given below:

|-- [root] HyperspecAE\
    |-- [DIR] data\
        |-- [DIR] Samson\
             |-- [DIR] Data_Matlab\
                 |-- samson_1.mat
             |-- [DIR] GroundTruth
                 |-- end3.mat
                 |-- end3_Abundances.fig
                 |-- end3_Materials.fig

From Docker (Recommended)

Using a docker image requires an NVIDIA GPU. If you do not have a GPU please follow the directions for installing from source. In order to get GPU support you will have to use the nvidia-docker2 plugin. The docker image is cached on the GPU with id 0. In case of OOM errors at training, pass two GPUs.

# Build the Dockerfile to create a Docker image.
docker build -t dgoel04/snreg:1.0 .

# This will create a container from the image we just created.
docker run -it --gpus '"device=gpu-ids"' dgoel04/snreg:1.0

From source:

  1. Install the data by following the steps shown under installation.

  2. Clone this repository.
    git clone https://github.com/dv-fenix/SemiNMF-Autoencoders.git
    cd SemiNMF-Autoencoders

  3. Install the requirements given in requirements.txt.
    python -m pip install -r requirements.txt

  4. Change working directory.
    cd run

Run Experiments

Training the Autoencoders

The code is fairly modular and can be run from the terminal.

# For more information on the optional experimental setups and configurations.
python ../src/train.py --help

# You can manually change the arguments in samson_train.sh to choose the different autoencoder configurations.
sh samson_train.sh

Please make sure that all the arguments are to your liking before getting started with the training!

Abundance Map and End-Member Extraction

Please ensure that the arguments contained within extract.sh match those used in samson_train.sh during training.

# You can manually change the arguments in experiments.sh to choose the different configurations.
sh extract.sh

Cite

If you use this code, please cite our paper:

@inproceedings{goel2024semi,
  title={Semi-NMF Regularization-Based Autoencoder Training for Hyperspectral Unmixing},
  author={Goel, Divyam and Khanna, Saurabh},
  booktitle={2024 National Conference on Communications (NCC)},
  pages={1--6},
  year={2024},
  organization={IEEE}
}

seminmf-autoencoders's People

Contributors

dv-fenix avatar

Watchers

 avatar

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.