YYuanAnyVision / mxnet_mtcnn_face_detection

MTCNN face detection
738 stars 314 forks source link

multithreading fails #10

Open aliosia opened 7 years ago

aliosia commented 7 years ago

Hi, In the following code d1.detect_face is working properly but when I call d2.detect_face the program get stocked and nothing happens. I think there should be a problem with multi thread processing with Pool, because when I use detect_first_stage instead of detect_first_stage_warpper with just one of the nets it was OK.

d = MtcnnDetector(model_folder=model_path, ctx=mx.cpu(0), minsize=minsize, num_worker=4, accurate_landmark=False) 
d2 = MtcnnDetector(model_folder=model_path, ctx=mx.cpu(0), minsize=minsize, num_worker=4, accurate_landmark=False)
d1.detect_face(image)
d2.detect_face(image)
look-recognize commented 7 years ago

Same problem

sunbinbin1991 commented 6 years ago

Same problem,sometimes it works ,sometime it not work: terminate called after throwing an instance of 'std::system_error'