computer vision - Caffe: variable input-image size for vgg network -
i trying use caffe extract features of convolution layer rather fc layer vgg network.the theoretical input image size may arbitrary in situation. seams vgg network trained on images cropped size 224x224 pixel. define input data layer in deploy.prototext:
layers{ name: "data" type: memory_data top: "data" top: "label" transform_param{ mirror: false crop_size:224 mean_value:129.1863 mean_value:104.7624 mean_value:93.5940 } memory_data_param{ batch_size:1 channels:3 width:224 height:224 } }
i tried modify width = 500\height = 500\crop_size = 500 failed. caffe throws errors:“ cannot copy param 0 weights layer 'fc6'; shape mismatch. source param shape 1 1 4096 25088 (102760448); target param shape 4096 131072 (536870912). learn layer's parameters scratch rather copying saved net, rename layer.”
how possible can run on images big input layer without cropping?
you should resize image 224x224 first, since vgg trained on resolution. makes no sense extract feature on higher resolution. resizing , cropping, can use specialized imagedata layer: https://github.com/yihui-he/caffe-pro
Comments
Post a Comment