Skip to content

Commit

Permalink
Update faceapi-recognition_esp32cam_stream.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Oct 10, 2023
1 parent 8686478 commit 7168583
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ window.onload = function () {
facelabels = document.getElementById('facelabel_faceapirecognize').innerHTML;
facelabels = facelabels.split(";");

ShowImage.src = window.location.hostname+':81/?stream';
ShowImage.style.visibility = "visible";

ShowImage.onload = function () {
DetectImage();
}

Promise.all([
faceapi.nets.faceLandmark68Net.load(modelPath),
faceapi.nets.faceRecognitionNet.load(modelPath),
faceapi.nets.ssdMobilenetv1.load(modelPath)
]).then(function(){
ShowImage.style.visibility = "hidden";
DetectImage();
ShowImage.src = window.location.hostname+':81/?stream';
})

async function DetectImage() {
Expand Down

0 comments on commit 7168583

Please sign in to comment.