Since the outbreak of COVID-19, wearing masks outside has become a daily habit. In view of the current problems of low accuracy and lack of non-standard detection of mask wearing, a detection method for mask wearing based on key points is proposed. First, the YOLOv7_tiny algorithm is used to detect whether the face is wearing a mask, and the resulting ROI (Region of Interest) is scaled to a fixed size. Then, the key point detection algorithm was adopted to extract 68 key points of the face from the ROI region, and the image segmentation of the mask area is performed simultaneously. Finally, the correspondence between face landmarks and the mask area is used to assess whether the mask is worn correctly. The experimental results show that the average detection speed of this method in the natural environment is about 14FPS, the mAP (mean Average Precision) of whether to wear a mask is 66.34%, and the detection accuracy of whether to wear a mask is 96%, which can effectively meet the actual application requirements.