Deep learning has proven to be a very powerful tool for all kinds of real life applications in different fields. Object detection has had a great evolution based on deep learning models, where it presents optimistic results to detect and classify objects. The COVID-19 pandemic causes a global health crisis that impacts all aspects of life. One of the effective protection methods is to use a mask in public areas according to the World Health Organization (WHO), for this reason the objective of this article is to implement a lightweight and efficient model to classify images in real time in embedded systems and determine whether or not they have a mask. In the article, three models are proposed to evaluate their execution when implemented in Raspberry Pi.