From e220a154eadb9aa1e4ee5d3c9f6b7ca98a63fe7a Mon Sep 17 00:00:00 2001 From: Surahutomo Pradana Date: Mon, 28 Oct 2019 17:55:17 +0700 Subject: [PATCH] Add the missing enclosing div in the example of webcamAgeAndGenderRecognition.html --- .../views/webcamAgeAndGenderRecognition.html | 244 +++++++++--------- 1 file changed, 123 insertions(+), 121 deletions(-) diff --git a/examples/examples-browser/views/webcamAgeAndGenderRecognition.html b/examples/examples-browser/views/webcamAgeAndGenderRecognition.html index 06af23ac..4d44082e 100644 --- a/examples/examples-browser/views/webcamAgeAndGenderRecognition.html +++ b/examples/examples-browser/views/webcamAgeAndGenderRecognition.html @@ -1,56 +1,56 @@ - - - - - - - + + + + + + + - -
+ +
-
+
- - + +
- -
- - -
- + +
+ + +
+ - -
- - -
- - - -
-
- - - - + +
+ +
-
- + + + +
+
+ + + + +
+
+
@@ -63,14 +63,14 @@
@@ -99,14 +99,14 @@
@@ -122,14 +122,14 @@
@@ -137,91 +137,93 @@ - - - + setTimeout(() => onPlay()) + } + + async function run() { + // load face detection and face expression recognition models + await changeFaceDetector(TINY_FACE_DETECTOR) + await faceapi.nets.ageGenderNet.load('/') + changeInputSize(224) + + // try to access users webcam and stream the images + // to the video element + const stream = await navigator.mediaDevices.getUserMedia({video: {}}) + const videoEl = $('#inputVideo').get(0) + videoEl.srcObject = stream + } + + function updateResults() { + } + + $(document).ready(function () { + renderNavBar('#navbar', 'webcam_age_and_gender_recognition') + initFaceDetectionControls() + run() + }) + - \ No newline at end of file +