TypeError in extract_image_chips
Morceguito opened this issue · 2 comments
File "main.py", line 22, in
chips = detector.extract_image_chips(img, points, 144, 0.37)
File "/content/drive/My Drive/mxnet_mtcnn_face_detection-master/mtcnn_detector.py", line 484, in extract_image_chips
for k in range(len(p)/2):
TypeError: 'float' object cannot be interpreted as an integer
I didn't change anything besides switching izip to zip
Hey
I solved this problem. Change these lines in mtcnn_detector.py as followings :
line 431 : change reshape(from_shape.shape[0]/2, 2) to reshape(int(from_shape.shape[0]/2), 2)
line 432 : change to_shape.reshape(to_shape.shape[0]/2, 2) to to_shape.reshape(int(to_shape.shape[0]/2), 2)
line 485 : change range(len(p)/2) to range(int(len(p)/2))
line 500 : range(len(shape)/2) to range(int(len(shape)/2))
In summary put an int before the devisions.
thanks a lot