davidsandberg / facenet

Face recognition using Tensorflow
MIT License
13.78k stars 4.81k forks source link

Valueerror while training for own dataset #904

Open raoyasir opened 6 years ago

raoyasir commented 6 years ago

Hi i trained facenet on my own dataset from this link https://github.com/davidsandberg/facenet/wiki/Train-a-classifier-on-own-images and when i run the command to train i got following error can someone tell me how to remove it ? Thanks Traceback (most recent call last): File "src/classifier.py", line 170, in main(parse_arguments(sys.argv[1:])) File "src/classifier.py", line 86, in main images = facenet.load_data(paths_batch, False, False, args.image_size) File "C:\Users\raoyasir\Desktop\facenet-master\src\facenet.py", line 254, in load_data images[i,:,:,:] = img ValueError: could not broadcast input array from shape (143,160,3) into shape (160,160,3)

jariojose commented 5 years ago

Hello, @raoyasir

Please, change the image shape using img = cv2.resize(img, (160,160))