"Failed to link vertex and fragment shaders" while using Posenet on ios (Mobile Safari 18.1.1)
Hi, I saw from my analytics this following error in production.
"Failed to link vertex and fragment shaders" while initializing posenet.
This is my initialization.
const initTensor = zeros([256, 256, 3])
await this.poseDetector.estimatePoses(initTensor)
It has only happened twice in the last couple of years but I would like to know what to do and how to try recovering the system.
I am quite sure the error happened on ios Mobile Safari 18.1.1.
these are the tfjs versions I use
@tensorflow-models/pose-detection": "^2.1.3 @tensorflow/tfjs-backend-webgl": "^4.21.0 @tensorflow/tfjs-backend-webgpu": "^4.21.0 @tensorflow/tfjs-converter": "^4.21.0 @tensorflow/tfjs-core": "^4.21.0
Any advice would be welcomed!
Hi @Pensarfeo ,
I wasn't able to replicate the issue on my end, but based on my understading, it seems that the problem is related to your device running GPU out of memory. I believe images with a resolution of 256x256 should work fine with the poseDetector models, but larger images may cause memory issues.
I came across this discussion that might be helpful: Thread.
Thank You!!
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.
Hi @shmishra99, thanks for giving it a try :) I also never saw this issue, it seems rare, i have seen it only a few times on thousands of devices that used my app. My questions is more about how to handle the failure rather than how to fix it.
Shall I just try to run the model again? Shall I force reload the page? Is there a way to check how much memory is available?