Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김영곤
/
2020-02-OSS-TermProject
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Authored by
이재호
2020-12-07 03:06:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
722b884e0a304c381d0da2f39ee19efc24301009
722b884e
1 parent
2ca87581
modify model and webcam function
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
views/index.ejs
views/index.ejs
View file @
722b884
...
...
@@ -172,8 +172,11 @@
let
model
,
webcam
,
labelContainer
,
maxPredictions
;
//predic이전 값을 기억해주는 전역변수. -999로 초기화.
var
last_result_predict
=-
999
;
// Load the image model and setup the webcam
async
function
init
()
{
window
.
onload
=
async
function
init
()
{
const
modelURL
=
URL
+
"model.json"
;
const
metadataURL
=
URL
+
"metadata.json"
;
...
...
@@ -186,7 +189,7 @@
// Convenience function to setup a webcam
const
flip
=
true
;
// whether to flip the webcam
webcam
=
new
tmImage
.
Webcam
(
200
,
20
0
,
flip
);
// width, height, flip
webcam
=
new
tmImage
.
Webcam
(
550
,
55
0
,
flip
);
// width, height, flip
await
webcam
.
setup
();
// request access to the webcam
await
webcam
.
play
();
window
.
requestAnimationFrame
(
loop
);
...
...
Please
register
or
login
to post a comment