import { Component } from '@angular/core';
// import * as faceapi from '@vladmandic/face-api';
declare const faceapi:any

@Component({
  selector: 'app-page-faceapi',
  templateUrl: './page-faceapi.component.html',
  styleUrls: ['./page-faceapi.component.scss']
})
export class PageFaceapiComponent {

  constructor(){

  }

  async getFace68Points(){
    await faceapi.nets.ssdMobilenetv1.loadFromUri('/assets/model')
    let input:any = document.createElement("input")
    input.src = "/assets/model/face.jpg"

    setTimeout(async () => {
      let detections = await faceapi.detectAllFaces(input)
      console.log(detections)
    }, 500);
  }
}
