{"id":25834738,"url":"https://github.com/prishabhanot/facial_recognition_pca","last_synced_at":"2025-03-01T00:59:07.298Z","repository":{"id":278708683,"uuid":"936515668","full_name":"Prishabhanot/Facial_Recognition_PCA","owner":"Prishabhanot","description":"A face recognition system using Principal Component Analysis (PCA) for dimensionality reduction and a Support Vector Machine (SVM) classifier for classification. PCA extracts essential features (eigenfaces) from facial images, significantly reducing computational complexity while retaining critical information for accurate recognition.","archived":false,"fork":false,"pushed_at":"2025-02-21T09:17:42.000Z","size":2430,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T09:27:37.664Z","etag":null,"topics":["data","eigenfaces","facial-recognition","pca","python","reducing-computational-complexity","reducing-data-dimensions","svm-classifier"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prishabhanot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-21T08:12:19.000Z","updated_at":"2025-02-21T09:20:02.000Z","dependencies_parsed_at":"2025-02-21T09:27:45.970Z","dependency_job_id":"1b08f86e-31a2-4659-80fb-b8cfcc0a7136","html_url":"https://github.com/Prishabhanot/Facial_Recognition_PCA","commit_stats":null,"previous_names":["prishabhanot/facial_recognition_pca"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prishabhanot%2FFacial_Recognition_PCA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prishabhanot%2FFacial_Recognition_PCA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prishabhanot%2FFacial_Recognition_PCA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prishabhanot%2FFacial_Recognition_PCA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prishabhanot","download_url":"https://codeload.github.com/Prishabhanot/Facial_Recognition_PCA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241300506,"owners_count":19940489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","eigenfaces","facial-recognition","pca","python","reducing-computational-complexity","reducing-data-dimensions","svm-classifier"],"created_at":"2025-03-01T00:59:06.727Z","updated_at":"2025-03-01T00:59:07.285Z","avatar_url":"https://github.com/Prishabhanot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Recognition Using PCA and SVM\n\n## Overview\n\nThis project implements a face recognition system using Principal Component Analysis (PCA) for dimensionality reduction and a Support Vector Machine (SVM) classifier for classification. The dataset consists of face images represented as pixel values.\n\n## Results\n\nReduced feature dimensions from 4096 to 200 while retaining significant variance. Achieved a classification precision score of 97%, recall of 96%, and F1-score of 96%. PCA efficiently finds a lower-dimensional space that preserves key facial variations for classification.\n\n![EigenFaces](Facial_Rec.png)\n\n## Requirements\n\nEnsure you have the following dependencies installed before running the script:\n\npip install numpy pandas matplotlib scikit-learn\n\n## Dataset\n\nThe dataset (face_data.csv) contains face images in pixel form with an associated target label.\n\nEach image is represented as a flattened array of pixel intensities (64x64 = 4096 features).\n\n## Steps Performed\n- Load and Visualize the Dataset\n- Read face_data.csv into a Pandas DataFrame.\n- Display the first few rows (optional).\n- Extract target labels and pixel features.\n- Show original grayscale face images.\n- Preprocessing and Splitting Data\n- Split the dataset into training (80%) and testing (20%) sets.\n- Apply PCA for Dimensionality Reduction\n- Fit PCA with 200 principal components.\n- Plot the cumulative variance explained by each component.\n- Display eigenfaces to visualize principal components.\n- Train an SVM Classifier\n- Transform training data using PCA.\n- Train an SVM with an RBF kernel, C=1000, and gamma=0.01.\n- Evaluate Model Performance\n- Transform test data using PCA.\n- Predict labels using the trained SVM.\n- Print classification report (precision, recall, F1-score).\n\n\n## Running the Script\n\nSimply execute the Python script:\n\npython face_recognition_pca.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprishabhanot%2Ffacial_recognition_pca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprishabhanot%2Ffacial_recognition_pca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprishabhanot%2Ffacial_recognition_pca/lists"}