Skip to content

abhilash-neog/physics-optimized-face-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid Nature-Inspired Optimization Techniques in Face Recognition

Nature has been a very effective source to develop various Nature Inspired Optimisation algorithms and this has developed into an active area of research. The focus of this paper is to develop a Hybrid Nature-inspired Optimisation Technique and study its application in Face Recognition Problem. Two different hybrid algorithms are proposed in this paper. First proposed algorithm is a hybrid of Gravitational Search Algorithm (GSA) and Big Bang-Big Crunch (BBBC). The other algorithm is an improvement of the first algorithm, which incorporates Stochastic Diffusion Search (SDS) algorithm along with Gravitational Search Algorithm (GSA) and Big Bang-Big Crunch (BB-BC). The hybrid is an enhancement of a single algorithm which when incorporated with similar other algorithms performs better in situations where single algorithms fail to perform well. The algorithm is used to optimize the Eigen vectors generated from Principal Component Analysis. The optimized Eigen faces supplied to SVM classifier provides better face recognition capabilities compared to the traditional PCA vectors. Testing on the face recognition problem, the algorithm showed 95% accuracy in the ORL dataset and better optimization capability on functions like Griewank-rosenbrock, Schaffer F7 in comparison to standard algorithms like Rosenbrock, GA and DASA during the Benchmark Testing.

Paper - Hybrid Nature-Inspired Optimization Techniques in Face Recognition (Transactions on Computational Science XXXVI, Springer, 2020)

Setup

1)Language: Python 3.6(recommended)

2)Libraries required: numpy, matplotlib, sklearn, scipy

OR

3) Anaconda 4 : Download

Function Descriptions:

(i) CostFun-> The ojective function used to evaluate data points inputs : Face Vector Matrix, Data point outputs: objective function value

(ii) Evaluate-> Evaluates the objectve function for all the eigen vectors and return fitness matrix inputs : Eigen Matrix, Face Vector Matrix outputs: fitness matrix

(iii) MassCalc-> Updates the masses of our eigen vectors based on their fitness values inputs : fitness values matrix outputs: Updated Mass Array of eigen vectors M

(iv) Gconstant-> Gives the G value for current iteration inputs : current iteration, max iterations outputs: G value

(v) Gfield -> Updates the acceleration values inputs : G, M, S, iteration number, Max iterations outputs: acceleration matrix a

(vi) move-> Gives the updated position and velocity matrices inputs : position matrix S, acceleration matrix a, velocity matrix V outputs: S,V

(vii) Sbound -> Checks if all the points are within the specified boundaries. If not, re-initializes them randomly within the boundaries inputs : S, upper limit, lower limit outputs: S

(viii)ChaoticLocalSearch-> Thorough searching for better solutions around a best solution inputs : Face matrix, center point outputs: best eigen vector, it's ojective funtion

(ix) NewChaos-> Initializes a new chaos variable inputs : None outputs: random value between 0 and 1

(x) plot_gallery-> plots the eigen faces obtained inputs : eigen face vectors, titles, height, width outputs: eigen vectors figure

(xi) checkAgents-> checks whether an agent is active or passive and accordingly classifies them inputs : dislpacement of agents(an array), current threshold outputs : passive and active agents

(xii) diffusion-> Causes the diffusion of hypothesis by the active diffusion process inputs : active agents, passive agents, fitness array outputs : updated fitness array

(xiii) thresholdValue -> updates the threshold after every iteration inputs: current iteration, current threshold value output: new threshold value

(xiv) calcDisplacement-> calculates the displacement of every agent in each iteration inputs: current search space, old search space(i.e. positions of agents) output: difference in position of agents(i.e. displacement)

Pipeline overview

The code automatically fetches the dataset by connecting to the internet. Number of components is given as 150 (can be changed as per the programmer's wish).Prinicpal Component Analysis is done on the dataset and eigen vectors are extracted. Then dimensionality reduction is done on the eigen vectors to match the number of components. This eigen vector matrix is given as the input to the algorithm with the objective function being the sum of it's corresponding weights in each face vector. The dataset would be represented by the transformed eigen vectors. Then it's divided into train and test data and passed on to an SVM classifier. The classification is done and results are noted.

About

[Springer LNCS, 2020] Hybrid nature-inspired optimization technique, applied on face recognition

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors