  The most widely used method for obtaining high-quality two-dimensional
materials is through mechanical exfoliation of bulk crystals. Manual
identification of suitable flakes from the resulting random distribution of
crystal thicknesses and sizes on a substrate is a time-consuming, tedious task.
Here, we present a platform for fully automated scanning, detection, and
classification of two-dimensional materials, the source code of which we make
openly available. Our platform is designed to be accurate, reliable, fast, and
versatile in integrating new materials, making it suitable for everyday
laboratory work. The implementation allows fully automated scanning and
analysis of wafers with an average inference time of 100 ms for images of 2.3
Mpixels. The developed detection algorithm is based on a combination of the
flakes' optical contrast toward the substrate and their geometric shape. We
demonstrate that it is able to detect the majority of exfoliated flakes of
various materials, with an average recall (AR50) between 67% and 89%. We also
show that the algorithm can be trained with as few as five flakes of a given
material, which we demonstrate for the examples of few-layer graphene, WSe$_2$,
MoSe$_2$, CrI$_3$, 1T-TaS$_2$ and hexagonal BN. Our platform has been tested
over a two-year period, during which more than $10^6$ images of multiple
different materials were acquired by over 30 individual researchers.
