Autoencoder Trainer Overview
- This project includes a Python implementation of an autoencoder model to reduce dimensionality of hyperspectral leaf reflectance data.
- The model is designed to preprocess the data, build an autoencoder model, and train it with a sample dataset.
- Cite: Tross MC, Grzybowski MW, Jubery TZ, Grove RJ, Nishimwe AV, Torres-Rodriguez JV, Guangchao S, Ganapathysubramanian B, Yufeng G, Schnable JC (2023) Data driven discovery and quantification of hyperspectral leaf reflectance phenotypes across a maize diversity panel. bioRxiv doi: 10.1101/2023.12.15.571950
Getting Started Prerequisites
- Python 3.x
- Pip package manager
Installation
-
Clone the Repository
-
Run the following commands:
git clone https://github.com/mtross2/autoencoder_hyperspec_ref.git
cd autoencoder_hyperspec_ref
-
-
Set Up a Virtual Environment (Optional but recommended)
-
For Windows:
python -m venv venv
.\venv\Scripts\activate
-
For Unix or MacOS:
python3 -m venv venv
source venv/bin/activate
-
-
Install Required Packages
-
Execute the command:
pip install -r requirements.txt
-
-
Install Your Package (Optional if you want to use it as a package)
-
Use this command:
python setup.py install
-
Training the Model
* Prepare Your Dataset
* Place your dataset in the sample_data folder.
* Ensure it is in the correct format as expected by the AutoencoderTrainer.
* Run the Training Script
* Run the training script with default parameters or provide custom values.
python scripts/train_autoencoder.py --dataset sample_data/sampledData_maize2020.csv.gz
* To see all available command-line options:
python scripts/train_autoencoder.py --help
Testing
* Run the test suite to ensure everything is set up correctly:
python -m unittest