The fast advancement of computer vision allows for human-computer interaction and has a broad range of applications. Since the first instance of COVID-19 was discovered, the worldwide battle against the pandemic has started. People's everyday actions, in addition to different research and conclusions by medical and healthcare professionals, have become critical in fighting the pandemic. In China, the government has adopted active and effective isolation and closure measures, as well as active public collaboration, such as making it unnecessary to remain inside and wear masks. China, the nation where the pandemic initially broke out, has now established itself as the world's model for epidemic prevention. Of course, people wearing masks deliberately isn't enough. Wearing masks in public areas still requires supervision. Real-world applications utilizing deep learning use deep learning as a critical component. Object detection is extremely important. currently, deep learning detection models and algorithms are using object recognition as their objective, which has achieved tremendous success in finding the object from an image. As this is the era of the COVID-19 virus, people frequently wear masks to cover themselves to minimize the transmission of the coronavirus. Because some portions of the face are concealed, this makes face identification is a very challenging job. In certain cases, traditional facial recognition technology is still inadequate, so it is very urgent to improve the recognition efficiency of the existing face recognition technology on masked faces, as masks are part of life from now for the next two to three years. This study proposes that, in this process, manual inspection be replaced with a deep learning method, and that YOLOV5, the most powerful objection detection algorithm currently available, be used to better apply it in the real world. For this study, First, we use the YOLO V5 to detect face masks. Using Face Net’s trained model, we looked at the images to determine whether the subjects were wearing masks or not. Two separate medical face mask datasets have been brought together in one dataset for research purposes. Mean IoU has been utilized to determine the best number of anchor boxes, hence improving the object detection process. The results showed that the Adam optimizer got an average of 81% accuracy. Finally, a related conclusion is offered in the research as a comparison study. The new detector outperformed related work in terms of accuracy and precision.