Why my CNN based on Alexnet fails in classification ?

45 views
Skip to first unread message

jaba marwen

unread,
Apr 10, 2017, 12:21:52 PM4/10/17
to Caffe Users

Hi guys ,

I'm trying to build a CNN to classify dogs.In fact , my data set consists of 5 classes of dogs. I've 50 images of dogs splited into 40 images for training and 10 for testing.
I've trained my network based on AlexNet pretrained model  over 100,000 and 140,000 iterations but the accuracy is always between 20 % and 30 %.
In fact,  I have adapted AlexNet to my problem as following : I changed the name of last fully connected network and num_output to 5. Also ,  I ve changed the name of the first fully connected layer (fc6).

So why this model failed even I' ve used data augmentation (cropping )?

Should I use a linear classification on top layer of my network since I ve a little bit of data and similar  to AlexNet dataset ( as mentioned here as transfer learning advice transfer learning ) or my data set is very different of original data set of AlexNet and I should train linear classifier in earlier network ?



I've attached train.txt , val.txt and train_val.txt





Thank you
train.txt
val.txt
train_val.prototxt

Gil Mor

unread,
Apr 14, 2017, 5:05:21 PM4/14/17
to Caffe Users
You need a lot more then 40 images to train for such a complex problem.. 
Actually, Alexnet was trained on a dataset (image-net) with a lot of dogs so you can try and just use it without training. 
If you wish to train, I suggest you get pictures of dogs from some data base. 
You can extract only the dogs images from image-net.
http://www.image-net.org/
Good luck
Reply all
Reply to author
Forward
0 new messages