OSSP
Open Source Algorithm for Detecting Sea Ice Surface Features in High Resolution Optical Imagery.
https://github.com/wrightni/OSSP
Category: Cryosphere
Sub Category: Sea Ice
Last synced: about 21 hours ago
JSON representation
Repository metadata
Open Source Algorithm for Detecting Sea Ice Surface Features in High Resolution Optical Imagery
- Host: GitHub
- URL: https://github.com/wrightni/OSSP
- Owner: wrightni
- License: mit
- Created: 2017-08-02T19:16:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-19T00:07:42.000Z (over 3 years ago)
- Last Synced: 2025-04-17T20:38:15.658Z (11 days ago)
- Language: Python
- Size: 3.01 MB
- Stars: 22
- Watchers: 0
- Forks: 18
- Open Issues: 1
- Releases: 0
-
Metadata Files:
- Readme: readme.md
- License: 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 imagery_utils (for WV pansharpening) (https://github.com/PolarGeospatialCenter/imagery_utils)
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.
- 'srgb': RGB imagery taken by a typical camera
- 'wv02_ms': DigitalGlobe WorldView 2 multispectral imagery
- '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.
- 'srgb': RGB imagery taken by a typical camera
- 'wv02_ms': DigitalGlobe WorldView 2 multispectral imagery,
- '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 = <image_type>_training_data.h5.
- --username: A specific label to attach to the training set. The --training_label argument of ossp_\process references this value. Default = <image_type>
Contact
Nicholas Wright
Owner metadata
- Name: Nicholas Wright
- Login: wrightni
- Email:
- Kind: user
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/20709309?u=86af4d2859bd149a7e8141cfebe2dd12fd553d77&v=4
- Repositories: 6
- Last ynced at: 2024-06-11T16:00:14.084Z
- Profile URL: https://github.com/wrightni
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers metadata
Last synced: 7 days ago
Total Commits: 154
Total Committers: 1
Avg Commits per committer: 154.0
Development Distribution Score (DDS): 0.0
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Nicholas Wright | n****h@d****u | 154 |
Committer domains:
Issue and Pull Request metadata
Last synced: 2 days ago
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 request: 2
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Rimann91 (1)
Top Pull Request Authors
- wrightni (2)
- tnelsen16 (1)
Top Issue Labels
Top Pull Request Labels
Dependencies
Score: 3.1354942159291497