This repository presents the 15th place solution for the Zindi GEO-AI Challenge for Cropland Mapping by ITU that achieved 0.910476190 accuracy on the private leaderboard. This self-contained notebook is designed for an end-to-end experience without the need for additional files. It was developed on Google Colaboratory, where most dependencies are pre-installed. However, a few setup steps are required before you can start. You can find detailed instructions within the notebook:
- Install Optuna (a library for hyperparameter tuning)
- Have a Google Earth Engine (GEE) account, as you'll be prompted to access it at certain points.
- Connect the notebook to your Google Drive.
The GEO-AI Challenge for Cropland Mapping competition addresses a binary crop classification problem. The provided datasets consist of two CSV files: train.csv and test.csv. Train.csv contains data points with unique IDs, longitude, latitude, and target labels (0 or 1). The data points in both the training and testing datasets belong to three countries: Afghanistan, Sudan, and Iran, with equal representation in both files (500 points per country). The competition's goal is to classify crops as either 0 or 1, based on publicly available satellite data, using latitude, longitude, and ID.
The main tasks performed here are:
- Datset Preprocessing
Data preprocessing includes retrieving S2 SR Harmonized publicly available data from Google Earth Engine (GEE) for each country. The time window for data retrieval is specified by the competition as follows: Afghanistan: {Train/Test: April 2022} Sudan/Iran: {Train/Test: July 2019 - June 2020} A buffer was added to each data point to ensure more consistent and harmonized datasets. The datasets were prepared as a monthly aggregates to mitigate data gaps due to clouds and reduce the computational load. This is particularly important since there is a feature engineering step that follows where more features will be added.
2. Feature Engineering
In addition to the S2 optical bands (B2, B3, B4, B5, B6, B7, B8, B8A, B11, B12), I included common vegetation indices (NDVI, NDWI, SAVI, EVI, NDRE, CC). These features were added to potentially help differentiate between the two different crops and, possibly, based on the country. I computed each of these features (bands and vegetation indices) on a monthly basis within the specified time window.
3. Feature Selection
To reduce the number of input features, eliminate noise, and prevent unnecessary computational overhead, I used the Boruta algorithm. This method retains the most significant features for each country separately. Detailed explanations can be found in the notebook.
4. Baselines Evaluation
In this section, a pool of well-known baseline classfiers are selected and compared using 5-fold cross-validation on the train dataset for each country separetly. This is essentially to gauge out the most promissing models and assess their learning potential from the dataset.
5. Hyperparameter Tuning
Based on the baseline models evaluation, the best model was selected for further hyperparamter tuning using Optuna and 5-fold cross-validation for each country separetly. Further details are provided in the notebook.
6. Training and Evaluation
The best model with the best hyperparameters for each country are trained using the corresponding country training data.
7. Prediction and Submission
Once the models are trained, they are used to make predictions using the test.csv file for each country. The predictions are then merged to create the final submission.