Arsey/keras-transfer-learning-for-oxford102

Imagenet mean subtraction

Opened this issue · 5 comments

Is it not necessecary to include the argument featurewise_center=True when creating ImageDataGenerator for the imagenet mean to get subtracted? (specifically on line 15 in bottleneck.py, and also in fine_tuning.py)

When i look at the keras source code for flow_from_directory they only seem to subtract the mean from images when featurewise_center is set to True.

Arsey commented

@hth013 with the given dataset, featurewise_center=False gives better accuracy (about +2%)

@Arsey Ok, i was just curious. With my dataset the accuracy increased by 1% when using featurewise_center.

Arsey commented

@hth013 what dataset have you used?

I'm doing a capstone project on automatic animal identification in camera trap images with a training dataset of 10000 images. So far i have reached 97% accuracy with 9 classes using transfer learning. Your code has been very helpful in guiding me to a solution, so thank you for that!

Arsey commented

@hth013 You're welcome, man! Glad it's helped you)