Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공태현
/
healthcare-with-webcam
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
정지호
2022-06-07 18:42:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd2a8e4bdfebfbe19d18085dfae95f04a2d7e0a6
cd2a8e4b
1 parent
3e883c7d
Update counter
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
views/squatPage/squat.js
로그인회원가입기능/healthcare-with-webcam
views/squatPage/squat.js
View file @
cd2a8e4
...
...
@@ -4,7 +4,13 @@
const
URL
=
"https://teachablemachine.withgoogle.com/models/xymjZj4q-/"
;
// 임시 URI - stand , squart, bent(허리 굽은 자세) 학습.
let
model
,
webcam
,
ctx
,
labelContainer
,
maxPredictions
;
// 상태 : 서있는 상태로 초기화
let
status
=
"stand"
;
// 갯수 count
let
count
=
0
;
var
counter
=
document
.
getElementById
(
"counter"
);
counter
.
textContent
=
count
;
counter
.
className
=
"hidden"
;
async
function
init
()
{
const
modelURL
=
URL
+
"model.json"
;
...
...
@@ -16,6 +22,8 @@ async function init() {
var
target2
=
document
.
getElementById
(
"title"
);
target2
.
className
=
"click_title"
;
counter
.
className
=
"circle"
;
// load the model and metadata
// Refer to tmImage.loadFromFiles() in the API to support files from a file picker
// Note: the pose library adds a tmPose object to your window (window.tmPose)
...
...
@@ -45,13 +53,6 @@ async function loop(timestamp) {
window
.
requestAnimationFrame
(
loop
);
}
// 상태 : 서있는 상태로 초기화
let
status
=
"stand"
;
// 갯수 count
let
count
=
0
;
var
counter
=
document
.
getElementById
(
"counter"
);
counter
.
textContent
=
count
;
async
function
predict
()
{
// Prediction #1: run input through posenet
// estimatePose can take in an image, video or canvas html element
...
...
healthcare-with-webcam
@
381096f7
Subproject commit 381096f776f0756063d2f9e77ceaca7d5fc7fcdc
Please
register
or
login
to post a comment