Skip to content

GMoncrieff/hyper-iap

Repository files navigation


Detection of invasive plants using hyperspectral imagery

build codecov

Description

This package is intended for running deep learning classifiers on hyperspectral data for mapping invasive alien plants. Models are pretrained using self-supervision and/or noisy land cover label data and then fine-tuned using point labels.

Currently this package is under heavy development

Development roadmap

Current and planned data sources, models and module features are indicated below

Data sources

  • Sentinel 2
  • Hyperspectral

Models

Module features

  • Logging with W&B
  • Hyperparameter tuning with W&B sweeps

Getting started

First, install dependencies

# clone project   
git clone https://github.com/GMoncrieff/hyper-iap

# install project   
cd hyper-iap  
pip install -r requirements.txt

Next, train classifiers using the command line.

python train.py --model_class=vit.simpleVIT   

For a full list of command line options run

python train.py --help

Imports

You can also import individual modules and incorporate them into python workflows

from lightning import Trainer, seed_everything
from hyperiap.models.vit import simpleVIT
from hyperiap.datasets.xarray_module import XarrayDataModule
from hyperiap.litmodels.litclassifier import LitClassifier

xmod = XarrayDataModule()
model = LitClassifier(simpleVIT(data_config=xmod.config()))
trainer = Trainer(limit_train_batches=5, limit_val_batches=3, max_epochs=2)
trainer.fit(model, datamodule=xmod)
trainer.validate(datamodule=xmod)

Acknowledgements

The module builds on contributions and implementations from :

The land cover labels used from pre-training from

About

Classification of alien invasive plants from hyperspectral data from point localities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published