Second place solution in the Zindi AgriFieldNet India Challenge to classify crop types in agricultural fields across Northern India using multispectral observations from Sentinel-2 satellite. Ensembled weighted tree-based models "LGBM, CATBOOST, XGBOOST" with stratified k-fold cross validation, taking advantage of spatial variability around each field within different distances.
MLHub model id: model_ecaas_agrifieldnet_silver_v1. Browse on Radiant MLHub.
Please review the model architecture, license, applicable spatial and temporal extents and other details in the model documentation.
| Inferencing | Training |
|---|---|
| 30 GB RAM | 30 GB RAM |
First clone this Git repository.
git clone https://github.com/radiantearth/model_ecaas_agrifieldnet_silver.git
cd model_ecaas_agrifieldnet_silver/After cloning the model repository, you can use the Docker Compose runtime files as described below.
Pull pre-built image from Docker Hub (recommended):
docker pull docker.io/radiantearth/model_ecaas_agrifieldnet_silver:1
Or build image from source:
docker build -t radiantearth/model_ecaas_agrifieldnet_silver:1 -f Dockerfile .-
Prepare your input and output data folders. The
data/folder in this repository contains some placeholder files to guide you.- The
data/folder must contain:input/chips/Sentinel-2 10m imagery chips for inferencing:images/Sentinel-2 10m imagery chips for inferencing:- Folder name
chip_ide.g.00c23Sentinel-2 bands 10m:- File name:
B01.tifType=Byte, ColorInterp=Coastal - File name:
B02.tifType=Byte, ColorInterp=Blue - File name:
B03.tifType=Byte, ColorInterp=Green - File name:
B04.tifType=Byte, ColorInterp=Red - File name:
B05.tifType=Byte, ColorInterp=RedEdge - File name:
B06.tifType=Byte, ColorInterp=RedEdge - File name:
B07.tifType=Byte, ColorInterp=RedEdge - File name:
B08.tifType=Byte, ColorInterp=NIR - File name:
B8A.tifType=Byte, ColorInterp=NIR08 - File name:
B09.tifType=Byte, ColorInterp=NIR09 - File name:
B11.tifType=Byte, ColorInterp=SWIR16 - File name:
B12.tifType=Byte, ColorInterp=SWIR22- File Format: GeoTIFF, 256x256
- Coordinate Reference System: WGS84 / UTM
- File name:
- Folder name
fields/Corresponding field ids for each pixel in Sentinel-2 images:- Folder name:
chip_ide.g.00c23Corresponding field ids:- File name:
field_ids.tif - File Format: GeoTIFF, 256x256
- Coordinate Reference System: WGS84 / UTM
- File name:
- Folder name:
/input/checkpoint/the model checkpointlgbms, xgbms, cats. Please note: the model checkpoint is included in this repository.
- The
output/folder is where the model will write inferencing results.
- The
-
Set
INPUT_DATAandOUTPUT_DATAenvironment variables corresponding with your input and output folders. These commands will vary depending on operating system and command-line shell:# change paths to your actual input and output folders export INPUT_DATA="/home/my_user/model_ecaas_agrifieldnet_silver/data/input" export OUTPUT_DATA="/home/my_user/model_ecaas_agrifieldnet_silver/data/output"
-
Run the appropriate Docker Compose command for your system
docker-compose up model_ecaas_agrifieldnet_silver_v1 # If the user is not added to docker group sudo -E docker-compose up model_ecaas_agrifieldnet_silver_v1 -
Wait for the
docker composeto finish running, then inspect theOUTPUT_DATAfolder for results.
Please review the model output format and other technical details in the model documentation.
