Skip to main content

The ICEBERG Seals usecase package

Project description

Quality Metrics

Build Status

Prerequisites - all available on bridges via the commands below

  • Linux
  • Python 3
  • CPU and NVIDIA GPU + CUDA CuDNN

Software Dependencies - these will be installed automatically with the installation below.

  • numpy
  • scipy
  • pandas
  • torch==0.4.0
  • torchvision==0.2.1
  • tensorboardX==1.8
  • opencv-python
  • rasterio
  • affine
  • geopandas
  • pandas

Installation

Preliminaries:
These instructions are specific to XSEDE Bridges but other resources can be used if cuda, python3, and a NVIDIA P100 GPU are present, in which case 'module load' instructions can be skipped, which are specific to Bridges.

For Unix or Mac Users:
Login to bridges via ssh using a Unix or Mac command line terminal. Login is available to bridges directly or through the XSEDE portal. Please see the Bridges User's Guide.

For Windows Users:
Many tools are available for ssh access to bridges. Please see Ubuntu, MobaXterm or PuTTY

PSC Bridges

Once you have logged into bridges, you can follow one of two methods for installing iceberg-seals.

Method 1 (Recommended):

The lines below following a '$' are commands to enter (or cut and paste) into your terminal (note that all commands are case-sensitive, meaning capital and lowercase letters are differentiated.) Everything following '#' are comments to explain the reason for the command and should not be included in what you enter. Lines that do not start with '$' or '[seals_env] $' are output you should expect to see.

$ pwd
/home/username
$ cd $SCRATCH                      # switch to your working space.
$ mkdir Seals                      # create a directory to work in.
$ cd Seals                         # move into your working directory.
$ module load cuda                 # load parallel computing architecture.
$ module load python3              # load correct python version.
$ virtualenv seals_env             # create a virtual environment to isolate your work from the default system.
$ source seals_env/bin/activate    # activate your environment. Notice the command line prompt changes to show your environment on the next line.
[seals_env] $ pwd
/pylon5/group/username/Seals
[seals_env] $ export PYTHONPATH=<path>/seals_env/lib/python3.5/site-packages # set a system variable to point python to your specific code. (Replace <path> with the results of pwd command above.
[seals_env] $ pip install iceberg_seals.search # pip is a python tool to extract the requested software (iceberg_seals.search in this case) from a repository. (this may take several minutes).

Method 2 (Installing from source; recommended for developers only):

$ git clone https://github.com/iceberg-project/Seals.git
$ module load cuda
$ module load python3
$ virtualenv seals_env
$ source seals_env/bin/activate
[seals_env] $ export PYTHONPATH=<path>/seals_env/lib/python3.5/site-packages
[seals_env] $ pip install . --upgrade

To test

[iceberg_seals] $ deactivate       # exit your virtual environment.
$ interact -p GPU-small --gres=gpu:p100:1  # request a compute node.  This package has been tested on P100 GPUs on bridges, but that does not exclude any other resource that offers the same GPUs. (this may take a minute or two or more to receive an allocation).
$ cd $SCRATCH/Seals                # make sure you are in the same directory where everything was set up before.
$ module load cuda                 # load parallel computing architecture, as before.
$ module load python3              # load correct python version, as before.
$ source seals_env/bin/activate    # activate your environment, no need to create a new environment because the Seals tools are installed and isolated here.
[iceberg_seals] $ iceberg_seals.detect --help  # this will display a help screen of available usage and parameters.

Prediction

You can download to your local machine and use scp, ftp, rsync, or Globus to transfer to bridges.

Seals predicting is executed in two steps: First, follow the environment setup commands under 'To test' above. Then create tiles from an input GeoTiff image and write to the output_folder. The scale_bands parameter (in pixels) depends on the trained model being used. The default scale_bands is 299 for the pre-trained model downloaded above. If you use your own model the scale_bands may be different.

[iceberg_seals] $ iceberg_seals.tiling --scale_bands=299 --input_image=<image_abspath> --output_folder=./test

Then, detect seals on each tile and output counts and confidence for each tile.

[iceberg_seals] $ iceberg_seals.predicting --input_image=<image_filename> --model_architecture=UnetCntWRN --hyperparameter_set=A --training_set=test_vanilla --test_folder=./test --model_path=./ --output_folder=./test_image

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

iceberg_seals.search-1.4.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

iceberg_seals.search-1.4-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file iceberg_seals.search-1.4.tar.gz.

File metadata

  • Download URL: iceberg_seals.search-1.4.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.2

File hashes

Hashes for iceberg_seals.search-1.4.tar.gz
Algorithm Hash digest
SHA256 231046dcc621f991c8e04c3f325511cf9aa926eadddec7b3a33b46c5a2bf0d03
MD5 f3f30b6beb9f3192fe5853873ad99816
BLAKE2b-256 116842cb5eef1ad1488ea135b5eeefd65298fd131128ccc6f9404c070081d276

See more details on using hashes here.

File details

Details for the file iceberg_seals.search-1.4-py3-none-any.whl.

File metadata

  • Download URL: iceberg_seals.search-1.4-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.2

File hashes

Hashes for iceberg_seals.search-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 45dbb761e755d0f855ec6b040b34d95cc66bd4d62bc92fccf3720924a1575a5e
MD5 a1c462f12728e5fd9351b704e245c7cd
BLAKE2b-256 7dfe1f594f1b0b244c9b248f97b3fb1ec4cdd303fed348cb5f94a5526218caad

See more details on using hashes here.

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