0

I am using LBP on grayscale images for facial expression recognition task. How can I figure out the best parameters (number of neighbour set points, and radius of circle) for LBP which will be used as the input of my CNN?

p.s. Using skimage's LBP implementation

talha06
  • 6,206
  • 21
  • 92
  • 147

1 Answers1

2

You should probably use a CNN directly for this task, but in general, for any learning task, you should use cross-validation to estimate task performance. scikit-learn has excellent documentation on model selection, cross-validation, and parameter search:

More advanced model selection includes Bayesian parameter search, for which the modules hyperopt and Optuna might be useful.

Juan
  • 5,433
  • 21
  • 23
  • Thanks for your comment; but actually I am looking for the optimization of LBP. – talha06 Sep 23 '19 at 08:55
  • The principle is exactly the same: find a metric you care about, then use cross-validation to tune the parameters of the pipeline. It's irrelevant whether you are tuning the number of trees in a random forest, the number of hidden layers in a network, or the input parameters to LBP. – Juan Sep 24 '19 at 07:44