diff --git a/face_recognition/main.js b/face_recognition/main.js index 93f0d791..5c04a9f9 100644 --- a/face_recognition/main.js +++ b/face_recognition/main.js @@ -106,10 +106,11 @@ $('#targetImgFile').change((e) => { }); $('#targetImage').on('load', async () => { - targetEmbeddings = null; - if (inputType === 'image') { - await main(); + if (inputType === 'camera') { + await stopCamRender(); } + targetEmbeddings = null; + await main(); }); $('#searchImgFile').change((e) => {