A preliminary face mask usage recognition code using OpenCV. It detects correct, wrong, and non face mask usage.
In order to make the train correctly, you need a folder named dataset, for example. In dataset, you should have 3 folders named Correctly_usage, Incorrectly_usage, No_usage (for example again). In each folder you should upload images of people using face mask accoring to its folder name (for example Correctly_usage folder should have images of people using the face mask correctly). The amount of images should be at least of 350-400 images in order to have an acceptable precision. You can modify the code as you want, the lines are almost self explicatory and can even add another category and folder to be taken on count!