How is something like this addressed in ML? In traditional software development there are tools like automated tests & static analysis to prevent your customers running into these types of embarrassing issues.
The face/head errors is likely an artifact of transfer learning (handtrackjs is finetuned on the object detection model trained using the coco object detection dataset which contains a person category).
Current approach being explored to expand the training data to include faces/heads such that the model better discriminates this from hands.
There are also size and speed optimizations being explored (smaller models such as efficientdet, quantization).