MTCNN_face_detection_alignment
MTCNN_face_detection_alignment copied to clipboard
speed up mtcnn
@kpzhang93 mtcnn is slow by CPU, is there any solution to speed it up in real time?
Hi everyone, Reviewing a little bit the code(python+mxnet version) i noticed that first stage part on the detect_face method takes almost the entire time of the mtcnn processing. Specifically here:
for batch in sliced_index:
local_boxes = self.Pool.map( detect_first_stage_warpper, \
zip(repeat(img), self.PNets[:len(batch)], [scales[i] for i in batch], repeat(self.threshold[0])) )
total_boxes.extend(local_boxes)
For 1 image, the first batch in sliced_index is the slowest respect the next batches. I want to know if throwing the Pool the first time is more expense in terms of time than the others or there are some other reason