  In this paper we propose a fully-supervised pretraining scheme based on
contrastive learning particularly tailored to dense classification tasks. The
proposed Context-Self Contrastive Loss (CSCL) learns an embedding space that
makes semantic boundaries pop-up by use of a similarity metric between every
location in an training sample and its local context. For crop type semantic
segmentation from satellite images we find performance at parcel boundaries to
be a critical bottleneck and explain how CSCL tackles the underlying cause of
that problem, improving the state-of-the-art performance in this task.
Additionally, using images from the Sentinel-2 (S2) satellite missions we
compile the largest, to our knowledge, dataset of satellite image timeseries
densely annotated by crop type and parcel identities, which we make publicly
available together with the data generation pipeline. Using that data we find
CSCL, even with minimal pretraining, to improve all respective baselines and
present a process for semantic segmentation at super-resolution for obtaining
crop classes at a more granular level. The proposed method is further validated
on the task of semantic segmentation on 2D and 3D volumetric images showing
consistent performance improvements upon competitive baselines.
