Ask Your Question
0

How to classify an object that does not belong to the trained classess using MLP

asked 2016-10-25 17:00:30 -0600

rududoo gravatar image

Hi,

I have a simple question related to CvANN_MLP classifier. I' ve trained a dataset composed of 40 subjects (orl_faces) using FPLBP as feature extraction. (that means there are 40 classes). I want to "recognize " a new subject that is not present in any class. After calling the predict method I can see in the output float matrix some distance values. The maximum value will point to the index of the predicted class (label). But this will point to one of the 40 existing classes. Could you give some hints what thresholds or anything similar , should I use , to decide in this particular case that the subject is unknown. (not present among the 40 subjects)? Note that if the subject has some training images it will be detected - so in this situation there is no issue.

Thanks, Radu

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-10-26 01:28:51 -0600

Roy2511 gravatar image

ANNs don't work like that. If a certain item is not in your training set, and you pass that item as an input to your network then it will classify that item to the closest possible set (ideally).

One possible solution is using a regression model, that way you can possibly use the classification error to penalise this misclassification. But this method is pretty dangerous, and not recommended.

edit flag offensive delete link more

Comments

Thank you for the answer. The situation I exposed it's in a real context. Suppose there is a database of persons at moment t0, and the database is trained using the ANN - so there is a model. Then an individual is captured on a live video stream at moment t1. Now the individual is searched for a prediction - to see if he/she has ever been tracked. If the individual is not found, he/she will be saved in the database and the model will be retrained containing also the new face. How should I handle this situation? In the papers there is the notion of "single pattern per person" when there is only one image in the a database per person. Now in the presented case there is no pattern of the individual.(but we do not know that - because as I said there is the moment t0 ...(more)

rududoo gravatar imagerududoo ( 2016-10-26 02:41:16 -0600 )edit

So as a summary the ANN network seems to overfit. It can only reproduce existing data but it can not make reliable prediction on general untrained data.

rududoo gravatar imagerududoo ( 2016-10-26 04:11:50 -0600 )edit

I wouldn't classify it as an overfitting, but yes, the consequences are similar.

The only thing I can think of right now is apply your feature extraction algorithm and then instead of passing it through an ANN right away, pass it through a thresholding algorithm. Use the existing classes to form sort of a D-dimensional sphere around a center point (which can be the feature average of the known classes). If the data point falls outside this circle then store it as 'unknown'. Once you have enough in the unknown pool, you can retrain the NN with x+1 classes and update the thresholding algorithm with the new data.

Roy2511 gravatar imageRoy2511 ( 2016-10-27 00:54:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-25 17:00:30 -0600

Seen: 343 times

Last updated: Oct 26 '16