  Contrastive learning has recently demonstrated superior performance to
supervised learning, despite requiring no training labels. We explore how
contrastive learning can be applied to hundreds of thousands of unlabeled Mars
terrain images, collected from the Mars rovers Curiosity and Perseverance, and
from the Mars Reconnaissance Orbiter. Such methods are appealing since the vast
majority of Mars images are unlabeled as manual annotation is labor intensive
and requires extensive domain knowledge. Contrastive learning, however, assumes
that any given pair of distinct images contain distinct semantic content. This
is an issue for Mars image datasets, as any two pairs of Mars images are far
more likely to be semantically similar due to the lack of visual diversity on
the planet's surface. Making the assumption that pairs of images will be in
visual contrast - when they are in fact not - results in pairs that are falsely
considered as negatives, impacting training performance. In this study, we
propose two approaches to resolve this: 1) an unsupervised deep clustering step
on the Mars datasets, which identifies clusters of images containing similar
semantic content and corrects false negative errors during training, and 2) a
simple approach which mixes data from different domains to increase visual
diversity of the total training dataset. Both cases reduce the rate of false
negative pairs, thus minimizing the rate in which the model is incorrectly
penalized during contrastive training. These modified approaches remain fully
unsupervised end-to-end. To evaluate their performance, we add a single linear
layer trained to generate class predictions based on these
contrastively-learned features and demonstrate increased performance compared
to supervised models; observing an improvement in classification accuracy of
3.06% using only 10% of the labeled data.
