JSFiddle - React, Tailwind, and code Playground

by Seetpal Singh

HTML

<canvas width="700" height="650" style="z-index:1;position:relative">
</canvas>

<img id="image">

JavaScript

var canvas1 = $('canvas').get(0);
var ctx = canvas1.getContext('2d');

/* Face detection box before, this should be replaced by output from face-api.js */
var box_x = 113;
var box_y = 154.82;
var box_width = 240;
var box_height = 289.18;

/* Crop the profile image based on face api positions */
var image = new Image();

image.src =...