xslittlegrass / CarND-Vehicle-Detection

Vehicle detection using YOLO in Keras runs at 21FPS
389 stars 175 forks source link

i meet a error, maybe the yolo-tiny.weights is not right, can you help me? #7

Closed omnigeeker closed 7 years ago

omnigeeker commented 7 years ago

kshape: (3, 3, 3, 16) data:(16175385,) - 432 kshape: (3, 3, 16, 32) data:(16175385,) - 4608 kshape: (3, 3, 32, 64) data:(16175385,) - 18432 kshape: (3, 3, 64, 128) data:(16175385,) - 73728 kshape: (3, 3, 128, 256) data:(16175385,) - 294912 kshape: (3, 3, 256, 512) data:(16175385,) - 1179648 kshape: (3, 3, 512, 1024) data:(16175385,) - 4718592 kshape: (3, 3, 1024, 1024) data:(16175385,) - 9437184 kshape: (3, 3, 1024, 1024) data:(16175385,) - 9437184

ValueError Traceback (most recent call last)

in () ----> 1 load_weights(model,'./yolo-tiny.weights') 2 print("load_weights succeed") E:\github\xslittlegrass-CarND-Vehicle-Detection\utils\utils.py in load_weights(model, yolo_weight_file) 21 size = np.prod(kshape) 22 print("kshape: {} data:{} - {}".format(kshape, data.shape, size)) ---> 23 ker = data[index:index+size].reshape(kshape) 24 index += np.prod(kshape) 25 layer.set_weights([ker,bia]) ValueError: cannot reshape array of size 443769 into shape (3,3,1024,1024)
omnigeeker commented 7 years ago

there are many .weights in https://pjreddie.com/darknet/yolo/, which one?

xslittlegrass commented 7 years ago

The link for the correct weight file can be found in the README of this project.