Face Mask Detection
MakeCode Programming Tutorial
Extension link: https://github.com/KittenBot/pxt-koi2
Search for KOI2 in the search bar, select KOI 2.(KOI 2 has been approved by Microsoft)
![](https://sharinghub-eng.kittenbot.hk/~gitbook/image?url=https%3A%2F%2F686851495-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7Bv9xBdKh3R9w6Vp7asd%252Fuploads%252Fl4LAJvAYYE9RTHdxFSja%252FlALPGTO6sYhE8bbNAo7NBVw_1372_654.png%3Falt%3Dmedia%26token%3Dfcce3ddf-c398-4075-9248-bba1b14267cd&width=768&dpr=4&quality=100&sign=951555fd&sv=1)
The extension will be imported into your project.
Coding Blocks
![](https://sharinghub-eng.kittenbot.hk/~gitbook/image?url=https%3A%2F%2F686851495-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7Bv9xBdKh3R9w6Vp7asd%252Fuploads%252FTh6cdY5T5c9FnTcqHeWe%252Fimage.png%3Falt%3Dmedia%26token%3D8d03bc36-99b5-4993-a990-0651ade196d4&width=768&dpr=4&quality=100&sign=9b1a1426&sv=1)
Sample Program
Armourbit users need to use the corresponding initialization block
![](https://sharinghub-eng.kittenbot.hk/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F6uJvpXC43onNIIwhMlWo%252Fuploads%252FPGyECwlPd2M3JqUBLDfO%252Fimage.png%3Falt%3Dmedia%26token%3D662ace3f-a8eb-4fbf-8a10-1d9643c88b1e&width=768&dpr=4&quality=100&sign=1ce25def&sv=1)
Sample Program Operations
KOI automatically detects faces.
If the detected face is wearing a mask, a tick icon is shown on the Micro:bit.
If the detected face is not wearing a mask, a cross icon is shown on the Micro:bit.
Last updated