Looking further: a crop type classification model for fields
In the Zindi AgriFieldNet India Challenge
this was the third place solution by the team
re-union in the final round to classify crop
types in agricultural fields across Northern India using multispectral
observations from Sentinel-2 satellite.
MLHub model id:
model_ecaas_agrifieldnet_bronze_v1. Browse on Radiant MLHub.
ML Model Documentation
Please review the model architecture, license, applicable spatial and temporal extents and other details in the model documentation.
|12 GB RAM||30 GB RAM|
Get Started With Inferencing
First clone this Git repository.
Please note: this repository uses
Git Large File Support (LFS) to include the
model checkpoint file. Either install
git lfs support for your git client,
use the official Mac or Windows GitHub client to clone this repository.
⚡ Shell commands have been tested with Linux and MacOS but will differ on Windows, or depending on your environment.
git clone https://github.com/radiantearth/model_ecaas_agrifieldnet_bronze.git cd model_ecaas_agrifieldnet_bronze/
After cloning the model repository, you can use the Docker Compose runtime files as described below.
Pull or Build the Docker Image
Pull pre-built image from Docker Hub (recommended):
docker pull docker.io/radiantearth/model_ecaas_agrifieldnet_bronze:1
Or build image from source:
cd docker-services/ docker build -t radiantearth/model_ecaas_agrifieldnet_bronze:1 .
Run Model to Generate New Inferences
Prepare your input and output data folders:
data/inputfolder in this repository contains some placeholder files to guide you. The input data should follow the following convention. It should be placed in a directory named
xxxis arbitrary and
<tile_id>represents the id of the tile stored in that directory.
Here is a sample for reference.
data/input/data_001c1 data/input/data_004fa data/input/data_005fe data/input/source_001c1 data/input/source_0023c data/input/source_004fa
These directories will contain tiff files for three tiles (id
005fe). It does not matter where the bands or field ids are, but note that the directory must split on
_and the last portion must be the tile id. This is in accordance with the competition data.
output/folder is where the model will write inferencing results.
OUTPUT_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_bronze/data/input/" export OUTPUT_DATA="/home/my_user/model_ecaas_agrifieldnet_bronze/data/output/" export MODELS_DIR="/home/my_user/model_ecaas_agrifieldnet_bronze/models" export WORKSPACE_DIR="/home/my_user/model_ecaas_agrifieldnet_bronze/workspace"
Run the appropriate Docker Compose command for your system:
cd docker-services/ docker compose up model_ecaas_agrifieldnet_bronze_v1
Wait for the
docker composeto finish running, then inspect the
OUTPUT_DATAfolder for results.
Understanding Output Data
Please review the model output format and other technical details in the model documentation.