Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't I classify the last class? #6124

Closed
fengpingsh opened this issue Dec 22, 2017 · 6 comments
Closed

Why can't I classify the last class? #6124

fengpingsh opened this issue Dec 22, 2017 · 6 comments

Comments

@fengpingsh
Copy link

fengpingsh commented Dec 22, 2017

I used a dataset which have 40 person and each have 10 pictures, and I did the fine tuning based on the VGG 16 module. It was quite good then fine-tuning. Here is the result:

I1222 04:02:16.620232  4708 data_layer.cpp:73] Restarting data prefetching from start.
I1222 04:02:47.203390  4703 solver.cpp:397]     Test net output #0: accuracy = 0.99
I1222 04:02:47.203533  4703 solver.cpp:397]     Test net output #1: loss = 3.71212 (* 1 = 3.71212 loss)
I1222 04:02:47.203552  4703 solver.cpp:315] Optimization Done.
I1222 04:02:47.203562  4703 caffe.cpp:259] Optimization Done.

When I doing the testing(classification), I found each picture was correctly classified but the last one. Should I set the num_output in train_val_deploy.prototxt to 41(I didn't noticed anyone who have done in that way)? It really confused me.

@Thomio-Watanabe
Copy link

You have 10 images of 40 different people (400 images total) and each person is a class, right ?
Your output should be 40, like you said.
I suggest you double check how you are feeding the network during train and test phases.
Maybe you are using one class (person) several times.

@139419qw
Copy link

@fengpingbaustem ,Hello, I'm also working with fine-tuning VGGFACE, But I got low accuracy. Can I contact u for further communication?

@duygusar
Copy link

Is VGGFace handling the dataset the same way Caffe would? E.g. labels should start from 0 to 9 for 10 classes.

@fengpingsh
Copy link
Author

@139419qw sure. @duygusar I think that's the point, I set the label start from 1 :-(

@duygusar
Copy link

@fengpingbaustem Sounds like that is the problem, you should rearrange your data according to Caffe. You can refer to some guides for preparing your own dataset from scratch for Caffe.

@Noiredd
Copy link
Member

Noiredd commented Jan 12, 2018

Closing as it looks like the issue is solved. In case you need further assistance, please post on the caffe-users list.

@Noiredd Noiredd closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants