Open abhishekprologic opened 2 years ago
This is supposed to be a warning. The demo handles this case and should work fine except that SIMD isn't supported by the browser. As a result, the default backend should be WebAssembly and WebAssembly SIMD should be disabled.
Not working with any other options too.
I'm not sure to understand what is not working then. In the screenshot you shared, we can see the background showing up at 60fps and given that no face is on the camera, I can't understand what is going wrong. Please could you share another screenshot with either a face on the camera or either one of the provided images as input?
Thanks you for taking the time to share this screenshot. The console output is actually interesting. On my Safari 15.2 (no idea if the minor version does matter) where I have it working, the difference I can see is that I don't have this first Promise Rejection error that appears on your screenshot. ~I'm gonna try to deploy a version with more info on all the promise errors to see if it could help the investigation. I'll let you know once it's deployed so that you could do another test if you don't mind.~
Actually I tried to make every promise of the code fail and I didn't manage to reproduce both the face not showing and the background being rendered. So I'm now wondering if there could be an issue when trying to read the pixels from the camera stream. Do you have the same result with the example source images or does it happen only with your camera?
Yes, same results with the images and video. I’m using Safari on Mac Mini.
Thanks for your answer, I'm gonna investigate differently then.
Same results with https://github.com/spasimir21/camera-processor/tree/main/%40camera-processor/virtual-background
which is based on this library.
Related issue: https://github.com/spasimir21/camera-processor/issues/5
That's interesting cause it seems that for now, @spasimir21 repo doesn't include yet all the WebGL stuff so I guess I can exclude everything related to this from the root cause.
I don't know if it is related to this issue, but it's related to Safari browsers, booth on web and mobile. If the source video is not shown, the output video will be blocked at the last frame. I managed to overcome this problem, with position absolute, and opacity 0. Hope this helps someone dealing with Safari!
Works fine with Chrome and Firefox.
I am using Safari version 15.0. Following errors occur in Safari browser on opening live demo:
[Warning] wasm streaming compile failed: CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 19 (tflite-simd.js, line 9)
[Warning] falling back to ArrayBuffer instantiation (tflite-simd.js, line 9)
[Warning] failed to asynchronously prepare wasm: CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16 (tflite-simd.js, line 9)
[Warning] CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16 (tflite-simd.js, line 9)
[Warning] Failed to create TFLite SIMD WebAssembly module. – RuntimeError: abort(CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16). Build with -s ASSERTIONS=1 for more info. (main.0187bf97.chunk.js, line 1)
*RuntimeError: abort(CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16). Build with -s ASSERTIONS=1 for more info. *