All Projects → zamhown → Wear A Mask

zamhown / Wear A Mask

Licence: mit
😷 An SPA that uses only the front-end to perform deep-learning-based facial landmark detection on images and automatically adds breathing mask stickers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Wear A Mask

Pencil.js
✏️ Nice modular interactive 2D drawing library
Stars: ✭ 204 (-9.73%)
Mutual labels:  canvas
Whitebird
Open-Source, collaborative, digital Whiteboard
Stars: ✭ 209 (-7.52%)
Mutual labels:  canvas
Watermark
canvas图片水印,用于身份证等个人信息添加仅用于XXX等字样保护个人信息
Stars: ✭ 219 (-3.1%)
Mutual labels:  canvas
Picasso
Picasso is a high quality 2D vector graphic rendering library. It support path , matrix , gradient , pattern , image and truetype font.
Stars: ✭ 205 (-9.29%)
Mutual labels:  canvas
Face.evolve.pytorch
🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥
Stars: ✭ 2,719 (+1103.1%)
Mutual labels:  face-detection
Flvplayer
🍭 FlvPlayer.js is a JavaScript player for decode flv to the canvas
Stars: ✭ 210 (-7.08%)
Mutual labels:  canvas
Face toolbox keras
A collection of deep learning frameworks ported to Keras for face analysis.
Stars: ✭ 202 (-10.62%)
Mutual labels:  face-detection
Wxa Plugin Canvas
小程序海报组件-生成朋友圈分享海报并生成图片
Stars: ✭ 2,692 (+1091.15%)
Mutual labels:  canvas
Wxa Comp Canvas Drag
小程序组件-canvas拖拽组件
Stars: ✭ 208 (-7.96%)
Mutual labels:  canvas
Rembrandt
Image comparison using node-canvas
Stars: ✭ 216 (-4.42%)
Mutual labels:  canvas
React Financial Charts
Charts dedicated to finance.
Stars: ✭ 201 (-11.06%)
Mutual labels:  canvas
Canvas2dtowebgl
Ports (almost) all Canvas2D functions to the GPU so it can be mixed with a WebGL canvas.
Stars: ✭ 206 (-8.85%)
Mutual labels:  canvas
Paddledetection
Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Stars: ✭ 5,799 (+2465.93%)
Mutual labels:  face-detection
Demos
One repo to rule them all.
Stars: ✭ 204 (-9.73%)
Mutual labels:  canvas
Ui
Open source wireframing tool written in typescript, react and redux.
Stars: ✭ 218 (-3.54%)
Mutual labels:  canvas
Face Dataset
Face related datasets
Stars: ✭ 204 (-9.73%)
Mutual labels:  face-detection
S3fd.pytorch
SFD implement with pytorch
Stars: ✭ 212 (-6.19%)
Mutual labels:  face-detection
Ownphotos
Self hosted alternative to Google Photos
Stars: ✭ 2,587 (+1044.69%)
Mutual labels:  face-detection
Openseeface
Robust realtime face and facial landmark tracking on CPU with Unity integration
Stars: ✭ 216 (-4.42%)
Mutual labels:  face-detection
Easy Canvas
使用render函数在canvas中创建文档流布局,小程序海报图、小程序朋友圈分享图。easy-canvas is a powerful tool helps us easy to layout with canvas.
Stars: ✭ 216 (-4.42%)
Mutual labels:  canvas

logo

Wear a Mask on Your Avatar

A single-page application that uses only the front-end to perform deep-learning-based facial landmark detection on images and automatically adds breathing mask stickers.
Wear a mask on your SNS avatars, just make more people aware of epidemic diseases and public health!

Application link: https://zamhown.github.io/wear-a-mask
Application link (Chinese version): https://zamhown.gitee.io/wear-a-mask

中文版ReadMe

Usage

After the user uploads his or her avatar, the page will automatically detect the face in the picture, and identify the key points to match the most suitable mask sticker. Then the user can change the position, size, rotation angle and flip of the sticker in an editor implemented by canvas, and then export the modified avatar. The entire process is performed on the front end, and the pictures do not need to be uploaded to the server.

Usage case screenshot:
example

Face Detection and Facial Landmark Detection

The project uses face-api.js which is based on TensorFlow.js.
The face detection task uses the SSD MobileNet V1 model (trained with the WIDERFACE dataset), and the facial landmark detection task uses a 68-point CNN-based detection model built by the author of face-api.js (the training dataset contains about 35,000 facial images). The models' weight data comes from face-api.js.

Automatic Selection and Positioning of Mask Stickers

The project contains several mask sticker images and data for each mask. Three key points were marked on each mask sticker (upper left corner, upper right corner, and bottom of chin). After detecting the landmarks on the user's avatar, the mask sticker that best matches the face shape can be automatically selected based on these data. After calculating the corresponding geometric transformation, the sticker image will be put in the appropriate position on the avatar.
mask example

Image Editor With Sticker Editing Function

The image editor for this project is implemented using canvas, based on the npm package xl_canvas. Because the package can not be used directly, it was deeply modified, and a series of functions such as flip, touch support, and export at the original resolution were added and finally integrated into the project.

Commands

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

Run build.bat.


Have fun!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].