  Brain tumor is a common and fatal form of cancer which affects both adults
and children. The classification of brain tumors into different types is hence
a crucial task, as it greatly influences the treatment that physicians will
prescribe. In light of this, medical imaging techniques, especially those
applying deep convolutional networks followed by a classification layer, have
been developed to make possible computer-aided classification of brain tumor
types. In this paper, we present a novel approach of directly learning deep
embeddings for brain tumor types, which can be used for downstream tasks such
as classification. Along with using triplet loss variants, our approach applies
contrastive learning to performing unsupervised pre-training, combined with a
rare-case data augmentation module to effectively ameliorate the lack of data
problem in the brain tumor imaging analysis domain. We evaluate our method on
an extensive brain tumor dataset which consists of 27 different tumor classes,
out of which 13 are defined as rare. With a common encoder during all the
experiments, we compare our approach with a baseline classification-layer based
model, and the results well prove the effectiveness of our approach across all
measured metrics.
