Radiant Earth Spot the Crop Challenge
Based on time-series of Sentinel-2 satellite images can you classify crop types in South Africa?
$8 800USD
Ended over 1 year ago
101 active · 536 enrolled
South Africa
Earth Observation
3rd place solution
Notebooks · 8 Dec 2021, 09:52 · 5

Many thanks to Zindi and other organizers for this exciting challenge.

Solution Approach

Data Download and Manipulation

  • Images were downloaded in batches to avoid out of memory error as colab TPU has a maximum of 35gb RAM
  • The images were zipped and stored in google drive.
  • Images with a 10 day frequency were used to get the raw image pixels
  • Images at the start and end of every month were also processed to raw numpy values
  • Pyspark was used to get the mean of the pixel values for each field. Pyspark was utilised becaused the data was quite huge and because of limited compute resources.

Feature Engineering and Preprocessing

  • Removed skewness using square root
  • Vegetation indices calculations
  • Vegetation Indices aggregation - mean
  • Vegetation indices differences between different periods
  • Quantiles
  • Filled missing and infinite numbers with -999999

Model Training

  • Catboost classifier trained on vegetation indices data using a 10 stratified cross validation strategy
  • LGBM classifier trained on vegetation indices data using a 10 stratified cross validation strategy
  • A pytorch classifier trained on raw image pixels.

Final Model

  • The final model is an ensemble of boosting trees i.e LGBM and catboost and a PyTorch classifier

Link to solution: https://github.com/DariusTheGeek/Radiant-Earth-Spot-the-Crop-Challenge

Discussion 5 answers

Thank you for sharing this!!

This is a great wealth of knowledge, congrat!!!

8 Dec 2021, 10:18
Upvotes 0

Thank you for sharing, was in a learning phase block and just got the starting points from the shared resources

8 Dec 2021, 10:31
Upvotes 0

@Brainiac Congrats and thanks for sharing. Intresting approach, but for weights of models in ensemble, is there any approach to choice them because anyone can try different weights randomly to adjust the predictions of model and improve the score becaue I see the summation of weights could be more than 1.

Thank you @masawdah. The weights were selected based on the models' local cv and leaderboard score.

All weights add up 1.

ensemble = (((catboost.iloc[:, 1:].values * 0.7) + (lgbm.iloc[:, 1:].values * 0.3))*0.5) + (pytorch.iloc[:, 1:].values * 0.5)

(model1 * 0.7 + model2 * 0.3) * 0.5 + (model3 * 0.5)

@Brainiac so the selected weights it is subjective more than objective, it comes with experience. Thanks for your reply and congrats again :)