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-05-30 14:36:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a97cd89ad619cffd08ed5b5900db8d30348c6889
a97cd89a
1 parent
99ae40b4
Show count on consol-log
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
views/squartPage/squart.html
views/squartPage/squart.html
View file @
a97cd89
...
...
@@ -58,6 +58,8 @@
let
status
=
"stand"
;
// 갯수 count
let
count
=
0
;
// 잘못된 경우 count
let
wrong_count
=
0
;
async
function
predict
()
{
// Prediction #1: run input through posenet
...
...
@@ -71,10 +73,11 @@
if
(
status
==
"squart"
)
{
count
++
;
console
.
log
(
`올바른 스쿼트 :
${
count
}
`
)
}
status
=
"stand"
;
}
else
if
(
prediction
[
1
].
probability
.
toFixed
(
2
)
==
1.00
)
// 스쿼트 자세
else
if
(
prediction
[
1
].
probability
.
toFixed
(
2
)
>
1.00
)
// 스쿼트 자세
{
status
=
"squart"
;
}
...
...
@@ -82,7 +85,8 @@
{
if
(
status
==
"squart"
||
status
==
"stand"
)
// 굽은 자세로 잘못 수행하면,
{
console
.
log
(
"잘못된 경우 입니다."
)
wrong_count
++
;
console
.
log
(
`잘못된 자세 :
${
wrong_count
}
`
)
}
status
=
"bent"
;
}
...
...
Please
register
or
login
to post a comment