bearsprogrammer / real-time-deep-face-recognition

using facenet algorithm
MIT License
233 stars 100 forks source link

shape mismatch: value array of shape (0,1) could not be broadcast to indexing result of shape (0,) #5

Open billtiger opened 7 years ago

billtiger commented 7 years ago

Hi,thanks for your codes.when I run the make_aligndata.py,there is a error named:ValueError: shape mismatch: value array of shape (0,1) could not be broadcast to indexing result of shape (0,) the total is: Traceback (most recent call last):

File "", line 1, in runfile('/home/biao/face_recognizition/melowface_3/Make_aligndata_git.py', wdir='/home/biao/face_recognizition/melowface_3')

File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 93, in execfile builtins.execfile(filename, *where)

File "/home/biao/face_recognizition/melowface_3/Make_aligndata_git.py", line 72, in boundingboxes, = detect_face.detect_face(img, minsize, pnet, rnet, onet, threshold, factor)

File "detect_face.py", line 348, in detect_face qq3 = total_boxes[:,2]+total_boxes[:,7]*regw

File "detect_face.py", line 507, in pad image_obj['total_boxes'] = np.transpose(np.vstack([qq1, qq2, qq3, qq4, image_obj['total_boxes'][:, 4]]))

ValueError: shape mismatch: value array of shape (0,1) could not be broadcast to indexing result of shape (0,) how can I solve this error?thank you for your help.

billtiger commented 7 years ago

@bearsprogrammer I have solved this error.but now I have a thought:can I change the inputsize from 160 to 96? because I only use CPU,the perform of the speed is slowly.So I want to change the inputsize to 96,I thought the small size image will not need large computing,then the speed will perform faster? when I change the input image size ,this will appear error: InvalidArgumentError (see above for traceback): computed output size would be negative [[Node: InceptionResnetV1/Logits/AvgPool_1a_8x8/AvgPool = AvgPoolT=DT_FLOAT, data_format="NHWC", ksize=[1, 3, 3, 1], padding="VALID", strides=[1, 1, 1, 1], _device="/job:localhost/replica:0/task:0/cpu:0"]] So it can't change the input image size?

elbayaninho commented 6 years ago

You probably indicate a wrong folder. Not a aligned data folder.