Giter Site home page Giter Site logo

boyangxdu / hypelcnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aligokalppeker/hypelcnn

0.0 0.0 0.0 1.25 MB

A Deep Learning Classification Framework with Spectral and Spatial Feature Fusion Layers for Hyperspectral and Lidar Sensor Data

License: GNU General Public License v3.0

Python 98.06% Batchfile 0.17% Jupyter Notebook 1.77%

hypelcnn's Introduction

HypeLCNN Overview

This repository includes source codes for hyperspectral and LiDAR fusion system for classification and GAN based hyperspectral sample generation.

This repository includes an integrated suite for hyperspectral and lidar, neural net based classification.

Primary features are:

  • Plug-in based model implementation( via NNModel interface )
  • Plug-in based data set integration( via DataLoader interface )
  • Data efficient implementations for training( memory efficient/in-memory/record based )
  • Cross use of data set integration in classic machine learning and deep learning methods
  • Integrated hyperparameter optimization (via optuna).
  • Training, classification and metrics integration for neural networks
  • CPU/GPU based training
  • Sample implementations for
    • CNN networks
    • Capsule networks
  • GAN based data augmenter implementation with training and evaluation codes.
    • Vanilla GAN
    • Cycle GAN
    • Contrastive Unpaired Translation(CUT) GAN
    • Dual Contrastive Learning Adversarial Generative Networks (DCLGAN)

Project is developed using Tensorflow (Tested on version 2.9.0). For now, it works on TF2 using legacy mode. Eager mode will be implemented in the upcoming days.

For Tensorflow 1.x version, please use branch "tf1_support"(tested on Tensorflow 1.15). Source codes in this branch can be used for best practices of applying Tensorflow 1.x for;

  • Training large data sets
  • Merging two different neural networks for data augmentation
  • Integrating custom metrics
  • Reading summary file and extracting extra information from it.

Data sets

Data set files are too large to commit on repository. Access to data sets can be done using this URL;

https://drive.google.com/drive/folders/1oiNRuPAkQ1MpJEUjKYE8YtXpcM405usE?usp=sharing

Each data set has its own licensing, and you should include them in your paper/work.

Requirements

Works with Python 3.7-3.10. Library dependencies are put in "requirements.txt".

Source Files

  • nnmodel package => Classification model abstraction and implementation
    • NNModel.py : Neural Network definition interface, provides methods for declaring loss function, base parameter values, hyperparameter value range.
    • HYPELCNNModel.py : Model declaration source code for HypeLCNN.
    • DUALCNNModel.py : Model declaration source code for CNN Dual Model.
    • CONCNNModel.py : Model declaration source code for Context CNN Model.
    • CAPModel.py : Capsule Network Model.
    • modelconfigs => Parameter value configs for corresponding NN models.
  • importer package => TF import strategies
    • DataImporter.py : DataImporter interface class.
    • InMemoryImporter.py : Placeholder based in memory data importer(fastest but memory inefficient implementation).
    • GeneratorImporter.py : Generator based data importer(memory efficient but slower than in memory implementation.
    • TFRecordImporter.py : TFRecord based data importer. TFRecord files can be created using tfrecord_writer in utilities package.
  • loader package => Data set loader abstraction and various implementations.
    • DataLoader.py : DataLoader interface class, used for integrating different data sets to the training/inference system.
    • GRSS2013DataLoader.py : GRSS2013 data set loader implementation.
    • GRSS2018DataLoader.py : GRSS2018 data set loader implementation.
    • GULFPORTDataLoader.py : Gulfport data set loader implementation.
    • GULFPORTALTDataLoader.py : Gulfport data set alternative loader implementation(shadow data augmentation).
    • AVONDataLoader.py : AVON data set loader implementation.
  • gan package => HSI shadow data transformation learning and shadowed data sampling with various GAN methods.
    • gan/gan_infer_for_shadow.py : Gan inference implementation.
    • gan/gan_train_for_shadow.py : Gan training runner.
    • gan.wrapper package
      • gan/*_wrapper.py : Wrappers for various gan methods.
  • utilities package => Various utility functions for HSI visualization, TF summary read, HSI-LIDAR registration
    • tfrecord_writer.py : TF record generator from samples.
    • hsi_rgb_converter.py : HSI to RGB conversion script.
    • read_summary_file.py : Reads tensorflow summary file and extract some statistical information.
  • classify package => Training and inference apps for classification.
    • train_for_classification.py : Terrain classification training execution class.
    • infer_for_classification.py : Loads a checkpoint file and data set and performs scene classification.
    • monitored_session_runner.py : Tensorflow(1.x) Monitored session runner implementation.
    • classic_ml_trainer.py : SVM and Random Forest Classifier implementation using scikit-learn.
  • common package => Common libraries for other packages.
    • common_nn_operations.py : Common nn methods.
    • cmd_parser.py : Common cmd parsers and flags.
  • notebook.ipynb : Sample notebook for executing the developed ML models.

In progress

  • Source code documentation.
  • TF 2.x Eager Mode transition.
  • Pytorch implementation.

hypelcnn's People

Contributors

aligokalppeker 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.