ensure train image features and labels stay synchronized for svmtrain