geaxgx / depthai_handface

Running Google Mediapipe Face Mesh and Hand Tracking models on Luxonis DepthAI devices
MIT License
57 stars 10 forks source link

[system] [critical] Fatal error. Please report to developers. Log: 'ResourceLocker' '358 #4

Open AKhateeb opened 1 year ago

AKhateeb commented 1 year ago

I encountered an error once my hand overlapped with my face, I've run your repo with my OAK-D sensor

Error Message: [14442C10412D61D700] [2.4.4.4] [36.273] [system] [critical] Fatal error. Please report to developers. Log: 'ResourceLocker' '358

image

image

geaxgx commented 1 year ago

Thanks. I was able to reproduce the problem. Actually it seems to happen when a hand is too big in the image (even when there is no face in the image). The problem happens in the ImageManip node that take the part of the original image around the hand and feed the result to the hand landmark NeuralNetwork node. When the hand is very big in the original image, I think the ImageManip node may not have enough memory to compute the result image. My understanding is this memory is dynamically allocated. With my repo depthai_hand_tracker, which does only the hand tracking part (no face tracking), I can't reproduce the problem. I suspect it is because less memory is available in the current pipeline as a important part is used by the face neural networks. I noticed a similar problem on the blazepose repo but haven't found is totally satisfying solution. One solution could be before sending parameters to the ImageManip node, to test the size of the hand and if it is too big then consider that the hand has not been detected, and so do not call the ImageManip for this frame and just go on with the next frame. I currently don't have time to try this but will when possible.