Skip to main content

Package to classify crops based on sentinel images.

Project description

Crop classification

This is a collection of scripts that can help to classify crops using Sentinel data.

Probably this documentation won't suffice to get you started, but you are free to reach out for more info if you are really interested.

In general, you should also be aware that the package isn't really meant to be an easy-to-use solution for crop classification. It is rather a quite specialised solution for our specific needs. Nonetheless we want to make the code public so if anyone is interested, they can have a look and possibly get some inspiration.

Installation manual

  1. Install conda

As the scripts are written in Python, you need to use a package manager to be able to install the packages the scripts depend on. The rest of the installation manual assumes you use anaconda and python 3.6+. The installer for anaconda can be found here: https://www.anaconda.com/download/.

  1. Create new environment and install dependencies

Once you have anaconda installed, you can open an anaconda terminal window and follow the following steps:

  1. Create and activate a new conda environment
  ```
  conda create --name cropclassification python=3.6
  conda activate cropclassification
  ```
  2. Install the dependencies for the crop classification scripts:
  ```
  conda install scikit-learn keras tensorflow rasterio rasterstats geopandas pyarrow psutil
  ```
  3. If it was the first time you installed anaconda/geopandas, you might have to restat your computer to proceed
  4. Start the anaconda terminal window again and activate the environment
  ```
  conda activate cropclassification
  ```
  5. Now install cropclassification with pip
  ```
  pip install cropclassification
  ```
  1. Calculate time series

To calculate time series, you need to run cropclassification -t <tasks_dir>, with a 'calc_timeseries' type of task in the tasks dir on a server that has access to sentinel CARD images.

Mind: the sentinel CARD image structure as expected for timeseries calculation depends on the image type:

  • for Sentinel 2 images this is the standard S2 L2A format as available on the open acces copernicus hub.
  • for Sentinel 1 backscatter and sentinel 1 coherence data this is a non-standardized data structure as there isn't a standard format (yet) for level 2 processed sentinel 1 images (as far as I know). Check out the code to see the expected data structure ;-).
  1. Start a crop classification

Run cropclassification -t <tasks_dir>, with a 'calc_marker' type of task in the tasks dir.

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

cropclassification-0.0.11.tar.gz (83.3 kB view details)

Uploaded Source

Built Distribution

cropclassification-0.0.11-py3-none-any.whl (96.7 kB view details)

Uploaded Python 3

File details

Details for the file cropclassification-0.0.11.tar.gz.

File metadata

  • Download URL: cropclassification-0.0.11.tar.gz
  • Upload date:
  • Size: 83.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for cropclassification-0.0.11.tar.gz
Algorithm Hash digest
SHA256 e6675d367d8c58bcf86e80e5e031edeab817ae0d50cccb683e9c27c9c4675d38
MD5 dcce9ef1dfe62e45969582e76a5111b1
BLAKE2b-256 37825031aa07095504c888c5d63bed244aa018a88053e3f3ce44d8068c3ddb49

See more details on using hashes here.

File details

Details for the file cropclassification-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: cropclassification-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 96.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for cropclassification-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 5c861b2423b19610b4391f8795ff4139990213c4818030685ee2541de956206e
MD5 49fc063fdffe684604d45d874ea6fd95
BLAKE2b-256 c7d98e1b4559f90e9f3e36780c47fb5a07532483142597fb40a1b5b40a93d39e

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