이재호

modify model and webcam function

......@@ -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, 200, flip); // width, height, flip
webcam = new tmImage.Webcam(550, 550, flip); // width, height, flip
await webcam.setup(); // request access to the webcam
await webcam.play();
window.requestAnimationFrame(loop);
......