Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference in root path folder seems to be wrong #51

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Patient Face Detection - POC</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<title>Patient Face Detection - POC</title>
<script defer src="face-api.min.js"></script>
<script defer src="script.js"></script>
<style>
Expand All @@ -26,4 +27,4 @@
<body>
<video id="video" width="720" height="560" autoplay muted></video>
</body>
</html>
</html>
10 changes: 5 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const video = document.getElementById('video')

Promise.all([
faceapi.nets.tinyFaceDetector.loadFromUri('/models'),
faceapi.nets.faceLandmark68Net.loadFromUri('/models'),
faceapi.nets.faceRecognitionNet.loadFromUri('/models'),
faceapi.nets.faceExpressionNet.loadFromUri('/models')
faceapi.nets.tinyFaceDetector.loadFromUri('./models/tiny_face_detector_model-weights_manifest.json'),
faceapi.nets.faceLandmark68Net.loadFromUri('./models/face_landmark_68_model-weights_manifest.json'),
faceapi.nets.faceRecognitionNet.loadFromUri('./models/face_recognition_model-weights_manifest.json'),
faceapi.nets.faceExpressionNet.loadFromUri('./models/face_expression_model-weights_manifest.json')
]).then(startVideo)

function startVideo() {
Expand All @@ -28,4 +28,4 @@ video.addEventListener('play', () => {
faceapi.draw.drawFaceLandmarks(canvas, resizedDetections)
faceapi.draw.drawFaceExpressions(canvas, resizedDetections)
}, 100)
})
})