run face detection in thread