Pipeline for building deep learning models to classify PhenoCam images.
Project description
PhenoCamSnow
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for phenocam_snow-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58db21479506109f360651e361d1786335ea2d00533f8c69ac567dc48d88e5a8 |
|
MD5 | 28345f4b7413527938107e114194946c |
|
BLAKE2b-256 | 07a583438251133101b74669d431d031c4f89e416cfd008ee5b220e7a546b0de |