justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.73k stars 3.72k forks source link

Firefox 72.0.1 WebGL Errors and failed face detection #541

Open camgaertner opened 4 years ago

camgaertner commented 4 years ago

Summary

Running Firefox 72.0.1, experiencing several WebGL errors in the console and face detection is failing. Same code ran in Chromium works great with no errors. I'm running Fedora 30 if it matters.

Additional Information

Screenshot image Errors as Text

Error: WebGL warning: readPixels: PIXEL_PACK_BUFFER must be null.
Error: WebGL warning: readPixels: Buffer for `target` is null.

OS Info

5.2.11-200.fc30.x86_64 #1 SMP Thu Aug 29 12:43:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

My Code

  const foo = async () => {
    const MODEL_URL = '/models'
        console.log("here")
    var result = faceapi.loadFaceLandmarkTinyModel(MODEL_URL)
    await faceapi.loadTinyFaceDetectorModel('/models')
    await faceapi.loadFaceLandmarkTinyModel('/models')
    await result
    console.log(result)
    console.log("i loaded it?")
    const input = document.getElementById('image')
    const detections2 = await faceapi.detectAllFaces(input, new faceapi.TinyFaceDetectorOptions())
    console.log(detections2)
  }
  foo()

Thank you for your hard work on this project!

justadudewhohacks commented 4 years ago

Hmm, it's better to ask the tfjs team about issues with the WebGL backend, since I am not familar with the internals.