Hello Everyone,
I am struggling with the right way to create LMDB using python in order to fine-tune VGG-16. I can not use convert_imageset, because I am working on multi-label classification and have to create two DB for the data and the labels.
Modifying Yoann code at:
I can get everything to be read into Caffe right, but the network fails to converge. I am suspecting this is because I have not done the transformation from RGB->BGR and/or the mean subtraction right.
So the question is how to build the DB and define the input layer so that VGG-16 fine-tuning would work?
Right now I subtract the mean in the data layer, and save the images into LMDB with:
msk = np.array(cv2.imread(os.path.join(data_dir,in_)))
msk = msk[:,:,::-1]
msk = msk.transpose((2,0,1))
msk_dat = caffe.io.array_to_datum(msk)
in_txn.put('{:0>10d}'.format(1000*idx + in_idx), msk_dat.SerializeToString())
It should be noted that I am fine tuning the fine-tuned version of VGG-16 for faces:
They are not mentioning how to input the data, so I assume it is exactly as VGG-16 (how can you check this type of stuff btw?)
Thanks a lot!