YYuanAnyVision / mxnet_mtcnn_face_detection

MTCNN face detection
738 stars 314 forks source link

Failed to allocate CPU memory Python 32bit #44

Open freeearth opened 5 years ago

freeearth commented 5 years ago

Hello! Sometimes we get exception "Failed to allocate CPU memory" in detect_face function. We use mtcnn to get face boundary boxes, then we send it to model to get "embeddings" in this https://github.com/deepinsight/insightface. Exeception occurs on face detection stage. More precisely - on n 362 - 364 lines https://github.com/deepinsight/insightface/blob/be3b7ccad3a1702f7d2baa0e1d4d0818551da93a/deploy/mtcnn_detector.py#L362 We explore, that exception disappear while we switch off mxnet multithreading (i.e. MXNET_ENGINE_TYPE=NaiveEngine) We try on Windows-7, python both 3.6 and 2.7 32 bit. In Oracle VirtualBox with similar parameters as in up lines, exception occurs once and after it gone away.

We opened two issues (it viewed here more widely): https://stackoverflow.com/questions/54834022/failed-to-allocate-cpu-memory-python-32bit, https://github.com/deepinsight/insightface/issues/540, but nobody answered yet. We will great appreciate to any kind of assistance.