Accuracy of Image Classification

Hi!

I have some issue with the accuracy of image classification.

For the Face-Recongnition which I found at here:
https://github.com/AastaNV/Face-Recognition,
I have train my own set of data out. Using me and my friends face, however when there is 2 or more people in the data set it only shows two result only. I check with my classification model before merging (detection and classify) it works perfectly fine.

But when I merge it with the detection model, the accurately drop significantly. In digits, it is still able to show the result but not the same as the classification model. When I deploy it out, it only shows two results only. Below is an example to elaborate my case.

Example:
I train person A, B, C and D faces, for classification model it is able to accurately differentiate who is who. However, when I merge it with facial detection. Once it detect the face, it only shows person A or B results only even when it detect person C or D.

Thanks!

Hi,

Here are some suggestions of your problem:

1. Check the detection output first:
https://github.com/AastaNV/Face-Recognition/blob/master/pluginImplement.cpp#L176

2. Check the recognition plugin implementation for your use case:
https://github.com/AastaNV/Face-Recognition/blob/master/pluginImplement.cpp#L382

Thanks.

Hi AastaLLL,

Thanks for the information.

  1. For the detection output, I check and it is working fine.

  2. For the recognition plugin I am not sure what to check, for the plugin I never changed anything from the your source and for my case is the same facial recognition just that I train my own data out instead of using the celebrity data set.

Thanks!

Hi,

Could you check if this function works correctly with your label file?
https://github.com/AastaNV/Face-Recognition/blob/master/face-recognition/face-recognition.cpp#L59

Thanks.

Hi AastLLL,

Yup, I checked and its working correctly. Just that the accuracy of the classification when merged is not very high (around 30% accuracy) as compare to just classification model( around 90 to 99%).

Thanks!

Hi,

Do you use the same image content/resolution to test?

There is a ROI step between detection and classification, which may slightly lower the accuracy since re-sampling.
Could you check if accuracy drop is from this procedure?

Thanks.

Hi AastaLLL,

Do you use the same image content/resolution to test?

  • Yes I used the same image content to test and the accuracy is still low, it only shows the desired result when e.g I stand at certain places.

There is a ROI step between detection and classification, which may slightly lower the accuracy since re-sampling.
Could you check if accuracy drop is from this procedure?

  • Yes, I checked and it came from here.

Thanks!

Hi,

Here are some improvement can try:

1. Downscale implementation:
Simple bilinear is used for downscaling an image for classification.
https://github.com/AastaNV/Face-Recognition/blob/master/kernel.cu#L101

2. Mean subtraction:
We don’t apply mean subtraction for the input of classification. (=ROI output)
If you have a pixel-wise mean subtraction, this may cause accuracy drop.

It’s recommended to save the output of ROI as an image and feed it into the classification-only pipeline for information.

Thanks.