This project contains end to end Python samples and Jupyter notebooks which demonstrate creating farms, boundaries, ingesting satellite and weather data, and building Machine Learning (ML) models related to agricultural applications. It also contains a set of utilities for data processing.
These samples leverage Azure FarmBeats and its corresponding Python SDK and it runs on Azure Machine Learning Compute.
To run these samples, you must have:
- Azure subscription - Create a free account
- Azure FarmBeats resource - Install FarmBeats
- A subscription with one of the supported weather data providers for FarmBeats - Weather Integration Docs
- Azure Machine Learning (AML) compute resource - Create AML Compute (with Python 3.6)
This project aims to demonstrate following:
quick_start.ipynbnotebook demonstrates how to create farms, boundaries, and ingestion jobs for satellite and weather data. A satellite ingestion job ingests satellite data (from Sentinel-2) to Azure FarmBeats data store for a given area of interest(AOI) and duration. Similarly, weather job ingests data into Azure Farmbeats store from weather data providers (example: DTN ClearAg, DTN Content Services)
- An end to end ML model sample that demonstrates how to pull satellite and weather data for any number of farms using Azure FarmBeats SDK, how to create analysis ready datasets (ARD), ML model building, training and deploying ML model to Azure using Azure Machine Learning.
| Notebook | Description |
|---|---|
1_download_data.ipynb |
This notebook demonstrates how to download satellite and weather data for given boundaries to build NDVI forecast model. |
2_train.ipynb |
This notebook demonstrates building end to end deep learning model using satellite and weather data. |
3_test.ipynb |
In this notebook, the model forecasts NDVI for next 10 days for an 'Area of Interest' (AOI). |
4_deploy_azure.ipynb |
This notebook demonstrates how to deploy model and create webservice using Azure ML SDK. |
5_inference.ipynb |
This notebook demonstrates model inference on a new AOI using the AzureML webservice endpoint and generates NDVI forecast for the next 10 days. |
- Launch the terminal of AML compute.
- Run the following command
git clone https://github.com/Azure-Samples/azure-farmBeats-samples. - Open Azure Command Line Interface (CLI) and execute following commands to create an environment with all required libraries.
a.cd azure-farmbeats-samples(Go to azure-farmbeats-samples folder)
b.conda env create -f environment.yml(Create a new environemt 'farmbeats-sdk-env' with all required packages)
c.conda activate farmbeats-sdk-env
d.python -m ipykernel install --user --name=farmbeats-sdk-env(Activate the farmbeats-sdk-env' kernel in AML. Each notebook should select this kernel before running) - Go to
Notebookspane and click on folderazure-farmbeats-samplesunder your alias. - Select
computeandjupyter kernel("farmbeats-sdk-env"). - Update
utils/config.pywith FarmBeats credentials. - Go to folder
ndvi_forecastand run the notebooks enumerated in the table above starting with1_download_data.ipynb.
Please refer to CONTRIBUTING.md