Mask and respirator detection: analysis and potential solutions for a frequently ill-conditioned problem