Skip to main content

Code style: black

CropMask is a project to train and deploy instance segmentation models for mapping center pivot agriculture from multispectral satellite imagery. It extends matterport's module , which is an implementation of Mask R-CNN on Python 3, Keras, and TensorFlow. CropMask work with multispectral satellite imagery, contains infrastructure-as-code via terraform to provision a testing cluster on Azure, and will eventually contain a Leaflet or OpenLayers web app to expose maps of crop water use in drylands across the globe.

See matterport's mrcnn repo for an explanation of the Mask R-CNN architecture and a general guide to notebook tutorials and notebooks for inspecting model inputs and outputs.

For an overview of the project in poster form, see this poster I presented at the Fall 2018 Meeting on Center Pivot Crop Water Use.

Below are Preliminary results from test on 2004 Landsat SR scene over western Nebraska. Detections are in Red, Targets from the Nebraska Department of Agriculture are in Green. Metrics are (probability score)/(intersection over union) Center Pivot Detections

Local Installation of cropmask dependencies, see terraform/ folder for instructions to set up azure components.

  1. Install dependencies and install the package

    conda env create -f cropmask-env.yml
    python setup.py install # use develop instead of install for editable mode
    
  2. Create a file called .lsru at ~ and fill in your NASA Earth Explorer Login credentials

    [usgs]
    username=
    password=
    
  3. Copy the azure_configs_template.yaml, name it azure_configs.yaml and place it outside of the git repository (so you don't accidently commit it). Fill it in according to the comments int he template.

  4. Download the National WBD Dataset

  5. Find the watershed you'd like to get Landsat imagery for with this tool. Make note of the HUC ID and the HUC level (the number of digits in the HUC ID) and put these in your azure_config.yaml file

  6. Download pre-trained COCO weights (mask_rcnn_coco.h5) from the releases page.

  7. (Optional) To train or test on MS COCO install pycocotools from one of these repos. They are forks of the original pycocotools with fixes for Python3 and Windows (the official repo doesn't seem to be active anymore).

  8. To train using labels from the Nebraska 2005 Center Pivots Dataset and define the projection as Nebraska State Plane NAD 1983 in US Feet, which is EPSG code 102704

This setup will allow you to run the parts of the project that don't require Azure, like locally downloading Landsat products according to watershed boundaries. For instructions on setting up the entire project on Azure, see the README in the terraform folder

Metadata

Release files for cropmask 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cropmask 0.1
File Size Uploaded Provenance Actions
cropmask-0.1.tar.gz 25.3 MB Without provenance Details for cropmask-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cropmask 0.1
File Interpreter ABI Platform Actions
cropmask-0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for cropmask-0.1-py2.py3-none-any.whl

Total release size: 25.6 MB

Release files / cropmask-0.1.tar.gz

Download URL cropmask-0.1.tar.gz
Size 25.3 MB
Tags Source
SHA-256 checksum
How to use checksums
e5fdca49aa731a06dfb33a6db42550128f97a9573413f738d0e90dcba821b726
BLAKE2b-256 checksum
How to use checksums
7ce5ee15c4dbbf374dcd61a52493f2b1dd16cdbd8b630b5898258a6edf05908a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.22.0

Release files / cropmask-0.1-py2.py3-none-any.whl

Download URL cropmask-0.1-py2.py3-none-any.whl
Size 291.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f196d8520cec961375172d4b9dc19773df207c681542932514fcff7e75d02c04
BLAKE2b-256 checksum
How to use checksums
141193b686fb899fd80c296f9f93f168776564b6858044c0039ff2d5a45b0649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.22.0

Security for cropmask 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page