Skip to main content

Pipeline for building deep learning models to classify PhenoCam images.

Project description

PhenoCamSnow

Documentation Status Code style: black

PhenoCamSnow is a Python package for quickly building deep learning models to classify PhenoCam images.

Installation

PhenoCamSnow supports Python 3.7+ and can be installed via pip:

pip install phenocam-snow

Optional dependencies for development and documentation purposes can be installed by specifying the extras [dev] and [docs], repsectively.

Quickstart

The following code snippets show how to perform classification of canadaOBS images into "snow", "no snow", and "too dark". If you wish to use a different site, use the canonical site name as listed on the PhenoCam website.

Training a model

With new data:

python -m phenocam_snow.train canadaOBS \
   --new \
   --n_train 120 \
   --n_test 30 \
   --classes snow no_snow too_dark

With already downloaded and labeled data:

python -m phenocam_snow.train \
   --existing \
   --train_dir canadaOBS_train \
   --test_dir canadaOBS_test \
   --classes snow no_snow too_dark

Getting predictions

For a local directory of images:

python -m phenocam_snow.predict canadaOBS \
   [path/to/checkpoint_of_best_model.pth] \
   --directory canadaOBS_test_images

For a single online image:

python -m phenocam_snow.predict canadaOBS \
   [path/to/checkpoint_of_best_model.pth] \
   --url https://phenocam.sr.unh.edu/[path/to/image]

Advanced usage details can be found in the documentation.

Citation

If you use PhenoCamSnow for your work, please see CITATION.cff or use the citation prompt provided by GitHub in the sidebar.

Acknowledgements

Professor Jochen Stutz and Zoe Pierrat.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phenocam-snow-0.0.1.tar.gz (13.6 kB view hashes)

Uploaded Source

Built Distribution

phenocam_snow-0.0.1-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page