정지호

Update counter

...@@ -4,7 +4,13 @@ ...@@ -4,7 +4,13 @@
4 const URL = "https://teachablemachine.withgoogle.com/models/xymjZj4q-/"; // 임시 URI - stand , squart, bent(허리 굽은 자세) 학습. 4 const URL = "https://teachablemachine.withgoogle.com/models/xymjZj4q-/"; // 임시 URI - stand , squart, bent(허리 굽은 자세) 학습.
5 let model, webcam, ctx, labelContainer, maxPredictions; 5 let model, webcam, ctx, labelContainer, maxPredictions;
6 6
7 - 7 +// 상태 : 서있는 상태로 초기화
8 +let status = "stand" ;
9 +// 갯수 count
10 +let count = 0;
11 +var counter = document.getElementById("counter");
12 +counter.textContent = count;
13 +counter.className = "hidden";
8 14
9 async function init() { 15 async function init() {
10 const modelURL = URL + "model.json"; 16 const modelURL = URL + "model.json";
...@@ -16,6 +22,8 @@ async function init() { ...@@ -16,6 +22,8 @@ async function init() {
16 var target2 = document.getElementById("title"); 22 var target2 = document.getElementById("title");
17 target2.className = "click_title"; 23 target2.className = "click_title";
18 24
25 + counter.className = "circle";
26 +
19 // load the model and metadata 27 // load the model and metadata
20 // Refer to tmImage.loadFromFiles() in the API to support files from a file picker 28 // Refer to tmImage.loadFromFiles() in the API to support files from a file picker
21 // Note: the pose library adds a tmPose object to your window (window.tmPose) 29 // Note: the pose library adds a tmPose object to your window (window.tmPose)
...@@ -45,13 +53,6 @@ async function loop(timestamp) { ...@@ -45,13 +53,6 @@ async function loop(timestamp) {
45 window.requestAnimationFrame(loop); 53 window.requestAnimationFrame(loop);
46 } 54 }
47 55
48 -// 상태 : 서있는 상태로 초기화
49 -let status = "stand" ;
50 -// 갯수 count
51 -let count = 0;
52 -var counter = document.getElementById("counter");
53 -counter.textContent = count;
54 -
55 async function predict() { 56 async function predict() {
56 // Prediction #1: run input through posenet 57 // Prediction #1: run input through posenet
57 // estimatePose can take in an image, video or canvas html element 58 // estimatePose can take in an image, video or canvas html element
......
1 +Subproject commit 381096f776f0756063d2f9e77ceaca7d5fc7fcdc