Project · 2025 · completed · Academic
SITS-BERT crop mapping
Self-supervised pretraining and fine-tuning of a temporal Transformer for crop classification from Sentinel-2 time series.
Problem
Crop mapping from satellite imagery depends on spectral changes across an entire growing season, not on a single image. Labeled agricultural time series are expensive to obtain, and cloud cover, irregular acquisition dates, and varying sequence lengths complicate training. The project studies whether self-supervised temporal representations can reduce this dependency on labels.
Approach
SITS-BERT is first pretrained on more than 1.2 million TimeSen2Crop sequences by masking observations and reconstructing their spectral-temporal content. The pretrained encoder is then fine-tuned on the California Labeled dataset for 13-class crop and land-cover classification. Separate experiments compare the original ten-band configuration, a six-band configuration, and six bands with data augmentation.
Technical implementation
The notebooks normalize Sentinel-2 reflectance, add day-of-year information, and trim or zero-pad every sequence to 24 dates. Training and evaluation run in PyTorch on Kaggle, with reusable checkpoints stored for pretraining and fine-tuning. The project reports overall accuracy, average accuracy, Cohen’s kappa, and confusion matrices. The six-band baseline reached 86.57% overall accuracy; augmentation raised it to 94.34%, compared with 94.18% for the ten-band reproduction.
sequence = pad_or_crop(spectral_bands, length=24)
masked_sequence, mask = random_mask(sequence)
representation = sits_bert(masked_sequence, day_of_year)
loss = reconstruction_loss(representation[mask], sequence[mask])