简体   繁体   中英

How to use an image present in the same folder as script.js for face recognition using face-api.js?

The entire project environment is in replit. The link provides the source code: https://replit.com/@dnabanita7/Face-Recog#script.js . I am sending in the code:

const imgUrl = '/leonard.png' 
const img = await faceapi.fetchImage(imgUrl)

and passing img.src value to the detectSingleFace() function but I am getting an error:

string passed but couldn't resolve HTMLElement id

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM