The COVID-19 pandemic of the coronavirus is a serious health threat. Governments are taking specific protections, including lockdowns and the need that face masks to be used. Wearing a protective cover is one of the most efficient ways to fight the disease. Due to this reason, offerings are the detection of face masks that can be utilized by specialists to create moderation, prevention, and assessment. According to the recommendations of the World Health Organization (WHO), the best important prevention strategy is using a facial mask. Hence, the need of wearing a mask is so important to save our lives and also protect others appropriately in open places including shopping malls and general stores. Reports demonstrate that face mask wearing whereas at work clearly diminishes the chance of spread. This paper presents a rearranged approach to obtain this reason by utilizing machine learning for detecting face masks. A dataset is utilized to construct this detector of the face mask. Via computer vision techniques and algorithms using deep learning the goal can be achieved. It includes the architecture of the MobileNet model that is trained with Tensorflow and Keras libraries. In this paper, Jetson tx2 was utilized to implement a real-time face masks automatic detection that is embedded and powerful, running on an embedded system at a higher frames-per-second rate (FPS) based on IoT. The proposed system aids in monitoring, taking images, and identifying persons who were not wearing masks. Additionally, we employed IoT strategies to transmit the images and alerts to the closest police station so that forfeit could be applied when it discovered unmasked persons. We used an actual dataset to train our model, and this improvement makes the recommended approach possible to seek a high level of accuracy rate of unmasking people our model trained on the real datasets and this improvement makes the proposed model urge a high accuracy in the detection of unmasking persons.