Skip to main content

Fog prediction from images using deep learning

Project description

FogVision

Last Commit GitHub issues License: MIT GitHub commit activity

FogVision is an open-source Python framework for classifying mountain trail camera imagery by fog presence. First, image embeddings are computed using a pretrained ResNet50 model, and then a classification head was trained on ~40k images from 30 sites (separate classification head for diurnal and nocturnal imagery).

FogVision can be installed either at the Python Package Index (PyPI) or through the command line. It can then be utilized, either with Jupyter Notebook or from the command-line to perform inferences on images.

Installation

The source code can be found on GitHub at: https://github.com/jnicolow/FogVision/

FogVision is installable at the Python Package Index (PyPI).

pip install fogvision

Classify function

When using FogVision, you can use the classify function in a .ipynb file (Jupyter Notebook) to classify your images.

from fogvision import fv

fv.classify(image_folder, plot_image=False, save_csv_to=None, sitename=None, crop_size=None, random_crop=False, threshold=0.5)

Only image_folder is needed to run the function properly.

  • image_folder (str): The folder path which contains the images to be classified.
  • plot_image (bool): Determines whether or not an image is plotted or not. Default set to false.
  • save-csv-to (str): Allows for a path to save the .csv file to, instead of the images folder.
  • sitename: Allows for manual setting of the site name.
  • crop-size (int): The side length (in pixels) of the square crop that is fed into the model. It controls how big the tensor is. If nothing is passed, then it chooses the largest square that fits in the image, rounded down to a multiple of 32.
  • random-crop (bool): If false, the center square is always taken. If true, then a randomly positioned square is taken. Default set to false.

CLI Tool

FogVision can also be used in the command line using fogvision. Since images cannot be plotted in a command line, the original plot_image parameter is not included and set to false by default.

fogvision path/to/images

--save-csv-to (str)
--sitename
--crop-size (int)
--random-crop (bool)

Project details


Download files

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

Source Distribution

fogvision-0.1.1.tar.gz (62.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fogvision-0.1.1-py3-none-any.whl (62.2 MB view details)

Uploaded Python 3

File details

Details for the file fogvision-0.1.1.tar.gz.

File metadata

  • Download URL: fogvision-0.1.1.tar.gz
  • Upload date:
  • Size: 62.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fogvision-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cdea8586a5555a6b2ea8b3a586d9149edc788bebb0f79a552bff64dfeea5cabc
MD5 68a6d15fc0cb3539e9278cf88fa201b4
BLAKE2b-256 f6672f359fd0da924f378023b4c48614756e074184c1b9db119cb7550db00f69

See more details on using hashes here.

File details

Details for the file fogvision-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fogvision-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 62.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for fogvision-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a82fb3d584f796ad8ced7a9e5d33667d14b3499623d3664b63a4cf988bc8873e
MD5 23865141d274df83bf3f5a4335769dd2
BLAKE2b-256 604ae13d95e616b72012083c8710475baa3195caa116ce67c6bcbfe56d1635e7

See more details on using hashes here.

Supported by

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