OSSP

Open Source Algorithm for Detecting Sea Ice Surface Features in High Resolution Optical Imagery

https://github.com/wrightni/OSSP

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Open Source Algorithm for Detecting Sea Ice Surface Features in High Resolution Optical Imagery

Basic Info
  • Host: GitHub
  • Owner: wrightni
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 3.01 MB
Statistics
  • Stars: 22
  • Watchers: 0
  • Forks: 18
  • Open Issues: 1
  • Releases: 0
Created almost 9 years ago · Last pushed almost 5 years ago
Metadata Files
Readme License

readme.md

OSSP

Open Source Sea-ice Processing

Open Source Algorithm for Detecting Sea Ice Surface Features in High Resolution Optical Imagery

Nicholas Wright and Chris Polashenski

Introduction

Welcome to OSSP; a set of tools for detecting surface features in high resolution optical imagery of sea ice. The primary focus is on the detection of and differentiation between open water, melt ponds, and snow/ice.

The Anaconda distribution of Python is recommended, but any distribution with the appropriate packages will work. You can download Anaconda, version 3.6, here: https://www.continuum.io/downloads

Dependencies

  • gdal (v2.0 or above)
  • numpy
  • scipy
  • h5py
  • scikit-image
  • sklearn
  • matplotlib
  • tkinter

Optional

  • tqdm (for progress bar)
  • PGC imageryutils (for WV pansharpening) (https://github.com/PolarGeospatialCenter/imageryutils)

Usage

For detailed usage and installation instructions, see the pdf document 'Algorithm_Instructions.pdf'

setup.py

The first step is to run the setup.py script to compile C libraries. Run python setup.py build_ext --build-lib . from the OSSP directory. Be sure to include the period after --build-lib.

ossp_process.py

This combines all steps of the image classification scheme into one script and should be the only script to call directly. If given a folder of images, this script finds all appropriately formatted files directory (.tif(f) and .jpg) and queues them for processing. If given an image file, this script processes that single image alone. This script processes images as follows: Image preprocessing (histogram stretch or pansharpening if chosen) -> segmentation (segment.py) -> classification (classify.py) -> calculate statistics. Output results are saved as a geotiff with the same georeference of the input image.

Required Arguments

  • input directory: directory containing all of the images you wish to process. Note that all .jpg and .tif images in the input directory as well as all sub-directories of it will be processed. Can also provide the path and filename to a single image to process only that image.
  • image type: {‘srgb’, ‘wv02_ms’, ‘pan'}: the type of imagery you are processing.
    1. 'srgb': RGB imagery taken by a typical camera
    2. 'wv02_ms': DigitalGlobe WorldView 2 multispectral imagery
    3. 'pan': High resolution panchromatic imagery
  • training dataset file: filepath of the training dataset you wish to use to analyze the input imagery

Optional Arguments

  • -o | --output_dir: Directory to write output files.
  • -v | --verbose: Display text output as algorithm progresses.
  • -c | --stretch: {'hist', 'pansh', 'none'}: Apply an image correction prior to classification. Pansharpening / orthorectification option requires PGC scripts. Default = hist.
  • -t | --threads: Number of subprocesses to spawn for classification. Threads > 2 is only utilized for images larger than ~10,000x10,000 pixels.
  • --pgc_script: Path for the PGC imagery_utils folder if 'pansh' was chosen for the image correction.
  • --training_label: The label of a custom training dataset. See advanced section for details. Default = image_type.

Notes:

Example: ossp_process.py input_dir im_type training_dataset_file -v

This example will process all .tif and .jpg files in the input_dir.

training_gui.py

Graphical user interface for creating a custom training dataset. Provide a directory of images that you wish to use as the basis of your training set. The GUI will present a random segment each time a classification is assigned. The display images can also be clicked classify a specific area. The segments themselves are automatically generated. The highlighted region corresponds to the segment that will be labeled.

Output is a .h5 file that can be provided to ossp_process.py.

Note: Images are segmented prior to display on the GUI, and as such may take up to a minute to load (depending on image size and computer specs)

Positional Arguments:

  • input: A directory containing the images you wish to use for training.
  • image type: {‘srgb’, ‘wv02_ms’, ‘pan'}: the type of imagery you are processing.
    1. 'srgb': RGB imagery taken by a typical camera
    2. 'wv02_ms': DigitalGlobe WorldView 2 multispectral imagery,
    3. 'pan': High resolution panchromatic imagery

Optional arguments:

  • --tds_file: Existing training dataset file. Will create a new one with this name if none exists. If a path is not provided, file is created in the image directory. Default = _training_data.h5.
  • --username: A specific label to attach to the training set. The --training_label argument of ossp_\process references this value. Default =

Contact

Nicholas Wright

Owner

  • Name: Nicholas Wright
  • Login: wrightni
  • Kind: user

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 154
  • Total Committers: 1
  • Avg Commits per committer: 154.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Nicholas Wright n****h@d****u 154
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 1
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Rimann91 (1)
Pull Request Authors
  • wrightni (2)
  • tnelsen16 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 8
proxy.golang.org: github.com/wrightni/ossp
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
proxy.golang.org: github.com/wrightni/OSSP
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago

Dependencies

setup.py pypi