Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: readFile - filesystem not available for browser environment #939

Open
puarinanhh opened this issue Feb 21, 2024 · 1 comment
Open

Comments

@puarinanhh
Copy link

I use angular , i have an error
image
This is my code:
html:
<img id="myImg" src="assets/img/tom-cruise.jpg" />
and file ts:

  const input: any = document.getElementById('myImg')
    await faceapi.nets.ssdMobilenetv1.loadFromDisk('assets/models')
    console.log('a', input);
    // const detections = await faceapi.detectAllFaces(input);
    const detections1 = await faceapi.detectAllFaces(input, new faceapi.SsdMobilenetv1Options())
    const detections2 = await faceapi.detectAllFaces(input, new faceapi.TinyFaceDetectorOptions())

I don't understand why the project can't find env, help me, thank you

@stanleyxu2005
Copy link

The issue is common. If you are using Webpack, you can follow this instruction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants