Does feature extraction benefit from augmentation of test and training images

42 views
Skip to first unread message

Chris Parry

unread,
Apr 11, 2016, 8:14:34 PM4/11/16
to Caffe Users
I am using a pre-trained CNN from model zoo to perform feature extraction, as here Caffe Docs

I am extracting features from training and test image sets, training a classifier (SVM) on the training data, and then using it to generate predictions on the test feature vectors. Using this method is about 80% accurate on the test data. I want to improve on this. Would it help to:

1. Produce more training images by augmenting (jitter, fliplr, flipud, etc)?
2. Produce multiple test datasets by augmenting and then averaging the predicted probabilities across the augmented datasets?

Also, should the extracted feature vectors be normalized before training/testing or is this already done by the pre-trained CNN? E.g:

from sklearn import preprocessing

scaler1 = preprocessing.StandardScaler()
Xtrain = scaler1.fit_transform(X_train)
Xtest = scaler1.transform(X_test)

Thanks!

Jan

unread,
Apr 18, 2016, 6:05:07 AM4/18/16
to Caffe Users
See interleaved answers.


Am Dienstag, 12. April 2016 02:14:34 UTC+2 schrieb Chris Parry:
I am using a pre-trained CNN from model zoo to perform feature extraction, as here Caffe Docs

I am extracting features from training and test image sets, training a classifier (SVM) on the training data, and then using it to generate predictions on the test feature vectors. Using this method is about 80% accurate on the test data. I want to improve on this. Would it help to:

1. Produce more training images by augmenting (jitter, fliplr, flipud, etc)?

Yes, that is probably a good idea. Caffe already supports random flipping afaik.
 
2. Produce multiple test datasets by augmenting and then averaging the predicted probabilities across the augmented datasets?

The test data set is there to give you an estimate on how well your trained network performs. Augmenting your _testset_ with modified old samples will probably only bias the computed accuracy. It may get better, but it is not a good estimation of the true performance of your network anymore.
 
Also, should the extracted feature vectors be normalized before training/testing or is this already done by the pre-trained CNN? E.g:

Depends on the definition in your network's config. Alternatively you can do it by hand.
 

from sklearn import preprocessing

scaler1 = preprocessing.StandardScaler()
Xtrain = scaler1.fit_transform(X_train)
Xtest = scaler1.transform(X_test)

Thanks!

Jan
 
Reply all
Reply to author
Forward
0 new messages